Submit
Path:
~
/
/
usr
/
share
/
grafana
/
public
/
build
/
File Content:
5807.f05d997ece5811bbc849.js
"use strict";(self.webpackChunkgrafana=self.webpackChunkgrafana||[]).push([[5807],{4417:Tt=>{Tt.exports=function(Fe,f){return f||(f={}),Fe&&(Fe=String(Fe.__esModule?Fe.default:Fe),/^['"].*['"]$/.test(Fe)&&(Fe=Fe.slice(1,-1)),f.hash&&(Fe+=f.hash),/["'() \t\n]|(%20)/.test(Fe)||f.needQuotes?'"'.concat(Fe.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):Fe)}},55893:(Tt,Fe,f)=>{f.r(Fe),f.d(Fe,{PixelRatio:()=>J,addMatchMediaChangeListener:()=>Q,getZoomFactor:()=>z,isAndroid:()=>L,isChrome:()=>C,isElectron:()=>D,isFirefox:()=>_,isSafari:()=>d,isStandalone:()=>j,isWebKit:()=>y,isWebkitWebView:()=>w});var I=f(2106),h=f(10998);class te{constructor(){this._zoomFactor=1}getZoomFactor(){return this._zoomFactor}}te.INSTANCE=new te;class $ extends h.jG{constructor(){super(),this._onDidChange=this._register(new I.vl),this.onDidChange=this._onDidChange.event,this._listener=()=>this._handleChange(!0),this._mediaQueryList=null,this._handleChange(!1)}_handleChange(B){var T;(T=this._mediaQueryList)===null||T===void 0||T.removeEventListener("change",this._listener),this._mediaQueryList=matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`),this._mediaQueryList.addEventListener("change",this._listener),B&&this._onDidChange.fire()}}class x extends h.jG{constructor(){super(),this._onDidChange=this._register(new I.vl),this.onDidChange=this._onDidChange.event,this._value=this._getPixelRatio();const B=this._register(new $);this._register(B.onDidChange(()=>{this._value=this._getPixelRatio(),this._onDidChange.fire(this._value)}))}get value(){return this._value}_getPixelRatio(){const B=document.createElement("canvas").getContext("2d"),T=window.devicePixelRatio||1,H=B.webkitBackingStorePixelRatio||B.mozBackingStorePixelRatio||B.msBackingStorePixelRatio||B.oBackingStorePixelRatio||B.backingStorePixelRatio||1;return T/H}}class ie{constructor(){this._pixelRatioMonitor=null}_getOrCreatePixelRatioMonitor(){return this._pixelRatioMonitor||(this._pixelRatioMonitor=(0,h.lC)(new x)),this._pixelRatioMonitor}get value(){return this._getOrCreatePixelRatioMonitor().value}get onDidChange(){return this._getOrCreatePixelRatioMonitor().onDidChange}}function Q(N,B){typeof N=="string"&&(N=window.matchMedia(N)),N.addEventListener("change",B)}const J=new ie;function z(){return te.INSTANCE.getZoomFactor()}const S=navigator.userAgent,_=S.indexOf("Firefox")>=0,y=S.indexOf("AppleWebKit")>=0,C=S.indexOf("Chrome")>=0,d=!C&&S.indexOf("Safari")>=0,w=!C&&!d&&y,D=S.indexOf("Electron/")>=0,L=S.indexOf("Android")>=0;let k=!1;if(window.matchMedia){const N=window.matchMedia("(display-mode: standalone)");k=N.matches,Q(N,({matches:B})=>{k=B})}function j(){return k}},51577:(Tt,Fe,f)=>{f.d(Fe,{e:()=>te});var I=f(55893),h=f(63339);const te={clipboard:{writeText:h.ib||document.queryCommandSupported&&document.queryCommandSupported("copy")||!!(navigator&&navigator.clipboard&&navigator.clipboard.writeText),readText:h.ib||!!(navigator&&navigator.clipboard&&navigator.clipboard.readText)},keyboard:(()=>h.ib||I.isStandalone()?0:navigator.keyboard||I.isSafari?1:2)(),touch:"ontouchstart"in window||navigator.maxTouchPoints>0,pointerEvents:window.PointerEvent&&("ontouchstart"in window||window.navigator.maxTouchPoints>0||navigator.maxTouchPoints>0)}},39587:(Tt,Fe,f)=>{f.d(Fe,{M:()=>te,t:()=>h});var I=f(53720);const h={RESOURCES:"ResourceURLs",DOWNLOAD_URL:"DownloadURL",FILES:"Files",TEXT:I.K.text},te={CurrentDragAndDropData:void 0}},59095:(Tt,Fe,f)=>{f.d(Fe,{$:()=>oi,BC:()=>ii,BK:()=>X,Bx:()=>ft,Cl:()=>Pe,Di:()=>ut,Ej:()=>se,H4:()=>O,Hs:()=>vi,L9:()=>ge,Ln:()=>Ze,OK:()=>ot,Oq:()=>ee,PG:()=>ce,QX:()=>lt,Tf:()=>we,Tr:()=>ve,U2:()=>Ie,WU:()=>Li,Wt:()=>xt,XD:()=>Ke,Xc:()=>k,Yx:()=>he,a4:()=>Oe,b2:()=>L,bq:()=>Re,cL:()=>le,dl:()=>T,fg:()=>Z,fs:()=>Bt,h:()=>Ki,i0:()=>ze,jD:()=>zi,jG:()=>Ue,jh:()=>ki,ko:()=>d,li:()=>et,m1:()=>We,mU:()=>K,pN:()=>Zt,qD:()=>y,sb:()=>dt,tG:()=>fe,vT:()=>Te,w5:()=>zt,w_:()=>_,wk:()=>pt,y6:()=>Ee,yB:()=>Di,yt:()=>ct,zK:()=>jt});var I=f(55893),h=f(51577),te=f(87594),$=f(9715),x=f(94327),ie=f(2106),Q=f(92542),J=f(10998),z=f(13072),S=f(63339);function _(nt){for(;nt.firstChild;)nt.firstChild.remove()}function y(nt){var Ct;return(Ct=nt?.isConnected)!==null&&Ct!==void 0?Ct:!1}class C{constructor(Ct,Qt,Ot,at){this._node=Ct,this._type=Qt,this._handler=Ot,this._options=at||!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 d(nt,Ct,Qt,Ot){return new C(nt,Ct,Qt,Ot)}function w(nt){return function(Ct){return nt(new $.P(Ct))}}function D(nt){return function(Ct){return nt(new te.Z(Ct))}}const L=function(Ct,Qt,Ot,at){let Yi=Ot;return Qt==="click"||Qt==="mousedown"?Yi=w(Ot):(Qt==="keydown"||Qt==="keypress"||Qt==="keyup")&&(Yi=D(Ot)),d(Ct,Qt,Yi,at)},k=function(Ct,Qt,Ot){const at=w(Qt);return N(Ct,at,Ot)},j=function(Ct,Qt,Ot){const at=w(Qt);return B(Ct,at,Ot)};function N(nt,Ct,Qt){return d(nt,S.un&&h.e.pointerEvents?ft.POINTER_DOWN:ft.MOUSE_DOWN,Ct,Qt)}function B(nt,Ct,Qt){return d(nt,platform.isIOS&&BrowserFeatures.pointerEvents?ft.POINTER_UP:ft.MOUSE_UP,Ct,Qt)}function T(nt,Ct,Qt){let Ot=null;const at=bn=>St.fire(bn),Yi=()=>{Ot||(Ot=new C(nt,Ct,at,Qt))},bi=()=>{Ot&&(Ot.dispose(),Ot=null)},St=new ie.vl({onFirstListenerAdd:Yi,onLastListenerRemove:bi});return St}let H=null;function Y(nt){if(!H){const Ct=Qt=>setTimeout(()=>Qt(new Date().getTime()),0);H=self.requestAnimationFrame||self.msRequestAnimationFrame||self.webkitRequestAnimationFrame||self.mozRequestAnimationFrame||self.oRequestAnimationFrame||Ct}return H.call(self,nt)}let ee,ce;class pe{constructor(Ct,Qt=0){this._runner=Ct,this.priority=Qt,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(Ct){(0,x.dz)(Ct)}}static sort(Ct,Qt){return Qt.priority-Ct.priority}}(function(){let nt=[],Ct=null,Qt=!1,Ot=!1;const at=()=>{for(Qt=!1,Ct=nt,nt=[],Ot=!0;Ct.length>0;)Ct.sort(pe.sort),Ct.shift().execute();Ot=!1};ce=(Yi,bi=0)=>{const St=new pe(Yi,bi);return nt.push(St),Qt||(Qt=!0,Y(at)),St},ee=(Yi,bi)=>{if(Ot){const St=new pe(Yi,bi);return Ct.push(St),St}else return ce(Yi,bi)}})();function ge(nt){return document.defaultView.getComputedStyle(nt,null)}function fe(nt){if(nt!==document.body)return new Z(nt.clientWidth,nt.clientHeight);if(S.un&&window.visualViewport)return new Z(window.visualViewport.width,window.visualViewport.height);if(window.innerWidth&&window.innerHeight)return new Z(window.innerWidth,window.innerHeight);if(document.body&&document.body.clientWidth&&document.body.clientHeight)return new Z(document.body.clientWidth,document.body.clientHeight);if(document.documentElement&&document.documentElement.clientWidth&&document.documentElement.clientHeight)return new Z(document.documentElement.clientWidth,document.documentElement.clientHeight);throw new Error("Unable to figure out browser width and height")}class oe{static convertToPixels(Ct,Qt){return parseFloat(Qt)||0}static getDimension(Ct,Qt,Ot){const at=ge(Ct);let Yi="0";return at&&(at.getPropertyValue?Yi=at.getPropertyValue(Qt):Yi=at.getAttribute(Ot)),oe.convertToPixels(Ct,Yi)}static getBorderLeftWidth(Ct){return oe.getDimension(Ct,"border-left-width","borderLeftWidth")}static getBorderRightWidth(Ct){return oe.getDimension(Ct,"border-right-width","borderRightWidth")}static getBorderTopWidth(Ct){return oe.getDimension(Ct,"border-top-width","borderTopWidth")}static getBorderBottomWidth(Ct){return oe.getDimension(Ct,"border-bottom-width","borderBottomWidth")}static getPaddingLeft(Ct){return oe.getDimension(Ct,"padding-left","paddingLeft")}static getPaddingRight(Ct){return oe.getDimension(Ct,"padding-right","paddingRight")}static getPaddingTop(Ct){return oe.getDimension(Ct,"padding-top","paddingTop")}static getPaddingBottom(Ct){return oe.getDimension(Ct,"padding-bottom","paddingBottom")}static getMarginLeft(Ct){return oe.getDimension(Ct,"margin-left","marginLeft")}static getMarginTop(Ct){return oe.getDimension(Ct,"margin-top","marginTop")}static getMarginRight(Ct){return oe.getDimension(Ct,"margin-right","marginRight")}static getMarginBottom(Ct){return oe.getDimension(Ct,"margin-bottom","marginBottom")}}class Z{constructor(Ct,Qt){this.width=Ct,this.height=Qt}with(Ct=this.width,Qt=this.height){return Ct!==this.width||Qt!==this.height?new Z(Ct,Qt):this}static is(Ct){return typeof Ct=="object"&&typeof Ct.height=="number"&&typeof Ct.width=="number"}static lift(Ct){return Ct instanceof Z?Ct:new Z(Ct.width,Ct.height)}static equals(Ct,Qt){return Ct===Qt?!0:!Ct||!Qt?!1:Ct.width===Qt.width&&Ct.height===Qt.height}}Z.None=new Z(0,0);function le(nt){let Ct=nt.offsetParent,Qt=nt.offsetTop,Ot=nt.offsetLeft;for(;(nt=nt.parentNode)!==null&&nt!==document.body&&nt!==document.documentElement;){Qt-=nt.scrollTop;const at=De(nt)?null:ge(nt);at&&(Ot-=at.direction!=="rtl"?nt.scrollLeft:-nt.scrollLeft),nt===Ct&&(Ot+=oe.getBorderLeftWidth(nt),Qt+=oe.getBorderTopWidth(nt),Qt+=nt.offsetTop,Ot+=nt.offsetLeft,Ct=nt.offsetParent)}return{left:Ot,top:Qt}}function se(nt,Ct,Qt){typeof Ct=="number"&&(nt.style.width=`${Ct}px`),typeof Qt=="number"&&(nt.style.height=`${Qt}px`)}function X(nt){const Ct=nt.getBoundingClientRect();return{left:Ct.left+he.scrollX,top:Ct.top+he.scrollY,width:Ct.width,height:Ct.height}}function K(nt){let Ct=nt,Qt=1;do{const Ot=ge(Ct).zoom;Ot!=null&&Ot!=="1"&&(Qt*=Ot),Ct=Ct.parentElement}while(Ct!==null&&Ct!==document.documentElement);return Qt}const he=new class{get scrollX(){return typeof window.scrollX=="number"?window.scrollX:document.body.scrollLeft+document.documentElement.scrollLeft}get scrollY(){return typeof window.scrollY=="number"?window.scrollY:document.body.scrollTop+document.documentElement.scrollTop}};function ve(nt){const Ct=oe.getMarginLeft(nt)+oe.getMarginRight(nt);return nt.offsetWidth+Ct}function Ee(nt){const Ct=oe.getBorderLeftWidth(nt)+oe.getBorderRightWidth(nt),Qt=oe.getPaddingLeft(nt)+oe.getPaddingRight(nt);return nt.offsetWidth-Ct-Qt}function O(nt){const Ct=oe.getBorderTopWidth(nt)+oe.getBorderBottomWidth(nt),Qt=oe.getPaddingTop(nt)+oe.getPaddingBottom(nt);return nt.offsetHeight-Ct-Qt}function ot(nt){const Ct=oe.getMarginTop(nt)+oe.getMarginBottom(nt);return nt.offsetHeight+Ct}function lt(nt,Ct){for(;nt;){if(nt===Ct)return!0;nt=nt.parentNode}return!1}function We(nt,Ct,Qt){for(;nt&&nt.nodeType===nt.ELEMENT_NODE;){if(nt.classList.contains(Ct))return nt;if(Qt){if(typeof Qt=="string"){if(nt.classList.contains(Qt))return null}else if(nt===Qt)return null}nt=nt.parentNode}return null}function Ke(nt,Ct,Qt){return!!We(nt,Ct,Qt)}function De(nt){return nt&&!!nt.host&&!!nt.mode}function Pe(nt){return!!Ue(nt)}function Ue(nt){for(;nt.parentNode;){if(nt===document.body)return null;nt=nt.parentNode}return De(nt)?nt:null}function Re(){let nt=document.activeElement;for(;nt?.shadowRoot;)nt=nt.shadowRoot.activeElement;return nt}function et(nt=document.getElementsByTagName("head")[0]){const Ct=document.createElement("style");return Ct.type="text/css",Ct.media="screen",nt.appendChild(Ct),Ct}let rt=null;function Lt(){return rt||(rt=et()),rt}function Dt(nt){var Ct,Qt;return!((Ct=nt?.sheet)===null||Ct===void 0)&&Ct.rules?nt.sheet.rules:!((Qt=nt?.sheet)===null||Qt===void 0)&&Qt.cssRules?nt.sheet.cssRules:[]}function xt(nt,Ct,Qt=Lt()){!Qt||!Ct||Qt.sheet.insertRule(nt+"{"+Ct+"}",0)}function Ie(nt,Ct=Lt()){if(!Ct)return;const Qt=Dt(Ct),Ot=[];for(let at=0;at<Qt.length;at++)Qt[at].selectorText.indexOf(nt)!==-1&&Ot.push(at);for(let at=Ot.length-1;at>=0;at--)Ct.sheet.deleteRule(Ot[at])}function dt(nt){return typeof HTMLElement=="object"?nt instanceof HTMLElement:nt&&typeof nt=="object"&&nt.nodeType===1&&typeof nt.nodeName=="string"}const ft={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",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:I.isWebKit?"webkitAnimationStart":"animationstart",ANIMATION_END:I.isWebKit?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:I.isWebKit?"webkitAnimationIteration":"animationiteration"},Bt={stop:function(nt,Ct){nt.preventDefault?nt.preventDefault():nt.returnValue=!1,Ct&&(nt.stopPropagation?nt.stopPropagation():nt.cancelBubble=!0)}};function jt(nt){const Ct=[];for(let Qt=0;nt&&nt.nodeType===nt.ELEMENT_NODE;Qt++)Ct[Qt]=nt.scrollTop,nt=nt.parentNode;return Ct}function pt(nt,Ct){for(let Qt=0;nt&&nt.nodeType===nt.ELEMENT_NODE;Qt++)nt.scrollTop!==Ct[Qt]&&(nt.scrollTop=Ct[Qt]),nt=nt.parentNode}class bt extends J.jG{constructor(Ct){super(),this._onDidFocus=this._register(new ie.vl),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new ie.vl),this.onDidBlur=this._onDidBlur.event;let Qt=bt.hasFocusWithin(Ct),Ot=!1;const at=()=>{Ot=!1,Qt||(Qt=!0,this._onDidFocus.fire())},Yi=()=>{Qt&&(Ot=!0,window.setTimeout(()=>{Ot&&(Ot=!1,Qt=!1,this._onDidBlur.fire())},0))};this._refreshStateHandler=()=>{bt.hasFocusWithin(Ct)!==Qt&&(Qt?Yi():at())},this._register(d(Ct,ft.FOCUS,at,!0)),this._register(d(Ct,ft.BLUR,Yi,!0)),this._register(d(Ct,ft.FOCUS_IN,()=>this._refreshStateHandler())),this._register(d(Ct,ft.FOCUS_OUT,()=>this._refreshStateHandler()))}static hasFocusWithin(Ct){const Qt=Ue(Ct),Ot=Qt?Qt.activeElement:document.activeElement;return lt(Ot,Ct)}}function zt(nt){return new bt(nt)}function ii(nt,...Ct){if(nt.append(...Ct),Ct.length===1&&typeof Ct[0]!="string")return Ct[0]}function vi(nt,Ct){return nt.insertBefore(Ct,nt.firstChild),Ct}function Ze(nt,...Ct){nt.innerText="",ii(nt,...Ct)}const _t=/([\w\-]+)?(#([\w\-]+))?((\.([\w\-]+))*)/;var At;(function(nt){nt.HTML="http://www.w3.org/1999/xhtml",nt.SVG="http://www.w3.org/2000/svg"})(At||(At={}));function ei(nt,Ct,Qt,...Ot){const at=_t.exec(Ct);if(!at)throw new Error("Bad use of emmet");Qt=Object.assign({},Qt||{});const Yi=at[1]||"div";let bi;return nt!==At.HTML?bi=document.createElementNS(nt,Yi):bi=document.createElement(Yi),at[3]&&(bi.id=at[3]),at[4]&&(bi.className=at[4].replace(/\./g," ").trim()),Object.keys(Qt).forEach(St=>{const bn=Qt[St];typeof bn>"u"||(/^on\w+$/.test(St)?bi[St]=bn:St==="selected"?bn&&bi.setAttribute(St,"true"):bi.setAttribute(St,bn))}),bi.append(...Ot),bi}function oi(nt,Ct,...Qt){return ei(At.HTML,nt,Ct,...Qt)}oi.SVG=function(nt,Ct,...Qt){return ei(At.SVG,nt,Ct,...Qt)};function Li(...nt){for(const Ct of nt)Ct.style.display="",Ct.removeAttribute("aria-hidden")}function zi(...nt){for(const Ct of nt)Ct.style.display="none",Ct.setAttribute("aria-hidden","true")}function Di(nt){return Array.prototype.slice.call(document.getElementsByTagName(nt),0)}function Te(nt){const Ct=window.devicePixelRatio*nt;return Math.max(1,Math.floor(Ct))/window.devicePixelRatio}function ki(nt){window.open(nt,"_blank","noopener")}function ze(nt){const Ct=()=>{nt(),Qt=ce(Ct)};let Qt=ce(Ct);return(0,J.s)(()=>Qt.dispose())}z.Ez.setPreferredWebSchema(/^https:/.test(window.location.href)?"https":"http");function we(nt){return nt?`url('${z.zl.asBrowserUri(nt).toString(!0).replace(/'/g,"%27")}')`:"url('')"}function ct(nt){return`'${nt.replace(/'/g,"%27")}'`}function Oe(nt,Ct=!1){const Qt=document.createElement("a");return Q.$w("afterSanitizeAttributes",Ot=>{for(const at of["href","src"])if(Ot.hasAttribute(at)){const Yi=Ot.getAttribute(at);if(at==="href"&&Yi.startsWith("#"))continue;if(Qt.href=Yi,!nt.includes(Qt.protocol.replace(/:$/,""))){if(Ct&&at==="src"&&Qt.href.startsWith("data:"))continue;Ot.removeAttribute(at)}}}),(0,J.s)(()=>{Q.SV("afterSanitizeAttributes")})}class ut extends ie.vl{constructor(){super(),this._subscriptions=new J.Cm,this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1},this._subscriptions.add(d(window,"keydown",Ct=>{if(Ct.defaultPrevented)return;const Qt=new te.Z(Ct);if(!(Qt.keyCode===6&&Ct.repeat)){if(Ct.altKey&&!this._keyStatus.altKey)this._keyStatus.lastKeyPressed="alt";else if(Ct.ctrlKey&&!this._keyStatus.ctrlKey)this._keyStatus.lastKeyPressed="ctrl";else if(Ct.metaKey&&!this._keyStatus.metaKey)this._keyStatus.lastKeyPressed="meta";else if(Ct.shiftKey&&!this._keyStatus.shiftKey)this._keyStatus.lastKeyPressed="shift";else if(Qt.keyCode!==6)this._keyStatus.lastKeyPressed=void 0;else return;this._keyStatus.altKey=Ct.altKey,this._keyStatus.ctrlKey=Ct.ctrlKey,this._keyStatus.metaKey=Ct.metaKey,this._keyStatus.shiftKey=Ct.shiftKey,this._keyStatus.lastKeyPressed&&(this._keyStatus.event=Ct,this.fire(this._keyStatus))}},!0)),this._subscriptions.add(d(window,"keyup",Ct=>{Ct.defaultPrevented||(!Ct.altKey&&this._keyStatus.altKey?this._keyStatus.lastKeyReleased="alt":!Ct.ctrlKey&&this._keyStatus.ctrlKey?this._keyStatus.lastKeyReleased="ctrl":!Ct.metaKey&&this._keyStatus.metaKey?this._keyStatus.lastKeyReleased="meta":!Ct.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=Ct.altKey,this._keyStatus.ctrlKey=Ct.ctrlKey,this._keyStatus.metaKey=Ct.metaKey,this._keyStatus.shiftKey=Ct.shiftKey,this._keyStatus.lastKeyReleased&&(this._keyStatus.event=Ct,this.fire(this._keyStatus)))},!0)),this._subscriptions.add(d(document.body,"mousedown",()=>{this._keyStatus.lastKeyPressed=void 0},!0)),this._subscriptions.add(d(document.body,"mouseup",()=>{this._keyStatus.lastKeyPressed=void 0},!0)),this._subscriptions.add(d(document.body,"mousemove",Ct=>{Ct.buttons&&(this._keyStatus.lastKeyPressed=void 0)},!0)),this._subscriptions.add(d(window,"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 ut.instance||(ut.instance=new ut),ut.instance}dispose(){super.dispose(),this._subscriptions.dispose()}}class Zt extends J.jG{constructor(Ct,Qt){super(),this.element=Ct,this.callbacks=Qt,this.counter=0,this.dragStartTime=0,this.registerListeners()}registerListeners(){this._register(d(this.element,ft.DRAG_ENTER,Ct=>{this.counter++,this.dragStartTime=Ct.timeStamp,this.callbacks.onDragEnter(Ct)})),this._register(d(this.element,ft.DRAG_OVER,Ct=>{var Qt,Ot;Ct.preventDefault(),(Ot=(Qt=this.callbacks).onDragOver)===null||Ot===void 0||Ot.call(Qt,Ct,Ct.timeStamp-this.dragStartTime)})),this._register(d(this.element,ft.DRAG_LEAVE,Ct=>{this.counter--,this.counter===0&&(this.dragStartTime=0,this.callbacks.onDragLeave(Ct))})),this._register(d(this.element,ft.DRAG_END,Ct=>{this.counter=0,this.dragStartTime=0,this.callbacks.onDragEnd(Ct)})),this._register(d(this.element,ft.DROP,Ct=>{this.counter=0,this.dragStartTime=0,this.callbacks.onDrop(Ct)}))}}const Ci=/(?<tag>[\w\-]+)?(?:#(?<id>[\w\-]+))?(?<class>(?:\.(?:[\w\-]+))*)(?:@(?<name>(?:[\w\_])+))?/;function Ki(nt,...Ct){let Qt,Ot;Array.isArray(Ct[0])?(Qt={},Ot=Ct[0]):(Qt=Ct[0]||{},Ot=Ct[1]);const at=Ci.exec(nt);if(!at||!at.groups)throw new Error("Bad use of h");const Yi=at.groups.tag||"div",bi=document.createElement(Yi);at.groups.id&&(bi.id=at.groups.id),at.groups.class&&(bi.className=at.groups.class.replace(/\./g," ").trim());const St={};if(at.groups.name&&(St[at.groups.name]=bi),Ot)for(const bn of Ot)bn instanceof HTMLElement?bi.appendChild(bn):typeof bn=="string"?bi.append(bn):(Object.assign(St,bn),bi.appendChild(bn.root));for(const[bn,sn]of Object.entries(Qt))if(bn==="style")for(const[ni,xe]of Object.entries(sn))bi.style.setProperty(Ln(ni),typeof xe=="number"?xe+"px":""+xe);else bn==="tabIndex"?bi.tabIndex=sn:bi.setAttribute(Ln(bn),sn.toString());return St.root=bi,St}function Ln(nt){return nt.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}},92542:(Tt,Fe,f)=>{f.d(Fe,{$w:()=>bt,SV:()=>zt,aj:()=>ft});/*! @license DOMPurify 2.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.3.1/LICENSE */function I(Ze){if(Array.isArray(Ze)){for(var _t=0,At=Array(Ze.length);_t<Ze.length;_t++)At[_t]=Ze[_t];return At}else return Array.from(Ze)}var h=Object.hasOwnProperty,te=Object.setPrototypeOf,$=Object.isFrozen,x=Object.getPrototypeOf,ie=Object.getOwnPropertyDescriptor,Q=Object.freeze,J=Object.seal,z=Object.create,S=typeof Reflect<"u"&&Reflect,_=S.apply,y=S.construct;_||(_=function(_t,At,ei){return _t.apply(At,ei)}),Q||(Q=function(_t){return _t}),J||(J=function(_t){return _t}),y||(y=function(_t,At){return new(Function.prototype.bind.apply(_t,[null].concat(I(At))))});var C=H(Array.prototype.forEach),d=H(Array.prototype.pop),w=H(Array.prototype.push),D=H(String.prototype.toLowerCase),L=H(String.prototype.match),k=H(String.prototype.replace),j=H(String.prototype.indexOf),N=H(String.prototype.trim),B=H(RegExp.prototype.test),T=Y(TypeError);function H(Ze){return function(_t){for(var At=arguments.length,ei=Array(At>1?At-1:0),oi=1;oi<At;oi++)ei[oi-1]=arguments[oi];return _(Ze,_t,ei)}}function Y(Ze){return function(){for(var _t=arguments.length,At=Array(_t),ei=0;ei<_t;ei++)At[ei]=arguments[ei];return y(Ze,At)}}function ee(Ze,_t){te&&te(Ze,null);for(var At=_t.length;At--;){var ei=_t[At];if(typeof ei=="string"){var oi=D(ei);oi!==ei&&($(_t)||(_t[At]=oi),ei=oi)}Ze[ei]=!0}return Ze}function ce(Ze){var _t=z(null),At=void 0;for(At in Ze)_(h,Ze,[At])&&(_t[At]=Ze[At]);return _t}function pe(Ze,_t){for(;Ze!==null;){var At=ie(Ze,_t);if(At){if(At.get)return H(At.get);if(typeof At.value=="function")return H(At.value)}Ze=x(Ze)}function ei(oi){return console.warn("fallback value for",oi),null}return ei}var ge=Q(["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"]),fe=Q(["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"]),oe=Q(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Z=Q(["animate","color-profile","cursor","discard","fedropshadow","feimage","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"]),le=Q(["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"]),se=Q(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),X=Q(["#text"]),K=Q(["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","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"]),he=Q(["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","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"]),ve=Q(["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"]),Ee=Q(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),O=J(/\{\{[\s\S]*|[\s\S]*\}\}/gm),ot=J(/<%[\s\S]*|[\s\S]*%>/gm),lt=J(/^data-[\-\w.\u00B7-\uFFFF]/),We=J(/^aria-[\-\w]+$/),Ke=J(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),De=J(/^(?:\w+script|data):/i),Pe=J(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ue=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Ze){return typeof Ze}:function(Ze){return Ze&&typeof Symbol=="function"&&Ze.constructor===Symbol&&Ze!==Symbol.prototype?"symbol":typeof Ze};function Re(Ze){if(Array.isArray(Ze)){for(var _t=0,At=Array(Ze.length);_t<Ze.length;_t++)At[_t]=Ze[_t];return At}else return Array.from(Ze)}var et=function(){return typeof window>"u"?null:window},rt=function(_t,At){if((typeof _t>"u"?"undefined":Ue(_t))!=="object"||typeof _t.createPolicy!="function")return null;var ei=null,oi="data-tt-policy-suffix";At.currentScript&&At.currentScript.hasAttribute(oi)&&(ei=At.currentScript.getAttribute(oi));var Li="dompurify"+(ei?"#"+ei:"");try{return _t.createPolicy(Li,{createHTML:function(Di){return Di}})}catch{return console.warn("TrustedTypes policy "+Li+" could not be created."),null}};function Lt(){var Ze=arguments.length>0&&arguments[0]!==void 0?arguments[0]:et(),_t=function(Kt){return Lt(Kt)};if(_t.version="2.3.1",_t.removed=[],!Ze||!Ze.document||Ze.document.nodeType!==9)return _t.isSupported=!1,_t;var At=Ze.document,ei=Ze.document,oi=Ze.DocumentFragment,Li=Ze.HTMLTemplateElement,zi=Ze.Node,Di=Ze.Element,Te=Ze.NodeFilter,ki=Ze.NamedNodeMap,ze=ki===void 0?Ze.NamedNodeMap||Ze.MozNamedAttrMap:ki,we=Ze.Text,ct=Ze.Comment,Oe=Ze.DOMParser,ut=Ze.trustedTypes,Zt=Di.prototype,Ci=pe(Zt,"cloneNode"),Ki=pe(Zt,"nextSibling"),Ln=pe(Zt,"childNodes"),nt=pe(Zt,"parentNode");if(typeof Li=="function"){var Ct=ei.createElement("template");Ct.content&&Ct.content.ownerDocument&&(ei=Ct.content.ownerDocument)}var Qt=rt(ut,At),Ot=Qt&&jn?Qt.createHTML(""):"",at=ei,Yi=at.implementation,bi=at.createNodeIterator,St=at.createDocumentFragment,bn=at.getElementsByTagName,sn=At.importNode,ni={};try{ni=ce(ei).documentMode?ei.documentMode:{}}catch{}var xe={};_t.isSupported=typeof nt=="function"&&Yi&&typeof Yi.createHTMLDocument<"u"&&ni!==9;var Ce=O,Ye=ot,Rt=lt,Vt=We,Gt=De,ri=Pe,fi=Ke,di=null,Jt=ee({},[].concat(Re(ge),Re(fe),Re(oe),Re(le),Re(X))),ai=null,Ei=ee({},[].concat(Re(K),Re(he),Re(ve),Re(Ee))),wi=null,Ai=null,Ni=!0,qi=!0,Pi=!1,gn=!1,Gi=!1,Oi=!1,Fi=!1,Bi=!1,rn=!1,_i=!0,jn=!1,Wn=!0,xn=!0,Rn=!1,$i={},Nn=null,Jn=ee({},["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"]),Ti=null,es=ee({},["audio","video","img","source","image","track"]),xi=null,os=ee({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Zi="http://www.w3.org/1998/Math/MathML",cn="http://www.w3.org/2000/svg",Wi="http://www.w3.org/1999/xhtml",vn=Wi,Gn=!1,ws=null,fn=ei.createElement("form"),ks=function(Kt){ws&&ws===Kt||((!Kt||(typeof Kt>"u"?"undefined":Ue(Kt))!=="object")&&(Kt={}),Kt=ce(Kt),di="ALLOWED_TAGS"in Kt?ee({},Kt.ALLOWED_TAGS):Jt,ai="ALLOWED_ATTR"in Kt?ee({},Kt.ALLOWED_ATTR):Ei,xi="ADD_URI_SAFE_ATTR"in Kt?ee(ce(os),Kt.ADD_URI_SAFE_ATTR):os,Ti="ADD_DATA_URI_TAGS"in Kt?ee(ce(es),Kt.ADD_DATA_URI_TAGS):es,Nn="FORBID_CONTENTS"in Kt?ee({},Kt.FORBID_CONTENTS):Jn,wi="FORBID_TAGS"in Kt?ee({},Kt.FORBID_TAGS):{},Ai="FORBID_ATTR"in Kt?ee({},Kt.FORBID_ATTR):{},$i="USE_PROFILES"in Kt?Kt.USE_PROFILES:!1,Ni=Kt.ALLOW_ARIA_ATTR!==!1,qi=Kt.ALLOW_DATA_ATTR!==!1,Pi=Kt.ALLOW_UNKNOWN_PROTOCOLS||!1,gn=Kt.SAFE_FOR_TEMPLATES||!1,Gi=Kt.WHOLE_DOCUMENT||!1,Bi=Kt.RETURN_DOM||!1,rn=Kt.RETURN_DOM_FRAGMENT||!1,_i=Kt.RETURN_DOM_IMPORT!==!1,jn=Kt.RETURN_TRUSTED_TYPE||!1,Fi=Kt.FORCE_BODY||!1,Wn=Kt.SANITIZE_DOM!==!1,xn=Kt.KEEP_CONTENT!==!1,Rn=Kt.IN_PLACE||!1,fi=Kt.ALLOWED_URI_REGEXP||fi,vn=Kt.NAMESPACE||Wi,gn&&(qi=!1),rn&&(Bi=!0),$i&&(di=ee({},[].concat(Re(X))),ai=[],$i.html===!0&&(ee(di,ge),ee(ai,K)),$i.svg===!0&&(ee(di,fe),ee(ai,he),ee(ai,Ee)),$i.svgFilters===!0&&(ee(di,oe),ee(ai,he),ee(ai,Ee)),$i.mathMl===!0&&(ee(di,le),ee(ai,ve),ee(ai,Ee))),Kt.ADD_TAGS&&(di===Jt&&(di=ce(di)),ee(di,Kt.ADD_TAGS)),Kt.ADD_ATTR&&(ai===Ei&&(ai=ce(ai)),ee(ai,Kt.ADD_ATTR)),Kt.ADD_URI_SAFE_ATTR&&ee(xi,Kt.ADD_URI_SAFE_ATTR),Kt.FORBID_CONTENTS&&(Nn===Jn&&(Nn=ce(Nn)),ee(Nn,Kt.FORBID_CONTENTS)),xn&&(di["#text"]=!0),Gi&&ee(di,["html","head","body"]),di.table&&(ee(di,["tbody"]),delete wi.tbody),Q&&Q(Kt),ws=Kt)},wn=ee({},["mi","mo","mn","ms","mtext"]),yn=ee({},["foreignobject","desc","title","annotation-xml"]),uo=ee({},fe);ee(uo,oe),ee(uo,Z);var Ms=ee({},le);ee(Ms,se);var Ts=function(Kt){var Ri=nt(Kt);(!Ri||!Ri.tagName)&&(Ri={namespaceURI:Wi,tagName:"template"});var nn=D(Kt.tagName),Mn=D(Ri.tagName);if(Kt.namespaceURI===cn)return Ri.namespaceURI===Wi?nn==="svg":Ri.namespaceURI===Zi?nn==="svg"&&(Mn==="annotation-xml"||wn[Mn]):!!uo[nn];if(Kt.namespaceURI===Zi)return Ri.namespaceURI===Wi?nn==="math":Ri.namespaceURI===cn?nn==="math"&&yn[Mn]:!!Ms[nn];if(Kt.namespaceURI===Wi){if(Ri.namespaceURI===cn&&!yn[Mn]||Ri.namespaceURI===Zi&&!wn[Mn])return!1;var fs=ee({},["title","style","font","a","script"]);return!Ms[nn]&&(fs[nn]||!uo[nn])}return!1},Et=function(Kt){w(_t.removed,{element:Kt});try{Kt.parentNode.removeChild(Kt)}catch{try{Kt.outerHTML=Ot}catch{Kt.remove()}}},ls=function(Kt,Ri){try{w(_t.removed,{attribute:Ri.getAttributeNode(Kt),from:Ri})}catch{w(_t.removed,{attribute:null,from:Ri})}if(Ri.removeAttribute(Kt),Kt==="is"&&!ai[Kt])if(Bi||rn)try{Et(Ri)}catch{}else try{Ri.setAttribute(Kt,"")}catch{}},Ss=function(Kt){var Ri=void 0,nn=void 0;if(Fi)Kt="<remove></remove>"+Kt;else{var Mn=L(Kt,/^[\r\n\t ]+/);nn=Mn&&Mn[0]}var fs=Qt?Qt.createHTML(Kt):Kt;if(vn===Wi)try{Ri=new Oe().parseFromString(fs,"text/html")}catch{}if(!Ri||!Ri.documentElement){Ri=Yi.createDocument(vn,"template",null);try{Ri.documentElement.innerHTML=Gn?"":fs}catch{}}var is=Ri.body||Ri.documentElement;return Kt&&nn&&is.insertBefore(ei.createTextNode(nn),is.childNodes[0]||null),vn===Wi?bn.call(Ri,Gi?"html":"body")[0]:Gi?Ri.documentElement:is},ts=function(Kt){return bi.call(Kt.ownerDocument||Kt,Kt,Te.SHOW_ELEMENT|Te.SHOW_COMMENT|Te.SHOW_TEXT,null,!1)},zs=function(Kt){return Kt instanceof we||Kt instanceof ct?!1:typeof Kt.nodeName!="string"||typeof Kt.textContent!="string"||typeof Kt.removeChild!="function"||!(Kt.attributes instanceof ze)||typeof Kt.removeAttribute!="function"||typeof Kt.setAttribute!="function"||typeof Kt.namespaceURI!="string"||typeof Kt.insertBefore!="function"},vs=function(Kt){return(typeof zi>"u"?"undefined":Ue(zi))==="object"?Kt instanceof zi:Kt&&(typeof Kt>"u"?"undefined":Ue(Kt))==="object"&&typeof Kt.nodeType=="number"&&typeof Kt.nodeName=="string"},As=function(Kt,Ri,nn){xe[Kt]&&C(xe[Kt],function(Mn){Mn.call(_t,Ri,nn,ws)})},$s=function(Kt){var Ri=void 0;if(As("beforeSanitizeElements",Kt,null),zs(Kt)||L(Kt.nodeName,/[\u0080-\uFFFF]/))return Et(Kt),!0;var nn=D(Kt.nodeName);if(As("uponSanitizeElement",Kt,{tagName:nn,allowedTags:di}),!vs(Kt.firstElementChild)&&(!vs(Kt.content)||!vs(Kt.content.firstElementChild))&&B(/<[/\w]/g,Kt.innerHTML)&&B(/<[/\w]/g,Kt.textContent)||nn==="select"&&B(/<template/i,Kt.innerHTML))return Et(Kt),!0;if(!di[nn]||wi[nn]){if(xn&&!Nn[nn]){var Mn=nt(Kt)||Kt.parentNode,fs=Ln(Kt)||Kt.childNodes;if(fs&&Mn)for(var is=fs.length,qe=is-1;qe>=0;--qe)Mn.insertBefore(Ci(fs[qe],!0),Ki(Kt))}return Et(Kt),!0}return Kt instanceof Di&&!Ts(Kt)||(nn==="noscript"||nn==="noembed")&&B(/<\/no(script|embed)/i,Kt.innerHTML)?(Et(Kt),!0):(gn&&Kt.nodeType===3&&(Ri=Kt.textContent,Ri=k(Ri,Ce," "),Ri=k(Ri,Ye," "),Kt.textContent!==Ri&&(w(_t.removed,{element:Kt.cloneNode()}),Kt.textContent=Ri)),As("afterSanitizeElements",Kt,null),!1)},Gs=function(Kt,Ri,nn){if(Wn&&(Ri==="id"||Ri==="name")&&(nn in ei||nn in fn))return!1;if(!(qi&&!Ai[Ri]&&B(Rt,Ri))){if(!(Ni&&B(Vt,Ri))){if(!ai[Ri]||Ai[Ri])return!1;if(!xi[Ri]){if(!B(fi,k(nn,ri,""))){if(!((Ri==="src"||Ri==="xlink:href"||Ri==="href")&&Kt!=="script"&&j(nn,"data:")===0&&Ti[Kt])){if(!(Pi&&!B(Gt,k(nn,ri,"")))){if(nn)return!1}}}}}}return!0},rs=function(Kt){var Ri=void 0,nn=void 0,Mn=void 0,fs=void 0;As("beforeSanitizeAttributes",Kt,null);var is=Kt.attributes;if(is){var qe={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ai};for(fs=is.length;fs--;){Ri=is[fs];var b=Ri,P=b.name,M=b.namespaceURI;if(nn=N(Ri.value),Mn=D(P),qe.attrName=Mn,qe.attrValue=nn,qe.keepAttr=!0,qe.forceKeepAttr=void 0,As("uponSanitizeAttribute",Kt,qe),nn=qe.attrValue,!qe.forceKeepAttr&&(ls(P,Kt),!!qe.keepAttr)){if(B(/\/>/i,nn)){ls(P,Kt);continue}gn&&(nn=k(nn,Ce," "),nn=k(nn,Ye," "));var q=Kt.nodeName.toLowerCase();if(Gs(q,Mn,nn))try{M?Kt.setAttributeNS(M,P,nn):Kt.setAttribute(P,nn),d(_t.removed)}catch{}}}As("afterSanitizeAttributes",Kt,null)}},Bn=function mn(Kt){var Ri=void 0,nn=ts(Kt);for(As("beforeSanitizeShadowDOM",Kt,null);Ri=nn.nextNode();)As("uponSanitizeShadowNode",Ri,null),!$s(Ri)&&(Ri.content instanceof oi&&mn(Ri.content),rs(Ri));As("afterSanitizeShadowDOM",Kt,null)};return _t.sanitize=function(mn,Kt){var Ri=void 0,nn=void 0,Mn=void 0,fs=void 0,is=void 0;if(Gn=!mn,Gn&&(mn="<!-->"),typeof mn!="string"&&!vs(mn)){if(typeof mn.toString!="function")throw T("toString is not a function");if(mn=mn.toString(),typeof mn!="string")throw T("dirty is not a string, aborting")}if(!_t.isSupported){if(Ue(Ze.toStaticHTML)==="object"||typeof Ze.toStaticHTML=="function"){if(typeof mn=="string")return Ze.toStaticHTML(mn);if(vs(mn))return Ze.toStaticHTML(mn.outerHTML)}return mn}if(Oi||ks(Kt),_t.removed=[],typeof mn=="string"&&(Rn=!1),!Rn)if(mn instanceof zi)Ri=Ss("<!---->"),nn=Ri.ownerDocument.importNode(mn,!0),nn.nodeType===1&&nn.nodeName==="BODY"||nn.nodeName==="HTML"?Ri=nn:Ri.appendChild(nn);else{if(!Bi&&!gn&&!Gi&&mn.indexOf("<")===-1)return Qt&&jn?Qt.createHTML(mn):mn;if(Ri=Ss(mn),!Ri)return Bi?null:Ot}Ri&&Fi&&Et(Ri.firstChild);for(var qe=ts(Rn?mn:Ri);Mn=qe.nextNode();)Mn.nodeType===3&&Mn===fs||$s(Mn)||(Mn.content instanceof oi&&Bn(Mn.content),rs(Mn),fs=Mn);if(fs=null,Rn)return mn;if(Bi){if(rn)for(is=St.call(Ri.ownerDocument);Ri.firstChild;)is.appendChild(Ri.firstChild);else is=Ri;return _i&&(is=sn.call(At,is,!0)),is}var b=Gi?Ri.outerHTML:Ri.innerHTML;return gn&&(b=k(b,Ce," "),b=k(b,Ye," ")),Qt&&jn?Qt.createHTML(b):b},_t.setConfig=function(mn){ks(mn),Oi=!0},_t.clearConfig=function(){ws=null,Oi=!1},_t.isValidAttribute=function(mn,Kt,Ri){ws||ks({});var nn=D(mn),Mn=D(Kt);return Gs(nn,Mn,Ri)},_t.addHook=function(mn,Kt){typeof Kt=="function"&&(xe[mn]=xe[mn]||[],w(xe[mn],Kt))},_t.removeHook=function(mn){xe[mn]&&d(xe[mn])},_t.removeHooks=function(mn){xe[mn]&&(xe[mn]=[])},_t.removeAllHooks=function(){xe={}},_t}var Dt=Lt(),xt=null;const Ie=Dt.version,dt=Dt.isSupported,ft=Dt.sanitize,Bt=Dt.setConfig,jt=Dt.clearConfig,pt=Dt.isValidAttribute,bt=Dt.addHook,zt=Dt.removeHook,ii=Dt.removeHooks,vi=Dt.removeAllHooks},34061:(Tt,Fe,f)=>{f.d(Fe,{f:()=>h,j:()=>te});var I=f(2106);class h{constructor(x,ie,Q){const J=z=>this.emitter.fire(z);this.emitter=new I.vl({onFirstListenerAdd:()=>x.addEventListener(ie,J,Q),onLastListenerRemove:()=>x.removeEventListener(ie,J,Q)})}get event(){return this.emitter.event}dispose(){this.emitter.dispose()}}function te($){return $.preventDefault(),$.stopPropagation(),$}},5043:(Tt,Fe,f)=>{f.d(Fe,{D:()=>I,Z:()=>te});class I{constructor(x){this.domNode=x,this._maxWidth="",this._width="",this._height="",this._top="",this._left="",this._bottom="",this._right="",this._fontFamily="",this._fontWeight="",this._fontSize="",this._fontStyle="",this._fontFeatureSettings="",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(x){const ie=h(x);this._maxWidth!==ie&&(this._maxWidth=ie,this.domNode.style.maxWidth=this._maxWidth)}setWidth(x){const ie=h(x);this._width!==ie&&(this._width=ie,this.domNode.style.width=this._width)}setHeight(x){const ie=h(x);this._height!==ie&&(this._height=ie,this.domNode.style.height=this._height)}setTop(x){const ie=h(x);this._top!==ie&&(this._top=ie,this.domNode.style.top=this._top)}setLeft(x){const ie=h(x);this._left!==ie&&(this._left=ie,this.domNode.style.left=this._left)}setBottom(x){const ie=h(x);this._bottom!==ie&&(this._bottom=ie,this.domNode.style.bottom=this._bottom)}setRight(x){const ie=h(x);this._right!==ie&&(this._right=ie,this.domNode.style.right=this._right)}setFontFamily(x){this._fontFamily!==x&&(this._fontFamily=x,this.domNode.style.fontFamily=this._fontFamily)}setFontWeight(x){this._fontWeight!==x&&(this._fontWeight=x,this.domNode.style.fontWeight=this._fontWeight)}setFontSize(x){const ie=h(x);this._fontSize!==ie&&(this._fontSize=ie,this.domNode.style.fontSize=this._fontSize)}setFontStyle(x){this._fontStyle!==x&&(this._fontStyle=x,this.domNode.style.fontStyle=this._fontStyle)}setFontFeatureSettings(x){this._fontFeatureSettings!==x&&(this._fontFeatureSettings=x,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings)}setTextDecoration(x){this._textDecoration!==x&&(this._textDecoration=x,this.domNode.style.textDecoration=this._textDecoration)}setLineHeight(x){const ie=h(x);this._lineHeight!==ie&&(this._lineHeight=ie,this.domNode.style.lineHeight=this._lineHeight)}setLetterSpacing(x){const ie=h(x);this._letterSpacing!==ie&&(this._letterSpacing=ie,this.domNode.style.letterSpacing=this._letterSpacing)}setClassName(x){this._className!==x&&(this._className=x,this.domNode.className=this._className)}toggleClassName(x,ie){this.domNode.classList.toggle(x,ie),this._className=this.domNode.className}setDisplay(x){this._display!==x&&(this._display=x,this.domNode.style.display=this._display)}setPosition(x){this._position!==x&&(this._position=x,this.domNode.style.position=this._position)}setVisibility(x){this._visibility!==x&&(this._visibility=x,this.domNode.style.visibility=this._visibility)}setColor(x){this._color!==x&&(this._color=x,this.domNode.style.color=this._color)}setBackgroundColor(x){this._backgroundColor!==x&&(this._backgroundColor=x,this.domNode.style.backgroundColor=this._backgroundColor)}setLayerHinting(x){this._layerHint!==x&&(this._layerHint=x,this.domNode.style.transform=this._layerHint?"translate3d(0px, 0px, 0px)":"")}setBoxShadow(x){this._boxShadow!==x&&(this._boxShadow=x,this.domNode.style.boxShadow=x)}setContain(x){this._contain!==x&&(this._contain=x,this.domNode.style.contain=this._contain)}setAttribute(x,ie){this.domNode.setAttribute(x,ie)}removeAttribute(x){this.domNode.removeAttribute(x)}appendChild(x){this.domNode.appendChild(x.domNode)}removeChild(x){this.domNode.removeChild(x.domNode)}}function h($){return typeof $=="number"?`${$}px`:$}function te($){return new I($)}},88213:(Tt,Fe,f)=>{f.d(Fe,{S5:()=>h,n:()=>$,yk:()=>te});var I=f(59095);function h(S,_={}){const y=$(_);return y.textContent=S,y}function te(S,_={}){const y=$(_);return ie(y,Q(S,!!_.renderCodeSegments),_.actionHandler,_.renderCodeSegments),y}function $(S){const _=S.inline?"span":"div",y=document.createElement(_);return S.className&&(y.className=S.className),y}class x{constructor(_){this.source=_,this.index=0}eos(){return this.index>=this.source.length}next(){const _=this.peek();return this.advance(),_}peek(){return this.source[this.index]}advance(){this.index++}}function ie(S,_,y,C){let d;if(_.type===2)d=document.createTextNode(_.content||"");else if(_.type===3)d=document.createElement("b");else if(_.type===4)d=document.createElement("i");else if(_.type===7&&C)d=document.createElement("code");else if(_.type===5&&y){const w=document.createElement("a");y.disposables.add(I.b2(w,"click",D=>{y.callback(String(_.index),D)})),d=w}else _.type===8?d=document.createElement("br"):_.type===1&&(d=S);d&&S!==d&&S.appendChild(d),d&&Array.isArray(_.children)&&_.children.forEach(w=>{ie(d,w,y,C)})}function Q(S,_){const y={type:1,children:[]};let C=0,d=y;const w=[],D=new x(S);for(;!D.eos();){let L=D.next();const k=L==="\\"&&z(D.peek(),_)!==0;if(k&&(L=D.next()),!k&&J(L,_)&&L===D.peek()){D.advance(),d.type===2&&(d=w.pop());const j=z(L,_);if(d.type===j||d.type===5&&j===6)d=w.pop();else{const N={type:j,children:[]};j===5&&(N.index=C,C++),d.children.push(N),w.push(d),d=N}}else if(L===` `)d.type===2&&(d=w.pop()),d.children.push({type:8});else if(d.type!==2){const j={type:2,content:L};d.children.push(j),w.push(d),d=j}else d.content+=L}return d.type===2&&(d=w.pop()),w.length,y}function J(S,_){return z(S,_)!==0}function z(S,_){switch(S){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;case"`":return _?7:0;default:return 0}}},10176:(Tt,Fe,f)=>{f.d(Fe,{_:()=>te});var I=f(59095),h=f(10998);class te{constructor(){this._hooks=new h.Cm,this._pointerMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(x,ie){if(!this.isMonitoring())return;this._hooks.clear(),this._pointerMoveCallback=null;const Q=this._onStopCallback;this._onStopCallback=null,x&&Q&&Q(ie)}isMonitoring(){return!!this._pointerMoveCallback}startMonitoring(x,ie,Q,J,z){this.isMonitoring()&&this.stopMonitoring(!1),this._pointerMoveCallback=J,this._onStopCallback=z;let S=x;try{x.setPointerCapture(ie),this._hooks.add((0,h.s)(()=>{x.releasePointerCapture(ie)}))}catch{S=window}this._hooks.add(I.ko(S,I.Bx.POINTER_MOVE,_=>{if(_.buttons!==Q){this.stopMonitoring(!0);return}_.preventDefault(),this._pointerMoveCallback(_)})),this._hooks.add(I.ko(S,I.Bx.POINTER_UP,_=>this.stopMonitoring(!0)))}}},87594:(Tt,Fe,f)=>{f.d(Fe,{Z:()=>S});var I=f(55893),h=f(68387),te=f(39619),$=f(63339);function x(_){if(_.charCode){const C=String.fromCharCode(_.charCode).toUpperCase();return h.YM.fromString(C)}const y=_.keyCode;if(y===3)return 7;if(I.isFirefox){if(y===59)return 80;if(y===107)return 81;if(y===109)return 83;if($.zx&&y===224)return 57}else if(I.isWebKit){if(y===91)return 57;if($.zx&&y===93)return 57;if(!$.zx&&y===92)return 57}return h.uw[y]||0}const ie=$.zx?256:2048,Q=512,J=1024,z=$.zx?2048:256;class S{constructor(y){this._standardKeyboardEventBrand=!0;const C=y;this.browserEvent=C,this.target=C.target,this.ctrlKey=C.ctrlKey,this.shiftKey=C.shiftKey,this.altKey=C.altKey,this.metaKey=C.metaKey,this.keyCode=x(C),this.code=C.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._asRuntimeKeybinding=this._computeRuntimeKeybinding()}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()}toKeybinding(){return this._asRuntimeKeybinding}equals(y){return this._asKeybinding===y}_computeKeybinding(){let y=0;this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(y=this.keyCode);let C=0;return this.ctrlKey&&(C|=ie),this.altKey&&(C|=Q),this.shiftKey&&(C|=J),this.metaKey&&(C|=z),C|=y,C}_computeRuntimeKeybinding(){let y=0;return this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(y=this.keyCode),new te.h$(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,y)}}},9715:(Tt,Fe,f)=>{f.d(Fe,{P:()=>Q,$:()=>J});var I=f(55893);let h=!1,te=null;function $(z){if(!z.parent||z.parent===z)return null;try{const S=z.location,_=z.parent.location;if(S.origin!=="null"&&_.origin!=="null"&&S.origin!==_.origin)return h=!0,null}catch{return h=!0,null}return z.parent}class x{static getSameOriginWindowChain(){if(!te){te=[];let S=window,_;do _=$(S),_?te.push({window:S,iframeElement:S.frameElement||null}):te.push({window:S,iframeElement:null}),S=_;while(S)}return te.slice(0)}static getPositionOfChildWindowRelativeToAncestorWindow(S,_){if(!_||S===_)return{top:0,left:0};let y=0,C=0;const d=this.getSameOriginWindowChain();for(const w of d){if(y+=w.window.scrollY,C+=w.window.scrollX,w.window===_||!w.iframeElement)break;const D=w.iframeElement.getBoundingClientRect();y+=D.top,C+=D.left}return{top:y,left:C}}}var ie=f(63339);class Q{constructor(S){this.timestamp=Date.now(),this.browserEvent=S,this.leftButton=S.button===0,this.middleButton=S.button===1,this.rightButton=S.button===2,this.buttons=S.buttons,this.target=S.target,this.detail=S.detail||1,S.type==="dblclick"&&(this.detail=2),this.ctrlKey=S.ctrlKey,this.shiftKey=S.shiftKey,this.altKey=S.altKey,this.metaKey=S.metaKey,typeof S.pageX=="number"?(this.posx=S.pageX,this.posy=S.pageY):(this.posx=S.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,this.posy=S.clientY+document.body.scrollTop+document.documentElement.scrollTop);const _=x.getPositionOfChildWindowRelativeToAncestorWindow(self,S.view);this.posx-=_.left,this.posy-=_.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}}class J{constructor(S,_=0,y=0){if(this.browserEvent=S||null,this.target=S?S.target||S.targetNode||S.srcElement:null,this.deltaY=y,this.deltaX=_,S){const C=S,d=S;if(typeof C.wheelDeltaY<"u")this.deltaY=C.wheelDeltaY/120;else if(typeof d.VERTICAL_AXIS<"u"&&d.axis===d.VERTICAL_AXIS)this.deltaY=-d.detail/3;else if(S.type==="wheel"){const w=S;w.deltaMode===w.DOM_DELTA_LINE?I.isFirefox&&!ie.zx?this.deltaY=-S.deltaY/3:this.deltaY=-S.deltaY:this.deltaY=-S.deltaY/40}if(typeof C.wheelDeltaX<"u")I.isSafari&&ie.uF?this.deltaX=-(C.wheelDeltaX/120):this.deltaX=C.wheelDeltaX/120;else if(typeof d.HORIZONTAL_AXIS<"u"&&d.axis===d.HORIZONTAL_AXIS)this.deltaX=-S.detail/3;else if(S.type==="wheel"){const w=S;w.deltaMode===w.DOM_DELTA_LINE?I.isFirefox&&!ie.zx?this.deltaX=-S.deltaX/3:this.deltaX=-S.deltaX:this.deltaX=-S.deltaX/40}this.deltaY===0&&this.deltaX===0&&S.wheelDelta&&(this.deltaY=S.wheelDelta/120)}}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation()}}},30474:(Tt,Fe,f)=>{f.d(Fe,{B:()=>ie,q:()=>Q});var I=f(59095),h=f(13338),te=f(88846),$=f(10998),x=function(J,z,S,_){var y=arguments.length,C=y<3?z:_===null?_=Object.getOwnPropertyDescriptor(z,S):_,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(J,z,S,_);else for(var w=J.length-1;w>=0;w--)(d=J[w])&&(C=(y<3?d(C):y>3?d(z,S,C):d(z,S))||C);return y>3&&C&&Object.defineProperty(z,S,C),C},ie;(function(J){J.Tap="-monaco-gesturetap",J.Change="-monaco-gesturechange",J.Start="-monaco-gesturestart",J.End="-monaco-gesturesend",J.Contextmenu="-monaco-gesturecontextmenu"})(ie||(ie={}));class Q extends $.jG{constructor(){super(),this.dispatched=!1,this.activeTouches={},this.handle=null,this.targets=[],this.ignoreTargets=[],this._lastSetTapCountTime=0,this._register(I.ko(document,"touchstart",z=>this.onTouchStart(z),{passive:!1})),this._register(I.ko(document,"touchend",z=>this.onTouchEnd(z))),this._register(I.ko(document,"touchmove",z=>this.onTouchMove(z),{passive:!1}))}static addTarget(z){return Q.isTouchDevice()?(Q.INSTANCE||(Q.INSTANCE=new Q),Q.INSTANCE.targets.push(z),{dispose:()=>{Q.INSTANCE.targets=Q.INSTANCE.targets.filter(S=>S!==z)}}):$.jG.None}static ignoreTarget(z){return Q.isTouchDevice()?(Q.INSTANCE||(Q.INSTANCE=new Q),Q.INSTANCE.ignoreTargets.push(z),{dispose:()=>{Q.INSTANCE.ignoreTargets=Q.INSTANCE.ignoreTargets.filter(S=>S!==z)}}):$.jG.None}static isTouchDevice(){return"ontouchstart"in window||navigator.maxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(z){const S=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let _=0,y=z.targetTouches.length;_<y;_++){const C=z.targetTouches.item(_);this.activeTouches[C.identifier]={id:C.identifier,initialTarget:C.target,initialTimeStamp:S,initialPageX:C.pageX,initialPageY:C.pageY,rollingTimestamps:[S],rollingPageX:[C.pageX],rollingPageY:[C.pageY]};const d=this.newGestureEvent(ie.Start,C.target);d.pageX=C.pageX,d.pageY=C.pageY,this.dispatchEvent(d)}this.dispatched&&(z.preventDefault(),z.stopPropagation(),this.dispatched=!1)}onTouchEnd(z){const S=Date.now(),_=Object.keys(this.activeTouches).length;for(let y=0,C=z.changedTouches.length;y<C;y++){const d=z.changedTouches.item(y);if(!this.activeTouches.hasOwnProperty(String(d.identifier))){console.warn("move of an UNKNOWN touch",d);continue}const w=this.activeTouches[d.identifier],D=Date.now()-w.initialTimeStamp;if(D<Q.HOLD_DELAY&&Math.abs(w.initialPageX-h.RT(w.rollingPageX))<30&&Math.abs(w.initialPageY-h.RT(w.rollingPageY))<30){const L=this.newGestureEvent(ie.Tap,w.initialTarget);L.pageX=h.RT(w.rollingPageX),L.pageY=h.RT(w.rollingPageY),this.dispatchEvent(L)}else if(D>=Q.HOLD_DELAY&&Math.abs(w.initialPageX-h.RT(w.rollingPageX))<30&&Math.abs(w.initialPageY-h.RT(w.rollingPageY))<30){const L=this.newGestureEvent(ie.Contextmenu,w.initialTarget);L.pageX=h.RT(w.rollingPageX),L.pageY=h.RT(w.rollingPageY),this.dispatchEvent(L)}else if(_===1){const L=h.RT(w.rollingPageX),k=h.RT(w.rollingPageY),j=h.RT(w.rollingTimestamps)-w.rollingTimestamps[0],N=L-w.rollingPageX[0],B=k-w.rollingPageY[0],T=this.targets.filter(H=>w.initialTarget instanceof Node&&H.contains(w.initialTarget));this.inertia(T,S,Math.abs(N)/j,N>0?1:-1,L,Math.abs(B)/j,B>0?1:-1,k)}this.dispatchEvent(this.newGestureEvent(ie.End,w.initialTarget)),delete this.activeTouches[d.identifier]}this.dispatched&&(z.preventDefault(),z.stopPropagation(),this.dispatched=!1)}newGestureEvent(z,S){const _=document.createEvent("CustomEvent");return _.initEvent(z,!1,!0),_.initialTarget=S,_.tapCount=0,_}dispatchEvent(z){if(z.type===ie.Tap){const S=new Date().getTime();let _=0;S-this._lastSetTapCountTime>Q.CLEAR_TAP_COUNT_TIME?_=1:_=2,this._lastSetTapCountTime=S,z.tapCount=_}else(z.type===ie.Change||z.type===ie.Contextmenu)&&(this._lastSetTapCountTime=0);for(let S=0;S<this.ignoreTargets.length;S++)if(z.initialTarget instanceof Node&&this.ignoreTargets[S].contains(z.initialTarget))return;this.targets.forEach(S=>{z.initialTarget instanceof Node&&S.contains(z.initialTarget)&&(S.dispatchEvent(z),this.dispatched=!0)})}inertia(z,S,_,y,C,d,w,D){this.handle=I.PG(()=>{const L=Date.now(),k=L-S;let j=0,N=0,B=!0;_+=Q.SCROLL_FRICTION*k,d+=Q.SCROLL_FRICTION*k,_>0&&(B=!1,j=y*_*k),d>0&&(B=!1,N=w*d*k);const T=this.newGestureEvent(ie.Change);T.translationX=j,T.translationY=N,z.forEach(H=>H.dispatchEvent(T)),B||this.inertia(z,L,_,y,C+j,d,w,D+N)})}onTouchMove(z){const S=Date.now();for(let _=0,y=z.changedTouches.length;_<y;_++){const C=z.changedTouches.item(_);if(!this.activeTouches.hasOwnProperty(String(C.identifier))){console.warn("end of an UNKNOWN touch",C);continue}const d=this.activeTouches[C.identifier],w=this.newGestureEvent(ie.Change,d.initialTarget);w.translationX=C.pageX-h.RT(d.rollingPageX),w.translationY=C.pageY-h.RT(d.rollingPageY),w.pageX=C.pageX,w.pageY=C.pageY,this.dispatchEvent(w),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(S)}this.dispatched&&(z.preventDefault(),z.stopPropagation(),this.dispatched=!1)}}Q.SCROLL_FRICTION=-.005,Q.HOLD_DELAY=700,Q.CLEAR_TAP_COUNT_TIME=400,x([te.B],Q,"isTouchDevice",null)},45854:(Tt,Fe,f)=>{f.d(Fe,{E:()=>y,Z:()=>C});var I=f(55893),h=f(39587),te=f(59095),$=f(30474),x=f(17589),ie=f(27969),Q=f(10998),J=f(63339),z=f(79359),S=f(96861),_=f(3765);class y extends Q.jG{constructor(w,D,L={}){super(),this.options=L,this._context=w||this,this._action=D,D instanceof ie.rc&&this._register(D.onDidChange(k=>{this.element&&this.handleActionChangeEvent(k)}))}get action(){return this._action}handleActionChangeEvent(w){w.enabled!==void 0&&this.updateEnabled(),w.checked!==void 0&&this.updateChecked(),w.class!==void 0&&this.updateClass(),w.label!==void 0&&(this.updateLabel(),this.updateTooltip()),w.tooltip!==void 0&&this.updateTooltip()}get actionRunner(){return this._actionRunner||(this._actionRunner=this._register(new ie.LN)),this._actionRunner}set actionRunner(w){this._actionRunner=w}getAction(){return this._action}isEnabled(){return this._action.enabled}setActionContext(w){this._context=w}render(w){const D=this.element=w;this._register($.q.addTarget(w));const L=this.options&&this.options.draggable;L&&(w.draggable=!0,I.isFirefox&&this._register((0,te.ko)(w,te.Bx.DRAG_START,k=>{var j;return(j=k.dataTransfer)===null||j===void 0?void 0:j.setData(h.t.TEXT,this._action.label)}))),this._register((0,te.ko)(D,$.B.Tap,k=>this.onClick(k,!0))),this._register((0,te.ko)(D,te.Bx.MOUSE_DOWN,k=>{L||te.fs.stop(k,!0),this._action.enabled&&k.button===0&&D.classList.add("active")})),J.zx&&this._register((0,te.ko)(D,te.Bx.CONTEXT_MENU,k=>{k.button===0&&k.ctrlKey===!0&&this.onClick(k)})),this._register((0,te.ko)(D,te.Bx.CLICK,k=>{te.fs.stop(k,!0),this.options&&this.options.isMenu||this.onClick(k)})),this._register((0,te.ko)(D,te.Bx.DBLCLICK,k=>{te.fs.stop(k,!0)})),[te.Bx.MOUSE_UP,te.Bx.MOUSE_OUT].forEach(k=>{this._register((0,te.ko)(D,k,j=>{te.fs.stop(j),D.classList.remove("active")}))})}onClick(w,D=!1){var L;te.fs.stop(w,!0);const k=z.z(this._context)?!((L=this.options)===null||L===void 0)&&L.useEventAsContext?w:{preserveFocus:D}:this._context;this.actionRunner.run(this._action,k)}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(w){this.element&&(this.element.tabIndex=w?0:-1)}get trapsArrowNavigation(){return!1}updateEnabled(){}updateLabel(){}getTooltip(){return this.getAction().tooltip}updateTooltip(){var w;if(!this.element)return;const D=(w=this.getTooltip())!==null&&w!==void 0?w:"";this.element.setAttribute("aria-label",D),this.options.hoverDelegate?(this.element.title="",this.customHover?this.customHover.update(D):(this.customHover=(0,x.f)(this.options.hoverDelegate,this.element,D),this._store.add(this.customHover))):this.element.title=D}updateClass(){}updateChecked(){}dispose(){this.element&&(this.element.remove(),this.element=void 0),super.dispose()}}class C extends y{constructor(w,D,L={}){super(w,D,L),this.options=L,this.options.icon=L.icon!==void 0?L.icon:!1,this.options.label=L.label!==void 0?L.label:!0,this.cssClass=""}render(w){super.render(w),this.element&&(this.label=(0,te.BC)(this.element,(0,te.$)("a.action-label"))),this.label&&(this._action.id===ie.wv.ID?this.label.setAttribute("role","presentation"):this.options.isMenu?this.label.setAttribute("role","menuitem"):this.label.setAttribute("role","button")),this.options.label&&this.options.keybinding&&this.element&&((0,te.BC)(this.element,(0,te.$)("span.keybinding")).textContent=this.options.keybinding),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked()}focus(){this.label&&(this.label.tabIndex=0,this.label.focus())}blur(){this.label&&(this.label.tabIndex=-1)}setFocusable(w){this.label&&(this.label.tabIndex=w?0:-1)}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this.getAction().label)}getTooltip(){let w=null;return this.getAction().tooltip?w=this.getAction().tooltip:!this.options.label&&this.getAction().label&&this.options.icon&&(w=this.getAction().label,this.options.keybinding&&(w=_.kg({key:"titleLabel",comment:["action title","action keybinding"]},"{0} ({1})",w,this.options.keybinding))),w??void 0}updateClass(){var w;this.cssClass&&this.label&&this.label.classList.remove(...this.cssClass.split(" ")),this.options.icon?(this.cssClass=this.getAction().class,this.label&&(this.label.classList.add("codicon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" "))),this.updateEnabled()):(w=this.label)===null||w===void 0||w.classList.remove("codicon")}updateEnabled(){var w,D;this.getAction().enabled?(this.label&&(this.label.removeAttribute("aria-disabled"),this.label.classList.remove("disabled")),(w=this.element)===null||w===void 0||w.classList.remove("disabled")):(this.label&&(this.label.setAttribute("aria-disabled","true"),this.label.classList.add("disabled")),(D=this.element)===null||D===void 0||D.classList.add("disabled"))}updateChecked(){this.label&&(this.getAction().checked?this.label.classList.add("checked"):this.label.classList.remove("checked"))}}},77439:(Tt,Fe,f)=>{f.d(Fe,{E:()=>S});var I=f(59095),h=f(87594),te=f(45854),$=f(27969),x=f(2106),ie=f(10998),Q=f(79359),J=f(96861),z=function(_,y,C,d){function w(D){return D instanceof C?D:new C(function(L){L(D)})}return new(C||(C=Promise))(function(D,L){function k(B){try{N(d.next(B))}catch(T){L(T)}}function j(B){try{N(d.throw(B))}catch(T){L(T)}}function N(B){B.done?D(B.value):w(B.value).then(k,j)}N((d=d.apply(_,y||[])).next())})};class S extends ie.jG{constructor(y,C={}){var d,w,D,L,k,j;super(),this.triggerKeyDown=!1,this.focusable=!0,this._onDidBlur=this._register(new x.vl),this.onDidBlur=this._onDidBlur.event,this._onDidCancel=this._register(new x.vl({onFirstListenerAdd:()=>this.cancelHasListener=!0})),this.onDidCancel=this._onDidCancel.event,this.cancelHasListener=!1,this._onDidRun=this._register(new x.vl),this.onDidRun=this._onDidRun.event,this._onBeforeRun=this._register(new x.vl),this.onBeforeRun=this._onBeforeRun.event,this.options=C,this._context=(d=C.context)!==null&&d!==void 0?d:null,this._orientation=(w=this.options.orientation)!==null&&w!==void 0?w:0,this._triggerKeys={keyDown:(L=(D=this.options.triggerKeys)===null||D===void 0?void 0:D.keyDown)!==null&&L!==void 0?L:!1,keys:(j=(k=this.options.triggerKeys)===null||k===void 0?void 0:k.keys)!==null&&j!==void 0?j:[3,10]},this.options.actionRunner?this._actionRunner=this.options.actionRunner:(this._actionRunner=new $.LN,this._register(this._actionRunner)),this._register(this._actionRunner.onDidRun(T=>this._onDidRun.fire(T))),this._register(this._actionRunner.onBeforeRun(T=>this._onBeforeRun.fire(T))),this._actionIds=[],this.viewItems=[],this.viewItemDisposables=new Map,this.focusedItem=void 0,this.domNode=document.createElement("div"),this.domNode.className="monaco-action-bar",C.animated!==!1&&this.domNode.classList.add("animated");let N,B;switch(this._orientation){case 0:N=[15],B=[17];break;case 1:N=[16],B=[18],this.domNode.className+=" vertical";break}this._register(I.ko(this.domNode,I.Bx.KEY_DOWN,T=>{const H=new h.Z(T);let Y=!0;const ee=typeof this.focusedItem=="number"?this.viewItems[this.focusedItem]:void 0;N&&(H.equals(N[0])||H.equals(N[1]))?Y=this.focusPrevious():B&&(H.equals(B[0])||H.equals(B[1]))?Y=this.focusNext():H.equals(9)&&this.cancelHasListener?this._onDidCancel.fire():H.equals(14)?Y=this.focusFirst():H.equals(13)?Y=this.focusLast():H.equals(2)&&ee instanceof te.E&&ee.trapsArrowNavigation?Y=this.focusNext():this.isTriggerKeyEvent(H)?this._triggerKeys.keyDown?this.doTrigger(H):this.triggerKeyDown=!0:Y=!1,Y&&(H.preventDefault(),H.stopPropagation())})),this._register(I.ko(this.domNode,I.Bx.KEY_UP,T=>{const H=new h.Z(T);this.isTriggerKeyEvent(H)?(!this._triggerKeys.keyDown&&this.triggerKeyDown&&(this.triggerKeyDown=!1,this.doTrigger(H)),H.preventDefault(),H.stopPropagation()):(H.equals(2)||H.equals(1026))&&this.updateFocusedItem()})),this.focusTracker=this._register(I.w5(this.domNode)),this._register(this.focusTracker.onDidBlur(()=>{(I.bq()===this.domNode||!I.QX(I.bq(),this.domNode))&&(this._onDidBlur.fire(),this.focusedItem=void 0,this.previouslyFocusedItem=void 0,this.triggerKeyDown=!1)})),this._register(this.focusTracker.onDidFocus(()=>this.updateFocusedItem())),this.actionsList=document.createElement("ul"),this.actionsList.className="actions-container",this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar"),this.options.ariaLabel&&this.actionsList.setAttribute("aria-label",this.options.ariaLabel),this.domNode.appendChild(this.actionsList),y.appendChild(this.domNode)}refreshRole(){this.length()>=2?this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar"):this.actionsList.setAttribute("role","presentation")}setFocusable(y){if(this.focusable=y,this.focusable){const C=this.viewItems.find(d=>d instanceof te.E&&d.isEnabled());C instanceof te.E&&C.setFocusable(!0)}else this.viewItems.forEach(C=>{C instanceof te.E&&C.setFocusable(!1)})}isTriggerKeyEvent(y){let C=!1;return this._triggerKeys.keys.forEach(d=>{C=C||y.equals(d)}),C}updateFocusedItem(){for(let y=0;y<this.actionsList.children.length;y++){const C=this.actionsList.children[y];if(I.QX(I.bq(),C)){this.focusedItem=y;break}}}get context(){return this._context}set context(y){this._context=y,this.viewItems.forEach(C=>C.setActionContext(y))}get actionRunner(){return this._actionRunner}set actionRunner(y){y&&(this._actionRunner=y,this.viewItems.forEach(C=>C.actionRunner=y))}getContainer(){return this.domNode}push(y,C={}){const d=Array.isArray(y)?y:[y];let w=Q.Et(C.index)?C.index:null;d.forEach(D=>{const L=document.createElement("li");L.className="action-item",L.setAttribute("role","presentation");let k;this.options.actionViewItemProvider&&(k=this.options.actionViewItemProvider(D)),k||(k=new te.Z(this.context,D,Object.assign({hoverDelegate:this.options.hoverDelegate},C))),this.options.allowContextMenu||this.viewItemDisposables.set(k,I.ko(L,I.Bx.CONTEXT_MENU,j=>{I.fs.stop(j,!0)})),k.actionRunner=this._actionRunner,k.setActionContext(this.context),k.render(L),this.focusable&&k instanceof te.E&&this.viewItems.length===0&&k.setFocusable(!0),w===null||w<0||w>=this.actionsList.children.length?(this.actionsList.appendChild(L),this.viewItems.push(k),this._actionIds.push(D.id)):(this.actionsList.insertBefore(L,this.actionsList.children[w]),this.viewItems.splice(w,0,k),this._actionIds.splice(w,0,D.id),w++)}),typeof this.focusedItem=="number"&&this.focus(this.focusedItem),this.refreshRole()}clear(){(0,ie.AS)(this.viewItems),this.viewItemDisposables.forEach(y=>y.dispose()),this.viewItemDisposables.clear(),this.viewItems=[],this._actionIds=[],I.w_(this.actionsList),this.refreshRole()}length(){return this.viewItems.length}focus(y){let C=!1,d;if(y===void 0?C=!0:typeof y=="number"?d=y:typeof y=="boolean"&&(C=y),C&&typeof this.focusedItem>"u"){const w=this.viewItems.findIndex(D=>D.isEnabled());this.focusedItem=w===-1?void 0:w,this.updateFocus(void 0,void 0,!0)}else d!==void 0&&(this.focusedItem=d),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(y){if(typeof this.focusedItem>"u")this.focusedItem=this.viewItems.length-1;else if(this.viewItems.length<=1)return!1;const C=this.focusedItem;let d;do{if(!y&&this.options.preventLoopNavigation&&this.focusedItem+1>=this.viewItems.length)return this.focusedItem=C,!1;this.focusedItem=(this.focusedItem+1)%this.viewItems.length,d=this.viewItems[this.focusedItem]}while(this.focusedItem!==C&&(this.options.focusOnlyEnabledItems&&!d.isEnabled()||d.action.id===$.wv.ID));return this.updateFocus(),!0}focusPrevious(y){if(typeof this.focusedItem>"u")this.focusedItem=0;else if(this.viewItems.length<=1)return!1;const C=this.focusedItem;let d;do{if(this.focusedItem=this.focusedItem-1,this.focusedItem<0){if(!y&&this.options.preventLoopNavigation)return this.focusedItem=C,!1;this.focusedItem=this.viewItems.length-1}d=this.viewItems[this.focusedItem]}while(this.focusedItem!==C&&(this.options.focusOnlyEnabledItems&&!d.isEnabled()||d.action.id===$.wv.ID));return this.updateFocus(!0),!0}updateFocus(y,C,d=!1){var w;typeof this.focusedItem>"u"&&this.actionsList.focus({preventScroll:C}),this.previouslyFocusedItem!==void 0&&this.previouslyFocusedItem!==this.focusedItem&&((w=this.viewItems[this.previouslyFocusedItem])===null||w===void 0||w.blur());const D=this.focusedItem!==void 0&&this.viewItems[this.focusedItem];if(D){let L=!0;Q.Tn(D.focus)||(L=!1),this.options.focusOnlyEnabledItems&&Q.Tn(D.isEnabled)&&!D.isEnabled()&&(L=!1),D.action.id===$.wv.ID&&(L=!1),L?(d||this.previouslyFocusedItem!==this.focusedItem)&&(D.focus(y),this.previouslyFocusedItem=this.focusedItem):(this.actionsList.focus({preventScroll:C}),this.previouslyFocusedItem=void 0)}}doTrigger(y){if(typeof this.focusedItem>"u")return;const C=this.viewItems[this.focusedItem];if(C instanceof te.E){const d=C._context===null||C._context===void 0?y:C._context;this.run(C._action,d)}}run(y,C){return z(this,void 0,void 0,function*(){yield this._actionRunner.run(y,C)})}dispose(){(0,ie.AS)(this.viewItems),this.viewItems=[],this._actionIds=[],this.getContainer().remove(),super.dispose()}}},59407:(Tt,Fe,f)=>{f.d(Fe,{h5:()=>y,vr:()=>S,xE:()=>_});var I=f(59095),h=f(63339),te=f(75301);const $=2e4;let x,ie,Q,J,z;function S(d){x=document.createElement("div"),x.className="monaco-aria-container";const w=()=>{const L=document.createElement("div");return L.className="monaco-alert",L.setAttribute("role","alert"),L.setAttribute("aria-atomic","true"),x.appendChild(L),L};ie=w(),Q=w();const D=()=>{const L=document.createElement("div");return L.className="monaco-status",L.setAttribute("role","complementary"),L.setAttribute("aria-live","polite"),L.setAttribute("aria-atomic","true"),x.appendChild(L),L};J=D(),z=D(),d.appendChild(x)}function _(d){x&&(ie.textContent!==d?(I.w_(Q),C(ie,d)):(I.w_(ie),C(Q,d)))}function y(d){x&&(h.zx?_(d):J.textContent!==d?(I.w_(z),C(J,d)):(I.w_(J),C(z,d)))}function C(d,w){I.w_(d),w.length>$&&(w=w.substr(0,$)),d.textContent=w,d.style.visibility="hidden",d.style.visibility="visible"}},96852:(Tt,Fe,f)=>{f.d(Fe,{U:()=>$});var I=f(26048),h=f(63470),te=f(74639);function $(x){let ie=x.definition;for(;ie instanceof I.W6;)ie=ie.definition;return`.codicon-${x.id}:before { content: '${ie.fontCharacter}'; }`}},49233:(Tt,Fe,f)=>{f.d(Fe,{x:()=>Q});var I=f(59095),h=f(94901),te=f(71386),$=f(16844),x=f(90551);const ie={badgeBackground:h.Q1.fromHex("#4D4D4D"),badgeForeground:h.Q1.fromHex("#FFFFFF")};class Q{constructor(z,S){this.count=0,this.options=S||Object.create(null),(0,te.co)(this.options,ie,!1),this.badgeBackground=this.options.badgeBackground,this.badgeForeground=this.options.badgeForeground,this.badgeBorder=this.options.badgeBorder,this.element=(0,I.BC)(z,(0,I.$)(".monaco-count-badge")),this.countFormat=this.options.countFormat||"{0}",this.titleFormat=this.options.titleFormat||"",this.setCount(this.options.count||0)}setCount(z){this.count=z,this.render()}setTitleFormat(z){this.titleFormat=z,this.render()}render(){this.element.textContent=(0,$.GP)(this.countFormat,this.count),this.element.title=(0,$.GP)(this.titleFormat,this.count),this.applyStyles()}style(z){this.badgeBackground=z.badgeBackground,this.badgeForeground=z.badgeForeground,this.badgeBorder=z.badgeBorder,this.applyStyles()}applyStyles(){if(this.element){const z=this.badgeBackground?this.badgeBackground.toString():"",S=this.badgeForeground?this.badgeForeground.toString():"",_=this.badgeBorder?this.badgeBorder.toString():"";this.element.style.backgroundColor=z,this.element.style.color=S,this.element.style.borderWidth=_?"1px":"",this.element.style.borderStyle=_?"solid":"",this.element.style.borderColor=_}}}},6595:(Tt,Fe,f)=>{f.d(Fe,{c:()=>z});var I=f(59095),h=f(5906),te=f(29004),$=f(45222),x=f(2106),ie=f(37905),Q=f(3765);const J=Q.kg("defaultLabel","input");class z extends $.x{constructor(_,y,C,d){var w;super(),this._showOptionButtons=C,this.fixFocusOnOptionClickEnabled=!0,this.imeSessionInProgress=!1,this.additionalToggles=[],this._onDidOptionChange=this._register(new x.vl),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new x.vl),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new x.vl),this.onMouseDown=this._onMouseDown.event,this._onInput=this._register(new x.vl),this._onKeyUp=this._register(new x.vl),this._onCaseSensitiveKeyDown=this._register(new x.vl),this.onCaseSensitiveKeyDown=this._onCaseSensitiveKeyDown.event,this._onRegexKeyDown=this._register(new x.vl),this.onRegexKeyDown=this._onRegexKeyDown.event,this._lastHighlightFindOptions=0,this.contextViewProvider=y,this.placeholder=d.placeholder||"",this.validation=d.validation,this.label=d.label||J,this.inputActiveOptionBorder=d.inputActiveOptionBorder,this.inputActiveOptionForeground=d.inputActiveOptionForeground,this.inputActiveOptionBackground=d.inputActiveOptionBackground,this.inputBackground=d.inputBackground,this.inputForeground=d.inputForeground,this.inputBorder=d.inputBorder,this.inputValidationInfoBorder=d.inputValidationInfoBorder,this.inputValidationInfoBackground=d.inputValidationInfoBackground,this.inputValidationInfoForeground=d.inputValidationInfoForeground,this.inputValidationWarningBorder=d.inputValidationWarningBorder,this.inputValidationWarningBackground=d.inputValidationWarningBackground,this.inputValidationWarningForeground=d.inputValidationWarningForeground,this.inputValidationErrorBorder=d.inputValidationErrorBorder,this.inputValidationErrorBackground=d.inputValidationErrorBackground,this.inputValidationErrorForeground=d.inputValidationErrorForeground;const D=d.appendCaseSensitiveLabel||"",L=d.appendWholeWordsLabel||"",k=d.appendRegexLabel||"",j=d.history||[],N=!!d.flexibleHeight,B=!!d.flexibleWidth,T=d.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new te.m(this.domNode,this.contextViewProvider,{placeholder:this.placeholder||"",ariaLabel:this.label||"",validationOptions:{validation:this.validation},inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder,history:j,showHistoryHint:d.showHistoryHint,flexibleHeight:N,flexibleWidth:B,flexibleMaxHeight:T})),this.regex=this._register(new h.Ix({appendTitle:k,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.regex.onChange(Y=>{this._onDidOptionChange.fire(Y),!Y&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.regex.onKeyDown(Y=>{this._onRegexKeyDown.fire(Y)})),this.wholeWords=this._register(new h.nV({appendTitle:L,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.wholeWords.onChange(Y=>{this._onDidOptionChange.fire(Y),!Y&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this.caseSensitive=this._register(new h.bc({appendTitle:D,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.caseSensitive.onChange(Y=>{this._onDidOptionChange.fire(Y),!Y&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.caseSensitive.onKeyDown(Y=>{this._onCaseSensitiveKeyDown.fire(Y)}));const H=[this.caseSensitive.domNode,this.wholeWords.domNode,this.regex.domNode];this.onkeydown(this.domNode,Y=>{if(Y.equals(15)||Y.equals(17)||Y.equals(9)){const ee=H.indexOf(document.activeElement);if(ee>=0){let ce=-1;Y.equals(17)?ce=(ee+1)%H.length:Y.equals(15)&&(ee===0?ce=H.length-1:ce=ee-1),Y.equals(9)?(H[ee].blur(),this.inputBox.focus()):ce>=0&&H[ce].focus(),I.fs.stop(Y,!0)}}}),this.controls=document.createElement("div"),this.controls.className="controls",this.controls.style.display=this._showOptionButtons?"block":"none",this.controls.appendChild(this.caseSensitive.domNode),this.controls.appendChild(this.wholeWords.domNode),this.controls.appendChild(this.regex.domNode),this._showOptionButtons||(this.caseSensitive.domNode.style.display="none",this.wholeWords.domNode.style.display="none",this.regex.domNode.style.display="none");for(const Y of(w=d?.additionalToggles)!==null&&w!==void 0?w:[])this._register(Y),this.controls.appendChild(Y.domNode),this._register(Y.onChange(ee=>{this._onDidOptionChange.fire(ee),!ee&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus()})),this.additionalToggles.push(Y);this.additionalToggles.length>0&&(this.controls.style.display="block"),this.inputBox.paddingRight=(this._showOptionButtons?this.caseSensitive.width()+this.wholeWords.width()+this.regex.width():0)+this.additionalToggles.reduce((Y,ee)=>Y+ee.width(),0),this.domNode.appendChild(this.controls),_?.appendChild(this.domNode),this._register(I.ko(this.inputBox.inputElement,"compositionstart",Y=>{this.imeSessionInProgress=!0})),this._register(I.ko(this.inputBox.inputElement,"compositionend",Y=>{this.imeSessionInProgress=!1,this._onInput.fire()})),this.onkeydown(this.inputBox.inputElement,Y=>this._onKeyDown.fire(Y)),this.onkeyup(this.inputBox.inputElement,Y=>this._onKeyUp.fire(Y)),this.oninput(this.inputBox.inputElement,Y=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,Y=>this._onMouseDown.fire(Y))}get onDidChange(){return this.inputBox.onDidChange}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.regex.enable(),this.wholeWords.enable(),this.caseSensitive.enable();for(const _ of this.additionalToggles)_.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.regex.disable(),this.wholeWords.disable(),this.caseSensitive.disable();for(const _ of this.additionalToggles)_.disable()}setFocusInputOnOptionClick(_){this.fixFocusOnOptionClickEnabled=_}setEnabled(_){_?this.enable():this.disable()}getValue(){return this.inputBox.value}setValue(_){this.inputBox.value!==_&&(this.inputBox.value=_)}style(_){this.inputActiveOptionBorder=_.inputActiveOptionBorder,this.inputActiveOptionForeground=_.inputActiveOptionForeground,this.inputActiveOptionBackground=_.inputActiveOptionBackground,this.inputBackground=_.inputBackground,this.inputForeground=_.inputForeground,this.inputBorder=_.inputBorder,this.inputValidationInfoBackground=_.inputValidationInfoBackground,this.inputValidationInfoForeground=_.inputValidationInfoForeground,this.inputValidationInfoBorder=_.inputValidationInfoBorder,this.inputValidationWarningBackground=_.inputValidationWarningBackground,this.inputValidationWarningForeground=_.inputValidationWarningForeground,this.inputValidationWarningBorder=_.inputValidationWarningBorder,this.inputValidationErrorBackground=_.inputValidationErrorBackground,this.inputValidationErrorForeground=_.inputValidationErrorForeground,this.inputValidationErrorBorder=_.inputValidationErrorBorder,this.applyStyles()}applyStyles(){if(this.domNode){const _={inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground};this.regex.style(_),this.wholeWords.style(_),this.caseSensitive.style(_);for(const C of this.additionalToggles)C.style(_);const y={inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder};this.inputBox.style(y)}}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getCaseSensitive(){return this.caseSensitive.checked}setCaseSensitive(_){this.caseSensitive.checked=_}getWholeWords(){return this.wholeWords.checked}setWholeWords(_){this.wholeWords.checked=_}getRegex(){return this.regex.checked}setRegex(_){this.regex.checked=_,this.validate()}focusOnCaseSensitive(){this.caseSensitive.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(_){this.inputBox.showMessage(_)}clearMessage(){this.inputBox.hideMessage()}}},5906:(Tt,Fe,f)=>{f.d(Fe,{Ix:()=>z,bc:()=>Q,nV:()=>J});var I=f(50585),h=f(26048),te=f(3765);const $=te.kg("caseDescription","Match Case"),x=te.kg("wordsDescription","Match Whole Word"),ie=te.kg("regexDescription","Use Regular Expression");class Q extends I.l{constructor(_){super({icon:h.W6.caseSensitive,title:$+_.appendTitle,isChecked:_.isChecked,inputActiveOptionBorder:_.inputActiveOptionBorder,inputActiveOptionForeground:_.inputActiveOptionForeground,inputActiveOptionBackground:_.inputActiveOptionBackground})}}class J extends I.l{constructor(_){super({icon:h.W6.wholeWord,title:x+_.appendTitle,isChecked:_.isChecked,inputActiveOptionBorder:_.inputActiveOptionBorder,inputActiveOptionForeground:_.inputActiveOptionForeground,inputActiveOptionBackground:_.inputActiveOptionBackground})}}class z extends I.l{constructor(_){super({icon:h.W6.regex,title:ie+_.appendTitle,isChecked:_.isChecked,inputActiveOptionBorder:_.inputActiveOptionBorder,inputActiveOptionForeground:_.inputActiveOptionForeground,inputActiveOptionBackground:_.inputActiveOptionBackground})}}},8431:(Tt,Fe,f)=>{f.d(Fe,{_:()=>$});var I=f(59095),h=f(91818),te=f(71386);class ${constructor(ie,Q){var J;this.text="",this.title="",this.highlights=[],this.didEverRender=!1,this.supportIcons=(J=Q?.supportIcons)!==null&&J!==void 0?J:!1,this.domNode=I.BC(ie,I.$("span.monaco-highlighted-label"))}get element(){return this.domNode}set(ie,Q=[],J="",z){ie||(ie=""),z&&(ie=$.escapeNewLines(ie,Q)),!(this.didEverRender&&this.text===ie&&this.title===J&&te.aI(this.highlights,Q))&&(this.text=ie,this.title=J,this.highlights=Q,this.render())}render(){const ie=[];let Q=0;for(const J of this.highlights){if(J.end===J.start)continue;if(Q<J.start){const _=this.text.substring(Q,J.start);ie.push(I.$("span",void 0,...this.supportIcons?(0,h.n)(_):[_])),Q=J.end}const z=this.text.substring(J.start,J.end),S=I.$("span.highlight",void 0,...this.supportIcons?(0,h.n)(z):[z]);J.extraClasses&&S.classList.add(...J.extraClasses),ie.push(S),Q=J.end}if(Q<this.text.length){const J=this.text.substring(Q);ie.push(I.$("span",void 0,...this.supportIcons?(0,h.n)(J):[J]))}I.Ln(this.domNode,...ie),this.title?this.domNode.title=this.title:this.domNode.removeAttribute("title"),this.didEverRender=!0}static escapeNewLines(ie,Q){let J=0,z=0;return ie.replace(/\r\n|\r|\n/g,(S,_)=>{z=S===`\r `?-1:0,_+=J;for(const y of Q)y.end<=_||(y.start>=_&&(y.start+=z),y.end>=_&&(y.end+=z));return J+=z,"\u23CE"})}}},84431:(Tt,Fe,f)=>{f.d(Fe,{s:()=>z});var I=f(48285),h=f(59095),te=f(8431),$=f(17589),x=f(10998),ie=f(71386),Q=f(4580);class J{constructor(d){this._element=d}get element(){return this._element}set textContent(d){this.disposed||d===this._textContent||(this._textContent=d,this._element.textContent=d)}set className(d){this.disposed||d===this._className||(this._className=d,this._element.className=d)}set empty(d){this.disposed||d===this._empty||(this._empty=d,this._element.style.marginLeft=d?"0":"")}dispose(){this.disposed=!0}}class z extends x.jG{constructor(d,w){super(),this.customHovers=new Map,this.domNode=this._register(new J(h.BC(d,h.$(".monaco-icon-label")))),this.labelContainer=h.BC(this.domNode.element,h.$(".monaco-icon-label-container"));const D=h.BC(this.labelContainer,h.$("span.monaco-icon-name-container"));this.descriptionContainer=this._register(new J(h.BC(this.labelContainer,h.$("span.monaco-icon-description-container")))),w?.supportHighlights||w?.supportIcons?this.nameNode=new y(D,!!w.supportIcons):this.nameNode=new S(D),w?.supportDescriptionHighlights?this.descriptionNodeFactory=()=>new te._(h.BC(this.descriptionContainer.element,h.$("span.label-description")),{supportIcons:!!w.supportIcons}):this.descriptionNodeFactory=()=>this._register(new J(h.BC(this.descriptionContainer.element,h.$("span.label-description")))),this.hoverDelegate=w?.hoverDelegate}get element(){return this.domNode.element}setLabel(d,w,D){const L=["monaco-icon-label"];D&&(D.extraClasses&&L.push(...D.extraClasses),D.italic&&L.push("italic"),D.strikethrough&&L.push("strikethrough")),this.domNode.className=L.join(" "),this.setupHover(D?.descriptionTitle?this.labelContainer:this.element,D?.title),this.nameNode.setLabel(d,D),(w||this.descriptionNode)&&(this.descriptionNode||(this.descriptionNode=this.descriptionNodeFactory()),this.descriptionNode instanceof te._?(this.descriptionNode.set(w||"",D?D.descriptionMatches:void 0),this.setupHover(this.descriptionNode.element,D?.descriptionTitle)):(this.descriptionNode.textContent=w||"",this.setupHover(this.descriptionNode.element,D?.descriptionTitle||""),this.descriptionNode.empty=!w))}setupHover(d,w){const D=this.customHovers.get(d);if(D&&(D.dispose(),this.customHovers.delete(d)),!w){d.removeAttribute("title");return}if(!this.hoverDelegate)(0,$.$)(d,w);else{const L=(0,$.f)(this.hoverDelegate,d,w);L&&this.customHovers.set(d,L)}}dispose(){super.dispose();for(const d of this.customHovers.values())d.dispose();this.customHovers.clear()}}class S{constructor(d){this.container=d,this.label=void 0,this.singleLabel=void 0}setLabel(d,w){if(!(this.label===d&&(0,ie.aI)(this.options,w)))if(this.label=d,this.options=w,typeof d=="string")this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=h.BC(this.container,h.$("a.label-name",{id:w?.domId}))),this.singleLabel.textContent=d;else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;for(let D=0;D<d.length;D++){const L=d[D],k=w?.domId&&`${w?.domId}_${D}`;h.BC(this.container,h.$("a.label-name",{id:k,"data-icon-label-count":d.length,"data-icon-label-index":D,role:"treeitem"},L)),D<d.length-1&&h.BC(this.container,h.$("span.label-separator",void 0,w?.separator||"/"))}}}}function _(C,d,w){if(!w)return;let D=0;return C.map(L=>{const k={start:D,end:D+L.length},j=w.map(N=>Q.Q.intersect(k,N)).filter(N=>!Q.Q.isEmpty(N)).map(({start:N,end:B})=>({start:N-D,end:B-D}));return D=k.end+d.length,j})}class y{constructor(d,w){this.container=d,this.supportIcons=w,this.label=void 0,this.singleLabel=void 0}setLabel(d,w){if(!(this.label===d&&(0,ie.aI)(this.options,w)))if(this.label=d,this.options=w,typeof d=="string")this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=new te._(h.BC(this.container,h.$("a.label-name",{id:w?.domId})),{supportIcons:this.supportIcons})),this.singleLabel.set(d,w?.matches,void 0,w?.labelEscapeNewLines);else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;const D=w?.separator||"/",L=_(d,D,w?.matches);for(let k=0;k<d.length;k++){const j=d[k],N=L?L[k]:void 0,B=w?.domId&&`${w?.domId}_${k}`,T=h.$("a.label-name",{id:B,"data-icon-label-count":d.length,"data-icon-label-index":k,role:"treeitem"});new te._(h.BC(this.container,T),{supportIcons:this.supportIcons}).set(j,N,void 0,w?.labelEscapeNewLines),k<d.length-1&&h.BC(T,h.$("span.label-separator",void 0,D))}}}}},17589:(Tt,Fe,f)=>{f.d(Fe,{$:()=>S,f:()=>y});var I=f(59095),h=f(65958),te=f(78903),$=f(90028),x=f(24594),ie=f(10998),Q=f(79359),J=f(3765),z=function(C,d,w,D){function L(k){return k instanceof w?k:new w(function(j){j(k)})}return new(w||(w=Promise))(function(k,j){function N(H){try{T(D.next(H))}catch(Y){j(Y)}}function B(H){try{T(D.throw(H))}catch(Y){j(Y)}}function T(H){H.done?k(H.value):L(H.value).then(N,B)}T((D=D.apply(C,d||[])).next())})};function S(C,d){(0,Q.Kg)(d)?C.title=(0,x.pS)(d):d?.markdownNotSupportedFallback?C.title=d.markdownNotSupportedFallback:C.removeAttribute("title")}class _{constructor(d,w,D){this.hoverDelegate=d,this.target=w,this.fadeInAnimation=D}update(d,w,D){var L;return z(this,void 0,void 0,function*(){if(this._cancellationTokenSource&&(this._cancellationTokenSource.dispose(!0),this._cancellationTokenSource=void 0),this.isDisposed)return;let k;if(d===void 0||(0,Q.Kg)(d)||d instanceof HTMLElement)k=d;else if(!(0,Q.Tn)(d.markdown))k=(L=d.markdown)!==null&&L!==void 0?L:d.markdownNotSupportedFallback;else{this._hoverWidget||this.show((0,J.kg)("iconLabel.loading","Loading..."),w),this._cancellationTokenSource=new te.Q;const j=this._cancellationTokenSource.token;if(k=yield d.markdown(j),k===void 0&&(k=d.markdownNotSupportedFallback),this.isDisposed||j.isCancellationRequested)return}this.show(k,w,D)})}show(d,w,D){const L=this._hoverWidget;if(this.hasContent(d)){const k=Object.assign({content:d,target:this.target,showPointer:this.hoverDelegate.placement==="element",hoverPosition:2,skipFadeInAnimation:!this.fadeInAnimation||!!L},D);this._hoverWidget=this.hoverDelegate.showHover(k,w)}L?.dispose()}hasContent(d){return d?(0,$.VS)(d)?!!d.value:!0:!1}get isDisposed(){var d;return(d=this._hoverWidget)===null||d===void 0?void 0:d.isDisposed}dispose(){var d,w;(d=this._hoverWidget)===null||d===void 0||d.dispose(),(w=this._cancellationTokenSource)===null||w===void 0||w.dispose(!0),this._cancellationTokenSource=void 0}}function y(C,d,w,D){let L,k;const j=(Y,ee)=>{var ce;Y&&(k?.dispose(),k=void 0),ee&&(L?.dispose(),L=void 0),(ce=C.onDidHideHover)===null||ce===void 0||ce.call(C)},N=(Y,ee,ce)=>new h.pc(()=>z(this,void 0,void 0,function*(){(!k||k.isDisposed)&&(k=new _(C,ce||d,Y>0),yield k.update(w,ee,D))}),Y),B=()=>{if(L)return;const Y=new ie.Cm,ee=ge=>j(!1,ge.fromElement===d);Y.add(I.ko(d,I.Bx.MOUSE_LEAVE,ee,!0));const ce=()=>j(!0,!0);Y.add(I.ko(d,I.Bx.MOUSE_DOWN,ce,!0));const pe={targetElements:[d],dispose:()=>{}};if(C.placement===void 0||C.placement==="mouse"){const ge=fe=>{pe.x=fe.x+10,fe.target instanceof HTMLElement&&fe.target.classList.contains("action-label")&&j(!0,!0)};Y.add(I.ko(d,I.Bx.MOUSE_MOVE,ge,!0))}Y.add(N(C.delay,!1,pe)),L=Y},T=I.ko(d,I.Bx.MOUSE_OVER,B,!0);return{show:Y=>{j(!1,!0),N(0,Y)},hide:()=>{j(!0,!0)},update:(Y,ee)=>z(this,void 0,void 0,function*(){w=Y,yield k?.update(w,void 0,ee)}),dispose:()=>{T.dispose(),j(!0,!0)}}}},91818:(Tt,Fe,f)=>{f.d(Fe,{n:()=>$});var I=f(59095),h=f(26048);const te=new RegExp(`(\\\\)?\\$\\((${h.j3.iconNameExpression}(?:${h.j3.iconModifierExpression})?)\\)`,"g");function $(ie){const Q=new Array;let J,z=0,S=0;for(;(J=te.exec(ie))!==null;){S=J.index||0,Q.push(ie.substring(z,S)),z=(J.index||0)+J[0].length;const[,_,y]=J;Q.push(_?`$(${y})`:x({id:y}))}return z<ie.length&&Q.push(ie.substring(z)),Q}function x(ie){const Q=I.$("span");return Q.classList.add(...h.j3.asClassNameArray(ie)),Q}},29004:(Tt,Fe,f)=>{f.d(Fe,{m:()=>k,c:()=>L});var I=f(59095),h=f(34061),te=f(88213),$=f(77439),x=f(59407),ie=f(63781),Q=f(45222),J=f(94901),z=f(2106);class S{constructor(N,B=0,T=N.length,H=B-1){this.items=N,this.start=B,this.end=T,this.index=H}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 _{constructor(N=[],B=10){this._initialize(N),this._limit=B,this._onChange()}getHistory(){return this._elements}add(N){this._history.delete(N),this._history.add(N),this._onChange()}next(){return this._currentPosition()!==this._elements.length-1?this._navigator.next():null}previous(){return this._currentPosition()!==0?this._navigator.previous():null}current(){return this._navigator.current()}first(){return this._navigator.first()}last(){return this._navigator.last()}has(N){return this._history.has(N)}_onChange(){this._reduceToLimit();const N=this._elements;this._navigator=new S(N,0,N.length,N.length)}_reduceToLimit(){const N=this._elements;N.length>this._limit&&this._initialize(N.slice(N.length-this._limit))}_currentPosition(){const N=this._navigator.current();return N?this._elements.indexOf(N):-1}_initialize(N){this._history=new Set;for(const B of N)this._history.add(B)}get _elements(){const N=[];return this._history.forEach(B=>N.push(B)),N}}var y=f(71386),C=f(16285),d=f(3765);const w=I.$,D={inputBackground:J.Q1.fromHex("#3C3C3C"),inputForeground:J.Q1.fromHex("#CCCCCC"),inputValidationInfoBorder:J.Q1.fromHex("#55AAFF"),inputValidationInfoBackground:J.Q1.fromHex("#063B49"),inputValidationWarningBorder:J.Q1.fromHex("#B89500"),inputValidationWarningBackground:J.Q1.fromHex("#352A05"),inputValidationErrorBorder:J.Q1.fromHex("#BE1100"),inputValidationErrorBackground:J.Q1.fromHex("#5A1D1D")};class L extends Q.x{constructor(N,B,T){var H;super(),this.state="idle",this.maxHeight=Number.POSITIVE_INFINITY,this._onDidChange=this._register(new z.vl),this.onDidChange=this._onDidChange.event,this._onDidHeightChange=this._register(new z.vl),this.onDidHeightChange=this._onDidHeightChange.event,this.contextViewProvider=B,this.options=T||Object.create(null),(0,y.co)(this.options,D,!1),this.message=null,this.placeholder=this.options.placeholder||"",this.tooltip=(H=this.options.tooltip)!==null&&H!==void 0?H:this.placeholder||"",this.ariaLabel=this.options.ariaLabel||"",this.inputBackground=this.options.inputBackground,this.inputForeground=this.options.inputForeground,this.inputBorder=this.options.inputBorder,this.inputValidationInfoBorder=this.options.inputValidationInfoBorder,this.inputValidationInfoBackground=this.options.inputValidationInfoBackground,this.inputValidationInfoForeground=this.options.inputValidationInfoForeground,this.inputValidationWarningBorder=this.options.inputValidationWarningBorder,this.inputValidationWarningBackground=this.options.inputValidationWarningBackground,this.inputValidationWarningForeground=this.options.inputValidationWarningForeground,this.inputValidationErrorBorder=this.options.inputValidationErrorBorder,this.inputValidationErrorBackground=this.options.inputValidationErrorBackground,this.inputValidationErrorForeground=this.options.inputValidationErrorForeground,this.options.validationOptions&&(this.validation=this.options.validationOptions.validation),this.element=I.BC(N,w(".monaco-inputbox.idle"));const Y=this.options.flexibleHeight?"textarea":"input",ee=I.BC(this.element,w(".ibwrapper"));if(this.input=I.BC(ee,w(Y+".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=I.BC(ee,w("div.mirror")),this.mirror.innerText="\xA0",this.scrollableElement=new ie.Se(this.element,{vertical:1}),this.options.flexibleWidth&&(this.input.setAttribute("wrap","off"),this.mirror.style.whiteSpace="pre",this.mirror.style.wordWrap="initial"),I.BC(N,this.scrollableElement.getDomNode()),this._register(this.scrollableElement),this._register(this.scrollableElement.onScroll(ge=>this.input.scrollTop=ge.scrollTop));const ce=this._register(new h.f(document,"selectionchange")),pe=z.Jh.filter(ce.event,()=>{const ge=document.getSelection();return ge?.anchorNode===ee});this._register(pe(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.ignoreGesture(this.input),setTimeout(()=>this.updateMirror(),0),this.options.actions&&(this.actionbar=this._register(new $.E(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(N){this.placeholder=N,this.input.setAttribute("placeholder",N)}setTooltip(N){this.tooltip=N,this.input.title=N}setAriaLabel(N){this.ariaLabel=N,N?this.input.setAttribute("aria-label",this.ariaLabel):this.input.removeAttribute("aria-label")}getAriaLabel(){return this.ariaLabel}get inputElement(){return this.input}get value(){return this.input.value}set value(N){this.input.value!==N&&(this.input.value=N,this.onValueChange())}get height(){return typeof this.cachedHeight=="number"?this.cachedHeight:I.OK(this.element)}focus(){this.input.focus()}blur(){this.input.blur()}hasFocus(){return document.activeElement===this.input}select(N=null){this.input.select(),N&&(this.input.setSelectionRange(N.start,N.end),N.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}enable(){this.input.removeAttribute("disabled")}disable(){this.blur(),this.input.disabled=!0,this._hideMessage()}get width(){return I.Tr(this.input)}set width(N){if(this.options.flexibleHeight&&this.options.flexibleWidth){let B=0;if(this.mirror){const T=parseFloat(this.mirror.style.paddingLeft||"")||0,H=parseFloat(this.mirror.style.paddingRight||"")||0;B=T+H}this.input.style.width=N-B+"px"}else this.input.style.width=N+"px";this.mirror&&(this.mirror.style.width=N+"px")}set paddingRight(N){this.input.style.width=`calc(100% - ${N}px)`,this.mirror&&(this.mirror.style.paddingRight=N+"px")}updateScrollDimensions(){if(typeof this.cachedContentHeight!="number"||typeof this.cachedHeight!="number"||!this.scrollableElement)return;const N=this.cachedContentHeight,B=this.cachedHeight,T=this.input.scrollTop;this.scrollableElement.setScrollDimensions({scrollHeight:N,height:B}),this.scrollableElement.setScrollPosition({scrollTop:T})}showMessage(N,B){this.message=N,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(N.type));const T=this.stylesForType(this.message.type);this.element.style.border=T.border?`1px solid ${T.border}`:"",(this.hasFocus()||B)&&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 N=null;return this.validation&&(N=this.validation(this.value),N?(this.inputElement.setAttribute("aria-invalid","true"),this.showMessage(N)):this.inputElement.hasAttribute("aria-invalid")&&(this.inputElement.removeAttribute("aria-invalid"),this.hideMessage())),N?.type}stylesForType(N){switch(N){case 1:return{border:this.inputValidationInfoBorder,background:this.inputValidationInfoBackground,foreground:this.inputValidationInfoForeground};case 2:return{border:this.inputValidationWarningBorder,background:this.inputValidationWarningBackground,foreground:this.inputValidationWarningForeground};default:return{border:this.inputValidationErrorBorder,background:this.inputValidationErrorBackground,foreground:this.inputValidationErrorForeground}}}classForType(N){switch(N){case 1:return"info";case 2:return"warning";default:return"error"}}_showMessage(){if(!this.contextViewProvider||!this.message)return;let N;const B=()=>N.style.width=I.Tr(this.element)+"px";this.contextViewProvider.showContextView({getAnchor:()=>this.element,anchorAlignment:1,render:H=>{if(!this.message)return null;N=I.BC(H,w(".monaco-inputbox-container")),B();const Y={inline:!0,className:"monaco-inputbox-message"},ee=this.message.formatContent?(0,te.yk)(this.message.content,Y):(0,te.S5)(this.message.content,Y);ee.classList.add(this.classForType(this.message.type));const ce=this.stylesForType(this.message.type);return ee.style.backgroundColor=ce.background?ce.background.toString():"",ee.style.color=ce.foreground?ce.foreground.toString():"",ee.style.border=ce.border?`1px solid ${ce.border}`:"",I.BC(N,ee),null},onHide:()=>{this.state="closed"},layout:B});let T;this.message.type===3?T=d.kg("alertErrorMessage","Error: {0}",this.message.content):this.message.type===2?T=d.kg("alertWarningMessage","Warning: {0}",this.message.content):T=d.kg("alertInfoMessage","Info: {0}",this.message.content),x.xE(T),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 N=this.value,T=N.charCodeAt(N.length-1)===10?" ":"";(N+T).replace(/\u000c/g,"")?this.mirror.textContent=N+T:this.mirror.innerText="\xA0",this.layout()}style(N){this.inputBackground=N.inputBackground,this.inputForeground=N.inputForeground,this.inputBorder=N.inputBorder,this.inputValidationInfoBackground=N.inputValidationInfoBackground,this.inputValidationInfoForeground=N.inputValidationInfoForeground,this.inputValidationInfoBorder=N.inputValidationInfoBorder,this.inputValidationWarningBackground=N.inputValidationWarningBackground,this.inputValidationWarningForeground=N.inputValidationWarningForeground,this.inputValidationWarningBorder=N.inputValidationWarningBorder,this.inputValidationErrorBackground=N.inputValidationErrorBackground,this.inputValidationErrorForeground=N.inputValidationErrorForeground,this.inputValidationErrorBorder=N.inputValidationErrorBorder,this.applyStyles()}applyStyles(){const N=this.inputBackground?this.inputBackground.toString():"",B=this.inputForeground?this.inputForeground.toString():"",T=this.inputBorder?this.inputBorder.toString():"";this.element.style.backgroundColor=N,this.element.style.color=B,this.input.style.backgroundColor="inherit",this.input.style.color=B,this.element.style.borderWidth=T?"1px":"",this.element.style.borderStyle=T?"solid":"",this.element.style.borderColor=T}layout(){if(!this.mirror)return;const N=this.cachedContentHeight;this.cachedContentHeight=I.OK(this.mirror),N!==this.cachedContentHeight&&(this.cachedHeight=Math.min(this.cachedContentHeight,this.maxHeight),this.input.style.height=this.cachedHeight+"px",this._onDidHeightChange.fire(this.cachedContentHeight))}insertAtCursor(N){const B=this.inputElement,T=B.selectionStart,H=B.selectionEnd,Y=B.value;T!==null&&H!==null&&(this.value=Y.substr(0,T)+N+Y.substr(H),B.setSelectionRange(T+1,T+1),this.layout())}dispose(){this._hideMessage(),this.message=null,this.actionbar&&this.actionbar.dispose(),super.dispose()}}class k extends L{constructor(N,B,T){const H=d.kg({key:"history.inputbox.hint",comment:["Text will be prefixed with \u21C5 plus a single space, then used as a hint where input field keeps history"]},"for history"),Y=` or \u21C5 ${H}`,ee=` (\u21C5 ${H})`;super(N,B,T),this._onDidFocus=this._register(new z.vl),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new z.vl),this.onDidBlur=this._onDidBlur.event,this.history=new _(T.history,100);const ce=()=>{if(T.showHistoryHint&&T.showHistoryHint()&&!this.placeholder.endsWith(Y)&&!this.placeholder.endsWith(ee)&&this.history.getHistory().length){const pe=this.placeholder.endsWith(")")?Y:ee,ge=this.placeholder+pe;T.showPlaceholderOnFocus&&document.activeElement!==this.input?this.placeholder=ge:this.setPlaceHolder(ge)}};this.observer=new MutationObserver((pe,ge)=>{pe.forEach(fe=>{fe.target.textContent||ce()})}),this.observer.observe(this.input,{attributeFilter:["class"]}),this.onfocus(this.input,()=>ce()),this.onblur(this.input,()=>{const pe=ge=>{if(this.placeholder.endsWith(ge)){const fe=this.placeholder.slice(0,this.placeholder.length-ge.length);return T.showPlaceholderOnFocus?this.placeholder=fe:this.setPlaceHolder(fe),!0}else return!1};pe(ee)||pe(Y)})}dispose(){super.dispose(),this.observer&&(this.observer.disconnect(),this.observer=void 0)}addToHistory(){this.value&&this.value!==this.getCurrentValue()&&this.history.add(this.value)}showNextValue(){this.history.has(this.value)||this.addToHistory();let N=this.getNextValue();N&&(N=N===this.value?this.getNextValue():N),N&&(this.value=N,x.h5(this.value))}showPreviousValue(){this.history.has(this.value)||this.addToHistory();let N=this.getPreviousValue();N&&(N=N===this.value?this.getPreviousValue():N),N&&(this.value=N,x.h5(this.value))}onBlur(){super.onBlur(),this._onDidBlur.fire()}onFocus(){super.onFocus(),this._onDidFocus.fire()}getCurrentValue(){let N=this.history.current();return N||(N=this.history.last(),this.history.next()),N}getPreviousValue(){return this.history.previous()||this.history.first()}getNextValue(){return this.history.next()||this.history.last()}}},83022:(Tt,Fe,f)=>{f.d(Fe,{ur:()=>H,uO:()=>ge});var I=f(55893),h=f(39587),te=f(59095),$=f(34061),x=f(30474),ie=f(63781),Q=f(13338),J=f(65958),z=f(88846),S=f(2106),_=f(10998),y=f(4580),C=f(94513);function d(fe,oe){const Z=[];for(const le of oe){if(fe.start>=le.range.end)continue;if(fe.end<le.range.start)break;const se=y.Q.intersect(fe,le.range);y.Q.isEmpty(se)||Z.push({range:se,size:le.size})}return Z}function w({start:fe,end:oe},Z){return{start:fe+Z,end:oe+Z}}function D(fe){const oe=[];let Z=null;for(const le of fe){const se=le.range.start,X=le.range.end,K=le.size;if(Z&&K===Z.size){Z.range.end=X;continue}Z={range:{start:se,end:X},size:K},oe.push(Z)}return oe}function L(...fe){return D(fe.reduce((oe,Z)=>oe.concat(Z),[]))}class k{constructor(){this.groups=[],this._size=0}splice(oe,Z,le=[]){const se=le.length-Z,X=d({start:0,end:oe},this.groups),K=d({start:oe+Z,end:Number.POSITIVE_INFINITY},this.groups).map(ve=>({range:w(ve.range,se),size:ve.size})),he=le.map((ve,Ee)=>({range:{start:oe+Ee,end:oe+Ee+1},size:ve.size}));this.groups=L(X,he,K),this._size=this.groups.reduce((ve,Ee)=>ve+Ee.size*(Ee.range.end-Ee.range.start),0)}get count(){const oe=this.groups.length;return oe?this.groups[oe-1].range.end:0}get size(){return this._size}indexAt(oe){if(oe<0)return-1;let Z=0,le=0;for(const se of this.groups){const X=se.range.end-se.range.start,K=le+X*se.size;if(oe<K)return Z+Math.floor((oe-le)/se.size);Z+=X,le=K}return Z}indexAfter(oe){return Math.min(this.indexAt(oe)+1,this.count)}positionAt(oe){if(oe<0)return-1;let Z=0,le=0;for(const se of this.groups){const X=se.range.end-se.range.start,K=le+X;if(oe<K)return Z+(oe-le)*se.size;Z+=X*se.size,le=K}return-1}}function j(fe){var oe;try{(oe=fe.parentElement)===null||oe===void 0||oe.removeChild(fe)}catch{}}class N{constructor(oe){this.renderers=oe,this.cache=new Map}alloc(oe){let Z=this.getTemplateCache(oe).pop();if(!Z){const le=(0,te.$)(".monaco-list-row"),X=this.getRenderer(oe).renderTemplate(le);Z={domNode:le,templateId:oe,templateData:X}}return Z}release(oe){oe&&this.releaseRow(oe)}releaseRow(oe){const{domNode:Z,templateId:le}=oe;Z&&(Z.classList.remove("scrolling"),j(Z)),this.getTemplateCache(le).push(oe)}getTemplateCache(oe){let Z=this.cache.get(oe);return Z||(Z=[],this.cache.set(oe,Z)),Z}dispose(){this.cache.forEach((oe,Z)=>{for(const le of oe)this.getRenderer(Z).disposeTemplate(le.templateData),le.templateData=null}),this.cache.clear()}getRenderer(oe){const Z=this.renderers.get(oe);if(!Z)throw new Error(`No renderer found for ${oe}`);return Z}}var B=function(fe,oe,Z,le){var se=arguments.length,X=se<3?oe:le===null?le=Object.getOwnPropertyDescriptor(oe,Z):le,K;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")X=Reflect.decorate(fe,oe,Z,le);else for(var he=fe.length-1;he>=0;he--)(K=fe[he])&&(X=(se<3?K(X):se>3?K(oe,Z,X):K(oe,Z))||X);return se>3&&X&&Object.defineProperty(oe,Z,X),X};const T={useShadows:!0,verticalScrollMode:1,setRowLineHeight:!0,setRowHeight:!0,supportDynamicHeights:!1,dnd:{getDragElements(fe){return[fe]},getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){}},horizontalScrolling:!1,transformOptimization:!0,alwaysConsumeMouseWheel:!0};class H{constructor(oe){this.elements=oe}update(){}getData(){return this.elements}}class Y{constructor(oe){this.elements=oe}update(){}getData(){return this.elements}}class ee{constructor(){this.types=[],this.files=[]}update(oe){if(oe.types&&this.types.splice(0,this.types.length,...oe.types),oe.files){this.files.splice(0,this.files.length);for(let Z=0;Z<oe.files.length;Z++){const le=oe.files.item(Z);le&&(le.size||le.type)&&this.files.push(le)}}}getData(){return{types:this.types,files:this.files}}}function ce(fe,oe){return Array.isArray(fe)&&Array.isArray(oe)?(0,Q.aI)(fe,oe):fe===oe}class pe{constructor(oe){oe?.getSetSize?this.getSetSize=oe.getSetSize.bind(oe):this.getSetSize=(Z,le,se)=>se,oe?.getPosInSet?this.getPosInSet=oe.getPosInSet.bind(oe):this.getPosInSet=(Z,le)=>le+1,oe?.getRole?this.getRole=oe.getRole.bind(oe):this.getRole=Z=>"listitem",oe?.isChecked?this.isChecked=oe.isChecked.bind(oe):this.isChecked=Z=>{}}}class ge{constructor(oe,Z,le,se=T){var X,K,he,ve,Ee,O,ot,lt,We,Ke;if(this.virtualDelegate=Z,this.domId=`list_id_${++ge.InstanceCount}`,this.renderers=new Map,this.renderWidth=0,this._scrollHeight=0,this.scrollableElementUpdateDisposable=null,this.scrollableElementWidthDelayer=new J.ve(50),this.splicing=!1,this.dragOverAnimationStopDisposable=_.jG.None,this.dragOverMouseY=0,this.canDrop=!1,this.currentDragFeedbackDisposable=_.jG.None,this.onDragLeaveTimeout=_.jG.None,this.disposables=new _.Cm,this._onDidChangeContentHeight=new S.vl,this._horizontalScrolling=!1,se.horizontalScrolling&&se.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");this.items=[],this.itemId=0,this.rangeMap=new k;for(const Pe of le)this.renderers.set(Pe.templateId,Pe);this.cache=this.disposables.add(new N(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 se.mouseSupport=="boolean"?se.mouseSupport:!0),this._horizontalScrolling=(X=se.horizontalScrolling)!==null&&X!==void 0?X:T.horizontalScrolling,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this.additionalScrollHeight=typeof se.additionalScrollHeight>"u"?0:se.additionalScrollHeight,this.accessibilityProvider=new pe(se.accessibilityProvider),this.rowsContainer=document.createElement("div"),this.rowsContainer.className="monaco-list-rows",((K=se.transformOptimization)!==null&&K!==void 0?K:T.transformOptimization)&&(this.rowsContainer.style.transform="translate3d(0px, 0px, 0px)"),this.disposables.add(x.q.addTarget(this.rowsContainer)),this.scrollable=new C.yE({forceIntegerValues:!0,smoothScrollDuration:(he=se.smoothScrolling)!==null&&he!==void 0&&he?125:0,scheduleAtNextAnimationFrame:Pe=>(0,te.PG)(Pe)}),this.scrollableElement=this.disposables.add(new ie.oO(this.rowsContainer,{alwaysConsumeMouseWheel:(ve=se.alwaysConsumeMouseWheel)!==null&&ve!==void 0?ve:T.alwaysConsumeMouseWheel,horizontal:1,vertical:(Ee=se.verticalScrollMode)!==null&&Ee!==void 0?Ee:T.verticalScrollMode,useShadows:(O=se.useShadows)!==null&&O!==void 0?O:T.useShadows,mouseWheelScrollSensitivity:se.mouseWheelScrollSensitivity,fastScrollSensitivity:se.fastScrollSensitivity},this.scrollable)),this.domNode.appendChild(this.scrollableElement.getDomNode()),oe.appendChild(this.domNode),this.scrollableElement.onScroll(this.onScroll,this,this.disposables),this.disposables.add((0,te.ko)(this.rowsContainer,x.B.Change,Pe=>this.onTouchChange(Pe))),this.disposables.add((0,te.ko)(this.scrollableElement.getDomNode(),"scroll",Pe=>Pe.target.scrollTop=0)),this.disposables.add((0,te.ko)(this.domNode,"dragover",Pe=>this.onDragOver(this.toDragEvent(Pe)))),this.disposables.add((0,te.ko)(this.domNode,"drop",Pe=>this.onDrop(this.toDragEvent(Pe)))),this.disposables.add((0,te.ko)(this.domNode,"dragleave",Pe=>this.onDragLeave(this.toDragEvent(Pe)))),this.disposables.add((0,te.ko)(this.domNode,"dragend",Pe=>this.onDragEnd(Pe))),this.setRowLineHeight=(ot=se.setRowLineHeight)!==null&&ot!==void 0?ot:T.setRowLineHeight,this.setRowHeight=(lt=se.setRowHeight)!==null&<!==void 0?lt:T.setRowHeight,this.supportDynamicHeights=(We=se.supportDynamicHeights)!==null&&We!==void 0?We:T.supportDynamicHeights,this.dnd=(Ke=se.dnd)!==null&&Ke!==void 0?Ke:T.dnd,this.layout()}get contentHeight(){return this.rangeMap.size}get horizontalScrolling(){return this._horizontalScrolling}set horizontalScrolling(oe){if(oe!==this._horizontalScrolling){if(oe&&this.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");if(this._horizontalScrolling=oe,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this._horizontalScrolling){for(const Z of this.items)this.measureItemWidth(Z);this.updateScrollWidth(),this.scrollableElement.setScrollDimensions({width:(0,te.y6)(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=""}}updateOptions(oe){oe.additionalScrollHeight!==void 0&&(this.additionalScrollHeight=oe.additionalScrollHeight,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),oe.smoothScrolling!==void 0&&this.scrollable.setSmoothScrollDuration(oe.smoothScrolling?125:0),oe.horizontalScrolling!==void 0&&(this.horizontalScrolling=oe.horizontalScrolling),oe.mouseWheelScrollSensitivity!==void 0&&this.scrollableElement.updateOptions({mouseWheelScrollSensitivity:oe.mouseWheelScrollSensitivity}),oe.fastScrollSensitivity!==void 0&&this.scrollableElement.updateOptions({fastScrollSensitivity:oe.fastScrollSensitivity})}splice(oe,Z,le=[]){if(this.splicing)throw new Error("Can't run recursive splices.");this.splicing=!0;try{return this._splice(oe,Z,le)}finally{this.splicing=!1,this._onDidChangeContentHeight.fire(this.contentHeight)}}_splice(oe,Z,le=[]){const se=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),X={start:oe,end:oe+Z},K=y.Q.intersect(se,X),he=new Map;for(let Dt=K.end-1;Dt>=K.start;Dt--){const xt=this.items[Dt];if(xt.dragStartDisposable.dispose(),xt.checkedDisposable.dispose(),xt.row){let Ie=he.get(xt.templateId);Ie||(Ie=[],he.set(xt.templateId,Ie));const dt=this.renderers.get(xt.templateId);dt&&dt.disposeElement&&dt.disposeElement(xt.element,Dt,xt.row.templateData,xt.size),Ie.push(xt.row)}xt.row=null}const ve={start:oe+Z,end:this.items.length},Ee=y.Q.intersect(ve,se),O=y.Q.relativeComplement(ve,se),ot=le.map(Dt=>({id:String(this.itemId++),element:Dt,templateId:this.virtualDelegate.getTemplateId(Dt),size:this.virtualDelegate.getHeight(Dt),width:void 0,hasDynamicHeight:!!this.virtualDelegate.hasDynamicHeight&&this.virtualDelegate.hasDynamicHeight(Dt),lastDynamicHeightWidth:void 0,row:null,uri:void 0,dropTarget:!1,dragStartDisposable:_.jG.None,checkedDisposable:_.jG.None}));let lt;oe===0&&Z>=this.items.length?(this.rangeMap=new k,this.rangeMap.splice(0,0,ot),lt=this.items,this.items=ot):(this.rangeMap.splice(oe,Z,ot),lt=this.items.splice(oe,Z,...ot));const We=le.length-Z,Ke=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),De=w(Ee,We),Pe=y.Q.intersect(Ke,De);for(let Dt=Pe.start;Dt<Pe.end;Dt++)this.updateItemInDOM(this.items[Dt],Dt);const Ue=y.Q.relativeComplement(De,Ke);for(const Dt of Ue)for(let xt=Dt.start;xt<Dt.end;xt++)this.removeItemFromDOM(xt);const Re=O.map(Dt=>w(Dt,We)),rt=[{start:oe,end:oe+le.length},...Re].map(Dt=>y.Q.intersect(Ke,Dt)),Lt=this.getNextToLastElement(rt);for(const Dt of rt)for(let xt=Dt.start;xt<Dt.end;xt++){const Ie=this.items[xt],dt=he.get(Ie.templateId),ft=dt?.pop();this.insertItemInDOM(xt,Lt,ft)}for(const Dt of he.values())for(const xt of Dt)this.cache.release(xt);return this.eventuallyUpdateScrollDimensions(),this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight),lt.map(Dt=>Dt.element)}eventuallyUpdateScrollDimensions(){this._scrollHeight=this.contentHeight,this.rowsContainer.style.height=`${this._scrollHeight}px`,this.scrollableElementUpdateDisposable||(this.scrollableElementUpdateDisposable=(0,te.PG)(()=>{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 oe=0;for(const Z of this.items)typeof Z.width<"u"&&(oe=Math.max(oe,Z.width));this.scrollWidth=oe,this.scrollableElement.setScrollDimensions({scrollWidth:oe===0?0:oe+10})}rerender(){if(this.supportDynamicHeights){for(const oe of this.items)oe.lastDynamicHeightWidth=void 0;this._rerender(this.lastRenderTop,this.lastRenderHeight)}}get length(){return this.items.length}get renderHeight(){return this.scrollableElement.getScrollDimensions().height}element(oe){return this.items[oe].element}domElement(oe){const Z=this.items[oe].row;return Z&&Z.domNode}elementHeight(oe){return this.items[oe].size}elementTop(oe){return this.rangeMap.positionAt(oe)}indexAt(oe){return this.rangeMap.indexAt(oe)}indexAfter(oe){return this.rangeMap.indexAfter(oe)}layout(oe,Z){const le={height:typeof oe=="number"?oe:(0,te.H4)(this.domNode)};this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,le.scrollHeight=this.scrollHeight),this.scrollableElement.setScrollDimensions(le),typeof Z<"u"&&(this.renderWidth=Z,this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight)),this.horizontalScrolling&&this.scrollableElement.setScrollDimensions({width:typeof Z=="number"?Z:(0,te.y6)(this.domNode)})}render(oe,Z,le,se,X,K=!1){const he=this.getRenderRange(Z,le),ve=y.Q.relativeComplement(he,oe),Ee=y.Q.relativeComplement(oe,he),O=this.getNextToLastElement(ve);if(K){const ot=y.Q.intersect(oe,he);for(let lt=ot.start;lt<ot.end;lt++)this.updateItemInDOM(this.items[lt],lt)}for(const ot of ve)for(let lt=ot.start;lt<ot.end;lt++)this.insertItemInDOM(lt,O);for(const ot of Ee)for(let lt=ot.start;lt<ot.end;lt++)this.removeItemFromDOM(lt);se!==void 0&&(this.rowsContainer.style.left=`-${se}px`),this.rowsContainer.style.top=`-${Z}px`,this.horizontalScrolling&&X!==void 0&&(this.rowsContainer.style.width=`${Math.max(X,this.renderWidth)}px`),this.lastRenderTop=Z,this.lastRenderHeight=le}insertItemInDOM(oe,Z,le){const se=this.items[oe];se.row||(se.row=le??this.cache.alloc(se.templateId));const X=this.accessibilityProvider.getRole(se.element)||"listitem";se.row.domNode.setAttribute("role",X);const K=this.accessibilityProvider.isChecked(se.element);if(typeof K=="boolean")se.row.domNode.setAttribute("aria-checked",String(!!K));else if(K){const Ee=O=>se.row.domNode.setAttribute("aria-checked",String(!!O));Ee(K.value),se.checkedDisposable=K.onDidChange(Ee)}se.row.domNode.parentElement||(Z?this.rowsContainer.insertBefore(se.row.domNode,Z):this.rowsContainer.appendChild(se.row.domNode)),this.updateItemInDOM(se,oe);const he=this.renderers.get(se.templateId);if(!he)throw new Error(`No renderer found for template id ${se.templateId}`);he?.renderElement(se.element,oe,se.row.templateData,se.size);const ve=this.dnd.getDragURI(se.element);se.dragStartDisposable.dispose(),se.row.domNode.draggable=!!ve,ve&&(se.dragStartDisposable=(0,te.ko)(se.row.domNode,"dragstart",Ee=>this.onDragStart(se.element,ve,Ee))),this.horizontalScrolling&&(this.measureItemWidth(se),this.eventuallyUpdateScrollWidth())}measureItemWidth(oe){if(!oe.row||!oe.row.domNode)return;oe.row.domNode.style.width=I.isFirefox?"-moz-fit-content":"fit-content",oe.width=(0,te.y6)(oe.row.domNode);const Z=window.getComputedStyle(oe.row.domNode);Z.paddingLeft&&(oe.width+=parseFloat(Z.paddingLeft)),Z.paddingRight&&(oe.width+=parseFloat(Z.paddingRight)),oe.row.domNode.style.width=""}updateItemInDOM(oe,Z){oe.row.domNode.style.top=`${this.elementTop(Z)}px`,this.setRowHeight&&(oe.row.domNode.style.height=`${oe.size}px`),this.setRowLineHeight&&(oe.row.domNode.style.lineHeight=`${oe.size}px`),oe.row.domNode.setAttribute("data-index",`${Z}`),oe.row.domNode.setAttribute("data-last-element",Z===this.length-1?"true":"false"),oe.row.domNode.setAttribute("data-parity",Z%2===0?"even":"odd"),oe.row.domNode.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(oe.element,Z,this.length))),oe.row.domNode.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(oe.element,Z))),oe.row.domNode.setAttribute("id",this.getElementDomId(Z)),oe.row.domNode.classList.toggle("drop-target",oe.dropTarget)}removeItemFromDOM(oe){const Z=this.items[oe];if(Z.dragStartDisposable.dispose(),Z.checkedDisposable.dispose(),Z.row){const le=this.renderers.get(Z.templateId);le&&le.disposeElement&&le.disposeElement(Z.element,oe,Z.row.templateData,Z.size),this.cache.release(Z.row),Z.row=null}this.horizontalScrolling&&this.eventuallyUpdateScrollWidth()}getScrollTop(){return this.scrollableElement.getScrollPosition().scrollTop}setScrollTop(oe,Z){this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),this.scrollableElement.setScrollPosition({scrollTop:oe,reuseAnimation:Z})}get scrollTop(){return this.getScrollTop()}set scrollTop(oe){this.setScrollTop(oe)}get scrollHeight(){return this._scrollHeight+(this.horizontalScrolling?10:0)+this.additionalScrollHeight}get onMouseClick(){return S.Jh.map(this.disposables.add(new $.f(this.domNode,"click")).event,oe=>this.toMouseEvent(oe),this.disposables)}get onMouseDblClick(){return S.Jh.map(this.disposables.add(new $.f(this.domNode,"dblclick")).event,oe=>this.toMouseEvent(oe),this.disposables)}get onMouseMiddleClick(){return S.Jh.filter(S.Jh.map(this.disposables.add(new $.f(this.domNode,"auxclick")).event,oe=>this.toMouseEvent(oe),this.disposables),oe=>oe.browserEvent.button===1,this.disposables)}get onMouseDown(){return S.Jh.map(this.disposables.add(new $.f(this.domNode,"mousedown")).event,oe=>this.toMouseEvent(oe),this.disposables)}get onMouseOver(){return S.Jh.map(this.disposables.add(new $.f(this.domNode,"mouseover")).event,oe=>this.toMouseEvent(oe),this.disposables)}get onContextMenu(){return S.Jh.any(S.Jh.map(this.disposables.add(new $.f(this.domNode,"contextmenu")).event,oe=>this.toMouseEvent(oe),this.disposables),S.Jh.map(this.disposables.add(new $.f(this.domNode,x.B.Contextmenu)).event,oe=>this.toGestureEvent(oe),this.disposables))}get onTouchStart(){return S.Jh.map(this.disposables.add(new $.f(this.domNode,"touchstart")).event,oe=>this.toTouchEvent(oe),this.disposables)}get onTap(){return S.Jh.map(this.disposables.add(new $.f(this.rowsContainer,x.B.Tap)).event,oe=>this.toGestureEvent(oe),this.disposables)}toMouseEvent(oe){const Z=this.getItemIndexFromEventTarget(oe.target||null),le=typeof Z>"u"?void 0:this.items[Z],se=le&&le.element;return{browserEvent:oe,index:Z,element:se}}toTouchEvent(oe){const Z=this.getItemIndexFromEventTarget(oe.target||null),le=typeof Z>"u"?void 0:this.items[Z],se=le&&le.element;return{browserEvent:oe,index:Z,element:se}}toGestureEvent(oe){const Z=this.getItemIndexFromEventTarget(oe.initialTarget||null),le=typeof Z>"u"?void 0:this.items[Z],se=le&&le.element;return{browserEvent:oe,index:Z,element:se}}toDragEvent(oe){const Z=this.getItemIndexFromEventTarget(oe.target||null),le=typeof Z>"u"?void 0:this.items[Z],se=le&&le.element;return{browserEvent:oe,index:Z,element:se}}onScroll(oe){try{const Z=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);this.render(Z,oe.scrollTop,oe.height,oe.scrollLeft,oe.scrollWidth),this.supportDynamicHeights&&this._rerender(oe.scrollTop,oe.height,oe.inSmoothScrolling)}catch(Z){throw console.error("Got bad scroll event:",oe),Z}}onTouchChange(oe){oe.preventDefault(),oe.stopPropagation(),this.scrollTop-=oe.translationY}onDragStart(oe,Z,le){var se,X;if(!le.dataTransfer)return;const K=this.dnd.getDragElements(oe);if(le.dataTransfer.effectAllowed="copyMove",le.dataTransfer.setData(h.t.TEXT,Z),le.dataTransfer.setDragImage){let he;this.dnd.getDragLabel&&(he=this.dnd.getDragLabel(K,le)),typeof he>"u"&&(he=String(K.length));const ve=(0,te.$)(".monaco-drag-image");ve.textContent=he,document.body.appendChild(ve),le.dataTransfer.setDragImage(ve,-10,-10),setTimeout(()=>document.body.removeChild(ve),0)}this.currentDragData=new H(K),h.M.CurrentDragAndDropData=new Y(K),(X=(se=this.dnd).onDragStart)===null||X===void 0||X.call(se,this.currentDragData,le)}onDragOver(oe){var Z;if(oe.browserEvent.preventDefault(),this.onDragLeaveTimeout.dispose(),h.M.CurrentDragAndDropData&&h.M.CurrentDragAndDropData.getData()==="vscode-ui"||(this.setupDragAndDropScrollTopAnimation(oe.browserEvent),!oe.browserEvent.dataTransfer))return!1;if(!this.currentDragData)if(h.M.CurrentDragAndDropData)this.currentDragData=h.M.CurrentDragAndDropData;else{if(!oe.browserEvent.dataTransfer.types)return!1;this.currentDragData=new ee}const le=this.dnd.onDragOver(this.currentDragData,oe.element,oe.index,oe.browserEvent);if(this.canDrop=typeof le=="boolean"?le:le.accept,!this.canDrop)return this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),!1;oe.browserEvent.dataTransfer.dropEffect=typeof le!="boolean"&&le.effect===0?"copy":"move";let se;if(typeof le!="boolean"&&le.feedback?se=le.feedback:typeof oe.index>"u"?se=[-1]:se=[oe.index],se=(0,Q.dM)(se).filter(X=>X>=-1&&X<this.length).sort((X,K)=>X-K),se=se[0]===-1?[-1]:se,ce(this.currentDragFeedback,se))return!0;if(this.currentDragFeedback=se,this.currentDragFeedbackDisposable.dispose(),se[0]===-1)this.domNode.classList.add("drop-target"),this.rowsContainer.classList.add("drop-target"),this.currentDragFeedbackDisposable=(0,_.s)(()=>{this.domNode.classList.remove("drop-target"),this.rowsContainer.classList.remove("drop-target")});else{for(const X of se){const K=this.items[X];K.dropTarget=!0,(Z=K.row)===null||Z===void 0||Z.domNode.classList.add("drop-target")}this.currentDragFeedbackDisposable=(0,_.s)(()=>{var X;for(const K of se){const he=this.items[K];he.dropTarget=!1,(X=he.row)===null||X===void 0||X.domNode.classList.remove("drop-target")}})}return!0}onDragLeave(oe){var Z,le;this.onDragLeaveTimeout.dispose(),this.onDragLeaveTimeout=(0,J.EQ)(()=>this.clearDragOverFeedback(),100),this.currentDragData&&((le=(Z=this.dnd).onDragLeave)===null||le===void 0||le.call(Z,this.currentDragData,oe.element,oe.index,oe.browserEvent))}onDrop(oe){if(!this.canDrop)return;const Z=this.currentDragData;this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.currentDragData=void 0,h.M.CurrentDragAndDropData=void 0,!(!Z||!oe.browserEvent.dataTransfer)&&(oe.browserEvent.preventDefault(),Z.update(oe.browserEvent.dataTransfer),this.dnd.drop(Z,oe.element,oe.index,oe.browserEvent))}onDragEnd(oe){var Z,le;this.canDrop=!1,this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.currentDragData=void 0,h.M.CurrentDragAndDropData=void 0,(le=(Z=this.dnd).onDragEnd)===null||le===void 0||le.call(Z,oe)}clearDragOverFeedback(){this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),this.currentDragFeedbackDisposable=_.jG.None}setupDragAndDropScrollTopAnimation(oe){if(!this.dragOverAnimationDisposable){const Z=(0,te.cL)(this.domNode).top;this.dragOverAnimationDisposable=(0,te.i0)(this.animateDragAndDropScrollTop.bind(this,Z))}this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationStopDisposable=(0,J.EQ)(()=>{this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)},1e3),this.dragOverMouseY=oe.pageY}animateDragAndDropScrollTop(oe){if(this.dragOverMouseY===void 0)return;const Z=this.dragOverMouseY-oe,le=this.renderHeight-35;Z<35?this.scrollTop+=Math.max(-14,Math.floor(.3*(Z-35))):Z>le&&(this.scrollTop+=Math.min(14,Math.floor(.3*(Z-le))))}teardownDragAndDropScrollTopAnimation(){this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}getItemIndexFromEventTarget(oe){const Z=this.scrollableElement.getDomNode();let le=oe;for(;le instanceof HTMLElement&&le!==this.rowsContainer&&Z.contains(le);){const se=le.getAttribute("data-index");if(se){const X=Number(se);if(!isNaN(X))return X}le=le.parentElement}}getRenderRange(oe,Z){return{start:this.rangeMap.indexAt(oe),end:this.rangeMap.indexAfter(oe+Z-1)}}_rerender(oe,Z,le){const se=this.getRenderRange(oe,Z);let X,K;oe===this.elementTop(se.start)?(X=se.start,K=0):se.end-se.start>1&&(X=se.start+1,K=this.elementTop(X)-oe);let he=0;for(;;){const ve=this.getRenderRange(oe,Z);let Ee=!1;for(let O=ve.start;O<ve.end;O++){const ot=this.probeDynamicHeight(O);ot!==0&&this.rangeMap.splice(O,1,[this.items[O]]),he+=ot,Ee=Ee||ot!==0}if(!Ee){he!==0&&this.eventuallyUpdateScrollDimensions();const O=y.Q.relativeComplement(se,ve);for(const lt of O)for(let We=lt.start;We<lt.end;We++)this.items[We].row&&this.removeItemFromDOM(We);const ot=y.Q.relativeComplement(ve,se);for(const lt of ot)for(let We=lt.start;We<lt.end;We++){const Ke=We+1,De=Ke<this.items.length?this.items[Ke].row:null,Pe=De?De.domNode:null;this.insertItemInDOM(We,Pe)}for(let lt=ve.start;lt<ve.end;lt++)this.items[lt].row&&this.updateItemInDOM(this.items[lt],lt);if(typeof X=="number"){const lt=this.scrollable.getFutureScrollPosition().scrollTop-oe,We=this.elementTop(X)-K+lt;this.setScrollTop(We,le)}this._onDidChangeContentHeight.fire(this.contentHeight);return}}}probeDynamicHeight(oe){var Z,le,se;const X=this.items[oe];if(this.virtualDelegate.getDynamicHeight){const Ee=this.virtualDelegate.getDynamicHeight(X.element);if(Ee!==null){const O=X.size;return X.size=Ee,X.lastDynamicHeightWidth=this.renderWidth,Ee-O}}if(!X.hasDynamicHeight||X.lastDynamicHeightWidth===this.renderWidth||this.virtualDelegate.hasDynamicHeight&&!this.virtualDelegate.hasDynamicHeight(X.element))return 0;const K=X.size;if(!this.setRowHeight&&X.row){const Ee=X.row.domNode.offsetHeight;return X.size=Ee,X.lastDynamicHeightWidth=this.renderWidth,Ee-K}const he=this.cache.alloc(X.templateId);he.domNode.style.height="",this.rowsContainer.appendChild(he.domNode);const ve=this.renderers.get(X.templateId);return ve&&(ve.renderElement(X.element,oe,he.templateData,void 0),(Z=ve.disposeElement)===null||Z===void 0||Z.call(ve,X.element,oe,he.templateData,void 0)),X.size=he.domNode.offsetHeight,(se=(le=this.virtualDelegate).setDynamicHeight)===null||se===void 0||se.call(le,X.element,X.size),X.lastDynamicHeightWidth=this.renderWidth,this.rowsContainer.removeChild(he.domNode),this.cache.release(he),X.size-K}getNextToLastElement(oe){const Z=oe[oe.length-1];if(!Z)return null;const le=this.items[Z.end];return!le||!le.row?null:le.row.domNode}getElementDomId(oe){return`${this.domId}_${oe}`}dispose(){var oe;if(this.items){for(const Z of this.items)if(Z.row){const le=this.renderers.get(Z.row.templateId);le&&((oe=le.disposeElement)===null||oe===void 0||oe.call(le,Z.element,-1,Z.row.templateData,void 0),le.disposeTemplate(Z.row.templateData))}this.items=[]}this.domNode&&this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),(0,_.AS)(this.disposables)}}ge.InstanceCount=0,B([z.B],ge.prototype,"onMouseClick",null),B([z.B],ge.prototype,"onMouseDblClick",null),B([z.B],ge.prototype,"onMouseMiddleClick",null),B([z.B],ge.prototype,"onMouseDown",null),B([z.B],ge.prototype,"onMouseOver",null),B([z.B],ge.prototype,"onContextMenu",null),B([z.B],ge.prototype,"onTouchStart",null),B([z.B],ge.prototype,"onTap",null)},67954:(Tt,Fe,f)=>{f.d(Fe,{hb:()=>lt,B8:()=>Dt,MH:()=>ot,_C:()=>Z,Bm:()=>fe,B6:()=>pe,bm:()=>ge,mh:()=>ve,tX:()=>he});var I=f(59095),h=f(34061),te=f(87594),$=f(30474),x=f(59407);class ie{constructor(Ie){this.spliceables=Ie}splice(Ie,dt,ft){this.spliceables.forEach(Bt=>Bt.splice(Ie,dt,ft))}}var Q=f(13338),J=f(65958),z=f(94901),S=f(88846),_=f(2106),y=f(97669),C=f(10998),d=f(62992),w=f(71386),D=f(63339),L=f(79359),k=f(67119);class j extends Error{constructor(Ie,dt){super(`ListError [${Ie}] ${dt}`)}}var N=f(83022),B=function(xt,Ie,dt,ft){var Bt=arguments.length,jt=Bt<3?Ie:ft===null?ft=Object.getOwnPropertyDescriptor(Ie,dt):ft,pt;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")jt=Reflect.decorate(xt,Ie,dt,ft);else for(var bt=xt.length-1;bt>=0;bt--)(pt=xt[bt])&&(jt=(Bt<3?pt(jt):Bt>3?pt(Ie,dt,jt):pt(Ie,dt))||jt);return Bt>3&&jt&&Object.defineProperty(Ie,dt,jt),jt},T=function(xt,Ie,dt,ft){function Bt(jt){return jt instanceof dt?jt:new dt(function(pt){pt(jt)})}return new(dt||(dt=Promise))(function(jt,pt){function bt(vi){try{ii(ft.next(vi))}catch(Ze){pt(Ze)}}function zt(vi){try{ii(ft.throw(vi))}catch(Ze){pt(Ze)}}function ii(vi){vi.done?jt(vi.value):Bt(vi.value).then(bt,zt)}ii((ft=ft.apply(xt,Ie||[])).next())})};class H{constructor(Ie){this.trait=Ie,this.renderedElements=[]}get templateId(){return`template:${this.trait.name}`}renderTemplate(Ie){return Ie}renderElement(Ie,dt,ft){const Bt=this.renderedElements.findIndex(jt=>jt.templateData===ft);if(Bt>=0){const jt=this.renderedElements[Bt];this.trait.unrender(ft),jt.index=dt}else{const jt={index:dt,templateData:ft};this.renderedElements.push(jt)}this.trait.renderIndex(dt,ft)}splice(Ie,dt,ft){const Bt=[];for(const jt of this.renderedElements)jt.index<Ie?Bt.push(jt):jt.index>=Ie+dt&&Bt.push({index:jt.index+ft-dt,templateData:jt.templateData});this.renderedElements=Bt}renderIndexes(Ie){for(const{index:dt,templateData:ft}of this.renderedElements)Ie.indexOf(dt)>-1&&this.trait.renderIndex(dt,ft)}disposeTemplate(Ie){const dt=this.renderedElements.findIndex(ft=>ft.templateData===Ie);dt<0||this.renderedElements.splice(dt,1)}}class Y{constructor(Ie){this._trait=Ie,this.length=0,this.indexes=[],this.sortedIndexes=[],this._onChange=new _.vl,this.onChange=this._onChange.event}get name(){return this._trait}get renderer(){return new H(this)}splice(Ie,dt,ft){var Bt;dt=Math.max(0,Math.min(dt,this.length-Ie));const jt=ft.length-dt,pt=Ie+dt,bt=[...this.sortedIndexes.filter(ii=>ii<Ie),...ft.map((ii,vi)=>ii?vi+Ie:-1).filter(ii=>ii!==-1),...this.sortedIndexes.filter(ii=>ii>=pt).map(ii=>ii+jt)],zt=this.length+jt;if(this.sortedIndexes.length>0&&bt.length===0&&zt>0){const ii=(Bt=this.sortedIndexes.find(vi=>vi>=Ie))!==null&&Bt!==void 0?Bt:zt-1;bt.push(Math.min(ii,zt-1))}this.renderer.splice(Ie,dt,ft.length),this._set(bt,bt),this.length=zt}renderIndex(Ie,dt){dt.classList.toggle(this._trait,this.contains(Ie))}unrender(Ie){Ie.classList.remove(this._trait)}set(Ie,dt){return this._set(Ie,[...Ie].sort(Re),dt)}_set(Ie,dt,ft){const Bt=this.indexes,jt=this.sortedIndexes;this.indexes=Ie,this.sortedIndexes=dt;const pt=Pe(jt,Ie);return this.renderer.renderIndexes(pt),this._onChange.fire({indexes:Ie,browserEvent:ft}),Bt}get(){return this.indexes}contains(Ie){return(0,Q.El)(this.sortedIndexes,Ie,Re)>=0}dispose(){(0,C.AS)(this._onChange)}}B([S.B],Y.prototype,"renderer",null);class ee extends Y{constructor(Ie){super("selected"),this.setAriaSelected=Ie}renderIndex(Ie,dt){super.renderIndex(Ie,dt),this.setAriaSelected&&(this.contains(Ie)?dt.setAttribute("aria-selected","true"):dt.setAttribute("aria-selected","false"))}}class ce{constructor(Ie,dt,ft){this.trait=Ie,this.view=dt,this.identityProvider=ft}splice(Ie,dt,ft){if(!this.identityProvider)return this.trait.splice(Ie,dt,ft.map(()=>!1));const Bt=this.trait.get().map(pt=>this.identityProvider.getId(this.view.element(pt)).toString()),jt=ft.map(pt=>Bt.indexOf(this.identityProvider.getId(pt).toString())>-1);this.trait.splice(Ie,dt,jt)}}function pe(xt){return xt.tagName==="INPUT"||xt.tagName==="TEXTAREA"}function ge(xt){return xt.classList.contains("monaco-editor")?!0:xt.classList.contains("monaco-list")||!xt.parentElement?!1:ge(xt.parentElement)}function fe(xt){return xt.tagName==="A"&&xt.classList.contains("monaco-button")||xt.tagName==="DIV"&&xt.classList.contains("monaco-button-dropdown")?!0:xt.classList.contains("monaco-list")||!xt.parentElement?!1:fe(xt.parentElement)}class oe{constructor(Ie,dt,ft){this.list=Ie,this.view=dt,this.disposables=new C.Cm,this.multipleSelectionDisposables=new C.Cm,this.onKeyDown.filter(Bt=>Bt.keyCode===3).on(this.onEnter,this,this.disposables),this.onKeyDown.filter(Bt=>Bt.keyCode===16).on(this.onUpArrow,this,this.disposables),this.onKeyDown.filter(Bt=>Bt.keyCode===18).on(this.onDownArrow,this,this.disposables),this.onKeyDown.filter(Bt=>Bt.keyCode===11).on(this.onPageUpArrow,this,this.disposables),this.onKeyDown.filter(Bt=>Bt.keyCode===12).on(this.onPageDownArrow,this,this.disposables),this.onKeyDown.filter(Bt=>Bt.keyCode===9).on(this.onEscape,this,this.disposables),ft.multipleSelectionSupport!==!1&&this.onKeyDown.filter(Bt=>(D.zx?Bt.metaKey:Bt.ctrlKey)&&Bt.keyCode===31).on(this.onCtrlA,this,this.multipleSelectionDisposables)}get onKeyDown(){return this.disposables.add(_.Jh.chain(this.disposables.add(new h.f(this.view.domNode,"keydown")).event).filter(Ie=>!pe(Ie.target)).map(Ie=>new te.Z(Ie)))}updateOptions(Ie){Ie.multipleSelectionSupport!==void 0&&(this.multipleSelectionDisposables.clear(),Ie.multipleSelectionSupport&&this.onKeyDown.filter(dt=>(D.zx?dt.metaKey:dt.ctrlKey)&&dt.keyCode===31).on(this.onCtrlA,this,this.multipleSelectionDisposables))}onEnter(Ie){Ie.preventDefault(),Ie.stopPropagation(),this.list.setSelection(this.list.getFocus(),Ie.browserEvent)}onUpArrow(Ie){Ie.preventDefault(),Ie.stopPropagation(),this.list.focusPrevious(1,!1,Ie.browserEvent);const dt=this.list.getFocus()[0];this.list.setAnchor(dt),this.list.reveal(dt),this.view.domNode.focus()}onDownArrow(Ie){Ie.preventDefault(),Ie.stopPropagation(),this.list.focusNext(1,!1,Ie.browserEvent);const dt=this.list.getFocus()[0];this.list.setAnchor(dt),this.list.reveal(dt),this.view.domNode.focus()}onPageUpArrow(Ie){Ie.preventDefault(),Ie.stopPropagation(),this.list.focusPreviousPage(Ie.browserEvent);const dt=this.list.getFocus()[0];this.list.setAnchor(dt),this.list.reveal(dt),this.view.domNode.focus()}onPageDownArrow(Ie){Ie.preventDefault(),Ie.stopPropagation(),this.list.focusNextPage(Ie.browserEvent);const dt=this.list.getFocus()[0];this.list.setAnchor(dt),this.list.reveal(dt),this.view.domNode.focus()}onCtrlA(Ie){Ie.preventDefault(),Ie.stopPropagation(),this.list.setSelection((0,Q.y1)(this.list.length),Ie.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus()}onEscape(Ie){this.list.getSelection().length&&(Ie.preventDefault(),Ie.stopPropagation(),this.list.setSelection([],Ie.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus())}dispose(){this.disposables.dispose(),this.multipleSelectionDisposables.dispose()}}B([S.B],oe.prototype,"onKeyDown",null);var Z;(function(xt){xt[xt.Automatic=0]="Automatic",xt[xt.Trigger=1]="Trigger"})(Z||(Z={}));var le;(function(xt){xt[xt.Idle=0]="Idle",xt[xt.Typing=1]="Typing"})(le||(le={}));const se=new class{mightProducePrintableCharacter(xt){return xt.ctrlKey||xt.metaKey||xt.altKey?!1:xt.keyCode>=31&&xt.keyCode<=56||xt.keyCode>=21&&xt.keyCode<=30||xt.keyCode>=93&&xt.keyCode<=102||xt.keyCode>=80&&xt.keyCode<=90}};class X{constructor(Ie,dt,ft,Bt,jt){this.list=Ie,this.view=dt,this.keyboardNavigationLabelProvider=ft,this.keyboardNavigationEventFilter=Bt,this.delegate=jt,this.enabled=!1,this.state=le.Idle,this.mode=Z.Automatic,this.triggered=!1,this.previouslyFocused=-1,this.enabledDisposables=new C.Cm,this.disposables=new C.Cm,this.updateOptions(Ie.options)}updateOptions(Ie){var dt,ft;!((dt=Ie.typeNavigationEnabled)!==null&&dt!==void 0)||dt?this.enable():this.disable(),this.mode=(ft=Ie.typeNavigationMode)!==null&&ft!==void 0?ft:Z.Automatic}enable(){if(this.enabled)return;let Ie=!1;const dt=this.enabledDisposables.add(_.Jh.chain(this.enabledDisposables.add(new h.f(this.view.domNode,"keydown")).event)).filter(jt=>!pe(jt.target)).filter(()=>this.mode===Z.Automatic||this.triggered).map(jt=>new te.Z(jt)).filter(jt=>Ie||this.keyboardNavigationEventFilter(jt)).filter(jt=>this.delegate.mightProducePrintableCharacter(jt)).forEach(h.j).map(jt=>jt.browserEvent.key).event,ft=_.Jh.debounce(dt,()=>null,800,void 0,void 0,this.enabledDisposables);_.Jh.reduce(_.Jh.any(dt,ft),(jt,pt)=>pt===null?null:(jt||"")+pt,void 0,this.enabledDisposables)(this.onInput,this,this.enabledDisposables),ft(this.onClear,this,this.enabledDisposables),dt(()=>Ie=!0,void 0,this.enabledDisposables),ft(()=>Ie=!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 Ie;const dt=this.list.getFocus();if(dt.length>0&&dt[0]===this.previouslyFocused){const ft=(Ie=this.list.options.accessibilityProvider)===null||Ie===void 0?void 0:Ie.getAriaLabel(this.list.element(dt[0]));ft&&(0,x.xE)(ft)}this.previouslyFocused=-1}onInput(Ie){if(!Ie){this.state=le.Idle,this.triggered=!1;return}const dt=this.list.getFocus(),ft=dt.length>0?dt[0]:0,Bt=this.state===le.Idle?1:0;this.state=le.Typing;for(let jt=0;jt<this.list.length;jt++){const pt=(ft+jt+Bt)%this.list.length,bt=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(this.view.element(pt)),zt=bt&&bt.toString();if(typeof zt>"u"||(0,y.WP)(Ie,zt)){this.previouslyFocused=ft,this.list.setFocus([pt]),this.list.reveal(pt);return}}}dispose(){this.disable(),this.enabledDisposables.dispose(),this.disposables.dispose()}}class K{constructor(Ie,dt){this.list=Ie,this.view=dt,this.disposables=new C.Cm,this.disposables.add(_.Jh.chain(this.disposables.add(new h.f(dt.domNode,"keydown")).event)).filter(Bt=>!pe(Bt.target)).map(Bt=>new te.Z(Bt)).filter(Bt=>Bt.keyCode===2&&!Bt.ctrlKey&&!Bt.metaKey&&!Bt.shiftKey&&!Bt.altKey).on(this.onTab,this,this.disposables)}onTab(Ie){if(Ie.target!==this.view.domNode)return;const dt=this.list.getFocus();if(dt.length===0)return;const ft=this.view.domElement(dt[0]);if(!ft)return;const Bt=ft.querySelector("[tabIndex]");if(!Bt||!(Bt instanceof HTMLElement)||Bt.tabIndex===-1)return;const jt=window.getComputedStyle(Bt);jt.visibility==="hidden"||jt.display==="none"||(Ie.preventDefault(),Ie.stopPropagation(),Bt.focus())}dispose(){this.disposables.dispose()}}function he(xt){return D.zx?xt.browserEvent.metaKey:xt.browserEvent.ctrlKey}function ve(xt){return xt.browserEvent.shiftKey}function Ee(xt){return xt instanceof MouseEvent&&xt.button===2}const O={isSelectionSingleChangeEvent:he,isSelectionRangeChangeEvent:ve};class ot{constructor(Ie){this.list=Ie,this.disposables=new C.Cm,this._onPointer=new _.vl,this.onPointer=this._onPointer.event,Ie.options.multipleSelectionSupport!==!1&&(this.multipleSelectionController=this.list.options.multipleSelectionController||O),this.mouseSupport=typeof Ie.options.mouseSupport>"u"||!!Ie.options.mouseSupport,this.mouseSupport&&(Ie.onMouseDown(this.onMouseDown,this,this.disposables),Ie.onContextMenu(this.onContextMenu,this,this.disposables),Ie.onMouseDblClick(this.onDoubleClick,this,this.disposables),Ie.onTouchStart(this.onMouseDown,this,this.disposables),this.disposables.add($.q.addTarget(Ie.getHTMLElement()))),_.Jh.any(Ie.onMouseClick,Ie.onMouseMiddleClick,Ie.onTap)(this.onViewPointer,this,this.disposables)}updateOptions(Ie){Ie.multipleSelectionSupport!==void 0&&(this.multipleSelectionController=void 0,Ie.multipleSelectionSupport&&(this.multipleSelectionController=this.list.options.multipleSelectionController||O))}isSelectionSingleChangeEvent(Ie){return this.multipleSelectionController?this.multipleSelectionController.isSelectionSingleChangeEvent(Ie):!1}isSelectionRangeChangeEvent(Ie){return this.multipleSelectionController?this.multipleSelectionController.isSelectionRangeChangeEvent(Ie):!1}isSelectionChangeEvent(Ie){return this.isSelectionSingleChangeEvent(Ie)||this.isSelectionRangeChangeEvent(Ie)}onMouseDown(Ie){ge(Ie.browserEvent.target)||document.activeElement!==Ie.browserEvent.target&&this.list.domFocus()}onContextMenu(Ie){if(ge(Ie.browserEvent.target))return;const dt=typeof Ie.index>"u"?[]:[Ie.index];this.list.setFocus(dt,Ie.browserEvent)}onViewPointer(Ie){if(!this.mouseSupport||pe(Ie.browserEvent.target)||ge(Ie.browserEvent.target))return;const dt=Ie.index;if(typeof dt>"u"){this.list.setFocus([],Ie.browserEvent),this.list.setSelection([],Ie.browserEvent),this.list.setAnchor(void 0);return}if(this.isSelectionRangeChangeEvent(Ie))return this.changeSelection(Ie);if(this.isSelectionChangeEvent(Ie))return this.changeSelection(Ie);this.list.setFocus([dt],Ie.browserEvent),this.list.setAnchor(dt),Ee(Ie.browserEvent)||this.list.setSelection([dt],Ie.browserEvent),this._onPointer.fire(Ie)}onDoubleClick(Ie){if(pe(Ie.browserEvent.target)||ge(Ie.browserEvent.target)||this.isSelectionChangeEvent(Ie))return;const dt=this.list.getFocus();this.list.setSelection(dt,Ie.browserEvent)}changeSelection(Ie){const dt=Ie.index;let ft=this.list.getAnchor();if(this.isSelectionRangeChangeEvent(Ie)){if(typeof ft>"u"){const vi=this.list.getFocus()[0];ft=vi??dt,this.list.setAnchor(ft)}const Bt=Math.min(ft,dt),jt=Math.max(ft,dt),pt=(0,Q.y1)(Bt,jt+1),bt=this.list.getSelection(),zt=De(Pe(bt,[ft]),ft);if(zt.length===0)return;const ii=Pe(pt,Ue(bt,zt));this.list.setSelection(ii,Ie.browserEvent),this.list.setFocus([dt],Ie.browserEvent)}else if(this.isSelectionSingleChangeEvent(Ie)){const Bt=this.list.getSelection(),jt=Bt.filter(pt=>pt!==dt);this.list.setFocus([dt]),this.list.setAnchor(dt),Bt.length===jt.length?this.list.setSelection([...jt,dt],Ie.browserEvent):this.list.setSelection(jt,Ie.browserEvent)}}dispose(){this.disposables.dispose()}}class lt{constructor(Ie,dt){this.styleElement=Ie,this.selectorSuffix=dt}style(Ie){const dt=this.selectorSuffix&&`.${this.selectorSuffix}`,ft=[];Ie.listBackground&&(Ie.listBackground.isOpaque()?ft.push(`.monaco-list${dt} .monaco-list-rows { background: ${Ie.listBackground}; }`):D.zx||console.warn(`List with id '${this.selectorSuffix}' was styled with a non-opaque background color. This will break sub-pixel antialiasing.`)),Ie.listFocusBackground&&(ft.push(`.monaco-list${dt}:focus .monaco-list-row.focused { background-color: ${Ie.listFocusBackground}; }`),ft.push(`.monaco-list${dt}:focus .monaco-list-row.focused:hover { background-color: ${Ie.listFocusBackground}; }`)),Ie.listFocusForeground&&ft.push(`.monaco-list${dt}:focus .monaco-list-row.focused { color: ${Ie.listFocusForeground}; }`),Ie.listActiveSelectionBackground&&(ft.push(`.monaco-list${dt}:focus .monaco-list-row.selected { background-color: ${Ie.listActiveSelectionBackground}; }`),ft.push(`.monaco-list${dt}:focus .monaco-list-row.selected:hover { background-color: ${Ie.listActiveSelectionBackground}; }`)),Ie.listActiveSelectionForeground&&ft.push(`.monaco-list${dt}:focus .monaco-list-row.selected { color: ${Ie.listActiveSelectionForeground}; }`),Ie.listActiveSelectionIconForeground&&ft.push(`.monaco-list${dt}:focus .monaco-list-row.selected .codicon { color: ${Ie.listActiveSelectionIconForeground}; }`),Ie.listFocusAndSelectionOutline&&ft.push(`.monaco-list${dt}:focus .monaco-list-row.selected { outline-color: ${Ie.listFocusAndSelectionOutline} !important; }`),Ie.listFocusAndSelectionBackground&&ft.push(` .monaco-drag-image, .monaco-list${dt}:focus .monaco-list-row.selected.focused { background-color: ${Ie.listFocusAndSelectionBackground}; } `),Ie.listFocusAndSelectionForeground&&ft.push(` .monaco-drag-image, .monaco-list${dt}:focus .monaco-list-row.selected.focused { color: ${Ie.listFocusAndSelectionForeground}; } `),Ie.listInactiveFocusForeground&&(ft.push(`.monaco-list${dt} .monaco-list-row.focused { color: ${Ie.listInactiveFocusForeground}; }`),ft.push(`.monaco-list${dt} .monaco-list-row.focused:hover { color: ${Ie.listInactiveFocusForeground}; }`)),Ie.listInactiveSelectionIconForeground&&ft.push(`.monaco-list${dt} .monaco-list-row.focused .codicon { color: ${Ie.listInactiveSelectionIconForeground}; }`),Ie.listInactiveFocusBackground&&(ft.push(`.monaco-list${dt} .monaco-list-row.focused { background-color: ${Ie.listInactiveFocusBackground}; }`),ft.push(`.monaco-list${dt} .monaco-list-row.focused:hover { background-color: ${Ie.listInactiveFocusBackground}; }`)),Ie.listInactiveSelectionBackground&&(ft.push(`.monaco-list${dt} .monaco-list-row.selected { background-color: ${Ie.listInactiveSelectionBackground}; }`),ft.push(`.monaco-list${dt} .monaco-list-row.selected:hover { background-color: ${Ie.listInactiveSelectionBackground}; }`)),Ie.listInactiveSelectionForeground&&ft.push(`.monaco-list${dt} .monaco-list-row.selected { color: ${Ie.listInactiveSelectionForeground}; }`),Ie.listHoverBackground&&ft.push(`.monaco-list${dt}:not(.drop-target) .monaco-list-row:hover:not(.selected):not(.focused) { background-color: ${Ie.listHoverBackground}; }`),Ie.listHoverForeground&&ft.push(`.monaco-list${dt} .monaco-list-row:hover:not(.selected):not(.focused) { color: ${Ie.listHoverForeground}; }`),Ie.listSelectionOutline&&ft.push(`.monaco-list${dt} .monaco-list-row.selected { outline: 1px dotted ${Ie.listSelectionOutline}; outline-offset: -1px; }`),Ie.listFocusOutline&&ft.push(` .monaco-drag-image, .monaco-list${dt}:focus .monaco-list-row.focused { outline: 1px solid ${Ie.listFocusOutline}; outline-offset: -1px; } .monaco-workbench.context-menu-visible .monaco-list${dt}.last-focused .monaco-list-row.focused { outline: 1px solid ${Ie.listFocusOutline}; outline-offset: -1px; } `),Ie.listInactiveFocusOutline&&ft.push(`.monaco-list${dt} .monaco-list-row.focused { outline: 1px dotted ${Ie.listInactiveFocusOutline}; outline-offset: -1px; }`),Ie.listHoverOutline&&ft.push(`.monaco-list${dt} .monaco-list-row:hover { outline: 1px dashed ${Ie.listHoverOutline}; outline-offset: -1px; }`),Ie.listDropBackground&&ft.push(` .monaco-list${dt}.drop-target, .monaco-list${dt} .monaco-list-rows.drop-target, .monaco-list${dt} .monaco-list-row.drop-target { background-color: ${Ie.listDropBackground} !important; color: inherit !important; } `),Ie.tableColumnsBorder&&ft.push(` .monaco-table:hover > .monaco-split-view2, .monaco-table:hover > .monaco-split-view2 .monaco-sash.vertical::before { border-color: ${Ie.tableColumnsBorder}; }`),Ie.tableOddRowsBackgroundColor&&ft.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: ${Ie.tableOddRowsBackgroundColor}; } `),this.styleElement.textContent=ft.join(` `)}}const We={listFocusBackground:z.Q1.fromHex("#7FB0D0"),listActiveSelectionBackground:z.Q1.fromHex("#0E639C"),listActiveSelectionForeground:z.Q1.fromHex("#FFFFFF"),listActiveSelectionIconForeground:z.Q1.fromHex("#FFFFFF"),listFocusAndSelectionOutline:z.Q1.fromHex("#90C2F9"),listFocusAndSelectionBackground:z.Q1.fromHex("#094771"),listFocusAndSelectionForeground:z.Q1.fromHex("#FFFFFF"),listInactiveSelectionBackground:z.Q1.fromHex("#3F3F46"),listInactiveSelectionIconForeground:z.Q1.fromHex("#FFFFFF"),listHoverBackground:z.Q1.fromHex("#2A2D2E"),listDropBackground:z.Q1.fromHex("#383B3D"),treeIndentGuidesStroke:z.Q1.fromHex("#a9a9a9"),tableColumnsBorder:z.Q1.fromHex("#cccccc").transparent(.2),tableOddRowsBackgroundColor:z.Q1.fromHex("#cccccc").transparent(.04)},Ke={keyboardSupport:!0,mouseSupport:!0,multipleSelectionSupport:!0,dnd:{getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){}}};function De(xt,Ie){const dt=xt.indexOf(Ie);if(dt===-1)return[];const ft=[];let Bt=dt-1;for(;Bt>=0&&xt[Bt]===Ie-(dt-Bt);)ft.push(xt[Bt--]);for(ft.reverse(),Bt=dt;Bt<xt.length&&xt[Bt]===Ie+(Bt-dt);)ft.push(xt[Bt++]);return ft}function Pe(xt,Ie){const dt=[];let ft=0,Bt=0;for(;ft<xt.length||Bt<Ie.length;)if(ft>=xt.length)dt.push(Ie[Bt++]);else if(Bt>=Ie.length)dt.push(xt[ft++]);else if(xt[ft]===Ie[Bt]){dt.push(xt[ft]),ft++,Bt++;continue}else xt[ft]<Ie[Bt]?dt.push(xt[ft++]):dt.push(Ie[Bt++]);return dt}function Ue(xt,Ie){const dt=[];let ft=0,Bt=0;for(;ft<xt.length||Bt<Ie.length;)if(ft>=xt.length)dt.push(Ie[Bt++]);else if(Bt>=Ie.length)dt.push(xt[ft++]);else if(xt[ft]===Ie[Bt]){ft++,Bt++;continue}else xt[ft]<Ie[Bt]?dt.push(xt[ft++]):Bt++;return dt}const Re=(xt,Ie)=>xt-Ie;class et{constructor(Ie,dt){this._templateId=Ie,this.renderers=dt}get templateId(){return this._templateId}renderTemplate(Ie){return this.renderers.map(dt=>dt.renderTemplate(Ie))}renderElement(Ie,dt,ft,Bt){let jt=0;for(const pt of this.renderers)pt.renderElement(Ie,dt,ft[jt++],Bt)}disposeElement(Ie,dt,ft,Bt){var jt;let pt=0;for(const bt of this.renderers)(jt=bt.disposeElement)===null||jt===void 0||jt.call(bt,Ie,dt,ft[pt],Bt),pt+=1}disposeTemplate(Ie){let dt=0;for(const ft of this.renderers)ft.disposeTemplate(Ie[dt++])}}class rt{constructor(Ie){this.accessibilityProvider=Ie,this.templateId="a18n"}renderTemplate(Ie){return Ie}renderElement(Ie,dt,ft){const Bt=this.accessibilityProvider.getAriaLabel(Ie);Bt?ft.setAttribute("aria-label",Bt):ft.removeAttribute("aria-label");const jt=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(Ie);typeof jt=="number"?ft.setAttribute("aria-level",`${jt}`):ft.removeAttribute("aria-level")}disposeTemplate(Ie){}}class Lt{constructor(Ie,dt){this.list=Ie,this.dnd=dt}getDragElements(Ie){const dt=this.list.getSelectedElements();return dt.indexOf(Ie)>-1?dt:[Ie]}getDragURI(Ie){return this.dnd.getDragURI(Ie)}getDragLabel(Ie,dt){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(Ie,dt)}onDragStart(Ie,dt){var ft,Bt;(Bt=(ft=this.dnd).onDragStart)===null||Bt===void 0||Bt.call(ft,Ie,dt)}onDragOver(Ie,dt,ft,Bt){return this.dnd.onDragOver(Ie,dt,ft,Bt)}onDragLeave(Ie,dt,ft,Bt){var jt,pt;(pt=(jt=this.dnd).onDragLeave)===null||pt===void 0||pt.call(jt,Ie,dt,ft,Bt)}onDragEnd(Ie){var dt,ft;(ft=(dt=this.dnd).onDragEnd)===null||ft===void 0||ft.call(dt,Ie)}drop(Ie,dt,ft,Bt){this.dnd.drop(Ie,dt,ft,Bt)}}class Dt{constructor(Ie,dt,ft,Bt,jt=Ke){var pt,bt,zt,ii;this.user=Ie,this._options=jt,this.focus=new Y("focused"),this.anchor=new Y("anchor"),this.eventBufferer=new _.at,this._ariaLabel="",this.disposables=new C.Cm,this._onDidDispose=new _.vl,this.onDidDispose=this._onDidDispose.event;const vi=this._options.accessibilityProvider&&this._options.accessibilityProvider.getWidgetRole?(pt=this._options.accessibilityProvider)===null||pt===void 0?void 0:pt.getWidgetRole():"list";this.selection=new ee(vi!=="listbox"),(0,w.co)(jt,We,!1);const Ze=[this.focus.renderer,this.selection.renderer];this.accessibilityProvider=jt.accessibilityProvider,this.accessibilityProvider&&(Ze.push(new rt(this.accessibilityProvider)),(zt=(bt=this.accessibilityProvider).onDidChangeActiveDescendant)===null||zt===void 0||zt.call(bt,this.onDidChangeActiveDescendant,this,this.disposables)),Bt=Bt.map(At=>new et(At.templateId,[...Ze,At]));const _t=Object.assign(Object.assign({},jt),{dnd:jt.dnd&&new Lt(this,jt.dnd)});if(this.view=new N.uO(dt,ft,Bt,_t),this.view.domNode.setAttribute("role",vi),jt.styleController)this.styleController=jt.styleController(this.view.domId);else{const At=(0,I.li)(this.view.domNode);this.styleController=new lt(At,this.view.domId)}if(this.spliceable=new ie([new ce(this.focus,this.view,jt.identityProvider),new ce(this.selection,this.view,jt.identityProvider),new ce(this.anchor,this.view,jt.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 K(this,this.view)),(typeof jt.keyboardSupport!="boolean"||jt.keyboardSupport)&&(this.keyboardController=new oe(this,this.view,jt),this.disposables.add(this.keyboardController)),jt.keyboardNavigationLabelProvider){const At=jt.keyboardNavigationDelegate||se;this.typeNavigationController=new X(this,this.view,jt.keyboardNavigationLabelProvider,(ii=jt.keyboardNavigationEventFilter)!==null&&ii!==void 0?ii:()=>!0,At),this.disposables.add(this.typeNavigationController)}this.mouseController=this.createMouseController(jt),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")}get onDidChangeFocus(){return _.Jh.map(this.eventBufferer.wrapEvent(this.focus.onChange),Ie=>this.toListEvent(Ie),this.disposables)}get onDidChangeSelection(){return _.Jh.map(this.eventBufferer.wrapEvent(this.selection.onChange),Ie=>this.toListEvent(Ie),this.disposables)}get domId(){return this.view.domId}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 onTouchStart(){return this.view.onTouchStart}get onTap(){return this.view.onTap}get onContextMenu(){let Ie=!1;const dt=this.disposables.add(_.Jh.chain(this.disposables.add(new h.f(this.view.domNode,"keydown")).event)).map(jt=>new te.Z(jt)).filter(jt=>Ie=jt.keyCode===58||jt.shiftKey&&jt.keyCode===68).map(h.j).filter(()=>!1).event,ft=this.disposables.add(_.Jh.chain(this.disposables.add(new h.f(this.view.domNode,"keyup")).event)).forEach(()=>Ie=!1).map(jt=>new te.Z(jt)).filter(jt=>jt.keyCode===58||jt.shiftKey&&jt.keyCode===68).map(h.j).map(({browserEvent:jt})=>{const pt=this.getFocus(),bt=pt.length?pt[0]:void 0,zt=typeof bt<"u"?this.view.element(bt):void 0,ii=typeof bt<"u"?this.view.domElement(bt):this.view.domNode;return{index:bt,element:zt,anchor:ii,browserEvent:jt}}).event,Bt=this.disposables.add(_.Jh.chain(this.view.onContextMenu)).filter(jt=>!Ie).map(({element:jt,index:pt,browserEvent:bt})=>({element:jt,index:pt,anchor:{x:bt.pageX+1,y:bt.pageY},browserEvent:bt})).event;return _.Jh.any(dt,ft,Bt)}get onKeyDown(){return this.disposables.add(new h.f(this.view.domNode,"keydown")).event}get onDidFocus(){return _.Jh.signal(this.disposables.add(new h.f(this.view.domNode,"focus",!0)).event)}createMouseController(Ie){return new ot(this)}updateOptions(Ie={}){var dt,ft;this._options=Object.assign(Object.assign({},this._options),Ie),(dt=this.typeNavigationController)===null||dt===void 0||dt.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(Ie),(ft=this.keyboardController)===null||ft===void 0||ft.updateOptions(Ie),this.view.updateOptions(Ie)}get options(){return this._options}splice(Ie,dt,ft=[]){if(Ie<0||Ie>this.view.length)throw new j(this.user,`Invalid start index: ${Ie}`);if(dt<0)throw new j(this.user,`Invalid delete count: ${dt}`);dt===0&&ft.length===0||this.eventBufferer.bufferEvents(()=>this.spliceable.splice(Ie,dt,ft))}rerender(){this.view.rerender()}element(Ie){return this.view.element(Ie)}get length(){return this.view.length}get contentHeight(){return this.view.contentHeight}get scrollTop(){return this.view.getScrollTop()}set scrollTop(Ie){this.view.setScrollTop(Ie)}get ariaLabel(){return this._ariaLabel}set ariaLabel(Ie){this._ariaLabel=Ie,this.view.domNode.setAttribute("aria-label",Ie)}domFocus(){this.view.domNode.focus({preventScroll:!0})}layout(Ie,dt){this.view.layout(Ie,dt)}setSelection(Ie,dt){for(const ft of Ie)if(ft<0||ft>=this.length)throw new j(this.user,`Invalid index ${ft}`);this.selection.set(Ie,dt)}getSelection(){return this.selection.get()}getSelectedElements(){return this.getSelection().map(Ie=>this.view.element(Ie))}setAnchor(Ie){if(typeof Ie>"u"){this.anchor.set([]);return}if(Ie<0||Ie>=this.length)throw new j(this.user,`Invalid index ${Ie}`);this.anchor.set([Ie])}getAnchor(){return(0,Q.Fy)(this.anchor.get(),void 0)}getAnchorElement(){const Ie=this.getAnchor();return typeof Ie>"u"?void 0:this.element(Ie)}setFocus(Ie,dt){for(const ft of Ie)if(ft<0||ft>=this.length)throw new j(this.user,`Invalid index ${ft}`);this.focus.set(Ie,dt)}focusNext(Ie=1,dt=!1,ft,Bt){if(this.length===0)return;const jt=this.focus.get(),pt=this.findNextIndex(jt.length>0?jt[0]+Ie:0,dt,Bt);pt>-1&&this.setFocus([pt],ft)}focusPrevious(Ie=1,dt=!1,ft,Bt){if(this.length===0)return;const jt=this.focus.get(),pt=this.findPreviousIndex(jt.length>0?jt[0]-Ie:0,dt,Bt);pt>-1&&this.setFocus([pt],ft)}focusNextPage(Ie,dt){return T(this,void 0,void 0,function*(){let ft=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);ft=ft===0?0:ft-1;const Bt=this.getFocus()[0];if(Bt!==ft&&(Bt===void 0||ft>Bt)){const jt=this.findPreviousIndex(ft,!1,dt);jt>-1&&Bt!==jt?this.setFocus([jt],Ie):this.setFocus([ft],Ie)}else{const jt=this.view.getScrollTop();let pt=jt+this.view.renderHeight;ft>Bt&&(pt-=this.view.elementHeight(ft)),this.view.setScrollTop(pt),this.view.getScrollTop()!==jt&&(this.setFocus([]),yield(0,J.wR)(0),yield this.focusNextPage(Ie,dt))}})}focusPreviousPage(Ie,dt){return T(this,void 0,void 0,function*(){let ft;const Bt=this.view.getScrollTop();Bt===0?ft=this.view.indexAt(Bt):ft=this.view.indexAfter(Bt-1);const jt=this.getFocus()[0];if(jt!==ft&&(jt===void 0||jt>=ft)){const pt=this.findNextIndex(ft,!1,dt);pt>-1&&jt!==pt?this.setFocus([pt],Ie):this.setFocus([ft],Ie)}else{const pt=Bt;this.view.setScrollTop(Bt-this.view.renderHeight),this.view.getScrollTop()!==pt&&(this.setFocus([]),yield(0,J.wR)(0),yield this.focusPreviousPage(Ie,dt))}})}focusLast(Ie,dt){if(this.length===0)return;const ft=this.findPreviousIndex(this.length-1,!1,dt);ft>-1&&this.setFocus([ft],Ie)}focusFirst(Ie,dt){this.focusNth(0,Ie,dt)}focusNth(Ie,dt,ft){if(this.length===0)return;const Bt=this.findNextIndex(Ie,!1,ft);Bt>-1&&this.setFocus([Bt],dt)}findNextIndex(Ie,dt=!1,ft){for(let Bt=0;Bt<this.length;Bt++){if(Ie>=this.length&&!dt)return-1;if(Ie=Ie%this.length,!ft||ft(this.element(Ie)))return Ie;Ie++}return-1}findPreviousIndex(Ie,dt=!1,ft){for(let Bt=0;Bt<this.length;Bt++){if(Ie<0&&!dt)return-1;if(Ie=(this.length+Ie%this.length)%this.length,!ft||ft(this.element(Ie)))return Ie;Ie--}return-1}getFocus(){return this.focus.get()}getFocusedElements(){return this.getFocus().map(Ie=>this.view.element(Ie))}reveal(Ie,dt){if(Ie<0||Ie>=this.length)throw new j(this.user,`Invalid index ${Ie}`);const ft=this.view.getScrollTop(),Bt=this.view.elementTop(Ie),jt=this.view.elementHeight(Ie);if((0,L.Et)(dt)){const pt=jt-this.view.renderHeight;this.view.setScrollTop(pt*(0,d.qE)(dt,0,1)+Bt)}else{const pt=Bt+jt,bt=ft+this.view.renderHeight;Bt<ft&&pt>=bt||(Bt<ft||pt>=bt&&jt>=this.view.renderHeight?this.view.setScrollTop(Bt):pt>=bt&&this.view.setScrollTop(pt-this.view.renderHeight))}}getHTMLElement(){return this.view.domNode}getElementID(Ie){return this.view.getElementDomId(Ie)}style(Ie){this.styleController.style(Ie)}toListEvent({indexes:Ie,browserEvent:dt}){return{indexes:Ie,elements:Ie.map(ft=>this.view.element(ft)),browserEvent:dt}}_onFocusChange(){const Ie=this.focus.get();this.view.domNode.classList.toggle("element-focused",Ie.length>0),this.onDidChangeActiveDescendant()}onDidChangeActiveDescendant(){var Ie;const dt=this.focus.get();if(dt.length>0){let ft;!((Ie=this.accessibilityProvider)===null||Ie===void 0)&&Ie.getActiveDescendantId&&(ft=this.accessibilityProvider.getActiveDescendantId(this.view.element(dt[0]))),this.view.domNode.setAttribute("aria-activedescendant",ft||this.view.getElementDomId(dt[0]))}else this.view.domNode.removeAttribute("aria-activedescendant")}_onSelectionChange(){const Ie=this.selection.get();this.view.domNode.classList.toggle("selection-none",Ie.length===0),this.view.domNode.classList.toggle("selection-single",Ie.length===1),this.view.domNode.classList.toggle("selection-multiple",Ie.length>1)}dispose(){this._onDidDispose.fire(),this.disposables.dispose(),this._onDidDispose.dispose()}}B([S.B],Dt.prototype,"onDidChangeFocus",null),B([S.B],Dt.prototype,"onDidChangeSelection",null),B([S.B],Dt.prototype,"onContextMenu",null),B([S.B],Dt.prototype,"onKeyDown",null),B([S.B],Dt.prototype,"onDidFocus",null)},68107:(Tt,Fe,f)=>{f.d(Fe,{S:()=>h});var I=f(65865);const h="monaco-mouse-cursor-text"},86843:(Tt,Fe,f)=>{f.d(Fe,{B:()=>y,m:()=>B});var I=f(59095),h=f(34061),te=f(30474),$=f(65958),x=f(88846),ie=f(2106),Q=f(10998),J=f(63339),z=f(85329),S=function(T,H,Y,ee){var ce=arguments.length,pe=ce<3?H:ee===null?ee=Object.getOwnPropertyDescriptor(H,Y):ee,ge;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")pe=Reflect.decorate(T,H,Y,ee);else for(var fe=T.length-1;fe>=0;fe--)(ge=T[fe])&&(pe=(ce<3?ge(pe):ce>3?ge(H,Y,pe):ge(H,Y))||pe);return ce>3&&pe&&Object.defineProperty(H,Y,pe),pe};const _=!1;var y;(function(T){T.North="north",T.South="south",T.East="east",T.West="west"})(y||(y={}));let C=4;const d=new ie.vl;let w=300;const D=new ie.vl;class L{constructor(){this.disposables=new Q.Cm}get onPointerMove(){return this.disposables.add(new h.f(window,"mousemove")).event}get onPointerUp(){return this.disposables.add(new h.f(window,"mouseup")).event}dispose(){this.disposables.dispose()}}S([x.B],L.prototype,"onPointerMove",null),S([x.B],L.prototype,"onPointerUp",null);class k{constructor(H){this.el=H,this.disposables=new Q.Cm}get onPointerMove(){return this.disposables.add(new h.f(this.el,te.B.Change)).event}get onPointerUp(){return this.disposables.add(new h.f(this.el,te.B.End)).event}dispose(){this.disposables.dispose()}}S([x.B],k.prototype,"onPointerMove",null),S([x.B],k.prototype,"onPointerUp",null);class j{constructor(H){this.factory=H}get onPointerMove(){return this.factory.onPointerMove}get onPointerUp(){return this.factory.onPointerUp}dispose(){}}S([x.B],j.prototype,"onPointerMove",null),S([x.B],j.prototype,"onPointerUp",null);const N="pointer-events-disabled";class B extends Q.jG{constructor(H,Y,ee){super(),this.hoverDelay=w,this.hoverDelayer=this._register(new $.ve(this.hoverDelay)),this._state=3,this.onDidEnablementChange=this._register(new ie.vl),this._onDidStart=this._register(new ie.vl),this._onDidChange=this._register(new ie.vl),this._onDidReset=this._register(new ie.vl),this._onDidEnd=this._register(new ie.vl),this.orthogonalStartSashDisposables=this._register(new Q.Cm),this.orthogonalStartDragHandleDisposables=this._register(new Q.Cm),this.orthogonalEndSashDisposables=this._register(new Q.Cm),this.orthogonalEndDragHandleDisposables=this._register(new Q.Cm),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=(0,I.BC)(H,(0,I.$)(".monaco-sash")),ee.orthogonalEdge&&this.el.classList.add(`orthogonal-edge-${ee.orthogonalEdge}`),J.zx&&this.el.classList.add("mac");const ce=this._register(new h.f(this.el,"mousedown")).event;this._register(ce(se=>this.onPointerStart(se,new L),this));const pe=this._register(new h.f(this.el,"dblclick")).event;this._register(pe(this.onPointerDoublePress,this));const ge=this._register(new h.f(this.el,"mouseenter")).event;this._register(ge(()=>B.onMouseEnter(this)));const fe=this._register(new h.f(this.el,"mouseleave")).event;this._register(fe(()=>B.onMouseLeave(this))),this._register(te.q.addTarget(this.el));const oe=ie.Jh.map(this._register(new h.f(this.el,te.B.Start)).event,se=>{var X;return Object.assign(Object.assign({},se),{target:(X=se.initialTarget)!==null&&X!==void 0?X:null})});this._register(oe(se=>this.onPointerStart(se,new k(this.el)),this));const Z=this._register(new h.f(this.el,te.B.Tap)).event,le=ie.Jh.map(ie.Jh.filter(ie.Jh.debounce(Z,(se,X)=>{var K;return{event:X,count:((K=se?.count)!==null&&K!==void 0?K:0)+1}},250),({count:se})=>se===2),({event:se})=>{var X;return Object.assign(Object.assign({},se),{target:(X=se.initialTarget)!==null&&X!==void 0?X:null})});this._register(le(this.onPointerDoublePress,this)),typeof ee.size=="number"?(this.size=ee.size,ee.orientation===0?this.el.style.width=`${this.size}px`:this.el.style.height=`${this.size}px`):(this.size=C,this._register(d.event(se=>{this.size=se,this.layout()}))),this._register(D.event(se=>this.hoverDelay=se)),this.layoutProvider=Y,this.orthogonalStartSash=ee.orthogonalStartSash,this.orthogonalEndSash=ee.orthogonalEndSash,this.orientation=ee.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",_),this.layout()}get state(){return this._state}get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}set state(H){this._state!==H&&(this.el.classList.toggle("disabled",H===0),this.el.classList.toggle("minimum",H===1),this.el.classList.toggle("maximum",H===2),this._state=H,this.onDidEnablementChange.fire(H))}set orthogonalStartSash(H){if(this.orthogonalStartDragHandleDisposables.clear(),this.orthogonalStartSashDisposables.clear(),H){const Y=ee=>{this.orthogonalStartDragHandleDisposables.clear(),ee!==0&&(this._orthogonalStartDragHandle=(0,I.BC)(this.el,(0,I.$)(".orthogonal-drag-handle.start")),this.orthogonalStartDragHandleDisposables.add((0,Q.s)(()=>this._orthogonalStartDragHandle.remove())),this.orthogonalStartDragHandleDisposables.add(new h.f(this._orthogonalStartDragHandle,"mouseenter")).event(()=>B.onMouseEnter(H),void 0,this.orthogonalStartDragHandleDisposables),this.orthogonalStartDragHandleDisposables.add(new h.f(this._orthogonalStartDragHandle,"mouseleave")).event(()=>B.onMouseLeave(H),void 0,this.orthogonalStartDragHandleDisposables))};this.orthogonalStartSashDisposables.add(H.onDidEnablementChange.event(Y,this)),Y(H.state)}this._orthogonalStartSash=H}set orthogonalEndSash(H){if(this.orthogonalEndDragHandleDisposables.clear(),this.orthogonalEndSashDisposables.clear(),H){const Y=ee=>{this.orthogonalEndDragHandleDisposables.clear(),ee!==0&&(this._orthogonalEndDragHandle=(0,I.BC)(this.el,(0,I.$)(".orthogonal-drag-handle.end")),this.orthogonalEndDragHandleDisposables.add((0,Q.s)(()=>this._orthogonalEndDragHandle.remove())),this.orthogonalEndDragHandleDisposables.add(new h.f(this._orthogonalEndDragHandle,"mouseenter")).event(()=>B.onMouseEnter(H),void 0,this.orthogonalEndDragHandleDisposables),this.orthogonalEndDragHandleDisposables.add(new h.f(this._orthogonalEndDragHandle,"mouseleave")).event(()=>B.onMouseLeave(H),void 0,this.orthogonalEndDragHandleDisposables))};this.orthogonalEndSashDisposables.add(H.onDidEnablementChange.event(Y,this)),Y(H.state)}this._orthogonalEndSash=H}onPointerStart(H,Y){I.fs.stop(H);let ee=!1;if(!H.__orthogonalSashEvent){const he=this.getOrthogonalSash(H);he&&(ee=!0,H.__orthogonalSashEvent=!0,he.onPointerStart(H,new j(Y)))}if(this.linkedSash&&!H.__linkedSashEvent&&(H.__linkedSashEvent=!0,this.linkedSash.onPointerStart(H,new j(Y))),!this.state)return;const ce=(0,I.yB)("iframe");for(const he of ce)he.classList.add(N);const pe=H.pageX,ge=H.pageY,fe=H.altKey,oe={startX:pe,currentX:pe,startY:ge,currentY:ge,altKey:fe};this.el.classList.add("active"),this._onDidStart.fire(oe);const Z=(0,I.li)(this.el),le=()=>{let he="";ee?he="all-scroll":this.orientation===1?this.state===1?he="s-resize":this.state===2?he="n-resize":he=J.zx?"row-resize":"ns-resize":this.state===1?he="e-resize":this.state===2?he="w-resize":he=J.zx?"col-resize":"ew-resize",Z.textContent=`* { cursor: ${he} !important; }`},se=new Q.Cm;le(),ee||this.onDidEnablementChange.event(le,null,se);const X=he=>{I.fs.stop(he,!1);const ve={startX:pe,currentX:he.pageX,startY:ge,currentY:he.pageY,altKey:fe};this._onDidChange.fire(ve)},K=he=>{I.fs.stop(he,!1),this.el.removeChild(Z),this.el.classList.remove("active"),this._onDidEnd.fire(),se.dispose();for(const ve of ce)ve.classList.remove(N)};Y.onPointerMove(X,null,se),Y.onPointerUp(K,null,se),se.add(Y)}onPointerDoublePress(H){const Y=this.getOrthogonalSash(H);Y&&Y._onDidReset.fire(),this.linkedSash&&this.linkedSash._onDidReset.fire(),this._onDidReset.fire()}static onMouseEnter(H,Y=!1){H.el.classList.contains("active")?(H.hoverDelayer.cancel(),H.el.classList.add("hover")):H.hoverDelayer.trigger(()=>H.el.classList.add("hover"),H.hoverDelay).then(void 0,()=>{}),!Y&&H.linkedSash&&B.onMouseEnter(H.linkedSash,!0)}static onMouseLeave(H,Y=!1){H.hoverDelayer.cancel(),H.el.classList.remove("hover"),!Y&&H.linkedSash&&B.onMouseLeave(H.linkedSash,!0)}clearSashHoverState(){B.onMouseLeave(this)}layout(){if(this.orientation===0){const H=this.layoutProvider;this.el.style.left=H.getVerticalSashLeft(this)-this.size/2+"px",H.getVerticalSashTop&&(this.el.style.top=H.getVerticalSashTop(this)+"px"),H.getVerticalSashHeight&&(this.el.style.height=H.getVerticalSashHeight(this)+"px")}else{const H=this.layoutProvider;this.el.style.top=H.getHorizontalSashTop(this)-this.size/2+"px",H.getHorizontalSashLeft&&(this.el.style.left=H.getHorizontalSashLeft(this)+"px"),H.getHorizontalSashWidth&&(this.el.style.width=H.getHorizontalSashWidth(this)+"px")}}getOrthogonalSash(H){if(!(!H.target||!(H.target instanceof HTMLElement))&&H.target.classList.contains("orthogonal-drag-handle"))return H.target.classList.contains("start")?this.orthogonalStartSash:this.orthogonalEndSash}dispose(){super.dispose(),this.el.remove()}}},63781:(Tt,Fe,f)=>{f.d(Fe,{MU:()=>Z,Se:()=>fe,oO:()=>oe});var I=f(55893),h=f(59095),te=f(5043),$=f(9715),x=f(10176),ie=f(45222),Q=f(65958);const J=11;class z extends ie.x{constructor(X){super(),this._onActivate=X.onActivate,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",this.bgDomNode.style.width=X.bgWidth+"px",this.bgDomNode.style.height=X.bgHeight+"px",typeof X.top<"u"&&(this.bgDomNode.style.top="0px"),typeof X.left<"u"&&(this.bgDomNode.style.left="0px"),typeof X.bottom<"u"&&(this.bgDomNode.style.bottom="0px"),typeof X.right<"u"&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=X.className,this.domNode.classList.add(...X.icon.classNamesArray),this.domNode.style.position="absolute",this.domNode.style.width=J+"px",this.domNode.style.height=J+"px",typeof X.top<"u"&&(this.domNode.style.top=X.top+"px"),typeof X.left<"u"&&(this.domNode.style.left=X.left+"px"),typeof X.bottom<"u"&&(this.domNode.style.bottom=X.bottom+"px"),typeof X.right<"u"&&(this.domNode.style.right=X.right+"px"),this._pointerMoveMonitor=this._register(new x._),this._register(h.b2(this.bgDomNode,h.Bx.POINTER_DOWN,K=>this._arrowPointerDown(K))),this._register(h.b2(this.domNode,h.Bx.POINTER_DOWN,K=>this._arrowPointerDown(K))),this._pointerdownRepeatTimer=this._register(new Q.vb),this._pointerdownScheduleRepeatTimer=this._register(new Q.pc)}_arrowPointerDown(X){if(!X.target||!(X.target instanceof Element))return;const K=()=>{this._pointerdownRepeatTimer.cancelAndSet(()=>this._onActivate(),1e3/24)};this._onActivate(),this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancelAndSet(K,200),this._pointerMoveMonitor.startMonitoring(X.target,X.pointerId,X.buttons,he=>{},()=>{this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancel()}),X.preventDefault()}}var S=f(10998);class _ extends S.jG{constructor(X,K,he){super(),this._visibility=X,this._visibleClassName=K,this._invisibleClassName=he,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._rawShouldBeVisible=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new Q.pc)}setVisibility(X){this._visibility!==X&&(this._visibility=X,this._updateShouldBeVisible())}setShouldBeVisible(X){this._rawShouldBeVisible=X,this._updateShouldBeVisible()}_applyVisibilitySetting(){return this._visibility===2?!1:this._visibility===3?!0:this._rawShouldBeVisible}_updateShouldBeVisible(){const X=this._applyVisibilitySetting();this._shouldBeVisible!==X&&(this._shouldBeVisible=X,this.ensureVisibility())}setIsNeeded(X){this._isNeeded!==X&&(this._isNeeded=X,this.ensureVisibility())}setDomNode(X){this._domNode=X,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 X;(X=this._domNode)===null||X===void 0||X.setClassName(this._visibleClassName)},0))}_hide(X){var K;this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,(K=this._domNode)===null||K===void 0||K.setClassName(this._invisibleClassName+(X?" fade":"")))}}var y=f(63339);const C=140;class d extends ie.x{constructor(X){super(),this._lazyRender=X.lazyRender,this._host=X.host,this._scrollable=X.scrollable,this._scrollByPage=X.scrollByPage,this._scrollbarState=X.scrollbarState,this._visibilityController=this._register(new _(X.visibility,"visible scrollbar "+X.extraScrollbarClassName,"invisible scrollbar "+X.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._pointerMoveMonitor=this._register(new x._),this._shouldRender=!0,this.domNode=(0,te.Z)(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(h.ko(this.domNode.domNode,h.Bx.POINTER_DOWN,K=>this._domNodePointerDown(K)))}_createArrow(X){const K=this._register(new z(X));this.domNode.domNode.appendChild(K.bgDomNode),this.domNode.domNode.appendChild(K.domNode)}_createSlider(X,K,he,ve){this.slider=(0,te.Z)(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(X),this.slider.setLeft(K),typeof he=="number"&&this.slider.setWidth(he),typeof ve=="number"&&this.slider.setHeight(ve),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this._register(h.ko(this.slider.domNode,h.Bx.POINTER_DOWN,Ee=>{Ee.button===0&&(Ee.preventDefault(),this._sliderPointerDown(Ee))})),this.onclick(this.slider.domNode,Ee=>{Ee.leftButton&&Ee.stopPropagation()})}_onElementSize(X){return this._scrollbarState.setVisibleSize(X)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(X){return this._scrollbarState.setScrollSize(X)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(X){return this._scrollbarState.setScrollPosition(X)&&(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(X){X.target===this.domNode.domNode&&this._onPointerDown(X)}delegatePointerDown(X){const K=this.domNode.domNode.getClientRects()[0].top,he=K+this._scrollbarState.getSliderPosition(),ve=K+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),Ee=this._sliderPointerPosition(X);he<=Ee&&Ee<=ve?X.button===0&&(X.preventDefault(),this._sliderPointerDown(X)):this._onPointerDown(X)}_onPointerDown(X){let K,he;if(X.target===this.domNode.domNode&&typeof X.offsetX=="number"&&typeof X.offsetY=="number")K=X.offsetX,he=X.offsetY;else{const Ee=h.BK(this.domNode.domNode);K=X.pageX-Ee.left,he=X.pageY-Ee.top}const ve=this._pointerDownRelativePosition(K,he);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(ve):this._scrollbarState.getDesiredScrollPositionFromOffset(ve)),X.button===0&&(X.preventDefault(),this._sliderPointerDown(X))}_sliderPointerDown(X){if(!X.target||!(X.target instanceof Element))return;const K=this._sliderPointerPosition(X),he=this._sliderOrthogonalPointerPosition(X),ve=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._pointerMoveMonitor.startMonitoring(X.target,X.pointerId,X.buttons,Ee=>{const O=this._sliderOrthogonalPointerPosition(Ee),ot=Math.abs(O-he);if(y.uF&&ot>C){this._setDesiredScrollPositionNow(ve.getScrollPosition());return}const We=this._sliderPointerPosition(Ee)-K;this._setDesiredScrollPositionNow(ve.getDesiredScrollPositionFromDelta(We))},()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd()}),this._host.onDragStart()}_setDesiredScrollPositionNow(X){const K={};this.writeScrollPosition(K,X),this._scrollable.setScrollPositionNow(K)}updateScrollbarSize(X){this._updateScrollbarSize(X),this._scrollbarState.setScrollbarSize(X),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}}const w=20;class D{constructor(X,K,he,ve,Ee,O){this._scrollbarSize=Math.round(K),this._oppositeScrollbarSize=Math.round(he),this._arrowSize=Math.round(X),this._visibleSize=ve,this._scrollSize=Ee,this._scrollPosition=O,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new D(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(X){const K=Math.round(X);return this._visibleSize!==K?(this._visibleSize=K,this._refreshComputedValues(),!0):!1}setScrollSize(X){const K=Math.round(X);return this._scrollSize!==K?(this._scrollSize=K,this._refreshComputedValues(),!0):!1}setScrollPosition(X){const K=Math.round(X);return this._scrollPosition!==K?(this._scrollPosition=K,this._refreshComputedValues(),!0):!1}setScrollbarSize(X){this._scrollbarSize=Math.round(X)}setOppositeScrollbarSize(X){this._oppositeScrollbarSize=Math.round(X)}static _computeValues(X,K,he,ve,Ee){const O=Math.max(0,he-X),ot=Math.max(0,O-2*K),lt=ve>0&&ve>he;if(!lt)return{computedAvailableSize:Math.round(O),computedIsNeeded:lt,computedSliderSize:Math.round(ot),computedSliderRatio:0,computedSliderPosition:0};const We=Math.round(Math.max(w,Math.floor(he*ot/ve))),Ke=(ot-We)/(ve-he),De=Ee*Ke;return{computedAvailableSize:Math.round(O),computedIsNeeded:lt,computedSliderSize:Math.round(We),computedSliderRatio:Ke,computedSliderPosition:Math.round(De)}}_refreshComputedValues(){const X=D._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=X.computedAvailableSize,this._computedIsNeeded=X.computedIsNeeded,this._computedSliderSize=X.computedSliderSize,this._computedSliderRatio=X.computedSliderRatio,this._computedSliderPosition=X.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(X){if(!this._computedIsNeeded)return 0;const K=X-this._arrowSize-this._computedSliderSize/2;return Math.round(K/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(X){if(!this._computedIsNeeded)return 0;const K=X-this._arrowSize;let he=this._scrollPosition;return K<this._computedSliderPosition?he-=this._visibleSize:he+=this._visibleSize,he}getDesiredScrollPositionFromDelta(X){if(!this._computedIsNeeded)return 0;const K=this._computedSliderPosition+X;return Math.round(K/this._computedSliderRatio)}}var L=f(26048);class k extends d{constructor(X,K,he){const ve=X.getScrollDimensions(),Ee=X.getCurrentScrollPosition();if(super({lazyRender:K.lazyRender,host:he,scrollbarState:new D(K.horizontalHasArrows?K.arrowSize:0,K.horizontal===2?0:K.horizontalScrollbarSize,K.vertical===2?0:K.verticalScrollbarSize,ve.width,ve.scrollWidth,Ee.scrollLeft),visibility:K.horizontal,extraScrollbarClassName:"horizontal",scrollable:X,scrollByPage:K.scrollByPage}),K.horizontalHasArrows){const O=(K.arrowSize-J)/2,ot=(K.horizontalScrollbarSize-J)/2;this._createArrow({className:"scra",icon:L.W6.scrollbarButtonLeft,top:ot,left:O,bottom:void 0,right:void 0,bgWidth:K.arrowSize,bgHeight:K.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new $.$(null,1,0))}),this._createArrow({className:"scra",icon:L.W6.scrollbarButtonRight,top:ot,left:void 0,bottom:void 0,right:O,bgWidth:K.arrowSize,bgHeight:K.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new $.$(null,-1,0))})}this._createSlider(Math.floor((K.horizontalScrollbarSize-K.horizontalSliderSize)/2),0,void 0,K.horizontalSliderSize)}_updateSlider(X,K){this.slider.setWidth(X),this.slider.setLeft(K)}_renderDomNode(X,K){this.domNode.setWidth(X),this.domNode.setHeight(K),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(X){return this._shouldRender=this._onElementScrollSize(X.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(X.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(X.width)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(X,K){return X}_sliderPointerPosition(X){return X.pageX}_sliderOrthogonalPointerPosition(X){return X.pageY}_updateScrollbarSize(X){this.slider.setHeight(X)}writeScrollPosition(X,K){X.scrollLeft=K}updateOptions(X){this.updateScrollbarSize(X.horizontal===2?0:X.horizontalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(X.vertical===2?0:X.verticalScrollbarSize),this._visibilityController.setVisibility(X.horizontal),this._scrollByPage=X.scrollByPage}}class j extends d{constructor(X,K,he){const ve=X.getScrollDimensions(),Ee=X.getCurrentScrollPosition();if(super({lazyRender:K.lazyRender,host:he,scrollbarState:new D(K.verticalHasArrows?K.arrowSize:0,K.vertical===2?0:K.verticalScrollbarSize,0,ve.height,ve.scrollHeight,Ee.scrollTop),visibility:K.vertical,extraScrollbarClassName:"vertical",scrollable:X,scrollByPage:K.scrollByPage}),K.verticalHasArrows){const O=(K.arrowSize-J)/2,ot=(K.verticalScrollbarSize-J)/2;this._createArrow({className:"scra",icon:L.W6.scrollbarButtonUp,top:O,left:ot,bottom:void 0,right:void 0,bgWidth:K.verticalScrollbarSize,bgHeight:K.arrowSize,onActivate:()=>this._host.onMouseWheel(new $.$(null,0,1))}),this._createArrow({className:"scra",icon:L.W6.scrollbarButtonDown,top:void 0,left:ot,bottom:O,right:void 0,bgWidth:K.verticalScrollbarSize,bgHeight:K.arrowSize,onActivate:()=>this._host.onMouseWheel(new $.$(null,0,-1))})}this._createSlider(0,Math.floor((K.verticalScrollbarSize-K.verticalSliderSize)/2),K.verticalSliderSize,void 0)}_updateSlider(X,K){this.slider.setHeight(X),this.slider.setTop(K)}_renderDomNode(X,K){this.domNode.setWidth(K),this.domNode.setHeight(X),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(X){return this._shouldRender=this._onElementScrollSize(X.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(X.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(X.height)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(X,K){return K}_sliderPointerPosition(X){return X.pageY}_sliderOrthogonalPointerPosition(X){return X.pageX}_updateScrollbarSize(X){this.slider.setWidth(X)}writeScrollPosition(X,K){X.scrollTop=K}updateOptions(X){this.updateScrollbarSize(X.vertical===2?0:X.verticalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(0),this._visibilityController.setVisibility(X.vertical),this._scrollByPage=X.scrollByPage}}var N=f(2106),B=f(94513),T=f(917);const H=500,Y=50,ee=!0;class ce{constructor(X,K,he){this.timestamp=X,this.deltaX=K,this.deltaY=he,this.score=0}}class pe{constructor(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}isPhysicalMouseWheel(){if(this._front===-1&&this._rear===-1)return!1;let X=1,K=0,he=1,ve=this._rear;do{const Ee=ve===this._front?X:Math.pow(2,-he);if(X-=Ee,K+=this._memory[ve].score*Ee,ve===this._front)break;ve=(this._capacity+ve-1)%this._capacity,he++}while(!0);return K<=.5}accept(X,K,he){const ve=new ce(X,K,he);ve.score=this._computeScore(ve),this._front===-1&&this._rear===-1?(this._memory[0]=ve,this._front=0,this._rear=0):(this._rear=(this._rear+1)%this._capacity,this._rear===this._front&&(this._front=(this._front+1)%this._capacity),this._memory[this._rear]=ve)}_computeScore(X){if(Math.abs(X.deltaX)>0&&Math.abs(X.deltaY)>0)return 1;let K=.5;const he=this._front===-1&&this._rear===-1?null:this._memory[this._rear];return(!this._isAlmostInt(X.deltaX)||!this._isAlmostInt(X.deltaY))&&(K+=.25),Math.min(Math.max(K,0),1)}_isAlmostInt(X){return Math.abs(Math.round(X)-X)<.01}}pe.INSTANCE=new pe;class ge extends ie.x{constructor(X,K,he){super(),this._onScroll=this._register(new N.vl),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new N.vl),X.style.overflow="hidden",this._options=le(K),this._scrollable=he,this._register(this._scrollable.onScroll(Ee=>{this._onWillScroll.fire(Ee),this._onDidScroll(Ee),this._onScroll.fire(Ee)}));const ve={onMouseWheel:Ee=>this._onMouseWheel(Ee),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new j(this._scrollable,this._options,ve)),this._horizontalScrollbar=this._register(new k(this._scrollable,this._options,ve)),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(X),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=(0,te.Z)(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=(0,te.Z)(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=(0,te.Z)(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,Ee=>this._onMouseOver(Ee)),this.onmouseleave(this._listenOnDomNode,Ee=>this._onMouseLeave(Ee)),this._hideTimeout=this._register(new Q.pc),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}get options(){return this._options}dispose(){this._mouseWheelToDispose=(0,S.AS)(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarPointerDown(X){this._verticalScrollbar.delegatePointerDown(X)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(X){this._scrollable.setScrollDimensions(X,!1)}updateClassName(X){this._options.className=X,y.zx&&(this._options.className+=" mac"),this._domNode.className="monaco-scrollable-element "+this._options.className}updateOptions(X){typeof X.handleMouseWheel<"u"&&(this._options.handleMouseWheel=X.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),typeof X.mouseWheelScrollSensitivity<"u"&&(this._options.mouseWheelScrollSensitivity=X.mouseWheelScrollSensitivity),typeof X.fastScrollSensitivity<"u"&&(this._options.fastScrollSensitivity=X.fastScrollSensitivity),typeof X.scrollPredominantAxis<"u"&&(this._options.scrollPredominantAxis=X.scrollPredominantAxis),typeof X.horizontal<"u"&&(this._options.horizontal=X.horizontal),typeof X.vertical<"u"&&(this._options.vertical=X.vertical),typeof X.horizontalScrollbarSize<"u"&&(this._options.horizontalScrollbarSize=X.horizontalScrollbarSize),typeof X.verticalScrollbarSize<"u"&&(this._options.verticalScrollbarSize=X.verticalScrollbarSize),typeof X.scrollByPage<"u"&&(this._options.scrollByPage=X.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}_setListeningToMouseWheel(X){if(this._mouseWheelToDispose.length>0!==X&&(this._mouseWheelToDispose=(0,S.AS)(this._mouseWheelToDispose),X)){const he=ve=>{this._onMouseWheel(new $.$(ve))};this._mouseWheelToDispose.push(h.ko(this._listenOnDomNode,h.Bx.MOUSE_WHEEL,he,{passive:!1}))}}_onMouseWheel(X){const K=pe.INSTANCE;if(ee){const Ee=window.devicePixelRatio/(0,I.getZoomFactor)();y.uF||y.j9?K.accept(Date.now(),X.deltaX/Ee,X.deltaY/Ee):K.accept(Date.now(),X.deltaX,X.deltaY)}let he=!1;if(X.deltaY||X.deltaX){let Ee=X.deltaY*this._options.mouseWheelScrollSensitivity,O=X.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(Math.abs(Ee)>=Math.abs(O)?O=0:Ee=0),this._options.flipAxes&&([Ee,O]=[O,Ee]);const ot=!y.zx&&X.browserEvent&&X.browserEvent.shiftKey;(this._options.scrollYToX||ot)&&!O&&(O=Ee,Ee=0),X.browserEvent&&X.browserEvent.altKey&&(O=O*this._options.fastScrollSensitivity,Ee=Ee*this._options.fastScrollSensitivity);const lt=this._scrollable.getFutureScrollPosition();let We={};if(Ee){const Ke=Y*Ee,De=lt.scrollTop-(Ke<0?Math.floor(Ke):Math.ceil(Ke));this._verticalScrollbar.writeScrollPosition(We,De)}if(O){const Ke=Y*O,De=lt.scrollLeft-(Ke<0?Math.floor(Ke):Math.ceil(Ke));this._horizontalScrollbar.writeScrollPosition(We,De)}We=this._scrollable.validateScrollPosition(We),(lt.scrollLeft!==We.scrollLeft||lt.scrollTop!==We.scrollTop)&&(ee&&this._options.mouseWheelSmoothScroll&&K.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(We):this._scrollable.setScrollPositionNow(We),he=!0)}let ve=he;!ve&&this._options.alwaysConsumeMouseWheel&&(ve=!0),!ve&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(ve=!0),ve&&(X.preventDefault(),X.stopPropagation())}_onDidScroll(X){this._shouldRender=this._horizontalScrollbar.onDidScroll(X)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(X)||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 X=this._scrollable.getCurrentScrollPosition(),K=X.scrollTop>0,he=X.scrollLeft>0,ve=he?" left":"",Ee=K?" top":"",O=he||K?" top-left-corner":"";this._leftShadowDomNode.setClassName(`shadow${ve}`),this._topShadowDomNode.setClassName(`shadow${Ee}`),this._topLeftShadowDomNode.setClassName(`shadow${O}${Ee}${ve}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseLeave(X){this._mouseIsOver=!1,this._hide()}_onMouseOver(X){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(),H)}}class fe extends ge{constructor(X,K){K=K||{},K.mouseWheelSmoothScroll=!1;const he=new B.yE({forceIntegerValues:!0,smoothScrollDuration:0,scheduleAtNextAnimationFrame:ve=>h.PG(ve)});super(X,K,he),this._register(he)}setScrollPosition(X){this._scrollable.setScrollPositionNow(X)}}class oe extends ge{constructor(X,K,he){super(X,K,he)}setScrollPosition(X){X.reuseAnimation?this._scrollable.setScrollPositionSmooth(X,X.reuseAnimation):this._scrollable.setScrollPositionNow(X)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}}class Z extends ge{constructor(X,K){K=K||{},K.mouseWheelSmoothScroll=!1;const he=new B.yE({forceIntegerValues:!1,smoothScrollDuration:0,scheduleAtNextAnimationFrame:ve=>h.PG(ve)});super(X,K,he),this._register(he),this._element=X,this.onScroll(ve=>{ve.scrollTopChanged&&(this._element.scrollTop=ve.scrollTop),ve.scrollLeftChanged&&(this._element.scrollLeft=ve.scrollLeft)}),this.scanDomNode()}setScrollPosition(X){this._scrollable.setScrollPositionNow(X)}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 le(se){const X={lazyRender:typeof se.lazyRender<"u"?se.lazyRender:!1,className:typeof se.className<"u"?se.className:"",useShadows:typeof se.useShadows<"u"?se.useShadows:!0,handleMouseWheel:typeof se.handleMouseWheel<"u"?se.handleMouseWheel:!0,flipAxes:typeof se.flipAxes<"u"?se.flipAxes:!1,consumeMouseWheelIfScrollbarIsNeeded:typeof se.consumeMouseWheelIfScrollbarIsNeeded<"u"?se.consumeMouseWheelIfScrollbarIsNeeded:!1,alwaysConsumeMouseWheel:typeof se.alwaysConsumeMouseWheel<"u"?se.alwaysConsumeMouseWheel:!1,scrollYToX:typeof se.scrollYToX<"u"?se.scrollYToX:!1,mouseWheelScrollSensitivity:typeof se.mouseWheelScrollSensitivity<"u"?se.mouseWheelScrollSensitivity:1,fastScrollSensitivity:typeof se.fastScrollSensitivity<"u"?se.fastScrollSensitivity:5,scrollPredominantAxis:typeof se.scrollPredominantAxis<"u"?se.scrollPredominantAxis:!0,mouseWheelSmoothScroll:typeof se.mouseWheelSmoothScroll<"u"?se.mouseWheelSmoothScroll:!0,arrowSize:typeof se.arrowSize<"u"?se.arrowSize:11,listenOnDomNode:typeof se.listenOnDomNode<"u"?se.listenOnDomNode:null,horizontal:typeof se.horizontal<"u"?se.horizontal:1,horizontalScrollbarSize:typeof se.horizontalScrollbarSize<"u"?se.horizontalScrollbarSize:10,horizontalSliderSize:typeof se.horizontalSliderSize<"u"?se.horizontalSliderSize:0,horizontalHasArrows:typeof se.horizontalHasArrows<"u"?se.horizontalHasArrows:!1,vertical:typeof se.vertical<"u"?se.vertical:1,verticalScrollbarSize:typeof se.verticalScrollbarSize<"u"?se.verticalScrollbarSize:10,verticalHasArrows:typeof se.verticalHasArrows<"u"?se.verticalHasArrows:!1,verticalSliderSize:typeof se.verticalSliderSize<"u"?se.verticalSliderSize:0,scrollByPage:typeof se.scrollByPage<"u"?se.scrollByPage:!1};return X.horizontalSliderSize=typeof se.horizontalSliderSize<"u"?se.horizontalSliderSize:X.horizontalScrollbarSize,X.verticalSliderSize=typeof se.verticalSliderSize<"u"?se.verticalSliderSize:X.verticalScrollbarSize,y.zx&&(X.className+=" mac"),X}},67003:(Tt,Fe,f)=>{f.d(Fe,{U:()=>k,X:()=>L});var I=f(59095),h=f(86843),te=f(63781),$=f(13338),x=f(94901),ie=f(2106),Q=f(10998),J=f(62992),z=f(94513),S=f(79359),_=f(41697);const y={separatorBorder:x.Q1.transparent};class C{constructor(N,B,T,H){this.container=N,this.view=B,this.disposable=H,this._cachedVisibleSize=void 0,typeof T=="number"?(this._size=T,this._cachedVisibleSize=void 0,N.classList.add("visible")):(this._size=0,this._cachedVisibleSize=T.cachedVisibleSize)}set size(N){this._size=N}get size(){return this._size}get visible(){return typeof this._cachedVisibleSize>"u"}setVisible(N,B){var T,H;N!==this.visible&&(N?(this.size=(0,J.qE)(this._cachedVisibleSize,this.viewMinimumSize,this.viewMaximumSize),this._cachedVisibleSize=void 0):(this._cachedVisibleSize=typeof B=="number"?B:this.size,this.size=0),this.container.classList.toggle("visible",N),(H=(T=this.view).setVisible)===null||H===void 0||H.call(T,N))}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 snap(){return!!this.view.snap}set enabled(N){this.container.style.pointerEvents=N?"":"none"}layout(N,B){this.layoutContainer(N),this.view.layout(this.size,N,B)}dispose(){return this.disposable.dispose(),this.view}}class d extends C{layoutContainer(N){this.container.style.top=`${N}px`,this.container.style.height=`${this.size}px`}}class w extends C{layoutContainer(N){this.container.style.left=`${N}px`,this.container.style.width=`${this.size}px`}}var D;(function(j){j[j.Idle=0]="Idle",j[j.Busy=1]="Busy"})(D||(D={}));var L;(function(j){j.Distribute={type:"distribute"};function N(T){return{type:"split",index:T}}j.Split=N;function B(T){return{type:"invisible",cachedVisibleSize:T}}j.Invisible=B})(L||(L={}));class k extends Q.jG{constructor(N,B={}){var T,H,Y,ee,ce;super(),this.size=0,this.contentSize=0,this.proportions=void 0,this.viewItems=[],this.sashItems=[],this.state=D.Idle,this._onDidSashChange=this._register(new ie.vl),this._onDidSashReset=this._register(new ie.vl),this._startSnappingEnabled=!0,this._endSnappingEnabled=!0,this.onDidSashChange=this._onDidSashChange.event,this.onDidSashReset=this._onDidSashReset.event,this.orientation=(T=B.orientation)!==null&&T!==void 0?T:0,this.inverseAltBehavior=(H=B.inverseAltBehavior)!==null&&H!==void 0?H:!1,this.proportionalLayout=(Y=B.proportionalLayout)!==null&&Y!==void 0?Y:!0,this.getSashOrthogonalSize=B.getSashOrthogonalSize,this.el=document.createElement("div"),this.el.classList.add("monaco-split-view2"),this.el.classList.add(this.orientation===0?"vertical":"horizontal"),N.appendChild(this.el),this.sashContainer=(0,I.BC)(this.el,(0,I.$)(".sash-container")),this.viewContainer=(0,I.$)(".split-view-container"),this.scrollable=new z.yE({forceIntegerValues:!0,smoothScrollDuration:125,scheduleAtNextAnimationFrame:I.PG}),this.scrollableElement=this._register(new te.oO(this.viewContainer,{vertical:this.orientation===0?(ee=B.scrollbarVisibility)!==null&&ee!==void 0?ee:1:2,horizontal:this.orientation===1?(ce=B.scrollbarVisibility)!==null&&ce!==void 0?ce:1:2},this.scrollable)),this.onDidScroll=this.scrollableElement.onScroll,this._register(this.onDidScroll(pe=>{this.viewContainer.scrollTop=pe.scrollTop,this.viewContainer.scrollLeft=pe.scrollLeft})),(0,I.BC)(this.el,this.scrollableElement.getDomNode()),this.style(B.styles||y),B.descriptor&&(this.size=B.descriptor.size,B.descriptor.views.forEach((pe,ge)=>{const fe=S.b0(pe.visible)||pe.visible?pe.size:{type:"invisible",cachedVisibleSize:pe.size},oe=pe.view;this.doAddView(oe,fe,ge,!0)}),this.contentSize=this.viewItems.reduce((pe,ge)=>pe+ge.size,0),this.saveProportions())}get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}get startSnappingEnabled(){return this._startSnappingEnabled}get endSnappingEnabled(){return this._endSnappingEnabled}set orthogonalStartSash(N){for(const B of this.sashItems)B.sash.orthogonalStartSash=N;this._orthogonalStartSash=N}set orthogonalEndSash(N){for(const B of this.sashItems)B.sash.orthogonalEndSash=N;this._orthogonalEndSash=N}set startSnappingEnabled(N){this._startSnappingEnabled!==N&&(this._startSnappingEnabled=N,this.updateSashEnablement())}set endSnappingEnabled(N){this._endSnappingEnabled!==N&&(this._endSnappingEnabled=N,this.updateSashEnablement())}style(N){N.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",N.separatorBorder.toString()))}addView(N,B,T=this.viewItems.length,H){this.doAddView(N,B,T,H)}layout(N,B){const T=Math.max(this.size,this.contentSize);if(this.size=N,this.layoutContext=B,this.proportions)for(let H=0;H<this.viewItems.length;H++){const Y=this.viewItems[H];Y.size=(0,J.qE)(Math.round(this.proportions[H]*N),Y.minimumSize,Y.maximumSize)}else{const H=(0,$.y1)(this.viewItems.length),Y=H.filter(ce=>this.viewItems[ce].priority===1),ee=H.filter(ce=>this.viewItems[ce].priority===2);this.resize(this.viewItems.length-1,N-T,void 0,Y,ee)}this.distributeEmptySpace(),this.layoutViews()}saveProportions(){this.proportionalLayout&&this.contentSize>0&&(this.proportions=this.viewItems.map(N=>N.size/this.contentSize))}onSashStart({sash:N,start:B,alt:T}){for(const ce of this.viewItems)ce.enabled=!1;const H=this.sashItems.findIndex(ce=>ce.sash===N),Y=(0,Q.qE)((0,I.ko)(document.body,"keydown",ce=>ee(this.sashDragState.current,ce.altKey)),(0,I.ko)(document.body,"keyup",()=>ee(this.sashDragState.current,!1))),ee=(ce,pe)=>{const ge=this.viewItems.map(se=>se.size);let fe=Number.NEGATIVE_INFINITY,oe=Number.POSITIVE_INFINITY;if(this.inverseAltBehavior&&(pe=!pe),pe)if(H===this.sashItems.length-1){const X=this.viewItems[H];fe=(X.minimumSize-X.size)/2,oe=(X.maximumSize-X.size)/2}else{const X=this.viewItems[H+1];fe=(X.size-X.maximumSize)/2,oe=(X.size-X.minimumSize)/2}let Z,le;if(!pe){const se=(0,$.y1)(H,-1),X=(0,$.y1)(H+1,this.viewItems.length),K=se.reduce((Ke,De)=>Ke+(this.viewItems[De].minimumSize-ge[De]),0),he=se.reduce((Ke,De)=>Ke+(this.viewItems[De].viewMaximumSize-ge[De]),0),ve=X.length===0?Number.POSITIVE_INFINITY:X.reduce((Ke,De)=>Ke+(ge[De]-this.viewItems[De].minimumSize),0),Ee=X.length===0?Number.NEGATIVE_INFINITY:X.reduce((Ke,De)=>Ke+(ge[De]-this.viewItems[De].viewMaximumSize),0),O=Math.max(K,Ee),ot=Math.min(ve,he),lt=this.findFirstSnapIndex(se),We=this.findFirstSnapIndex(X);if(typeof lt=="number"){const Ke=this.viewItems[lt],De=Math.floor(Ke.viewMinimumSize/2);Z={index:lt,limitDelta:Ke.visible?O-De:O+De,size:Ke.size}}if(typeof We=="number"){const Ke=this.viewItems[We],De=Math.floor(Ke.viewMinimumSize/2);le={index:We,limitDelta:Ke.visible?ot+De:ot-De,size:Ke.size}}}this.sashDragState={start:ce,current:ce,index:H,sizes:ge,minDelta:fe,maxDelta:oe,alt:pe,snapBefore:Z,snapAfter:le,disposable:Y}};ee(B,T)}onSashChange({current:N}){const{index:B,start:T,sizes:H,alt:Y,minDelta:ee,maxDelta:ce,snapBefore:pe,snapAfter:ge}=this.sashDragState;this.sashDragState.current=N;const fe=N-T,oe=this.resize(B,fe,H,void 0,void 0,ee,ce,pe,ge);if(Y){const Z=B===this.sashItems.length-1,le=this.viewItems.map(Ee=>Ee.size),se=Z?B:B+1,X=this.viewItems[se],K=X.size-X.maximumSize,he=X.size-X.minimumSize,ve=Z?B-1:B+1;this.resize(ve,-oe,le,void 0,void 0,K,he)}this.distributeEmptySpace(),this.layoutViews()}onSashEnd(N){this._onDidSashChange.fire(N),this.sashDragState.disposable.dispose(),this.saveProportions();for(const B of this.viewItems)B.enabled=!0}onViewChange(N,B){const T=this.viewItems.indexOf(N);T<0||T>=this.viewItems.length||(B=typeof B=="number"?B:N.size,B=(0,J.qE)(B,N.minimumSize,N.maximumSize),this.inverseAltBehavior&&T>0?(this.resize(T-1,Math.floor((N.size-B)/2)),this.distributeEmptySpace(),this.layoutViews()):(N.size=B,this.relayout([T],void 0)))}resizeView(N,B){if(this.state!==D.Idle)throw new Error("Cant modify splitview");if(this.state=D.Busy,N<0||N>=this.viewItems.length)return;const T=(0,$.y1)(this.viewItems.length).filter(ce=>ce!==N),H=[...T.filter(ce=>this.viewItems[ce].priority===1),N],Y=T.filter(ce=>this.viewItems[ce].priority===2),ee=this.viewItems[N];B=Math.round(B),B=(0,J.qE)(B,ee.minimumSize,Math.min(ee.maximumSize,this.size)),ee.size=B,this.relayout(H,Y),this.state=D.Idle}distributeViewSizes(){const N=[];let B=0;for(const ce of this.viewItems)ce.maximumSize-ce.minimumSize>0&&(N.push(ce),B+=ce.size);const T=Math.floor(B/N.length);for(const ce of N)ce.size=(0,J.qE)(T,ce.minimumSize,ce.maximumSize);const H=(0,$.y1)(this.viewItems.length),Y=H.filter(ce=>this.viewItems[ce].priority===1),ee=H.filter(ce=>this.viewItems[ce].priority===2);this.relayout(Y,ee)}getViewSize(N){return N<0||N>=this.viewItems.length?-1:this.viewItems[N].size}doAddView(N,B,T=this.viewItems.length,H){if(this.state!==D.Idle)throw new Error("Cant modify splitview");this.state=D.Busy;const Y=(0,I.$)(".split-view-view");T===this.viewItems.length?this.viewContainer.appendChild(Y):this.viewContainer.insertBefore(Y,this.viewContainer.children.item(T));const ee=N.onDidChange(Z=>this.onViewChange(fe,Z)),ce=(0,Q.s)(()=>this.viewContainer.removeChild(Y)),pe=(0,Q.qE)(ee,ce);let ge;typeof B=="number"?ge=B:B.type==="split"?ge=this.getViewSize(B.index)/2:B.type==="invisible"?ge={cachedVisibleSize:B.cachedVisibleSize}:ge=N.minimumSize;const fe=this.orientation===0?new d(Y,N,ge,pe):new w(Y,N,ge,pe);if(this.viewItems.splice(T,0,fe),this.viewItems.length>1){const Z={orthogonalStartSash:this.orthogonalStartSash,orthogonalEndSash:this.orthogonalEndSash},le=this.orientation===0?new h.m(this.sashContainer,{getHorizontalSashTop:Ke=>this.getSashPosition(Ke),getHorizontalSashWidth:this.getSashOrthogonalSize},Object.assign(Object.assign({},Z),{orientation:1})):new h.m(this.sashContainer,{getVerticalSashLeft:Ke=>this.getSashPosition(Ke),getVerticalSashHeight:this.getSashOrthogonalSize},Object.assign(Object.assign({},Z),{orientation:0})),se=this.orientation===0?Ke=>({sash:le,start:Ke.startY,current:Ke.currentY,alt:Ke.altKey}):Ke=>({sash:le,start:Ke.startX,current:Ke.currentX,alt:Ke.altKey}),K=ie.Jh.map(le.onDidStart,se)(this.onSashStart,this),ve=ie.Jh.map(le.onDidChange,se)(this.onSashChange,this),O=ie.Jh.map(le.onDidEnd,()=>this.sashItems.findIndex(Ke=>Ke.sash===le))(this.onSashEnd,this),ot=le.onDidReset(()=>{const Ke=this.sashItems.findIndex(et=>et.sash===le),De=(0,$.y1)(Ke,-1),Pe=(0,$.y1)(Ke+1,this.viewItems.length),Ue=this.findFirstSnapIndex(De),Re=this.findFirstSnapIndex(Pe);typeof Ue=="number"&&!this.viewItems[Ue].visible||typeof Re=="number"&&!this.viewItems[Re].visible||this._onDidSashReset.fire(Ke)}),lt=(0,Q.qE)(K,ve,O,ot,le),We={sash:le,disposable:lt};this.sashItems.splice(T-1,0,We)}Y.appendChild(N.element);let oe;typeof B!="number"&&B.type==="split"&&(oe=[B.index]),H||this.relayout([T],oe),this.state=D.Idle,!H&&typeof B!="number"&&B.type==="distribute"&&this.distributeViewSizes()}relayout(N,B){const T=this.viewItems.reduce((H,Y)=>H+Y.size,0);this.resize(this.viewItems.length-1,this.size-T,void 0,N,B),this.distributeEmptySpace(),this.layoutViews(),this.saveProportions()}resize(N,B,T=this.viewItems.map(fe=>fe.size),H,Y,ee=Number.NEGATIVE_INFINITY,ce=Number.POSITIVE_INFINITY,pe,ge){if(N<0||N>=this.viewItems.length)return 0;const fe=(0,$.y1)(N,-1),oe=(0,$.y1)(N+1,this.viewItems.length);if(Y)for(const We of Y)(0,$._A)(fe,We),(0,$._A)(oe,We);if(H)for(const We of H)(0,$.r7)(fe,We),(0,$.r7)(oe,We);const Z=fe.map(We=>this.viewItems[We]),le=fe.map(We=>T[We]),se=oe.map(We=>this.viewItems[We]),X=oe.map(We=>T[We]),K=fe.reduce((We,Ke)=>We+(this.viewItems[Ke].minimumSize-T[Ke]),0),he=fe.reduce((We,Ke)=>We+(this.viewItems[Ke].maximumSize-T[Ke]),0),ve=oe.length===0?Number.POSITIVE_INFINITY:oe.reduce((We,Ke)=>We+(T[Ke]-this.viewItems[Ke].minimumSize),0),Ee=oe.length===0?Number.NEGATIVE_INFINITY:oe.reduce((We,Ke)=>We+(T[Ke]-this.viewItems[Ke].maximumSize),0),O=Math.max(K,Ee,ee),ot=Math.min(ve,he,ce);let lt=!1;if(pe){const We=this.viewItems[pe.index],Ke=B>=pe.limitDelta;lt=Ke!==We.visible,We.setVisible(Ke,pe.size)}if(!lt&&ge){const We=this.viewItems[ge.index],Ke=B<ge.limitDelta;lt=Ke!==We.visible,We.setVisible(Ke,ge.size)}if(lt)return this.resize(N,B,T,H,Y,ee,ce);B=(0,J.qE)(B,O,ot);for(let We=0,Ke=B;We<Z.length;We++){const De=Z[We],Pe=(0,J.qE)(le[We]+Ke,De.minimumSize,De.maximumSize),Ue=Pe-le[We];Ke-=Ue,De.size=Pe}for(let We=0,Ke=B;We<se.length;We++){const De=se[We],Pe=(0,J.qE)(X[We]-Ke,De.minimumSize,De.maximumSize),Ue=Pe-X[We];Ke+=Ue,De.size=Pe}return B}distributeEmptySpace(N){const B=this.viewItems.reduce((ce,pe)=>ce+pe.size,0);let T=this.size-B;const H=(0,$.y1)(this.viewItems.length-1,-1),Y=H.filter(ce=>this.viewItems[ce].priority===1),ee=H.filter(ce=>this.viewItems[ce].priority===2);for(const ce of ee)(0,$._A)(H,ce);for(const ce of Y)(0,$.r7)(H,ce);typeof N=="number"&&(0,$.r7)(H,N);for(let ce=0;T!==0&&ce<H.length;ce++){const pe=this.viewItems[H[ce]],ge=(0,J.qE)(pe.size+T,pe.minimumSize,pe.maximumSize),fe=ge-pe.size;T-=fe,pe.size=ge}}layoutViews(){this.contentSize=this.viewItems.reduce((B,T)=>B+T.size,0);let N=0;for(const B of this.viewItems)B.layout(N,this.layoutContext),N+=B.size;this.sashItems.forEach(B=>B.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 N=!1;const B=this.viewItems.map(pe=>N=pe.size-pe.minimumSize>0||N);N=!1;const T=this.viewItems.map(pe=>N=pe.maximumSize-pe.size>0||N),H=[...this.viewItems].reverse();N=!1;const Y=H.map(pe=>N=pe.size-pe.minimumSize>0||N).reverse();N=!1;const ee=H.map(pe=>N=pe.maximumSize-pe.size>0||N).reverse();let ce=0;for(let pe=0;pe<this.sashItems.length;pe++){const{sash:ge}=this.sashItems[pe],fe=this.viewItems[pe];ce+=fe.size;const oe=!(B[pe]&&ee[pe+1]),Z=!(T[pe]&&Y[pe+1]);if(oe&&Z){const le=(0,$.y1)(pe,-1),se=(0,$.y1)(pe+1,this.viewItems.length),X=this.findFirstSnapIndex(le),K=this.findFirstSnapIndex(se),he=typeof X=="number"&&!this.viewItems[X].visible,ve=typeof K=="number"&&!this.viewItems[K].visible;he&&Y[pe]&&(ce>0||this.startSnappingEnabled)?ge.state=1:ve&&B[pe]&&(ce<this.contentSize||this.endSnappingEnabled)?ge.state=2:ge.state=0}else oe&&!Z?ge.state=1:!oe&&Z?ge.state=2:ge.state=3}}getSashPosition(N){let B=0;for(let T=0;T<this.sashItems.length;T++)if(B+=this.viewItems[T].size,this.sashItems[T].sash===N)return B;return 0}findFirstSnapIndex(N){for(const B of N){const T=this.viewItems[B];if(T.visible&&T.snap)return B}for(const B of N){const T=this.viewItems[B];if(T.visible&&T.maximumSize-T.minimumSize>0)return;if(!T.visible&&T.snap)return B}}dispose(){super.dispose(),(0,Q.AS)(this.viewItems),this.viewItems=[],this.sashItems.forEach(N=>N.disposable.dispose()),this.sashItems=[]}}},50585:(Tt,Fe,f)=>{f.d(Fe,{l:()=>Q});var I=f(45222),h=f(26048),te=f(94901),$=f(2106),x=f(43839);const ie={inputActiveOptionBorder:te.Q1.fromHex("#007ACC00"),inputActiveOptionForeground:te.Q1.fromHex("#FFFFFF"),inputActiveOptionBackground:te.Q1.fromHex("#0E639C50")};class Q extends I.x{constructor(z){super(),this._onChange=this._register(new $.vl),this.onChange=this._onChange.event,this._onKeyDown=this._register(new $.vl),this.onKeyDown=this._onKeyDown.event,this._opts=Object.assign(Object.assign({},ie),z),this._checked=this._opts.isChecked;const S=["monaco-custom-toggle"];this._opts.icon&&(this._icon=this._opts.icon,S.push(...h.j3.asClassNameArray(this._icon))),this._opts.actionClassName&&S.push(...this._opts.actionClassName.split(" ")),this._checked&&S.push("checked"),this.domNode=document.createElement("div"),this.domNode.title=this._opts.title,this.domNode.classList.add(...S),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,_=>{this.enabled&&(this.checked=!this._checked,this._onChange.fire(!1),_.preventDefault())}),this.ignoreGesture(this.domNode),this.onkeydown(this.domNode,_=>{if(_.keyCode===10||_.keyCode===3){this.checked=!this._checked,this._onChange.fire(!0),_.preventDefault(),_.stopPropagation();return}this._onKeyDown.fire(_)})}get enabled(){return this.domNode.getAttribute("aria-disabled")!=="true"}focus(){this.domNode.focus()}get checked(){return this._checked}set checked(z){this._checked=z,this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.classList.toggle("checked",this._checked),this.applyStyles()}width(){return 2+2+2+16}style(z){z.inputActiveOptionBorder&&(this._opts.inputActiveOptionBorder=z.inputActiveOptionBorder),z.inputActiveOptionForeground&&(this._opts.inputActiveOptionForeground=z.inputActiveOptionForeground),z.inputActiveOptionBackground&&(this._opts.inputActiveOptionBackground=z.inputActiveOptionBackground),this.applyStyles()}applyStyles(){this.domNode&&(this.domNode.style.borderColor=this._checked&&this._opts.inputActiveOptionBorder?this._opts.inputActiveOptionBorder.toString():"",this.domNode.style.color=this._checked&&this._opts.inputActiveOptionForeground?this._opts.inputActiveOptionForeground.toString():"inherit",this.domNode.style.backgroundColor=this._checked&&this._opts.inputActiveOptionBackground?this._opts.inputActiveOptionBackground.toString():"")}enable(){this.domNode.setAttribute("aria-disabled",String(!1))}disable(){this.domNode.setAttribute("aria-disabled",String(!0))}}},45222:(Tt,Fe,f)=>{f.d(Fe,{x:()=>ie});var I=f(59095),h=f(87594),te=f(9715),$=f(30474),x=f(10998);class ie extends x.jG{onclick(J,z){this._register(I.ko(J,I.Bx.CLICK,S=>z(new te.P(S))))}onmousedown(J,z){this._register(I.ko(J,I.Bx.MOUSE_DOWN,S=>z(new te.P(S))))}onmouseover(J,z){this._register(I.ko(J,I.Bx.MOUSE_OVER,S=>z(new te.P(S))))}onmouseleave(J,z){this._register(I.ko(J,I.Bx.MOUSE_LEAVE,S=>z(new te.P(S))))}onkeydown(J,z){this._register(I.ko(J,I.Bx.KEY_DOWN,S=>z(new h.Z(S))))}onkeyup(J,z){this._register(I.ko(J,I.Bx.KEY_UP,S=>z(new h.Z(S))))}oninput(J,z){this._register(I.ko(J,I.Bx.INPUT,z))}onblur(J,z){this._register(I.ko(J,I.Bx.BLUR,z))}onfocus(J,z){this._register(I.ko(J,I.Bx.FOCUS,z))}ignoreGesture(J){$.q.ignoreTarget(J)}}},27969:(Tt,Fe,f)=>{f.d(Fe,{HJ:()=>z,LN:()=>ie,YH:()=>J,ih:()=>S,rc:()=>x,wv:()=>Q});var I=f(2106),h=f(10998),te=f(3765),$=function(_,y,C,d){function w(D){return D instanceof C?D:new C(function(L){L(D)})}return new(C||(C=Promise))(function(D,L){function k(B){try{N(d.next(B))}catch(T){L(T)}}function j(B){try{N(d.throw(B))}catch(T){L(T)}}function N(B){B.done?D(B.value):w(B.value).then(k,j)}N((d=d.apply(_,y||[])).next())})};class x extends h.jG{constructor(y,C="",d="",w=!0,D){super(),this._onDidChange=this._register(new I.vl),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=y,this._label=C,this._cssClass=d,this._enabled=w,this._actionCallback=D}get id(){return this._id}get label(){return this._label}set label(y){this._setLabel(y)}_setLabel(y){this._label!==y&&(this._label=y,this._onDidChange.fire({label:y}))}get tooltip(){return this._tooltip||""}set tooltip(y){this._setTooltip(y)}_setTooltip(y){this._tooltip!==y&&(this._tooltip=y,this._onDidChange.fire({tooltip:y}))}get class(){return this._cssClass}set class(y){this._setClass(y)}_setClass(y){this._cssClass!==y&&(this._cssClass=y,this._onDidChange.fire({class:y}))}get enabled(){return this._enabled}set enabled(y){this._setEnabled(y)}_setEnabled(y){this._enabled!==y&&(this._enabled=y,this._onDidChange.fire({enabled:y}))}get checked(){return this._checked}set checked(y){this._setChecked(y)}_setChecked(y){this._checked!==y&&(this._checked=y,this._onDidChange.fire({checked:y}))}run(y,C){return $(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(y))})}}class ie extends h.jG{constructor(){super(...arguments),this._onBeforeRun=this._register(new I.vl),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new I.vl),this.onDidRun=this._onDidRun.event}run(y,C){return $(this,void 0,void 0,function*(){if(!y.enabled)return;this._onBeforeRun.fire({action:y});let d;try{yield this.runAction(y,C)}catch(w){d=w}this._onDidRun.fire({action:y,error:d})})}runAction(y,C){return $(this,void 0,void 0,function*(){yield y.run(C)})}}class Q extends x{constructor(y){super(Q.ID,y,y?"separator text":"separator"),this.checked=!1,this.enabled=!1}}Q.ID="vs.actions.separator";class J{constructor(y,C,d,w){this.tooltip="",this.enabled=!0,this.checked=void 0,this.id=y,this.label=C,this.class=w,this._actions=d}get actions(){return this._actions}dispose(){}run(){return $(this,void 0,void 0,function*(){})}}class z extends x{constructor(){super(z.ID,te.kg("submenu.empty","(empty)"),void 0,!1)}}z.ID="vs.actions.empty";function S(_){var y,C;return{id:_.id,label:_.label,class:void 0,enabled:(y=_.enabled)!==null&&y!==void 0?y:!0,checked:(C=_.checked)!==null&&C!==void 0?C:!1,run:()=>$(this,void 0,void 0,function*(){return _.run()}),tooltip:_.label,dispose:()=>{}}}},13338:(Tt,Fe,f)=>{f.d(Fe,{$z:()=>z,Ct:()=>_,E4:()=>B,EI:()=>y,El:()=>x,Fy:()=>D,Jw:()=>oe,Ly:()=>Z,RT:()=>I,SO:()=>J,U9:()=>ge,UH:()=>$,Uk:()=>d,V4:()=>Y,VE:()=>pe,Yc:()=>S,_A:()=>j,_j:()=>T,aB:()=>Q,aI:()=>te,bS:()=>h,dM:()=>C,j3:()=>le,nK:()=>k,r7:()=>N,vj:()=>fe,y1:()=>L});function I(se,X=0){return se[se.length-(1+X)]}function h(se){if(se.length===0)throw new Error("Invalid tail call");return[se.slice(0,se.length-1),se[se.length-1]]}function te(se,X,K=(he,ve)=>he===ve){if(se===X)return!0;if(!se||!X||se.length!==X.length)return!1;for(let he=0,ve=se.length;he<ve;he++)if(!K(se[he],X[he]))return!1;return!0}function $(se,X){const K=se.length-1;X<K&&(se[X]=se[K]),se.pop()}function x(se,X,K){return ie(se.length,he=>K(se[he],X))}function ie(se,X){let K=0,he=se-1;for(;K<=he;){const ve=(K+he)/2|0,Ee=X(ve);if(Ee<0)K=ve+1;else if(Ee>0)he=ve-1;else return ve}return-(K+1)}function Q(se,X){let K=0,he=se.length;if(he===0)return 0;for(;K<he;){const ve=Math.floor((K+he)/2);X(se[ve])?he=ve:K=ve+1}return K}function J(se,X,K){if(se=se|0,se>=X.length)throw new TypeError("invalid index");const he=X[Math.floor(X.length*Math.random())],ve=[],Ee=[],O=[];for(const ot of X){const lt=K(ot,he);lt<0?ve.push(ot):lt>0?Ee.push(ot):O.push(ot)}return se<ve.length?J(se,ve,K):se<ve.length+O.length?O[0]:J(se-(ve.length+O.length),Ee,K)}function z(se,X){const K=[];let he;for(const ve of se.slice(0).sort(X))!he||X(he[0],ve)!==0?(he=[ve],K.push(he)):he.push(ve);return K}function S(se){return se.filter(X=>!!X)}function _(se){return!Array.isArray(se)||se.length===0}function y(se){return Array.isArray(se)&&se.length>0}function C(se,X=K=>K){const K=new Set;return se.filter(he=>{const ve=X(he);return K.has(ve)?!1:(K.add(ve),!0)})}function d(se,X){const K=w(se,X);if(K!==-1)return se[K]}function w(se,X){for(let K=se.length-1;K>=0;K--){const he=se[K];if(X(he))return K}return-1}function D(se,X){return se.length>0?se[0]:X}function L(se,X){let K=typeof X=="number"?se:0;typeof X=="number"?K=se:(K=0,X=se);const he=[];if(K<=X)for(let ve=K;ve<X;ve++)he.push(ve);else for(let ve=K;ve>X;ve--)he.push(ve);return he}function k(se,X,K){const he=se.slice(0,X),ve=se.slice(X);return he.concat(K,ve)}function j(se,X){const K=se.indexOf(X);K>-1&&(se.splice(K,1),se.unshift(X))}function N(se,X){const K=se.indexOf(X);K>-1&&(se.splice(K,1),se.push(X))}function B(se,X){for(const K of X)se.push(K)}function T(se){return Array.isArray(se)?se:[se]}function H(se,X,K){const he=ee(se,X),ve=se.length,Ee=K.length;se.length=ve+Ee;for(let O=ve-1;O>=he;O--)se[O+Ee]=se[O];for(let O=0;O<Ee;O++)se[O+he]=K[O]}function Y(se,X,K,he){const ve=ee(se,X),Ee=se.splice(ve,K);return H(se,ve,he),Ee}function ee(se,X){return X<0?Math.max(X+se.length,0):Math.min(X,se.length)}var ce;(function(se){function X(ve){return ve<0}se.isLessThan=X;function K(ve){return ve>0}se.isGreaterThan=K;function he(ve){return ve===0}se.isNeitherLessOrGreaterThan=he,se.greaterThan=1,se.lessThan=-1,se.neitherLessOrGreaterThan=0})(ce||(ce={}));function pe(se,X){return(K,he)=>X(se(K),se(he))}const ge=(se,X)=>se-X;function fe(se,X){if(se.length===0)return;let K=se[0];for(let he=1;he<se.length;he++){const ve=se[he];X(ve,K)>0&&(K=ve)}return K}function oe(se,X){if(se.length===0)return;let K=se[0];for(let he=1;he<se.length;he++){const ve=se[he];X(ve,K)>=0&&(K=ve)}return K}function Z(se,X){return fe(se,(K,he)=>-X(K,he))}class le{constructor(X){this.items=X,this.firstIdx=0,this.lastIdx=this.items.length-1}get length(){return this.lastIdx-this.firstIdx+1}takeWhile(X){let K=this.firstIdx;for(;K<this.items.length&&X(this.items[K]);)K++;const he=K===this.firstIdx?null:this.items.slice(this.firstIdx,K);return this.firstIdx=K,he}takeFromEndWhile(X){let K=this.lastIdx;for(;K>=0&&X(this.items[K]);)K--;const he=K===this.lastIdx?null:this.items.slice(K+1,this.lastIdx+1);return this.lastIdx=K,he}peek(){if(this.length!==0)return this.items[this.firstIdx]}dequeue(){const X=this.items[this.firstIdx];return this.firstIdx++,X}takeCount(X){const K=this.items.slice(this.firstIdx,this.firstIdx+X);return this.firstIdx+=X,K}}},87110:(Tt,Fe,f)=>{f.d(Fe,{ok:()=>I});function I(h,te){if(!h)throw new Error(te?`Assertion failed (${te})`:"Assertion Failed")}},65958:(Tt,Fe,f)=>{f.d(Fe,{$1:()=>j,AE:()=>pe,EQ:()=>k,HC:()=>ce,PK:()=>S,Qg:()=>J,SS:()=>z,Th:()=>D,Zv:()=>ee,bI:()=>fe,cx:()=>H,hW:()=>d,kb:()=>Y,pc:()=>N,uC:()=>T,vb:()=>B,ve:()=>w,wR:()=>L});var I=f(78903),h=f(94327),te=f(2106),$=f(10998),x=f(63339),ie=function(oe,Z,le,se){function X(K){return K instanceof le?K:new le(function(he){he(K)})}return new(le||(le=Promise))(function(K,he){function ve(ot){try{O(se.next(ot))}catch(lt){he(lt)}}function Ee(ot){try{O(se.throw(ot))}catch(lt){he(lt)}}function O(ot){ot.done?K(ot.value):X(ot.value).then(ve,Ee)}O((se=se.apply(oe,Z||[])).next())})},Q=function(oe){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var Z=oe[Symbol.asyncIterator],le;return Z?Z.call(oe):(oe=typeof __values=="function"?__values(oe):oe[Symbol.iterator](),le={},se("next"),se("throw"),se("return"),le[Symbol.asyncIterator]=function(){return this},le);function se(K){le[K]=oe[K]&&function(he){return new Promise(function(ve,Ee){he=oe[K](he),X(ve,Ee,he.done,he.value)})}}function X(K,he,ve,Ee){Promise.resolve(Ee).then(function(O){K({value:O,done:ve})},he)}};function J(oe){return!!oe&&typeof oe.then=="function"}function z(oe){const Z=new I.Q,le=oe(Z.token),se=new Promise((X,K)=>{const he=Z.token.onCancellationRequested(()=>{he.dispose(),Z.dispose(),K(new h.AL)});Promise.resolve(le).then(ve=>{he.dispose(),Z.dispose(),X(ve)},ve=>{he.dispose(),Z.dispose(),K(ve)})});return new class{cancel(){Z.cancel()}then(X,K){return se.then(X,K)}catch(X){return this.then(void 0,X)}finally(X){return se.finally(X)}}}function S(oe,Z,le){return new Promise((se,X)=>{const K=Z.onCancellationRequested(()=>{K.dispose(),se(le)});oe.then(se,X).finally(()=>K.dispose())})}class _{constructor(){this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}queue(Z){if(this.activePromise){if(this.queuedPromiseFactory=Z,!this.queuedPromise){const le=()=>{this.queuedPromise=null;const se=this.queue(this.queuedPromiseFactory);return this.queuedPromiseFactory=null,se};this.queuedPromise=new Promise(se=>{this.activePromise.then(le,le).then(se)})}return new Promise((le,se)=>{this.queuedPromise.then(le,se)})}return this.activePromise=Z(),new Promise((le,se)=>{this.activePromise.then(X=>{this.activePromise=null,le(X)},X=>{this.activePromise=null,se(X)})})}}const y=(oe,Z)=>{let le=!0;const se=setTimeout(()=>{le=!1,Z()},oe);return{isTriggered:()=>le,dispose:()=>{clearTimeout(se),le=!1}}},C=oe=>{let Z=!0;return queueMicrotask(()=>{Z&&(Z=!1,oe())}),{isTriggered:()=>Z,dispose:()=>{Z=!1}}},d=Symbol("MicrotaskDelay");class w{constructor(Z){this.defaultDelay=Z,this.deferred=null,this.completionPromise=null,this.doResolve=null,this.doReject=null,this.task=null}trigger(Z,le=this.defaultDelay){this.task=Z,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise((X,K)=>{this.doResolve=X,this.doReject=K}).then(()=>{if(this.completionPromise=null,this.doResolve=null,this.task){const X=this.task;return this.task=null,X()}}));const se=()=>{var X;this.deferred=null,(X=this.doResolve)===null||X===void 0||X.call(this,null)};return this.deferred=le===d?C(se):y(le,se),this.completionPromise}isTriggered(){var Z;return!!(!((Z=this.deferred)===null||Z===void 0)&&Z.isTriggered())}cancel(){var Z;this.cancelTimeout(),this.completionPromise&&((Z=this.doReject)===null||Z===void 0||Z.call(this,new h.AL),this.completionPromise=null)}cancelTimeout(){var Z;(Z=this.deferred)===null||Z===void 0||Z.dispose(),this.deferred=null}dispose(){this.cancel()}}class D{constructor(Z){this.delayer=new w(Z),this.throttler=new _}trigger(Z,le){return this.delayer.trigger(()=>this.throttler.queue(Z),le)}dispose(){this.delayer.dispose()}}function L(oe,Z){return Z?new Promise((le,se)=>{const X=setTimeout(()=>{K.dispose(),le()},oe),K=Z.onCancellationRequested(()=>{clearTimeout(X),K.dispose(),se(new h.AL)})}):z(le=>L(oe,le))}function k(oe,Z=0){const le=setTimeout(oe,Z);return(0,$.s)(()=>clearTimeout(le))}function j(oe,Z=se=>!!se,le=null){let se=0;const X=oe.length,K=()=>{if(se>=X)return Promise.resolve(le);const he=oe[se++];return Promise.resolve(he()).then(Ee=>Z(Ee)?Promise.resolve(Ee):K())};return K()}class N{constructor(Z,le){this._token=-1,typeof Z=="function"&&typeof le=="number"&&this.setIfNotSet(Z,le)}dispose(){this.cancel()}cancel(){this._token!==-1&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(Z,le){this.cancel(),this._token=setTimeout(()=>{this._token=-1,Z()},le)}setIfNotSet(Z,le){this._token===-1&&(this._token=setTimeout(()=>{this._token=-1,Z()},le))}}class B{constructor(){this._token=-1}dispose(){this.cancel()}cancel(){this._token!==-1&&(clearInterval(this._token),this._token=-1)}cancelAndSet(Z,le){this.cancel(),this._token=setInterval(()=>{Z()},le)}}class T{constructor(Z,le){this.timeoutToken=-1,this.runner=Z,this.timeout=le,this.timeoutHandler=this.onTimeout.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1)}schedule(Z=this.timeout){this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,Z)}get delay(){return this.timeout}set delay(Z){this.timeout=Z}isScheduled(){return this.timeoutToken!==-1}onTimeout(){this.timeoutToken=-1,this.runner&&this.doRun()}doRun(){var Z;(Z=this.runner)===null||Z===void 0||Z.call(this)}}let H;(function(){typeof requestIdleCallback!="function"||typeof cancelIdleCallback!="function"?H=oe=>{(0,x._p)(()=>{if(Z)return;const le=Date.now()+15;oe(Object.freeze({didTimeout:!0,timeRemaining(){return Math.max(0,le-Date.now())}}))});let Z=!1;return{dispose(){Z||(Z=!0)}}}:H=(oe,Z)=>{const le=requestIdleCallback(oe,typeof Z=="number"?{timeout:Z}:void 0);let se=!1;return{dispose(){se||(se=!0,cancelIdleCallback(le))}}}})();class Y{constructor(Z){this._didRun=!1,this._executor=()=>{try{this._value=Z()}catch(le){this._error=le}finally{this._didRun=!0}},this._handle=H(()=>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 ee{constructor(){this.rejected=!1,this.resolved=!1,this.p=new Promise((Z,le)=>{this.completeCallback=Z,this.errorCallback=le})}get isRejected(){return this.rejected}get isSettled(){return this.rejected||this.resolved}complete(Z){return new Promise(le=>{this.completeCallback(Z),this.resolved=!0,le()})}cancel(){new Promise(Z=>{this.errorCallback(new h.AL),this.rejected=!0,Z()})}}var ce;(function(oe){function Z(se){return ie(this,void 0,void 0,function*(){let X;const K=yield Promise.all(se.map(he=>he.then(ve=>ve,ve=>{X||(X=ve)})));if(typeof X<"u")throw X;return K})}oe.settled=Z;function le(se){return new Promise((X,K)=>ie(this,void 0,void 0,function*(){try{yield se(X,K)}catch(he){K(he)}}))}oe.withAsyncBody=le})(ce||(ce={}));class pe{constructor(Z){this._state=0,this._results=[],this._error=null,this._onStateChanged=new te.vl,queueMicrotask(()=>ie(this,void 0,void 0,function*(){const le={emitOne:se=>this.emitOne(se),emitMany:se=>this.emitMany(se),reject:se=>this.reject(se)};try{yield Promise.resolve(Z(le)),this.resolve()}catch(se){this.reject(se)}finally{le.emitOne=void 0,le.emitMany=void 0,le.reject=void 0}}))}static fromArray(Z){return new pe(le=>{le.emitMany(Z)})}static fromPromise(Z){return new pe(le=>ie(this,void 0,void 0,function*(){le.emitMany(yield Z)}))}static fromPromises(Z){return new pe(le=>ie(this,void 0,void 0,function*(){yield Promise.all(Z.map(se=>ie(this,void 0,void 0,function*(){return le.emitOne(yield se)})))}))}static merge(Z){return new pe(le=>ie(this,void 0,void 0,function*(){yield Promise.all(Z.map(se=>{var X,K;return ie(this,void 0,void 0,function*(){var he,ve;try{for(X=Q(se);K=yield X.next(),!K.done;){const Ee=K.value;le.emitOne(Ee)}}catch(Ee){he={error:Ee}}finally{try{K&&!K.done&&(ve=X.return)&&(yield ve.call(X))}finally{if(he)throw he.error}}})}))}))}[Symbol.asyncIterator](){let Z=0;return{next:()=>ie(this,void 0,void 0,function*(){do{if(this._state===2)throw this._error;if(Z<this._results.length)return{done:!1,value:this._results[Z++]};if(this._state===1)return{done:!0,value:void 0};yield te.Jh.toPromise(this._onStateChanged.event)}while(!0)})}}static map(Z,le){return new pe(se=>ie(this,void 0,void 0,function*(){var X,K;try{for(var he=Q(Z),ve;ve=yield he.next(),!ve.done;){const Ee=ve.value;se.emitOne(le(Ee))}}catch(Ee){X={error:Ee}}finally{try{ve&&!ve.done&&(K=he.return)&&(yield K.call(he))}finally{if(X)throw X.error}}}))}map(Z){return pe.map(this,Z)}static filter(Z,le){return new pe(se=>ie(this,void 0,void 0,function*(){var X,K;try{for(var he=Q(Z),ve;ve=yield he.next(),!ve.done;){const Ee=ve.value;le(Ee)&&se.emitOne(Ee)}}catch(Ee){X={error:Ee}}finally{try{ve&&!ve.done&&(K=he.return)&&(yield K.call(he))}finally{if(X)throw X.error}}}))}filter(Z){return pe.filter(this,Z)}static coalesce(Z){return pe.filter(Z,le=>!!le)}coalesce(){return pe.coalesce(this)}static toPromise(Z){var le,se,X,K;return ie(this,void 0,void 0,function*(){const he=[];try{for(le=Q(Z);se=yield le.next(),!se.done;){const ve=se.value;he.push(ve)}}catch(ve){X={error:ve}}finally{try{se&&!se.done&&(K=le.return)&&(yield K.call(le))}finally{if(X)throw X.error}}return he})}toPromise(){return pe.toPromise(this)}emitOne(Z){this._state===0&&(this._results.push(Z),this._onStateChanged.fire())}emitMany(Z){this._state===0&&(this._results=this._results.concat(Z),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(Z){this._state===0&&(this._state=2,this._error=Z,this._onStateChanged.fire())}}pe.EMPTY=pe.fromArray([]);class ge extends pe{constructor(Z,le){super(le),this._source=Z}cancel(){this._source.cancel()}}function fe(oe){const Z=new I.Q,le=oe(Z.token);return new ge(Z,se=>ie(this,void 0,void 0,function*(){var X,K;const he=Z.token.onCancellationRequested(()=>{he.dispose(),Z.dispose(),se.reject(new h.AL)});try{try{for(var ve=Q(le),Ee;Ee=yield ve.next(),!Ee.done;){const O=Ee.value;if(Z.token.isCancellationRequested)return;se.emitOne(O)}}catch(O){X={error:O}}finally{try{Ee&&!Ee.done&&(K=ve.return)&&(yield K.call(ve))}finally{if(X)throw X.error}}he.dispose(),Z.dispose()}catch(O){he.dispose(),Z.dispose(),se.reject(O)}}))}},42802:(Tt,Fe,f)=>{f.d(Fe,{$l:()=>x,Gs:()=>S,MB:()=>$,Sw:()=>J,bb:()=>Q,gN:()=>ie,pJ:()=>z});var I=f(48287).Buffer;const h=typeof I<"u";let te;class ${constructor(y){this.buffer=y,this.byteLength=this.buffer.byteLength}static wrap(y){return h&&!I.isBuffer(y)&&(y=I.from(y.buffer,y.byteOffset,y.byteLength)),new $(y)}toString(){return h?this.buffer.toString():(te||(te=new TextDecoder),te.decode(this.buffer))}}function x(_,y){return _[y+0]<<0>>>0|_[y+1]<<8>>>0}function ie(_,y,C){_[C+0]=y&255,y=y>>>8,_[C+1]=y&255}function Q(_,y){return _[y]*Math.pow(2,24)+_[y+1]*Math.pow(2,16)+_[y+2]*Math.pow(2,8)+_[y+3]}function J(_,y,C){_[C+3]=y,y=y>>>8,_[C+2]=y,y=y>>>8,_[C+1]=y,y=y>>>8,_[C]=y}function z(_,y){return _[y]}function S(_,y,C){_[C]=y}},36260:(Tt,Fe,f)=>{f.d(Fe,{V:()=>h,o:()=>I});class I{constructor($){this.fn=$,this.lastCache=void 0,this.lastArgKey=void 0}get($){const x=JSON.stringify($);return this.lastArgKey!==x&&(this.lastArgKey=x,this.lastCache=this.fn($)),this.lastCache}}class h{constructor($){this.fn=$,this._map=new Map}get cachedValues(){return this._map}get($){if(this._map.has($))return this._map.get($);const x=this.fn($);return this._map.set($,x),x}}},78903:(Tt,Fe,f)=>{f.d(Fe,{Q:()=>x,X:()=>te});var I=f(2106);const h=Object.freeze(function(ie,Q){const J=setTimeout(ie.bind(Q),0);return{dispose(){clearTimeout(J)}}});var te;(function(ie){function Q(J){return J===ie.None||J===ie.Cancelled||J instanceof $?!0:!J||typeof J!="object"?!1:typeof J.isCancellationRequested=="boolean"&&typeof J.onCancellationRequested=="function"}ie.isCancellationToken=Q,ie.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:I.Jh.None}),ie.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:h})})(te||(te={}));class ${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?h:(this._emitter||(this._emitter=new I.vl),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class x{constructor(Q){this._token=void 0,this._parentListener=void 0,this._parentListener=Q&&Q.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new $),this._token}cancel(){this._token?this._token instanceof $&&this._token.cancel():this._token=te.Cancelled}dispose(Q=!1){Q&&this.cancel(),this._parentListener&&this._parentListener.dispose(),this._token?this._token instanceof $&&this._token.dispose():this._token=te.None}}},26048:(Tt,Fe,f)=>{f.d(Fe,{R$:()=>I,W6:()=>h,j3:()=>te});function I($){return $?$.replace(/\$\((.*?)\)/g,(x,ie)=>` ${ie} `).trim():""}class h{constructor(x,ie,Q){this.id=x,this.definition=ie,this.description=Q,h._allCodicons.push(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}static getAll(){return h._allCodicons}}h._allCodicons=[],h.add=new h("add",{fontCharacter:"\\ea60"}),h.plus=new h("plus",h.add.definition),h.gistNew=new h("gist-new",h.add.definition),h.repoCreate=new h("repo-create",h.add.definition),h.lightbulb=new h("lightbulb",{fontCharacter:"\\ea61"}),h.lightBulb=new h("light-bulb",{fontCharacter:"\\ea61"}),h.repo=new h("repo",{fontCharacter:"\\ea62"}),h.repoDelete=new h("repo-delete",{fontCharacter:"\\ea62"}),h.gistFork=new h("gist-fork",{fontCharacter:"\\ea63"}),h.repoForked=new h("repo-forked",{fontCharacter:"\\ea63"}),h.gitPullRequest=new h("git-pull-request",{fontCharacter:"\\ea64"}),h.gitPullRequestAbandoned=new h("git-pull-request-abandoned",{fontCharacter:"\\ea64"}),h.recordKeys=new h("record-keys",{fontCharacter:"\\ea65"}),h.keyboard=new h("keyboard",{fontCharacter:"\\ea65"}),h.tag=new h("tag",{fontCharacter:"\\ea66"}),h.tagAdd=new h("tag-add",{fontCharacter:"\\ea66"}),h.tagRemove=new h("tag-remove",{fontCharacter:"\\ea66"}),h.person=new h("person",{fontCharacter:"\\ea67"}),h.personFollow=new h("person-follow",{fontCharacter:"\\ea67"}),h.personOutline=new h("person-outline",{fontCharacter:"\\ea67"}),h.personFilled=new h("person-filled",{fontCharacter:"\\ea67"}),h.gitBranch=new h("git-branch",{fontCharacter:"\\ea68"}),h.gitBranchCreate=new h("git-branch-create",{fontCharacter:"\\ea68"}),h.gitBranchDelete=new h("git-branch-delete",{fontCharacter:"\\ea68"}),h.sourceControl=new h("source-control",{fontCharacter:"\\ea68"}),h.mirror=new h("mirror",{fontCharacter:"\\ea69"}),h.mirrorPublic=new h("mirror-public",{fontCharacter:"\\ea69"}),h.star=new h("star",{fontCharacter:"\\ea6a"}),h.starAdd=new h("star-add",{fontCharacter:"\\ea6a"}),h.starDelete=new h("star-delete",{fontCharacter:"\\ea6a"}),h.starEmpty=new h("star-empty",{fontCharacter:"\\ea6a"}),h.comment=new h("comment",{fontCharacter:"\\ea6b"}),h.commentAdd=new h("comment-add",{fontCharacter:"\\ea6b"}),h.alert=new h("alert",{fontCharacter:"\\ea6c"}),h.warning=new h("warning",{fontCharacter:"\\ea6c"}),h.search=new h("search",{fontCharacter:"\\ea6d"}),h.searchSave=new h("search-save",{fontCharacter:"\\ea6d"}),h.logOut=new h("log-out",{fontCharacter:"\\ea6e"}),h.signOut=new h("sign-out",{fontCharacter:"\\ea6e"}),h.logIn=new h("log-in",{fontCharacter:"\\ea6f"}),h.signIn=new h("sign-in",{fontCharacter:"\\ea6f"}),h.eye=new h("eye",{fontCharacter:"\\ea70"}),h.eyeUnwatch=new h("eye-unwatch",{fontCharacter:"\\ea70"}),h.eyeWatch=new h("eye-watch",{fontCharacter:"\\ea70"}),h.circleFilled=new h("circle-filled",{fontCharacter:"\\ea71"}),h.primitiveDot=new h("primitive-dot",{fontCharacter:"\\ea71"}),h.closeDirty=new h("close-dirty",{fontCharacter:"\\ea71"}),h.debugBreakpoint=new h("debug-breakpoint",{fontCharacter:"\\ea71"}),h.debugBreakpointDisabled=new h("debug-breakpoint-disabled",{fontCharacter:"\\ea71"}),h.debugHint=new h("debug-hint",{fontCharacter:"\\ea71"}),h.primitiveSquare=new h("primitive-square",{fontCharacter:"\\ea72"}),h.edit=new h("edit",{fontCharacter:"\\ea73"}),h.pencil=new h("pencil",{fontCharacter:"\\ea73"}),h.info=new h("info",{fontCharacter:"\\ea74"}),h.issueOpened=new h("issue-opened",{fontCharacter:"\\ea74"}),h.gistPrivate=new h("gist-private",{fontCharacter:"\\ea75"}),h.gitForkPrivate=new h("git-fork-private",{fontCharacter:"\\ea75"}),h.lock=new h("lock",{fontCharacter:"\\ea75"}),h.mirrorPrivate=new h("mirror-private",{fontCharacter:"\\ea75"}),h.close=new h("close",{fontCharacter:"\\ea76"}),h.removeClose=new h("remove-close",{fontCharacter:"\\ea76"}),h.x=new h("x",{fontCharacter:"\\ea76"}),h.repoSync=new h("repo-sync",{fontCharacter:"\\ea77"}),h.sync=new h("sync",{fontCharacter:"\\ea77"}),h.clone=new h("clone",{fontCharacter:"\\ea78"}),h.desktopDownload=new h("desktop-download",{fontCharacter:"\\ea78"}),h.beaker=new h("beaker",{fontCharacter:"\\ea79"}),h.microscope=new h("microscope",{fontCharacter:"\\ea79"}),h.vm=new h("vm",{fontCharacter:"\\ea7a"}),h.deviceDesktop=new h("device-desktop",{fontCharacter:"\\ea7a"}),h.file=new h("file",{fontCharacter:"\\ea7b"}),h.fileText=new h("file-text",{fontCharacter:"\\ea7b"}),h.more=new h("more",{fontCharacter:"\\ea7c"}),h.ellipsis=new h("ellipsis",{fontCharacter:"\\ea7c"}),h.kebabHorizontal=new h("kebab-horizontal",{fontCharacter:"\\ea7c"}),h.mailReply=new h("mail-reply",{fontCharacter:"\\ea7d"}),h.reply=new h("reply",{fontCharacter:"\\ea7d"}),h.organization=new h("organization",{fontCharacter:"\\ea7e"}),h.organizationFilled=new h("organization-filled",{fontCharacter:"\\ea7e"}),h.organizationOutline=new h("organization-outline",{fontCharacter:"\\ea7e"}),h.newFile=new h("new-file",{fontCharacter:"\\ea7f"}),h.fileAdd=new h("file-add",{fontCharacter:"\\ea7f"}),h.newFolder=new h("new-folder",{fontCharacter:"\\ea80"}),h.fileDirectoryCreate=new h("file-directory-create",{fontCharacter:"\\ea80"}),h.trash=new h("trash",{fontCharacter:"\\ea81"}),h.trashcan=new h("trashcan",{fontCharacter:"\\ea81"}),h.history=new h("history",{fontCharacter:"\\ea82"}),h.clock=new h("clock",{fontCharacter:"\\ea82"}),h.folder=new h("folder",{fontCharacter:"\\ea83"}),h.fileDirectory=new h("file-directory",{fontCharacter:"\\ea83"}),h.symbolFolder=new h("symbol-folder",{fontCharacter:"\\ea83"}),h.logoGithub=new h("logo-github",{fontCharacter:"\\ea84"}),h.markGithub=new h("mark-github",{fontCharacter:"\\ea84"}),h.github=new h("github",{fontCharacter:"\\ea84"}),h.terminal=new h("terminal",{fontCharacter:"\\ea85"}),h.console=new h("console",{fontCharacter:"\\ea85"}),h.repl=new h("repl",{fontCharacter:"\\ea85"}),h.zap=new h("zap",{fontCharacter:"\\ea86"}),h.symbolEvent=new h("symbol-event",{fontCharacter:"\\ea86"}),h.error=new h("error",{fontCharacter:"\\ea87"}),h.stop=new h("stop",{fontCharacter:"\\ea87"}),h.variable=new h("variable",{fontCharacter:"\\ea88"}),h.symbolVariable=new h("symbol-variable",{fontCharacter:"\\ea88"}),h.array=new h("array",{fontCharacter:"\\ea8a"}),h.symbolArray=new h("symbol-array",{fontCharacter:"\\ea8a"}),h.symbolModule=new h("symbol-module",{fontCharacter:"\\ea8b"}),h.symbolPackage=new h("symbol-package",{fontCharacter:"\\ea8b"}),h.symbolNamespace=new h("symbol-namespace",{fontCharacter:"\\ea8b"}),h.symbolObject=new h("symbol-object",{fontCharacter:"\\ea8b"}),h.symbolMethod=new h("symbol-method",{fontCharacter:"\\ea8c"}),h.symbolFunction=new h("symbol-function",{fontCharacter:"\\ea8c"}),h.symbolConstructor=new h("symbol-constructor",{fontCharacter:"\\ea8c"}),h.symbolBoolean=new h("symbol-boolean",{fontCharacter:"\\ea8f"}),h.symbolNull=new h("symbol-null",{fontCharacter:"\\ea8f"}),h.symbolNumeric=new h("symbol-numeric",{fontCharacter:"\\ea90"}),h.symbolNumber=new h("symbol-number",{fontCharacter:"\\ea90"}),h.symbolStructure=new h("symbol-structure",{fontCharacter:"\\ea91"}),h.symbolStruct=new h("symbol-struct",{fontCharacter:"\\ea91"}),h.symbolParameter=new h("symbol-parameter",{fontCharacter:"\\ea92"}),h.symbolTypeParameter=new h("symbol-type-parameter",{fontCharacter:"\\ea92"}),h.symbolKey=new h("symbol-key",{fontCharacter:"\\ea93"}),h.symbolText=new h("symbol-text",{fontCharacter:"\\ea93"}),h.symbolReference=new h("symbol-reference",{fontCharacter:"\\ea94"}),h.goToFile=new h("go-to-file",{fontCharacter:"\\ea94"}),h.symbolEnum=new h("symbol-enum",{fontCharacter:"\\ea95"}),h.symbolValue=new h("symbol-value",{fontCharacter:"\\ea95"}),h.symbolRuler=new h("symbol-ruler",{fontCharacter:"\\ea96"}),h.symbolUnit=new h("symbol-unit",{fontCharacter:"\\ea96"}),h.activateBreakpoints=new h("activate-breakpoints",{fontCharacter:"\\ea97"}),h.archive=new h("archive",{fontCharacter:"\\ea98"}),h.arrowBoth=new h("arrow-both",{fontCharacter:"\\ea99"}),h.arrowDown=new h("arrow-down",{fontCharacter:"\\ea9a"}),h.arrowLeft=new h("arrow-left",{fontCharacter:"\\ea9b"}),h.arrowRight=new h("arrow-right",{fontCharacter:"\\ea9c"}),h.arrowSmallDown=new h("arrow-small-down",{fontCharacter:"\\ea9d"}),h.arrowSmallLeft=new h("arrow-small-left",{fontCharacter:"\\ea9e"}),h.arrowSmallRight=new h("arrow-small-right",{fontCharacter:"\\ea9f"}),h.arrowSmallUp=new h("arrow-small-up",{fontCharacter:"\\eaa0"}),h.arrowUp=new h("arrow-up",{fontCharacter:"\\eaa1"}),h.bell=new h("bell",{fontCharacter:"\\eaa2"}),h.bold=new h("bold",{fontCharacter:"\\eaa3"}),h.book=new h("book",{fontCharacter:"\\eaa4"}),h.bookmark=new h("bookmark",{fontCharacter:"\\eaa5"}),h.debugBreakpointConditionalUnverified=new h("debug-breakpoint-conditional-unverified",{fontCharacter:"\\eaa6"}),h.debugBreakpointConditional=new h("debug-breakpoint-conditional",{fontCharacter:"\\eaa7"}),h.debugBreakpointConditionalDisabled=new h("debug-breakpoint-conditional-disabled",{fontCharacter:"\\eaa7"}),h.debugBreakpointDataUnverified=new h("debug-breakpoint-data-unverified",{fontCharacter:"\\eaa8"}),h.debugBreakpointData=new h("debug-breakpoint-data",{fontCharacter:"\\eaa9"}),h.debugBreakpointDataDisabled=new h("debug-breakpoint-data-disabled",{fontCharacter:"\\eaa9"}),h.debugBreakpointLogUnverified=new h("debug-breakpoint-log-unverified",{fontCharacter:"\\eaaa"}),h.debugBreakpointLog=new h("debug-breakpoint-log",{fontCharacter:"\\eaab"}),h.debugBreakpointLogDisabled=new h("debug-breakpoint-log-disabled",{fontCharacter:"\\eaab"}),h.briefcase=new h("briefcase",{fontCharacter:"\\eaac"}),h.broadcast=new h("broadcast",{fontCharacter:"\\eaad"}),h.browser=new h("browser",{fontCharacter:"\\eaae"}),h.bug=new h("bug",{fontCharacter:"\\eaaf"}),h.calendar=new h("calendar",{fontCharacter:"\\eab0"}),h.caseSensitive=new h("case-sensitive",{fontCharacter:"\\eab1"}),h.check=new h("check",{fontCharacter:"\\eab2"}),h.checklist=new h("checklist",{fontCharacter:"\\eab3"}),h.chevronDown=new h("chevron-down",{fontCharacter:"\\eab4"}),h.dropDownButton=new h("drop-down-button",h.chevronDown.definition),h.chevronLeft=new h("chevron-left",{fontCharacter:"\\eab5"}),h.chevronRight=new h("chevron-right",{fontCharacter:"\\eab6"}),h.chevronUp=new h("chevron-up",{fontCharacter:"\\eab7"}),h.chromeClose=new h("chrome-close",{fontCharacter:"\\eab8"}),h.chromeMaximize=new h("chrome-maximize",{fontCharacter:"\\eab9"}),h.chromeMinimize=new h("chrome-minimize",{fontCharacter:"\\eaba"}),h.chromeRestore=new h("chrome-restore",{fontCharacter:"\\eabb"}),h.circleOutline=new h("circle-outline",{fontCharacter:"\\eabc"}),h.debugBreakpointUnverified=new h("debug-breakpoint-unverified",{fontCharacter:"\\eabc"}),h.circleSlash=new h("circle-slash",{fontCharacter:"\\eabd"}),h.circuitBoard=new h("circuit-board",{fontCharacter:"\\eabe"}),h.clearAll=new h("clear-all",{fontCharacter:"\\eabf"}),h.clippy=new h("clippy",{fontCharacter:"\\eac0"}),h.closeAll=new h("close-all",{fontCharacter:"\\eac1"}),h.cloudDownload=new h("cloud-download",{fontCharacter:"\\eac2"}),h.cloudUpload=new h("cloud-upload",{fontCharacter:"\\eac3"}),h.code=new h("code",{fontCharacter:"\\eac4"}),h.collapseAll=new h("collapse-all",{fontCharacter:"\\eac5"}),h.colorMode=new h("color-mode",{fontCharacter:"\\eac6"}),h.commentDiscussion=new h("comment-discussion",{fontCharacter:"\\eac7"}),h.compareChanges=new h("compare-changes",{fontCharacter:"\\eafd"}),h.creditCard=new h("credit-card",{fontCharacter:"\\eac9"}),h.dash=new h("dash",{fontCharacter:"\\eacc"}),h.dashboard=new h("dashboard",{fontCharacter:"\\eacd"}),h.database=new h("database",{fontCharacter:"\\eace"}),h.debugContinue=new h("debug-continue",{fontCharacter:"\\eacf"}),h.debugDisconnect=new h("debug-disconnect",{fontCharacter:"\\ead0"}),h.debugPause=new h("debug-pause",{fontCharacter:"\\ead1"}),h.debugRestart=new h("debug-restart",{fontCharacter:"\\ead2"}),h.debugStart=new h("debug-start",{fontCharacter:"\\ead3"}),h.debugStepInto=new h("debug-step-into",{fontCharacter:"\\ead4"}),h.debugStepOut=new h("debug-step-out",{fontCharacter:"\\ead5"}),h.debugStepOver=new h("debug-step-over",{fontCharacter:"\\ead6"}),h.debugStop=new h("debug-stop",{fontCharacter:"\\ead7"}),h.debug=new h("debug",{fontCharacter:"\\ead8"}),h.deviceCameraVideo=new h("device-camera-video",{fontCharacter:"\\ead9"}),h.deviceCamera=new h("device-camera",{fontCharacter:"\\eada"}),h.deviceMobile=new h("device-mobile",{fontCharacter:"\\eadb"}),h.diffAdded=new h("diff-added",{fontCharacter:"\\eadc"}),h.diffIgnored=new h("diff-ignored",{fontCharacter:"\\eadd"}),h.diffModified=new h("diff-modified",{fontCharacter:"\\eade"}),h.diffRemoved=new h("diff-removed",{fontCharacter:"\\eadf"}),h.diffRenamed=new h("diff-renamed",{fontCharacter:"\\eae0"}),h.diff=new h("diff",{fontCharacter:"\\eae1"}),h.discard=new h("discard",{fontCharacter:"\\eae2"}),h.editorLayout=new h("editor-layout",{fontCharacter:"\\eae3"}),h.emptyWindow=new h("empty-window",{fontCharacter:"\\eae4"}),h.exclude=new h("exclude",{fontCharacter:"\\eae5"}),h.extensions=new h("extensions",{fontCharacter:"\\eae6"}),h.eyeClosed=new h("eye-closed",{fontCharacter:"\\eae7"}),h.fileBinary=new h("file-binary",{fontCharacter:"\\eae8"}),h.fileCode=new h("file-code",{fontCharacter:"\\eae9"}),h.fileMedia=new h("file-media",{fontCharacter:"\\eaea"}),h.filePdf=new h("file-pdf",{fontCharacter:"\\eaeb"}),h.fileSubmodule=new h("file-submodule",{fontCharacter:"\\eaec"}),h.fileSymlinkDirectory=new h("file-symlink-directory",{fontCharacter:"\\eaed"}),h.fileSymlinkFile=new h("file-symlink-file",{fontCharacter:"\\eaee"}),h.fileZip=new h("file-zip",{fontCharacter:"\\eaef"}),h.files=new h("files",{fontCharacter:"\\eaf0"}),h.filter=new h("filter",{fontCharacter:"\\eaf1"}),h.flame=new h("flame",{fontCharacter:"\\eaf2"}),h.foldDown=new h("fold-down",{fontCharacter:"\\eaf3"}),h.foldUp=new h("fold-up",{fontCharacter:"\\eaf4"}),h.fold=new h("fold",{fontCharacter:"\\eaf5"}),h.folderActive=new h("folder-active",{fontCharacter:"\\eaf6"}),h.folderOpened=new h("folder-opened",{fontCharacter:"\\eaf7"}),h.gear=new h("gear",{fontCharacter:"\\eaf8"}),h.gift=new h("gift",{fontCharacter:"\\eaf9"}),h.gistSecret=new h("gist-secret",{fontCharacter:"\\eafa"}),h.gist=new h("gist",{fontCharacter:"\\eafb"}),h.gitCommit=new h("git-commit",{fontCharacter:"\\eafc"}),h.gitCompare=new h("git-compare",{fontCharacter:"\\eafd"}),h.gitMerge=new h("git-merge",{fontCharacter:"\\eafe"}),h.githubAction=new h("github-action",{fontCharacter:"\\eaff"}),h.githubAlt=new h("github-alt",{fontCharacter:"\\eb00"}),h.globe=new h("globe",{fontCharacter:"\\eb01"}),h.grabber=new h("grabber",{fontCharacter:"\\eb02"}),h.graph=new h("graph",{fontCharacter:"\\eb03"}),h.gripper=new h("gripper",{fontCharacter:"\\eb04"}),h.heart=new h("heart",{fontCharacter:"\\eb05"}),h.home=new h("home",{fontCharacter:"\\eb06"}),h.horizontalRule=new h("horizontal-rule",{fontCharacter:"\\eb07"}),h.hubot=new h("hubot",{fontCharacter:"\\eb08"}),h.inbox=new h("inbox",{fontCharacter:"\\eb09"}),h.issueClosed=new h("issue-closed",{fontCharacter:"\\eba4"}),h.issueReopened=new h("issue-reopened",{fontCharacter:"\\eb0b"}),h.issues=new h("issues",{fontCharacter:"\\eb0c"}),h.italic=new h("italic",{fontCharacter:"\\eb0d"}),h.jersey=new h("jersey",{fontCharacter:"\\eb0e"}),h.json=new h("json",{fontCharacter:"\\eb0f"}),h.kebabVertical=new h("kebab-vertical",{fontCharacter:"\\eb10"}),h.key=new h("key",{fontCharacter:"\\eb11"}),h.law=new h("law",{fontCharacter:"\\eb12"}),h.lightbulbAutofix=new h("lightbulb-autofix",{fontCharacter:"\\eb13"}),h.linkExternal=new h("link-external",{fontCharacter:"\\eb14"}),h.link=new h("link",{fontCharacter:"\\eb15"}),h.listOrdered=new h("list-ordered",{fontCharacter:"\\eb16"}),h.listUnordered=new h("list-unordered",{fontCharacter:"\\eb17"}),h.liveShare=new h("live-share",{fontCharacter:"\\eb18"}),h.loading=new h("loading",{fontCharacter:"\\eb19"}),h.location=new h("location",{fontCharacter:"\\eb1a"}),h.mailRead=new h("mail-read",{fontCharacter:"\\eb1b"}),h.mail=new h("mail",{fontCharacter:"\\eb1c"}),h.markdown=new h("markdown",{fontCharacter:"\\eb1d"}),h.megaphone=new h("megaphone",{fontCharacter:"\\eb1e"}),h.mention=new h("mention",{fontCharacter:"\\eb1f"}),h.milestone=new h("milestone",{fontCharacter:"\\eb20"}),h.mortarBoard=new h("mortar-board",{fontCharacter:"\\eb21"}),h.move=new h("move",{fontCharacter:"\\eb22"}),h.multipleWindows=new h("multiple-windows",{fontCharacter:"\\eb23"}),h.mute=new h("mute",{fontCharacter:"\\eb24"}),h.noNewline=new h("no-newline",{fontCharacter:"\\eb25"}),h.note=new h("note",{fontCharacter:"\\eb26"}),h.octoface=new h("octoface",{fontCharacter:"\\eb27"}),h.openPreview=new h("open-preview",{fontCharacter:"\\eb28"}),h.package_=new h("package",{fontCharacter:"\\eb29"}),h.paintcan=new h("paintcan",{fontCharacter:"\\eb2a"}),h.pin=new h("pin",{fontCharacter:"\\eb2b"}),h.play=new h("play",{fontCharacter:"\\eb2c"}),h.run=new h("run",{fontCharacter:"\\eb2c"}),h.plug=new h("plug",{fontCharacter:"\\eb2d"}),h.preserveCase=new h("preserve-case",{fontCharacter:"\\eb2e"}),h.preview=new h("preview",{fontCharacter:"\\eb2f"}),h.project=new h("project",{fontCharacter:"\\eb30"}),h.pulse=new h("pulse",{fontCharacter:"\\eb31"}),h.question=new h("question",{fontCharacter:"\\eb32"}),h.quote=new h("quote",{fontCharacter:"\\eb33"}),h.radioTower=new h("radio-tower",{fontCharacter:"\\eb34"}),h.reactions=new h("reactions",{fontCharacter:"\\eb35"}),h.references=new h("references",{fontCharacter:"\\eb36"}),h.refresh=new h("refresh",{fontCharacter:"\\eb37"}),h.regex=new h("regex",{fontCharacter:"\\eb38"}),h.remoteExplorer=new h("remote-explorer",{fontCharacter:"\\eb39"}),h.remote=new h("remote",{fontCharacter:"\\eb3a"}),h.remove=new h("remove",{fontCharacter:"\\eb3b"}),h.replaceAll=new h("replace-all",{fontCharacter:"\\eb3c"}),h.replace=new h("replace",{fontCharacter:"\\eb3d"}),h.repoClone=new h("repo-clone",{fontCharacter:"\\eb3e"}),h.repoForcePush=new h("repo-force-push",{fontCharacter:"\\eb3f"}),h.repoPull=new h("repo-pull",{fontCharacter:"\\eb40"}),h.repoPush=new h("repo-push",{fontCharacter:"\\eb41"}),h.report=new h("report",{fontCharacter:"\\eb42"}),h.requestChanges=new h("request-changes",{fontCharacter:"\\eb43"}),h.rocket=new h("rocket",{fontCharacter:"\\eb44"}),h.rootFolderOpened=new h("root-folder-opened",{fontCharacter:"\\eb45"}),h.rootFolder=new h("root-folder",{fontCharacter:"\\eb46"}),h.rss=new h("rss",{fontCharacter:"\\eb47"}),h.ruby=new h("ruby",{fontCharacter:"\\eb48"}),h.saveAll=new h("save-all",{fontCharacter:"\\eb49"}),h.saveAs=new h("save-as",{fontCharacter:"\\eb4a"}),h.save=new h("save",{fontCharacter:"\\eb4b"}),h.screenFull=new h("screen-full",{fontCharacter:"\\eb4c"}),h.screenNormal=new h("screen-normal",{fontCharacter:"\\eb4d"}),h.searchStop=new h("search-stop",{fontCharacter:"\\eb4e"}),h.server=new h("server",{fontCharacter:"\\eb50"}),h.settingsGear=new h("settings-gear",{fontCharacter:"\\eb51"}),h.settings=new h("settings",{fontCharacter:"\\eb52"}),h.shield=new h("shield",{fontCharacter:"\\eb53"}),h.smiley=new h("smiley",{fontCharacter:"\\eb54"}),h.sortPrecedence=new h("sort-precedence",{fontCharacter:"\\eb55"}),h.splitHorizontal=new h("split-horizontal",{fontCharacter:"\\eb56"}),h.splitVertical=new h("split-vertical",{fontCharacter:"\\eb57"}),h.squirrel=new h("squirrel",{fontCharacter:"\\eb58"}),h.starFull=new h("star-full",{fontCharacter:"\\eb59"}),h.starHalf=new h("star-half",{fontCharacter:"\\eb5a"}),h.symbolClass=new h("symbol-class",{fontCharacter:"\\eb5b"}),h.symbolColor=new h("symbol-color",{fontCharacter:"\\eb5c"}),h.symbolCustomColor=new h("symbol-customcolor",{fontCharacter:"\\eb5c"}),h.symbolConstant=new h("symbol-constant",{fontCharacter:"\\eb5d"}),h.symbolEnumMember=new h("symbol-enum-member",{fontCharacter:"\\eb5e"}),h.symbolField=new h("symbol-field",{fontCharacter:"\\eb5f"}),h.symbolFile=new h("symbol-file",{fontCharacter:"\\eb60"}),h.symbolInterface=new h("symbol-interface",{fontCharacter:"\\eb61"}),h.symbolKeyword=new h("symbol-keyword",{fontCharacter:"\\eb62"}),h.symbolMisc=new h("symbol-misc",{fontCharacter:"\\eb63"}),h.symbolOperator=new h("symbol-operator",{fontCharacter:"\\eb64"}),h.symbolProperty=new h("symbol-property",{fontCharacter:"\\eb65"}),h.wrench=new h("wrench",{fontCharacter:"\\eb65"}),h.wrenchSubaction=new h("wrench-subaction",{fontCharacter:"\\eb65"}),h.symbolSnippet=new h("symbol-snippet",{fontCharacter:"\\eb66"}),h.tasklist=new h("tasklist",{fontCharacter:"\\eb67"}),h.telescope=new h("telescope",{fontCharacter:"\\eb68"}),h.textSize=new h("text-size",{fontCharacter:"\\eb69"}),h.threeBars=new h("three-bars",{fontCharacter:"\\eb6a"}),h.thumbsdown=new h("thumbsdown",{fontCharacter:"\\eb6b"}),h.thumbsup=new h("thumbsup",{fontCharacter:"\\eb6c"}),h.tools=new h("tools",{fontCharacter:"\\eb6d"}),h.triangleDown=new h("triangle-down",{fontCharacter:"\\eb6e"}),h.triangleLeft=new h("triangle-left",{fontCharacter:"\\eb6f"}),h.triangleRight=new h("triangle-right",{fontCharacter:"\\eb70"}),h.triangleUp=new h("triangle-up",{fontCharacter:"\\eb71"}),h.twitter=new h("twitter",{fontCharacter:"\\eb72"}),h.unfold=new h("unfold",{fontCharacter:"\\eb73"}),h.unlock=new h("unlock",{fontCharacter:"\\eb74"}),h.unmute=new h("unmute",{fontCharacter:"\\eb75"}),h.unverified=new h("unverified",{fontCharacter:"\\eb76"}),h.verified=new h("verified",{fontCharacter:"\\eb77"}),h.versions=new h("versions",{fontCharacter:"\\eb78"}),h.vmActive=new h("vm-active",{fontCharacter:"\\eb79"}),h.vmOutline=new h("vm-outline",{fontCharacter:"\\eb7a"}),h.vmRunning=new h("vm-running",{fontCharacter:"\\eb7b"}),h.watch=new h("watch",{fontCharacter:"\\eb7c"}),h.whitespace=new h("whitespace",{fontCharacter:"\\eb7d"}),h.wholeWord=new h("whole-word",{fontCharacter:"\\eb7e"}),h.window=new h("window",{fontCharacter:"\\eb7f"}),h.wordWrap=new h("word-wrap",{fontCharacter:"\\eb80"}),h.zoomIn=new h("zoom-in",{fontCharacter:"\\eb81"}),h.zoomOut=new h("zoom-out",{fontCharacter:"\\eb82"}),h.listFilter=new h("list-filter",{fontCharacter:"\\eb83"}),h.listFlat=new h("list-flat",{fontCharacter:"\\eb84"}),h.listSelection=new h("list-selection",{fontCharacter:"\\eb85"}),h.selection=new h("selection",{fontCharacter:"\\eb85"}),h.listTree=new h("list-tree",{fontCharacter:"\\eb86"}),h.debugBreakpointFunctionUnverified=new h("debug-breakpoint-function-unverified",{fontCharacter:"\\eb87"}),h.debugBreakpointFunction=new h("debug-breakpoint-function",{fontCharacter:"\\eb88"}),h.debugBreakpointFunctionDisabled=new h("debug-breakpoint-function-disabled",{fontCharacter:"\\eb88"}),h.debugStackframeActive=new h("debug-stackframe-active",{fontCharacter:"\\eb89"}),h.circleSmallFilled=new h("circle-small-filled",{fontCharacter:"\\eb8a"}),h.debugStackframeDot=new h("debug-stackframe-dot",h.circleSmallFilled.definition),h.debugStackframe=new h("debug-stackframe",{fontCharacter:"\\eb8b"}),h.debugStackframeFocused=new h("debug-stackframe-focused",{fontCharacter:"\\eb8b"}),h.debugBreakpointUnsupported=new h("debug-breakpoint-unsupported",{fontCharacter:"\\eb8c"}),h.symbolString=new h("symbol-string",{fontCharacter:"\\eb8d"}),h.debugReverseContinue=new h("debug-reverse-continue",{fontCharacter:"\\eb8e"}),h.debugStepBack=new h("debug-step-back",{fontCharacter:"\\eb8f"}),h.debugRestartFrame=new h("debug-restart-frame",{fontCharacter:"\\eb90"}),h.callIncoming=new h("call-incoming",{fontCharacter:"\\eb92"}),h.callOutgoing=new h("call-outgoing",{fontCharacter:"\\eb93"}),h.menu=new h("menu",{fontCharacter:"\\eb94"}),h.expandAll=new h("expand-all",{fontCharacter:"\\eb95"}),h.feedback=new h("feedback",{fontCharacter:"\\eb96"}),h.groupByRefType=new h("group-by-ref-type",{fontCharacter:"\\eb97"}),h.ungroupByRefType=new h("ungroup-by-ref-type",{fontCharacter:"\\eb98"}),h.account=new h("account",{fontCharacter:"\\eb99"}),h.bellDot=new h("bell-dot",{fontCharacter:"\\eb9a"}),h.debugConsole=new h("debug-console",{fontCharacter:"\\eb9b"}),h.library=new h("library",{fontCharacter:"\\eb9c"}),h.output=new h("output",{fontCharacter:"\\eb9d"}),h.runAll=new h("run-all",{fontCharacter:"\\eb9e"}),h.syncIgnored=new h("sync-ignored",{fontCharacter:"\\eb9f"}),h.pinned=new h("pinned",{fontCharacter:"\\eba0"}),h.githubInverted=new h("github-inverted",{fontCharacter:"\\eba1"}),h.debugAlt=new h("debug-alt",{fontCharacter:"\\eb91"}),h.serverProcess=new h("server-process",{fontCharacter:"\\eba2"}),h.serverEnvironment=new h("server-environment",{fontCharacter:"\\eba3"}),h.pass=new h("pass",{fontCharacter:"\\eba4"}),h.stopCircle=new h("stop-circle",{fontCharacter:"\\eba5"}),h.playCircle=new h("play-circle",{fontCharacter:"\\eba6"}),h.record=new h("record",{fontCharacter:"\\eba7"}),h.debugAltSmall=new h("debug-alt-small",{fontCharacter:"\\eba8"}),h.vmConnect=new h("vm-connect",{fontCharacter:"\\eba9"}),h.cloud=new h("cloud",{fontCharacter:"\\ebaa"}),h.merge=new h("merge",{fontCharacter:"\\ebab"}),h.exportIcon=new h("export",{fontCharacter:"\\ebac"}),h.graphLeft=new h("graph-left",{fontCharacter:"\\ebad"}),h.magnet=new h("magnet",{fontCharacter:"\\ebae"}),h.notebook=new h("notebook",{fontCharacter:"\\ebaf"}),h.redo=new h("redo",{fontCharacter:"\\ebb0"}),h.checkAll=new h("check-all",{fontCharacter:"\\ebb1"}),h.pinnedDirty=new h("pinned-dirty",{fontCharacter:"\\ebb2"}),h.passFilled=new h("pass-filled",{fontCharacter:"\\ebb3"}),h.circleLargeFilled=new h("circle-large-filled",{fontCharacter:"\\ebb4"}),h.circleLargeOutline=new h("circle-large-outline",{fontCharacter:"\\ebb5"}),h.combine=new h("combine",{fontCharacter:"\\ebb6"}),h.gather=new h("gather",{fontCharacter:"\\ebb6"}),h.table=new h("table",{fontCharacter:"\\ebb7"}),h.variableGroup=new h("variable-group",{fontCharacter:"\\ebb8"}),h.typeHierarchy=new h("type-hierarchy",{fontCharacter:"\\ebb9"}),h.typeHierarchySub=new h("type-hierarchy-sub",{fontCharacter:"\\ebba"}),h.typeHierarchySuper=new h("type-hierarchy-super",{fontCharacter:"\\ebbb"}),h.gitPullRequestCreate=new h("git-pull-request-create",{fontCharacter:"\\ebbc"}),h.runAbove=new h("run-above",{fontCharacter:"\\ebbd"}),h.runBelow=new h("run-below",{fontCharacter:"\\ebbe"}),h.notebookTemplate=new h("notebook-template",{fontCharacter:"\\ebbf"}),h.debugRerun=new h("debug-rerun",{fontCharacter:"\\ebc0"}),h.workspaceTrusted=new h("workspace-trusted",{fontCharacter:"\\ebc1"}),h.workspaceUntrusted=new h("workspace-untrusted",{fontCharacter:"\\ebc2"}),h.workspaceUnspecified=new h("workspace-unspecified",{fontCharacter:"\\ebc3"}),h.terminalCmd=new h("terminal-cmd",{fontCharacter:"\\ebc4"}),h.terminalDebian=new h("terminal-debian",{fontCharacter:"\\ebc5"}),h.terminalLinux=new h("terminal-linux",{fontCharacter:"\\ebc6"}),h.terminalPowershell=new h("terminal-powershell",{fontCharacter:"\\ebc7"}),h.terminalTmux=new h("terminal-tmux",{fontCharacter:"\\ebc8"}),h.terminalUbuntu=new h("terminal-ubuntu",{fontCharacter:"\\ebc9"}),h.terminalBash=new h("terminal-bash",{fontCharacter:"\\ebca"}),h.arrowSwap=new h("arrow-swap",{fontCharacter:"\\ebcb"}),h.copy=new h("copy",{fontCharacter:"\\ebcc"}),h.personAdd=new h("person-add",{fontCharacter:"\\ebcd"}),h.filterFilled=new h("filter-filled",{fontCharacter:"\\ebce"}),h.wand=new h("wand",{fontCharacter:"\\ebcf"}),h.debugLineByLine=new h("debug-line-by-line",{fontCharacter:"\\ebd0"}),h.inspect=new h("inspect",{fontCharacter:"\\ebd1"}),h.layers=new h("layers",{fontCharacter:"\\ebd2"}),h.layersDot=new h("layers-dot",{fontCharacter:"\\ebd3"}),h.layersActive=new h("layers-active",{fontCharacter:"\\ebd4"}),h.compass=new h("compass",{fontCharacter:"\\ebd5"}),h.compassDot=new h("compass-dot",{fontCharacter:"\\ebd6"}),h.compassActive=new h("compass-active",{fontCharacter:"\\ebd7"}),h.azure=new h("azure",{fontCharacter:"\\ebd8"}),h.issueDraft=new h("issue-draft",{fontCharacter:"\\ebd9"}),h.gitPullRequestClosed=new h("git-pull-request-closed",{fontCharacter:"\\ebda"}),h.gitPullRequestDraft=new h("git-pull-request-draft",{fontCharacter:"\\ebdb"}),h.debugAll=new h("debug-all",{fontCharacter:"\\ebdc"}),h.debugCoverage=new h("debug-coverage",{fontCharacter:"\\ebdd"}),h.runErrors=new h("run-errors",{fontCharacter:"\\ebde"}),h.folderLibrary=new h("folder-library",{fontCharacter:"\\ebdf"}),h.debugContinueSmall=new h("debug-continue-small",{fontCharacter:"\\ebe0"}),h.beakerStop=new h("beaker-stop",{fontCharacter:"\\ebe1"}),h.graphLine=new h("graph-line",{fontCharacter:"\\ebe2"}),h.graphScatter=new h("graph-scatter",{fontCharacter:"\\ebe3"}),h.pieChart=new h("pie-chart",{fontCharacter:"\\ebe4"}),h.bracket=new h("bracket",h.json.definition),h.bracketDot=new h("bracket-dot",{fontCharacter:"\\ebe5"}),h.bracketError=new h("bracket-error",{fontCharacter:"\\ebe6"}),h.lockSmall=new h("lock-small",{fontCharacter:"\\ebe7"}),h.azureDevops=new h("azure-devops",{fontCharacter:"\\ebe8"}),h.verifiedFilled=new h("verified-filled",{fontCharacter:"\\ebe9"}),h.newLine=new h("newline",{fontCharacter:"\\ebea"}),h.layout=new h("layout",{fontCharacter:"\\ebeb"}),h.layoutActivitybarLeft=new h("layout-activitybar-left",{fontCharacter:"\\ebec"}),h.layoutActivitybarRight=new h("layout-activitybar-right",{fontCharacter:"\\ebed"}),h.layoutPanelLeft=new h("layout-panel-left",{fontCharacter:"\\ebee"}),h.layoutPanelCenter=new h("layout-panel-center",{fontCharacter:"\\ebef"}),h.layoutPanelJustify=new h("layout-panel-justify",{fontCharacter:"\\ebf0"}),h.layoutPanelRight=new h("layout-panel-right",{fontCharacter:"\\ebf1"}),h.layoutPanel=new h("layout-panel",{fontCharacter:"\\ebf2"}),h.layoutSidebarLeft=new h("layout-sidebar-left",{fontCharacter:"\\ebf3"}),h.layoutSidebarRight=new h("layout-sidebar-right",{fontCharacter:"\\ebf4"}),h.layoutStatusbar=new h("layout-statusbar",{fontCharacter:"\\ebf5"}),h.layoutMenubar=new h("layout-menubar",{fontCharacter:"\\ebf6"}),h.layoutCentered=new h("layout-centered",{fontCharacter:"\\ebf7"}),h.layoutSidebarRightOff=new h("layout-sidebar-right-off",{fontCharacter:"\\ec00"}),h.layoutPanelOff=new h("layout-panel-off",{fontCharacter:"\\ec01"}),h.layoutSidebarLeftOff=new h("layout-sidebar-left-off",{fontCharacter:"\\ec02"}),h.target=new h("target",{fontCharacter:"\\ebf8"}),h.indent=new h("indent",{fontCharacter:"\\ebf9"}),h.recordSmall=new h("record-small",{fontCharacter:"\\ebfa"}),h.errorSmall=new h("error-small",{fontCharacter:"\\ebfb"}),h.arrowCircleDown=new h("arrow-circle-down",{fontCharacter:"\\ebfc"}),h.arrowCircleLeft=new h("arrow-circle-left",{fontCharacter:"\\ebfd"}),h.arrowCircleRight=new h("arrow-circle-right",{fontCharacter:"\\ebfe"}),h.arrowCircleUp=new h("arrow-circle-up",{fontCharacter:"\\ebff"}),h.heartFilled=new h("heart-filled",{fontCharacter:"\\ec04"}),h.map=new h("map",{fontCharacter:"\\ec05"}),h.mapFilled=new h("map-filled",{fontCharacter:"\\ec06"}),h.circleSmall=new h("circle-small",{fontCharacter:"\\ec07"}),h.bellSlash=new h("bell-slash",{fontCharacter:"\\ec08"}),h.bellSlashDot=new h("bell-slash-dot",{fontCharacter:"\\ec09"}),h.commentUnresolved=new h("comment-unresolved",{fontCharacter:"\\ec0a"}),h.gitPullRequestGoToChanges=new h("git-pull-request-go-to-changes",{fontCharacter:"\\ec0b"}),h.gitPullRequestNewChanges=new h("git-pull-request-new-changes",{fontCharacter:"\\ec0c"}),h.dialogError=new h("dialog-error",h.error.definition),h.dialogWarning=new h("dialog-warning",h.warning.definition),h.dialogInfo=new h("dialog-info",h.info.definition),h.dialogClose=new h("dialog-close",h.close.definition),h.treeItemExpanded=new h("tree-item-expanded",h.chevronDown.definition),h.treeFilterOnTypeOn=new h("tree-filter-on-type-on",h.listFilter.definition),h.treeFilterOnTypeOff=new h("tree-filter-on-type-off",h.listSelection.definition),h.treeFilterClear=new h("tree-filter-clear",h.close.definition),h.treeItemLoading=new h("tree-item-loading",h.loading.definition),h.menuSelection=new h("menu-selection",h.check.definition),h.menuSubmenu=new h("menu-submenu",h.chevronRight.definition),h.menuBarMore=new h("menubar-more",h.more.definition),h.scrollbarButtonLeft=new h("scrollbar-button-left",h.triangleLeft.definition),h.scrollbarButtonRight=new h("scrollbar-button-right",h.triangleRight.definition),h.scrollbarButtonUp=new h("scrollbar-button-up",h.triangleUp.definition),h.scrollbarButtonDown=new h("scrollbar-button-down",h.triangleDown.definition),h.toolBarMore=new h("toolbar-more",h.more.definition),h.quickInputBack=new h("quick-input-back",h.arrowLeft.definition);var te;(function($){$.iconNameSegment="[A-Za-z0-9]+",$.iconNameExpression="[A-Za-z0-9-]+",$.iconModifierExpression="~[A-Za-z]+",$.iconNameCharacter="[A-Za-z0-9~-]";const x=new RegExp(`^(${$.iconNameExpression})(${$.iconModifierExpression})?$`);function ie(z){if(z instanceof h)return["codicon","codicon-"+z.id];const S=x.exec(z.id);if(!S)return ie(h.error);const[,_,y]=S,C=["codicon","codicon-"+_];return y&&C.push("codicon-modifier-"+y.substr(1)),C}$.asClassNameArray=ie;function Q(z){return ie(z).join(" ")}$.asClassName=Q;function J(z){return"."+ie(z).join(".")}$.asCSSSelector=J})(te||(te={}))},94901:(Tt,Fe,f)=>{f.d(Fe,{$J:()=>$,Q1:()=>x,bU:()=>h});function I(ie,Q){const J=Math.pow(10,Q);return Math.round(ie*J)/J}class h{constructor(Q,J,z,S=1){this._rgbaBrand=void 0,this.r=Math.min(255,Math.max(0,Q))|0,this.g=Math.min(255,Math.max(0,J))|0,this.b=Math.min(255,Math.max(0,z))|0,this.a=I(Math.max(Math.min(1,S),0),3)}static equals(Q,J){return Q.r===J.r&&Q.g===J.g&&Q.b===J.b&&Q.a===J.a}}class te{constructor(Q,J,z,S){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,Q),0)|0,this.s=I(Math.max(Math.min(1,J),0),3),this.l=I(Math.max(Math.min(1,z),0),3),this.a=I(Math.max(Math.min(1,S),0),3)}static equals(Q,J){return Q.h===J.h&&Q.s===J.s&&Q.l===J.l&&Q.a===J.a}static fromRGBA(Q){const J=Q.r/255,z=Q.g/255,S=Q.b/255,_=Q.a,y=Math.max(J,z,S),C=Math.min(J,z,S);let d=0,w=0;const D=(C+y)/2,L=y-C;if(L>0){switch(w=Math.min(D<=.5?L/(2*D):L/(2-2*D),1),y){case J:d=(z-S)/L+(z<S?6:0);break;case z:d=(S-J)/L+2;break;case S:d=(J-z)/L+4;break}d*=60,d=Math.round(d)}return new te(d,w,D,_)}static _hue2rgb(Q,J,z){return z<0&&(z+=1),z>1&&(z-=1),z<1/6?Q+(J-Q)*6*z:z<1/2?J:z<2/3?Q+(J-Q)*(2/3-z)*6:Q}static toRGBA(Q){const J=Q.h/360,{s:z,l:S,a:_}=Q;let y,C,d;if(z===0)y=C=d=S;else{const w=S<.5?S*(1+z):S+z-S*z,D=2*S-w;y=te._hue2rgb(D,w,J+1/3),C=te._hue2rgb(D,w,J),d=te._hue2rgb(D,w,J-1/3)}return new h(Math.round(y*255),Math.round(C*255),Math.round(d*255),_)}}class ${constructor(Q,J,z,S){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,Q),0)|0,this.s=I(Math.max(Math.min(1,J),0),3),this.v=I(Math.max(Math.min(1,z),0),3),this.a=I(Math.max(Math.min(1,S),0),3)}static equals(Q,J){return Q.h===J.h&&Q.s===J.s&&Q.v===J.v&&Q.a===J.a}static fromRGBA(Q){const J=Q.r/255,z=Q.g/255,S=Q.b/255,_=Math.max(J,z,S),y=Math.min(J,z,S),C=_-y,d=_===0?0:C/_;let w;return C===0?w=0:_===J?w=((z-S)/C%6+6)%6:_===z?w=(S-J)/C+2:w=(J-z)/C+4,new $(Math.round(w*60),d,_,Q.a)}static toRGBA(Q){const{h:J,s:z,v:S,a:_}=Q,y=S*z,C=y*(1-Math.abs(J/60%2-1)),d=S-y;let[w,D,L]=[0,0,0];return J<60?(w=y,D=C):J<120?(w=C,D=y):J<180?(D=y,L=C):J<240?(D=C,L=y):J<300?(w=C,L=y):J<=360&&(w=y,L=C),w=Math.round((w+d)*255),D=Math.round((D+d)*255),L=Math.round((L+d)*255),new h(w,D,L,_)}}class x{constructor(Q){if(Q)if(Q instanceof h)this.rgba=Q;else if(Q instanceof te)this._hsla=Q,this.rgba=te.toRGBA(Q);else if(Q instanceof $)this._hsva=Q,this.rgba=$.toRGBA(Q);else throw new Error("Invalid color ctor argument");else throw new Error("Color needs a value")}static fromHex(Q){return x.Format.CSS.parseHex(Q)||x.red}get hsla(){return this._hsla?this._hsla:te.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:$.fromRGBA(this.rgba)}equals(Q){return!!Q&&h.equals(this.rgba,Q.rgba)&&te.equals(this.hsla,Q.hsla)&&$.equals(this.hsva,Q.hsva)}getRelativeLuminance(){const Q=x._relativeLuminanceForComponent(this.rgba.r),J=x._relativeLuminanceForComponent(this.rgba.g),z=x._relativeLuminanceForComponent(this.rgba.b),S=.2126*Q+.7152*J+.0722*z;return I(S,4)}static _relativeLuminanceForComponent(Q){const J=Q/255;return J<=.03928?J/12.92:Math.pow((J+.055)/1.055,2.4)}isLighter(){return(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3>=128}isLighterThan(Q){const J=this.getRelativeLuminance(),z=Q.getRelativeLuminance();return J>z}isDarkerThan(Q){const J=this.getRelativeLuminance(),z=Q.getRelativeLuminance();return J<z}lighten(Q){return new x(new te(this.hsla.h,this.hsla.s,this.hsla.l+this.hsla.l*Q,this.hsla.a))}darken(Q){return new x(new te(this.hsla.h,this.hsla.s,this.hsla.l-this.hsla.l*Q,this.hsla.a))}transparent(Q){const{r:J,g:z,b:S,a:_}=this.rgba;return new x(new h(J,z,S,_*Q))}isTransparent(){return this.rgba.a===0}isOpaque(){return this.rgba.a===1}opposite(){return new x(new h(255-this.rgba.r,255-this.rgba.g,255-this.rgba.b,this.rgba.a))}toString(){return this._toString||(this._toString=x.Format.CSS.format(this)),this._toString}static getLighterColor(Q,J,z){if(Q.isLighterThan(J))return Q;z=z||.5;const S=Q.getRelativeLuminance(),_=J.getRelativeLuminance();return z=z*(_-S)/_,Q.lighten(z)}static getDarkerColor(Q,J,z){if(Q.isDarkerThan(J))return Q;z=z||.5;const S=Q.getRelativeLuminance(),_=J.getRelativeLuminance();return z=z*(S-_)/S,Q.darken(z)}}x.white=new x(new h(255,255,255,1)),x.black=new x(new h(0,0,0,1)),x.red=new x(new h(255,0,0,1)),x.blue=new x(new h(0,0,255,1)),x.green=new x(new h(0,255,0,1)),x.cyan=new x(new h(0,255,255,1)),x.lightgrey=new x(new h(211,211,211,1)),x.transparent=new x(new h(0,0,0,0)),function(ie){let Q;(function(J){let z;(function(S){function _(B){return B.rgba.a===1?`rgb(${B.rgba.r}, ${B.rgba.g}, ${B.rgba.b})`:ie.Format.CSS.formatRGBA(B)}S.formatRGB=_;function y(B){return`rgba(${B.rgba.r}, ${B.rgba.g}, ${B.rgba.b}, ${+B.rgba.a.toFixed(2)})`}S.formatRGBA=y;function C(B){return B.hsla.a===1?`hsl(${B.hsla.h}, ${(B.hsla.s*100).toFixed(2)}%, ${(B.hsla.l*100).toFixed(2)}%)`:ie.Format.CSS.formatHSLA(B)}S.formatHSL=C;function d(B){return`hsla(${B.hsla.h}, ${(B.hsla.s*100).toFixed(2)}%, ${(B.hsla.l*100).toFixed(2)}%, ${B.hsla.a.toFixed(2)})`}S.formatHSLA=d;function w(B){const T=B.toString(16);return T.length!==2?"0"+T:T}function D(B){return`#${w(B.rgba.r)}${w(B.rgba.g)}${w(B.rgba.b)}`}S.formatHex=D;function L(B,T=!1){return T&&B.rgba.a===1?ie.Format.CSS.formatHex(B):`#${w(B.rgba.r)}${w(B.rgba.g)}${w(B.rgba.b)}${w(Math.round(B.rgba.a*255))}`}S.formatHexA=L;function k(B){return B.isOpaque()?ie.Format.CSS.formatHex(B):ie.Format.CSS.formatRGBA(B)}S.format=k;function j(B){const T=B.length;if(T===0||B.charCodeAt(0)!==35)return null;if(T===7){const H=16*N(B.charCodeAt(1))+N(B.charCodeAt(2)),Y=16*N(B.charCodeAt(3))+N(B.charCodeAt(4)),ee=16*N(B.charCodeAt(5))+N(B.charCodeAt(6));return new ie(new h(H,Y,ee,1))}if(T===9){const H=16*N(B.charCodeAt(1))+N(B.charCodeAt(2)),Y=16*N(B.charCodeAt(3))+N(B.charCodeAt(4)),ee=16*N(B.charCodeAt(5))+N(B.charCodeAt(6)),ce=16*N(B.charCodeAt(7))+N(B.charCodeAt(8));return new ie(new h(H,Y,ee,ce/255))}if(T===4){const H=N(B.charCodeAt(1)),Y=N(B.charCodeAt(2)),ee=N(B.charCodeAt(3));return new ie(new h(16*H+H,16*Y+Y,16*ee+ee))}if(T===5){const H=N(B.charCodeAt(1)),Y=N(B.charCodeAt(2)),ee=N(B.charCodeAt(3)),ce=N(B.charCodeAt(4));return new ie(new h(16*H+H,16*Y+Y,16*ee+ee,(16*ce+ce)/255))}return null}S.parseHex=j;function N(B){switch(B){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}})(z=J.CSS||(J.CSS={}))})(Q=ie.Format||(ie.Format={}))}(x||(x={}))},88846:(Tt,Fe,f)=>{f.d(Fe,{B:()=>I});function I(h,te,$){let x=null,ie=null;if(typeof $.value=="function"?(x="value",ie=$.value,ie.length!==0&&console.warn("Memoize should only be used in functions with zero parameters")):typeof $.get=="function"&&(x="get",ie=$.get),!ie)throw new Error("not supported");const Q=`$memoize$${te}`;$[x]=function(...J){return this.hasOwnProperty(Q)||Object.defineProperty(this,Q,{configurable:!1,enumerable:!1,writable:!1,value:ie.apply(this,J)}),this[Q]}}},2111:(Tt,Fe,f)=>{f.d(Fe,{uP:()=>J,F1:()=>$});class I{constructor(S,_,y,C){this.originalStart=S,this.originalLength=_,this.modifiedStart=y,this.modifiedLength=C}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}var h=f(22344);class te{constructor(S){this.source=S}getElements(){const S=this.source,_=new Int32Array(S.length);for(let y=0,C=S.length;y<C;y++)_[y]=S.charCodeAt(y);return _}}function $(z,S,_){return new J(new te(z),new te(S)).ComputeDiff(_).changes}class x{static Assert(S,_){if(!S)throw new Error(_)}}class ie{static Copy(S,_,y,C,d){for(let w=0;w<d;w++)y[C+w]=S[_+w]}static Copy2(S,_,y,C,d){for(let w=0;w<d;w++)y[C+w]=S[_+w]}}class Q{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 I(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(S,_){this.m_originalStart=Math.min(this.m_originalStart,S),this.m_modifiedStart=Math.min(this.m_modifiedStart,_),this.m_originalCount++}AddModifiedElement(S,_){this.m_originalStart=Math.min(this.m_originalStart,S),this.m_modifiedStart=Math.min(this.m_modifiedStart,_),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 J{constructor(S,_,y=null){this.ContinueProcessingPredicate=y,this._originalSequence=S,this._modifiedSequence=_;const[C,d,w]=J._getElements(S),[D,L,k]=J._getElements(_);this._hasStrings=w&&k,this._originalStringElements=C,this._originalElementsOrHash=d,this._modifiedStringElements=D,this._modifiedElementsOrHash=L,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(S){return S.length>0&&typeof S[0]=="string"}static _getElements(S){const _=S.getElements();if(J._isStringArray(_)){const y=new Int32Array(_.length);for(let C=0,d=_.length;C<d;C++)y[C]=(0,h.e2)(_[C],0);return[_,y,!0]}return _ instanceof Int32Array?[[],_,!1]:[[],new Int32Array(_),!1]}ElementsAreEqual(S,_){return this._originalElementsOrHash[S]!==this._modifiedElementsOrHash[_]?!1:this._hasStrings?this._originalStringElements[S]===this._modifiedStringElements[_]:!0}ElementsAreStrictEqual(S,_){if(!this.ElementsAreEqual(S,_))return!1;const y=J._getStrictElement(this._originalSequence,S),C=J._getStrictElement(this._modifiedSequence,_);return y===C}static _getStrictElement(S,_){return typeof S.getStrictElement=="function"?S.getStrictElement(_):null}OriginalElementsAreEqual(S,_){return this._originalElementsOrHash[S]!==this._originalElementsOrHash[_]?!1:this._hasStrings?this._originalStringElements[S]===this._originalStringElements[_]:!0}ModifiedElementsAreEqual(S,_){return this._modifiedElementsOrHash[S]!==this._modifiedElementsOrHash[_]?!1:this._hasStrings?this._modifiedStringElements[S]===this._modifiedStringElements[_]:!0}ComputeDiff(S){return this._ComputeDiff(0,this._originalElementsOrHash.length-1,0,this._modifiedElementsOrHash.length-1,S)}_ComputeDiff(S,_,y,C,d){const w=[!1];let D=this.ComputeDiffRecursive(S,_,y,C,w);return d&&(D=this.PrettifyChanges(D)),{quitEarly:w[0],changes:D}}ComputeDiffRecursive(S,_,y,C,d){for(d[0]=!1;S<=_&&y<=C&&this.ElementsAreEqual(S,y);)S++,y++;for(;_>=S&&C>=y&&this.ElementsAreEqual(_,C);)_--,C--;if(S>_||y>C){let N;return y<=C?(x.Assert(S===_+1,"originalStart should only be one more than originalEnd"),N=[new I(S,0,y,C-y+1)]):S<=_?(x.Assert(y===C+1,"modifiedStart should only be one more than modifiedEnd"),N=[new I(S,_-S+1,y,0)]):(x.Assert(S===_+1,"originalStart should only be one more than originalEnd"),x.Assert(y===C+1,"modifiedStart should only be one more than modifiedEnd"),N=[]),N}const w=[0],D=[0],L=this.ComputeRecursionPoint(S,_,y,C,w,D,d),k=w[0],j=D[0];if(L!==null)return L;if(!d[0]){const N=this.ComputeDiffRecursive(S,k,y,j,d);let B=[];return d[0]?B=[new I(k+1,_-(k+1)+1,j+1,C-(j+1)+1)]:B=this.ComputeDiffRecursive(k+1,_,j+1,C,d),this.ConcatenateChanges(N,B)}return[new I(S,_-S+1,y,C-y+1)]}WALKTRACE(S,_,y,C,d,w,D,L,k,j,N,B,T,H,Y,ee,ce,pe){let ge=null,fe=null,oe=new Q,Z=_,le=y,se=T[0]-ee[0]-C,X=-1073741824,K=this.m_forwardHistory.length-1;do{const he=se+S;he===Z||he<le&&k[he-1]<k[he+1]?(N=k[he+1],H=N-se-C,N<X&&oe.MarkNextChange(),X=N,oe.AddModifiedElement(N+1,H),se=he+1-S):(N=k[he-1]+1,H=N-se-C,N<X&&oe.MarkNextChange(),X=N-1,oe.AddOriginalElement(N,H+1),se=he-1-S),K>=0&&(k=this.m_forwardHistory[K],S=k[0],Z=1,le=k.length-1)}while(--K>=-1);if(ge=oe.getReverseChanges(),pe[0]){let he=T[0]+1,ve=ee[0]+1;if(ge!==null&&ge.length>0){const Ee=ge[ge.length-1];he=Math.max(he,Ee.getOriginalEnd()),ve=Math.max(ve,Ee.getModifiedEnd())}fe=[new I(he,B-he+1,ve,Y-ve+1)]}else{oe=new Q,Z=w,le=D,se=T[0]-ee[0]-L,X=1073741824,K=ce?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const he=se+d;he===Z||he<le&&j[he-1]>=j[he+1]?(N=j[he+1]-1,H=N-se-L,N>X&&oe.MarkNextChange(),X=N+1,oe.AddOriginalElement(N+1,H+1),se=he+1-d):(N=j[he-1],H=N-se-L,N>X&&oe.MarkNextChange(),X=N,oe.AddModifiedElement(N+1,H+1),se=he-1-d),K>=0&&(j=this.m_reverseHistory[K],d=j[0],Z=1,le=j.length-1)}while(--K>=-1);fe=oe.getChanges()}return this.ConcatenateChanges(ge,fe)}ComputeRecursionPoint(S,_,y,C,d,w,D){let L=0,k=0,j=0,N=0,B=0,T=0;S--,y--,d[0]=0,w[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const H=_-S+(C-y),Y=H+1,ee=new Int32Array(Y),ce=new Int32Array(Y),pe=C-y,ge=_-S,fe=S-y,oe=_-C,le=(ge-pe)%2===0;ee[pe]=S,ce[ge]=_,D[0]=!1;for(let se=1;se<=H/2+1;se++){let X=0,K=0;j=this.ClipDiagonalBound(pe-se,se,pe,Y),N=this.ClipDiagonalBound(pe+se,se,pe,Y);for(let ve=j;ve<=N;ve+=2){ve===j||ve<N&&ee[ve-1]<ee[ve+1]?L=ee[ve+1]:L=ee[ve-1]+1,k=L-(ve-pe)-fe;const Ee=L;for(;L<_&&k<C&&this.ElementsAreEqual(L+1,k+1);)L++,k++;if(ee[ve]=L,L+k>X+K&&(X=L,K=k),!le&&Math.abs(ve-ge)<=se-1&&L>=ce[ve])return d[0]=L,w[0]=k,Ee<=ce[ve]&&1447>0&&se<=1447+1?this.WALKTRACE(pe,j,N,fe,ge,B,T,oe,ee,ce,L,_,d,k,C,w,le,D):null}const he=(X-S+(K-y)-se)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(X,he))return D[0]=!0,d[0]=X,w[0]=K,he>0&&1447>0&&se<=1447+1?this.WALKTRACE(pe,j,N,fe,ge,B,T,oe,ee,ce,L,_,d,k,C,w,le,D):(S++,y++,[new I(S,_-S+1,y,C-y+1)]);B=this.ClipDiagonalBound(ge-se,se,ge,Y),T=this.ClipDiagonalBound(ge+se,se,ge,Y);for(let ve=B;ve<=T;ve+=2){ve===B||ve<T&&ce[ve-1]>=ce[ve+1]?L=ce[ve+1]-1:L=ce[ve-1],k=L-(ve-ge)-oe;const Ee=L;for(;L>S&&k>y&&this.ElementsAreEqual(L,k);)L--,k--;if(ce[ve]=L,le&&Math.abs(ve-pe)<=se&&L<=ee[ve])return d[0]=L,w[0]=k,Ee>=ee[ve]&&1447>0&&se<=1447+1?this.WALKTRACE(pe,j,N,fe,ge,B,T,oe,ee,ce,L,_,d,k,C,w,le,D):null}if(se<=1447){let ve=new Int32Array(N-j+2);ve[0]=pe-j+1,ie.Copy2(ee,j,ve,1,N-j+1),this.m_forwardHistory.push(ve),ve=new Int32Array(T-B+2),ve[0]=ge-B+1,ie.Copy2(ce,B,ve,1,T-B+1),this.m_reverseHistory.push(ve)}}return this.WALKTRACE(pe,j,N,fe,ge,B,T,oe,ee,ce,L,_,d,k,C,w,le,D)}PrettifyChanges(S){for(let _=0;_<S.length;_++){const y=S[_],C=_<S.length-1?S[_+1].originalStart:this._originalElementsOrHash.length,d=_<S.length-1?S[_+1].modifiedStart:this._modifiedElementsOrHash.length,w=y.originalLength>0,D=y.modifiedLength>0;for(;y.originalStart+y.originalLength<C&&y.modifiedStart+y.modifiedLength<d&&(!w||this.OriginalElementsAreEqual(y.originalStart,y.originalStart+y.originalLength))&&(!D||this.ModifiedElementsAreEqual(y.modifiedStart,y.modifiedStart+y.modifiedLength));){const k=this.ElementsAreStrictEqual(y.originalStart,y.modifiedStart);if(this.ElementsAreStrictEqual(y.originalStart+y.originalLength,y.modifiedStart+y.modifiedLength)&&!k)break;y.originalStart++,y.modifiedStart++}const L=[null];if(_<S.length-1&&this.ChangesOverlap(S[_],S[_+1],L)){S[_]=L[0],S.splice(_+1,1),_--;continue}}for(let _=S.length-1;_>=0;_--){const y=S[_];let C=0,d=0;if(_>0){const N=S[_-1];C=N.originalStart+N.originalLength,d=N.modifiedStart+N.modifiedLength}const w=y.originalLength>0,D=y.modifiedLength>0;let L=0,k=this._boundaryScore(y.originalStart,y.originalLength,y.modifiedStart,y.modifiedLength);for(let N=1;;N++){const B=y.originalStart-N,T=y.modifiedStart-N;if(B<C||T<d||w&&!this.OriginalElementsAreEqual(B,B+y.originalLength)||D&&!this.ModifiedElementsAreEqual(T,T+y.modifiedLength))break;const Y=(B===C&&T===d?5:0)+this._boundaryScore(B,y.originalLength,T,y.modifiedLength);Y>k&&(k=Y,L=N)}y.originalStart-=L,y.modifiedStart-=L;const j=[null];if(_>0&&this.ChangesOverlap(S[_-1],S[_],j)){S[_-1]=j[0],S.splice(_,1),_++;continue}}if(this._hasStrings)for(let _=1,y=S.length;_<y;_++){const C=S[_-1],d=S[_],w=d.originalStart-C.originalStart-C.originalLength,D=C.originalStart,L=d.originalStart+d.originalLength,k=L-D,j=C.modifiedStart,N=d.modifiedStart+d.modifiedLength,B=N-j;if(w<5&&k<20&&B<20){const T=this._findBetterContiguousSequence(D,k,j,B,w);if(T){const[H,Y]=T;(H!==C.originalStart+C.originalLength||Y!==C.modifiedStart+C.modifiedLength)&&(C.originalLength=H-C.originalStart,C.modifiedLength=Y-C.modifiedStart,d.originalStart=H+w,d.modifiedStart=Y+w,d.originalLength=L-d.originalStart,d.modifiedLength=N-d.modifiedStart)}}}return S}_findBetterContiguousSequence(S,_,y,C,d){if(_<d||C<d)return null;const w=S+_-d+1,D=y+C-d+1;let L=0,k=0,j=0;for(let N=S;N<w;N++)for(let B=y;B<D;B++){const T=this._contiguousSequenceScore(N,B,d);T>0&&T>L&&(L=T,k=N,j=B)}return L>0?[k,j]:null}_contiguousSequenceScore(S,_,y){let C=0;for(let d=0;d<y;d++){if(!this.ElementsAreEqual(S+d,_+d))return 0;C+=this._originalStringElements[S+d].length}return C}_OriginalIsBoundary(S){return S<=0||S>=this._originalElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._originalStringElements[S])}_OriginalRegionIsBoundary(S,_){if(this._OriginalIsBoundary(S)||this._OriginalIsBoundary(S-1))return!0;if(_>0){const y=S+_;if(this._OriginalIsBoundary(y-1)||this._OriginalIsBoundary(y))return!0}return!1}_ModifiedIsBoundary(S){return S<=0||S>=this._modifiedElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[S])}_ModifiedRegionIsBoundary(S,_){if(this._ModifiedIsBoundary(S)||this._ModifiedIsBoundary(S-1))return!0;if(_>0){const y=S+_;if(this._ModifiedIsBoundary(y-1)||this._ModifiedIsBoundary(y))return!0}return!1}_boundaryScore(S,_,y,C){const d=this._OriginalRegionIsBoundary(S,_)?1:0,w=this._ModifiedRegionIsBoundary(y,C)?1:0;return d+w}ConcatenateChanges(S,_){const y=[];if(S.length===0||_.length===0)return _.length>0?_:S;if(this.ChangesOverlap(S[S.length-1],_[0],y)){const C=new Array(S.length+_.length-1);return ie.Copy(S,0,C,0,S.length-1),C[S.length-1]=y[0],ie.Copy(_,1,C,S.length,_.length-1),C}else{const C=new Array(S.length+_.length);return ie.Copy(S,0,C,0,S.length),ie.Copy(_,0,C,S.length,_.length),C}}ChangesOverlap(S,_,y){if(x.Assert(S.originalStart<=_.originalStart,"Left change is not less than or equal to right change"),x.Assert(S.modifiedStart<=_.modifiedStart,"Left change is not less than or equal to right change"),S.originalStart+S.originalLength>=_.originalStart||S.modifiedStart+S.modifiedLength>=_.modifiedStart){const C=S.originalStart;let d=S.originalLength;const w=S.modifiedStart;let D=S.modifiedLength;return S.originalStart+S.originalLength>=_.originalStart&&(d=_.originalStart+_.originalLength-S.originalStart),S.modifiedStart+S.modifiedLength>=_.modifiedStart&&(D=_.modifiedStart+_.modifiedLength-S.modifiedStart),y[0]=new I(C,d,w,D),!0}else return y[0]=null,!1}ClipDiagonalBound(S,_,y,C){if(S>=0&&S<C)return S;const d=y,w=C-y-1,D=_%2===0;if(S<0){const L=d%2===0;return D===L?0:1}else{const L=w%2===0;return D===L?C-1:C-2}}}},94327:(Tt,Fe,f)=>{f.d(Fe,{AL:()=>J,D7:()=>d,EM:()=>y,MB:()=>Q,M_:()=>$,Qg:()=>S,aD:()=>z,cU:()=>x,dz:()=>te,iH:()=>_});class I{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(D){setTimeout(()=>{throw D.stack?C.isErrorNoTelemetry(D)?new C(D.message+` `+D.stack):new Error(D.message+` `+D.stack):D},0)}}emit(D){this.listeners.forEach(L=>{L(D)})}onUnexpectedError(D){this.unexpectedErrorHandler(D),this.emit(D)}onUnexpectedExternalError(D){this.unexpectedErrorHandler(D)}}const h=new I;function te(w){Q(w)||h.onUnexpectedError(w)}function $(w){Q(w)||h.onUnexpectedExternalError(w)}function x(w){if(w instanceof Error){const{name:D,message:L}=w,k=w.stacktrace||w.stack;return{$isError:!0,name:D,message:L,stack:k,noTelemetry:C.isErrorNoTelemetry(w)}}return w}const ie="Canceled";function Q(w){return w instanceof J?!0:w instanceof Error&&w.name===ie&&w.message===ie}class J extends Error{constructor(){super(ie),this.name=this.message}}function z(){const w=new Error(ie);return w.name=w.message,w}function S(w){return w?new Error(`Illegal argument: ${w}`):new Error("Illegal argument")}function _(w){return w?new Error(`Illegal state: ${w}`):new Error("Illegal state")}class y extends Error{constructor(D){super("NotSupported"),D&&(this.message=D)}}class C extends Error{constructor(D){super(D),this.name="ErrorNoTelemetry"}static fromError(D){if(D instanceof C)return D;const L=new C;return L.message=D.message,L.stack=D.stack,L}static isErrorNoTelemetry(D){return D.name==="ErrorNoTelemetry"}}class d extends Error{constructor(D){super(D||"An unexpected bug occurred."),Object.setPrototypeOf(this,d.prototype);debugger}}},2106:(Tt,Fe,f)=>{f.d(Fe,{Jh:()=>Q,Wj:()=>N,at:()=>j,ci:()=>d,fV:()=>L,uI:()=>k,vl:()=>C});var I=f(94327),h=f(10998),te=f(85525),$=f(23013);const x=!1,ie=!1;var Q;(function(B){B.None=()=>h.jG.None;function T(De){if(ie){const{onListenerDidAdd:Pe}=De,Ue=_.create();let Re=0;De.onListenerDidAdd=()=>{++Re===2&&(console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"),Ue.print()),Pe?.()}}}function H(De){return(Pe,Ue=null,Re)=>{let et=!1,rt;return rt=De(Lt=>{if(!et)return rt?rt.dispose():et=!0,Pe.call(Ue,Lt)},null,Re),et&&rt.dispose(),rt}}B.once=H;function Y(De,Pe,Ue){return oe((Re,et=null,rt)=>De(Lt=>Re.call(et,Pe(Lt)),null,rt),Ue)}B.map=Y;function ee(De,Pe,Ue){return oe((Re,et=null,rt)=>De(Lt=>{Pe(Lt),Re.call(et,Lt)},null,rt),Ue)}B.forEach=ee;function ce(De,Pe,Ue){return oe((Re,et=null,rt)=>De(Lt=>Pe(Lt)&&Re.call(et,Lt),null,rt),Ue)}B.filter=ce;function pe(De){return De}B.signal=pe;function ge(...De){return(Pe,Ue=null,Re)=>(0,h.qE)(...De.map(et=>et(rt=>Pe.call(Ue,rt),null,Re)))}B.any=ge;function fe(De,Pe,Ue,Re){let et=Ue;return Y(De,rt=>(et=Pe(et,rt),et),Re)}B.reduce=fe;function oe(De,Pe){let Ue;const Re={onFirstListenerAdd(){Ue=De(et.fire,et)},onLastListenerRemove(){Ue?.dispose()}};Pe||T(Re);const et=new C(Re);return Pe?.add(et),et.event}function Z(De,Pe,Ue=100,Re=!1,et,rt){let Lt,Dt,xt,Ie=0;const dt={leakWarningThreshold:et,onFirstListenerAdd(){Lt=De(Bt=>{Ie++,Dt=Pe(Dt,Bt),Re&&!xt&&(ft.fire(Dt),Dt=void 0),clearTimeout(xt),xt=setTimeout(()=>{const jt=Dt;Dt=void 0,xt=void 0,(!Re||Ie>1)&&ft.fire(jt),Ie=0},Ue)})},onLastListenerRemove(){Lt.dispose()}};rt||T(dt);const ft=new C(dt);return rt?.add(ft),ft.event}B.debounce=Z;function le(De,Pe=(Re,et)=>Re===et,Ue){let Re=!0,et;return ce(De,rt=>{const Lt=Re||!Pe(rt,et);return Re=!1,et=rt,Lt},Ue)}B.latch=le;function se(De,Pe,Ue){return[B.filter(De,Pe,Ue),B.filter(De,Re=>!Pe(Re),Ue)]}B.split=se;function X(De,Pe=!1,Ue=[]){let Re=Ue.slice(),et=De(Dt=>{Re?Re.push(Dt):Lt.fire(Dt)});const rt=()=>{Re?.forEach(Dt=>Lt.fire(Dt)),Re=null},Lt=new C({onFirstListenerAdd(){et||(et=De(Dt=>Lt.fire(Dt)))},onFirstListenerDidAdd(){Re&&(Pe?setTimeout(rt):rt())},onLastListenerRemove(){et&&et.dispose(),et=null}});return Lt.event}B.buffer=X;class K{constructor(Pe){this.event=Pe,this.disposables=new h.Cm}map(Pe){return new K(Y(this.event,Pe,this.disposables))}forEach(Pe){return new K(ee(this.event,Pe,this.disposables))}filter(Pe){return new K(ce(this.event,Pe,this.disposables))}reduce(Pe,Ue){return new K(fe(this.event,Pe,Ue,this.disposables))}latch(){return new K(le(this.event,void 0,this.disposables))}debounce(Pe,Ue=100,Re=!1,et){return new K(Z(this.event,Pe,Ue,Re,et,this.disposables))}on(Pe,Ue,Re){return this.event(Pe,Ue,Re)}once(Pe,Ue,Re){return H(this.event)(Pe,Ue,Re)}dispose(){this.disposables.dispose()}}function he(De){return new K(De)}B.chain=he;function ve(De,Pe,Ue=Re=>Re){const Re=(...Dt)=>Lt.fire(Ue(...Dt)),et=()=>De.on(Pe,Re),rt=()=>De.removeListener(Pe,Re),Lt=new C({onFirstListenerAdd:et,onLastListenerRemove:rt});return Lt.event}B.fromNodeEventEmitter=ve;function Ee(De,Pe,Ue=Re=>Re){const Re=(...Dt)=>Lt.fire(Ue(...Dt)),et=()=>De.addEventListener(Pe,Re),rt=()=>De.removeEventListener(Pe,Re),Lt=new C({onFirstListenerAdd:et,onLastListenerRemove:rt});return Lt.event}B.fromDOMEventEmitter=Ee;function O(De){return new Promise(Pe=>H(De)(Pe))}B.toPromise=O;function ot(De,Pe){return Pe(void 0),De(Ue=>Pe(Ue))}B.runAndSubscribe=ot;function lt(De,Pe){let Ue=null;function Re(rt){Ue?.dispose(),Ue=new h.Cm,Pe(rt,Ue)}Re(void 0);const et=De(rt=>Re(rt));return(0,h.s)(()=>{et.dispose(),Ue?.dispose()})}B.runAndSubscribeWithStore=lt;class We{constructor(Pe,Ue){this.obs=Pe,this._counter=0,this._hasChanged=!1;const Re={onFirstListenerAdd:()=>{Pe.addObserver(this)},onLastListenerRemove:()=>{Pe.removeObserver(this)}};Ue||T(Re),this.emitter=new C(Re),Ue&&Ue.add(this.emitter)}beginUpdate(Pe){this._counter++}handleChange(Pe,Ue){this._hasChanged=!0}endUpdate(Pe){--this._counter===0&&this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this.obs.get()))}}function Ke(De,Pe){return new We(De,Pe).emitter.event}B.fromObservable=Ke})(Q||(Q={}));class J{constructor(T){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${T}_${J._idPool++}`}start(T){this._stopWatch=new $.W(!0),this._listenerCount=T}stop(){if(this._stopWatch){const T=this._stopWatch.elapsed();this._elapsedOverall+=T,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${T.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}J._idPool=0;let z=-1;class S{constructor(T,H=Math.random().toString(18).slice(2,5)){this.customThreshold=T,this.name=H,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(T,H){let Y=z;if(typeof this.customThreshold=="number"&&(Y=this.customThreshold),Y<=0||H<Y)return;this._stacks||(this._stacks=new Map);const ee=this._stacks.get(T.value)||0;if(this._stacks.set(T.value,ee+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=Y*.5;let ce,pe=0;for(const[ge,fe]of this._stacks)(!ce||pe<fe)&&(ce=ge,pe=fe);console.warn(`[${this.name}] potential listener LEAK detected, having ${H} listeners already. MOST frequent listener (${pe}):`),console.warn(ce)}return()=>{const ce=this._stacks.get(T.value)||0;this._stacks.set(T.value,ce-1)}}}class _{constructor(T){this.value=T}static create(){var T;return new _((T=new Error().stack)!==null&&T!==void 0?T:"")}print(){console.warn(this.value.split(` `).slice(2).join(` `))}}class y{constructor(T,H,Y){this.callback=T,this.callbackThis=H,this.stack=Y,this.subscription=new h.St}invoke(T){this.callback.call(this.callbackThis,T)}}class C{constructor(T){var H,Y;this._disposed=!1,this._options=T,this._leakageMon=z>0?new S(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=!((H=this._options)===null||H===void 0)&&H._profName?new J(this._options._profName):void 0,this._deliveryQueue=(Y=this._options)===null||Y===void 0?void 0:Y.deliveryQueue}dispose(){var T,H,Y,ee;if(!this._disposed){if(this._disposed=!0,this._listeners){if(x){const ce=Array.from(this._listeners);queueMicrotask(()=>{var pe;for(const ge of ce)ge.subscription.isset()&&(ge.subscription.unset(),(pe=ge.stack)===null||pe===void 0||pe.print())})}this._listeners.clear()}(T=this._deliveryQueue)===null||T===void 0||T.clear(this),(Y=(H=this._options)===null||H===void 0?void 0:H.onLastListenerRemove)===null||Y===void 0||Y.call(H),(ee=this._leakageMon)===null||ee===void 0||ee.dispose()}}get event(){return this._event||(this._event=(T,H,Y)=>{var ee,ce,pe;this._listeners||(this._listeners=new te.w);const ge=this._listeners.isEmpty();ge&&(!((ee=this._options)===null||ee===void 0)&&ee.onFirstListenerAdd)&&this._options.onFirstListenerAdd(this);let fe,oe;this._leakageMon&&this._listeners.size>=30&&(oe=_.create(),fe=this._leakageMon.check(oe,this._listeners.size+1)),x&&(oe=oe??_.create());const Z=new y(T,H,oe),le=this._listeners.push(Z);ge&&(!((ce=this._options)===null||ce===void 0)&&ce.onFirstListenerDidAdd)&&this._options.onFirstListenerDidAdd(this),!((pe=this._options)===null||pe===void 0)&&pe.onListenerDidAdd&&this._options.onListenerDidAdd(this,T,H);const se=Z.subscription.set(()=>{fe?.(),this._disposed||(le(),this._options&&this._options.onLastListenerRemove&&(this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this)))});return Y instanceof h.Cm?Y.add(se):Array.isArray(Y)&&Y.push(se),se}),this._event}fire(T){var H,Y;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new w);for(const ee of this._listeners)this._deliveryQueue.push(this,ee,T);(H=this._perfMon)===null||H===void 0||H.start(this._deliveryQueue.size),this._deliveryQueue.deliver(),(Y=this._perfMon)===null||Y===void 0||Y.stop()}}}class d{constructor(){this._queue=new te.w}get size(){return this._queue.size}push(T,H,Y){this._queue.push(new D(T,H,Y))}clear(T){const H=new te.w;for(const Y of this._queue)Y.emitter!==T&&H.push(Y);this._queue=H}deliver(){for(;this._queue.size>0;){const T=this._queue.shift();try{T.listener.invoke(T.event)}catch(H){(0,I.dz)(H)}}}}class w extends d{clear(T){this._queue.clear()}}class D{constructor(T,H,Y){this.emitter=T,this.listener=H,this.event=Y}}class L extends C{constructor(T){super(T),this._isPaused=0,this._eventQueue=new te.w,this._mergeFn=T?.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const T=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(T))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(T){this._listeners&&(this._isPaused!==0?this._eventQueue.push(T):super.fire(T))}}class k extends L{constructor(T){var H;super(T),this._delay=(H=T.delay)!==null&&H!==void 0?H:100}fire(T){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(T)}}class j{constructor(){this.buffers=[]}wrapEvent(T){return(H,Y,ee)=>T(ce=>{const pe=this.buffers[this.buffers.length-1];pe?pe.push(()=>H.call(Y,ce)):H.call(Y,ce)},void 0,ee)}bufferEvents(T){const H=[];this.buffers.push(H);const Y=T();return this.buffers.pop(),H.forEach(ee=>ee()),Y}}class N{constructor(){this.listening=!1,this.inputEvent=Q.None,this.inputEventListener=h.jG.None,this.emitter=new C({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(T){this.inputEvent=T,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=T(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},78518:(Tt,Fe,f)=>{f.d(Fe,{No:()=>S,TH:()=>x,Zn:()=>Q,_1:()=>J,kb:()=>ie});var I=f(64033),h=f(63339),te=f(16844);function $(_){return _===47||_===92}function x(_){return _.replace(/[\\/]/g,I.SA.sep)}function ie(_){return _.indexOf("/")===-1&&(_=x(_)),/^[a-zA-Z]:(\/|$)/.test(_)&&(_="/"+_),_}function Q(_,y=I.SA.sep){if(!_)return"";const C=_.length,d=_.charCodeAt(0);if($(d)){if($(_.charCodeAt(1))&&!$(_.charCodeAt(2))){let D=3;const L=D;for(;D<C&&!$(_.charCodeAt(D));D++);if(L!==D&&!$(_.charCodeAt(D+1))){for(D+=1;D<C;D++)if($(_.charCodeAt(D)))return _.slice(0,D+1).replace(/[\\/]/g,y)}}return y}else if(z(d)&&_.charCodeAt(1)===58)return $(_.charCodeAt(2))?_.slice(0,2)+y:_.slice(0,2);let w=_.indexOf("://");if(w!==-1){for(w+=3;w<C;w++)if($(_.charCodeAt(w)))return _.slice(0,w+1)}return""}function J(_,y,C,d=I.Vn){if(_===y)return!0;if(!_||!y||y.length>_.length)return!1;if(C){if(!(0,te.ns)(_,y))return!1;if(y.length===_.length)return!0;let D=y.length;return y.charAt(y.length-1)===d&&D--,_.charAt(D)===d}return y.charAt(y.length-1)!==d&&(y+=d),_.indexOf(y)===0}function z(_){return _>=65&&_<=90||_>=97&&_<=122}function S(_,y=h.uF){return y?z(_.charCodeAt(0))&&_.charCodeAt(1)===58:!1}},97669:(Tt,Fe,f)=>{f.d(Fe,{J1:()=>ce,Jo:()=>se,Nd:()=>Dt,Tt:()=>Q,WJ:()=>X,WP:()=>x,dE:()=>J,dt:()=>xt,ne:()=>Lt,or:()=>te,uU:()=>ft,yr:()=>le});var I=f(27992),h=f(16844);function te(...pt){return function(bt,zt){for(let ii=0,vi=pt.length;ii<vi;ii++){const Ze=pt[ii](bt,zt);if(Ze)return Ze}return null}}const $=ie.bind(void 0,!1),x=ie.bind(void 0,!0);function ie(pt,bt,zt){if(!zt||zt.length<bt.length)return null;let ii;return pt?ii=h.ns(zt,bt):ii=zt.indexOf(bt)===0,ii?bt.length>0?[{start:0,end:bt.length}]:[]:null}function Q(pt,bt){const zt=bt.toLowerCase().indexOf(pt.toLowerCase());return zt===-1?null:[{start:zt,end:zt+pt.length}]}function J(pt,bt){return z(pt.toLowerCase(),bt.toLowerCase(),0,0)}function z(pt,bt,zt,ii){if(zt===pt.length)return[];if(ii===bt.length)return null;if(pt[zt]===bt[ii]){let vi=null;return(vi=z(pt,bt,zt+1,ii+1))?k({start:ii,end:ii+1},vi):null}return z(pt,bt,zt,ii+1)}function S(pt){return 97<=pt&&pt<=122}function _(pt){return 65<=pt&&pt<=90}function y(pt){return 48<=pt&&pt<=57}function C(pt){return pt===32||pt===9||pt===10||pt===13}const d=new Set;"()[]{}<>`'\"-/;:,.?!".split("").forEach(pt=>d.add(pt.charCodeAt(0)));function w(pt){return C(pt)||d.has(pt)}function D(pt,bt){return pt===bt||w(pt)&&w(bt)}function L(pt){return S(pt)||_(pt)||y(pt)}function k(pt,bt){return bt.length===0?bt=[pt]:pt.end===bt[0].start?bt[0].start=pt.start:bt.unshift(pt),bt}function j(pt,bt){for(let zt=bt;zt<pt.length;zt++){const ii=pt.charCodeAt(zt);if(_(ii)||y(ii)||zt>0&&!L(pt.charCodeAt(zt-1)))return zt}return pt.length}function N(pt,bt,zt,ii){if(zt===pt.length)return[];if(ii===bt.length)return null;if(pt[zt]!==bt[ii].toLowerCase())return null;{let vi=null,Ze=ii+1;for(vi=N(pt,bt,zt+1,ii+1);!vi&&(Ze=j(bt,Ze))<bt.length;)vi=N(pt,bt,zt+1,Ze),Ze++;return vi===null?null:k({start:ii,end:ii+1},vi)}}function B(pt){let bt=0,zt=0,ii=0,vi=0,Ze=0;for(let Li=0;Li<pt.length;Li++)Ze=pt.charCodeAt(Li),_(Ze)&&bt++,S(Ze)&&zt++,L(Ze)&&ii++,y(Ze)&&vi++;const _t=bt/pt.length,At=zt/pt.length,ei=ii/pt.length,oi=vi/pt.length;return{upperPercent:_t,lowerPercent:At,alphaPercent:ei,numericPercent:oi}}function T(pt){const{upperPercent:bt,lowerPercent:zt}=pt;return zt===0&&bt>.6}function H(pt){const{upperPercent:bt,lowerPercent:zt,alphaPercent:ii,numericPercent:vi}=pt;return zt>.2&&bt<.8&&ii>.6&&vi<.2}function Y(pt){let bt=0,zt=0,ii=0,vi=0;for(let Ze=0;Ze<pt.length;Ze++)ii=pt.charCodeAt(Ze),_(ii)&&bt++,S(ii)&&zt++,C(ii)&&vi++;return(bt===0||zt===0)&&vi===0?pt.length<=30:bt<=5}function ee(pt,bt){if(!bt||(bt=bt.trim(),bt.length===0)||!Y(pt)||bt.length>60)return null;const zt=B(bt);if(!H(zt)){if(!T(zt))return null;bt=bt.toLowerCase()}let ii=null,vi=0;for(pt=pt.toLowerCase();vi<bt.length&&(ii=N(pt,bt,0,vi))===null;)vi=j(bt,vi+1);return ii}function ce(pt,bt,zt=!1){if(!bt||bt.length===0)return null;let ii=null,vi=0;for(pt=pt.toLowerCase(),bt=bt.toLowerCase();vi<bt.length&&(ii=pe(pt,bt,0,vi,zt))===null;)vi=ge(bt,vi+1);return ii}function pe(pt,bt,zt,ii,vi){if(zt===pt.length)return[];if(ii===bt.length)return null;if(D(pt.charCodeAt(zt),bt.charCodeAt(ii))){let Ze=null,_t=ii+1;if(Ze=pe(pt,bt,zt+1,ii+1,vi),!vi)for(;!Ze&&(_t=ge(bt,_t))<bt.length;)Ze=pe(pt,bt,zt+1,_t,vi),_t++;return Ze===null?null:k({start:ii,end:ii+1},Ze)}else return null}function ge(pt,bt){for(let zt=bt;zt<pt.length;zt++)if(w(pt.charCodeAt(zt))||zt>0&&w(pt.charCodeAt(zt-1)))return zt;return pt.length}const fe=te(x,ee,Q),oe=te(x,ee,J),Z=new I.qK(1e4);function le(pt,bt,zt=!1){if(typeof pt!="string"||typeof bt!="string")return null;let ii=Z.get(pt);ii||(ii=new RegExp(h.Bm(pt),"i"),Z.set(pt,ii));const vi=ii.exec(bt);return vi?[{start:vi.index,end:vi.index+vi[0].length}]:zt?oe(pt,bt):fe(pt,bt)}function se(pt,bt,zt,ii,vi,Ze){const _t=Math.min(13,pt.length);for(;zt<_t;zt++){const At=xt(pt,bt,zt,ii,vi,Ze,{firstMatchCanBeWeak:!1,boostFullMatch:!0});if(At)return At}return[0,Ze]}function X(pt){if(typeof pt>"u")return[];const bt=[],zt=pt[1];for(let ii=pt.length-1;ii>1;ii--){const vi=pt[ii]+zt,Ze=bt[bt.length-1];Ze&&Ze.end===vi?Ze.end=vi+1:bt.push({start:vi,end:vi+1})}return bt}const K=128;function he(){const pt=[],bt=[];for(let zt=0;zt<=K;zt++)bt[zt]=0;for(let zt=0;zt<=K;zt++)pt.push(bt.slice(0));return pt}function ve(pt){const bt=[];for(let zt=0;zt<=pt;zt++)bt[zt]=0;return bt}const Ee=ve(2*K),O=ve(2*K),ot=he(),lt=he(),We=he(),Ke=!1;function De(pt,bt,zt,ii,vi){function Ze(At,ei,oi=" "){for(;At.length<ei;)At=oi+At;return At}let _t=` | |${ii.split("").map(At=>Ze(At,3)).join("|")} `;for(let At=0;At<=zt;At++)At===0?_t+=" |":_t+=`${bt[At-1]}|`,_t+=pt[At].slice(0,vi+1).map(ei=>Ze(ei.toString(),3)).join("|")+` `;return _t}function Pe(pt,bt,zt,ii){pt=pt.substr(bt),zt=zt.substr(ii),console.log(De(lt,pt,pt.length,zt,zt.length)),console.log(De(We,pt,pt.length,zt,zt.length)),console.log(De(ot,pt,pt.length,zt,zt.length))}function Ue(pt,bt){if(bt<0||bt>=pt.length)return!1;const zt=pt.codePointAt(bt);switch(zt){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!!h.Ss(zt)}}function Re(pt,bt){if(bt<0||bt>=pt.length)return!1;switch(pt.charCodeAt(bt)){case 32:case 9:return!0;default:return!1}}function et(pt,bt,zt){return bt[pt]!==zt[pt]}function rt(pt,bt,zt,ii,vi,Ze,_t=!1){for(;bt<zt&&vi<Ze;)pt[bt]===ii[vi]&&(_t&&(Ee[bt]=vi),bt+=1),vi+=1;return bt===zt}var Lt;(function(pt){pt.Default=[-100,0];function bt(zt){return!zt||zt.length===2&&zt[0]===-100&&zt[1]===0}pt.isDefault=bt})(Lt||(Lt={}));class Dt{constructor(bt,zt){this.firstMatchCanBeWeak=bt,this.boostFullMatch=zt}}Dt.default={boostFullMatch:!0,firstMatchCanBeWeak:!1};function xt(pt,bt,zt,ii,vi,Ze,_t=Dt.default){const At=pt.length>K?K:pt.length,ei=ii.length>K?K:ii.length;if(zt>=At||Ze>=ei||At-zt>ei-Ze||!rt(bt,zt,At,vi,Ze,ei,!0))return;Ie(At,ei,zt,Ze,bt,vi);let oi=1,Li=1,zi=zt,Di=Ze;const Te=[!1];for(oi=1,zi=zt;zi<At;oi++,zi++){const Oe=Ee[zi],ut=O[zi],Zt=zi+1<At?O[zi+1]:ei;for(Li=Oe-Ze+1,Di=Oe;Di<Zt;Li++,Di++){let Ci=Number.MIN_SAFE_INTEGER,Ki=!1;Di<=ut&&(Ci=dt(pt,bt,zi,zt,ii,vi,Di,ei,Ze,ot[oi-1][Li-1]===0,Te));let Ln=0;Ci!==Number.MAX_SAFE_INTEGER&&(Ki=!0,Ln=Ci+lt[oi-1][Li-1]);const nt=Di>Oe,Ct=nt?lt[oi][Li-1]+(ot[oi][Li-1]>0?-5:0):0,Qt=Di>Oe+1&&ot[oi][Li-1]>0,Ot=Qt?lt[oi][Li-2]+(ot[oi][Li-2]>0?-5:0):0;if(Qt&&(!nt||Ot>=Ct)&&(!Ki||Ot>=Ln))lt[oi][Li]=Ot,We[oi][Li]=3,ot[oi][Li]=0;else if(nt&&(!Ki||Ct>=Ln))lt[oi][Li]=Ct,We[oi][Li]=2,ot[oi][Li]=0;else if(Ki)lt[oi][Li]=Ln,We[oi][Li]=1,ot[oi][Li]=ot[oi-1][Li-1]+1;else throw new Error("not possible")}}if(Ke&&Pe(pt,zt,ii,Ze),!Te[0]&&!_t.firstMatchCanBeWeak)return;oi--,Li--;const ki=[lt[oi][Li],Ze];let ze=0,we=0;for(;oi>=1;){let Oe=Li;do{const ut=We[oi][Oe];if(ut===3)Oe=Oe-2;else if(ut===2)Oe=Oe-1;else break}while(Oe>=1);ze>1&&bt[zt+oi-1]===vi[Ze+Li-1]&&!et(Oe+Ze-1,ii,vi)&&ze+1>ot[oi][Oe]&&(Oe=Li),Oe===Li?ze++:ze=1,we||(we=Oe),oi--,Li=Oe-1,ki.push(Li)}ei===At&&_t.boostFullMatch&&(ki[0]+=2);const ct=we-At;return ki[0]-=ct,ki}function Ie(pt,bt,zt,ii,vi,Ze){let _t=pt-1,At=bt-1;for(;_t>=zt&&At>=ii;)vi[_t]===Ze[At]&&(O[_t]=At,_t--),At--}function dt(pt,bt,zt,ii,vi,Ze,_t,At,ei,oi,Li){if(bt[zt]!==Ze[_t])return Number.MIN_SAFE_INTEGER;let zi=1,Di=!1;return _t===zt-ii?zi=pt[zt]===vi[_t]?7:5:et(_t,vi,Ze)&&(_t===0||!et(_t-1,vi,Ze))?(zi=pt[zt]===vi[_t]?7:5,Di=!0):Ue(Ze,_t)&&(_t===0||!Ue(Ze,_t-1))?zi=5:(Ue(Ze,_t-1)||Re(Ze,_t-1))&&(zi=5,Di=!0),zi>1&&zt===ii&&(Li[0]=!0),Di||(Di=et(_t,vi,Ze)||Ue(Ze,_t-1)||Re(Ze,_t-1)),zt===ii?_t>ei&&(zi-=Di?3:5):oi?zi+=Di?2:0:zi+=Di?0:1,_t+1===At&&(zi-=Di?3:5),zi}function ft(pt,bt,zt,ii,vi,Ze,_t){return Bt(pt,bt,zt,ii,vi,Ze,!0,_t)}function Bt(pt,bt,zt,ii,vi,Ze,_t,At){let ei=xt(pt,bt,zt,ii,vi,Ze,At);if(ei&&!_t)return ei;if(pt.length>=3){const oi=Math.min(7,pt.length-1);for(let Li=zt+1;Li<oi;Li++){const zi=jt(pt,Li);if(zi){const Di=xt(zi,zi.toLowerCase(),zt,ii,vi,Ze,At);Di&&(Di[0]-=3,(!ei||Di[0]>ei[0])&&(ei=Di))}}}return ei}function jt(pt,bt){if(bt+1>=pt.length)return;const zt=pt[bt],ii=pt[bt+1];if(zt!==ii)return pt.slice(0,bt)+ii+zt+pt.slice(bt+2)}},48289:(Tt,Fe,f)=>{f.d(Fe,{O:()=>I});function I(h){const te=this;let $=!1,x;return function(){return $||($=!0,x=h.apply(te,arguments)),x}}},22344:(Tt,Fe,f)=>{f.d(Fe,{e2:()=>ie,sN:()=>te,tW:()=>h,v7:()=>C});var I=f(16844);function h(d){return te(d,0)}function te(d,w){switch(typeof d){case"object":return d===null?$(349,w):Array.isArray(d)?Q(d,w):J(d,w);case"string":return ie(d,w);case"boolean":return x(d,w);case"number":return $(d,w);case"undefined":return $(937,w);default:return $(617,w)}}function $(d,w){return(w<<5)-w+d|0}function x(d,w){return $(d?433:863,w)}function ie(d,w){w=$(149417,w);for(let D=0,L=d.length;D<L;D++)w=$(d.charCodeAt(D),w);return w}function Q(d,w){return w=$(104579,w),d.reduce((D,L)=>te(L,D),w)}function J(d,w){return w=$(181387,w),Object.keys(d).sort().reduce((D,L)=>(D=ie(L,D),te(d[L],D)),w)}function z(d,w,D=32){const L=D-w,k=~((1<<L)-1);return(d<<w|(k&d)>>>L)>>>0}function S(d,w=0,D=d.byteLength,L=0){for(let k=0;k<D;k++)d[w+k]=L}function _(d,w,D="0"){for(;d.length<w;)d=D+d;return d}function y(d,w=32){return d instanceof ArrayBuffer?Array.from(new Uint8Array(d)).map(D=>D.toString(16).padStart(2,"0")).join(""):_((d>>>0).toString(16),w/4)}class C{constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(64+3),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(w){const D=w.length;if(D===0)return;const L=this._buff;let k=this._buffLen,j=this._leftoverHighSurrogate,N,B;for(j!==0?(N=j,B=-1,j=0):(N=w.charCodeAt(0),B=0);;){let T=N;if(I.pc(N))if(B+1<D){const H=w.charCodeAt(B+1);I.LJ(H)?(B++,T=I.z_(N,H)):T=65533}else{j=N;break}else I.LJ(N)&&(T=65533);if(k=this._push(L,k,T),B++,B<D)N=w.charCodeAt(B);else break}this._buffLen=k,this._leftoverHighSurrogate=j}_push(w,D,L){return L<128?w[D++]=L:L<2048?(w[D++]=192|(L&1984)>>>6,w[D++]=128|(L&63)>>>0):L<65536?(w[D++]=224|(L&61440)>>>12,w[D++]=128|(L&4032)>>>6,w[D++]=128|(L&63)>>>0):(w[D++]=240|(L&1835008)>>>18,w[D++]=128|(L&258048)>>>12,w[D++]=128|(L&4032)>>>6,w[D++]=128|(L&63)>>>0),D>=64&&(this._step(),D-=64,this._totalLen+=64,w[0]=w[64+0],w[1]=w[64+1],w[2]=w[64+2]),D}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()),y(this._h0)+y(this._h1)+y(this._h2)+y(this._h3)+y(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,S(this._buff,this._buffLen),this._buffLen>56&&(this._step(),S(this._buff));const w=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(w/4294967296),!1),this._buffDV.setUint32(60,w%4294967296,!1),this._step()}_step(){const w=C._bigBlock32,D=this._buffDV;for(let ee=0;ee<64;ee+=4)w.setUint32(ee,D.getUint32(ee,!1),!1);for(let ee=64;ee<320;ee+=4)w.setUint32(ee,z(w.getUint32(ee-12,!1)^w.getUint32(ee-32,!1)^w.getUint32(ee-56,!1)^w.getUint32(ee-64,!1),1),!1);let L=this._h0,k=this._h1,j=this._h2,N=this._h3,B=this._h4,T,H,Y;for(let ee=0;ee<80;ee++)ee<20?(T=k&j|~k&N,H=1518500249):ee<40?(T=k^j^N,H=1859775393):ee<60?(T=k&j|k&N|j&N,H=2400959708):(T=k^j^N,H=3395469782),Y=z(L,5)+T+B+H+w.getUint32(ee*4,!1)&4294967295,B=N,N=j,j=z(k,30),k=L,L=Y;this._h0=this._h0+L&4294967295,this._h1=this._h1+k&4294967295,this._h2=this._h2+j&4294967295,this._h3=this._h3+N&4294967295,this._h4=this._h4+B&4294967295}}C._bigBlock32=new DataView(new ArrayBuffer(320))},90028:(Tt,Fe,f)=>{f.d(Fe,{Bc:()=>$,VS:()=>ie,_W:()=>z,it:()=>x,nI:()=>S,oO:()=>J});var I=f(94327),h=f(24594),te=f(16844);class ${constructor(y="",C=!1){var d,w,D;if(this.value=y,typeof this.value!="string")throw(0,I.Qg)("value");typeof C=="boolean"?(this.isTrusted=C,this.supportThemeIcons=!1,this.supportHtml=!1):(this.isTrusted=(d=C.isTrusted)!==null&&d!==void 0?d:void 0,this.supportThemeIcons=(w=C.supportThemeIcons)!==null&&w!==void 0?w:!1,this.supportHtml=(D=C.supportHtml)!==null&&D!==void 0?D:!1)}appendText(y,C=0){return this.value+=Q(this.supportThemeIcons?(0,h.m2)(y):y).replace(/([ \t]+)/g,(d,w)=>" ".repeat(w.length)).replace(/\>/gm,"\\>").replace(/\n/g,C===1?`\\ `:` `),this}appendMarkdown(y){return this.value+=y,this}appendCodeblock(y,C){return this.value+="\n```",this.value+=y,this.value+=` `,this.value+=C,this.value+="\n```\n",this}appendLink(y,C,d){return this.value+="[",this.value+=this._escape(C,"]"),this.value+="](",this.value+=this._escape(String(y),")"),d&&(this.value+=` "${this._escape(this._escape(d,'"'),")")}"`),this.value+=")",this}_escape(y,C){const d=new RegExp((0,te.bm)(C),"g");return y.replace(d,(w,D)=>y.charAt(D-1)!=="\\"?`\\${w}`:w)}}function x(_){return ie(_)?!_.value:Array.isArray(_)?_.every(x):!0}function ie(_){return _ instanceof $?!0:_&&typeof _=="object"?typeof _.value=="string"&&(typeof _.isTrusted=="boolean"||_.isTrusted===void 0)&&(typeof _.supportThemeIcons=="boolean"||_.supportThemeIcons===void 0):!1}function Q(_){return _.replace(/[\\`*_{}[\]()#+\-!]/g,"\\$&")}function J(_){return _.replace(/"/g,""")}function z(_){return _&&_.replace(/\\([\\`*_{}[\]()#+\-.!])/g,"$1")}function S(_){const y=[],C=_.split("|").map(w=>w.trim());_=C[0];const d=C[1];if(d){const w=/height=(\d+)/.exec(d),D=/width=(\d+)/.exec(d),L=w?w[1]:"",k=D?D[1]:"",j=isFinite(parseInt(k)),N=isFinite(parseInt(L));j&&y.push(`width="${k}"`),N&&y.push(`height="${L}"`)}return{href:_,dimensions:y}}},24594:(Tt,Fe,f)=>{f.d(Fe,{_k:()=>C,m2:()=>J,pS:()=>y,pz:()=>w,sA:()=>S});var I=f(26048),h=f(97669),te=f(16844);const $="$(",x=new RegExp(`\\$\\(${I.j3.iconNameExpression}(?:${I.j3.iconModifierExpression})?\\)`,"g"),ie=new RegExp(I.j3.iconNameCharacter),Q=new RegExp(`(\\\\)?${x.source}`,"g");function J(D){return D.replace(Q,(L,k)=>k?L:`\\${L}`)}const z=new RegExp(`\\\\${x.source}`,"g");function S(D){return D.replace(z,L=>`\\${L}`)}const _=new RegExp(`(\\s)?(\\\\)?${x.source}(\\s)?`,"g");function y(D){return D.indexOf($)===-1?D:D.replace(_,(L,k,j,N)=>j?L:k||N||"")}function C(D){const L=D.indexOf($);return L===-1?{text:D}:d(D,L)}function d(D,L){const k=[];let j="";function N(ge){if(ge){j+=ge;for(const fe of ge)k.push(H)}}let B=-1,T="",H=0,Y,ee,ce=L;const pe=D.length;for(N(D.substr(0,L));ce<pe;){if(Y=D[ce],ee=D[ce+1],Y===$[0]&&ee===$[1])B=ce,N(T),T=$,ce++;else if(Y===")"&&B!==-1){const ge=ce-B+1;H+=ge,B=-1,T=""}else B!==-1?ie.test(Y)?T+=Y:(N(T),B=-1,T=""):N(Y);ce++}return N(T),{text:j,iconOffsets:k}}function w(D,L,k=!1){const{text:j,iconOffsets:N}=L;if(!N||N.length===0)return(0,h.yr)(D,j,k);const B=(0,te.NB)(j," "),T=j.length-B.length,H=(0,h.yr)(D,B,k);if(H)for(const Y of H){const ee=N[Y.start+T]+T;Y.start+=ee,Y.end+=ee}return H}},94664:(Tt,Fe,f)=>{f.d(Fe,{n:()=>I,r:()=>h});class I{constructor($){this._prefix=$,this._lastId=0}nextId(){return this._prefix+ ++this._lastId}}const h=new I("id#")},17954:(Tt,Fe,f)=>{f.d(Fe,{f:()=>I});var I;(function(h){function te(T){return T&&typeof T=="object"&&typeof T[Symbol.iterator]=="function"}h.is=te;const $=Object.freeze([]);function x(){return $}h.empty=x;function*ie(T){yield T}h.single=ie;function Q(T){return T||$}h.from=Q;function J(T){return!T||T[Symbol.iterator]().next().done===!0}h.isEmpty=J;function z(T){return T[Symbol.iterator]().next().value}h.first=z;function S(T,H){for(const Y of T)if(H(Y))return!0;return!1}h.some=S;function _(T,H){for(const Y of T)if(H(Y))return Y}h.find=_;function*y(T,H){for(const Y of T)H(Y)&&(yield Y)}h.filter=y;function*C(T,H){let Y=0;for(const ee of T)yield H(ee,Y++)}h.map=C;function*d(...T){for(const H of T)for(const Y of H)yield Y}h.concat=d;function*w(T){for(const H of T)for(const Y of H)yield Y}h.concatNested=w;function D(T,H,Y){let ee=Y;for(const ce of T)ee=H(ee,ce);return ee}h.reduce=D;function L(T,H){let Y=0;for(const ee of T)H(ee,Y++)}h.forEach=L;function*k(T,H,Y=T.length){for(H<0&&(H+=T.length),Y<0?Y+=T.length:Y>T.length&&(Y=T.length);H<Y;H++)yield T[H]}h.slice=k;function j(T,H=Number.POSITIVE_INFINITY){const Y=[];if(H===0)return[Y,T];const ee=T[Symbol.iterator]();for(let ce=0;ce<H;ce++){const pe=ee.next();if(pe.done)return[Y,h.empty()];Y.push(pe.value)}return[Y,{[Symbol.iterator](){return ee}}]}h.consume=j;function N(T){return j(T)[0]}h.collect=N;function B(T,H,Y=(ee,ce)=>ee===ce){const ee=T[Symbol.iterator](),ce=H[Symbol.iterator]();for(;;){const pe=ee.next(),ge=ce.next();if(pe.done!==ge.done)return!1;if(pe.done)return!0;if(!Y(pe.value,ge.value))return!1}}h.equals=B})(I||(I={}))},68387:(Tt,Fe,f)=>{f.d(Fe,{Fo:()=>S,YM:()=>y,m5:()=>C,uw:()=>x});class I{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(w,D){this._keyCodeToStr[w]=D,this._strToKeyCode[D.toLowerCase()]=w}keyCodeToStr(w){return this._keyCodeToStr[w]}strToKeyCode(w){return this._strToKeyCode[w.toLowerCase()]||0}}const h=new I,te=new I,$=new I,x=new Array(230),ie={},Q=[],J=Object.create(null),z=Object.create(null),S=[],_=[];for(let d=0;d<=193;d++)S[d]=-1;for(let d=0;d<=127;d++)_[d]=-1;(function(){const d="",w=[[0,1,0,"None",0,"unknown",0,"VK_UNKNOWN",d,d],[0,1,1,"Hyper",0,d,0,d,d,d],[0,1,2,"Super",0,d,0,d,d,d],[0,1,3,"Fn",0,d,0,d,d,d],[0,1,4,"FnLock",0,d,0,d,d,d],[0,1,5,"Suspend",0,d,0,d,d,d],[0,1,6,"Resume",0,d,0,d,d,d],[0,1,7,"Turbo",0,d,0,d,d,d],[0,1,8,"Sleep",0,d,0,"VK_SLEEP",d,d],[0,1,9,"WakeUp",0,d,0,d,d,d],[31,0,10,"KeyA",31,"A",65,"VK_A",d,d],[32,0,11,"KeyB",32,"B",66,"VK_B",d,d],[33,0,12,"KeyC",33,"C",67,"VK_C",d,d],[34,0,13,"KeyD",34,"D",68,"VK_D",d,d],[35,0,14,"KeyE",35,"E",69,"VK_E",d,d],[36,0,15,"KeyF",36,"F",70,"VK_F",d,d],[37,0,16,"KeyG",37,"G",71,"VK_G",d,d],[38,0,17,"KeyH",38,"H",72,"VK_H",d,d],[39,0,18,"KeyI",39,"I",73,"VK_I",d,d],[40,0,19,"KeyJ",40,"J",74,"VK_J",d,d],[41,0,20,"KeyK",41,"K",75,"VK_K",d,d],[42,0,21,"KeyL",42,"L",76,"VK_L",d,d],[43,0,22,"KeyM",43,"M",77,"VK_M",d,d],[44,0,23,"KeyN",44,"N",78,"VK_N",d,d],[45,0,24,"KeyO",45,"O",79,"VK_O",d,d],[46,0,25,"KeyP",46,"P",80,"VK_P",d,d],[47,0,26,"KeyQ",47,"Q",81,"VK_Q",d,d],[48,0,27,"KeyR",48,"R",82,"VK_R",d,d],[49,0,28,"KeyS",49,"S",83,"VK_S",d,d],[50,0,29,"KeyT",50,"T",84,"VK_T",d,d],[51,0,30,"KeyU",51,"U",85,"VK_U",d,d],[52,0,31,"KeyV",52,"V",86,"VK_V",d,d],[53,0,32,"KeyW",53,"W",87,"VK_W",d,d],[54,0,33,"KeyX",54,"X",88,"VK_X",d,d],[55,0,34,"KeyY",55,"Y",89,"VK_Y",d,d],[56,0,35,"KeyZ",56,"Z",90,"VK_Z",d,d],[22,0,36,"Digit1",22,"1",49,"VK_1",d,d],[23,0,37,"Digit2",23,"2",50,"VK_2",d,d],[24,0,38,"Digit3",24,"3",51,"VK_3",d,d],[25,0,39,"Digit4",25,"4",52,"VK_4",d,d],[26,0,40,"Digit5",26,"5",53,"VK_5",d,d],[27,0,41,"Digit6",27,"6",54,"VK_6",d,d],[28,0,42,"Digit7",28,"7",55,"VK_7",d,d],[29,0,43,"Digit8",29,"8",56,"VK_8",d,d],[30,0,44,"Digit9",30,"9",57,"VK_9",d,d],[21,0,45,"Digit0",21,"0",48,"VK_0",d,d],[3,1,46,"Enter",3,"Enter",13,"VK_RETURN",d,d],[9,1,47,"Escape",9,"Escape",27,"VK_ESCAPE",d,d],[1,1,48,"Backspace",1,"Backspace",8,"VK_BACK",d,d],[2,1,49,"Tab",2,"Tab",9,"VK_TAB",d,d],[10,1,50,"Space",10,"Space",32,"VK_SPACE",d,d],[83,0,51,"Minus",83,"-",189,"VK_OEM_MINUS","-","OEM_MINUS"],[81,0,52,"Equal",81,"=",187,"VK_OEM_PLUS","=","OEM_PLUS"],[87,0,53,"BracketLeft",87,"[",219,"VK_OEM_4","[","OEM_4"],[89,0,54,"BracketRight",89,"]",221,"VK_OEM_6","]","OEM_6"],[88,0,55,"Backslash",88,"\\",220,"VK_OEM_5","\\","OEM_5"],[0,0,56,"IntlHash",0,d,0,d,d,d],[80,0,57,"Semicolon",80,";",186,"VK_OEM_1",";","OEM_1"],[90,0,58,"Quote",90,"'",222,"VK_OEM_7","'","OEM_7"],[86,0,59,"Backquote",86,"`",192,"VK_OEM_3","`","OEM_3"],[82,0,60,"Comma",82,",",188,"VK_OEM_COMMA",",","OEM_COMMA"],[84,0,61,"Period",84,".",190,"VK_OEM_PERIOD",".","OEM_PERIOD"],[85,0,62,"Slash",85,"/",191,"VK_OEM_2","/","OEM_2"],[8,1,63,"CapsLock",8,"CapsLock",20,"VK_CAPITAL",d,d],[59,1,64,"F1",59,"F1",112,"VK_F1",d,d],[60,1,65,"F2",60,"F2",113,"VK_F2",d,d],[61,1,66,"F3",61,"F3",114,"VK_F3",d,d],[62,1,67,"F4",62,"F4",115,"VK_F4",d,d],[63,1,68,"F5",63,"F5",116,"VK_F5",d,d],[64,1,69,"F6",64,"F6",117,"VK_F6",d,d],[65,1,70,"F7",65,"F7",118,"VK_F7",d,d],[66,1,71,"F8",66,"F8",119,"VK_F8",d,d],[67,1,72,"F9",67,"F9",120,"VK_F9",d,d],[68,1,73,"F10",68,"F10",121,"VK_F10",d,d],[69,1,74,"F11",69,"F11",122,"VK_F11",d,d],[70,1,75,"F12",70,"F12",123,"VK_F12",d,d],[0,1,76,"PrintScreen",0,d,0,d,d,d],[79,1,77,"ScrollLock",79,"ScrollLock",145,"VK_SCROLL",d,d],[7,1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE",d,d],[19,1,79,"Insert",19,"Insert",45,"VK_INSERT",d,d],[14,1,80,"Home",14,"Home",36,"VK_HOME",d,d],[11,1,81,"PageUp",11,"PageUp",33,"VK_PRIOR",d,d],[20,1,82,"Delete",20,"Delete",46,"VK_DELETE",d,d],[13,1,83,"End",13,"End",35,"VK_END",d,d],[12,1,84,"PageDown",12,"PageDown",34,"VK_NEXT",d,d],[17,1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",d],[15,1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",d],[18,1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",d],[16,1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",d],[78,1,89,"NumLock",78,"NumLock",144,"VK_NUMLOCK",d,d],[108,1,90,"NumpadDivide",108,"NumPad_Divide",111,"VK_DIVIDE",d,d],[103,1,91,"NumpadMultiply",103,"NumPad_Multiply",106,"VK_MULTIPLY",d,d],[106,1,92,"NumpadSubtract",106,"NumPad_Subtract",109,"VK_SUBTRACT",d,d],[104,1,93,"NumpadAdd",104,"NumPad_Add",107,"VK_ADD",d,d],[3,1,94,"NumpadEnter",3,d,0,d,d,d],[94,1,95,"Numpad1",94,"NumPad1",97,"VK_NUMPAD1",d,d],[95,1,96,"Numpad2",95,"NumPad2",98,"VK_NUMPAD2",d,d],[96,1,97,"Numpad3",96,"NumPad3",99,"VK_NUMPAD3",d,d],[97,1,98,"Numpad4",97,"NumPad4",100,"VK_NUMPAD4",d,d],[98,1,99,"Numpad5",98,"NumPad5",101,"VK_NUMPAD5",d,d],[99,1,100,"Numpad6",99,"NumPad6",102,"VK_NUMPAD6",d,d],[100,1,101,"Numpad7",100,"NumPad7",103,"VK_NUMPAD7",d,d],[101,1,102,"Numpad8",101,"NumPad8",104,"VK_NUMPAD8",d,d],[102,1,103,"Numpad9",102,"NumPad9",105,"VK_NUMPAD9",d,d],[93,1,104,"Numpad0",93,"NumPad0",96,"VK_NUMPAD0",d,d],[107,1,105,"NumpadDecimal",107,"NumPad_Decimal",110,"VK_DECIMAL",d,d],[92,0,106,"IntlBackslash",92,"OEM_102",226,"VK_OEM_102",d,d],[58,1,107,"ContextMenu",58,"ContextMenu",93,d,d,d],[0,1,108,"Power",0,d,0,d,d,d],[0,1,109,"NumpadEqual",0,d,0,d,d,d],[71,1,110,"F13",71,"F13",124,"VK_F13",d,d],[72,1,111,"F14",72,"F14",125,"VK_F14",d,d],[73,1,112,"F15",73,"F15",126,"VK_F15",d,d],[74,1,113,"F16",74,"F16",127,"VK_F16",d,d],[75,1,114,"F17",75,"F17",128,"VK_F17",d,d],[76,1,115,"F18",76,"F18",129,"VK_F18",d,d],[77,1,116,"F19",77,"F19",130,"VK_F19",d,d],[0,1,117,"F20",0,d,0,"VK_F20",d,d],[0,1,118,"F21",0,d,0,"VK_F21",d,d],[0,1,119,"F22",0,d,0,"VK_F22",d,d],[0,1,120,"F23",0,d,0,"VK_F23",d,d],[0,1,121,"F24",0,d,0,"VK_F24",d,d],[0,1,122,"Open",0,d,0,d,d,d],[0,1,123,"Help",0,d,0,d,d,d],[0,1,124,"Select",0,d,0,d,d,d],[0,1,125,"Again",0,d,0,d,d,d],[0,1,126,"Undo",0,d,0,d,d,d],[0,1,127,"Cut",0,d,0,d,d,d],[0,1,128,"Copy",0,d,0,d,d,d],[0,1,129,"Paste",0,d,0,d,d,d],[0,1,130,"Find",0,d,0,d,d,d],[0,1,131,"AudioVolumeMute",112,"AudioVolumeMute",173,"VK_VOLUME_MUTE",d,d],[0,1,132,"AudioVolumeUp",113,"AudioVolumeUp",175,"VK_VOLUME_UP",d,d],[0,1,133,"AudioVolumeDown",114,"AudioVolumeDown",174,"VK_VOLUME_DOWN",d,d],[105,1,134,"NumpadComma",105,"NumPad_Separator",108,"VK_SEPARATOR",d,d],[110,0,135,"IntlRo",110,"ABNT_C1",193,"VK_ABNT_C1",d,d],[0,1,136,"KanaMode",0,d,0,d,d,d],[0,0,137,"IntlYen",0,d,0,d,d,d],[0,1,138,"Convert",0,d,0,d,d,d],[0,1,139,"NonConvert",0,d,0,d,d,d],[0,1,140,"Lang1",0,d,0,d,d,d],[0,1,141,"Lang2",0,d,0,d,d,d],[0,1,142,"Lang3",0,d,0,d,d,d],[0,1,143,"Lang4",0,d,0,d,d,d],[0,1,144,"Lang5",0,d,0,d,d,d],[0,1,145,"Abort",0,d,0,d,d,d],[0,1,146,"Props",0,d,0,d,d,d],[0,1,147,"NumpadParenLeft",0,d,0,d,d,d],[0,1,148,"NumpadParenRight",0,d,0,d,d,d],[0,1,149,"NumpadBackspace",0,d,0,d,d,d],[0,1,150,"NumpadMemoryStore",0,d,0,d,d,d],[0,1,151,"NumpadMemoryRecall",0,d,0,d,d,d],[0,1,152,"NumpadMemoryClear",0,d,0,d,d,d],[0,1,153,"NumpadMemoryAdd",0,d,0,d,d,d],[0,1,154,"NumpadMemorySubtract",0,d,0,d,d,d],[0,1,155,"NumpadClear",126,"Clear",12,"VK_CLEAR",d,d],[0,1,156,"NumpadClearEntry",0,d,0,d,d,d],[5,1,0,d,5,"Ctrl",17,"VK_CONTROL",d,d],[4,1,0,d,4,"Shift",16,"VK_SHIFT",d,d],[6,1,0,d,6,"Alt",18,"VK_MENU",d,d],[57,1,0,d,57,"Meta",0,"VK_COMMAND",d,d],[5,1,157,"ControlLeft",5,d,0,"VK_LCONTROL",d,d],[4,1,158,"ShiftLeft",4,d,0,"VK_LSHIFT",d,d],[6,1,159,"AltLeft",6,d,0,"VK_LMENU",d,d],[57,1,160,"MetaLeft",57,d,0,"VK_LWIN",d,d],[5,1,161,"ControlRight",5,d,0,"VK_RCONTROL",d,d],[4,1,162,"ShiftRight",4,d,0,"VK_RSHIFT",d,d],[6,1,163,"AltRight",6,d,0,"VK_RMENU",d,d],[57,1,164,"MetaRight",57,d,0,"VK_RWIN",d,d],[0,1,165,"BrightnessUp",0,d,0,d,d,d],[0,1,166,"BrightnessDown",0,d,0,d,d,d],[0,1,167,"MediaPlay",0,d,0,d,d,d],[0,1,168,"MediaRecord",0,d,0,d,d,d],[0,1,169,"MediaFastForward",0,d,0,d,d,d],[0,1,170,"MediaRewind",0,d,0,d,d,d],[114,1,171,"MediaTrackNext",119,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK",d,d],[115,1,172,"MediaTrackPrevious",120,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK",d,d],[116,1,173,"MediaStop",121,"MediaStop",178,"VK_MEDIA_STOP",d,d],[0,1,174,"Eject",0,d,0,d,d,d],[117,1,175,"MediaPlayPause",122,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE",d,d],[0,1,176,"MediaSelect",123,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT",d,d],[0,1,177,"LaunchMail",124,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL",d,d],[0,1,178,"LaunchApp2",125,"LaunchApp2",183,"VK_MEDIA_LAUNCH_APP2",d,d],[0,1,179,"LaunchApp1",0,d,0,"VK_MEDIA_LAUNCH_APP1",d,d],[0,1,180,"SelectTask",0,d,0,d,d,d],[0,1,181,"LaunchScreenSaver",0,d,0,d,d,d],[0,1,182,"BrowserSearch",115,"BrowserSearch",170,"VK_BROWSER_SEARCH",d,d],[0,1,183,"BrowserHome",116,"BrowserHome",172,"VK_BROWSER_HOME",d,d],[112,1,184,"BrowserBack",117,"BrowserBack",166,"VK_BROWSER_BACK",d,d],[113,1,185,"BrowserForward",118,"BrowserForward",167,"VK_BROWSER_FORWARD",d,d],[0,1,186,"BrowserStop",0,d,0,"VK_BROWSER_STOP",d,d],[0,1,187,"BrowserRefresh",0,d,0,"VK_BROWSER_REFRESH",d,d],[0,1,188,"BrowserFavorites",0,d,0,"VK_BROWSER_FAVORITES",d,d],[0,1,189,"ZoomToggle",0,d,0,d,d,d],[0,1,190,"MailReply",0,d,0,d,d,d],[0,1,191,"MailForward",0,d,0,d,d,d],[0,1,192,"MailSend",0,d,0,d,d,d],[109,1,0,d,109,"KeyInComposition",229,d,d,d],[111,1,0,d,111,"ABNT_C2",194,"VK_ABNT_C2",d,d],[91,1,0,d,91,"OEM_8",223,"VK_OEM_8",d,d],[0,1,0,d,0,d,0,"VK_KANA",d,d],[0,1,0,d,0,d,0,"VK_HANGUL",d,d],[0,1,0,d,0,d,0,"VK_JUNJA",d,d],[0,1,0,d,0,d,0,"VK_FINAL",d,d],[0,1,0,d,0,d,0,"VK_HANJA",d,d],[0,1,0,d,0,d,0,"VK_KANJI",d,d],[0,1,0,d,0,d,0,"VK_CONVERT",d,d],[0,1,0,d,0,d,0,"VK_NONCONVERT",d,d],[0,1,0,d,0,d,0,"VK_ACCEPT",d,d],[0,1,0,d,0,d,0,"VK_MODECHANGE",d,d],[0,1,0,d,0,d,0,"VK_SELECT",d,d],[0,1,0,d,0,d,0,"VK_PRINT",d,d],[0,1,0,d,0,d,0,"VK_EXECUTE",d,d],[0,1,0,d,0,d,0,"VK_SNAPSHOT",d,d],[0,1,0,d,0,d,0,"VK_HELP",d,d],[0,1,0,d,0,d,0,"VK_APPS",d,d],[0,1,0,d,0,d,0,"VK_PROCESSKEY",d,d],[0,1,0,d,0,d,0,"VK_PACKET",d,d],[0,1,0,d,0,d,0,"VK_DBE_SBCSCHAR",d,d],[0,1,0,d,0,d,0,"VK_DBE_DBCSCHAR",d,d],[0,1,0,d,0,d,0,"VK_ATTN",d,d],[0,1,0,d,0,d,0,"VK_CRSEL",d,d],[0,1,0,d,0,d,0,"VK_EXSEL",d,d],[0,1,0,d,0,d,0,"VK_EREOF",d,d],[0,1,0,d,0,d,0,"VK_PLAY",d,d],[0,1,0,d,0,d,0,"VK_ZOOM",d,d],[0,1,0,d,0,d,0,"VK_NONAME",d,d],[0,1,0,d,0,d,0,"VK_PA1",d,d],[0,1,0,d,0,d,0,"VK_OEM_CLEAR",d,d]],D=[],L=[];for(const k of w){const[j,N,B,T,H,Y,ee,ce,pe,ge]=k;if(L[B]||(L[B]=!0,Q[B]=T,J[T]=B,z[T.toLowerCase()]=B,N&&(S[B]=H,H!==0&&H!==3&&H!==5&&H!==4&&H!==6&&H!==57&&(_[H]=B))),!D[H]){if(D[H]=!0,!Y)throw new Error(`String representation missing for key code ${H} around scan code ${T}`);h.define(H,Y),te.define(H,pe||Y),$.define(H,ge||pe||Y)}ee&&(x[ee]=H),ce&&(ie[ce]=H)}_[3]=46})();var y;(function(d){function w(B){return h.keyCodeToStr(B)}d.toString=w;function D(B){return h.strToKeyCode(B)}d.fromString=D;function L(B){return te.keyCodeToStr(B)}d.toUserSettingsUS=L;function k(B){return $.keyCodeToStr(B)}d.toUserSettingsGeneral=k;function j(B){return te.strToKeyCode(B)||$.strToKeyCode(B)}d.fromUserSettings=j;function N(B){if(B>=93&&B<=108)return null;switch(B){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return h.keyCodeToStr(B)}d.toElectronAccelerator=N})(y||(y={}));function C(d,w){const D=(w&65535)<<16>>>0;return(d|D)>>>0}},98315:(Tt,Fe,f)=>{f.d(Fe,{Of:()=>te,r0:()=>$,rr:()=>x});var I=f(3765);class h{constructor(z,S,_=S){this.modifierLabels=[null],this.modifierLabels[2]=z,this.modifierLabels[1]=S,this.modifierLabels[3]=_}toLabel(z,S,_){if(S.length===0)return null;const y=[];for(let C=0,d=S.length;C<d;C++){const w=S[C],D=_(w);if(D===null)return null;y[C]=Q(w,D,this.modifierLabels[z])}return y.join(" ")}}const te=new h({ctrlKey:"\u2303",shiftKey:"\u21E7",altKey:"\u2325",metaKey:"\u2318",separator:""},{ctrlKey:I.kg({key:"ctrlKey",comment:["This is the short form for the Control key on the keyboard"]},"Ctrl"),shiftKey:I.kg({key:"shiftKey",comment:["This is the short form for the Shift key on the keyboard"]},"Shift"),altKey:I.kg({key:"altKey",comment:["This is the short form for the Alt key on the keyboard"]},"Alt"),metaKey:I.kg({key:"windowsKey",comment:["This is the short form for the Windows key on the keyboard"]},"Windows"),separator:"+"},{ctrlKey:I.kg({key:"ctrlKey",comment:["This is the short form for the Control key on the keyboard"]},"Ctrl"),shiftKey:I.kg({key:"shiftKey",comment:["This is the short form for the Shift key on the keyboard"]},"Shift"),altKey:I.kg({key:"altKey",comment:["This is the short form for the Alt key on the keyboard"]},"Alt"),metaKey:I.kg({key:"superKey",comment:["This is the short form for the Super key on the keyboard"]},"Super"),separator:"+"}),$=new h({ctrlKey:I.kg({key:"ctrlKey.long",comment:["This is the long form for the Control key on the keyboard"]},"Control"),shiftKey:I.kg({key:"shiftKey.long",comment:["This is the long form for the Shift key on the keyboard"]},"Shift"),altKey:I.kg({key:"optKey.long",comment:["This is the long form for the Alt/Option key on the keyboard"]},"Option"),metaKey:I.kg({key:"cmdKey.long",comment:["This is the long form for the Command key on the keyboard"]},"Command"),separator:"+"},{ctrlKey:I.kg({key:"ctrlKey.long",comment:["This is the long form for the Control key on the keyboard"]},"Control"),shiftKey:I.kg({key:"shiftKey.long",comment:["This is the long form for the Shift key on the keyboard"]},"Shift"),altKey:I.kg({key:"altKey.long",comment:["This is the long form for the Alt key on the keyboard"]},"Alt"),metaKey:I.kg({key:"windowsKey.long",comment:["This is the long form for the Windows key on the keyboard"]},"Windows"),separator:"+"},{ctrlKey:I.kg({key:"ctrlKey.long",comment:["This is the long form for the Control key on the keyboard"]},"Control"),shiftKey:I.kg({key:"shiftKey.long",comment:["This is the long form for the Shift key on the keyboard"]},"Shift"),altKey:I.kg({key:"altKey.long",comment:["This is the long form for the Alt key on the keyboard"]},"Alt"),metaKey:I.kg({key:"superKey.long",comment:["This is the long form for the Super key on the keyboard"]},"Super"),separator:"+"}),x=new h({ctrlKey:"Ctrl",shiftKey:"Shift",altKey:"Alt",metaKey:"Cmd",separator:"+"},{ctrlKey:"Ctrl",shiftKey:"Shift",altKey:"Alt",metaKey:"Super",separator:"+"}),ie=new h({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 Q(J,z,S){if(z===null)return"";const _=[];return J.ctrlKey&&_.push(S.ctrlKey),J.shiftKey&&_.push(S.shiftKey),J.altKey&&_.push(S.altKey),J.metaKey&&_.push(S.metaKey),z!==""&&_.push(z),_.join(S.separator)}},39619:(Tt,Fe,f)=>{f.d(Fe,{QB:()=>Q,ZU:()=>h,h$:()=>$,p:()=>x,z5:()=>J});var I=f(94327);function h(z,S){if(z===0)return null;const _=(z&65535)>>>0,y=(z&4294901760)>>>16;return y!==0?new x([te(_,S),te(y,S)]):new x([te(_,S)])}function te(z,S){const _=!!(z&2048),y=!!(z&256),C=S===2?y:_,d=!!(z&1024),w=!!(z&512),D=S===2?_:y,L=z&255;return new $(C,d,w,D,L)}class ${constructor(S,_,y,C,d){this.ctrlKey=S,this.shiftKey=_,this.altKey=y,this.metaKey=C,this.keyCode=d}equals(S){return this.ctrlKey===S.ctrlKey&&this.shiftKey===S.shiftKey&&this.altKey===S.altKey&&this.metaKey===S.metaKey&&this.keyCode===S.keyCode}isModifierKey(){return this.keyCode===0||this.keyCode===5||this.keyCode===57||this.keyCode===6||this.keyCode===4}toChord(){return new x([this])}isDuplicateModifierCase(){return this.ctrlKey&&this.keyCode===5||this.shiftKey&&this.keyCode===4||this.altKey&&this.keyCode===6||this.metaKey&&this.keyCode===57}}class x{constructor(S){if(S.length===0)throw(0,I.Qg)("parts");this.parts=S}}class ie{constructor(S,_,y,C,d){this.ctrlKey=S,this.shiftKey=_,this.altKey=y,this.metaKey=C,this.scanCode=d}isDuplicateModifierCase(){return this.ctrlKey&&(this.scanCode===157||this.scanCode===161)||this.shiftKey&&(this.scanCode===158||this.scanCode===162)||this.altKey&&(this.scanCode===159||this.scanCode===163)||this.metaKey&&(this.scanCode===160||this.scanCode===164)}}class Q{constructor(S,_,y,C,d,w){this.ctrlKey=S,this.shiftKey=_,this.altKey=y,this.metaKey=C,this.keyLabel=d,this.keyAriaLabel=w}}class J{}},63946:(Tt,Fe,f)=>{f.d(Fe,{d:()=>I});class I{constructor(te){this.executor=te,this._didRun=!1}hasValue(){return this._didRun}getValue(){if(!this._didRun)try{this._value=this.executor()}catch(te){this._error=te}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}}},10998:(Tt,Fe,f)=>{f.d(Fe,{AS:()=>C,BO:()=>B,Cm:()=>D,HE:()=>k,St:()=>N,Xm:()=>y,jG:()=>L,lC:()=>S,mp:()=>j,qE:()=>d,s:()=>w});var I=f(48289),h=f(17954);const te=!1;let $=null;function x(T){$=T}if(te){const T="__is_disposable_tracked__";x(new class{trackDisposable(H){const Y=new Error("Potentially leaked disposable").stack;setTimeout(()=>{H[T]||console.log(Y)},3e3)}setParent(H,Y){if(H&&H!==L.None)try{H[T]=!0}catch{}}markAsDisposed(H){if(H&&H!==L.None)try{H[T]=!0}catch{}}markAsSingleton(H){}})}function ie(T){return $?.trackDisposable(T),T}function Q(T){$?.markAsDisposed(T)}function J(T,H){$?.setParent(T,H)}function z(T,H){if($)for(const Y of T)$.setParent(Y,H)}function S(T){return $?.markAsSingleton(T),T}class _ extends Error{constructor(H){super(`Encountered errors while disposing of store. Errors: [${H.join(", ")}]`),this.errors=H}}function y(T){return typeof T.dispose=="function"&&T.dispose.length===0}function C(T){if(h.f.is(T)){const H=[];for(const Y of T)if(Y)try{Y.dispose()}catch(ee){H.push(ee)}if(H.length===1)throw H[0];if(H.length>1)throw new _(H);return Array.isArray(T)?[]:T}else if(T)return T.dispose(),T}function d(...T){const H=w(()=>C(T));return z(T,H),H}function w(T){const H=ie({dispose:(0,I.O)(()=>{Q(H),T()})});return H}class D{constructor(){this._toDispose=new Set,this._isDisposed=!1,ie(this)}dispose(){this._isDisposed||(Q(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){try{C(this._toDispose.values())}finally{this._toDispose.clear()}}add(H){if(!H)return H;if(H===this)throw new Error("Cannot register a disposable on itself!");return J(H,this),this._isDisposed?D.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(H),H}}D.DISABLE_DISPOSED_WARNING=!1;class L{constructor(){this._store=new D,ie(this),J(this._store,this)}dispose(){Q(this),this._store.dispose()}_register(H){if(H===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(H)}}L.None=Object.freeze({dispose(){}});class k{constructor(){this._isDisposed=!1,ie(this)}get value(){return this._isDisposed?void 0:this._value}set value(H){var Y;this._isDisposed||H===this._value||((Y=this._value)===null||Y===void 0||Y.dispose(),H&&J(H,this),this._value=H)}clear(){this.value=void 0}dispose(){var H;this._isDisposed=!0,Q(this),(H=this._value)===null||H===void 0||H.dispose(),this._value=void 0}clearAndLeak(){const H=this._value;return this._value=void 0,H&&J(H,null),H}}class j{constructor(H){this._disposable=H,this._counter=1}acquire(){return this._counter++,this}release(){return--this._counter===0&&this._disposable.dispose(),this}}class N{constructor(){this.dispose=()=>{},this.unset=()=>{},this.isset=()=>!1,ie(this)}set(H){let Y=H;return this.unset=()=>Y=void 0,this.isset=()=>Y!==void 0,this.dispose=()=>{Y&&(Y(),Y=void 0,Q(this))},this}}class B{constructor(H){this.object=H}dispose(){}}},85525:(Tt,Fe,f)=>{f.d(Fe,{w:()=>h});class I{constructor($){this.element=$,this.next=I.Undefined,this.prev=I.Undefined}}I.Undefined=new I(void 0);class h{constructor(){this._first=I.Undefined,this._last=I.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===I.Undefined}clear(){let $=this._first;for(;$!==I.Undefined;){const x=$.next;$.prev=I.Undefined,$.next=I.Undefined,$=x}this._first=I.Undefined,this._last=I.Undefined,this._size=0}unshift($){return this._insert($,!1)}push($){return this._insert($,!0)}_insert($,x){const ie=new I($);if(this._first===I.Undefined)this._first=ie,this._last=ie;else if(x){const J=this._last;this._last=ie,ie.prev=J,J.next=ie}else{const J=this._first;this._first=ie,ie.next=J,J.prev=ie}this._size+=1;let Q=!1;return()=>{Q||(Q=!0,this._remove(ie))}}shift(){if(this._first!==I.Undefined){const $=this._first.element;return this._remove(this._first),$}}pop(){if(this._last!==I.Undefined){const $=this._last.element;return this._remove(this._last),$}}_remove($){if($.prev!==I.Undefined&&$.next!==I.Undefined){const x=$.prev;x.next=$.next,$.next.prev=x}else $.prev===I.Undefined&&$.next===I.Undefined?(this._first=I.Undefined,this._last=I.Undefined):$.next===I.Undefined?(this._last=this._last.prev,this._last.next=I.Undefined):$.prev===I.Undefined&&(this._first=this._first.next,this._first.prev=I.Undefined);this._size-=1}*[Symbol.iterator](){let $=this._first;for(;$!==I.Undefined;)yield $.element,$=$.next}}},27992:(Tt,Fe,f)=>{f.d(Fe,{cB:()=>z,fT:()=>_,qK:()=>C});var I=f(16844),h,te;class ${constructor(){this._value="",this._pos=0}reset(w){return this._value=w,this._pos=0,this}next(){return this._pos+=1,this}hasNext(){return this._pos<this._value.length-1}cmp(w){const D=w.charCodeAt(0),L=this._value.charCodeAt(this._pos);return D-L}value(){return this._value[this._pos]}}class x{constructor(w=!0){this._caseSensitive=w}reset(w){return this._value=w,this._from=0,this._to=0,this.next()}hasNext(){return this._to<this._value.length}next(){this._from=this._to;let w=!0;for(;this._to<this._value.length;this._to++)if(this._value.charCodeAt(this._to)===46)if(w)this._from++;else break;else w=!1;return this}cmp(w){return this._caseSensitive?(0,I.lF)(w,this._value,0,w.length,this._from,this._to):(0,I.zd)(w,this._value,0,w.length,this._from,this._to)}value(){return this._value.substring(this._from,this._to)}}class ie{constructor(w=!0,D=!0){this._splitOnBackslash=w,this._caseSensitive=D}reset(w){this._from=0,this._to=0,this._value=w,this._valueLen=w.length;for(let D=w.length-1;D>=0;D--,this._valueLen--){const L=this._value.charCodeAt(D);if(!(L===47||this._splitOnBackslash&&L===92))break}return this.next()}hasNext(){return this._to<this._valueLen}next(){this._from=this._to;let w=!0;for(;this._to<this._valueLen;this._to++){const D=this._value.charCodeAt(this._to);if(D===47||this._splitOnBackslash&&D===92)if(w)this._from++;else break;else w=!1}return this}cmp(w){return this._caseSensitive?(0,I.lF)(w,this._value,0,w.length,this._from,this._to):(0,I.zd)(w,this._value,0,w.length,this._from,this._to)}value(){return this._value.substring(this._from,this._to)}}class Q{constructor(w,D){this._ignorePathCasing=w,this._ignoreQueryAndFragment=D,this._states=[],this._stateIdx=0}reset(w){return this._value=w,this._states=[],this._value.scheme&&this._states.push(1),this._value.authority&&this._states.push(2),this._value.path&&(this._pathIterator=new ie(!1,!this._ignorePathCasing(w)),this._pathIterator.reset(w.path),this._pathIterator.value()&&this._states.push(3)),this._ignoreQueryAndFragment(w)||(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(w){if(this._states[this._stateIdx]===1)return(0,I.W1)(w,this._value.scheme);if(this._states[this._stateIdx]===2)return(0,I.W1)(w,this._value.authority);if(this._states[this._stateIdx]===3)return this._pathIterator.cmp(w);if(this._states[this._stateIdx]===4)return(0,I.UD)(w,this._value.query);if(this._states[this._stateIdx]===5)return(0,I.UD)(w,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 J{constructor(){this.height=1}rotateLeft(){const w=this.right;return this.right=w.left,w.left=this,this.updateHeight(),w.updateHeight(),w}rotateRight(){const w=this.left;return this.left=w.right,w.right=this,this.updateHeight(),w.updateHeight(),w}updateHeight(){this.height=1+Math.max(this.heightLeft,this.heightRight)}balanceFactor(){return this.heightRight-this.heightLeft}get heightLeft(){var w,D;return(D=(w=this.left)===null||w===void 0?void 0:w.height)!==null&&D!==void 0?D:0}get heightRight(){var w,D;return(D=(w=this.right)===null||w===void 0?void 0:w.height)!==null&&D!==void 0?D:0}}class z{constructor(w){this._iter=w}static forUris(w=()=>!1,D=()=>!1){return new z(new Q(w,D))}static forStrings(){return new z(new $)}static forConfigKeys(){return new z(new x)}clear(){this._root=void 0}set(w,D){const L=this._iter.reset(w);let k;this._root||(this._root=new J,this._root.segment=L.value());const j=[];for(k=this._root;;){const B=L.cmp(k.segment);if(B>0)k.left||(k.left=new J,k.left.segment=L.value()),j.push([-1,k]),k=k.left;else if(B<0)k.right||(k.right=new J,k.right.segment=L.value()),j.push([1,k]),k=k.right;else if(L.hasNext())L.next(),k.mid||(k.mid=new J,k.mid.segment=L.value()),j.push([0,k]),k=k.mid;else break}const N=k.value;k.value=D,k.key=w;for(let B=j.length-1;B>=0;B--){const T=j[B][1];T.updateHeight();const H=T.balanceFactor();if(H<-1||H>1){const Y=j[B][0],ee=j[B+1][0];if(Y===1&&ee===1)j[B][1]=T.rotateLeft();else if(Y===-1&&ee===-1)j[B][1]=T.rotateRight();else if(Y===1&&ee===-1)T.right=j[B+1][1]=j[B+1][1].rotateRight(),j[B][1]=T.rotateLeft();else if(Y===-1&&ee===1)T.left=j[B+1][1]=j[B+1][1].rotateLeft(),j[B][1]=T.rotateRight();else throw new Error;if(B>0)switch(j[B-1][0]){case-1:j[B-1][1].left=j[B][1];break;case 1:j[B-1][1].right=j[B][1];break;case 0:j[B-1][1].mid=j[B][1];break}else this._root=j[0][1]}}return N}get(w){var D;return(D=this._getNode(w))===null||D===void 0?void 0:D.value}_getNode(w){const D=this._iter.reset(w);let L=this._root;for(;L;){const k=D.cmp(L.segment);if(k>0)L=L.left;else if(k<0)L=L.right;else if(D.hasNext())D.next(),L=L.mid;else break}return L}has(w){const D=this._getNode(w);return!(D?.value===void 0&&D?.mid===void 0)}delete(w){return this._delete(w,!1)}deleteSuperstr(w){return this._delete(w,!0)}_delete(w,D){var L;const k=this._iter.reset(w),j=[];let N=this._root;for(;N;){const B=k.cmp(N.segment);if(B>0)j.push([-1,N]),N=N.left;else if(B<0)j.push([1,N]),N=N.right;else if(k.hasNext())k.next(),j.push([0,N]),N=N.mid;else break}if(N){if(D?(N.left=void 0,N.mid=void 0,N.right=void 0,N.height=1):(N.key=void 0,N.value=void 0),!N.mid&&!N.value)if(N.left&&N.right){const B=this._min(N.right),{key:T,value:H,segment:Y}=B;this._delete(B.key,!1),N.key=T,N.value=H,N.segment=Y}else{const B=(L=N.left)!==null&&L!==void 0?L:N.right;if(j.length>0){const[T,H]=j[j.length-1];switch(T){case-1:H.left=B;break;case 0:H.mid=B;break;case 1:H.right=B;break}}else this._root=B}for(let B=j.length-1;B>=0;B--){const T=j[B][1];T.updateHeight();const H=T.balanceFactor();if(H>1?(T.right.balanceFactor()>=0||(T.right=T.right.rotateRight()),j[B][1]=T.rotateLeft()):H<-1&&(T.left.balanceFactor()<=0||(T.left=T.left.rotateLeft()),j[B][1]=T.rotateRight()),B>0)switch(j[B-1][0]){case-1:j[B-1][1].left=j[B][1];break;case 1:j[B-1][1].right=j[B][1];break;case 0:j[B-1][1].mid=j[B][1];break}else this._root=j[0][1]}}}_min(w){for(;w.left;)w=w.left;return w}findSubstr(w){const D=this._iter.reset(w);let L=this._root,k;for(;L;){const j=D.cmp(L.segment);if(j>0)L=L.left;else if(j<0)L=L.right;else if(D.hasNext())D.next(),k=L.value||k,L=L.mid;else break}return L&&L.value||k}findSuperstr(w){const D=this._iter.reset(w);let L=this._root;for(;L;){const k=D.cmp(L.segment);if(k>0)L=L.left;else if(k<0)L=L.right;else if(D.hasNext())D.next(),L=L.mid;else return L.mid?this._entries(L.mid):void 0}}forEach(w){for(const[D,L]of this)w(L,D)}*[Symbol.iterator](){yield*this._entries(this._root)}_entries(w){const D=[];return this._dfsEntries(w,D),D[Symbol.iterator]()}_dfsEntries(w,D){w&&(w.left&&this._dfsEntries(w.left,D),w.value&&D.push([w.key,w.value]),w.mid&&this._dfsEntries(w.mid,D),w.right&&this._dfsEntries(w.right,D))}}class S{constructor(w,D){this.uri=w,this.value=D}}class _{constructor(w,D){this[h]="ResourceMap",w instanceof _?(this.map=new Map(w.map),this.toKey=D??_.defaultToKey):(this.map=new Map,this.toKey=w??_.defaultToKey)}set(w,D){return this.map.set(this.toKey(w),new S(w,D)),this}get(w){var D;return(D=this.map.get(this.toKey(w)))===null||D===void 0?void 0:D.value}has(w){return this.map.has(this.toKey(w))}get size(){return this.map.size}clear(){this.map.clear()}delete(w){return this.map.delete(this.toKey(w))}forEach(w,D){typeof D<"u"&&(w=w.bind(D));for(const[L,k]of this.map)w(k.value,k.uri,this)}*values(){for(const w of this.map.values())yield w.value}*keys(){for(const w of this.map.values())yield w.uri}*entries(){for(const w of this.map.values())yield[w.uri,w.value]}*[(h=Symbol.toStringTag,Symbol.iterator)](){for(const[,w]of this.map)yield[w.uri,w.value]}}_.defaultToKey=d=>d.toString();class y{constructor(){this[te]="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 w;return(w=this._head)===null||w===void 0?void 0:w.value}get last(){var w;return(w=this._tail)===null||w===void 0?void 0:w.value}has(w){return this._map.has(w)}get(w,D=0){const L=this._map.get(w);if(L)return D!==0&&this.touch(L,D),L.value}set(w,D,L=0){let k=this._map.get(w);if(k)k.value=D,L!==0&&this.touch(k,L);else{switch(k={key:w,value:D,next:void 0,previous:void 0},L){case 0:this.addItemLast(k);break;case 1:this.addItemFirst(k);break;case 2:this.addItemLast(k);break;default:this.addItemLast(k);break}this._map.set(w,k),this._size++}return this}delete(w){return!!this.remove(w)}remove(w){const D=this._map.get(w);if(D)return this._map.delete(w),this.removeItem(D),this._size--,D.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const w=this._head;return this._map.delete(w.key),this.removeItem(w),this._size--,w.value}forEach(w,D){const L=this._state;let k=this._head;for(;k;){if(D?w.bind(D)(k.value,k.key,this):w(k.value,k.key,this),this._state!==L)throw new Error("LinkedMap got modified during iteration.");k=k.next}}keys(){const w=this,D=this._state;let L=this._head;const k={[Symbol.iterator](){return k},next(){if(w._state!==D)throw new Error("LinkedMap got modified during iteration.");if(L){const j={value:L.key,done:!1};return L=L.next,j}else return{value:void 0,done:!0}}};return k}values(){const w=this,D=this._state;let L=this._head;const k={[Symbol.iterator](){return k},next(){if(w._state!==D)throw new Error("LinkedMap got modified during iteration.");if(L){const j={value:L.value,done:!1};return L=L.next,j}else return{value:void 0,done:!0}}};return k}entries(){const w=this,D=this._state;let L=this._head;const k={[Symbol.iterator](){return k},next(){if(w._state!==D)throw new Error("LinkedMap got modified during iteration.");if(L){const j={value:[L.key,L.value],done:!1};return L=L.next,j}else return{value:void 0,done:!0}}};return k}[(te=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(w){if(w>=this.size)return;if(w===0){this.clear();return}let D=this._head,L=this.size;for(;D&&L>w;)this._map.delete(D.key),D=D.next,L--;this._head=D,this._size=L,D&&(D.previous=void 0),this._state++}addItemFirst(w){if(!this._head&&!this._tail)this._tail=w;else if(this._head)w.next=this._head,this._head.previous=w;else throw new Error("Invalid list");this._head=w,this._state++}addItemLast(w){if(!this._head&&!this._tail)this._head=w;else if(this._tail)w.previous=this._tail,this._tail.next=w;else throw new Error("Invalid list");this._tail=w,this._state++}removeItem(w){if(w===this._head&&w===this._tail)this._head=void 0,this._tail=void 0;else if(w===this._head){if(!w.next)throw new Error("Invalid list");w.next.previous=void 0,this._head=w.next}else if(w===this._tail){if(!w.previous)throw new Error("Invalid list");w.previous.next=void 0,this._tail=w.previous}else{const D=w.next,L=w.previous;if(!D||!L)throw new Error("Invalid list");D.previous=L,L.next=D}w.next=void 0,w.previous=void 0,this._state++}touch(w,D){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(D!==1&&D!==2)){if(D===1){if(w===this._head)return;const L=w.next,k=w.previous;w===this._tail?(k.next=void 0,this._tail=k):(L.previous=k,k.next=L),w.previous=void 0,w.next=this._head,this._head.previous=w,this._head=w,this._state++}else if(D===2){if(w===this._tail)return;const L=w.next,k=w.previous;w===this._head?(L.previous=void 0,this._head=L):(L.previous=k,k.next=L),w.next=void 0,w.previous=this._tail,this._tail.next=w,this._tail=w,this._state++}}}toJSON(){const w=[];return this.forEach((D,L)=>{w.push([L,D])}),w}fromJSON(w){this.clear();for(const[D,L]of w)this.set(D,L)}}class C extends y{constructor(w,D=1){super(),this._limit=w,this._ratio=Math.min(Math.max(0,D),1)}get limit(){return this._limit}set limit(w){this._limit=w,this.checkTrim()}get(w,D=2){return super.get(w,D)}peek(w){return super.get(w,0)}set(w,D){return super.set(w,D,2),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}},50180:(Tt,Fe,f)=>{f.d(Fe,{q:()=>te});var I=f(42802),h=f(37264);function te(x){let ie=JSON.parse(x);return ie=$(ie),ie}function $(x,ie=0){if(!x||ie>200)return x;if(typeof x=="object"){switch(x.$mid){case 1:return h.r.revive(x);case 2:return new RegExp(x.source,x.flags);case 14:return new Date(x.source)}if(x instanceof I.MB||x instanceof Uint8Array)return x;if(Array.isArray(x))for(let Q=0;Q<x.length;++Q)x[Q]=$(x[Q],ie+1);else for(const Q in x)Object.hasOwnProperty.call(x,Q)&&(x[Q]=$(x[Q],ie+1))}return x}},53720:(Tt,Fe,f)=>{f.d(Fe,{K:()=>I});const I=Object.freeze({text:"text/plain",binary:"application/octet-stream",unknown:"application/unknown",markdown:"text/markdown",latex:"text/latex",uriList:"text/uri-list"})},13072:(Tt,Fe,f)=>{f.d(Fe,{Ez:()=>ie,ny:()=>te,zl:()=>J});var I=f(63339),h=f(37264),te;(function(z){z.inMemory="inmemory",z.vscode="vscode",z.internal="private",z.walkThrough="walkThrough",z.walkThroughSnippet="walkThroughSnippet",z.http="http",z.https="https",z.file="file",z.mailto="mailto",z.untitled="untitled",z.data="data",z.command="command",z.vscodeRemote="vscode-remote",z.vscodeRemoteResource="vscode-remote-resource",z.vscodeUserData="vscode-userdata",z.vscodeCustomEditor="vscode-custom-editor",z.vscodeNotebook="vscode-notebook",z.vscodeNotebookCell="vscode-notebook-cell",z.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",z.vscodeNotebookCellOutput="vscode-notebook-cell-output",z.vscodeInteractive="vscode-interactive",z.vscodeInteractiveInput="vscode-interactive-input",z.vscodeSettings="vscode-settings",z.vscodeWorkspaceTrust="vscode-workspace-trust",z.vscodeTerminal="vscode-terminal",z.webviewPanel="webview-panel",z.vscodeWebview="vscode-webview",z.extension="extension",z.vscodeFileResource="vscode-file",z.tmp="tmp",z.vsls="vsls",z.vscodeSourceControl="vscode-scm"})(te||(te={}));const $="tkn";class x{constructor(){this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null,this._remoteResourcesPath=`/${te.vscodeRemoteResource}`}setPreferredWebSchema(S){this._preferredWebSchema=S}rewrite(S){if(this._delegate)return this._delegate(S);const _=S.authority;let y=this._hosts[_];y&&y.indexOf(":")!==-1&&(y=`[${y}]`);const C=this._ports[_],d=this._connectionTokens[_];let w=`path=${encodeURIComponent(S.path)}`;return typeof d=="string"&&(w+=`&${$}=${encodeURIComponent(d)}`),h.r.from({scheme:I.HZ?this._preferredWebSchema:te.vscodeRemoteResource,authority:`${y}:${C}`,path:this._remoteResourcesPath,query:w})}}const ie=new x;class Q{asBrowserUri(S,_){const y=this.toUri(S,_);return y.scheme===te.vscodeRemote?ie.rewrite(y):y.scheme===te.file&&(I.ib||I.p7&&I.zQ.origin===`${te.vscodeFileResource}://${Q.FALLBACK_AUTHORITY}`)?y.with({scheme:te.vscodeFileResource,authority:y.authority||Q.FALLBACK_AUTHORITY,query:null,fragment:null}):y}toUri(S,_){return h.r.isUri(S)?S:h.r.parse(_.toUrl(S))}}Q.FALLBACK_AUTHORITY="vscode-app";const J=new Q},62992:(Tt,Fe,f)=>{f.d(Fe,{Uq:()=>h,mu:()=>te,qE:()=>I});function I($,x,ie){return Math.min(Math.max($,x),ie)}class h{constructor(){this._n=1,this._val=0}update(x){return this._val=this._val+(x-this._val)/this._n,this._n+=1,this._val}get value(){return this._val}}class te{constructor(x){this._n=0,this._val=0,this._values=[],this._index=0,this._sum=0,this._values=new Array(x),this._values.fill(0,0,x)}update(x){const ie=this._values[this._index];return this._values[this._index]=x,this._index=(this._index+1)%this._values.length,this._sum-=ie,this._sum+=x,this._n<this._values.length&&(this._n+=1),this._val=this._sum/this._n,this._val}get value(){return this._val}}},71386:(Tt,Fe,f)=>{f.d(Fe,{Go:()=>h,PI:()=>x,aI:()=>J,co:()=>Q,ol:()=>te});var I=f(79359);function h(z){if(!z||typeof z!="object"||z instanceof RegExp)return z;const S=Array.isArray(z)?[]:{};return Object.keys(z).forEach(_=>{z[_]&&typeof z[_]=="object"?S[_]=h(z[_]):S[_]=z[_]}),S}function te(z){if(!z||typeof z!="object")return z;const S=[z];for(;S.length>0;){const _=S.shift();Object.freeze(_);for(const y in _)if($.call(_,y)){const C=_[y];typeof C=="object"&&!Object.isFrozen(C)&&!(0,I.iu)(C)&&S.push(C)}}return z}const $=Object.prototype.hasOwnProperty;function x(z,S){return ie(z,S,new Set)}function ie(z,S,_){if((0,I.z)(z))return z;const y=S(z);if(typeof y<"u")return y;if((0,I.cy)(z)){const C=[];for(const d of z)C.push(ie(d,S,_));return C}if((0,I.Gv)(z)){if(_.has(z))throw new Error("Cannot clone recursive data-structure");_.add(z);const C={};for(const d in z)$.call(z,d)&&(C[d]=ie(z[d],S,_));return _.delete(z),C}return z}function Q(z,S,_=!0){return(0,I.Gv)(z)?((0,I.Gv)(S)&&Object.keys(S).forEach(y=>{y in z?_&&((0,I.Gv)(z[y])&&(0,I.Gv)(S[y])?Q(z[y],S[y],_):z[y]=S[y]):z[y]=S[y]}),z):S}function J(z,S){if(z===S)return!0;if(z==null||S===null||S===void 0||typeof z!=typeof S||typeof z!="object"||Array.isArray(z)!==Array.isArray(S))return!1;let _,y;if(Array.isArray(z)){if(z.length!==S.length)return!1;for(_=0;_<z.length;_++)if(!J(z[_],S[_]))return!1}else{const C=[];for(y in z)C.push(y);C.sort();const d=[];for(y in S)d.push(y);if(d.sort(),!J(C,d))return!1;for(_=0;_<C.length;_++)if(!J(z[C[_]],S[C[_]]))return!1}return!0}},64033:(Tt,Fe,f)=>{f.d(Fe,{P8:()=>ge,pD:()=>pe,LC:()=>fe,S8:()=>Y,SA:()=>H,V8:()=>ce,hd:()=>ee,Vn:()=>oe,IN:()=>T});var I=f(63339);let h;if(typeof I.zQ.vscode<"u"&&typeof I.zQ.vscode.process<"u"){const Z=I.zQ.vscode.process;h={get platform(){return Z.platform},get arch(){return Z.arch},get env(){return Z.env},cwd(){return Z.cwd()}}}else typeof process<"u"?h={get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd(){return process.env.VSCODE_CWD||process.cwd()}}:h={get platform(){return I.uF?"win32":I.zx?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};const te=h.cwd,$=h.env,x=h.platform,ie=65,Q=97,J=90,z=122,S=46,_=47,y=92,C=58,d=63;class w extends Error{constructor(le,se,X){let K;typeof se=="string"&&se.indexOf("not ")===0?(K="must not be",se=se.replace(/^not /,"")):K="must be";const he=le.indexOf(".")!==-1?"property":"argument";let ve=`The "${le}" ${he} ${K} of type ${se}`;ve+=`. Received type ${typeof X}`,super(ve),this.code="ERR_INVALID_ARG_TYPE"}}function D(Z,le){if(typeof Z!="string")throw new w(le,"string",Z)}function L(Z){return Z===_||Z===y}function k(Z){return Z===_}function j(Z){return Z>=ie&&Z<=J||Z>=Q&&Z<=z}function N(Z,le,se,X){let K="",he=0,ve=-1,Ee=0,O=0;for(let ot=0;ot<=Z.length;++ot){if(ot<Z.length)O=Z.charCodeAt(ot);else{if(X(O))break;O=_}if(X(O)){if(!(ve===ot-1||Ee===1))if(Ee===2){if(K.length<2||he!==2||K.charCodeAt(K.length-1)!==S||K.charCodeAt(K.length-2)!==S){if(K.length>2){const lt=K.lastIndexOf(se);lt===-1?(K="",he=0):(K=K.slice(0,lt),he=K.length-1-K.lastIndexOf(se)),ve=ot,Ee=0;continue}else if(K.length!==0){K="",he=0,ve=ot,Ee=0;continue}}le&&(K+=K.length>0?`${se}..`:"..",he=2)}else K.length>0?K+=`${se}${Z.slice(ve+1,ot)}`:K=Z.slice(ve+1,ot),he=ot-ve-1;ve=ot,Ee=0}else O===S&&Ee!==-1?++Ee:Ee=-1}return K}function B(Z,le){if(le===null||typeof le!="object")throw new w("pathObject","Object",le);const se=le.dir||le.root,X=le.base||`${le.name||""}${le.ext||""}`;return se?se===le.root?`${se}${X}`:`${se}${Z}${X}`:X}const T={resolve(...Z){let le="",se="",X=!1;for(let K=Z.length-1;K>=-1;K--){let he;if(K>=0){if(he=Z[K],D(he,"path"),he.length===0)continue}else le.length===0?he=te():(he=$[`=${le}`]||te(),(he===void 0||he.slice(0,2).toLowerCase()!==le.toLowerCase()&&he.charCodeAt(2)===y)&&(he=`${le}\\`));const ve=he.length;let Ee=0,O="",ot=!1;const lt=he.charCodeAt(0);if(ve===1)L(lt)&&(Ee=1,ot=!0);else if(L(lt))if(ot=!0,L(he.charCodeAt(1))){let We=2,Ke=We;for(;We<ve&&!L(he.charCodeAt(We));)We++;if(We<ve&&We!==Ke){const De=he.slice(Ke,We);for(Ke=We;We<ve&&L(he.charCodeAt(We));)We++;if(We<ve&&We!==Ke){for(Ke=We;We<ve&&!L(he.charCodeAt(We));)We++;(We===ve||We!==Ke)&&(O=`\\\\${De}\\${he.slice(Ke,We)}`,Ee=We)}}}else Ee=1;else j(lt)&&he.charCodeAt(1)===C&&(O=he.slice(0,2),Ee=2,ve>2&&L(he.charCodeAt(2))&&(ot=!0,Ee=3));if(O.length>0)if(le.length>0){if(O.toLowerCase()!==le.toLowerCase())continue}else le=O;if(X){if(le.length>0)break}else if(se=`${he.slice(Ee)}\\${se}`,X=ot,ot&&le.length>0)break}return se=N(se,!X,"\\",L),X?`${le}\\${se}`:`${le}${se}`||"."},normalize(Z){D(Z,"path");const le=Z.length;if(le===0)return".";let se=0,X,K=!1;const he=Z.charCodeAt(0);if(le===1)return k(he)?"\\":Z;if(L(he))if(K=!0,L(Z.charCodeAt(1))){let Ee=2,O=Ee;for(;Ee<le&&!L(Z.charCodeAt(Ee));)Ee++;if(Ee<le&&Ee!==O){const ot=Z.slice(O,Ee);for(O=Ee;Ee<le&&L(Z.charCodeAt(Ee));)Ee++;if(Ee<le&&Ee!==O){for(O=Ee;Ee<le&&!L(Z.charCodeAt(Ee));)Ee++;if(Ee===le)return`\\\\${ot}\\${Z.slice(O)}\\`;Ee!==O&&(X=`\\\\${ot}\\${Z.slice(O,Ee)}`,se=Ee)}}}else se=1;else j(he)&&Z.charCodeAt(1)===C&&(X=Z.slice(0,2),se=2,le>2&&L(Z.charCodeAt(2))&&(K=!0,se=3));let ve=se<le?N(Z.slice(se),!K,"\\",L):"";return ve.length===0&&!K&&(ve="."),ve.length>0&&L(Z.charCodeAt(le-1))&&(ve+="\\"),X===void 0?K?`\\${ve}`:ve:K?`${X}\\${ve}`:`${X}${ve}`},isAbsolute(Z){D(Z,"path");const le=Z.length;if(le===0)return!1;const se=Z.charCodeAt(0);return L(se)||le>2&&j(se)&&Z.charCodeAt(1)===C&&L(Z.charCodeAt(2))},join(...Z){if(Z.length===0)return".";let le,se;for(let he=0;he<Z.length;++he){const ve=Z[he];D(ve,"path"),ve.length>0&&(le===void 0?le=se=ve:le+=`\\${ve}`)}if(le===void 0)return".";let X=!0,K=0;if(typeof se=="string"&&L(se.charCodeAt(0))){++K;const he=se.length;he>1&&L(se.charCodeAt(1))&&(++K,he>2&&(L(se.charCodeAt(2))?++K:X=!1))}if(X){for(;K<le.length&&L(le.charCodeAt(K));)K++;K>=2&&(le=`\\${le.slice(K)}`)}return T.normalize(le)},relative(Z,le){if(D(Z,"from"),D(le,"to"),Z===le)return"";const se=T.resolve(Z),X=T.resolve(le);if(se===X||(Z=se.toLowerCase(),le=X.toLowerCase(),Z===le))return"";let K=0;for(;K<Z.length&&Z.charCodeAt(K)===y;)K++;let he=Z.length;for(;he-1>K&&Z.charCodeAt(he-1)===y;)he--;const ve=he-K;let Ee=0;for(;Ee<le.length&&le.charCodeAt(Ee)===y;)Ee++;let O=le.length;for(;O-1>Ee&&le.charCodeAt(O-1)===y;)O--;const ot=O-Ee,lt=ve<ot?ve:ot;let We=-1,Ke=0;for(;Ke<lt;Ke++){const Pe=Z.charCodeAt(K+Ke);if(Pe!==le.charCodeAt(Ee+Ke))break;Pe===y&&(We=Ke)}if(Ke!==lt){if(We===-1)return X}else{if(ot>lt){if(le.charCodeAt(Ee+Ke)===y)return X.slice(Ee+Ke+1);if(Ke===2)return X.slice(Ee+Ke)}ve>lt&&(Z.charCodeAt(K+Ke)===y?We=Ke:Ke===2&&(We=3)),We===-1&&(We=0)}let De="";for(Ke=K+We+1;Ke<=he;++Ke)(Ke===he||Z.charCodeAt(Ke)===y)&&(De+=De.length===0?"..":"\\..");return Ee+=We,De.length>0?`${De}${X.slice(Ee,O)}`:(X.charCodeAt(Ee)===y&&++Ee,X.slice(Ee,O))},toNamespacedPath(Z){if(typeof Z!="string")return Z;if(Z.length===0)return"";const le=T.resolve(Z);if(le.length<=2)return Z;if(le.charCodeAt(0)===y){if(le.charCodeAt(1)===y){const se=le.charCodeAt(2);if(se!==d&&se!==S)return`\\\\?\\UNC\\${le.slice(2)}`}}else if(j(le.charCodeAt(0))&&le.charCodeAt(1)===C&&le.charCodeAt(2)===y)return`\\\\?\\${le}`;return Z},dirname(Z){D(Z,"path");const le=Z.length;if(le===0)return".";let se=-1,X=0;const K=Z.charCodeAt(0);if(le===1)return L(K)?Z:".";if(L(K)){if(se=X=1,L(Z.charCodeAt(1))){let Ee=2,O=Ee;for(;Ee<le&&!L(Z.charCodeAt(Ee));)Ee++;if(Ee<le&&Ee!==O){for(O=Ee;Ee<le&&L(Z.charCodeAt(Ee));)Ee++;if(Ee<le&&Ee!==O){for(O=Ee;Ee<le&&!L(Z.charCodeAt(Ee));)Ee++;if(Ee===le)return Z;Ee!==O&&(se=X=Ee+1)}}}}else j(K)&&Z.charCodeAt(1)===C&&(se=le>2&&L(Z.charCodeAt(2))?3:2,X=se);let he=-1,ve=!0;for(let Ee=le-1;Ee>=X;--Ee)if(L(Z.charCodeAt(Ee))){if(!ve){he=Ee;break}}else ve=!1;if(he===-1){if(se===-1)return".";he=se}return Z.slice(0,he)},basename(Z,le){le!==void 0&&D(le,"ext"),D(Z,"path");let se=0,X=-1,K=!0,he;if(Z.length>=2&&j(Z.charCodeAt(0))&&Z.charCodeAt(1)===C&&(se=2),le!==void 0&&le.length>0&&le.length<=Z.length){if(le===Z)return"";let ve=le.length-1,Ee=-1;for(he=Z.length-1;he>=se;--he){const O=Z.charCodeAt(he);if(L(O)){if(!K){se=he+1;break}}else Ee===-1&&(K=!1,Ee=he+1),ve>=0&&(O===le.charCodeAt(ve)?--ve===-1&&(X=he):(ve=-1,X=Ee))}return se===X?X=Ee:X===-1&&(X=Z.length),Z.slice(se,X)}for(he=Z.length-1;he>=se;--he)if(L(Z.charCodeAt(he))){if(!K){se=he+1;break}}else X===-1&&(K=!1,X=he+1);return X===-1?"":Z.slice(se,X)},extname(Z){D(Z,"path");let le=0,se=-1,X=0,K=-1,he=!0,ve=0;Z.length>=2&&Z.charCodeAt(1)===C&&j(Z.charCodeAt(0))&&(le=X=2);for(let Ee=Z.length-1;Ee>=le;--Ee){const O=Z.charCodeAt(Ee);if(L(O)){if(!he){X=Ee+1;break}continue}K===-1&&(he=!1,K=Ee+1),O===S?se===-1?se=Ee:ve!==1&&(ve=1):se!==-1&&(ve=-1)}return se===-1||K===-1||ve===0||ve===1&&se===K-1&&se===X+1?"":Z.slice(se,K)},format:B.bind(null,"\\"),parse(Z){D(Z,"path");const le={root:"",dir:"",base:"",ext:"",name:""};if(Z.length===0)return le;const se=Z.length;let X=0,K=Z.charCodeAt(0);if(se===1)return L(K)?(le.root=le.dir=Z,le):(le.base=le.name=Z,le);if(L(K)){if(X=1,L(Z.charCodeAt(1))){let We=2,Ke=We;for(;We<se&&!L(Z.charCodeAt(We));)We++;if(We<se&&We!==Ke){for(Ke=We;We<se&&L(Z.charCodeAt(We));)We++;if(We<se&&We!==Ke){for(Ke=We;We<se&&!L(Z.charCodeAt(We));)We++;We===se?X=We:We!==Ke&&(X=We+1)}}}}else if(j(K)&&Z.charCodeAt(1)===C){if(se<=2)return le.root=le.dir=Z,le;if(X=2,L(Z.charCodeAt(2))){if(se===3)return le.root=le.dir=Z,le;X=3}}X>0&&(le.root=Z.slice(0,X));let he=-1,ve=X,Ee=-1,O=!0,ot=Z.length-1,lt=0;for(;ot>=X;--ot){if(K=Z.charCodeAt(ot),L(K)){if(!O){ve=ot+1;break}continue}Ee===-1&&(O=!1,Ee=ot+1),K===S?he===-1?he=ot:lt!==1&&(lt=1):he!==-1&&(lt=-1)}return Ee!==-1&&(he===-1||lt===0||lt===1&&he===Ee-1&&he===ve+1?le.base=le.name=Z.slice(ve,Ee):(le.name=Z.slice(ve,he),le.base=Z.slice(ve,Ee),le.ext=Z.slice(he,Ee))),ve>0&&ve!==X?le.dir=Z.slice(0,ve-1):le.dir=le.root,le},sep:"\\",delimiter:";",win32:null,posix:null},H={resolve(...Z){let le="",se=!1;for(let X=Z.length-1;X>=-1&&!se;X--){const K=X>=0?Z[X]:te();D(K,"path"),K.length!==0&&(le=`${K}/${le}`,se=K.charCodeAt(0)===_)}return le=N(le,!se,"/",k),se?`/${le}`:le.length>0?le:"."},normalize(Z){if(D(Z,"path"),Z.length===0)return".";const le=Z.charCodeAt(0)===_,se=Z.charCodeAt(Z.length-1)===_;return Z=N(Z,!le,"/",k),Z.length===0?le?"/":se?"./":".":(se&&(Z+="/"),le?`/${Z}`:Z)},isAbsolute(Z){return D(Z,"path"),Z.length>0&&Z.charCodeAt(0)===_},join(...Z){if(Z.length===0)return".";let le;for(let se=0;se<Z.length;++se){const X=Z[se];D(X,"path"),X.length>0&&(le===void 0?le=X:le+=`/${X}`)}return le===void 0?".":H.normalize(le)},relative(Z,le){if(D(Z,"from"),D(le,"to"),Z===le||(Z=H.resolve(Z),le=H.resolve(le),Z===le))return"";const se=1,X=Z.length,K=X-se,he=1,ve=le.length-he,Ee=K<ve?K:ve;let O=-1,ot=0;for(;ot<Ee;ot++){const We=Z.charCodeAt(se+ot);if(We!==le.charCodeAt(he+ot))break;We===_&&(O=ot)}if(ot===Ee)if(ve>Ee){if(le.charCodeAt(he+ot)===_)return le.slice(he+ot+1);if(ot===0)return le.slice(he+ot)}else K>Ee&&(Z.charCodeAt(se+ot)===_?O=ot:ot===0&&(O=0));let lt="";for(ot=se+O+1;ot<=X;++ot)(ot===X||Z.charCodeAt(ot)===_)&&(lt+=lt.length===0?"..":"/..");return`${lt}${le.slice(he+O)}`},toNamespacedPath(Z){return Z},dirname(Z){if(D(Z,"path"),Z.length===0)return".";const le=Z.charCodeAt(0)===_;let se=-1,X=!0;for(let K=Z.length-1;K>=1;--K)if(Z.charCodeAt(K)===_){if(!X){se=K;break}}else X=!1;return se===-1?le?"/":".":le&&se===1?"//":Z.slice(0,se)},basename(Z,le){le!==void 0&&D(le,"ext"),D(Z,"path");let se=0,X=-1,K=!0,he;if(le!==void 0&&le.length>0&&le.length<=Z.length){if(le===Z)return"";let ve=le.length-1,Ee=-1;for(he=Z.length-1;he>=0;--he){const O=Z.charCodeAt(he);if(O===_){if(!K){se=he+1;break}}else Ee===-1&&(K=!1,Ee=he+1),ve>=0&&(O===le.charCodeAt(ve)?--ve===-1&&(X=he):(ve=-1,X=Ee))}return se===X?X=Ee:X===-1&&(X=Z.length),Z.slice(se,X)}for(he=Z.length-1;he>=0;--he)if(Z.charCodeAt(he)===_){if(!K){se=he+1;break}}else X===-1&&(K=!1,X=he+1);return X===-1?"":Z.slice(se,X)},extname(Z){D(Z,"path");let le=-1,se=0,X=-1,K=!0,he=0;for(let ve=Z.length-1;ve>=0;--ve){const Ee=Z.charCodeAt(ve);if(Ee===_){if(!K){se=ve+1;break}continue}X===-1&&(K=!1,X=ve+1),Ee===S?le===-1?le=ve:he!==1&&(he=1):le!==-1&&(he=-1)}return le===-1||X===-1||he===0||he===1&&le===X-1&&le===se+1?"":Z.slice(le,X)},format:B.bind(null,"/"),parse(Z){D(Z,"path");const le={root:"",dir:"",base:"",ext:"",name:""};if(Z.length===0)return le;const se=Z.charCodeAt(0)===_;let X;se?(le.root="/",X=1):X=0;let K=-1,he=0,ve=-1,Ee=!0,O=Z.length-1,ot=0;for(;O>=X;--O){const lt=Z.charCodeAt(O);if(lt===_){if(!Ee){he=O+1;break}continue}ve===-1&&(Ee=!1,ve=O+1),lt===S?K===-1?K=O:ot!==1&&(ot=1):K!==-1&&(ot=-1)}if(ve!==-1){const lt=he===0&&se?1:he;K===-1||ot===0||ot===1&&K===ve-1&&K===he+1?le.base=le.name=Z.slice(lt,ve):(le.name=Z.slice(lt,K),le.base=Z.slice(lt,ve),le.ext=Z.slice(K,ve))}return he>0?le.dir=Z.slice(0,he-1):se&&(le.dir="/"),le},sep:"/",delimiter:":",win32:null,posix:null};H.win32=T.win32=T,H.posix=T.posix=H;const Y=x==="win32"?T.normalize:H.normalize,ee=x==="win32"?T.resolve:H.resolve,ce=x==="win32"?T.relative:H.relative,pe=x==="win32"?T.dirname:H.dirname,ge=x==="win32"?T.basename:H.basename,fe=x==="win32"?T.extname:H.extname,oe=x==="win32"?T.sep:H.sep},63339:(Tt,Fe,f)=>{f.d(Fe,{BH:()=>oe,H8:()=>ve,HZ:()=>ce,OS:()=>se,UP:()=>ot,_p:()=>le,cm:()=>he,gm:()=>Ee,ib:()=>ee,j9:()=>Y,nr:()=>O,p7:()=>pe,uF:()=>T,un:()=>ge,zQ:()=>L,zx:()=>H});var I=f(3765),h;const te="en";let $=!1,x=!1,ie=!1,Q=!1,J=!1,z=!1,S=!1,_=!1,y=!1,C,d=te,w=null,D;const L=typeof self=="object"?self:typeof f.g=="object"?f.g:{};let k;typeof L.vscode<"u"&&typeof L.vscode.process<"u"?k=L.vscode.process:typeof process<"u"&&(k=process);const j=typeof((h=k?.versions)===null||h===void 0?void 0:h.electron)=="string",N=j&&k?.type==="renderer";if(typeof navigator=="object"&&!N)D=navigator.userAgent,$=D.indexOf("Windows")>=0,x=D.indexOf("Macintosh")>=0,_=(D.indexOf("Macintosh")>=0||D.indexOf("iPad")>=0||D.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,ie=D.indexOf("Linux")>=0,z=!0,C=I.AM(I.kg({key:"ensureLoaderPluginIsLoaded",comment:["{Locked}"]},"_"))||te,d=C;else if(typeof k=="object"){$=k.platform==="win32",x=k.platform==="darwin",ie=k.platform==="linux",Q=ie&&!!k.env.SNAP&&!!k.env.SNAP_REVISION,S=j,y=!!k.env.CI||!!k.env.BUILD_ARTIFACTSTAGINGDIRECTORY,C=te,d=te;const We=k.env.VSCODE_NLS_CONFIG;if(We)try{const Ke=JSON.parse(We),De=Ke.availableLanguages["*"];C=Ke.locale,d=De||te,w=Ke._translationsConfigFile}catch{}J=!0}else console.error("Unable to resolve platform.");let B=0;x?B=1:$?B=3:ie&&(B=2);const T=$,H=x,Y=ie,ee=J,ce=z,pe=z&&typeof L.importScripts=="function",ge=_,fe=D,oe=d,Z=typeof L.postMessage=="function"&&!L.importScripts,le=(()=>{if(Z){const We=[];L.addEventListener("message",De=>{if(De.data&&De.data.vscodeScheduleAsyncWork)for(let Pe=0,Ue=We.length;Pe<Ue;Pe++){const Re=We[Pe];if(Re.id===De.data.vscodeScheduleAsyncWork){We.splice(Pe,1),Re.callback();return}}});let Ke=0;return De=>{const Pe=++Ke;We.push({id:Pe,callback:De}),L.postMessage({vscodeScheduleAsyncWork:Pe},"*")}}return We=>setTimeout(We)})(),se=x||_?2:$?1:3;let X=!0,K=!1;function he(){if(!K){K=!0;const We=new Uint8Array(2);We[0]=1,We[1]=2,X=new Uint16Array(We.buffer)[0]===512+1}return X}const ve=!!(fe&&fe.indexOf("Chrome")>=0),Ee=!!(fe&&fe.indexOf("Firefox")>=0),O=!!(!ve&&fe&&fe.indexOf("Safari")>=0),ot=!!(fe&&fe.indexOf("Edg/")>=0),lt=!!(fe&&fe.indexOf("Android")>=0)},4580:(Tt,Fe,f)=>{f.d(Fe,{Q:()=>I});var I;(function(h){function te(Q,J){if(Q.start>=J.end||J.start>=Q.end)return{start:0,end:0};const z=Math.max(Q.start,J.start),S=Math.min(Q.end,J.end);return S-z<=0?{start:0,end:0}:{start:z,end:S}}h.intersect=te;function $(Q){return Q.end-Q.start<=0}h.isEmpty=$;function x(Q,J){return!$(te(Q,J))}h.intersects=x;function ie(Q,J){const z=[],S={start:Q.start,end:Math.min(J.start,Q.end)},_={start:Math.max(J.end,Q.start),end:Q.end};return $(S)||z.push(S),$(_)||z.push(_),z}h.relativeComplement=ie})(I||(I={}))},22467:(Tt,Fe,f)=>{f.d(Fe,{B6:()=>ge,Fd:()=>N,LC:()=>L,P8:()=>D,Pi:()=>w,er:()=>z,iZ:()=>B,n4:()=>y,o1:()=>T,pD:()=>k,su:()=>Q,uJ:()=>j});var I=f(78518),h=f(13072),te=f(64033),$=f(63339),x=f(16844),ie=f(37264);function Q(fe){return(0,ie.I)(fe,!0)}class J{constructor(oe){this._ignorePathCasing=oe}compare(oe,Z,le=!1){return oe===Z?0:(0,x.UD)(this.getComparisonKey(oe,le),this.getComparisonKey(Z,le))}isEqual(oe,Z,le=!1){return oe===Z?!0:!oe||!Z?!1:this.getComparisonKey(oe,le)===this.getComparisonKey(Z,le)}getComparisonKey(oe,Z=!1){return oe.with({path:this._ignorePathCasing(oe)?oe.path.toLowerCase():void 0,fragment:Z?null:void 0}).toString()}isEqualOrParent(oe,Z,le=!1){if(oe.scheme===Z.scheme){if(oe.scheme===h.ny.file)return I._1(Q(oe),Q(Z),this._ignorePathCasing(oe))&&oe.query===Z.query&&(le||oe.fragment===Z.fragment);if(Y(oe.authority,Z.authority))return I._1(oe.path,Z.path,this._ignorePathCasing(oe),"/")&&oe.query===Z.query&&(le||oe.fragment===Z.fragment)}return!1}joinPath(oe,...Z){return ie.r.joinPath(oe,...Z)}basenameOrAuthority(oe){return D(oe)||oe.authority}basename(oe){return te.SA.basename(oe.path)}extname(oe){return te.SA.extname(oe.path)}dirname(oe){if(oe.path.length===0)return oe;let Z;return oe.scheme===h.ny.file?Z=ie.r.file(te.pD(Q(oe))).path:(Z=te.SA.dirname(oe.path),oe.authority&&Z.length&&Z.charCodeAt(0)!==47&&(console.error(`dirname("${oe.toString})) resulted in a relative path`),Z="/")),oe.with({path:Z})}normalizePath(oe){if(!oe.path.length)return oe;let Z;return oe.scheme===h.ny.file?Z=ie.r.file(te.S8(Q(oe))).path:Z=te.SA.normalize(oe.path),oe.with({path:Z})}relativePath(oe,Z){if(oe.scheme!==Z.scheme||!Y(oe.authority,Z.authority))return;if(oe.scheme===h.ny.file){const X=te.V8(Q(oe),Q(Z));return $.uF?I.TH(X):X}let le=oe.path||"/";const se=Z.path||"/";if(this._ignorePathCasing(oe)){let X=0;for(const K=Math.min(le.length,se.length);X<K&&!(le.charCodeAt(X)!==se.charCodeAt(X)&&le.charAt(X).toLowerCase()!==se.charAt(X).toLowerCase());X++);le=se.substr(0,X)+le.substr(X)}return te.SA.relative(le,se)}resolvePath(oe,Z){if(oe.scheme===h.ny.file){const le=ie.r.file(te.hd(Q(oe),Z));return oe.with({authority:le.authority,path:le.path})}return Z=I.kb(Z),oe.with({path:te.SA.resolve(oe.path,Z)})}isAbsolutePath(oe){return!!oe.path&&oe.path[0]==="/"}isEqualAuthority(oe,Z){return oe===Z||oe!==void 0&&Z!==void 0&&(0,x.Q_)(oe,Z)}hasTrailingPathSeparator(oe,Z=te.Vn){if(oe.scheme===h.ny.file){const le=Q(oe);return le.length>I.Zn(le).length&&le[le.length-1]===Z}else{const le=oe.path;return le.length>1&&le.charCodeAt(le.length-1)===47&&!/^[a-zA-Z]:(\/$|\\$)/.test(oe.fsPath)}}removeTrailingPathSeparator(oe,Z=te.Vn){return ee(oe,Z)?oe.with({path:oe.path.substr(0,oe.path.length-1)}):oe}addTrailingPathSeparator(oe,Z=te.Vn){let le=!1;if(oe.scheme===h.ny.file){const se=Q(oe);le=se!==void 0&&se.length===I.Zn(se).length&&se[se.length-1]===Z}else{Z="/";const se=oe.path;le=se.length===1&&se.charCodeAt(se.length-1)===47}return!le&&!ee(oe,Z)?oe.with({path:oe.path+"/"}):oe}}const z=new J(()=>!1),S=new J(fe=>fe.scheme===h.ny.file?!$.j9:!0),_=new J(fe=>!0),y=z.isEqual.bind(z),C=z.isEqualOrParent.bind(z),d=z.getComparisonKey.bind(z),w=z.basenameOrAuthority.bind(z),D=z.basename.bind(z),L=z.extname.bind(z),k=z.dirname.bind(z),j=z.joinPath.bind(z),N=z.normalizePath.bind(z),B=z.relativePath.bind(z),T=z.resolvePath.bind(z),H=z.isAbsolutePath.bind(z),Y=z.isEqualAuthority.bind(z),ee=z.hasTrailingPathSeparator.bind(z),ce=z.removeTrailingPathSeparator.bind(z),pe=z.addTrailingPathSeparator.bind(z);var ge;(function(fe){fe.META_DATA_LABEL="label",fe.META_DATA_DESCRIPTION="description",fe.META_DATA_SIZE="size",fe.META_DATA_MIME="mime";function oe(Z){const le=new Map;Z.path.substring(Z.path.indexOf(";")+1,Z.path.lastIndexOf(";")).split(";").forEach(K=>{const[he,ve]=K.split(":");he&&ve&&le.set(he,ve)});const X=Z.path.substring(0,Z.path.indexOf(";"));return X&&le.set(fe.META_DATA_MIME,X),le}fe.parseMetaData=oe})(ge||(ge={}))},94513:(Tt,Fe,f)=>{f.d(Fe,{yE:()=>$});var I=f(2106),h=f(10998);class te{constructor(y,C,d,w,D,L,k){this._forceIntegerValues=y,this._scrollStateBrand=void 0,this._forceIntegerValues&&(C=C|0,d=d|0,w=w|0,D=D|0,L=L|0,k=k|0),this.rawScrollLeft=w,this.rawScrollTop=k,C<0&&(C=0),w+C>d&&(w=d-C),w<0&&(w=0),D<0&&(D=0),k+D>L&&(k=L-D),k<0&&(k=0),this.width=C,this.scrollWidth=d,this.scrollLeft=w,this.height=D,this.scrollHeight=L,this.scrollTop=k}equals(y){return this.rawScrollLeft===y.rawScrollLeft&&this.rawScrollTop===y.rawScrollTop&&this.width===y.width&&this.scrollWidth===y.scrollWidth&&this.scrollLeft===y.scrollLeft&&this.height===y.height&&this.scrollHeight===y.scrollHeight&&this.scrollTop===y.scrollTop}withScrollDimensions(y,C){return new te(this._forceIntegerValues,typeof y.width<"u"?y.width:this.width,typeof y.scrollWidth<"u"?y.scrollWidth:this.scrollWidth,C?this.rawScrollLeft:this.scrollLeft,typeof y.height<"u"?y.height:this.height,typeof y.scrollHeight<"u"?y.scrollHeight:this.scrollHeight,C?this.rawScrollTop:this.scrollTop)}withScrollPosition(y){return new te(this._forceIntegerValues,this.width,this.scrollWidth,typeof y.scrollLeft<"u"?y.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,typeof y.scrollTop<"u"?y.scrollTop:this.rawScrollTop)}createScrollEvent(y,C){const d=this.width!==y.width,w=this.scrollWidth!==y.scrollWidth,D=this.scrollLeft!==y.scrollLeft,L=this.height!==y.height,k=this.scrollHeight!==y.scrollHeight,j=this.scrollTop!==y.scrollTop;return{inSmoothScrolling:C,oldWidth:y.width,oldScrollWidth:y.scrollWidth,oldScrollLeft:y.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:y.height,oldScrollHeight:y.scrollHeight,oldScrollTop:y.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:d,scrollWidthChanged:w,scrollLeftChanged:D,heightChanged:L,scrollHeightChanged:k,scrollTopChanged:j}}}class $ extends h.jG{constructor(y){super(),this._scrollableBrand=void 0,this._onScroll=this._register(new I.vl),this.onScroll=this._onScroll.event,this._smoothScrollDuration=y.smoothScrollDuration,this._scheduleAtNextAnimationFrame=y.scheduleAtNextAnimationFrame,this._state=new te(y.forceIntegerValues,0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(y){this._smoothScrollDuration=y}validateScrollPosition(y){return this._state.withScrollPosition(y)}getScrollDimensions(){return this._state}setScrollDimensions(y,C){var d;const w=this._state.withScrollDimensions(y,C);this._setState(w,!!this._smoothScrolling),(d=this._smoothScrolling)===null||d===void 0||d.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(y){const C=this._state.withScrollPosition(y);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(C,!1)}setScrollPositionSmooth(y,C){if(this._smoothScrollDuration===0)return this.setScrollPositionNow(y);if(this._smoothScrolling){y={scrollLeft:typeof y.scrollLeft>"u"?this._smoothScrolling.to.scrollLeft:y.scrollLeft,scrollTop:typeof y.scrollTop>"u"?this._smoothScrolling.to.scrollTop:y.scrollTop};const d=this._state.withScrollPosition(y);if(this._smoothScrolling.to.scrollLeft===d.scrollLeft&&this._smoothScrolling.to.scrollTop===d.scrollTop)return;let w;C?w=new J(this._smoothScrolling.from,d,this._smoothScrolling.startTime,this._smoothScrolling.duration):w=this._smoothScrolling.combine(this._state,d,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=w}else{const d=this._state.withScrollPosition(y);this._smoothScrolling=J.start(this._state,d,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}_performSmoothScrolling(){if(!this._smoothScrolling)return;const y=this._smoothScrolling.tick(),C=this._state.withScrollPosition(y);if(this._setState(C,!0),!!this._smoothScrolling){if(y.isDone){this._smoothScrolling.dispose(),this._smoothScrolling=null;return}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}}_setState(y,C){const d=this._state;d.equals(y)||(this._state=y,this._onScroll.fire(this._state.createScrollEvent(d,C)))}}class x{constructor(y,C,d){this.scrollLeft=y,this.scrollTop=C,this.isDone=d}}function ie(_,y){const C=y-_;return function(d){return _+C*S(d)}}function Q(_,y,C){return function(d){return d<C?_(d/C):y((d-C)/(1-C))}}class J{constructor(y,C,d,w){this.from=y,this.to=C,this.duration=w,this.startTime=d,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(y,C,d){if(Math.abs(y-C)>2.5*d){let D,L;return y<C?(D=y+.75*d,L=C-.75*d):(D=y-.75*d,L=C+.75*d),Q(ie(y,D),ie(L,C),.33)}return ie(y,C)}dispose(){this.animationFrameDisposable!==null&&(this.animationFrameDisposable.dispose(),this.animationFrameDisposable=null)}acceptScrollDimensions(y){this.to=y.withScrollPosition(this.to),this._initAnimations()}tick(){return this._tick(Date.now())}_tick(y){const C=(y-this.startTime)/this.duration;if(C<1){const d=this.scrollLeft(C),w=this.scrollTop(C);return new x(d,w,!1)}return new x(this.to.scrollLeft,this.to.scrollTop,!0)}combine(y,C,d){return J.start(y,C,d)}static start(y,C,d){d=d+10;const w=Date.now()-10;return new J(y,C,w,d)}}function z(_){return Math.pow(_,3)}function S(_){return 1-z(1-_)}},66459:(Tt,Fe,f)=>{f.d(Fe,{A:()=>te});var I=f(16844),h;(function($){$[$.Ignore=0]="Ignore",$[$.Info=1]="Info",$[$.Warning=2]="Warning",$[$.Error=3]="Error"})(h||(h={})),function($){const x="error",ie="warning",Q="warn",J="info",z="ignore";function S(y){return y?I.Q_(x,y)?$.Error:I.Q_(ie,y)||I.Q_(Q,y)?$.Warning:I.Q_(J,y)?$.Info:$.Ignore:$.Ignore}$.fromValue=S;function _(y){switch(y){case $.Error:return x;case $.Warning:return ie;case $.Info:return J;default:return z}}$.toString=_}(h||(h={}));const te=h},23013:(Tt,Fe,f)=>{f.d(Fe,{W:()=>te});var I=f(63339);const h=I.zQ.performance&&typeof I.zQ.performance.now=="function";class te{constructor(x){this._highResolution=h&&x,this._startTime=this._now(),this._stopTime=-1}static create(x=!0){return new te(x)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?I.zQ.performance.now():Date.now()}}},16844:(Tt,Fe,f)=>{f.d(Fe,{$X:()=>Re,AV:()=>$,BO:()=>_,Bm:()=>y,Bq:()=>z,DB:()=>ee,E_:()=>Ke,GP:()=>ie,HG:()=>k,LJ:()=>se,LU:()=>Dt,Lv:()=>ce,MV:()=>ot,NB:()=>S,OS:()=>d,Q_:()=>ge,Qp:()=>oe,RH:()=>D,S8:()=>zt,Ss:()=>rt,UD:()=>B,UU:()=>j,Vi:()=>Z,W1:()=>H,Wd:()=>jt,Wv:()=>pe,Z5:()=>K,_J:()=>Ue,aC:()=>Pe,bm:()=>J,eY:()=>w,ih:()=>Q,iy:()=>O,km:()=>Ee,lF:()=>T,lT:()=>N,m:()=>lt,ne:()=>et,ns:()=>fe,pc:()=>le,r_:()=>Lt,tk:()=>Ie,tl:()=>ii,uz:()=>L,wB:()=>C,y_:()=>vi,zY:()=>xt,z_:()=>X,zd:()=>Y});var I=f(36260),h=f(63946),te;function $(Ze){return!Ze||typeof Ze!="string"?!0:Ze.trim().length===0}const x=/{(\d+)}/g;function ie(Ze,..._t){return _t.length===0?Ze:Ze.replace(x,function(At,ei){const oi=parseInt(ei,10);return isNaN(oi)||oi<0||oi>=_t.length?At:_t[oi]})}function Q(Ze){return Ze.replace(/[<>&]/g,function(_t){switch(_t){case"<":return"<";case">":return">";case"&":return"&";default:return _t}})}function J(Ze){return Ze.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function z(Ze,_t=" "){const At=S(Ze,_t);return _(At,_t)}function S(Ze,_t){if(!Ze||!_t)return Ze;const At=_t.length;if(At===0||Ze.length===0)return Ze;let ei=0;for(;Ze.indexOf(_t,ei)===ei;)ei=ei+At;return Ze.substring(ei)}function _(Ze,_t){if(!Ze||!_t)return Ze;const At=_t.length,ei=Ze.length;if(At===0||ei===0)return Ze;let oi=ei,Li=-1;for(;Li=Ze.lastIndexOf(_t,oi-1),!(Li===-1||Li+At!==oi);){if(Li===0)return"";oi=Li}return Ze.substring(0,oi)}function y(Ze){return Ze.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function C(Ze){return Ze.replace(/\*/g,"")}function d(Ze,_t,At={}){if(!Ze)throw new Error("Cannot create regex from empty string");_t||(Ze=J(Ze)),At.wholeWord&&(/\B/.test(Ze.charAt(0))||(Ze="\\b"+Ze),/\B/.test(Ze.charAt(Ze.length-1))||(Ze=Ze+"\\b"));let ei="";return At.global&&(ei+="g"),At.matchCase||(ei+="i"),At.multiline&&(ei+="m"),At.unicode&&(ei+="u"),new RegExp(Ze,ei)}function w(Ze){return Ze.source==="^"||Ze.source==="^$"||Ze.source==="$"||Ze.source==="^\\s*$"?!1:!!(Ze.exec("")&&Ze.lastIndex===0)}function D(Ze){return(Ze.global?"g":"")+(Ze.ignoreCase?"i":"")+(Ze.multiline?"m":"")+(Ze.unicode?"u":"")}function L(Ze){return Ze.split(/\r\n|\r|\n/)}function k(Ze){for(let _t=0,At=Ze.length;_t<At;_t++){const ei=Ze.charCodeAt(_t);if(ei!==32&&ei!==9)return _t}return-1}function j(Ze,_t=0,At=Ze.length){for(let ei=_t;ei<At;ei++){const oi=Ze.charCodeAt(ei);if(oi!==32&&oi!==9)return Ze.substring(_t,ei)}return Ze.substring(_t,At)}function N(Ze,_t=Ze.length-1){for(let At=_t;At>=0;At--){const ei=Ze.charCodeAt(At);if(ei!==32&&ei!==9)return At}return-1}function B(Ze,_t){return Ze<_t?-1:Ze>_t?1:0}function T(Ze,_t,At=0,ei=Ze.length,oi=0,Li=_t.length){for(;At<ei&&oi<Li;At++,oi++){const Te=Ze.charCodeAt(At),ki=_t.charCodeAt(oi);if(Te<ki)return-1;if(Te>ki)return 1}const zi=ei-At,Di=Li-oi;return zi<Di?-1:zi>Di?1:0}function H(Ze,_t){return Y(Ze,_t,0,Ze.length,0,_t.length)}function Y(Ze,_t,At=0,ei=Ze.length,oi=0,Li=_t.length){for(;At<ei&&oi<Li;At++,oi++){let Te=Ze.charCodeAt(At),ki=_t.charCodeAt(oi);if(Te===ki)continue;if(Te>=128||ki>=128)return T(Ze.toLowerCase(),_t.toLowerCase(),At,ei,oi,Li);ce(Te)&&(Te-=32),ce(ki)&&(ki-=32);const ze=Te-ki;if(ze!==0)return ze}const zi=ei-At,Di=Li-oi;return zi<Di?-1:zi>Di?1:0}function ee(Ze){return Ze>=48&&Ze<=57}function ce(Ze){return Ze>=97&&Ze<=122}function pe(Ze){return Ze>=65&&Ze<=90}function ge(Ze,_t){return Ze.length===_t.length&&Y(Ze,_t)===0}function fe(Ze,_t){const At=_t.length;return _t.length>Ze.length?!1:Y(Ze,_t,0,At)===0}function oe(Ze,_t){const At=Math.min(Ze.length,_t.length);let ei;for(ei=0;ei<At;ei++)if(Ze.charCodeAt(ei)!==_t.charCodeAt(ei))return ei;return At}function Z(Ze,_t){const At=Math.min(Ze.length,_t.length);let ei;const oi=Ze.length-1,Li=_t.length-1;for(ei=0;ei<At;ei++)if(Ze.charCodeAt(oi-ei)!==_t.charCodeAt(Li-ei))return ei;return At}function le(Ze){return 55296<=Ze&&Ze<=56319}function se(Ze){return 56320<=Ze&&Ze<=57343}function X(Ze,_t){return(Ze-55296<<10)+(_t-56320)+65536}function K(Ze,_t,At){const ei=Ze.charCodeAt(At);if(le(ei)&&At+1<_t){const oi=Ze.charCodeAt(At+1);if(se(oi))return X(ei,oi)}return ei}function he(Ze,_t){const At=Ze.charCodeAt(_t-1);if(se(At)&&_t>1){const ei=Ze.charCodeAt(_t-2);if(le(ei))return X(ei,At)}return At}class ve{constructor(_t,At=0){this._str=_t,this._len=_t.length,this._offset=At}get offset(){return this._offset}setOffset(_t){this._offset=_t}prevCodePoint(){const _t=he(this._str,this._offset);return this._offset-=_t>=65536?2:1,_t}nextCodePoint(){const _t=K(this._str,this._len,this._offset);return this._offset+=_t>=65536?2:1,_t}eol(){return this._offset>=this._len}}class Ee{constructor(_t,At=0){this._iterator=new ve(_t,At)}get offset(){return this._iterator.offset}nextGraphemeLength(){const _t=ft.getInstance(),At=this._iterator,ei=At.offset;let oi=_t.getGraphemeBreakType(At.nextCodePoint());for(;!At.eol();){const Li=At.offset,zi=_t.getGraphemeBreakType(At.nextCodePoint());if(dt(oi,zi)){At.setOffset(Li);break}oi=zi}return At.offset-ei}prevGraphemeLength(){const _t=ft.getInstance(),At=this._iterator,ei=At.offset;let oi=_t.getGraphemeBreakType(At.prevCodePoint());for(;At.offset>0;){const Li=At.offset,zi=_t.getGraphemeBreakType(At.prevCodePoint());if(dt(zi,oi)){At.setOffset(Li);break}oi=zi}return ei-At.offset}eol(){return this._iterator.eol()}}function O(Ze,_t){return new Ee(Ze,_t).nextGraphemeLength()}function ot(Ze,_t){return new Ee(Ze,_t).prevGraphemeLength()}function lt(Ze,_t){_t>0&&se(Ze.charCodeAt(_t))&&_t--;const At=_t+O(Ze,_t);return[At-ot(Ze,At),At]}const We=/(?:[\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 Ke(Ze){return We.test(Ze)}const De=/^[\t\n\r\x20-\x7E]*$/;function Pe(Ze){return De.test(Ze)}const Ue=/[\u2028\u2029]/;function Re(Ze){return Ue.test(Ze)}function et(Ze){return Ze>=11904&&Ze<=55215||Ze>=63744&&Ze<=64255||Ze>=65281&&Ze<=65374}function rt(Ze){return Ze>=127462&&Ze<=127487||Ze===8986||Ze===8987||Ze===9200||Ze===9203||Ze>=9728&&Ze<=10175||Ze===11088||Ze===11093||Ze>=127744&&Ze<=128591||Ze>=128640&&Ze<=128764||Ze>=128992&&Ze<=129008||Ze>=129280&&Ze<=129535||Ze>=129648&&Ze<=129782}const Lt=String.fromCharCode(65279);function Dt(Ze){return!!(Ze&&Ze.length>0&&Ze.charCodeAt(0)===65279)}function xt(Ze,_t=!1){return Ze?(_t&&(Ze=Ze.replace(/\\./g,"")),Ze.toLowerCase()!==Ze):!1}function Ie(Ze){return Ze=Ze%(2*26),Ze<26?String.fromCharCode(97+Ze):String.fromCharCode(65+Ze-26)}function dt(Ze,_t){return Ze===0?_t!==5&&_t!==7:Ze===2&&_t===3?!1:Ze===4||Ze===2||Ze===3||_t===4||_t===2||_t===3?!0:!(Ze===8&&(_t===8||_t===9||_t===11||_t===12)||(Ze===11||Ze===9)&&(_t===9||_t===10)||(Ze===12||Ze===10)&&_t===10||_t===5||_t===13||_t===7||Ze===1||Ze===13&&_t===14||Ze===6&&_t===6)}class ft{constructor(){this._data=Bt()}static getInstance(){return ft._INSTANCE||(ft._INSTANCE=new ft),ft._INSTANCE}getGraphemeBreakType(_t){if(_t<32)return _t===10?3:_t===13?2:4;if(_t<127)return 0;const At=this._data,ei=At.length/3;let oi=1;for(;oi<=ei;)if(_t<At[3*oi])oi=2*oi;else if(_t>At[3*oi+1])oi=2*oi+1;else return At[3*oi+2];return 0}}ft._INSTANCE=null;function Bt(){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 jt(Ze,_t){if(Ze===0)return 0;const At=pt(Ze,_t);if(At!==void 0)return At;const ei=new ve(_t,Ze);return ei.prevCodePoint(),ei.offset}function pt(Ze,_t){const At=new ve(_t,Ze);let ei=At.prevCodePoint();for(;bt(ei)||ei===65039||ei===8419;){if(At.offset===0)return;ei=At.prevCodePoint()}if(!rt(ei))return;let oi=At.offset;return oi>0&&At.prevCodePoint()===8205&&(oi=At.offset),oi}function bt(Ze){return 127995<=Ze&&Ze<=127999}const zt="\xA0";class ii{constructor(_t){this.confusableDictionary=_t}static getInstance(_t){return ii.cache.get(Array.from(_t))}static getLocales(){return ii._locales.getValue()}isAmbiguous(_t){return this.confusableDictionary.has(_t)}getPrimaryConfusable(_t){return this.confusableDictionary.get(_t)}getConfusableCodePoints(){return new Set(this.confusableDictionary.keys())}}te=ii,ii.ambiguousCharacterData=new h.d(()=>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],"_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]}')),ii.cache=new I.o(Ze=>{function _t(ki){const ze=new Map;for(let we=0;we<ki.length;we+=2)ze.set(ki[we],ki[we+1]);return ze}function At(ki,ze){const we=new Map(ki);for(const[ct,Oe]of ze)we.set(ct,Oe);return we}function ei(ki,ze){if(!ki)return ze;const we=new Map;for(const[ct,Oe]of ki)ze.has(ct)&&we.set(ct,Oe);return we}const oi=te.ambiguousCharacterData.getValue();let Li=Ze.filter(ki=>!ki.startsWith("_")&&ki in oi);Li.length===0&&(Li=["_default"]);let zi;for(const ki of Li){const ze=_t(oi[ki]);zi=ei(zi,ze)}const Di=_t(oi._common),Te=At(Di,zi);return new ii(Te)}),ii._locales=new h.d(()=>Object.keys(ii.ambiguousCharacterData.getValue()).filter(Ze=>!Ze.startsWith("_")));class vi{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(vi.getRawData())),this._data}static isInvisibleCharacter(_t){return vi.getData().has(_t)}static get codePoints(){return vi.getData()}}vi._data=void 0},79359:(Tt,Fe,f)=>{f.d(Fe,{Et:()=>x,Gv:()=>te,Kg:()=>h,Lm:()=>Q,O9:()=>z,Tn:()=>C,UH:()=>j,V0:()=>L,b0:()=>J,cy:()=>I,eU:()=>y,iu:()=>$,j:()=>_,jx:()=>d,kT:()=>k,xZ:()=>ie,xb:()=>N,z:()=>S});function I(B){return Array.isArray(B)}function h(B){return typeof B=="string"}function te(B){return typeof B=="object"&&B!==null&&!Array.isArray(B)&&!(B instanceof RegExp)&&!(B instanceof Date)}function $(B){const T=Object.getPrototypeOf(Uint8Array);return typeof B=="object"&&B instanceof T}function x(B){return typeof B=="number"&&!isNaN(B)}function ie(B){return!!B&&typeof B[Symbol.iterator]=="function"}function Q(B){return B===!0||B===!1}function J(B){return typeof B>"u"}function z(B){return!S(B)}function S(B){return J(B)||B===null}function _(B,T){if(!B)throw new Error(T?`Unexpected type, expected '${T}'`:"Unexpected type")}function y(B){if(S(B))throw new Error("Assertion Failed: argument is undefined or null");return B}function C(B){return typeof B=="function"}function d(B,T){const H=Math.min(B.length,T.length);for(let Y=0;Y<H;Y++)w(B[Y],T[Y])}function w(B,T){if(h(T)){if(typeof B!==T)throw new Error(`argument does not match constraint: typeof ${T}`)}else if(C(T)){try{if(B instanceof T)return}catch{}if(!S(B)&&B.constructor===T||T.length===1&&T.call(void 0,B)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function D(B){let T=[],H=Object.getPrototypeOf(B);for(;Object.prototype!==H;)T=T.concat(Object.getOwnPropertyNames(H)),H=Object.getPrototypeOf(H);return T}function L(B){const T=[];for(const H of D(B))typeof B[H]=="function"&&T.push(H);return T}function k(B,T){const H=ee=>function(){const ce=Array.prototype.slice.call(arguments,0);return T(ee,ce)},Y={};for(const ee of B)Y[ee]=H(ee);return Y}function j(B){return B===null?void 0:B}function N(B,T="Unreachable"){throw new Error(T)}},37512:(Tt,Fe,f)=>{f.d(Fe,{W:()=>I,j:()=>h});function I(te){return te<0?0:te>255?255:te|0}function h(te){return te<0?0:te>4294967295?4294967295:te|0}},37264:(Tt,Fe,f)=>{f.d(Fe,{I:()=>k,r:()=>y});var I=f(64033),h=f(63339);const te=/^\w[\w\d+.-]*$/,$=/^\//,x=/^\/\//;function ie(H,Y){if(!H.scheme&&Y)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${H.authority}", path: "${H.path}", query: "${H.query}", fragment: "${H.fragment}"}`);if(H.scheme&&!te.test(H.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(H.path){if(H.authority){if(!$.test(H.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(x.test(H.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function Q(H,Y){return!H&&!Y?"file":H}function J(H,Y){switch(H){case"https":case"http":case"file":Y?Y[0]!==S&&(Y=S+Y):Y=S;break}return Y}const z="",S="/",_=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class y{constructor(Y,ee,ce,pe,ge,fe=!1){typeof Y=="object"?(this.scheme=Y.scheme||z,this.authority=Y.authority||z,this.path=Y.path||z,this.query=Y.query||z,this.fragment=Y.fragment||z):(this.scheme=Q(Y,fe),this.authority=ee||z,this.path=J(this.scheme,ce||z),this.query=pe||z,this.fragment=ge||z,ie(this,fe))}static isUri(Y){return Y instanceof y?!0:Y?typeof Y.authority=="string"&&typeof Y.fragment=="string"&&typeof Y.path=="string"&&typeof Y.query=="string"&&typeof Y.scheme=="string"&&typeof Y.fsPath=="string"&&typeof Y.with=="function"&&typeof Y.toString=="function":!1}get fsPath(){return k(this,!1)}with(Y){if(!Y)return this;let{scheme:ee,authority:ce,path:pe,query:ge,fragment:fe}=Y;return ee===void 0?ee=this.scheme:ee===null&&(ee=z),ce===void 0?ce=this.authority:ce===null&&(ce=z),pe===void 0?pe=this.path:pe===null&&(pe=z),ge===void 0?ge=this.query:ge===null&&(ge=z),fe===void 0?fe=this.fragment:fe===null&&(fe=z),ee===this.scheme&&ce===this.authority&&pe===this.path&&ge===this.query&&fe===this.fragment?this:new d(ee,ce,pe,ge,fe)}static parse(Y,ee=!1){const ce=_.exec(Y);return ce?new d(ce[2]||z,T(ce[4]||z),T(ce[5]||z),T(ce[7]||z),T(ce[9]||z),ee):new d(z,z,z,z,z)}static file(Y){let ee=z;if(h.uF&&(Y=Y.replace(/\\/g,S)),Y[0]===S&&Y[1]===S){const ce=Y.indexOf(S,2);ce===-1?(ee=Y.substring(2),Y=S):(ee=Y.substring(2,ce),Y=Y.substring(ce)||S)}return new d("file",ee,Y,z,z)}static from(Y){const ee=new d(Y.scheme,Y.authority,Y.path,Y.query,Y.fragment);return ie(ee,!0),ee}static joinPath(Y,...ee){if(!Y.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let ce;return h.uF&&Y.scheme==="file"?ce=y.file(I.IN.join(k(Y,!0),...ee)).path:ce=I.SA.join(Y.path,...ee),Y.with({path:ce})}toString(Y=!1){return j(this,Y)}toJSON(){return this}static revive(Y){if(Y){if(Y instanceof y)return Y;{const ee=new d(Y);return ee._formatted=Y.external,ee._fsPath=Y._sep===C?Y.fsPath:null,ee}}else return Y}}const C=h.uF?1:void 0;class d extends y{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=k(this,!1)),this._fsPath}toString(Y=!1){return Y?j(this,!0):(this._formatted||(this._formatted=j(this,!1)),this._formatted)}toJSON(){const Y={$mid:1};return this._fsPath&&(Y.fsPath=this._fsPath,Y._sep=C),this._formatted&&(Y.external=this._formatted),this.path&&(Y.path=this.path),this.scheme&&(Y.scheme=this.scheme),this.authority&&(Y.authority=this.authority),this.query&&(Y.query=this.query),this.fragment&&(Y.fragment=this.fragment),Y}}const w={[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 D(H,Y){let ee,ce=-1;for(let pe=0;pe<H.length;pe++){const ge=H.charCodeAt(pe);if(ge>=97&&ge<=122||ge>=65&&ge<=90||ge>=48&&ge<=57||ge===45||ge===46||ge===95||ge===126||Y&&ge===47)ce!==-1&&(ee+=encodeURIComponent(H.substring(ce,pe)),ce=-1),ee!==void 0&&(ee+=H.charAt(pe));else{ee===void 0&&(ee=H.substr(0,pe));const fe=w[ge];fe!==void 0?(ce!==-1&&(ee+=encodeURIComponent(H.substring(ce,pe)),ce=-1),ee+=fe):ce===-1&&(ce=pe)}}return ce!==-1&&(ee+=encodeURIComponent(H.substring(ce))),ee!==void 0?ee:H}function L(H){let Y;for(let ee=0;ee<H.length;ee++){const ce=H.charCodeAt(ee);ce===35||ce===63?(Y===void 0&&(Y=H.substr(0,ee)),Y+=w[ce]):Y!==void 0&&(Y+=H[ee])}return Y!==void 0?Y:H}function k(H,Y){let ee;return H.authority&&H.path.length>1&&H.scheme==="file"?ee=`//${H.authority}${H.path}`:H.path.charCodeAt(0)===47&&(H.path.charCodeAt(1)>=65&&H.path.charCodeAt(1)<=90||H.path.charCodeAt(1)>=97&&H.path.charCodeAt(1)<=122)&&H.path.charCodeAt(2)===58?Y?ee=H.path.substr(1):ee=H.path[1].toLowerCase()+H.path.substr(2):ee=H.path,h.uF&&(ee=ee.replace(/\//g,"\\")),ee}function j(H,Y){const ee=Y?L:D;let ce="",{scheme:pe,authority:ge,path:fe,query:oe,fragment:Z}=H;if(pe&&(ce+=pe,ce+=":"),(ge||pe==="file")&&(ce+=S,ce+=S),ge){let le=ge.indexOf("@");if(le!==-1){const se=ge.substr(0,le);ge=ge.substr(le+1),le=se.indexOf(":"),le===-1?ce+=ee(se,!1):(ce+=ee(se.substr(0,le),!1),ce+=":",ce+=ee(se.substr(le+1),!1)),ce+="@"}ge=ge.toLowerCase(),le=ge.indexOf(":"),le===-1?ce+=ee(ge,!1):(ce+=ee(ge.substr(0,le),!1),ce+=ge.substr(le))}if(fe){if(fe.length>=3&&fe.charCodeAt(0)===47&&fe.charCodeAt(2)===58){const le=fe.charCodeAt(1);le>=65&&le<=90&&(fe=`/${String.fromCharCode(le+32)}:${fe.substr(3)}`)}else if(fe.length>=2&&fe.charCodeAt(1)===58){const le=fe.charCodeAt(0);le>=65&&le<=90&&(fe=`${String.fromCharCode(le+32)}:${fe.substr(2)}`)}ce+=ee(fe,!0)}return oe&&(ce+="?",ce+=ee(oe,!1)),Z&&(ce+="#",ce+=Y?Z:D(Z,!1)),ce}function N(H){try{return decodeURIComponent(H)}catch{return H.length>3?H.substr(0,3)+N(H.substr(3)):H}}const B=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function T(H){return H.match(B)?H.replace(B,Y=>N(Y)):H}},32802:(Tt,Fe,f)=>{f.d(Fe,{C1:()=>te,Ym:()=>I,kF:()=>h});const I={ctrlCmd:!1,alt:!1};var h;(function(ie){ie[ie.Blur=1]="Blur",ie[ie.Gesture=2]="Gesture",ie[ie.Other=3]="Other"})(h||(h={}));var te;(function(ie){ie[ie.NONE=0]="NONE",ie[ie.FIRST=1]="FIRST",ie[ie.SECOND=2]="SECOND",ie[ie.LAST=3]="LAST"})(te||(te={}));class ${constructor(Q){this.options=Q}}const x=new $},25837:(Tt,Fe,f)=>{f.d(Fe,{M:()=>h});var I=f(5043);function h(te,$){te instanceof I.D?(te.setFontFamily($.getMassagedFontFamily()),te.setFontWeight($.fontWeight),te.setFontSize($.fontSize),te.setFontFeatureSettings($.fontFeatureSettings),te.setLineHeight($.lineHeight),te.setLetterSpacing($.letterSpacing)):(te.style.fontFamily=$.getMassagedFontFamily(),te.style.fontWeight=$.fontWeight,te.style.fontSize=$.fontSize+"px",te.style.fontFeatureSettings=$.fontFeatureSettings,te.style.lineHeight=$.lineHeight+"px",te.style.letterSpacing=$.letterSpacing+"px")}},5711:(Tt,Fe,f)=>{f.d(Fe,{u:()=>te});var I=f(10998),h=f(2106);class te extends I.jG{constructor(x,ie){super(),this._onDidChange=this._register(new h.vl),this.onDidChange=this._onDidChange.event,this._referenceDomElement=x,this._width=-1,this._height=-1,this._resizeObserver=null,this.measureReferenceDomElement(!1,ie)}dispose(){this.stopObserving(),super.dispose()}getWidth(){return this._width}getHeight(){return this._height}startObserving(){!this._resizeObserver&&this._referenceDomElement&&(this._resizeObserver=new ResizeObserver(x=>{x&&x[0]&&x[0].contentRect?this.observe({width:x[0].contentRect.width,height:x[0].contentRect.height}):this.observe()}),this._resizeObserver.observe(this._referenceDomElement))}stopObserving(){this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null)}observe(x){this.measureReferenceDomElement(!0,x)}measureReferenceDomElement(x,ie){let Q=0,J=0;ie?(Q=ie.width,J=ie.height):this._referenceDomElement&&(Q=this._referenceDomElement.clientWidth,J=this._referenceDomElement.clientHeight),Q=Math.max(5,Q),J=Math.max(5,J),(this._width!==Q||this._height!==J)&&(this._width=Q,this._height=J,x&&this._onDidChange.fire())}}},41106:(Tt,Fe,f)=>{f.d(Fe,{T:()=>y});var I=f(55893),h=f(2106),te=f(10998),$=f(25837);class x{constructor(d,w){this.chr=d,this.type=w,this.width=0}fulfill(d){this.width=d}}class ie{constructor(d,w){this._bareFontInfo=d,this._requests=w,this._container=null,this._testElements=null}read(){this._createDomElements(),document.body.appendChild(this._container),this._readFromDomElements(),document.body.removeChild(this._container),this._container=null,this._testElements=null}_createDomElements(){const d=document.createElement("div");d.style.position="absolute",d.style.top="-50000px",d.style.width="50000px";const w=document.createElement("div");(0,$.M)(w,this._bareFontInfo),d.appendChild(w);const D=document.createElement("div");(0,$.M)(D,this._bareFontInfo),D.style.fontWeight="bold",d.appendChild(D);const L=document.createElement("div");(0,$.M)(L,this._bareFontInfo),L.style.fontStyle="italic",d.appendChild(L);const k=[];for(const j of this._requests){let N;j.type===0&&(N=w),j.type===2&&(N=D),j.type===1&&(N=L),N.appendChild(document.createElement("br"));const B=document.createElement("span");ie._render(B,j),N.appendChild(B),k.push(B)}this._container=d,this._testElements=k}static _render(d,w){if(w.chr===" "){let D="\xA0";for(let L=0;L<8;L++)D+=D;d.innerText=D}else{let D=w.chr;for(let L=0;L<8;L++)D+=D;d.textContent=D}}_readFromDomElements(){for(let d=0,w=this._requests.length;d<w;d++){const D=this._requests[d],L=this._testElements[d];D.fulfill(L.offsetWidth/256)}}}function Q(C,d){new ie(C,d).read()}var J=f(66476),z=f(28060);class S extends te.jG{constructor(){super(),this._onDidChange=this._register(new h.vl),this.onDidChange=this._onDidChange.event,this._cache=new _,this._evictUntrustedReadingsTimeout=-1}dispose(){this._evictUntrustedReadingsTimeout!==-1&&(window.clearTimeout(this._evictUntrustedReadingsTimeout),this._evictUntrustedReadingsTimeout=-1),super.dispose()}clearAllFontInfos(){this._cache=new _,this._onDidChange.fire()}_writeToCache(d,w){this._cache.put(d,w),!w.isTrusted&&this._evictUntrustedReadingsTimeout===-1&&(this._evictUntrustedReadingsTimeout=window.setTimeout(()=>{this._evictUntrustedReadingsTimeout=-1,this._evictUntrustedReadings()},5e3))}_evictUntrustedReadings(){const d=this._cache.getValues();let w=!1;for(const D of d)D.isTrusted||(w=!0,this._cache.remove(D));w&&this._onDidChange.fire()}readFontInfo(d){if(!this._cache.has(d)){let w=this._actualReadFontInfo(d);(w.typicalHalfwidthCharacterWidth<=2||w.typicalFullwidthCharacterWidth<=2||w.spaceWidth<=2||w.maxDigitWidth<=2)&&(w=new z.YJ({pixelRatio:I.PixelRatio.value,fontFamily:w.fontFamily,fontWeight:w.fontWeight,fontSize:w.fontSize,fontFeatureSettings:w.fontFeatureSettings,lineHeight:w.lineHeight,letterSpacing:w.letterSpacing,isMonospace:w.isMonospace,typicalHalfwidthCharacterWidth:Math.max(w.typicalHalfwidthCharacterWidth,5),typicalFullwidthCharacterWidth:Math.max(w.typicalFullwidthCharacterWidth,5),canUseHalfwidthRightwardsArrow:w.canUseHalfwidthRightwardsArrow,spaceWidth:Math.max(w.spaceWidth,5),middotWidth:Math.max(w.middotWidth,5),wsmiddotWidth:Math.max(w.wsmiddotWidth,5),maxDigitWidth:Math.max(w.maxDigitWidth,5)},!1)),this._writeToCache(d,w)}return this._cache.get(d)}_createRequest(d,w,D,L){const k=new x(d,w);return D.push(k),L?.push(k),k}_actualReadFontInfo(d){const w=[],D=[],L=this._createRequest("n",0,w,D),k=this._createRequest("\uFF4D",0,w,null),j=this._createRequest(" ",0,w,D),N=this._createRequest("0",0,w,D),B=this._createRequest("1",0,w,D),T=this._createRequest("2",0,w,D),H=this._createRequest("3",0,w,D),Y=this._createRequest("4",0,w,D),ee=this._createRequest("5",0,w,D),ce=this._createRequest("6",0,w,D),pe=this._createRequest("7",0,w,D),ge=this._createRequest("8",0,w,D),fe=this._createRequest("9",0,w,D),oe=this._createRequest("\u2192",0,w,D),Z=this._createRequest("\uFFEB",0,w,null),le=this._createRequest("\xB7",0,w,D),se=this._createRequest(String.fromCharCode(11825),0,w,null),X="|/-_ilm%";for(let O=0,ot=X.length;O<ot;O++)this._createRequest(X.charAt(O),0,w,D),this._createRequest(X.charAt(O),1,w,D),this._createRequest(X.charAt(O),2,w,D);Q(d,w);const K=Math.max(N.width,B.width,T.width,H.width,Y.width,ee.width,ce.width,pe.width,ge.width,fe.width);let he=d.fontFeatureSettings===J.Bc.OFF;const ve=D[0].width;for(let O=1,ot=D.length;he&&O<ot;O++){const lt=ve-D[O].width;if(lt<-.001||lt>.001){he=!1;break}}let Ee=!0;return he&&Z.width!==ve&&(Ee=!1),Z.width>oe.width&&(Ee=!1),new z.YJ({pixelRatio:I.PixelRatio.value,fontFamily:d.fontFamily,fontWeight:d.fontWeight,fontSize:d.fontSize,fontFeatureSettings:d.fontFeatureSettings,lineHeight:d.lineHeight,letterSpacing:d.letterSpacing,isMonospace:he,typicalHalfwidthCharacterWidth:L.width,typicalFullwidthCharacterWidth:k.width,canUseHalfwidthRightwardsArrow:Ee,spaceWidth:j.width,middotWidth:le.width,wsmiddotWidth:se.width,maxDigitWidth:K},!0)}}class _{constructor(){this._keys=Object.create(null),this._values=Object.create(null)}has(d){const w=d.getId();return!!this._values[w]}get(d){const w=d.getId();return this._values[w]}put(d,w){const D=d.getId();this._keys[D]=d,this._values[D]=w}remove(d){const w=d.getId();delete this._keys[w],delete this._values[w]}getValues(){return Object.keys(this._keys).map(d=>this._values[d])}}const y=new S},25155:(Tt,Fe,f)=>{f.d(Fe,{M:()=>te});var I=f(2106);class h{constructor(){this._tabFocus=!1,this._onDidChangeTabFocus=new I.vl,this.onDidChangeTabFocus=this._onDidChangeTabFocus.event}getTabFocusMode(){return this._tabFocus}setTabFocusMode(x){this._tabFocus!==x&&(this._tabFocus=x,this._onDidChangeTabFocus.fire(this._tabFocus))}}const te=new h},93344:(Tt,Fe,f)=>{f.d(Fe,{$D:()=>_,Eq:()=>y,M0:()=>L,No:()=>w,bs:()=>C});var I=f(55893),h=f(59095),te=f(87594),$=f(65958),x=f(2106),ie=f(10998),Q=f(53720),J=f(16844),z=f(13377),S=f(93702),_;(function(k){k.Tap="-monaco-textarea-synthetic-tap"})(_||(_={}));const y={forceCopyWithSyntaxHighlighting:!1};class C{constructor(){this._lastState=null}set(j,N){this._lastState={lastCopiedValue:j,data:N}}get(j){return this._lastState&&this._lastState.lastCopiedValue===j?this._lastState.data:(this._lastState=null,null)}}C.INSTANCE=new C;class d{constructor(){this._lastTypeTextLength=0}handleCompositionUpdate(j){j=j||"";const N={text:j,replacePrevCharCnt:this._lastTypeTextLength,replaceNextCharCnt:0,positionDelta:0};return this._lastTypeTextLength=j.length,N}}class w extends ie.jG{constructor(j,N,B,T){super(),this._host=j,this._textArea=N,this._OS=B,this._browser=T,this._onFocus=this._register(new x.vl),this.onFocus=this._onFocus.event,this._onBlur=this._register(new x.vl),this.onBlur=this._onBlur.event,this._onKeyDown=this._register(new x.vl),this.onKeyDown=this._onKeyDown.event,this._onKeyUp=this._register(new x.vl),this.onKeyUp=this._onKeyUp.event,this._onCut=this._register(new x.vl),this.onCut=this._onCut.event,this._onPaste=this._register(new x.vl),this.onPaste=this._onPaste.event,this._onType=this._register(new x.vl),this.onType=this._onType.event,this._onCompositionStart=this._register(new x.vl),this.onCompositionStart=this._onCompositionStart.event,this._onCompositionUpdate=this._register(new x.vl),this.onCompositionUpdate=this._onCompositionUpdate.event,this._onCompositionEnd=this._register(new x.vl),this.onCompositionEnd=this._onCompositionEnd.event,this._onSelectionChangeRequest=this._register(new x.vl),this.onSelectionChangeRequest=this._onSelectionChangeRequest.event,this._asyncTriggerCut=this._register(new $.uC(()=>this._onCut.fire(),0)),this._asyncFocusGainWriteScreenReaderContent=this._register(new $.uC(()=>this.writeScreenReaderContent("asyncFocusGain"),0)),this._textAreaState=z._O.EMPTY,this._selectionChangeListener=null,this.writeScreenReaderContent("ctor"),this._hasFocus=!1,this._currentComposition=null;let H=null;this._register(this._textArea.onKeyDown(Y=>{const ee=new te.Z(Y);(ee.keyCode===109||this._currentComposition&&ee.keyCode===1)&&ee.stopPropagation(),ee.equals(9)&&ee.preventDefault(),H=ee,this._onKeyDown.fire(ee)})),this._register(this._textArea.onKeyUp(Y=>{const ee=new te.Z(Y);this._onKeyUp.fire(ee)})),this._register(this._textArea.onCompositionStart(Y=>{z.Hf&&console.log("[compositionstart]",Y);const ee=new d;if(this._currentComposition){this._currentComposition=ee;return}if(this._currentComposition=ee,this._OS===2&&H&&H.equals(109)&&this._textAreaState.selectionStart===this._textAreaState.selectionEnd&&this._textAreaState.selectionStart>0&&this._textAreaState.value.substr(this._textAreaState.selectionStart-1,1)===Y.data&&(H.code==="ArrowRight"||H.code==="ArrowLeft")){z.Hf&&console.log("[compositionstart] Handling long press case on macOS + arrow key",Y),ee.handleCompositionUpdate("x"),this._onCompositionStart.fire({data:Y.data});return}if(this._browser.isAndroid){this._onCompositionStart.fire({data:Y.data});return}this._onCompositionStart.fire({data:Y.data})})),this._register(this._textArea.onCompositionUpdate(Y=>{z.Hf&&console.log("[compositionupdate]",Y);const ee=this._currentComposition;if(!ee)return;if(this._browser.isAndroid){const pe=z._O.readFromTextArea(this._textArea),ge=z._O.deduceAndroidCompositionInput(this._textAreaState,pe);this._textAreaState=pe,this._onType.fire(ge),this._onCompositionUpdate.fire(Y);return}const ce=ee.handleCompositionUpdate(Y.data);this._textAreaState=z._O.readFromTextArea(this._textArea),this._onType.fire(ce),this._onCompositionUpdate.fire(Y)})),this._register(this._textArea.onCompositionEnd(Y=>{z.Hf&&console.log("[compositionend]",Y);const ee=this._currentComposition;if(!ee)return;if(this._currentComposition=null,this._browser.isAndroid){const pe=z._O.readFromTextArea(this._textArea),ge=z._O.deduceAndroidCompositionInput(this._textAreaState,pe);this._textAreaState=pe,this._onType.fire(ge),this._onCompositionEnd.fire();return}const ce=ee.handleCompositionUpdate(Y.data);this._textAreaState=z._O.readFromTextArea(this._textArea),this._onType.fire(ce),this._onCompositionEnd.fire()})),this._register(this._textArea.onInput(Y=>{if(z.Hf&&console.log("[input]",Y),this._textArea.setIgnoreSelectionChangeTime("received input event"),this._currentComposition)return;const ee=z._O.readFromTextArea(this._textArea),ce=z._O.deduceInput(this._textAreaState,ee,this._OS===2);ce.replacePrevCharCnt===0&&ce.text.length===1&&J.pc(ce.text.charCodeAt(0))||(this._textAreaState=ee,(ce.text!==""||ce.replacePrevCharCnt!==0||ce.replaceNextCharCnt!==0||ce.positionDelta!==0)&&this._onType.fire(ce))})),this._register(this._textArea.onCut(Y=>{this._textArea.setIgnoreSelectionChangeTime("received cut event"),this._ensureClipboardGetsEditorSelection(Y),this._asyncTriggerCut.schedule()})),this._register(this._textArea.onCopy(Y=>{this._ensureClipboardGetsEditorSelection(Y)})),this._register(this._textArea.onPaste(Y=>{if(this._textArea.setIgnoreSelectionChangeTime("received paste event"),Y.preventDefault(),!Y.clipboardData)return;let[ee,ce]=D.getTextData(Y.clipboardData);ee&&(ce=ce||C.INSTANCE.get(ee),this._onPaste.fire({text:ee,metadata:ce}))})),this._register(this._textArea.onFocus(()=>{const Y=this._hasFocus;this._setHasFocus(!0),this._browser.isSafari&&!Y&&this._hasFocus&&this._asyncFocusGainWriteScreenReaderContent.schedule()})),this._register(this._textArea.onBlur(()=>{this._currentComposition&&(this._currentComposition=null,this.writeScreenReaderContent("blurWithoutCompositionEnd"),this._onCompositionEnd.fire()),this._setHasFocus(!1)})),this._register(this._textArea.onSyntheticTap(()=>{this._browser.isAndroid&&this._currentComposition&&(this._currentComposition=null,this.writeScreenReaderContent("tapWithoutCompositionEnd"),this._onCompositionEnd.fire())}))}_installSelectionChangeListener(){let j=0;return h.ko(document,"selectionchange",N=>{if(!this._hasFocus||this._currentComposition||!this._browser.isChrome)return;const B=Date.now(),T=B-j;if(j=B,T<5)return;const H=B-this._textArea.getIgnoreSelectionChangeTime();if(this._textArea.resetSelectionChangeTime(),H<100||!this._textAreaState.selectionStartPosition||!this._textAreaState.selectionEndPosition)return;const Y=this._textArea.getValue();if(this._textAreaState.value!==Y)return;const ee=this._textArea.getSelectionStart(),ce=this._textArea.getSelectionEnd();if(this._textAreaState.selectionStart===ee&&this._textAreaState.selectionEnd===ce)return;const pe=this._textAreaState.deduceEditorPosition(ee),ge=this._host.deduceModelPosition(pe[0],pe[1],pe[2]),fe=this._textAreaState.deduceEditorPosition(ce),oe=this._host.deduceModelPosition(fe[0],fe[1],fe[2]),Z=new S.L(ge.lineNumber,ge.column,oe.lineNumber,oe.column);this._onSelectionChangeRequest.fire(Z)})}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(j){this._hasFocus!==j&&(this._hasFocus=j,this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null),this._hasFocus&&(this._selectionChangeListener=this._installSelectionChangeListener()),this._hasFocus&&this.writeScreenReaderContent("focusgain"),this._hasFocus?this._onFocus.fire():this._onBlur.fire())}_setAndWriteTextAreaState(j,N){this._hasFocus||(N=N.collapseSelection()),N.writeToTextArea(j,this._textArea,this._hasFocus),this._textAreaState=N}writeScreenReaderContent(j){this._currentComposition||this._setAndWriteTextAreaState(j,this._host.getScreenReaderContent(this._textAreaState))}_ensureClipboardGetsEditorSelection(j){const N=this._host.getDataToCopy(),B={version:1,isFromEmptySelection:N.isFromEmptySelection,multicursorText:N.multicursorText,mode:N.mode};C.INSTANCE.set(this._browser.isFirefox?N.text.replace(/\r\n/g,` `):N.text,B),j.preventDefault(),j.clipboardData&&D.setTextData(j.clipboardData,N.text,N.html,B)}}class D{static getTextData(j){const N=j.getData(Q.K.text);let B=null;const T=j.getData("vscode-editor-data");if(typeof T=="string")try{B=JSON.parse(T),B.version!==1&&(B=null)}catch{}return N.length===0&&B===null&&j.files.length>0?[Array.prototype.slice.call(j.files,0).map(Y=>Y.name).join(` `),null]:[N,B]}static setTextData(j,N,B,T){j.setData(Q.K.text,N),typeof B=="string"&&j.setData("text/html",B),j.setData("vscode-editor-data",JSON.stringify(T))}}class L extends ie.jG{constructor(j){super(),this._actual=j,this.onKeyDown=this._register(h.dl(this._actual,"keydown")).event,this.onKeyUp=this._register(h.dl(this._actual,"keyup")).event,this.onCompositionStart=this._register(h.dl(this._actual,"compositionstart")).event,this.onCompositionUpdate=this._register(h.dl(this._actual,"compositionupdate")).event,this.onCompositionEnd=this._register(h.dl(this._actual,"compositionend")).event,this.onInput=this._register(h.dl(this._actual,"input")).event,this.onCut=this._register(h.dl(this._actual,"cut")).event,this.onCopy=this._register(h.dl(this._actual,"copy")).event,this.onPaste=this._register(h.dl(this._actual,"paste")).event,this.onFocus=this._register(h.dl(this._actual,"focus")).event,this.onBlur=this._register(h.dl(this._actual,"blur")).event,this._onSyntheticTap=this._register(new x.vl),this.onSyntheticTap=this._onSyntheticTap.event,this._ignoreSelectionChangeTime=0,this._register(h.ko(this._actual,_.Tap,()=>this._onSyntheticTap.fire()))}hasFocus(){const j=h.jG(this._actual);return j?j.activeElement===this._actual:h.qD(this._actual)?document.activeElement===this._actual:!1}setIgnoreSelectionChangeTime(j){this._ignoreSelectionChangeTime=Date.now()}getIgnoreSelectionChangeTime(){return this._ignoreSelectionChangeTime}resetSelectionChangeTime(){this._ignoreSelectionChangeTime=0}getValue(){return this._actual.value}setValue(j,N){const B=this._actual;B.value!==N&&(this.setIgnoreSelectionChangeTime("setValue"),B.value=N)}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(j,N,B){const T=this._actual;let H=null;const Y=h.jG(T);Y?H=Y.activeElement:H=document.activeElement;const ee=H===T,ce=T.selectionStart,pe=T.selectionEnd;if(ee&&ce===N&&pe===B){I.isFirefox&&window.parent!==window&&T.focus();return}if(ee){this.setIgnoreSelectionChangeTime("setSelectionRange"),T.setSelectionRange(N,B),I.isFirefox&&window.parent!==window&&T.focus();return}try{const ge=h.zK(T);this.setIgnoreSelectionChangeTime("setSelectionRange"),T.focus(),T.setSelectionRange(N,B),h.wk(T,ge)}catch{}}}},13377:(Tt,Fe,f)=>{f.d(Fe,{Al:()=>ie,Hf:()=>$,_O:()=>x});var I=f(16844),h=f(15365),te=f(28061);const $=!1;class x{constructor(J,z,S,_,y){this.value=J,this.selectionStart=z,this.selectionEnd=S,this.selectionStartPosition=_,this.selectionEndPosition=y}toString(){return`[ <${this.value}>, selectionStart: ${this.selectionStart}, selectionEnd: ${this.selectionEnd}]`}static readFromTextArea(J){return new x(J.getValue(),J.getSelectionStart(),J.getSelectionEnd(),null,null)}collapseSelection(){return new x(this.value,this.value.length,this.value.length,null,null)}writeToTextArea(J,z,S){$&&console.log(`writeToTextArea ${J}: ${this.toString()}`),z.setValue(J,this.value),S&&z.setSelectionRange(J,this.selectionStart,this.selectionEnd)}deduceEditorPosition(J){if(J<=this.selectionStart){const _=this.value.substring(J,this.selectionStart);return this._finishDeduceEditorPosition(this.selectionStartPosition,_,-1)}if(J>=this.selectionEnd){const _=this.value.substring(this.selectionEnd,J);return this._finishDeduceEditorPosition(this.selectionEndPosition,_,1)}const z=this.value.substring(this.selectionStart,J);if(z.indexOf(String.fromCharCode(8230))===-1)return this._finishDeduceEditorPosition(this.selectionStartPosition,z,1);const S=this.value.substring(J,this.selectionEnd);return this._finishDeduceEditorPosition(this.selectionEndPosition,S,-1)}_finishDeduceEditorPosition(J,z,S){let _=0,y=-1;for(;(y=z.indexOf(` `,y+1))!==-1;)_++;return[J,S*z.length,_]}static deduceInput(J,z,S){if(!J)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};$&&(console.log("------------------------deduceInput"),console.log(`PREVIOUS STATE: ${J.toString()}`),console.log(`CURRENT STATE: ${z.toString()}`));const _=Math.min(I.Qp(J.value,z.value),J.selectionStart,z.selectionStart),y=Math.min(I.Vi(J.value,z.value),J.value.length-J.selectionEnd,z.value.length-z.selectionEnd),C=J.value.substring(_,J.value.length-y),d=z.value.substring(_,z.value.length-y),w=J.selectionStart-_,D=J.selectionEnd-_,L=z.selectionStart-_,k=z.selectionEnd-_;if($&&(console.log(`AFTER DIFFING PREVIOUS STATE: <${C}>, selectionStart: ${w}, selectionEnd: ${D}`),console.log(`AFTER DIFFING CURRENT STATE: <${d}>, selectionStart: ${L}, selectionEnd: ${k}`)),L===k){const N=J.selectionStart-_;return $&&console.log(`REMOVE PREVIOUS: ${N} chars`),{text:d,replacePrevCharCnt:N,replaceNextCharCnt:0,positionDelta:0}}const j=D-w;return{text:d,replacePrevCharCnt:j,replaceNextCharCnt:0,positionDelta:0}}static deduceAndroidCompositionInput(J,z){if(!J)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};if($&&(console.log("------------------------deduceAndroidCompositionInput"),console.log(`PREVIOUS STATE: ${J.toString()}`),console.log(`CURRENT STATE: ${z.toString()}`)),J.value===z.value)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:z.selectionEnd-J.selectionEnd};const S=Math.min(I.Qp(J.value,z.value),J.selectionEnd),_=Math.min(I.Vi(J.value,z.value),J.value.length-J.selectionEnd),y=J.value.substring(S,J.value.length-_),C=z.value.substring(S,z.value.length-_),d=J.selectionStart-S,w=J.selectionEnd-S,D=z.selectionStart-S,L=z.selectionEnd-S;return $&&(console.log(`AFTER DIFFING PREVIOUS STATE: <${y}>, selectionStart: ${d}, selectionEnd: ${w}`),console.log(`AFTER DIFFING CURRENT STATE: <${C}>, selectionStart: ${D}, selectionEnd: ${L}`)),{text:C,replacePrevCharCnt:w,replaceNextCharCnt:y.length-w,positionDelta:L-C.length}}}x.EMPTY=new x("",0,0,null,null);class ie{static _getPageOfLine(J,z){return Math.floor((J-1)/z)}static _getRangeForPage(J,z){const S=J*z,_=S+1,y=S+z;return new te.Q(_,1,y+1,1)}static fromEditorSelection(J,z,S,_,y){const C=ie._getPageOfLine(S.startLineNumber,_),d=ie._getRangeForPage(C,_),w=ie._getPageOfLine(S.endLineNumber,_),D=ie._getRangeForPage(w,_),L=d.intersectRanges(new te.Q(1,1,S.startLineNumber,S.startColumn));let k=z.getValueInRange(L,1);const j=z.getLineCount(),N=z.getLineMaxColumn(j),B=D.intersectRanges(new te.Q(S.endLineNumber,S.endColumn,j,N));let T=z.getValueInRange(B,1),H;if(C===w||C+1===w)H=z.getValueInRange(S,1);else{const Y=d.intersectRanges(S),ee=D.intersectRanges(S);H=z.getValueInRange(Y,1)+String.fromCharCode(8230)+z.getValueInRange(ee,1)}return y&&(k.length>500&&(k=k.substring(k.length-500,k.length)),T.length>500&&(T=T.substring(0,500)),H.length>2*500&&(H=H.substring(0,500)+String.fromCharCode(8230)+H.substring(H.length-500,H.length))),new x(k+H+T,k.length,k.length+H.length,new h.y(S.startLineNumber,S.startColumn),new h.y(S.endLineNumber,S.endColumn))}}},72521:(Tt,Fe,f)=>{f.d(Fe,{Yh:()=>ce,QM:()=>T});var I=f(3765),h=f(55893),te=f(79359),$=f(59407),x=f(50946),ie=f(87301),Q=f(29895),J=f(15365),z=f(28061);class S{static columnSelect(oe,Z,le,se,X,K){const he=Math.abs(X-le)+1,ve=le>X,Ee=se>K,O=se<K,ot=[];for(let lt=0;lt<he;lt++){const We=le+(ve?-lt:lt),Ke=oe.columnFromVisibleColumn(Z,We,se),De=oe.columnFromVisibleColumn(Z,We,K),Pe=oe.visibleColumnFromColumn(Z,new J.y(We,Ke)),Ue=oe.visibleColumnFromColumn(Z,new J.y(We,De));O&&(Pe>K||Ue<se)||Ee&&(Ue>se||Pe<K)||ot.push(new Q.mG(new z.Q(We,Ke,We,Ke),0,new J.y(We,De),0))}if(ot.length===0)for(let lt=0;lt<he;lt++){const We=le+(ve?-lt:lt),Ke=Z.getLineMaxColumn(We);ot.push(new Q.mG(new z.Q(We,Ke,We,Ke),0,new J.y(We,Ke),0))}return{viewStates:ot,reversed:ve,fromLineNumber:le,fromVisualColumn:se,toLineNumber:X,toVisualColumn:K}}static columnSelectLeft(oe,Z,le){let se=le.toViewVisualColumn;return se>0&&se--,S.columnSelect(oe,Z,le.fromViewLineNumber,le.fromViewVisualColumn,le.toViewLineNumber,se)}static columnSelectRight(oe,Z,le){let se=0;const X=Math.min(le.fromViewLineNumber,le.toViewLineNumber),K=Math.max(le.fromViewLineNumber,le.toViewLineNumber);for(let ve=X;ve<=K;ve++){const Ee=Z.getLineMaxColumn(ve),O=oe.visibleColumnFromColumn(Z,new J.y(ve,Ee));se=Math.max(se,O)}let he=le.toViewVisualColumn;return he<se&&he++,this.columnSelect(oe,Z,le.fromViewLineNumber,le.fromViewVisualColumn,le.toViewLineNumber,he)}static columnSelectUp(oe,Z,le,se){const X=se?oe.pageSize:1,K=Math.max(1,le.toViewLineNumber-X);return this.columnSelect(oe,Z,le.fromViewLineNumber,le.fromViewVisualColumn,K,le.toViewVisualColumn)}static columnSelectDown(oe,Z,le,se){const X=se?oe.pageSize:1,K=Math.min(Z.getLineCount(),le.toViewLineNumber+X);return this.columnSelect(oe,Z,le.fromViewLineNumber,le.fromViewVisualColumn,K,le.toViewVisualColumn)}}var _=f(97666),y=f(27064),C=f(61710),d=f(38122),w=f(96655),D=f(48421);const L=0;class k extends x.DX{runEditorCommand(oe,Z,le){const se=Z._getViewModel();se&&this.runCoreEditorCommand(se,le||{})}}var j;(function(fe){const oe=function(le){if(!te.Gv(le))return!1;const se=le;return!(!te.Kg(se.to)||!te.b0(se.by)&&!te.Kg(se.by)||!te.b0(se.value)&&!te.Et(se.value)||!te.b0(se.revealCursor)&&!te.Lm(se.revealCursor))};fe.description={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:oe,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"}}}}]},fe.RawDirection={Up:"up",Down:"down"},fe.RawUnit={Line:"line",WrappedLine:"wrappedLine",Page:"page",HalfPage:"halfPage",Editor:"editor"};function Z(le){let se;switch(le.to){case fe.RawDirection.Up:se=1;break;case fe.RawDirection.Down:se=2;break;default:return null}let X;switch(le.by){case fe.RawUnit.Line:X=1;break;case fe.RawUnit.WrappedLine:X=2;break;case fe.RawUnit.Page:X=3;break;case fe.RawUnit.HalfPage:X=4;break;case fe.RawUnit.Editor:X=5;break;default:X=2}const K=Math.floor(le.value||1),he=!!le.revealCursor;return{direction:se,unit:X,value:K,revealCursor:he,select:!!le.select}}fe.parse=Z})(j||(j={}));var N;(function(fe){const oe=function(Z){if(!te.Gv(Z))return!1;const le=Z;return!(!te.Et(le.lineNumber)&&!te.Kg(le.lineNumber)||!te.b0(le.at)&&!te.Kg(le.at))};fe.description={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:oe,schema:{type:"object",required:["lineNumber"],properties:{lineNumber:{type:["number","string"]},at:{type:"string",enum:["top","center","bottom"]}}}}]},fe.RawAtArgument={Top:"top",Center:"center",Bottom:"bottom"}})(N||(N={}));class B{constructor(oe){oe.addImplementation(1e4,"code-editor",(Z,le)=>{const se=Z.get(ie.T).getFocusedCodeEditor();return se&&se.hasTextFocus()?this._runEditorCommand(Z,se,le):!1}),oe.addImplementation(1e3,"generic-dom-input-textarea",(Z,le)=>{const se=document.activeElement;return se&&["input","textarea"].indexOf(se.tagName.toLowerCase())>=0?(this.runDOMCommand(),!0):!1}),oe.addImplementation(0,"generic-dom",(Z,le)=>{const se=Z.get(ie.T).getActiveCodeEditor();return se?(se.focus(),this._runEditorCommand(Z,se,le)):!1})}_runEditorCommand(oe,Z,le){const se=this.runEditorCommand(oe,Z,le);return se||!0}}var T;(function(fe){class oe extends k{constructor(Re){super(Re),this._minimalReveal=Re.minimalReveal,this._inSelectionMode=Re.inSelectionMode}runCoreEditorCommand(Re,et){Re.model.pushStackElement(),Re.setCursorStates(et.source,3,[y.c.moveTo(Re,Re.getPrimaryCursorState(),this._inSelectionMode,et.position,et.viewPosition)])&&Re.revealPrimaryCursor(et.source,!0,this._minimalReveal)}}fe.MoveTo=(0,x.E_)(new oe({id:"_moveTo",minimalReveal:!0,inSelectionMode:!1,precondition:void 0})),fe.MoveToSelect=(0,x.E_)(new oe({id:"_moveToSelect",minimalReveal:!1,inSelectionMode:!0,precondition:void 0}));class Z extends k{runCoreEditorCommand(Re,et){Re.model.pushStackElement();const rt=this._getColumnSelectResult(Re,Re.getPrimaryCursorState(),Re.getCursorColumnSelectData(),et);Re.setCursorStates(et.source,3,rt.viewStates.map(Lt=>Q.MF.fromViewState(Lt))),Re.setCursorColumnSelectData({isReal:!0,fromViewLineNumber:rt.fromLineNumber,fromViewVisualColumn:rt.fromVisualColumn,toViewLineNumber:rt.toLineNumber,toViewVisualColumn:rt.toVisualColumn}),rt.reversed?Re.revealTopMostCursor(et.source):Re.revealBottomMostCursor(et.source)}}fe.ColumnSelect=(0,x.E_)(new class extends Z{constructor(){super({id:"columnSelect",precondition:void 0})}_getColumnSelectResult(Ue,Re,et,rt){const Lt=Ue.model.validatePosition(rt.position),Dt=Ue.coordinatesConverter.validateViewPosition(new J.y(rt.viewPosition.lineNumber,rt.viewPosition.column),Lt),xt=rt.doColumnSelect?et.fromViewLineNumber:Dt.lineNumber,Ie=rt.doColumnSelect?et.fromViewVisualColumn:rt.mouseColumn-1;return S.columnSelect(Ue.cursorConfig,Ue,xt,Ie,Dt.lineNumber,rt.mouseColumn-1)}}),fe.CursorColumnSelectLeft=(0,x.E_)(new class extends Z{constructor(){super({id:"cursorColumnSelectLeft",precondition:void 0,kbOpts:{weight:L,kbExpr:d.R.textInputFocus,primary:3599,linux:{primary:0}}})}_getColumnSelectResult(Ue,Re,et,rt){return S.columnSelectLeft(Ue.cursorConfig,Ue,et)}}),fe.CursorColumnSelectRight=(0,x.E_)(new class extends Z{constructor(){super({id:"cursorColumnSelectRight",precondition:void 0,kbOpts:{weight:L,kbExpr:d.R.textInputFocus,primary:3601,linux:{primary:0}}})}_getColumnSelectResult(Ue,Re,et,rt){return S.columnSelectRight(Ue.cursorConfig,Ue,et)}});class le extends Z{constructor(Re){super(Re),this._isPaged=Re.isPaged}_getColumnSelectResult(Re,et,rt,Lt){return S.columnSelectUp(Re.cursorConfig,Re,rt,this._isPaged)}}fe.CursorColumnSelectUp=(0,x.E_)(new le({isPaged:!1,id:"cursorColumnSelectUp",precondition:void 0,kbOpts:{weight:L,kbExpr:d.R.textInputFocus,primary:3600,linux:{primary:0}}})),fe.CursorColumnSelectPageUp=(0,x.E_)(new le({isPaged:!0,id:"cursorColumnSelectPageUp",precondition:void 0,kbOpts:{weight:L,kbExpr:d.R.textInputFocus,primary:3595,linux:{primary:0}}}));class se extends Z{constructor(Re){super(Re),this._isPaged=Re.isPaged}_getColumnSelectResult(Re,et,rt,Lt){return S.columnSelectDown(Re.cursorConfig,Re,rt,this._isPaged)}}fe.CursorColumnSelectDown=(0,x.E_)(new se({isPaged:!1,id:"cursorColumnSelectDown",precondition:void 0,kbOpts:{weight:L,kbExpr:d.R.textInputFocus,primary:3602,linux:{primary:0}}})),fe.CursorColumnSelectPageDown=(0,x.E_)(new se({isPaged:!0,id:"cursorColumnSelectPageDown",precondition:void 0,kbOpts:{weight:L,kbExpr:d.R.textInputFocus,primary:3596,linux:{primary:0}}}));class X extends k{constructor(){super({id:"cursorMove",precondition:void 0,description:y.S.description})}runCoreEditorCommand(Re,et){const rt=y.S.parse(et);rt&&this._runCursorMove(Re,et.source,rt)}_runCursorMove(Re,et,rt){Re.model.pushStackElement(),Re.setCursorStates(et,3,X._move(Re,Re.getCursorStates(),rt)),Re.revealPrimaryCursor(et,!0)}static _move(Re,et,rt){const Lt=rt.select,Dt=rt.value;switch(rt.direction){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:return y.c.simpleMove(Re,et,rt.direction,Lt,Dt,rt.unit);case 11:case 13:case 12:case 14:return y.c.viewportMove(Re,et,rt.direction,Lt,Dt);default:return null}}}fe.CursorMoveImpl=X,fe.CursorMove=(0,x.E_)(new X);class K extends k{constructor(Re){super(Re),this._staticArgs=Re.args}runCoreEditorCommand(Re,et){let rt=this._staticArgs;this._staticArgs.value===-1&&(rt={direction:this._staticArgs.direction,unit:this._staticArgs.unit,select:this._staticArgs.select,value:et.pageSize||Re.cursorConfig.pageSize}),Re.model.pushStackElement(),Re.setCursorStates(et.source,3,y.c.simpleMove(Re,Re.getCursorStates(),rt.direction,rt.select,rt.value,rt.unit)),Re.revealPrimaryCursor(et.source,!0)}}fe.CursorLeft=(0,x.E_)(new K({args:{direction:0,unit:0,select:!1,value:1},id:"cursorLeft",precondition:void 0,kbOpts:{weight:L,kbExpr:d.R.textInputFocus,primary:15,mac:{primary:15,secondary:[288]}}})),fe.CursorLeftSelect=(0,x.E_)(new K({args:{direction:0,unit:0,select:!0,value:1},id:"cursorLeftSelect",precondition:void 0,kbOpts:{weight:L,kbExpr:d.R.textInputFocus,primary:1039}})),fe.CursorRight=(0,x.E_)(new K({args:{direction:1,unit:0,select:!1,value:1},id:"cursorRight",precondition:void 0,kbOpts:{weight:L,kbExpr:d.R.textInputFocus,primary:17,mac:{primary:17,secondary:[292]}}})),fe.CursorRightSelect=(0,x.E_)(new K({args:{direction:1,unit:0,select:!0,value:1},id:"cursorRightSelect",precondition:void 0,kbOpts:{weight:L,kbExpr:d.R.textInputFocus,primary:1041}})),fe.CursorUp=(0,x.E_)(new K({args:{direction:2,unit:2,select:!1,value:1},id:"cursorUp",precondition:void 0,kbOpts:{weight:L,kbExpr:d.R.textInputFocus,primary:16,mac:{primary:16,secondary:[302]}}})),fe.CursorUpSelect=(0,x.E_)(new K({args:{direction:2,unit:2,select:!0,value:1},id:"cursorUpSelect",precondition:void 0,kbOpts:{weight:L,kbExpr:d.R.textInputFocus,primary:1040,secondary:[3088],mac:{primary:1040},linux:{primary:1040}}})),fe.CursorPageUp=(0,x.E_)(new K({args:{direction:2,unit:2,select:!1,value:-1},id:"cursorPageUp",precondition:void 0,kbOpts:{weight:L,kbExpr:d.R.textInputFocus,primary:11}})),fe.CursorPageUpSelect=(0,x.E_)(new K({args:{direction:2,unit:2,select:!0,value:-1},id:"cursorPageUpSelect",precondition:void 0,kbOpts:{weight:L,kbExpr:d.R.textInputFocus,primary:1035}})),fe.CursorDown=(0,x.E_)(new K({args:{direction:3,unit:2,select:!1,value:1},id:"cursorDown",precondition:void 0,kbOpts:{weight:L,kbExpr:d.R.textInputFocus,primary:18,mac:{primary:18,secondary:[300]}}})),fe.CursorDownSelect=(0,x.E_)(new K({args:{direction:3,unit:2,select:!0,value:1},id:"cursorDownSelect",precondition:void 0,kbOpts:{weight:L,kbExpr:d.R.textInputFocus,primary:1042,secondary:[3090],mac:{primary:1042},linux:{primary:1042}}})),fe.CursorPageDown=(0,x.E_)(new K({args:{direction:3,unit:2,select:!1,value:-1},id:"cursorPageDown",precondition:void 0,kbOpts:{weight:L,kbExpr:d.R.textInputFocus,primary:12}})),fe.CursorPageDownSelect=(0,x.E_)(new K({args:{direction:3,unit:2,select:!0,value:-1},id:"cursorPageDownSelect",precondition:void 0,kbOpts:{weight:L,kbExpr:d.R.textInputFocus,primary:1036}})),fe.CreateCursor=(0,x.E_)(new class extends k{constructor(){super({id:"createCursor",precondition:void 0})}runCoreEditorCommand(Ue,Re){let et;Re.wholeLine?et=y.c.line(Ue,Ue.getPrimaryCursorState(),!1,Re.position,Re.viewPosition):et=y.c.moveTo(Ue,Ue.getPrimaryCursorState(),!1,Re.position,Re.viewPosition);const rt=Ue.getCursorStates();if(rt.length>1){const Lt=et.modelState?et.modelState.position:null,Dt=et.viewState?et.viewState.position:null;for(let xt=0,Ie=rt.length;xt<Ie;xt++){const dt=rt[xt];if(!(Lt&&!dt.modelState.selection.containsPosition(Lt))&&!(Dt&&!dt.viewState.selection.containsPosition(Dt))){rt.splice(xt,1),Ue.model.pushStackElement(),Ue.setCursorStates(Re.source,3,rt);return}}}rt.push(et),Ue.model.pushStackElement(),Ue.setCursorStates(Re.source,3,rt)}}),fe.LastCursorMoveToSelect=(0,x.E_)(new class extends k{constructor(){super({id:"_lastCursorMoveToSelect",precondition:void 0})}runCoreEditorCommand(Ue,Re){const et=Ue.getLastAddedCursorIndex(),rt=Ue.getCursorStates(),Lt=rt.slice(0);Lt[et]=y.c.moveTo(Ue,rt[et],!0,Re.position,Re.viewPosition),Ue.model.pushStackElement(),Ue.setCursorStates(Re.source,3,Lt)}});class he extends k{constructor(Re){super(Re),this._inSelectionMode=Re.inSelectionMode}runCoreEditorCommand(Re,et){Re.model.pushStackElement(),Re.setCursorStates(et.source,3,y.c.moveToBeginningOfLine(Re,Re.getCursorStates(),this._inSelectionMode)),Re.revealPrimaryCursor(et.source,!0)}}fe.CursorHome=(0,x.E_)(new he({inSelectionMode:!1,id:"cursorHome",precondition:void 0,kbOpts:{weight:L,kbExpr:d.R.textInputFocus,primary:14,mac:{primary:14,secondary:[2063]}}})),fe.CursorHomeSelect=(0,x.E_)(new he({inSelectionMode:!0,id:"cursorHomeSelect",precondition:void 0,kbOpts:{weight:L,kbExpr:d.R.textInputFocus,primary:1038,mac:{primary:1038,secondary:[3087]}}}));class ve extends k{constructor(Re){super(Re),this._inSelectionMode=Re.inSelectionMode}runCoreEditorCommand(Re,et){Re.model.pushStackElement(),Re.setCursorStates(et.source,3,this._exec(Re.getCursorStates())),Re.revealPrimaryCursor(et.source,!0)}_exec(Re){const et=[];for(let rt=0,Lt=Re.length;rt<Lt;rt++){const Dt=Re[rt],xt=Dt.modelState.position.lineNumber;et[rt]=Q.MF.fromModelState(Dt.modelState.move(this._inSelectionMode,xt,1,0))}return et}}fe.CursorLineStart=(0,x.E_)(new ve({inSelectionMode:!1,id:"cursorLineStart",precondition:void 0,kbOpts:{weight:L,kbExpr:d.R.textInputFocus,primary:0,mac:{primary:287}}})),fe.CursorLineStartSelect=(0,x.E_)(new ve({inSelectionMode:!0,id:"cursorLineStartSelect",precondition:void 0,kbOpts:{weight:L,kbExpr:d.R.textInputFocus,primary:0,mac:{primary:1311}}}));class Ee extends k{constructor(Re){super(Re),this._inSelectionMode=Re.inSelectionMode}runCoreEditorCommand(Re,et){Re.model.pushStackElement(),Re.setCursorStates(et.source,3,y.c.moveToEndOfLine(Re,Re.getCursorStates(),this._inSelectionMode,et.sticky||!1)),Re.revealPrimaryCursor(et.source,!0)}}fe.CursorEnd=(0,x.E_)(new Ee({inSelectionMode:!1,id:"cursorEnd",precondition:void 0,kbOpts:{args:{sticky:!1},weight:L,kbExpr:d.R.textInputFocus,primary:13,mac:{primary:13,secondary:[2065]}},description:{description:"Go to End",args:[{name:"args",schema:{type:"object",properties:{sticky:{description:I.kg("stickydesc","Stick to the end even when going to longer lines"),type:"boolean",default:!1}}}}]}})),fe.CursorEndSelect=(0,x.E_)(new Ee({inSelectionMode:!0,id:"cursorEndSelect",precondition:void 0,kbOpts:{args:{sticky:!1},weight:L,kbExpr:d.R.textInputFocus,primary:1037,mac:{primary:1037,secondary:[3089]}},description:{description:"Select to End",args:[{name:"args",schema:{type:"object",properties:{sticky:{description:I.kg("stickydesc","Stick to the end even when going to longer lines"),type:"boolean",default:!1}}}}]}}));class O extends k{constructor(Re){super(Re),this._inSelectionMode=Re.inSelectionMode}runCoreEditorCommand(Re,et){Re.model.pushStackElement(),Re.setCursorStates(et.source,3,this._exec(Re,Re.getCursorStates())),Re.revealPrimaryCursor(et.source,!0)}_exec(Re,et){const rt=[];for(let Lt=0,Dt=et.length;Lt<Dt;Lt++){const xt=et[Lt],Ie=xt.modelState.position.lineNumber,dt=Re.model.getLineMaxColumn(Ie);rt[Lt]=Q.MF.fromModelState(xt.modelState.move(this._inSelectionMode,Ie,dt,0))}return rt}}fe.CursorLineEnd=(0,x.E_)(new O({inSelectionMode:!1,id:"cursorLineEnd",precondition:void 0,kbOpts:{weight:L,kbExpr:d.R.textInputFocus,primary:0,mac:{primary:291}}})),fe.CursorLineEndSelect=(0,x.E_)(new O({inSelectionMode:!0,id:"cursorLineEndSelect",precondition:void 0,kbOpts:{weight:L,kbExpr:d.R.textInputFocus,primary:0,mac:{primary:1315}}}));class ot extends k{constructor(Re){super(Re),this._inSelectionMode=Re.inSelectionMode}runCoreEditorCommand(Re,et){Re.model.pushStackElement(),Re.setCursorStates(et.source,3,y.c.moveToBeginningOfBuffer(Re,Re.getCursorStates(),this._inSelectionMode)),Re.revealPrimaryCursor(et.source,!0)}}fe.CursorTop=(0,x.E_)(new ot({inSelectionMode:!1,id:"cursorTop",precondition:void 0,kbOpts:{weight:L,kbExpr:d.R.textInputFocus,primary:2062,mac:{primary:2064}}})),fe.CursorTopSelect=(0,x.E_)(new ot({inSelectionMode:!0,id:"cursorTopSelect",precondition:void 0,kbOpts:{weight:L,kbExpr:d.R.textInputFocus,primary:3086,mac:{primary:3088}}}));class lt extends k{constructor(Re){super(Re),this._inSelectionMode=Re.inSelectionMode}runCoreEditorCommand(Re,et){Re.model.pushStackElement(),Re.setCursorStates(et.source,3,y.c.moveToEndOfBuffer(Re,Re.getCursorStates(),this._inSelectionMode)),Re.revealPrimaryCursor(et.source,!0)}}fe.CursorBottom=(0,x.E_)(new lt({inSelectionMode:!1,id:"cursorBottom",precondition:void 0,kbOpts:{weight:L,kbExpr:d.R.textInputFocus,primary:2061,mac:{primary:2066}}})),fe.CursorBottomSelect=(0,x.E_)(new lt({inSelectionMode:!0,id:"cursorBottomSelect",precondition:void 0,kbOpts:{weight:L,kbExpr:d.R.textInputFocus,primary:3085,mac:{primary:3090}}}));class We extends k{constructor(){super({id:"editorScroll",precondition:void 0,description:j.description})}runCoreEditorCommand(Re,et){const rt=j.parse(et);rt&&this._runEditorScroll(Re,et.source,rt)}_runEditorScroll(Re,et,rt){const Lt=this._computeDesiredScrollTop(Re,rt);if(rt.revealCursor){const Dt=Re.getCompletelyVisibleViewRangeAtScrollTop(Lt);Re.setCursorStates(et,3,[y.c.findPositionInViewportIfOutside(Re,Re.getPrimaryCursorState(),Dt,rt.select)])}Re.viewLayout.setScrollPosition({scrollTop:Lt},0)}_computeDesiredScrollTop(Re,et){if(et.unit===1){const Dt=Re.getCompletelyVisibleViewRange(),xt=Re.coordinatesConverter.convertViewRangeToModelRange(Dt);let Ie;et.direction===1?Ie=Math.max(1,xt.startLineNumber-et.value):Ie=Math.min(Re.model.getLineCount(),xt.startLineNumber+et.value);const dt=Re.coordinatesConverter.convertModelPositionToViewPosition(new J.y(Ie,1));return Re.viewLayout.getVerticalOffsetForLineNumber(dt.lineNumber)}if(et.unit===5){let Dt=0;return et.direction===2&&(Dt=Re.model.getLineCount()-Re.cursorConfig.pageSize),Re.viewLayout.getVerticalOffsetForLineNumber(Dt)}let rt;et.unit===3?rt=Re.cursorConfig.pageSize*et.value:et.unit===4?rt=Math.round(Re.cursorConfig.pageSize/2)*et.value:rt=et.value;const Lt=(et.direction===1?-1:1)*rt;return Re.viewLayout.getCurrentScrollTop()+Lt*Re.cursorConfig.lineHeight}}fe.EditorScrollImpl=We,fe.EditorScroll=(0,x.E_)(new We),fe.ScrollLineUp=(0,x.E_)(new class extends k{constructor(){super({id:"scrollLineUp",precondition:void 0,kbOpts:{weight:L,kbExpr:d.R.textInputFocus,primary:2064,mac:{primary:267}}})}runCoreEditorCommand(Ue,Re){fe.EditorScroll._runEditorScroll(Ue,Re.source,{direction:1,unit:2,value:1,revealCursor:!1,select:!1})}}),fe.ScrollPageUp=(0,x.E_)(new class extends k{constructor(){super({id:"scrollPageUp",precondition:void 0,kbOpts:{weight:L,kbExpr:d.R.textInputFocus,primary:2059,win:{primary:523},linux:{primary:523}}})}runCoreEditorCommand(Ue,Re){fe.EditorScroll._runEditorScroll(Ue,Re.source,{direction:1,unit:3,value:1,revealCursor:!1,select:!1})}}),fe.ScrollEditorTop=(0,x.E_)(new class extends k{constructor(){super({id:"scrollEditorTop",precondition:void 0,kbOpts:{weight:L,kbExpr:d.R.textInputFocus}})}runCoreEditorCommand(Ue,Re){fe.EditorScroll._runEditorScroll(Ue,Re.source,{direction:1,unit:5,value:1,revealCursor:!1,select:!1})}}),fe.ScrollLineDown=(0,x.E_)(new class extends k{constructor(){super({id:"scrollLineDown",precondition:void 0,kbOpts:{weight:L,kbExpr:d.R.textInputFocus,primary:2066,mac:{primary:268}}})}runCoreEditorCommand(Ue,Re){fe.EditorScroll._runEditorScroll(Ue,Re.source,{direction:2,unit:2,value:1,revealCursor:!1,select:!1})}}),fe.ScrollPageDown=(0,x.E_)(new class extends k{constructor(){super({id:"scrollPageDown",precondition:void 0,kbOpts:{weight:L,kbExpr:d.R.textInputFocus,primary:2060,win:{primary:524},linux:{primary:524}}})}runCoreEditorCommand(Ue,Re){fe.EditorScroll._runEditorScroll(Ue,Re.source,{direction:2,unit:3,value:1,revealCursor:!1,select:!1})}}),fe.ScrollEditorBottom=(0,x.E_)(new class extends k{constructor(){super({id:"scrollEditorBottom",precondition:void 0,kbOpts:{weight:L,kbExpr:d.R.textInputFocus}})}runCoreEditorCommand(Ue,Re){fe.EditorScroll._runEditorScroll(Ue,Re.source,{direction:2,unit:5,value:1,revealCursor:!1,select:!1})}});class Ke extends k{constructor(Re){super(Re),this._inSelectionMode=Re.inSelectionMode}runCoreEditorCommand(Re,et){Re.model.pushStackElement(),Re.setCursorStates(et.source,3,[y.c.word(Re,Re.getPrimaryCursorState(),this._inSelectionMode,et.position)]),Re.revealPrimaryCursor(et.source,!0)}}fe.WordSelect=(0,x.E_)(new Ke({inSelectionMode:!1,id:"_wordSelect",precondition:void 0})),fe.WordSelectDrag=(0,x.E_)(new Ke({inSelectionMode:!0,id:"_wordSelectDrag",precondition:void 0})),fe.LastCursorWordSelect=(0,x.E_)(new class extends k{constructor(){super({id:"lastCursorWordSelect",precondition:void 0})}runCoreEditorCommand(Ue,Re){const et=Ue.getLastAddedCursorIndex(),rt=Ue.getCursorStates(),Lt=rt.slice(0),Dt=rt[et];Lt[et]=y.c.word(Ue,Dt,Dt.modelState.hasSelection(),Re.position),Ue.model.pushStackElement(),Ue.setCursorStates(Re.source,3,Lt)}});class De extends k{constructor(Re){super(Re),this._inSelectionMode=Re.inSelectionMode}runCoreEditorCommand(Re,et){Re.model.pushStackElement(),Re.setCursorStates(et.source,3,[y.c.line(Re,Re.getPrimaryCursorState(),this._inSelectionMode,et.position,et.viewPosition)]),Re.revealPrimaryCursor(et.source,!1)}}fe.LineSelect=(0,x.E_)(new De({inSelectionMode:!1,id:"_lineSelect",precondition:void 0})),fe.LineSelectDrag=(0,x.E_)(new De({inSelectionMode:!0,id:"_lineSelectDrag",precondition:void 0}));class Pe extends k{constructor(Re){super(Re),this._inSelectionMode=Re.inSelectionMode}runCoreEditorCommand(Re,et){const rt=Re.getLastAddedCursorIndex(),Lt=Re.getCursorStates(),Dt=Lt.slice(0);Dt[rt]=y.c.line(Re,Lt[rt],this._inSelectionMode,et.position,et.viewPosition),Re.model.pushStackElement(),Re.setCursorStates(et.source,3,Dt)}}fe.LastCursorLineSelect=(0,x.E_)(new Pe({inSelectionMode:!1,id:"lastCursorLineSelect",precondition:void 0})),fe.LastCursorLineSelectDrag=(0,x.E_)(new Pe({inSelectionMode:!0,id:"lastCursorLineSelectDrag",precondition:void 0})),fe.CancelSelection=(0,x.E_)(new class extends k{constructor(){super({id:"cancelSelection",precondition:d.R.hasNonEmptySelection,kbOpts:{weight:L,kbExpr:d.R.textInputFocus,primary:9,secondary:[1033]}})}runCoreEditorCommand(Ue,Re){Ue.model.pushStackElement(),Ue.setCursorStates(Re.source,3,[y.c.cancelSelection(Ue,Ue.getPrimaryCursorState())]),Ue.revealPrimaryCursor(Re.source,!0)}}),fe.RemoveSecondaryCursors=(0,x.E_)(new class extends k{constructor(){super({id:"removeSecondaryCursors",precondition:d.R.hasMultipleSelections,kbOpts:{weight:L+1,kbExpr:d.R.textInputFocus,primary:9,secondary:[1033]}})}runCoreEditorCommand(Ue,Re){Ue.model.pushStackElement(),Ue.setCursorStates(Re.source,3,[Ue.getPrimaryCursorState()]),Ue.revealPrimaryCursor(Re.source,!0),(0,$.h5)(I.kg("removedCursor","Removed secondary cursors"))}}),fe.RevealLine=(0,x.E_)(new class extends k{constructor(){super({id:"revealLine",precondition:void 0,description:N.description})}runCoreEditorCommand(Ue,Re){const et=Re,rt=et.lineNumber||0;let Lt=typeof rt=="number"?rt+1:parseInt(rt)+1;Lt<1&&(Lt=1);const Dt=Ue.model.getLineCount();Lt>Dt&&(Lt=Dt);const xt=new z.Q(Lt,1,Lt,Ue.model.getLineMaxColumn(Lt));let Ie=0;if(et.at)switch(et.at){case N.RawAtArgument.Top:Ie=3;break;case N.RawAtArgument.Center:Ie=1;break;case N.RawAtArgument.Bottom:Ie=4;break;default:break}const dt=Ue.coordinatesConverter.convertModelRangeToViewRange(xt);Ue.revealRange(Re.source,!1,dt,Ie,0)}}),fe.SelectAll=new class extends B{constructor(){super(x.tc)}runDOMCommand(){h.isFirefox&&(document.activeElement.focus(),document.activeElement.select()),document.execCommand("selectAll")}runEditorCommand(Ue,Re,et){const rt=Re._getViewModel();rt&&this.runCoreEditorCommand(rt,et)}runCoreEditorCommand(Ue,Re){Ue.model.pushStackElement(),Ue.setCursorStates("keyboard",3,[y.c.selectAll(Ue,Ue.getPrimaryCursorState())])}},fe.SetSelection=(0,x.E_)(new class extends k{constructor(){super({id:"setSelection",precondition:void 0})}runCoreEditorCommand(Ue,Re){Ue.model.pushStackElement(),Ue.setCursorStates(Re.source,3,[Q.MF.fromModelSelection(Re.selection)])}})})(T||(T={}));const H=w.M$.and(d.R.textInputFocus,d.R.columnSelection);function Y(fe,oe){D.f.registerKeybindingRule({id:fe,primary:oe,when:H,weight:L+1})}Y(T.CursorColumnSelectLeft.id,1039),Y(T.CursorColumnSelectRight.id,1041),Y(T.CursorColumnSelectUp.id,1040),Y(T.CursorColumnSelectPageUp.id,1035),Y(T.CursorColumnSelectDown.id,1042),Y(T.CursorColumnSelectPageDown.id,1036);function ee(fe){return fe.register(),fe}var ce;(function(fe){class oe extends x.DX{runEditorCommand(le,se,X){const K=se._getViewModel();K&&this.runCoreEditingCommand(se,K,X||{})}}fe.CoreEditingCommand=oe,fe.LineBreakInsert=(0,x.E_)(new class extends oe{constructor(){super({id:"lineBreakInsert",precondition:d.R.writable,kbOpts:{weight:L,kbExpr:d.R.textInputFocus,primary:0,mac:{primary:301}}})}runCoreEditingCommand(Z,le,se){Z.pushUndoStop(),Z.executeCommands(this.id,C.TK.lineBreakInsert(le.cursorConfig,le.model,le.getCursorStates().map(X=>X.modelState.selection)))}}),fe.Outdent=(0,x.E_)(new class extends oe{constructor(){super({id:"outdent",precondition:d.R.writable,kbOpts:{weight:L,kbExpr:w.M$.and(d.R.editorTextFocus,d.R.tabDoesNotMoveFocus),primary:1026}})}runCoreEditingCommand(Z,le,se){Z.pushUndoStop(),Z.executeCommands(this.id,C.TK.outdent(le.cursorConfig,le.model,le.getCursorStates().map(X=>X.modelState.selection))),Z.pushUndoStop()}}),fe.Tab=(0,x.E_)(new class extends oe{constructor(){super({id:"tab",precondition:d.R.writable,kbOpts:{weight:L,kbExpr:w.M$.and(d.R.editorTextFocus,d.R.tabDoesNotMoveFocus),primary:2}})}runCoreEditingCommand(Z,le,se){Z.pushUndoStop(),Z.executeCommands(this.id,C.TK.tab(le.cursorConfig,le.model,le.getCursorStates().map(X=>X.modelState.selection))),Z.pushUndoStop()}}),fe.DeleteLeft=(0,x.E_)(new class extends oe{constructor(){super({id:"deleteLeft",precondition:void 0,kbOpts:{weight:L,kbExpr:d.R.textInputFocus,primary:1,secondary:[1025],mac:{primary:1,secondary:[1025,294,257]}}})}runCoreEditingCommand(Z,le,se){const[X,K]=_.g.deleteLeft(le.getPrevEditOperationType(),le.cursorConfig,le.model,le.getCursorStates().map(he=>he.modelState.selection),le.getCursorAutoClosedCharacters());X&&Z.pushUndoStop(),Z.executeCommands(this.id,K),le.setPrevEditOperationType(2)}}),fe.DeleteRight=(0,x.E_)(new class extends oe{constructor(){super({id:"deleteRight",precondition:void 0,kbOpts:{weight:L,kbExpr:d.R.textInputFocus,primary:20,mac:{primary:20,secondary:[290,276]}}})}runCoreEditingCommand(Z,le,se){const[X,K]=_.g.deleteRight(le.getPrevEditOperationType(),le.cursorConfig,le.model,le.getCursorStates().map(he=>he.modelState.selection));X&&Z.pushUndoStop(),Z.executeCommands(this.id,K),le.setPrevEditOperationType(3)}}),fe.Undo=new class extends B{constructor(){super(x.aU)}runDOMCommand(){document.execCommand("undo")}runEditorCommand(Z,le,se){if(!(!le.hasModel()||le.getOption(83)===!0))return le.getModel().undo()}},fe.Redo=new class extends B{constructor(){super(x.ih)}runDOMCommand(){document.execCommand("redo")}runEditorCommand(Z,le,se){if(!(!le.hasModel()||le.getOption(83)===!0))return le.getModel().redo()}}})(ce||(ce={}));class pe extends x.uB{constructor(oe,Z,le){super({id:oe,precondition:void 0,description:le}),this._handlerId=Z}runCommand(oe,Z){const le=oe.get(ie.T).getFocusedCodeEditor();le&&le.trigger("keyboard",this._handlerId,Z)}}function ge(fe,oe){ee(new pe("default:"+fe,fe)),ee(new pe(fe,fe,oe))}ge("type",{description:"Type",args:[{name:"args",schema:{type:"object",required:["text"],properties:{text:{type:"string"}}}}]}),ge("replacePreviousChar"),ge("compositionType"),ge("compositionStart"),ge("compositionEnd"),ge("paste"),ge("cut")},66638:(Tt,Fe,f)=>{f.d(Fe,{Np:()=>te,jA:()=>$,z9:()=>h});var I=f(12596);function h(x){return x&&typeof x.getEditorType=="function"?x.getEditorType()===I._.ICodeEditor:!1}function te(x){return x&&typeof x.getEditorType=="function"?x.getEditorType()===I._.IDiffEditor:!1}function $(x){return h(x)?x:te(x)?x.getModifiedEditor():null}},58574:(Tt,Fe,f)=>{f.d(Fe,{$z:()=>d,BA:()=>D,DW:()=>w,Hh:()=>J,Qn:()=>L,dO:()=>C,i_:()=>y,nz:()=>Q,wt:()=>_});var I=f(59095),h=f(10176),te=f(9715),$=f(65958),x=f(10998),ie=f(4874);class Q{constructor(B,T){this.x=B,this.y=T,this._pageCoordinatesBrand=void 0}toClientCoordinates(){return new J(this.x-I.Yx.scrollX,this.y-I.Yx.scrollY)}}class J{constructor(B,T){this.clientX=B,this.clientY=T,this._clientCoordinatesBrand=void 0}toPageCoordinates(){return new Q(this.clientX+I.Yx.scrollX,this.clientY+I.Yx.scrollY)}}class z{constructor(B,T,H,Y){this.x=B,this.y=T,this.width=H,this.height=Y,this._editorPagePositionBrand=void 0}}class S{constructor(B,T){this.x=B,this.y=T,this._positionRelativeToEditorBrand=void 0}}function _(N){const B=I.BK(N);return new z(B.left,B.top,B.width,B.height)}function y(N,B,T){const H=B.width/N.offsetWidth,Y=B.height/N.offsetHeight,ee=(T.x-B.x)/H,ce=(T.y-B.y)/Y;return new S(ee,ce)}class C extends te.P{constructor(B,T,H){super(B),this._editorMouseEventBrand=void 0,this.isFromPointerCapture=T,this.pos=new Q(this.posx,this.posy),this.editorPos=_(H),this.relativePos=y(H,this.editorPos,this.pos)}}class d{constructor(B){this._editorViewDomNode=B}_create(B){return new C(B,!1,this._editorViewDomNode)}onContextMenu(B,T){return I.ko(B,"contextmenu",H=>{T(this._create(H))})}onMouseUp(B,T){return I.ko(B,"mouseup",H=>{T(this._create(H))})}onMouseDown(B,T){return I.ko(B,I.Bx.MOUSE_DOWN,H=>{T(this._create(H))})}onPointerDown(B,T){return I.ko(B,I.Bx.POINTER_DOWN,H=>{T(this._create(H),H.pointerId)})}onMouseLeave(B,T){return I.ko(B,I.Bx.MOUSE_LEAVE,H=>{T(this._create(H))})}onMouseMove(B,T){return I.ko(B,"mousemove",H=>T(this._create(H)))}}class w{constructor(B){this._editorViewDomNode=B}_create(B){return new C(B,!1,this._editorViewDomNode)}onPointerUp(B,T){return I.ko(B,"pointerup",H=>{T(this._create(H))})}onPointerDown(B,T){return I.ko(B,I.Bx.POINTER_DOWN,H=>{T(this._create(H),H.pointerId)})}onPointerLeave(B,T){return I.ko(B,I.Bx.POINTER_LEAVE,H=>{T(this._create(H))})}onPointerMove(B,T){return I.ko(B,"pointermove",H=>T(this._create(H)))}}class D extends x.jG{constructor(B){super(),this._editorViewDomNode=B,this._globalPointerMoveMonitor=this._register(new h._),this._keydownListener=null}startMonitoring(B,T,H,Y,ee){this._keydownListener=I.b2(document,"keydown",ce=>{ce.toKeybinding().isModifierKey()||this._globalPointerMoveMonitor.stopMonitoring(!0,ce.browserEvent)},!0),this._globalPointerMoveMonitor.startMonitoring(B,T,H,ce=>{Y(new C(ce,!0,this._editorViewDomNode))},ce=>{this._keydownListener.dispose(),ee(ce)})}stopMonitoring(){this._globalPointerMoveMonitor.stopMonitoring(!0)}}class L{constructor(B){this._editor=B,this._instanceId=++L._idPool,this._counter=0,this._rules=new Map,this._garbageCollectionScheduler=new $.uC(()=>this.garbageCollect(),1e3)}createClassNameRef(B){const T=this.getOrCreateRule(B);return T.increaseRefCount(),{className:T.className,dispose:()=>{T.decreaseRefCount(),this._garbageCollectionScheduler.schedule()}}}getOrCreateRule(B){const T=this.computeUniqueKey(B);let H=this._rules.get(T);if(!H){const Y=this._counter++;H=new k(T,`dyn-rule-${this._instanceId}-${Y}`,I.Cl(this._editor.getContainerDomNode())?this._editor.getContainerDomNode():void 0,B),this._rules.set(T,H)}return H}computeUniqueKey(B){return JSON.stringify(B)}garbageCollect(){for(const B of this._rules.values())B.hasReferences()||(this._rules.delete(B.key),B.dispose())}}L._idPool=0;class k{constructor(B,T,H,Y){this.key=B,this.className=T,this.properties=Y,this._referenceCount=0,this._styleElement=I.li(H),this._styleElement.textContent=this.getCssText(this.className,this.properties)}getCssText(B,T){let H=`.${B} {`;for(const Y in T){const ee=T[Y];let ce;typeof ee=="object"?ce=`var(${(0,ie.Bbc)(ee.id)})`:ce=ee;const pe=j(Y);H+=` ${pe}: ${ce};`}return H+=` }`,H}dispose(){this._styleElement.remove()}increaseRefCount(){this._referenceCount++}decreaseRefCount(){this._referenceCount--}hasReferences(){return this._referenceCount>0}}function j(N){return N.replace(/(^[A-Z])/,([B])=>B.toLowerCase()).replace(/([A-Z])/g,([B])=>`-${B.toLowerCase()}`)}},50946:(Tt,Fe,f)=>{f.d(Fe,{DX:()=>j,E_:()=>H,Fl:()=>Y,HW:()=>pe,PF:()=>B,aU:()=>le,dS:()=>ge,fE:()=>L,gW:()=>ee,ih:()=>se,ke:()=>T,ks:()=>N,tc:()=>X,uB:()=>D,xX:()=>ce});var I=f(3765),h=f(37264),te=f(87301),$=f(15365),x=f(64830),ie=f(37042),Q=f(58067),J=f(59715),z=f(96655),S=f(82399),_=f(48421),y=f(67167),C=f(76243),d=f(79359),w=f(46441);class D{constructor(he){this.id=he.id,this.precondition=he.precondition,this._kbOpts=he.kbOpts,this._menuOpts=he.menuOpts,this._description=he.description}register(){if(Array.isArray(this._menuOpts)?this._menuOpts.forEach(this._registerMenuItem,this):this._menuOpts&&this._registerMenuItem(this._menuOpts),this._kbOpts){const he=Array.isArray(this._kbOpts)?this._kbOpts:[this._kbOpts];for(const ve of he){let Ee=ve.kbExpr;this.precondition&&(Ee?Ee=z.M$.and(Ee,this.precondition):Ee=this.precondition);const O={id:this.id,weight:ve.weight,args:ve.args,when:Ee,primary:ve.primary,secondary:ve.secondary,win:ve.win,linux:ve.linux,mac:ve.mac};_.f.registerKeybindingRule(O)}}J.wb.registerCommand({id:this.id,handler:(he,ve)=>this.runCommand(he,ve),description:this._description})}_registerMenuItem(he){Q.ZG.appendMenuItem(he.menuId,{group:he.group,command:{id:this.id,title:he.title,icon:he.icon,precondition:this.precondition},when:he.when,order:he.order})}}class L extends D{constructor(){super(...arguments),this._implementations=[]}addImplementation(he,ve,Ee){return this._implementations.push({priority:he,name:ve,implementation:Ee}),this._implementations.sort((O,ot)=>ot.priority-O.priority),{dispose:()=>{for(let O=0;O<this._implementations.length;O++)if(this._implementations[O].implementation===Ee){this._implementations.splice(O,1);return}}}}runCommand(he,ve){const Ee=he.get(w.rr);Ee.trace(`Executing Command '${this.id}' which has ${this._implementations.length} bound.`);for(const O of this._implementations){const ot=O.implementation(he,ve);if(ot)return Ee.trace(`Command '${this.id}' was handled by '${O.name}'.`),typeof ot=="boolean"?void 0:ot}Ee.trace(`The Command '${this.id}' was not handled by any implementation.`)}}class k extends D{constructor(he,ve){super(ve),this.command=he}runCommand(he,ve){return this.command.runCommand(he,ve)}}class j extends D{static bindToContribution(he){return class extends j{constructor(Ee){super(Ee),this._callback=Ee.handler}runEditorCommand(Ee,O,ot){const lt=he(O);lt&&this._callback(lt,ot)}}}runCommand(he,ve){const Ee=he.get(te.T),O=Ee.getFocusedCodeEditor()||Ee.getActiveCodeEditor();if(O)return O.invokeWithinContext(ot=>{if(ot.get(z.fN).contextMatchesRules((0,d.UH)(this.precondition)))return this.runEditorCommand(ot,O,ve)})}}class N extends j{constructor(he){super(N.convertOptions(he)),this.label=he.label,this.alias=he.alias}static convertOptions(he){let ve;Array.isArray(he.menuOpts)?ve=he.menuOpts:he.menuOpts?ve=[he.menuOpts]:ve=[];function Ee(O){return O.menuId||(O.menuId=Q.D8.EditorContext),O.title||(O.title=he.label),O.when=z.M$.and(he.precondition,O.when),O}return Array.isArray(he.contextMenuOpts)?ve.push(...he.contextMenuOpts.map(Ee)):he.contextMenuOpts&&ve.push(Ee(he.contextMenuOpts)),he.menuOpts=ve,he}runEditorCommand(he,ve,Ee){return this.reportTelemetry(he,ve),this.run(he,ve,Ee||{})}reportTelemetry(he,ve){he.get(C.k).publicLog2("editorActionInvoked",{name:this.label,id:this.id})}}class B extends N{constructor(){super(...arguments),this._implementations=[]}addImplementation(he,ve){return this._implementations.push([he,ve]),this._implementations.sort((Ee,O)=>O[0]-Ee[0]),{dispose:()=>{for(let Ee=0;Ee<this._implementations.length;Ee++)if(this._implementations[Ee][1]===ve){this._implementations.splice(Ee,1);return}}}}run(he,ve,Ee){for(const O of this._implementations){const ot=O[1](he,ve,Ee);if(ot)return typeof ot=="boolean"?void 0:ot}}}function T(K,he){J.wb.registerCommand(K,function(ve,...Ee){const O=ve.get(S._Y),[ot,lt]=Ee;(0,d.j)(h.r.isUri(ot)),(0,d.j)($.y.isIPosition(lt));const We=ve.get(x.S).getModel(ot);if(We){const Ke=$.y.lift(lt);return O.invokeFunction(he,We,Ke,...Ee.slice(2))}return ve.get(ie.b).createModelReference(ot).then(Ke=>new Promise((De,Pe)=>{try{const Ue=O.invokeFunction(he,Ke.object.textEditorModel,$.y.lift(lt),Ee.slice(2));De(Ue)}catch(Ue){Pe(Ue)}}).finally(()=>{Ke.dispose()}))})}function H(K){return oe.INSTANCE.registerEditorCommand(K),K}function Y(K){const he=new K;return oe.INSTANCE.registerEditorAction(he),he}function ee(K){return oe.INSTANCE.registerEditorAction(K),K}function ce(K){oe.INSTANCE.registerEditorAction(K)}function pe(K,he){oe.INSTANCE.registerEditorContribution(K,he)}var ge;(function(K){function he(lt){return oe.INSTANCE.getEditorCommand(lt)}K.getEditorCommand=he;function ve(){return oe.INSTANCE.getEditorActions()}K.getEditorActions=ve;function Ee(){return oe.INSTANCE.getEditorContributions()}K.getEditorContributions=Ee;function O(lt){return oe.INSTANCE.getEditorContributions().filter(We=>lt.indexOf(We.id)>=0)}K.getSomeEditorContributions=O;function ot(){return oe.INSTANCE.getDiffEditorContributions()}K.getDiffEditorContributions=ot})(ge||(ge={}));const fe={EditorCommonContributions:"editor.contributions"};class oe{constructor(){this.editorContributions=[],this.diffEditorContributions=[],this.editorActions=[],this.editorCommands=Object.create(null)}registerEditorContribution(he,ve){this.editorContributions.push({id:he,ctor:ve})}getEditorContributions(){return this.editorContributions.slice(0)}getDiffEditorContributions(){return this.diffEditorContributions.slice(0)}registerEditorAction(he){he.register(),this.editorActions.push(he)}getEditorActions(){return this.editorActions.slice(0)}registerEditorCommand(he){he.register(),this.editorCommands[he.id]=he}getEditorCommand(he){return this.editorCommands[he]||null}}oe.INSTANCE=new oe,y.O.add(fe.EditorCommonContributions,oe.INSTANCE);function Z(K){return K.register(),K}const le=Z(new L({id:"undo",precondition:void 0,kbOpts:{weight:0,primary:2104},menuOpts:[{menuId:Q.D8.MenubarEditMenu,group:"1_do",title:I.kg({key:"miUndo",comment:["&& denotes a mnemonic"]},"&&Undo"),order:1},{menuId:Q.D8.CommandPalette,group:"",title:I.kg("undo","Undo"),order:1}]}));Z(new k(le,{id:"default:undo",precondition:void 0}));const se=Z(new L({id:"redo",precondition:void 0,kbOpts:{weight:0,primary:2103,secondary:[3128],mac:{primary:3128}},menuOpts:[{menuId:Q.D8.MenubarEditMenu,group:"1_do",title:I.kg({key:"miRedo",comment:["&& denotes a mnemonic"]},"&&Redo"),order:2},{menuId:Q.D8.CommandPalette,group:"",title:I.kg("redo","Redo"),order:1}]}));Z(new k(se,{id:"default:redo",precondition:void 0}));const X=Z(new L({id:"editor.action.selectAll",precondition:void 0,kbOpts:{weight:0,kbExpr:null,primary:2079},menuOpts:[{menuId:Q.D8.MenubarSelectionMenu,group:"1_basic",title:I.kg({key:"miSelectAll",comment:["&& denotes a mnemonic"]},"&&Select All"),order:1},{menuId:Q.D8.CommandPalette,group:"",title:I.kg("selectAll","Select All"),order:1}]}))},98769:(Tt,Fe,f)=>{f.d(Fe,{cw:()=>ie,jN:()=>x,nu:()=>$});var I=f(82399),h=f(37264),te=f(79359);const $=(0,I.u1)("IWorkspaceEditService");class x{constructor(z){this.metadata=z}static convert(z){return z.edits.map(S=>{if(ie.is(S))return ie.lift(S);if(Q.is(S))return Q.lift(S);throw new Error("Unsupported edit")})}}class ie extends x{constructor(z,S,_=void 0,y){super(y),this.resource=z,this.textEdit=S,this.versionId=_}static is(z){return z instanceof ie?!0:(0,te.Gv)(z)&&h.r.isUri(z.resource)&&(0,te.Gv)(z.textEdit)}static lift(z){return z instanceof ie?z:new ie(z.resource,z.textEdit,z.versionId,z.metadata)}}class Q extends x{constructor(z,S,_={},y){super(y),this.oldResource=z,this.newResource=S,this.options=_}static is(z){return z instanceof Q?!0:(0,te.Gv)(z)&&(!!z.newResource||!!z.oldResource)}static lift(z){return z instanceof Q?z:new Q(z.oldResource,z.newResource,z.options,z.metadata)}}},87301:(Tt,Fe,f)=>{f.d(Fe,{T:()=>h});var I=f(82399);const h=(0,I.u1)("codeEditorService")},80878:(Tt,Fe,f)=>{f.d(Fe,{D:()=>I});class I{constructor(te,$,x){this._visiblePosition=te,this._visiblePositionScrollDelta=$,this._cursorPosition=x}static capture(te){let $=null,x=0;if(te.getScrollTop()!==0){const ie=te.getVisibleRanges();if(ie.length>0){$=ie[0].getStartPosition();const Q=te.getTopForPosition($.lineNumber,$.column);x=te.getScrollTop()-Q}}return new I($,x,te.getPosition())}restore(te){if(this._visiblePosition){const $=te.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);te.setScrollTop($+this._visiblePositionScrollDelta)}}restoreRelativeVerticalPositionOfCursor(te){const $=te.getPosition();if(!this._cursorPosition||!$)return;const x=te.getTopForLineNumber($.lineNumber)-te.getTopForLineNumber(this._cursorPosition.lineNumber);te.setScrollTop(te.getScrollTop()+x)}}},70651:(Tt,Fe,f)=>{f.d(Fe,{x:()=>Ua});var I=f(80886),h=f(50946),te=function(Je,n,a,g){var E=arguments.length,R=E<3?n:g===null?g=Object.getOwnPropertyDescriptor(n,a):g,ne;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(Je,n,a,g);else for(var _e=Je.length-1;_e>=0;_e--)(ne=Je[_e])&&(R=(E<3?ne(R):E>3?ne(n,a,R):ne(n,a))||R);return E>3&&R&&Object.defineProperty(n,a,R),R},$=function(Je,n){return function(a,g){n(a,g,Je)}};let x=class{constructor(n,a){}dispose(){}};x.ID="editor.contrib.markerDecorations",x=te([$(1,I.A)],x),(0,h.HW)(x.ID,x);var ie=f(30116),Q=f(3765),J=f(59095),z=f(94327),S=f(2106),_=f(10998),y=f(13072),C=f(55893),d=f(13338),w=f(71386),D=f(63339),L=f(5711),k=f(41106);class j{constructor(n,a){this.key=n,this.migrate=a}apply(n){const a=j._read(n,this.key),g=R=>j._read(n,R),E=(R,ne)=>j._write(n,R,ne);this.migrate(a,g,E)}static _read(n,a){if(typeof n>"u")return;const g=a.indexOf(".");if(g>=0){const E=a.substring(0,g);return this._read(n[E],a.substring(g+1))}return n[a]}static _write(n,a,g){const E=a.indexOf(".");if(E>=0){const R=a.substring(0,E);n[R]=n[R]||{},this._write(n[R],a.substring(E+1),g);return}n[a]=g}}j.items=[];function N(Je,n){j.items.push(new j(Je,n))}function B(Je,n){N(Je,(a,g,E)=>{if(typeof a<"u"){for(const[R,ne]of n)if(a===R){E(Je,ne);return}}})}function T(Je){j.items.forEach(n=>n.apply(Je))}B("wordWrap",[[!0,"on"],[!1,"off"]]),B("lineNumbers",[[!0,"on"],[!1,"off"]]),B("cursorBlinking",[["visible","solid"]]),B("renderWhitespace",[[!0,"boundary"],[!1,"none"]]),B("renderLineHighlight",[[!0,"line"],[!1,"none"]]),B("acceptSuggestionOnEnter",[[!0,"on"],[!1,"off"]]),B("tabCompletion",[[!1,"off"],[!0,"onlySnippets"]]),B("hover",[[!0,{enabled:!0}],[!1,{enabled:!1}]]),B("parameterHints",[[!0,{enabled:!0}],[!1,{enabled:!1}]]),B("autoIndent",[[!1,"advanced"],[!0,"full"]]),B("matchBrackets",[[!0,"always"],[!1,"never"]]),N("autoClosingBrackets",(Je,n,a)=>{Je===!1&&(a("autoClosingBrackets","never"),typeof n("autoClosingQuotes")>"u"&&a("autoClosingQuotes","never"),typeof n("autoSurround")>"u"&&a("autoSurround","never"))}),N("renderIndentGuides",(Je,n,a)=>{typeof Je<"u"&&(a("renderIndentGuides",void 0),typeof n("guides.indentation")>"u"&&a("guides.indentation",!!Je))}),N("highlightActiveIndentGuide",(Je,n,a)=>{typeof Je<"u"&&(a("highlightActiveIndentGuide",void 0),typeof n("guides.highlightActiveIndentation")>"u"&&a("guides.highlightActiveIndentation",!!Je))});const H={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"};N("suggest.filteredTypes",(Je,n,a)=>{if(Je&&typeof Je=="object"){for(const g of Object.entries(H))Je[g[0]]===!1&&typeof n(`suggest.${g[1]}`)>"u"&&a(`suggest.${g[1]}`,!1);a("suggest.filteredTypes",void 0)}}),N("quickSuggestions",(Je,n,a)=>{if(typeof Je=="boolean"){const g=Je?"on":"off";a("quickSuggestions",{comments:g,strings:g,other:g})}});var Y=f(25155),ee=f(66476),ce=f(84587),pe=f(28060),ge=f(53909),fe=function(Je,n,a,g){var E=arguments.length,R=E<3?n:g===null?g=Object.getOwnPropertyDescriptor(n,a):g,ne;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(Je,n,a,g);else for(var _e=Je.length-1;_e>=0;_e--)(ne=Je[_e])&&(R=(E<3?ne(R):E>3?ne(n,a,R):ne(n,a))||R);return E>3&&R&&Object.defineProperty(n,a,R),R},oe=function(Je,n){return function(a,g){n(a,g,Je)}};let Z=class extends _.jG{constructor(n,a,g,E){super(),this._accessibilityService=E,this._onDidChange=this._register(new S.vl),this.onDidChange=this._onDidChange.event,this._onDidChangeFast=this._register(new S.vl),this.onDidChangeFast=this._onDidChangeFast.event,this._isDominatedByLongLines=!1,this._viewLineCount=1,this._lineNumbersDigitCount=1,this._reservedHeight=0,this._computeOptionsMemory=new ee.n0,this.isSimpleWidget=n,this._containerObserver=this._register(new L.u(g,a.dimension)),this._rawOptions=ve(a),this._validatedOptions=he.validateOptions(this._rawOptions),this.options=this._computeOptions(),this.options.get(10)&&this._containerObserver.startObserving(),this._register(ce.D.onDidChangeZoomLevel(()=>this._recomputeOptions())),this._register(Y.M.onDidChangeTabFocus(()=>this._recomputeOptions())),this._register(this._containerObserver.onDidChange(()=>this._recomputeOptions())),this._register(k.T.onDidChange(()=>this._recomputeOptions())),this._register(C.PixelRatio.onDidChange(()=>this._recomputeOptions())),this._register(this._accessibilityService.onDidChangeScreenReaderOptimized(()=>this._recomputeOptions()))}_recomputeOptions(){const n=this._computeOptions(),a=he.checkEquals(this.options,n);a!==null&&(this.options=n,this._onDidChangeFast.fire(a),this._onDidChange.fire(a))}_computeOptions(){const n=this._readEnvConfiguration(),a=pe._8.createFromValidatedSettings(this._validatedOptions,n.pixelRatio,this.isSimpleWidget),g=this._readFontInfo(a),E={memory:this._computeOptionsMemory,outerWidth:n.outerWidth,outerHeight:n.outerHeight-this._reservedHeight,fontInfo:g,extraEditorClassName:n.extraEditorClassName,isDominatedByLongLines:this._isDominatedByLongLines,viewLineCount:this._viewLineCount,lineNumbersDigitCount:this._lineNumbersDigitCount,emptySelectionClipboard:n.emptySelectionClipboard,pixelRatio:n.pixelRatio,tabFocusMode:Y.M.getTabFocusMode(),accessibilitySupport:n.accessibilitySupport};return he.computeOptions(this._validatedOptions,E)}_readEnvConfiguration(){return{extraEditorClassName:se(),outerWidth:this._containerObserver.getWidth(),outerHeight:this._containerObserver.getHeight(),emptySelectionClipboard:C.isWebKit||C.isFirefox,pixelRatio:C.PixelRatio.value,accessibilitySupport:this._accessibilityService.isScreenReaderOptimized()?2:this._accessibilityService.getAccessibilitySupport()}}_readFontInfo(n){return k.T.readFontInfo(n)}getRawOptions(){return this._rawOptions}updateOptions(n){const a=ve(n);he.applyUpdate(this._rawOptions,a)&&(this._validatedOptions=he.validateOptions(this._rawOptions),this._recomputeOptions())}observeContainer(n){this._containerObserver.observe(n)}setIsDominatedByLongLines(n){this._isDominatedByLongLines!==n&&(this._isDominatedByLongLines=n,this._recomputeOptions())}setModelLineCount(n){const a=le(n);this._lineNumbersDigitCount!==a&&(this._lineNumbersDigitCount=a,this._recomputeOptions())}setViewLineCount(n){this._viewLineCount!==n&&(this._viewLineCount=n,this._recomputeOptions())}setReservedHeight(n){this._reservedHeight!==n&&(this._reservedHeight=n,this._recomputeOptions())}};Z=fe([oe(3,ge.j)],Z);function le(Je){let n=0;for(;Je;)Je=Math.floor(Je/10),n++;return n||1}function se(){let Je="";return!C.isSafari&&!C.isWebkitWebView&&(Je+="no-user-select "),C.isSafari&&(Je+="no-minimap-shadow ",Je+="enable-user-select "),D.zx&&(Je+="mac "),Je}class X{constructor(){this._values=[]}_read(n){return this._values[n]}get(n){return this._values[n]}_write(n,a){this._values[n]=a}}class K{constructor(){this._values=[]}_read(n){if(n>=this._values.length)throw new Error("Cannot read uninitialized value");return this._values[n]}get(n){return this._read(n)}_write(n,a){this._values[n]=a}}class he{static validateOptions(n){const a=new X;for(const g of ee.BE){const E=g.name==="_never_"?void 0:n[g.name];a._write(g.id,g.validate(E))}return a}static computeOptions(n,a){const g=new K;for(const E of ee.BE)g._write(E.id,E.compute(a,g,n._read(E.id)));return g}static _deepEquals(n,a){if(typeof n!="object"||typeof a!="object"||!n||!a)return n===a;if(Array.isArray(n)||Array.isArray(a))return Array.isArray(n)&&Array.isArray(a)?d.aI(n,a):!1;if(Object.keys(n).length!==Object.keys(a).length)return!1;for(const g in n)if(!he._deepEquals(n[g],a[g]))return!1;return!0}static checkEquals(n,a){const g=[];let E=!1;for(const R of ee.BE){const ne=!he._deepEquals(n._read(R.id),a._read(R.id));g[R.id]=ne,ne&&(E=!0)}return E?new ee.lw(g):null}static applyUpdate(n,a){let g=!1;for(const E of ee.BE)if(a.hasOwnProperty(E.name)){const R=E.applyUpdate(n[E.name],a[E.name]);n[E.name]=R.newValue,g=g||R.didChange}return g}}function ve(Je){const n=w.Go(Je);return T(n),n}var Ee=f(87301),O=f(93702),ot=f(5043),lt=f(30474),We=f(9715),Ke=f(65958),De=f(58574);class Pe extends _.jG{constructor(){super(),this._shouldRender=!0}shouldRender(){return this._shouldRender}forceShouldRender(){this._shouldRender=!0}setShouldRender(){this._shouldRender=!0}onDidRender(){this._shouldRender=!1}onCompositionStart(n){return!1}onCompositionEnd(n){return!1}onConfigurationChanged(n){return!1}onCursorStateChanged(n){return!1}onDecorationsChanged(n){return!1}onFlushed(n){return!1}onFocusChanged(n){return!1}onLanguageConfigurationChanged(n){return!1}onLineMappingChanged(n){return!1}onLinesChanged(n){return!1}onLinesDeleted(n){return!1}onLinesInserted(n){return!1}onRevealRangeRequest(n){return!1}onScrollChanged(n){return!1}onThemeChanged(n){return!1}onTokensChanged(n){return!1}onTokensColorsChanged(n){return!1}onZonesChanged(n){return!1}handleEvents(n){let a=!1;for(let g=0,E=n.length;g<E;g++){const R=n[g];switch(R.type){case 0:this.onCompositionStart(R)&&(a=!0);break;case 1:this.onCompositionEnd(R)&&(a=!0);break;case 2:this.onConfigurationChanged(R)&&(a=!0);break;case 3:this.onCursorStateChanged(R)&&(a=!0);break;case 4:this.onDecorationsChanged(R)&&(a=!0);break;case 5:this.onFlushed(R)&&(a=!0);break;case 6:this.onFocusChanged(R)&&(a=!0);break;case 7:this.onLanguageConfigurationChanged(R)&&(a=!0);break;case 8:this.onLineMappingChanged(R)&&(a=!0);break;case 9:this.onLinesChanged(R)&&(a=!0);break;case 10:this.onLinesDeleted(R)&&(a=!0);break;case 11:this.onLinesInserted(R)&&(a=!0);break;case 12:this.onRevealRangeRequest(R)&&(a=!0);break;case 13:this.onScrollChanged(R)&&(a=!0);break;case 15:this.onTokensChanged(R)&&(a=!0);break;case 14:this.onThemeChanged(R)&&(a=!0);break;case 16:this.onTokensColorsChanged(R)&&(a=!0);break;case 17:this.onZonesChanged(R)&&(a=!0);break;default:console.info("View received unknown event: "),console.info(R)}}a&&(this._shouldRender=!0)}}class Ue extends Pe{constructor(n){super(),this._context=n,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}}class Re{static write(n,a){n.setAttribute("data-mprt",String(a))}static read(n){const a=n.getAttribute("data-mprt");return a===null?0:parseInt(a,10)}static collect(n,a){const g=[];let E=0;for(;n&&n!==document.body&&n!==a;)n.nodeType===n.ELEMENT_NODE&&(g[E++]=this.read(n)),n=n.parentElement;const R=new Uint8Array(E);for(let ne=0;ne<E;ne++)R[ne]=g[E-ne-1];return R}}class et{constructor(n,a){this._restrictedRenderingContextBrand=void 0,this._viewLayout=n,this.viewportData=a,this.scrollWidth=this._viewLayout.getScrollWidth(),this.scrollHeight=this._viewLayout.getScrollHeight(),this.visibleRange=this.viewportData.visibleRange,this.bigNumbersDelta=this.viewportData.bigNumbersDelta;const g=this._viewLayout.getCurrentViewport();this.scrollTop=g.top,this.scrollLeft=g.left,this.viewportWidth=g.width,this.viewportHeight=g.height}getScrolledTopFromAbsoluteTop(n){return n-this.scrollTop}getVerticalOffsetForLineNumber(n){return this._viewLayout.getVerticalOffsetForLineNumber(n)}getDecorationsInViewport(){return this.viewportData.getDecorationsInViewport()}}class rt extends et{constructor(n,a,g){super(n,a),this._renderingContextBrand=void 0,this._viewLines=g}linesVisibleRangesForRange(n,a){return this._viewLines.linesVisibleRangesForRange(n,a)}visibleRangeForPosition(n){return this._viewLines.visibleRangeForPosition(n)}}class Lt{constructor(n,a,g){this.outsideRenderedLine=n,this.lineNumber=a,this.ranges=g}}class Dt{constructor(n,a){this._horizontalRangeBrand=void 0,this.left=Math.round(n),this.width=Math.round(a)}static from(n){const a=new Array(n.length);for(let g=0,E=n.length;g<E;g++){const R=n[g];a[g]=new Dt(R.left,R.width)}return a}toString(){return`[${this.left},${this.width}]`}}class xt{constructor(n,a){this._floatHorizontalRangeBrand=void 0,this.left=n,this.width=a}toString(){return`[${this.left},${this.width}]`}static compare(n,a){return n.left-a.left}}class Ie{constructor(n,a){this.outsideRenderedLine=n,this.originalLeft=a,this.left=Math.round(this.originalLeft)}}class dt{constructor(n,a){this.outsideRenderedLine=n,this.ranges=a}}class ft{static _createRange(){return this._handyReadyRange||(this._handyReadyRange=document.createRange()),this._handyReadyRange}static _detachRange(n,a){n.selectNodeContents(a)}static _readClientRects(n,a,g,E,R){const ne=this._createRange();try{return ne.setStart(n,a),ne.setEnd(g,E),ne.getClientRects()}catch{return null}finally{this._detachRange(ne,R)}}static _mergeAdjacentRanges(n){if(n.length===1)return n;n.sort(xt.compare);const a=[];let g=0,E=n[0];for(let R=1,ne=n.length;R<ne;R++){const _e=n[R];E.left+E.width+.9>=_e.left?E.width=Math.max(E.width,_e.left+_e.width-E.left):(a[g++]=E,E=_e)}return a[g++]=E,a}static _createHorizontalRangesFromClientRects(n,a,g){if(!n||n.length===0)return null;const E=[];for(let R=0,ne=n.length;R<ne;R++){const _e=n[R];E[R]=new xt(Math.max(0,(_e.left-a)/g),_e.width/g)}return this._mergeAdjacentRanges(E)}static readHorizontalRanges(n,a,g,E,R,ne,_e,Le){const Ae=n.children.length-1;if(0>Ae)return null;if(a=Math.min(Ae,Math.max(0,a)),E=Math.min(Ae,Math.max(0,E)),a===E&&g===R&&g===0&&!n.children[a].firstChild){const yt=n.children[a].getClientRects();return this._createHorizontalRangesFromClientRects(yt,ne,_e)}a!==E&&E>0&&R===0&&(E--,R=1073741824);let je=n.children[a].firstChild,Xe=n.children[E].firstChild;if((!je||!Xe)&&(!je&&g===0&&a>0&&(je=n.children[a-1].firstChild,g=1073741824),!Xe&&R===0&&E>0&&(Xe=n.children[E-1].firstChild,R=1073741824)),!je||!Xe)return null;g=Math.min(je.textContent.length,Math.max(0,g)),R=Math.min(Xe.textContent.length,Math.max(0,R));const it=this._readClientRects(je,g,Xe,R,Le);return this._createHorizontalRangesFromClientRects(it,ne,_e)}}var Bt=f(45561),jt=f(39723),pt=f(89563);const bt=function(){return D.ib?!0:!(D.j9||C.isFirefox||C.isSafari)}();let zt=!0;class ii{constructor(n,a){this._domNode=n,this._clientRectDeltaLeft=0,this._clientRectScale=1,this._clientRectRead=!1,this.endNode=a}readClientRect(){if(!this._clientRectRead){this._clientRectRead=!0;const n=this._domNode.getBoundingClientRect();this._clientRectDeltaLeft=n.left,this._clientRectScale=n.width/this._domNode.offsetWidth}}get clientRectDeltaLeft(){return this._clientRectRead||this.readClientRect(),this._clientRectDeltaLeft}get clientRectScale(){return this._clientRectRead||this.readClientRect(),this._clientRectScale}}class vi{constructor(n,a){this.themeType=a;const g=n.options,E=g.get(46);this.renderWhitespace=g.get(90),this.renderControlCharacters=g.get(85),this.spaceWidth=E.spaceWidth,this.middotWidth=E.middotWidth,this.wsmiddotWidth=E.wsmiddotWidth,this.useMonospaceOptimizations=E.isMonospace&&!g.get(29),this.canUseHalfwidthRightwardsArrow=E.canUseHalfwidthRightwardsArrow,this.lineHeight=g.get(61),this.stopRenderingLineAfter=g.get(107),this.fontLigatures=g.get(47)}equals(n){return this.themeType===n.themeType&&this.renderWhitespace===n.renderWhitespace&&this.renderControlCharacters===n.renderControlCharacters&&this.spaceWidth===n.spaceWidth&&this.middotWidth===n.middotWidth&&this.wsmiddotWidth===n.wsmiddotWidth&&this.useMonospaceOptimizations===n.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===n.canUseHalfwidthRightwardsArrow&&this.lineHeight===n.lineHeight&&this.stopRenderingLineAfter===n.stopRenderingLineAfter&&this.fontLigatures===n.fontLigatures}}class Ze{constructor(n){this._options=n,this._isMaybeInvalid=!0,this._renderedViewLine=null}getDomNode(){return this._renderedViewLine&&this._renderedViewLine.domNode?this._renderedViewLine.domNode.domNode:null}setDomNode(n){if(this._renderedViewLine)this._renderedViewLine.domNode=(0,ot.Z)(n);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(n){this._isMaybeInvalid=!0,this._options=n}onSelectionChanged(){return(0,pt.Bb)(this._options.themeType)||this._options.renderWhitespace==="selection"?(this._isMaybeInvalid=!0,!0):!1}renderLine(n,a,g,E){if(this._isMaybeInvalid===!1)return!1;this._isMaybeInvalid=!1;const R=g.getViewLineRenderingData(n),ne=this._options,_e=Bt.d.filter(R.inlineDecorations,n,R.minColumn,R.maxColumn);let Le=null;if((0,pt.Bb)(ne.themeType)||this._options.renderWhitespace==="selection"){const Xe=g.selections;for(const it of Xe){if(it.endLineNumber<n||it.startLineNumber>n)continue;const yt=it.startLineNumber===n?it.startColumn:R.minColumn,Nt=it.endLineNumber===n?it.endColumn:R.maxColumn;yt<Nt&&((0,pt.Bb)(ne.themeType)||this._options.renderWhitespace!=="selection"?_e.push(new Bt.d(yt,Nt,"inline-selected-text",0)):(Le||(Le=[]),Le.push(new jt.MT(yt-1,Nt-1))))}}const ke=new jt.zL(ne.useMonospaceOptimizations,ne.canUseHalfwidthRightwardsArrow,R.content,R.continuesWithWrappedLine,R.isBasicASCII,R.containsRTL,R.minColumn-1,R.tokens,_e,R.tabSize,R.startVisibleColumn,ne.spaceWidth,ne.middotWidth,ne.wsmiddotWidth,ne.stopRenderingLineAfter,ne.renderWhitespace,ne.renderControlCharacters,ne.fontLigatures!==ee.Bc.OFF,Le);if(this._renderedViewLine&&this._renderedViewLine.input.equals(ke))return!1;E.appendASCIIString('<div style="top:'),E.appendASCIIString(String(a)),E.appendASCIIString("px;height:"),E.appendASCIIString(String(this._options.lineHeight)),E.appendASCIIString('px;" class="'),E.appendASCIIString(Ze.CLASS_NAME),E.appendASCIIString('">');const Ae=(0,jt.UW)(ke,E);E.appendASCIIString("</div>");let je=null;return zt&&bt&&R.isBasicASCII&&ne.useMonospaceOptimizations&&Ae.containsForeignElements===0&&R.content.length<300&&ke.lineTokens.getCount()<100&&(je=new _t(this._renderedViewLine?this._renderedViewLine.domNode:null,ke,Ae.characterMapping)),je||(je=oi(this._renderedViewLine?this._renderedViewLine.domNode:null,ke,Ae.characterMapping,Ae.containsRTL,Ae.containsForeignElements)),this._renderedViewLine=je,!0}layoutLine(n,a){this._renderedViewLine&&this._renderedViewLine.domNode&&(this._renderedViewLine.domNode.setTop(a),this._renderedViewLine.domNode.setHeight(this._options.lineHeight))}getWidth(){return this._renderedViewLine?this._renderedViewLine.getWidth():0}getWidthIsFast(){return this._renderedViewLine?this._renderedViewLine.getWidthIsFast():!0}needsMonospaceFontCheck(){return this._renderedViewLine?this._renderedViewLine instanceof _t:!1}monospaceAssumptionsAreValid(){return this._renderedViewLine&&this._renderedViewLine instanceof _t?this._renderedViewLine.monospaceAssumptionsAreValid():zt}onMonospaceAssumptionsInvalidated(){this._renderedViewLine&&this._renderedViewLine instanceof _t&&(this._renderedViewLine=this._renderedViewLine.toSlowRenderedLine())}getVisibleRangesForRange(n,a,g,E){if(!this._renderedViewLine)return null;a=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,a)),g=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,g));const R=this._renderedViewLine.input.stopRenderingLineAfter;let ne=!1;R!==-1&&a>R+1&&g>R+1&&(ne=!0),R!==-1&&a>R+1&&(a=R+1),R!==-1&&g>R+1&&(g=R+1);const _e=this._renderedViewLine.getVisibleRangesForRange(n,a,g,E);return _e&&_e.length>0?new dt(ne,_e):null}getColumnOfNodeOffset(n,a,g){return this._renderedViewLine?this._renderedViewLine.getColumnOfNodeOffset(n,a,g):1}}Ze.CLASS_NAME="view-line";class _t{constructor(n,a,g){this.domNode=n,this.input=a,this._characterMapping=g,this._charWidth=a.spaceWidth}getWidth(){return Math.round(this._getCharPosition(this._characterMapping.length))}getWidthIsFast(){return!0}monospaceAssumptionsAreValid(){if(!this.domNode)return zt;const n=this.getWidth(),a=this.domNode.domNode.firstChild.offsetWidth;return Math.abs(n-a)>=2&&(console.warn("monospace assumptions have been violated, therefore disabling monospace optimizations!"),zt=!1),zt}toSlowRenderedLine(){return oi(this.domNode,this.input,this._characterMapping,!1,0)}getVisibleRangesForRange(n,a,g,E){const R=this._getCharPosition(a),ne=this._getCharPosition(g);return[new xt(R,ne-R)]}_getCharPosition(n){const a=this._characterMapping.getHorizontalOffset(n);return this._charWidth*a}getColumnOfNodeOffset(n,a,g){const E=a.textContent.length;let R=-1;for(;a;)a=a.previousSibling,R++;return this._characterMapping.getColumn(new jt.wZ(R,g),E)}}class At{constructor(n,a,g,E,R){if(this.domNode=n,this.input=a,this._characterMapping=g,this._isWhitespaceOnly=/^\s*$/.test(a.lineContent),this._containsForeignElements=R,this._cachedWidth=-1,this._pixelOffsetCache=null,!E||this._characterMapping.length===0){this._pixelOffsetCache=new Float32Array(Math.max(2,this._characterMapping.length+1));for(let ne=0,_e=this._characterMapping.length;ne<=_e;ne++)this._pixelOffsetCache[ne]=-1}}_getReadingTarget(n){return n.domNode.firstChild}getWidth(){return this.domNode?(this._cachedWidth===-1&&(this._cachedWidth=this._getReadingTarget(this.domNode).offsetWidth),this._cachedWidth):0}getWidthIsFast(){return this._cachedWidth!==-1}getVisibleRangesForRange(n,a,g,E){if(!this.domNode)return null;if(this._pixelOffsetCache!==null){const R=this._readPixelOffset(this.domNode,n,a,E);if(R===-1)return null;const ne=this._readPixelOffset(this.domNode,n,g,E);return ne===-1?null:[new xt(R,ne-R)]}return this._readVisibleRangesForRange(this.domNode,n,a,g,E)}_readVisibleRangesForRange(n,a,g,E,R){if(g===E){const ne=this._readPixelOffset(n,a,g,R);return ne===-1?null:[new xt(ne,0)]}else return this._readRawVisibleRangesForRange(n,g,E,R)}_readPixelOffset(n,a,g,E){if(this._characterMapping.length===0){if(this._containsForeignElements===0||this._containsForeignElements===2)return 0;if(this._containsForeignElements===1)return this.getWidth();const R=this._getReadingTarget(n);return R.firstChild?R.firstChild.offsetWidth:0}if(this._pixelOffsetCache!==null){const R=this._pixelOffsetCache[g];if(R!==-1)return R;const ne=this._actualReadPixelOffset(n,a,g,E);return this._pixelOffsetCache[g]=ne,ne}return this._actualReadPixelOffset(n,a,g,E)}_actualReadPixelOffset(n,a,g,E){if(this._characterMapping.length===0){const Le=ft.readHorizontalRanges(this._getReadingTarget(n),0,0,0,0,E.clientRectDeltaLeft,E.clientRectScale,E.endNode);return!Le||Le.length===0?-1:Le[0].left}if(g===this._characterMapping.length&&this._isWhitespaceOnly&&this._containsForeignElements===0)return this.getWidth();const R=this._characterMapping.getDomPosition(g),ne=ft.readHorizontalRanges(this._getReadingTarget(n),R.partIndex,R.charIndex,R.partIndex,R.charIndex,E.clientRectDeltaLeft,E.clientRectScale,E.endNode);if(!ne||ne.length===0)return-1;const _e=ne[0].left;if(this.input.isBasicASCII){const Le=this._characterMapping.getHorizontalOffset(g),ke=Math.round(this.input.spaceWidth*Le);if(Math.abs(ke-_e)<=1)return ke}return _e}_readRawVisibleRangesForRange(n,a,g,E){if(a===1&&g===this._characterMapping.length)return[new xt(0,this.getWidth())];const R=this._characterMapping.getDomPosition(a),ne=this._characterMapping.getDomPosition(g);return ft.readHorizontalRanges(this._getReadingTarget(n),R.partIndex,R.charIndex,ne.partIndex,ne.charIndex,E.clientRectDeltaLeft,E.clientRectScale,E.endNode)}getColumnOfNodeOffset(n,a,g){const E=a.textContent.length;let R=-1;for(;a;)a=a.previousSibling,R++;return this._characterMapping.getColumn(new jt.wZ(R,g),E)}}class ei extends At{_readVisibleRangesForRange(n,a,g,E,R){const ne=super._readVisibleRangesForRange(n,a,g,E,R);if(!ne||ne.length===0||g===E||g===1&&E===this._characterMapping.length)return ne;if(!this.input.containsRTL){const _e=this._readPixelOffset(n,a,E,R);if(_e!==-1){const Le=ne[ne.length-1];Le.left<_e&&(Le.width=_e-Le.left)}}return ne}}const oi=function(){return C.isWebKit?Li:zi}();function Li(Je,n,a,g,E){return new ei(Je,n,a,g,E)}function zi(Je,n,a,g,E){return new At(Je,n,a,g,E)}var Di=f(15365),Te=f(28061),ki=f(62549),ze=f(71937);class we{constructor(n=null){this.hitTarget=n,this.type=0}}class ct{constructor(n,a,g){this.position=n,this.spanNode=a,this.injectedText=g,this.type=1}}var Oe;(function(Je){function n(a,g,E){const R=a.getPositionFromDOMInfo(g,E);return R?new ct(R,g,null):new we(g)}Je.createFromDOMInfo=n})(Oe||(Oe={}));class ut{constructor(n,a){this.lastViewCursorsRenderData=n,this.lastTextareaPosition=a}}class Zt{static _deduceRage(n,a=null){return!a&&n?new Te.Q(n.lineNumber,n.column,n.lineNumber,n.column):a??null}static createUnknown(n,a,g){return{type:0,element:n,mouseColumn:a,position:g,range:this._deduceRage(g)}}static createTextarea(n,a){return{type:1,element:n,mouseColumn:a,position:null,range:null}}static createMargin(n,a,g,E,R,ne){return{type:n,element:a,mouseColumn:g,position:E,range:R,detail:ne}}static createViewZone(n,a,g,E,R){return{type:n,element:a,mouseColumn:g,position:E,range:this._deduceRage(E),detail:R}}static createContentText(n,a,g,E,R){return{type:6,element:n,mouseColumn:a,position:g,range:this._deduceRage(g,E),detail:R}}static createContentEmpty(n,a,g,E){return{type:7,element:n,mouseColumn:a,position:g,range:this._deduceRage(g),detail:E}}static createContentWidget(n,a,g){return{type:9,element:n,mouseColumn:a,position:null,range:null,detail:g}}static createScrollbar(n,a,g){return{type:11,element:n,mouseColumn:a,position:g,range:this._deduceRage(g)}}static createOverlayWidget(n,a,g){return{type:12,element:n,mouseColumn:a,position:null,range:null,detail:g}}static createOutsideEditor(n,a){return{type:13,element:null,mouseColumn:n,position:a,range:this._deduceRage(a)}}static _typeToString(n){return n===1?"TEXTAREA":n===2?"GUTTER_GLYPH_MARGIN":n===3?"GUTTER_LINE_NUMBERS":n===4?"GUTTER_LINE_DECORATIONS":n===5?"GUTTER_VIEW_ZONE":n===6?"CONTENT_TEXT":n===7?"CONTENT_EMPTY":n===8?"CONTENT_VIEW_ZONE":n===9?"CONTENT_WIDGET":n===10?"OVERVIEW_RULER":n===11?"SCROLLBAR":n===12?"OVERLAY_WIDGET":"UNKNOWN"}static toString(n){return this._typeToString(n.type)+": "+n.position+" - "+n.range+" - "+JSON.stringify(n.detail)}}class Ci{static isTextArea(n){return n.length===2&&n[0]===3&&n[1]===6}static isChildOfViewLines(n){return n.length>=4&&n[0]===3&&n[3]===7}static isStrictChildOfViewLines(n){return n.length>4&&n[0]===3&&n[3]===7}static isChildOfScrollableElement(n){return n.length>=2&&n[0]===3&&n[1]===5}static isChildOfMinimap(n){return n.length>=2&&n[0]===3&&n[1]===8}static isChildOfContentWidgets(n){return n.length>=4&&n[0]===3&&n[3]===1}static isChildOfOverflowingContentWidgets(n){return n.length>=1&&n[0]===2}static isChildOfOverlayWidgets(n){return n.length>=2&&n[0]===3&&n[1]===4}}class Ki{constructor(n,a,g){this.viewModel=n.viewModel;const E=n.configuration.options;this.layoutInfo=E.get(133),this.viewDomNode=a.viewDomNode,this.lineHeight=E.get(61),this.stickyTabStops=E.get(106),this.typicalHalfwidthCharacterWidth=E.get(46).typicalHalfwidthCharacterWidth,this.lastRenderData=g,this._context=n,this._viewHelper=a}getZoneAtCoord(n){return Ki.getZoneAtCoord(this._context,n)}static getZoneAtCoord(n,a){const g=n.viewLayout.getWhitespaceAtVerticalOffset(a);if(g){const E=g.verticalOffset+g.height/2,R=n.viewModel.getLineCount();let ne=null,_e,Le=null;return g.afterLineNumber!==R&&(Le=new Di.y(g.afterLineNumber+1,1)),g.afterLineNumber>0&&(ne=new Di.y(g.afterLineNumber,n.viewModel.getLineMaxColumn(g.afterLineNumber))),Le===null?_e=ne:ne===null?_e=Le:a<E?_e=ne:_e=Le,{viewZoneId:g.id,afterLineNumber:g.afterLineNumber,positionBefore:ne,positionAfter:Le,position:_e}}return null}getFullLineRangeAtCoord(n){if(this._context.viewLayout.isAfterLines(n)){const E=this._context.viewModel.getLineCount(),R=this._context.viewModel.getLineMaxColumn(E);return{range:new Te.Q(E,R,E,R),isAfterLines:!0}}const a=this._context.viewLayout.getLineNumberAtVerticalOffset(n),g=this._context.viewModel.getLineMaxColumn(a);return{range:new Te.Q(a,1,a,g),isAfterLines:!1}}getLineNumberAtVerticalOffset(n){return this._context.viewLayout.getLineNumberAtVerticalOffset(n)}isAfterLines(n){return this._context.viewLayout.isAfterLines(n)}isInTopPadding(n){return this._context.viewLayout.isInTopPadding(n)}isInBottomPadding(n){return this._context.viewLayout.isInBottomPadding(n)}getVerticalOffsetForLineNumber(n){return this._context.viewLayout.getVerticalOffsetForLineNumber(n)}findAttribute(n,a){return Ki._findAttribute(n,a,this._viewHelper.viewDomNode)}static _findAttribute(n,a,g){for(;n&&n!==document.body;){if(n.hasAttribute&&n.hasAttribute(a))return n.getAttribute(a);if(n===g)return null;n=n.parentNode}return null}getLineWidth(n){return this._viewHelper.getLineWidth(n)}visibleRangeForPosition(n,a){return this._viewHelper.visibleRangeForPosition(n,a)}getPositionFromDOMInfo(n,a){return this._viewHelper.getPositionFromDOMInfo(n,a)}getCurrentScrollTop(){return this._context.viewLayout.getCurrentScrollTop()}getCurrentScrollLeft(){return this._context.viewLayout.getCurrentScrollLeft()}}class Ln{constructor(n,a,g,E){this.editorPos=a,this.pos=g,this.relativePos=E,this.mouseVerticalOffset=Math.max(0,n.getCurrentScrollTop()+this.relativePos.y),this.mouseContentHorizontalOffset=n.getCurrentScrollLeft()+this.relativePos.x-n.layoutInfo.contentLeft,this.isInMarginArea=this.relativePos.x<n.layoutInfo.contentLeft&&this.relativePos.x>=n.layoutInfo.glyphMarginLeft,this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,Ot._getMouseColumn(this.mouseContentHorizontalOffset,n.typicalHalfwidthCharacterWidth))}}class nt extends Ln{constructor(n,a,g,E,R){super(n,a,g,E),this._ctx=n,R?(this.target=R,this.targetPath=Re.collect(R,n.viewDomNode)):(this.target=null,this.targetPath=new Uint8Array(0))}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}`}_getMouseColumn(n=null){return n&&n.column<this._ctx.viewModel.getLineMaxColumn(n.lineNumber)?ki.A.visibleColumnFromColumn(this._ctx.viewModel.getLineContent(n.lineNumber),n.column,this._ctx.viewModel.model.getOptions().tabSize)+1:this.mouseColumn}fulfillUnknown(n=null){return Zt.createUnknown(this.target,this._getMouseColumn(n),n)}fulfillTextarea(){return Zt.createTextarea(this.target,this._getMouseColumn())}fulfillMargin(n,a,g,E){return Zt.createMargin(n,this.target,this._getMouseColumn(a),a,g,E)}fulfillViewZone(n,a,g){return Zt.createViewZone(n,this.target,this._getMouseColumn(a),a,g)}fulfillContentText(n,a,g){return Zt.createContentText(this.target,this._getMouseColumn(n),n,a,g)}fulfillContentEmpty(n,a){return Zt.createContentEmpty(this.target,this._getMouseColumn(n),n,a)}fulfillContentWidget(n){return Zt.createContentWidget(this.target,this._getMouseColumn(),n)}fulfillScrollbar(n){return Zt.createScrollbar(this.target,this._getMouseColumn(n),n)}fulfillOverlayWidget(n){return Zt.createOverlayWidget(this.target,this._getMouseColumn(),n)}withTarget(n){return new nt(this._ctx,this.editorPos,this.pos,this.relativePos,n)}}const Ct={isAfterLines:!0};function Qt(Je){return{isAfterLines:!1,horizontalDistanceToText:Je}}class Ot{constructor(n,a){this._context=n,this._viewHelper=a}mouseTargetIsWidget(n){const a=n.target,g=Re.collect(a,this._viewHelper.viewDomNode);return!!(Ci.isChildOfContentWidgets(g)||Ci.isChildOfOverflowingContentWidgets(g)||Ci.isChildOfOverlayWidgets(g))}createMouseTarget(n,a,g,E,R){const ne=new Ki(this._context,this._viewHelper,n),_e=new nt(ne,a,g,E,R);try{return Ot._createMouseTarget(ne,_e,!1)}catch{return _e.fulfillUnknown()}}static _createMouseTarget(n,a,g){if(a.target===null){if(g)return a.fulfillUnknown();const ne=Ot._doHitTest(n,a);return ne.type===1?Ot.createMouseTargetFromHitTestPosition(n,a,ne.spanNode,ne.position,ne.injectedText):this._createMouseTarget(n,a.withTarget(ne.hitTarget),!0)}const E=a;let R=null;return R=R||Ot._hitTestContentWidget(n,E),R=R||Ot._hitTestOverlayWidget(n,E),R=R||Ot._hitTestMinimap(n,E),R=R||Ot._hitTestScrollbarSlider(n,E),R=R||Ot._hitTestViewZone(n,E),R=R||Ot._hitTestMargin(n,E),R=R||Ot._hitTestViewCursor(n,E),R=R||Ot._hitTestTextArea(n,E),R=R||Ot._hitTestViewLines(n,E,g),R=R||Ot._hitTestScrollbar(n,E),R||a.fulfillUnknown()}static _hitTestContentWidget(n,a){if(Ci.isChildOfContentWidgets(a.targetPath)||Ci.isChildOfOverflowingContentWidgets(a.targetPath)){const g=n.findAttribute(a.target,"widgetId");return g?a.fulfillContentWidget(g):a.fulfillUnknown()}return null}static _hitTestOverlayWidget(n,a){if(Ci.isChildOfOverlayWidgets(a.targetPath)){const g=n.findAttribute(a.target,"widgetId");return g?a.fulfillOverlayWidget(g):a.fulfillUnknown()}return null}static _hitTestViewCursor(n,a){if(a.target){const g=n.lastRenderData.lastViewCursorsRenderData;for(const E of g)if(a.target===E.domNode)return a.fulfillContentText(E.position,null,{mightBeForeignElement:!1,injectedText:null})}if(a.isInContentArea){const g=n.lastRenderData.lastViewCursorsRenderData,E=a.mouseContentHorizontalOffset,R=a.mouseVerticalOffset;for(const ne of g){if(E<ne.contentLeft||E>ne.contentLeft+ne.width)continue;const _e=n.getVerticalOffsetForLineNumber(ne.position.lineNumber);if(_e<=R&&R<=_e+ne.height)return a.fulfillContentText(ne.position,null,{mightBeForeignElement:!1,injectedText:null})}}return null}static _hitTestViewZone(n,a){const g=n.getZoneAtCoord(a.mouseVerticalOffset);if(g){const E=a.isInContentArea?8:5;return a.fulfillViewZone(E,g.position,g)}return null}static _hitTestTextArea(n,a){return Ci.isTextArea(a.targetPath)?n.lastRenderData.lastTextareaPosition?a.fulfillContentText(n.lastRenderData.lastTextareaPosition,null,{mightBeForeignElement:!1,injectedText:null}):a.fulfillTextarea():null}static _hitTestMargin(n,a){if(a.isInMarginArea){const g=n.getFullLineRangeAtCoord(a.mouseVerticalOffset),E=g.range.getStartPosition();let R=Math.abs(a.relativePos.x);const ne={isAfterLines:g.isAfterLines,glyphMarginLeft:n.layoutInfo.glyphMarginLeft,glyphMarginWidth:n.layoutInfo.glyphMarginWidth,lineNumbersWidth:n.layoutInfo.lineNumbersWidth,offsetX:R};return R-=n.layoutInfo.glyphMarginLeft,R<=n.layoutInfo.glyphMarginWidth?a.fulfillMargin(2,E,g.range,ne):(R-=n.layoutInfo.glyphMarginWidth,R<=n.layoutInfo.lineNumbersWidth?a.fulfillMargin(3,E,g.range,ne):(R-=n.layoutInfo.lineNumbersWidth,a.fulfillMargin(4,E,g.range,ne)))}return null}static _hitTestViewLines(n,a,g){if(!Ci.isChildOfViewLines(a.targetPath))return null;if(n.isInTopPadding(a.mouseVerticalOffset))return a.fulfillContentEmpty(new Di.y(1,1),Ct);if(n.isAfterLines(a.mouseVerticalOffset)||n.isInBottomPadding(a.mouseVerticalOffset)){const R=n.viewModel.getLineCount(),ne=n.viewModel.getLineMaxColumn(R);return a.fulfillContentEmpty(new Di.y(R,ne),Ct)}if(g){if(Ci.isStrictChildOfViewLines(a.targetPath)){const R=n.getLineNumberAtVerticalOffset(a.mouseVerticalOffset);if(n.viewModel.getLineLength(R)===0){const _e=n.getLineWidth(R),Le=Qt(a.mouseContentHorizontalOffset-_e);return a.fulfillContentEmpty(new Di.y(R,1),Le)}const ne=n.getLineWidth(R);if(a.mouseContentHorizontalOffset>=ne){const _e=Qt(a.mouseContentHorizontalOffset-ne),Le=new Di.y(R,n.viewModel.getLineMaxColumn(R));return a.fulfillContentEmpty(Le,_e)}}return a.fulfillUnknown()}const E=Ot._doHitTest(n,a);return E.type===1?Ot.createMouseTargetFromHitTestPosition(n,a,E.spanNode,E.position,E.injectedText):this._createMouseTarget(n,a.withTarget(E.hitTarget),!0)}static _hitTestMinimap(n,a){if(Ci.isChildOfMinimap(a.targetPath)){const g=n.getLineNumberAtVerticalOffset(a.mouseVerticalOffset),E=n.viewModel.getLineMaxColumn(g);return a.fulfillScrollbar(new Di.y(g,E))}return null}static _hitTestScrollbarSlider(n,a){if(Ci.isChildOfScrollableElement(a.targetPath)&&a.target&&a.target.nodeType===1){const g=a.target.className;if(g&&/\b(slider|scrollbar)\b/.test(g)){const E=n.getLineNumberAtVerticalOffset(a.mouseVerticalOffset),R=n.viewModel.getLineMaxColumn(E);return a.fulfillScrollbar(new Di.y(E,R))}}return null}static _hitTestScrollbar(n,a){if(Ci.isChildOfScrollableElement(a.targetPath)){const g=n.getLineNumberAtVerticalOffset(a.mouseVerticalOffset),E=n.viewModel.getLineMaxColumn(g);return a.fulfillScrollbar(new Di.y(g,E))}return null}getMouseColumn(n){const a=this._context.configuration.options,g=a.get(133),E=this._context.viewLayout.getCurrentScrollLeft()+n.x-g.contentLeft;return Ot._getMouseColumn(E,a.get(46).typicalHalfwidthCharacterWidth)}static _getMouseColumn(n,a){return n<0?1:Math.round(n/a)+1}static createMouseTargetFromHitTestPosition(n,a,g,E,R){const ne=E.lineNumber,_e=E.column,Le=n.getLineWidth(ne);if(a.mouseContentHorizontalOffset>Le){const Ft=Qt(a.mouseContentHorizontalOffset-Le);return a.fulfillContentEmpty(E,Ft)}const ke=n.visibleRangeForPosition(ne,_e);if(!ke)return a.fulfillUnknown(E);const Ae=ke.left;if(a.mouseContentHorizontalOffset===Ae)return a.fulfillContentText(E,null,{mightBeForeignElement:!!R,injectedText:R});const je=[];if(je.push({offset:ke.left,column:_e}),_e>1){const Ft=n.visibleRangeForPosition(ne,_e-1);Ft&&je.push({offset:Ft.left,column:_e-1})}const Xe=n.viewModel.getLineMaxColumn(ne);if(_e<Xe){const Ft=n.visibleRangeForPosition(ne,_e+1);Ft&&je.push({offset:Ft.left,column:_e+1})}je.sort((Ft,Ut)=>Ft.offset-Ut.offset);const it=a.pos.toClientCoordinates(),yt=g.getBoundingClientRect(),Nt=yt.left<=it.clientX&&it.clientX<=yt.right;for(let Ft=1;Ft<je.length;Ft++){const Ut=je[Ft-1],ui=je[Ft];if(Ut.offset<=a.mouseContentHorizontalOffset&&a.mouseContentHorizontalOffset<=ui.offset){const qt=new Te.Q(ne,Ut.column,ne,ui.column),ji=Math.abs(Ut.offset-a.mouseContentHorizontalOffset),li=Math.abs(ui.offset-a.mouseContentHorizontalOffset),en=ji<li?new Di.y(ne,Ut.column):new Di.y(ne,ui.column);return a.fulfillContentText(en,qt,{mightBeForeignElement:!Nt||!!R,injectedText:R})}}return a.fulfillContentText(E,null,{mightBeForeignElement:!Nt||!!R,injectedText:R})}static _doHitTestWithCaretRangeFromPoint(n,a){const g=n.getLineNumberAtVerticalOffset(a.mouseVerticalOffset),R=n.getVerticalOffsetForLineNumber(g)+Math.floor(n.lineHeight/2);let ne=a.pos.y+(R-a.mouseVerticalOffset);ne<=a.editorPos.y&&(ne=a.editorPos.y+1),ne>=a.editorPos.y+a.editorPos.height&&(ne=a.editorPos.y+a.editorPos.height-1);const _e=new De.nz(a.pos.x,ne),Le=this._actualDoHitTestWithCaretRangeFromPoint(n,_e.toClientCoordinates());return Le.type===1?Le:this._actualDoHitTestWithCaretRangeFromPoint(n,a.pos.toClientCoordinates())}static _actualDoHitTestWithCaretRangeFromPoint(n,a){const g=J.jG(n.viewDomNode);let E;if(g?typeof g.caretRangeFromPoint>"u"?E=at(g,a.clientX,a.clientY):E=g.caretRangeFromPoint(a.clientX,a.clientY):E=document.caretRangeFromPoint(a.clientX,a.clientY),!E||!E.startContainer)return new we;const R=E.startContainer;if(R.nodeType===R.TEXT_NODE){const ne=R.parentNode,_e=ne?ne.parentNode:null,Le=_e?_e.parentNode:null;return(Le&&Le.nodeType===Le.ELEMENT_NODE?Le.className:null)===Ze.CLASS_NAME?Oe.createFromDOMInfo(n,ne,E.startOffset):new we(R.parentNode)}else if(R.nodeType===R.ELEMENT_NODE){const ne=R.parentNode,_e=ne?ne.parentNode:null;return(_e&&_e.nodeType===_e.ELEMENT_NODE?_e.className:null)===Ze.CLASS_NAME?Oe.createFromDOMInfo(n,R,R.textContent.length):new we(R)}return new we}static _doHitTestWithCaretPositionFromPoint(n,a){const g=document.caretPositionFromPoint(a.clientX,a.clientY);if(g.offsetNode.nodeType===g.offsetNode.TEXT_NODE){const E=g.offsetNode.parentNode,R=E?E.parentNode:null,ne=R?R.parentNode:null;return(ne&&ne.nodeType===ne.ELEMENT_NODE?ne.className:null)===Ze.CLASS_NAME?Oe.createFromDOMInfo(n,g.offsetNode.parentNode,g.offset):new we(g.offsetNode.parentNode)}if(g.offsetNode.nodeType===g.offsetNode.ELEMENT_NODE){const E=g.offsetNode.parentNode,R=E&&E.nodeType===E.ELEMENT_NODE?E.className:null,ne=E?E.parentNode:null,_e=ne&&ne.nodeType===ne.ELEMENT_NODE?ne.className:null;if(R===Ze.CLASS_NAME){const Le=g.offsetNode.childNodes[Math.min(g.offset,g.offsetNode.childNodes.length-1)];if(Le)return Oe.createFromDOMInfo(n,Le,0)}else if(_e===Ze.CLASS_NAME)return Oe.createFromDOMInfo(n,g.offsetNode,0)}return new we(g.offsetNode)}static _snapToSoftTabBoundary(n,a){const g=a.getLineContent(n.lineNumber),{tabSize:E}=a.model.getOptions(),R=ze.s.atomicPosition(g,n.column-1,E,2);return R!==-1?new Di.y(n.lineNumber,R+1):n}static _doHitTest(n,a){let g=new we;if(typeof document.caretRangeFromPoint=="function"?g=this._doHitTestWithCaretRangeFromPoint(n,a):document.caretPositionFromPoint&&(g=this._doHitTestWithCaretPositionFromPoint(n,a.pos.toClientCoordinates())),g.type===1){const E=n.viewModel.getInjectedTextAt(g.position),R=n.viewModel.normalizePosition(g.position,2);(E||!R.equals(g.position))&&(g=new ct(R,g.spanNode,E))}return g.type===1&&n.stickyTabStops&&(g=new ct(this._snapToSoftTabBoundary(g.position,n.viewModel),g.spanNode,g.injectedText)),g}}function at(Je,n,a){const g=document.createRange();let E=Je.elementFromPoint(n,a);if(E!==null){for(;E&&E.firstChild&&E.firstChild.nodeType!==E.firstChild.TEXT_NODE&&E.lastChild&&E.lastChild.firstChild;)E=E.lastChild;const R=E.getBoundingClientRect(),ne=window.getComputedStyle(E,null).getPropertyValue("font"),_e=E.innerText;let Le=R.left,ke=0,Ae;if(n>R.left+R.width)ke=_e.length;else{const je=Yi.getInstance();for(let Xe=0;Xe<_e.length+1;Xe++){if(Ae=je.getCharWidth(_e.charAt(Xe),ne)/2,Le+=Ae,n<Le){ke=Xe;break}Le+=Ae}}g.setStart(E.firstChild,ke),g.setEnd(E.firstChild,ke)}return g}class Yi{constructor(){this._cache={},this._canvas=document.createElement("canvas")}static getInstance(){return Yi._INSTANCE||(Yi._INSTANCE=new Yi),Yi._INSTANCE}getCharWidth(n,a){const g=n+a;if(this._cache[g])return this._cache[g];const E=this._canvas.getContext("2d");E.font=a;const ne=E.measureText(n).width;return this._cache[g]=ne,ne}}Yi._INSTANCE=null;class bi extends Pe{constructor(n,a,g){super(),this._mouseLeaveMonitor=null,this._context=n,this.viewController=a,this.viewHelper=g,this.mouseTargetFactory=new Ot(this._context,g),this._mouseDownOperation=this._register(new St(this._context,this.viewController,this.viewHelper,(_e,Le)=>this._createMouseTarget(_e,Le),_e=>this._getMouseColumn(_e))),this.lastMouseLeaveTime=-1,this._height=this._context.configuration.options.get(133).height;const E=new De.$z(this.viewHelper.viewDomNode);this._register(E.onContextMenu(this.viewHelper.viewDomNode,_e=>this._onContextMenu(_e,!0))),this._register(E.onMouseMove(this.viewHelper.viewDomNode,_e=>{this._onMouseMove(_e),this._mouseLeaveMonitor||(this._mouseLeaveMonitor=J.ko(document,"mousemove",Le=>{this.viewHelper.viewDomNode.contains(Le.target)||this._onMouseLeave(new De.dO(Le,!1,this.viewHelper.viewDomNode))}))})),this._register(E.onMouseUp(this.viewHelper.viewDomNode,_e=>this._onMouseUp(_e))),this._register(E.onMouseLeave(this.viewHelper.viewDomNode,_e=>this._onMouseLeave(_e)));let R=0;this._register(E.onPointerDown(this.viewHelper.viewDomNode,(_e,Le)=>{R=Le})),this._register(J.ko(this.viewHelper.viewDomNode,J.Bx.POINTER_UP,_e=>{this._mouseDownOperation.onPointerUp()})),this._register(E.onMouseDown(this.viewHelper.viewDomNode,_e=>this._onMouseDown(_e,R)));const ne=_e=>{if(this.viewController.emitMouseWheel(_e),!this._context.configuration.options.get(70))return;const Le=new We.$(_e);if(D.zx?(_e.metaKey||_e.ctrlKey)&&!_e.shiftKey&&!_e.altKey:_e.ctrlKey&&!_e.metaKey&&!_e.shiftKey&&!_e.altKey){const Ae=ce.D.getZoomLevel(),je=Le.deltaY>0?1:-1;ce.D.setZoomLevel(Ae+je),Le.preventDefault(),Le.stopPropagation()}};this._register(J.ko(this.viewHelper.viewDomNode,J.Bx.MOUSE_WHEEL,ne,{capture:!0,passive:!1})),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._mouseLeaveMonitor&&(this._mouseLeaveMonitor.dispose(),this._mouseLeaveMonitor=null),super.dispose()}onConfigurationChanged(n){if(n.hasChanged(133)){const a=this._context.configuration.options.get(133).height;this._height!==a&&(this._height=a,this._mouseDownOperation.onHeightChanged())}return!1}onCursorStateChanged(n){return this._mouseDownOperation.onCursorStateChanged(n),!1}onFocusChanged(n){return!1}onScrollChanged(n){return this._mouseDownOperation.onScrollChanged(),!1}getTargetAtClientPoint(n,a){const E=new De.Hh(n,a).toPageCoordinates(),R=(0,De.wt)(this.viewHelper.viewDomNode);if(E.y<R.y||E.y>R.y+R.height||E.x<R.x||E.x>R.x+R.width)return null;const ne=(0,De.i_)(this.viewHelper.viewDomNode,R,E);return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),R,E,ne,null)}_createMouseTarget(n,a){let g=n.target;if(!this.viewHelper.viewDomNode.contains(g)){const E=J.jG(this.viewHelper.viewDomNode);E&&(g=E.elementsFromPoint(n.posx,n.posy).find(R=>this.viewHelper.viewDomNode.contains(R)))}return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),n.editorPos,n.pos,n.relativePos,a?g:null)}_getMouseColumn(n){return this.mouseTargetFactory.getMouseColumn(n.relativePos)}_onContextMenu(n,a){this.viewController.emitContextMenu({event:n,target:this._createMouseTarget(n,a)})}_onMouseMove(n){this.mouseTargetFactory.mouseTargetIsWidget(n)||n.preventDefault(),!(this._mouseDownOperation.isActive()||n.timestamp<this.lastMouseLeaveTime)&&this.viewController.emitMouseMove({event:n,target:this._createMouseTarget(n,!0)})}_onMouseLeave(n){this._mouseLeaveMonitor&&(this._mouseLeaveMonitor.dispose(),this._mouseLeaveMonitor=null),this.lastMouseLeaveTime=new Date().getTime(),this.viewController.emitMouseLeave({event:n,target:null})}_onMouseUp(n){this.viewController.emitMouseUp({event:n,target:this._createMouseTarget(n,!0)})}_onMouseDown(n,a){const g=this._createMouseTarget(n,!0),E=g.type===6||g.type===7,R=g.type===2||g.type===3||g.type===4,ne=g.type===3,_e=this._context.configuration.options.get(100),Le=g.type===8||g.type===5,ke=g.type===9;let Ae=n.leftButton||n.middleButton;D.zx&&n.leftButton&&n.ctrlKey&&(Ae=!1);const je=()=>{n.preventDefault(),this.viewHelper.focusTextArea()};if(Ae&&(E||ne&&_e))je(),this._mouseDownOperation.start(g.type,n,a);else if(R)n.preventDefault();else if(Le){const Xe=g.detail;Ae&&this.viewHelper.shouldSuppressMouseDownOnViewZone(Xe.viewZoneId)&&(je(),this._mouseDownOperation.start(g.type,n,a),n.preventDefault())}else ke&&this.viewHelper.shouldSuppressMouseDownOnWidget(g.detail)&&(je(),n.preventDefault());this.viewController.emitMouseDown({event:n,target:g})}}class St extends _.jG{constructor(n,a,g,E,R){super(),this._context=n,this._viewController=a,this._viewHelper=g,this._createMouseTarget=E,this._getMouseColumn=R,this._mouseMoveMonitor=this._register(new De.BA(this._viewHelper.viewDomNode)),this._onScrollTimeout=this._register(new Ke.pc),this._mouseState=new bn,this._currentSelection=new O.L(1,1,1,1),this._isActive=!1,this._lastMouseEvent=null}dispose(){super.dispose()}isActive(){return this._isActive}_onMouseDownThenMove(n){this._lastMouseEvent=n,this._mouseState.setModifiers(n);const a=this._findMousePosition(n,!1);a&&(this._mouseState.isDragAndDrop?this._viewController.emitMouseDrag({event:n,target:a}):this._dispatchMouse(a,!0))}start(n,a,g){this._lastMouseEvent=a,this._mouseState.setStartedOnLineNumbers(n===3),this._mouseState.setStartButtons(a),this._mouseState.setModifiers(a);const E=this._findMousePosition(a,!0);if(!E||!E.position)return;this._mouseState.trySetCount(a.detail,E.position),a.detail=this._mouseState.count;const R=this._context.configuration.options;if(!R.get(83)&&R.get(31)&&!R.get(18)&&!this._mouseState.altKey&&a.detail<2&&!this._isActive&&!this._currentSelection.isEmpty()&&E.type===6&&E.position&&this._currentSelection.containsPosition(E.position)){this._mouseState.isDragAndDrop=!0,this._isActive=!0,this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,g,a.buttons,ne=>this._onMouseDownThenMove(ne),ne=>{const _e=this._findMousePosition(this._lastMouseEvent,!1);ne&&ne instanceof KeyboardEvent?this._viewController.emitMouseDropCanceled():this._viewController.emitMouseDrop({event:this._lastMouseEvent,target:_e?this._createMouseTarget(this._lastMouseEvent,!0):null}),this._stop()});return}this._mouseState.isDragAndDrop=!1,this._dispatchMouse(E,a.shiftKey),this._isActive||(this._isActive=!0,this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,g,a.buttons,ne=>this._onMouseDownThenMove(ne),()=>this._stop()))}_stop(){this._isActive=!1,this._onScrollTimeout.cancel()}onHeightChanged(){this._mouseMoveMonitor.stopMonitoring()}onPointerUp(){this._mouseMoveMonitor.stopMonitoring()}onScrollChanged(){this._isActive&&this._onScrollTimeout.setIfNotSet(()=>{if(!this._lastMouseEvent)return;const n=this._findMousePosition(this._lastMouseEvent,!1);n&&(this._mouseState.isDragAndDrop||this._dispatchMouse(n,!0))},10)}onCursorStateChanged(n){this._currentSelection=n.selections[0]}_getPositionOutsideEditor(n){const a=n.editorPos,g=this._context.viewModel,E=this._context.viewLayout,R=this._getMouseColumn(n);if(n.posy<a.y){const _e=Math.max(E.getCurrentScrollTop()-(a.y-n.posy),0),Le=Ki.getZoneAtCoord(this._context,_e);if(Le){const Ae=this._helpPositionJumpOverViewZone(Le);if(Ae)return Zt.createOutsideEditor(R,Ae)}const ke=E.getLineNumberAtVerticalOffset(_e);return Zt.createOutsideEditor(R,new Di.y(ke,1))}if(n.posy>a.y+a.height){const _e=E.getCurrentScrollTop()+n.relativePos.y,Le=Ki.getZoneAtCoord(this._context,_e);if(Le){const Ae=this._helpPositionJumpOverViewZone(Le);if(Ae)return Zt.createOutsideEditor(R,Ae)}const ke=E.getLineNumberAtVerticalOffset(_e);return Zt.createOutsideEditor(R,new Di.y(ke,g.getLineMaxColumn(ke)))}const ne=E.getLineNumberAtVerticalOffset(E.getCurrentScrollTop()+n.relativePos.y);return n.posx<a.x?Zt.createOutsideEditor(R,new Di.y(ne,1)):n.posx>a.x+a.width?Zt.createOutsideEditor(R,new Di.y(ne,g.getLineMaxColumn(ne))):null}_findMousePosition(n,a){const g=this._getPositionOutsideEditor(n);if(g)return g;const E=this._createMouseTarget(n,a);if(!E.position)return null;if(E.type===8||E.type===5){const ne=this._helpPositionJumpOverViewZone(E.detail);if(ne)return Zt.createViewZone(E.type,E.element,E.mouseColumn,ne,E.detail)}return E}_helpPositionJumpOverViewZone(n){const a=new Di.y(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),g=n.positionBefore,E=n.positionAfter;return g&&E?g.isBefore(a)?g:E:null}_dispatchMouse(n,a){n.position&&this._viewController.dispatchMouse({position:n.position,mouseColumn:n.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,inSelectionMode:a,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:n.type===6&&n.detail.injectedText!==null})}}class bn{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 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}get count(){return this._lastMouseDownCount}setModifiers(n){this._altKey=n.altKey,this._ctrlKey=n.ctrlKey,this._metaKey=n.metaKey,this._shiftKey=n.shiftKey}setStartButtons(n){this._leftButton=n.leftButton,this._middleButton=n.middleButton}setStartedOnLineNumbers(n){this._startedOnLineNumbers=n}trySetCount(n,a){const g=new Date().getTime();g-this._lastSetMouseDownCountTime>bn.CLEAR_MOUSE_DOWN_COUNT_TIME&&(n=1),this._lastSetMouseDownCountTime=g,n>this._lastMouseDownCount+1&&(n=this._lastMouseDownCount+1),this._lastMouseDownPosition&&this._lastMouseDownPosition.equals(a)?this._lastMouseDownPositionEqualCount++:this._lastMouseDownPositionEqualCount=1,this._lastMouseDownPosition=a,this._lastMouseDownCount=Math.min(n,this._lastMouseDownPositionEqualCount)}}bn.CLEAR_MOUSE_DOWN_COUNT_TIME=400;var sn=f(51577),ni=f(93344);class xe extends bi{constructor(n,a,g){super(n,a,g),this._register(lt.q.addTarget(this.viewHelper.linesContentDomNode)),this._register(J.ko(this.viewHelper.linesContentDomNode,lt.B.Tap,R=>this.onTap(R))),this._register(J.ko(this.viewHelper.linesContentDomNode,lt.B.Change,R=>this.onChange(R))),this._register(J.ko(this.viewHelper.linesContentDomNode,lt.B.Contextmenu,R=>this._onContextMenu(new De.dO(R,!1,this.viewHelper.viewDomNode),!1))),this._lastPointerType="mouse",this._register(J.ko(this.viewHelper.linesContentDomNode,"pointerdown",R=>{const ne=R.pointerType;if(ne==="mouse"){this._lastPointerType="mouse";return}else ne==="touch"?this._lastPointerType="touch":this._lastPointerType="pen"}));const E=new De.DW(this.viewHelper.viewDomNode);this._register(E.onPointerMove(this.viewHelper.viewDomNode,R=>this._onMouseMove(R))),this._register(E.onPointerUp(this.viewHelper.viewDomNode,R=>this._onMouseUp(R))),this._register(E.onPointerLeave(this.viewHelper.viewDomNode,R=>this._onMouseLeave(R))),this._register(E.onPointerDown(this.viewHelper.viewDomNode,(R,ne)=>this._onMouseDown(R,ne)))}onTap(n){if(!n.initialTarget||!this.viewHelper.linesContentDomNode.contains(n.initialTarget))return;n.preventDefault(),this.viewHelper.focusTextArea();const a=this._createMouseTarget(new De.dO(n,!1,this.viewHelper.viewDomNode),!1);a.position&&this.viewController.dispatchMouse({position:a.position,mouseColumn:a.position.column,startedOnLineNumbers:!1,mouseDownCount:n.tapCount,inSelectionMode:!1,altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1,leftButton:!1,middleButton:!1,onInjectedText:a.type===6&&a.detail.injectedText!==null})}onChange(n){this._lastPointerType==="touch"&&this._context.viewModel.viewLayout.deltaScrollNow(-n.translationX,-n.translationY)}_onMouseDown(n,a){n.browserEvent.pointerType!=="touch"&&super._onMouseDown(n,a)}}class Ce extends bi{constructor(n,a,g){super(n,a,g),this._register(lt.q.addTarget(this.viewHelper.linesContentDomNode)),this._register(J.ko(this.viewHelper.linesContentDomNode,lt.B.Tap,E=>this.onTap(E))),this._register(J.ko(this.viewHelper.linesContentDomNode,lt.B.Change,E=>this.onChange(E))),this._register(J.ko(this.viewHelper.linesContentDomNode,lt.B.Contextmenu,E=>this._onContextMenu(new De.dO(E,!1,this.viewHelper.viewDomNode),!1)))}onTap(n){n.preventDefault(),this.viewHelper.focusTextArea();const a=this._createMouseTarget(new De.dO(n,!1,this.viewHelper.viewDomNode),!1);if(a.position){const g=document.createEvent("CustomEvent");g.initEvent(ni.$D.Tap,!1,!0),this.viewHelper.dispatchTextAreaEvent(g),this.viewController.moveTo(a.position)}}onChange(n){this._context.viewModel.viewLayout.deltaScrollNow(-n.translationX,-n.translationY)}}class Ye extends _.jG{constructor(n,a,g){super(),D.un&&sn.e.pointerEvents?this.handler=this._register(new xe(n,a,g)):window.TouchEvent?this.handler=this._register(new Ce(n,a,g)):this.handler=this._register(new bi(n,a,g))}getTargetAtClientPoint(n,a){return this.handler.getTargetAtClientPoint(n,a)}}var Rt=f(95592),Vt=f(16844),Gt=f(25837),ri=f(13377),fi=f(71723);class di extends Pe{}var Jt=f(48295),ai=f(89044);class Ei extends di{constructor(n){super(),this._context=n,this._readConfig(),this._lastCursorModelPosition=new Di.y(1,1),this._lastCursorViewPosition=new Di.y(1,1),this._renderResult=null,this._activeLineNumber=1,this._context.addEventHandler(this)}_readConfig(){const n=this._context.configuration.options;this._lineHeight=n.get(61);const a=n.get(62);this._renderLineNumbers=a.renderType,this._renderCustomLineNumbers=a.renderFn,this._renderFinalNewline=n.get(86);const g=n.get(133);this._lineNumbersLeft=g.lineNumbersLeft,this._lineNumbersWidth=g.lineNumbersWidth}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(n){return this._readConfig(),!0}onCursorStateChanged(n){const a=n.selections[0].getPosition();this._lastCursorViewPosition=a,this._lastCursorModelPosition=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(a);let g=!1;return this._activeLineNumber!==a.lineNumber&&(this._activeLineNumber=a.lineNumber,g=!0),(this._renderLineNumbers===2||this._renderLineNumbers===3)&&(g=!0),g}onFlushed(n){return!0}onLinesChanged(n){return!0}onLinesDeleted(n){return!0}onLinesInserted(n){return!0}onScrollChanged(n){return n.scrollTopChanged}onZonesChanged(n){return!0}_getLineRenderLineNumber(n){const a=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new Di.y(n,1));if(a.column!==1)return"";const g=a.lineNumber;return this._renderCustomLineNumbers?this._renderCustomLineNumbers(g):this._renderLineNumbers===3?this._lastCursorModelPosition.lineNumber===g||g%10===0?String(g):"":String(g)}prepareRender(n){if(this._renderLineNumbers===0){this._renderResult=null;return}const a=D.j9?this._lineHeight%2===0?" lh-even":" lh-odd":"",g=n.visibleRange.startLineNumber,E=n.visibleRange.endLineNumber,R='<div class="'+Ei.CLASS_NAME+a+'" style="left:'+this._lineNumbersLeft+"px;width:"+this._lineNumbersWidth+'px;">';let ne=null;if(this._renderLineNumbers===2){ne=new Array(E-g+1),this._lastCursorViewPosition.lineNumber>=g&&this._lastCursorViewPosition.lineNumber<=E&&(ne[this._lastCursorViewPosition.lineNumber-g]=this._lastCursorModelPosition.lineNumber);{let ke=0;for(let Ae=this._lastCursorViewPosition.lineNumber+1;Ae<=E;Ae++){const Xe=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new Di.y(Ae,1)).column!==1;Xe||ke++,Ae>=g&&(ne[Ae-g]=Xe?0:ke)}}{let ke=0;for(let Ae=this._lastCursorViewPosition.lineNumber-1;Ae>=g;Ae--){const Xe=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new Di.y(Ae,1)).column!==1;Xe||ke++,Ae<=E&&(ne[Ae-g]=Xe?0:ke)}}}const _e=this._context.viewModel.getLineCount(),Le=[];for(let ke=g;ke<=E;ke++){const Ae=ke-g;if(!this._renderFinalNewline&&ke===_e&&this._context.viewModel.getLineLength(ke)===0){Le[Ae]="";continue}let je;if(ne){const Xe=ne[Ae];this._lastCursorViewPosition.lineNumber===ke?je=`<span class="relative-current-line-number">${Xe}</span>`:Xe?je=String(Xe):je=""}else je=this._getLineRenderLineNumber(ke);je?ke===this._activeLineNumber?Le[Ae]='<div class="active-line-number '+Ei.CLASS_NAME+a+'" style="left:'+this._lineNumbersLeft+"px;width:"+this._lineNumbersWidth+'px;">'+je+"</div>":Le[Ae]=R+je+"</div>":Le[Ae]=""}this._renderResult=Le}render(n,a){if(!this._renderResult)return"";const g=a-n;return g<0||g>=this._renderResult.length?"":this._renderResult[g]}}Ei.CLASS_NAME="line-numbers",(0,ai.zy)((Je,n)=>{const a=Je.getColor(Jt.Qt);a&&n.addRule(`.monaco-editor .line-numbers { color: ${a}; }`);const g=Je.getColor(Jt.pw);g&&n.addRule(`.monaco-editor .line-numbers.active-line-number { color: ${g}; }`)});class wi extends Ue{constructor(n){super(n);const a=this._context.configuration.options,g=a.get(133);this._canUseLayerHinting=!a.get(28),this._contentLeft=g.contentLeft,this._glyphMarginLeft=g.glyphMarginLeft,this._glyphMarginWidth=g.glyphMarginWidth,this._domNode=(0,ot.Z)(document.createElement("div")),this._domNode.setClassName(wi.OUTER_CLASS_NAME),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._glyphMarginBackgroundDomNode=(0,ot.Z)(document.createElement("div")),this._glyphMarginBackgroundDomNode.setClassName(wi.CLASS_NAME),this._domNode.appendChild(this._glyphMarginBackgroundDomNode)}dispose(){super.dispose()}getDomNode(){return this._domNode}onConfigurationChanged(n){const a=this._context.configuration.options,g=a.get(133);return this._canUseLayerHinting=!a.get(28),this._contentLeft=g.contentLeft,this._glyphMarginLeft=g.glyphMarginLeft,this._glyphMarginWidth=g.glyphMarginWidth,!0}onScrollChanged(n){return super.onScrollChanged(n)||n.scrollTopChanged}prepareRender(n){}render(n){this._domNode.setLayerHinting(this._canUseLayerHinting),this._domNode.setContain("strict");const a=n.scrollTop-n.bigNumbersDelta;this._domNode.setTop(-a);const g=Math.min(n.scrollHeight,1e6);this._domNode.setHeight(g),this._domNode.setWidth(this._contentLeft),this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft),this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth),this._glyphMarginBackgroundDomNode.setHeight(g)}}wi.CLASS_NAME="glyph-margin",wi.OUTER_CLASS_NAME="margin";var Ai=f(82862),Ni=f(68107),qi=f(44364),Pi=f(94901);class gn{constructor(n,a,g,E,R){this._context=n,this.modelLineNumber=a,this.distanceToModelLineStart=g,this.widthOfHiddenLineTextBefore=E,this.distanceToModelLineEnd=R,this._visibleTextAreaBrand=void 0,this.startPosition=null,this.endPosition=null,this.visibleTextareaStart=null,this.visibleTextareaEnd=null,this._previousPresentation=null}prepareRender(n){const a=new Di.y(this.modelLineNumber,this.distanceToModelLineStart+1),g=new Di.y(this.modelLineNumber,this._context.viewModel.model.getLineMaxColumn(this.modelLineNumber)-this.distanceToModelLineEnd);this.startPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(a),this.endPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(g),this.startPosition.lineNumber===this.endPosition.lineNumber?(this.visibleTextareaStart=n.visibleRangeForPosition(this.startPosition),this.visibleTextareaEnd=n.visibleRangeForPosition(this.endPosition)):(this.visibleTextareaStart=null,this.visibleTextareaEnd=null)}definePresentation(n){return this._previousPresentation||(n?this._previousPresentation=n:this._previousPresentation={foreground:1,italic:!1,bold:!1,underline:!1,strikethrough:!1}),this._previousPresentation}}const Gi=C.isFirefox;class Oi extends Ue{constructor(n,a,g){super(n),this._primaryCursorPosition=new Di.y(1,1),this._primaryCursorVisibleRange=null,this._viewController=a,this._visibleRangeProvider=g,this._scrollLeft=0,this._scrollTop=0;const E=this._context.configuration.options,R=E.get(133);this._setAccessibilityOptions(E),this._contentLeft=R.contentLeft,this._contentWidth=R.contentWidth,this._contentHeight=R.height,this._fontInfo=E.get(46),this._lineHeight=E.get(61),this._emptySelectionClipboard=E.get(33),this._copyWithSyntaxHighlighting=E.get(21),this._visibleTextArea=null,this._selections=[new O.L(1,1,1,1)],this._modelSelections=[new O.L(1,1,1,1)],this._lastRenderPosition=null,this.textArea=(0,ot.Z)(document.createElement("textarea")),Re.write(this.textArea,6),this.textArea.setClassName(`inputarea ${Ni.S}`),this.textArea.setAttribute("wrap","off"),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(E)),this.textArea.setAttribute("tabindex",String(E.get(114))),this.textArea.setAttribute("role","textbox"),this.textArea.setAttribute("aria-roledescription",Q.kg("editor","editor")),this.textArea.setAttribute("aria-multiline","true"),this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),E.get(30)&&E.get(83)&&this.textArea.setAttribute("readonly","true"),this.textAreaCover=(0,ot.Z)(document.createElement("div")),this.textAreaCover.setPosition("absolute");const ne={getLineCount:()=>this._context.viewModel.getLineCount(),getLineMaxColumn:ke=>this._context.viewModel.getLineMaxColumn(ke),getValueInRange:(ke,Ae)=>this._context.viewModel.getValueInRange(ke,Ae)},_e={getDataToCopy:()=>{const ke=this._context.viewModel.getPlainTextToCopy(this._modelSelections,this._emptySelectionClipboard,D.uF),Ae=this._context.viewModel.model.getEOL(),je=this._emptySelectionClipboard&&this._modelSelections.length===1&&this._modelSelections[0].isEmpty(),Xe=Array.isArray(ke)?ke:null,it=Array.isArray(ke)?ke.join(Ae):ke;let yt,Nt=null;if(ni.Eq.forceCopyWithSyntaxHighlighting||this._copyWithSyntaxHighlighting&&it.length<65536){const Ft=this._context.viewModel.getRichTextToCopy(this._modelSelections,this._emptySelectionClipboard);Ft&&(yt=Ft.html,Nt=Ft.mode)}return{isFromEmptySelection:je,multicursorText:Xe,text:it,html:yt,mode:Nt}},getScreenReaderContent:ke=>{if(this._accessibilitySupport===1){const Ae=this._selections[0];if(D.zx&&Ae.isEmpty()){const je=Ae.getStartPosition();let Xe=this._getWordBeforePosition(je);if(Xe.length===0&&(Xe=this._getCharacterBeforePosition(je)),Xe.length>0)return new ri._O(Xe,Xe.length,Xe.length,je,je)}if(C.isSafari&&!Ae.isEmpty()){const je="vscode-placeholder";return new ri._O(je,0,je.length,null,null)}return ri._O.EMPTY}if(C.isAndroid){const Ae=this._selections[0];if(Ae.isEmpty()){const je=Ae.getStartPosition(),[Xe,it]=this._getAndroidWordAtPosition(je);if(Xe.length>0)return new ri._O(Xe,it,it,je,je)}return ri._O.EMPTY}return ri.Al.fromEditorSelection(ke,ne,this._selections[0],this._accessibilityPageSize,this._accessibilitySupport===0)},deduceModelPosition:(ke,Ae,je)=>this._context.viewModel.deduceModelPositionRelativeToViewPosition(ke,Ae,je)},Le=this._register(new ni.M0(this.textArea.domNode));this._textAreaInput=this._register(new ni.No(_e,Le,D.OS,C)),this._register(this._textAreaInput.onKeyDown(ke=>{this._viewController.emitKeyDown(ke)})),this._register(this._textAreaInput.onKeyUp(ke=>{this._viewController.emitKeyUp(ke)})),this._register(this._textAreaInput.onPaste(ke=>{let Ae=!1,je=null,Xe=null;ke.metadata&&(Ae=this._emptySelectionClipboard&&!!ke.metadata.isFromEmptySelection,je=typeof ke.metadata.multicursorText<"u"?ke.metadata.multicursorText:null,Xe=ke.metadata.mode),this._viewController.paste(ke.text,Ae,je,Xe)})),this._register(this._textAreaInput.onCut(()=>{this._viewController.cut()})),this._register(this._textAreaInput.onType(ke=>{ke.replacePrevCharCnt||ke.replaceNextCharCnt||ke.positionDelta?(ri.Hf&&console.log(` => compositionType: <<${ke.text}>>, ${ke.replacePrevCharCnt}, ${ke.replaceNextCharCnt}, ${ke.positionDelta}`),this._viewController.compositionType(ke.text,ke.replacePrevCharCnt,ke.replaceNextCharCnt,ke.positionDelta)):(ri.Hf&&console.log(` => type: <<${ke.text}>>`),this._viewController.type(ke.text))})),this._register(this._textAreaInput.onSelectionChangeRequest(ke=>{this._viewController.setSelection(ke)})),this._register(this._textAreaInput.onCompositionStart(ke=>{const Ae=this.textArea.domNode,je=this._modelSelections[0],{distanceToModelLineStart:Xe,widthOfHiddenTextBefore:it}=(()=>{const Nt=Ae.value.substring(0,Math.min(Ae.selectionStart,Ae.selectionEnd)),Ft=Nt.lastIndexOf(` `),Ut=Nt.substring(Ft+1),ui=Ut.lastIndexOf(" "),qt=Ut.length-ui-1,ji=je.getStartPosition(),li=Math.min(ji.column-1,qt),en=ji.column-1-li,Xi=Ut.substring(0,Ut.length-li),Hi=Fi(Xi,this._fontInfo);return{distanceToModelLineStart:en,widthOfHiddenTextBefore:Hi}})(),{distanceToModelLineEnd:yt}=(()=>{const Nt=Ae.value.substring(Math.max(Ae.selectionStart,Ae.selectionEnd)),Ft=Nt.indexOf(` `),Ut=Ft===-1?Nt:Nt.substring(0,Ft),ui=Ut.indexOf(" "),qt=ui===-1?Ut.length:Ut.length-ui-1,ji=je.getEndPosition(),li=Math.min(this._context.viewModel.model.getLineMaxColumn(ji.lineNumber)-ji.column,qt);return{distanceToModelLineEnd:this._context.viewModel.model.getLineMaxColumn(ji.lineNumber)-ji.column-li}})();this._context.viewModel.revealRange("keyboard",!0,Te.Q.fromPositions(this._selections[0].getStartPosition()),0,1),this._visibleTextArea=new gn(this._context,je.startLineNumber,Xe,it,yt),this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render(),this.textArea.setClassName(`inputarea ${Ni.S} ime-input`),this._viewController.compositionStart(),this._context.viewModel.onCompositionStart()})),this._register(this._textAreaInput.onCompositionUpdate(ke=>{this._visibleTextArea&&(this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render())})),this._register(this._textAreaInput.onCompositionEnd(()=>{this._visibleTextArea=null,this._render(),this.textArea.setClassName(`inputarea ${Ni.S}`),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)}))}dispose(){super.dispose()}_getAndroidWordAtPosition(n){const a='`~!@#$%^&*()-=+[{]}\\|;:",.<>/?',g=this._context.viewModel.getLineContent(n.lineNumber),E=(0,Ai.i)(a);let R=!0,ne=n.column,_e=!0,Le=n.column,ke=0;for(;ke<50&&(R||_e);){if(R&&ne<=1&&(R=!1),R){const Ae=g.charCodeAt(ne-2);E.get(Ae)!==0?R=!1:ne--}if(_e&&Le>g.length&&(_e=!1),_e){const Ae=g.charCodeAt(Le-1);E.get(Ae)!==0?_e=!1:Le++}ke++}return[g.substring(ne-1,Le-1),n.column-ne]}_getWordBeforePosition(n){const a=this._context.viewModel.getLineContent(n.lineNumber),g=(0,Ai.i)(this._context.configuration.options.get(119));let E=n.column,R=0;for(;E>1;){const ne=a.charCodeAt(E-2);if(g.get(ne)!==0||R>50)return a.substring(E-1,n.column-1);R++,E--}return a.substring(0,n.column-1)}_getCharacterBeforePosition(n){if(n.column>1){const g=this._context.viewModel.getLineContent(n.lineNumber).charAt(n.column-2);if(!Vt.pc(g.charCodeAt(0)))return g}return""}_getAriaLabel(n){return n.get(2)===1?Q.kg("accessibilityOffAriaLabel","The editor is not accessible at this time. Press {0} for options.",D.j9?"Shift+Alt+F1":"Alt+F1"):n.get(4)}_setAccessibilityOptions(n){this._accessibilitySupport=n.get(2);const a=n.get(3);this._accessibilitySupport===2&&a===ee.qB.accessibilityPageSize.defaultValue?this._accessibilityPageSize=500:this._accessibilityPageSize=a}onConfigurationChanged(n){const a=this._context.configuration.options,g=a.get(133);return this._setAccessibilityOptions(a),this._contentLeft=g.contentLeft,this._contentWidth=g.contentWidth,this._contentHeight=g.height,this._fontInfo=a.get(46),this._lineHeight=a.get(61),this._emptySelectionClipboard=a.get(33),this._copyWithSyntaxHighlighting=a.get(21),this.textArea.setAttribute("aria-label",this._getAriaLabel(a)),this.textArea.setAttribute("tabindex",String(a.get(114))),(n.hasChanged(30)||n.hasChanged(83))&&(a.get(30)&&a.get(83)?this.textArea.setAttribute("readonly","true"):this.textArea.removeAttribute("readonly")),n.hasChanged(2)&&this._textAreaInput.writeScreenReaderContent("strategy changed"),!0}onCursorStateChanged(n){return this._selections=n.selections.slice(0),this._modelSelections=n.modelSelections.slice(0),this._textAreaInput.writeScreenReaderContent("selection changed"),!0}onDecorationsChanged(n){return!0}onFlushed(n){return!0}onLinesChanged(n){return!0}onLinesDeleted(n){return!0}onLinesInserted(n){return!0}onScrollChanged(n){return this._scrollLeft=n.scrollLeft,this._scrollTop=n.scrollTop,!0}onZonesChanged(n){return!0}isFocused(){return this._textAreaInput.isFocused()}focusTextArea(){this._textAreaInput.focusTextArea()}getLastRenderData(){return this._lastRenderPosition}setAriaOptions(n){n.activeDescendant?(this.textArea.setAttribute("aria-haspopup","true"),this.textArea.setAttribute("aria-autocomplete","list"),this.textArea.setAttribute("aria-activedescendant",n.activeDescendant)):(this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),this.textArea.removeAttribute("aria-activedescendant")),n.role&&this.textArea.setAttribute("role",n.role)}prepareRender(n){var a;this._primaryCursorPosition=new Di.y(this._selections[0].positionLineNumber,this._selections[0].positionColumn),this._primaryCursorVisibleRange=n.visibleRangeForPosition(this._primaryCursorPosition),(a=this._visibleTextArea)===null||a===void 0||a.prepareRender(n)}render(n){this._textAreaInput.writeScreenReaderContent("render"),this._render()}_render(){if(this._visibleTextArea){const g=this._visibleTextArea.visibleTextareaStart,E=this._visibleTextArea.visibleTextareaEnd,R=this._visibleTextArea.startPosition,ne=this._visibleTextArea.endPosition;if(R&&ne&&g&&E&&E.left>=this._scrollLeft&&g.left<=this._scrollLeft+this._contentWidth){const _e=this._context.viewLayout.getVerticalOffsetForLineNumber(this._primaryCursorPosition.lineNumber)-this._scrollTop,Le=this._newlinecount(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart));let ke=this._visibleTextArea.widthOfHiddenLineTextBefore,Ae=this._contentLeft+g.left-this._scrollLeft,je=E.left-g.left+1;if(Ae<this._contentLeft){const Ut=this._contentLeft-Ae;Ae+=Ut,ke+=Ut,je-=Ut}je>this._contentWidth&&(je=this._contentWidth);const Xe=this._context.viewModel.getViewLineData(R.lineNumber),it=Xe.tokens.findTokenIndexAtOffset(R.column-1),yt=Xe.tokens.findTokenIndexAtOffset(ne.column-1),Nt=it===yt,Ft=this._visibleTextArea.definePresentation(Nt?Xe.tokens.getPresentation(it):null);this.textArea.domNode.scrollTop=Le*this._lineHeight,this.textArea.domNode.scrollLeft=ke,this._doRender({lastRenderPosition:null,top:_e,left:Ae,width:je,height:this._lineHeight,useCover:!1,color:(qi.dG.getColorMap()||[])[Ft.foreground],italic:Ft.italic,bold:Ft.bold,underline:Ft.underline,strikethrough:Ft.strikethrough})}return}if(!this._primaryCursorVisibleRange){this._renderAtTopLeft();return}const n=this._contentLeft+this._primaryCursorVisibleRange.left-this._scrollLeft;if(n<this._contentLeft||n>this._contentLeft+this._contentWidth){this._renderAtTopLeft();return}const a=this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber)-this._scrollTop;if(a<0||a>this._contentHeight){this._renderAtTopLeft();return}if(D.zx){this._doRender({lastRenderPosition:this._primaryCursorPosition,top:a,left:n,width:Gi?0:1,height:this._lineHeight,useCover:!1}),this.textArea.domNode.scrollLeft=this._primaryCursorVisibleRange.left;const g=this._newlinecount(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart));this.textArea.domNode.scrollTop=g*this._lineHeight;return}this._doRender({lastRenderPosition:this._primaryCursorPosition,top:a,left:n,width:Gi?0:1,height:Gi?0:1,useCover:!1})}_newlinecount(n){let a=0,g=-1;do{if(g=n.indexOf(` `,g+1),g===-1)break;a++}while(!0);return a}_renderAtTopLeft(){this._doRender({lastRenderPosition:null,top:0,left:0,width:Gi?0:1,height:Gi?0:1,useCover:!0})}_doRender(n){this._lastRenderPosition=n.lastRenderPosition;const a=this.textArea,g=this.textAreaCover;(0,Gt.M)(a,this._fontInfo),a.setTop(n.top),a.setLeft(n.left),a.setWidth(n.width),a.setHeight(n.height),a.setColor(n.color?Pi.Q1.Format.CSS.formatHex(n.color):""),a.setFontStyle(n.italic?"italic":""),n.bold&&a.setFontWeight("bold"),a.setTextDecoration(`${n.underline?" underline":""}${n.strikethrough?" line-through":""}`),g.setTop(n.useCover?n.top:0),g.setLeft(n.useCover?n.left:0),g.setWidth(n.useCover?n.width:0),g.setHeight(n.useCover?n.height:0);const E=this._context.configuration.options;E.get(52)?g.setClassName("monaco-editor-background textAreaCover "+wi.OUTER_CLASS_NAME):E.get(62).renderType!==0?g.setClassName("monaco-editor-background textAreaCover "+Ei.CLASS_NAME):g.setClassName("monaco-editor-background textAreaCover")}}function Fi(Je,n){if(Je.length===0)return 0;const a=document.createElement("div");a.style.position="absolute",a.style.top="-50000px",a.style.width="50000px";const g=document.createElement("span");(0,Gt.M)(g,n),g.style.whiteSpace="pre",g.append(Je),a.appendChild(g),document.body.appendChild(a);const E=g.offsetWidth;return document.body.removeChild(a),E}var Bi=f(72521);class rn{constructor(n,a,g,E){this.configuration=n,this.viewModel=a,this.userInputEvents=g,this.commandDelegate=E}paste(n,a,g,E){this.commandDelegate.paste(n,a,g,E)}type(n){this.commandDelegate.type(n)}compositionType(n,a,g,E){this.commandDelegate.compositionType(n,a,g,E)}compositionStart(){this.commandDelegate.startComposition()}compositionEnd(){this.commandDelegate.endComposition()}cut(){this.commandDelegate.cut()}setSelection(n){Bi.QM.SetSelection.runCoreEditorCommand(this.viewModel,{source:"keyboard",selection:n})}_validateViewColumn(n){const a=this.viewModel.getLineMinColumn(n.lineNumber);return n.column<a?new Di.y(n.lineNumber,a):n}_hasMulticursorModifier(n){switch(this.configuration.options.get(72)){case"altKey":return n.altKey;case"ctrlKey":return n.ctrlKey;case"metaKey":return n.metaKey;default:return!1}}_hasNonMulticursorModifier(n){switch(this.configuration.options.get(72)){case"altKey":return n.ctrlKey||n.metaKey;case"ctrlKey":return n.altKey||n.metaKey;case"metaKey":return n.ctrlKey||n.altKey;default:return!1}}dispatchMouse(n){const a=this.configuration.options,g=D.j9&&a.get(98),E=a.get(18);n.middleButton&&!g?this._columnSelect(n.position,n.mouseColumn,n.inSelectionMode):n.startedOnLineNumbers?this._hasMulticursorModifier(n)?n.inSelectionMode?this._lastCursorLineSelect(n.position):this._createCursor(n.position,!0):n.inSelectionMode?this._lineSelectDrag(n.position):this._lineSelect(n.position):n.mouseDownCount>=4?this._selectAll():n.mouseDownCount===3?this._hasMulticursorModifier(n)?n.inSelectionMode?this._lastCursorLineSelectDrag(n.position):this._lastCursorLineSelect(n.position):n.inSelectionMode?this._lineSelectDrag(n.position):this._lineSelect(n.position):n.mouseDownCount===2?n.onInjectedText||(this._hasMulticursorModifier(n)?this._lastCursorWordSelect(n.position):n.inSelectionMode?this._wordSelectDrag(n.position):this._wordSelect(n.position)):this._hasMulticursorModifier(n)?this._hasNonMulticursorModifier(n)||(n.shiftKey?this._columnSelect(n.position,n.mouseColumn,!0):n.inSelectionMode?this._lastCursorMoveToSelect(n.position):this._createCursor(n.position,!1)):n.inSelectionMode?n.altKey?this._columnSelect(n.position,n.mouseColumn,!0):E?this._columnSelect(n.position,n.mouseColumn,!0):this._moveToSelect(n.position):this.moveTo(n.position)}_usualArgs(n){return n=this._validateViewColumn(n),{source:"mouse",position:this._convertViewToModelPosition(n),viewPosition:n}}moveTo(n){Bi.QM.MoveTo.runCoreEditorCommand(this.viewModel,this._usualArgs(n))}_moveToSelect(n){Bi.QM.MoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(n))}_columnSelect(n,a,g){n=this._validateViewColumn(n),Bi.QM.ColumnSelect.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(n),viewPosition:n,mouseColumn:a,doColumnSelect:g})}_createCursor(n,a){n=this._validateViewColumn(n),Bi.QM.CreateCursor.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(n),viewPosition:n,wholeLine:a})}_lastCursorMoveToSelect(n){Bi.QM.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(n))}_wordSelect(n){Bi.QM.WordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(n))}_wordSelectDrag(n){Bi.QM.WordSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(n))}_lastCursorWordSelect(n){Bi.QM.LastCursorWordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(n))}_lineSelect(n){Bi.QM.LineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(n))}_lineSelectDrag(n){Bi.QM.LineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(n))}_lastCursorLineSelect(n){Bi.QM.LastCursorLineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(n))}_lastCursorLineSelectDrag(n){Bi.QM.LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(n))}_selectAll(){Bi.QM.SelectAll.runCoreEditorCommand(this.viewModel,{source:"mouse"})}_convertViewToModelPosition(n){return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(n)}emitKeyDown(n){this.userInputEvents.emitKeyDown(n)}emitKeyUp(n){this.userInputEvents.emitKeyUp(n)}emitContextMenu(n){this.userInputEvents.emitContextMenu(n)}emitMouseMove(n){this.userInputEvents.emitMouseMove(n)}emitMouseLeave(n){this.userInputEvents.emitMouseLeave(n)}emitMouseUp(n){this.userInputEvents.emitMouseUp(n)}emitMouseDown(n){this.userInputEvents.emitMouseDown(n)}emitMouseDrag(n){this.userInputEvents.emitMouseDrag(n)}emitMouseDrop(n){this.userInputEvents.emitMouseDrop(n)}emitMouseDropCanceled(){this.userInputEvents.emitMouseDropCanceled()}emitMouseWheel(n){this.userInputEvents.emitMouseWheel(n)}}class _i{constructor(n){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=n}emitKeyDown(n){var a;(a=this.onKeyDown)===null||a===void 0||a.call(this,n)}emitKeyUp(n){var a;(a=this.onKeyUp)===null||a===void 0||a.call(this,n)}emitContextMenu(n){var a;(a=this.onContextMenu)===null||a===void 0||a.call(this,this._convertViewToModelMouseEvent(n))}emitMouseMove(n){var a;(a=this.onMouseMove)===null||a===void 0||a.call(this,this._convertViewToModelMouseEvent(n))}emitMouseLeave(n){var a;(a=this.onMouseLeave)===null||a===void 0||a.call(this,this._convertViewToModelMouseEvent(n))}emitMouseDown(n){var a;(a=this.onMouseDown)===null||a===void 0||a.call(this,this._convertViewToModelMouseEvent(n))}emitMouseUp(n){var a;(a=this.onMouseUp)===null||a===void 0||a.call(this,this._convertViewToModelMouseEvent(n))}emitMouseDrag(n){var a;(a=this.onMouseDrag)===null||a===void 0||a.call(this,this._convertViewToModelMouseEvent(n))}emitMouseDrop(n){var a;(a=this.onMouseDrop)===null||a===void 0||a.call(this,this._convertViewToModelMouseEvent(n))}emitMouseDropCanceled(){var n;(n=this.onMouseDropCanceled)===null||n===void 0||n.call(this)}emitMouseWheel(n){var a;(a=this.onMouseWheel)===null||a===void 0||a.call(this,n)}_convertViewToModelMouseEvent(n){return n.target?{event:n.event,target:this._convertViewToModelMouseTarget(n.target)}:n}_convertViewToModelMouseTarget(n){return _i.convertViewToModelMouseTarget(n,this._coordinatesConverter)}static convertViewToModelMouseTarget(n,a){const g=Object.assign({},n);return g.position&&(g.position=a.convertViewPositionToModelPosition(g.position)),g.range&&(g.range=a.convertViewRangeToModelRange(g.range)),g}}var jn=f(54324),Wn;class xn{constructor(n){this._createLine=n,this._set(1,[])}flush(){this._set(1,[])}_set(n,a){this._lines=a,this._rendLineNumberStart=n}_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(n){const a=n-this._rendLineNumberStart;if(a<0||a>=this._lines.length)throw new Error("Illegal value for lineNumber");return this._lines[a]}onLinesDeleted(n,a){if(this.getCount()===0)return null;const g=this.getStartLineNumber(),E=this.getEndLineNumber();if(a<g){const Le=a-n+1;return this._rendLineNumberStart-=Le,null}if(n>E)return null;let R=0,ne=0;for(let Le=g;Le<=E;Le++){const ke=Le-this._rendLineNumberStart;n<=Le&&Le<=a&&(ne===0?(R=ke,ne=1):ne++)}if(n<g){let Le=0;a<g?Le=a-n+1:Le=g-n,this._rendLineNumberStart-=Le}return this._lines.splice(R,ne)}onLinesChanged(n,a){const g=n+a-1;if(this.getCount()===0)return!1;const E=this.getStartLineNumber(),R=this.getEndLineNumber();let ne=!1;for(let _e=n;_e<=g;_e++)_e>=E&&_e<=R&&(this._lines[_e-this._rendLineNumberStart].onContentChanged(),ne=!0);return ne}onLinesInserted(n,a){if(this.getCount()===0)return null;const g=a-n+1,E=this.getStartLineNumber(),R=this.getEndLineNumber();if(n<=E)return this._rendLineNumberStart+=g,null;if(n>R)return null;if(g+n>R)return this._lines.splice(n-this._rendLineNumberStart,R-n+1);const ne=[];for(let je=0;je<g;je++)ne[je]=this._createLine();const _e=n-this._rendLineNumberStart,Le=this._lines.slice(0,_e),ke=this._lines.slice(_e,this._lines.length-g),Ae=this._lines.slice(this._lines.length-g,this._lines.length);return this._lines=Le.concat(ne).concat(ke),Ae}onTokensChanged(n){if(this.getCount()===0)return!1;const a=this.getStartLineNumber(),g=this.getEndLineNumber();let E=!1;for(let R=0,ne=n.length;R<ne;R++){const _e=n[R];if(_e.toLineNumber<a||_e.fromLineNumber>g)continue;const Le=Math.max(a,_e.fromLineNumber),ke=Math.min(g,_e.toLineNumber);for(let Ae=Le;Ae<=ke;Ae++){const je=Ae-this._rendLineNumberStart;this._lines[je].onTokensChanged(),E=!0}}return E}}class Rn{constructor(n){this._host=n,this.domNode=this._createDomNode(),this._linesCollection=new xn(()=>this._host.createVisibleLine())}_createDomNode(){const n=(0,ot.Z)(document.createElement("div"));return n.setClassName("view-layer"),n.setPosition("absolute"),n.domNode.setAttribute("role","presentation"),n.domNode.setAttribute("aria-hidden","true"),n}onConfigurationChanged(n){return!!n.hasChanged(133)}onFlushed(n){return this._linesCollection.flush(),!0}onLinesChanged(n){return this._linesCollection.onLinesChanged(n.fromLineNumber,n.count)}onLinesDeleted(n){const a=this._linesCollection.onLinesDeleted(n.fromLineNumber,n.toLineNumber);if(a)for(let g=0,E=a.length;g<E;g++){const R=a[g].getDomNode();R&&this.domNode.domNode.removeChild(R)}return!0}onLinesInserted(n){const a=this._linesCollection.onLinesInserted(n.fromLineNumber,n.toLineNumber);if(a)for(let g=0,E=a.length;g<E;g++){const R=a[g].getDomNode();R&&this.domNode.domNode.removeChild(R)}return!0}onScrollChanged(n){return n.scrollTopChanged}onTokensChanged(n){return this._linesCollection.onTokensChanged(n.ranges)}onZonesChanged(n){return!0}getStartLineNumber(){return this._linesCollection.getStartLineNumber()}getEndLineNumber(){return this._linesCollection.getEndLineNumber()}getVisibleLine(n){return this._linesCollection.getLine(n)}renderLines(n){const a=this._linesCollection._get(),g=new $i(this.domNode.domNode,this._host,n),E={rendLineNumberStart:a.rendLineNumberStart,lines:a.lines,linesLength:a.lines.length},R=g.render(E,n.startLineNumber,n.endLineNumber,n.relativeVerticalOffset);this._linesCollection._set(R.rendLineNumberStart,R.lines)}}class $i{constructor(n,a,g){this.domNode=n,this.host=a,this.viewportData=g}render(n,a,g,E){const R={rendLineNumberStart:n.rendLineNumberStart,lines:n.lines.slice(0),linesLength:n.linesLength};if(R.rendLineNumberStart+R.linesLength-1<a||g<R.rendLineNumberStart){R.rendLineNumberStart=a,R.linesLength=g-a+1,R.lines=[];for(let ne=a;ne<=g;ne++)R.lines[ne-a]=this.host.createVisibleLine();return this._finishRendering(R,!0,E),R}if(this._renderUntouchedLines(R,Math.max(a-R.rendLineNumberStart,0),Math.min(g-R.rendLineNumberStart,R.linesLength-1),E,a),R.rendLineNumberStart>a){const ne=a,_e=Math.min(g,R.rendLineNumberStart-1);ne<=_e&&(this._insertLinesBefore(R,ne,_e,E,a),R.linesLength+=_e-ne+1)}else if(R.rendLineNumberStart<a){const ne=Math.min(R.linesLength,a-R.rendLineNumberStart);ne>0&&(this._removeLinesBefore(R,ne),R.linesLength-=ne)}if(R.rendLineNumberStart=a,R.rendLineNumberStart+R.linesLength-1<g){const ne=R.rendLineNumberStart+R.linesLength,_e=g;ne<=_e&&(this._insertLinesAfter(R,ne,_e,E,a),R.linesLength+=_e-ne+1)}else if(R.rendLineNumberStart+R.linesLength-1>g){const ne=Math.max(0,g-R.rendLineNumberStart+1),Le=R.linesLength-1-ne+1;Le>0&&(this._removeLinesAfter(R,Le),R.linesLength-=Le)}return this._finishRendering(R,!1,E),R}_renderUntouchedLines(n,a,g,E,R){const ne=n.rendLineNumberStart,_e=n.lines;for(let Le=a;Le<=g;Le++){const ke=ne+Le;_e[Le].layoutLine(ke,E[ke-R])}}_insertLinesBefore(n,a,g,E,R){const ne=[];let _e=0;for(let Le=a;Le<=g;Le++)ne[_e++]=this.host.createVisibleLine();n.lines=ne.concat(n.lines)}_removeLinesBefore(n,a){for(let g=0;g<a;g++){const E=n.lines[g].getDomNode();E&&this.domNode.removeChild(E)}n.lines.splice(0,a)}_insertLinesAfter(n,a,g,E,R){const ne=[];let _e=0;for(let Le=a;Le<=g;Le++)ne[_e++]=this.host.createVisibleLine();n.lines=n.lines.concat(ne)}_removeLinesAfter(n,a){const g=n.linesLength-a;for(let E=0;E<a;E++){const R=n.lines[g+E].getDomNode();R&&this.domNode.removeChild(R)}n.lines.splice(g,a)}_finishRenderingNewLines(n,a,g,E){$i._ttPolicy&&(g=$i._ttPolicy.createHTML(g));const R=this.domNode.lastChild;a||!R?this.domNode.innerHTML=g:R.insertAdjacentHTML("afterend",g);let ne=this.domNode.lastChild;for(let _e=n.linesLength-1;_e>=0;_e--){const Le=n.lines[_e];E[_e]&&(Le.setDomNode(ne),ne=ne.previousSibling)}}_finishRenderingInvalidLines(n,a,g){const E=document.createElement("div");$i._ttPolicy&&(a=$i._ttPolicy.createHTML(a)),E.innerHTML=a;for(let R=0;R<n.linesLength;R++){const ne=n.lines[R];if(g[R]){const _e=E.firstChild,Le=ne.getDomNode();Le.parentNode.replaceChild(_e,Le),ne.setDomNode(_e)}}}_finishRendering(n,a,g){const E=$i._sb,R=n.linesLength,ne=n.lines,_e=n.rendLineNumberStart,Le=[];{E.reset();let ke=!1;for(let Ae=0;Ae<R;Ae++){const je=ne[Ae];Le[Ae]=!1,!(je.getDomNode()||!je.renderLine(Ae+_e,g[Ae],this.viewportData,E))&&(Le[Ae]=!0,ke=!0)}ke&&this._finishRenderingNewLines(n,a,E.build(),Le)}{E.reset();let ke=!1;const Ae=[];for(let je=0;je<R;je++){const Xe=ne[je];Ae[je]=!1,!(Le[je]||!Xe.renderLine(je+_e,g[je],this.viewportData,E))&&(Ae[je]=!0,ke=!0)}ke&&this._finishRenderingInvalidLines(n,E.build(),Ae)}}}$i._ttPolicy=(Wn=window.trustedTypes)===null||Wn===void 0?void 0:Wn.createPolicy("editorViewLayer",{createHTML:Je=>Je}),$i._sb=(0,jn.Du)(1e5);class Nn extends Ue{constructor(n){super(n),this._visibleLines=new Rn(this),this.domNode=this._visibleLines.domNode,this._dynamicOverlays=[],this._isFocused=!1,this.domNode.setClassName("view-overlays")}shouldRender(){if(super.shouldRender())return!0;for(let n=0,a=this._dynamicOverlays.length;n<a;n++)if(this._dynamicOverlays[n].shouldRender())return!0;return!1}dispose(){super.dispose();for(let n=0,a=this._dynamicOverlays.length;n<a;n++)this._dynamicOverlays[n].dispose();this._dynamicOverlays=[]}getDomNode(){return this.domNode}createVisibleLine(){return new Jn(this._context.configuration,this._dynamicOverlays)}addDynamicOverlay(n){this._dynamicOverlays.push(n)}onConfigurationChanged(n){this._visibleLines.onConfigurationChanged(n);const a=this._visibleLines.getStartLineNumber(),g=this._visibleLines.getEndLineNumber();for(let E=a;E<=g;E++)this._visibleLines.getVisibleLine(E).onConfigurationChanged(n);return!0}onFlushed(n){return this._visibleLines.onFlushed(n)}onFocusChanged(n){return this._isFocused=n.isFocused,!0}onLinesChanged(n){return this._visibleLines.onLinesChanged(n)}onLinesDeleted(n){return this._visibleLines.onLinesDeleted(n)}onLinesInserted(n){return this._visibleLines.onLinesInserted(n)}onScrollChanged(n){return this._visibleLines.onScrollChanged(n)||!0}onTokensChanged(n){return this._visibleLines.onTokensChanged(n)}onZonesChanged(n){return this._visibleLines.onZonesChanged(n)}prepareRender(n){const a=this._dynamicOverlays.filter(g=>g.shouldRender());for(let g=0,E=a.length;g<E;g++){const R=a[g];R.prepareRender(n),R.onDidRender()}}render(n){this._viewOverlaysRender(n),this.domNode.toggleClassName("focused",this._isFocused)}_viewOverlaysRender(n){this._visibleLines.renderLines(n.viewportData)}}class Jn{constructor(n,a){this._configuration=n,this._lineHeight=this._configuration.options.get(61),this._dynamicOverlays=a,this._domNode=null,this._renderedContent=null}getDomNode(){return this._domNode?this._domNode.domNode:null}setDomNode(n){this._domNode=(0,ot.Z)(n)}onContentChanged(){}onTokensChanged(){}onConfigurationChanged(n){this._lineHeight=this._configuration.options.get(61)}renderLine(n,a,g,E){let R="";for(let ne=0,_e=this._dynamicOverlays.length;ne<_e;ne++){const Le=this._dynamicOverlays[ne];R+=Le.render(g.startLineNumber,n)}return this._renderedContent===R?!1:(this._renderedContent=R,E.appendASCIIString('<div style="position:absolute;top:'),E.appendASCIIString(String(a)),E.appendASCIIString("px;width:100%;height:"),E.appendASCIIString(String(this._lineHeight)),E.appendASCIIString('px;">'),E.appendASCIIString(R),E.appendASCIIString("</div>"),!0)}layoutLine(n,a){this._domNode&&(this._domNode.setTop(a),this._domNode.setHeight(this._lineHeight))}}class Ti extends Nn{constructor(n){super(n);const g=this._context.configuration.options.get(133);this._contentWidth=g.contentWidth,this.domNode.setHeight(0)}onConfigurationChanged(n){const g=this._context.configuration.options.get(133);return this._contentWidth=g.contentWidth,super.onConfigurationChanged(n)||!0}onScrollChanged(n){return super.onScrollChanged(n)||n.scrollWidthChanged}_viewOverlaysRender(n){super._viewOverlaysRender(n),this.domNode.setWidth(Math.max(n.scrollWidth,this._contentWidth))}}class es extends Nn{constructor(n){super(n);const a=this._context.configuration.options,g=a.get(133);this._contentLeft=g.contentLeft,this.domNode.setClassName("margin-view-overlays"),this.domNode.setWidth(1),(0,Gt.M)(this.domNode,a.get(46))}onConfigurationChanged(n){const a=this._context.configuration.options;(0,Gt.M)(this.domNode,a.get(46));const g=a.get(133);return this._contentLeft=g.contentLeft,super.onConfigurationChanged(n)||!0}onScrollChanged(n){return super.onScrollChanged(n)||n.scrollHeightChanged}_viewOverlaysRender(n){super._viewOverlaysRender(n);const a=Math.min(n.scrollHeight,1e6);this.domNode.setHeight(a),this.domNode.setWidth(this._contentLeft)}}class xi{constructor(n,a){this._coordinateBrand=void 0,this.top=n,this.left=a}}class os extends Ue{constructor(n,a){super(n),this._viewDomNode=a,this._widgets={},this.domNode=(0,ot.Z)(document.createElement("div")),Re.write(this.domNode,1),this.domNode.setClassName("contentWidgets"),this.domNode.setPosition("absolute"),this.domNode.setTop(0),this.overflowingContentWidgetsDomNode=(0,ot.Z)(document.createElement("div")),Re.write(this.overflowingContentWidgetsDomNode,2),this.overflowingContentWidgetsDomNode.setClassName("overflowingContentWidgets")}dispose(){super.dispose(),this._widgets={}}onConfigurationChanged(n){const a=Object.keys(this._widgets);for(const g of a)this._widgets[g].onConfigurationChanged(n);return!0}onDecorationsChanged(n){return!0}onFlushed(n){return!0}onLineMappingChanged(n){const a=Object.keys(this._widgets);for(const g of a)this._widgets[g].onLineMappingChanged(n);return!0}onLinesChanged(n){return!0}onLinesDeleted(n){return!0}onLinesInserted(n){return!0}onScrollChanged(n){return!0}onZonesChanged(n){return!0}addWidget(n){const a=new Zi(this._context,this._viewDomNode,n);this._widgets[a.id]=a,a.allowEditorOverflow?this.overflowingContentWidgetsDomNode.appendChild(a.domNode):this.domNode.appendChild(a.domNode),this.setShouldRender()}setWidgetPosition(n,a,g,E){this._widgets[n.getId()].setPosition(a,g,E),this.setShouldRender()}removeWidget(n){const a=n.getId();if(this._widgets.hasOwnProperty(a)){const g=this._widgets[a];delete this._widgets[a];const E=g.domNode.domNode;E.parentNode.removeChild(E),E.removeAttribute("monaco-visible-content-widget"),this.setShouldRender()}}shouldSuppressMouseDownOnWidget(n){return this._widgets.hasOwnProperty(n)?this._widgets[n].suppressMouseDown:!1}onBeforeRender(n){const a=Object.keys(this._widgets);for(const g of a)this._widgets[g].onBeforeRender(n)}prepareRender(n){const a=Object.keys(this._widgets);for(const g of a)this._widgets[g].prepareRender(n)}render(n){const a=Object.keys(this._widgets);for(const g of a)this._widgets[g].render(n)}}class Zi{constructor(n,a,g){this._context=n,this._viewDomNode=a,this._actual=g,this.domNode=(0,ot.Z)(this._actual.getDomNode()),this.id=this._actual.getId(),this.allowEditorOverflow=this._actual.allowEditorOverflow||!1,this.suppressMouseDown=this._actual.suppressMouseDown||!1;const E=this._context.configuration.options,R=E.get(133);this._fixedOverflowWidgets=E.get(38),this._contentWidth=R.contentWidth,this._contentLeft=R.contentLeft,this._lineHeight=E.get(61),this._range=null,this._viewRange=null,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(n){const a=this._context.configuration.options;if(this._lineHeight=a.get(61),n.hasChanged(133)){const g=a.get(133);this._contentLeft=g.contentLeft,this._contentWidth=g.contentWidth,this._maxWidth=this._getMaxWidth()}}onLineMappingChanged(n){this._setPosition(this._range,this._affinity)}_setPosition(n,a){var g;if(this._range=n,this._viewRange=null,this._affinity=a,this._range){const E=this._context.viewModel.model.validateRange(this._range);(this._context.viewModel.coordinatesConverter.modelPositionIsVisible(E.getStartPosition())||this._context.viewModel.coordinatesConverter.modelPositionIsVisible(E.getEndPosition()))&&(this._viewRange=this._context.viewModel.coordinatesConverter.convertModelRangeToViewRange(E,(g=this._affinity)!==null&&g!==void 0?g:void 0))}}_getMaxWidth(){return this.allowEditorOverflow?window.innerWidth||document.documentElement.offsetWidth||document.body.offsetWidth:this._contentWidth}setPosition(n,a,g){this._setPosition(n,g),this._preference=a,this._viewRange&&this._preference&&this._preference.length>0?this.domNode.setDisplay("block"):this.domNode.setDisplay("none"),this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1}_layoutBoxInViewport(n,a,g,E,R){const ne=n.top,_e=ne,Le=a.top+this._lineHeight,ke=R.viewportHeight-Le,Ae=ne-E,je=_e>=E,Xe=Le,it=ke>=E;let yt=n.left,Nt=a.left;return yt+g>R.scrollLeft+R.viewportWidth&&(yt=R.scrollLeft+R.viewportWidth-g),Nt+g>R.scrollLeft+R.viewportWidth&&(Nt=R.scrollLeft+R.viewportWidth-g),yt<R.scrollLeft&&(yt=R.scrollLeft),Nt<R.scrollLeft&&(Nt=R.scrollLeft),{fitsAbove:je,aboveTop:Ae,aboveLeft:yt,fitsBelow:it,belowTop:Xe,belowLeft:Nt}}_layoutHorizontalSegmentInPage(n,a,g,E){const R=Math.max(0,a.left-E),ne=Math.min(a.left+a.width+E,n.width);let _e=a.left+g-J.Yx.scrollX;if(_e+E>ne){const Le=_e-(ne-E);_e-=Le,g-=Le}if(_e<R){const Le=_e-R;_e-=Le,g-=Le}return[g,_e]}_layoutBoxInPage(n,a,g,E,R){const ne=n.top-E,_e=a.top+this._lineHeight,Le=J.BK(this._viewDomNode.domNode),ke=Le.top+ne-J.Yx.scrollY,Ae=Le.top+_e-J.Yx.scrollY,je=J.tG(document.body),[Xe,it]=this._layoutHorizontalSegmentInPage(je,Le,n.left-R.scrollLeft+this._contentLeft,g),[yt,Nt]=this._layoutHorizontalSegmentInPage(je,Le,a.left-R.scrollLeft+this._contentLeft,g),Ft=22,Ut=22,ui=ke>=Ft,qt=Ae+E<=je.height-Ut;return this._fixedOverflowWidgets?{fitsAbove:ui,aboveTop:Math.max(ke,Ft),aboveLeft:it,fitsBelow:qt,belowTop:Ae,belowLeft:Nt}:{fitsAbove:ui,aboveTop:ne,aboveLeft:Xe,fitsBelow:qt,belowTop:_e,belowLeft:yt}}_prepareRenderWidgetAtExactPositionOverflowing(n){return new xi(n.top,n.left+this._contentLeft)}_getTopAndBottomLeft(n){if(!this._viewRange)return[null,null];const a=n.linesVisibleRangesForRange(this._viewRange,!1);if(!a||a.length===0)return[null,null];let g=a[0],E=a[0];for(const je of a)je.lineNumber<g.lineNumber&&(g=je),je.lineNumber>E.lineNumber&&(E=je);let R=1073741824;for(const je of g.ranges)je.left<R&&(R=je.left);let ne=1073741824;for(const je of E.ranges)je.left<ne&&(ne=je.left);const _e=n.getVerticalOffsetForLineNumber(g.lineNumber)-n.scrollTop,Le=new xi(_e,R),ke=n.getVerticalOffsetForLineNumber(E.lineNumber)-n.scrollTop,Ae=new xi(ke,ne);return[Le,Ae]}_prepareRenderWidget(n){if(!this._preference||this._preference.length===0)return null;const[a,g]=this._getTopAndBottomLeft(n);if(!a||!g)return null;if(this._cachedDomNodeOffsetWidth===-1||this._cachedDomNodeOffsetHeight===-1){let R=null;if(typeof this._actual.beforeRender=="function"&&(R=cn(this._actual.beforeRender,this._actual)),R)this._cachedDomNodeOffsetWidth=R.width,this._cachedDomNodeOffsetHeight=R.height;else{const _e=this.domNode.domNode.getBoundingClientRect();this._cachedDomNodeOffsetWidth=Math.round(_e.width),this._cachedDomNodeOffsetHeight=Math.round(_e.height)}}let E;this.allowEditorOverflow?E=this._layoutBoxInPage(a,g,this._cachedDomNodeOffsetWidth,this._cachedDomNodeOffsetHeight,n):E=this._layoutBoxInViewport(a,g,this._cachedDomNodeOffsetWidth,this._cachedDomNodeOffsetHeight,n);for(let R=1;R<=2;R++)for(const ne of this._preference)if(ne===1){if(!E)return null;if(R===2||E.fitsAbove)return{coordinate:new xi(E.aboveTop,E.aboveLeft),position:1}}else if(ne===2){if(!E)return null;if(R===2||E.fitsBelow)return{coordinate:new xi(E.belowTop,E.belowLeft),position:2}}else return this.allowEditorOverflow?{coordinate:this._prepareRenderWidgetAtExactPositionOverflowing(a),position:0}:{coordinate:a,position:0};return null}onBeforeRender(n){!this._viewRange||!this._preference||this._viewRange.endLineNumber<n.startLineNumber||this._viewRange.startLineNumber>n.endLineNumber||this.domNode.setMaxWidth(this._maxWidth)}prepareRender(n){this._renderData=this._prepareRenderWidget(n)}render(n){if(!this._renderData){this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,this.domNode.setVisibility("hidden")),typeof this._actual.afterRender=="function"&&cn(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+n.scrollTop-n.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"&&cn(this._actual.afterRender,this._actual,this._renderData.position)}}function cn(Je,n,...a){try{return Je.call(n,...a)}catch{return null}}var Wi=f(6028);class vn extends di{constructor(n){super(),this._context=n;const a=this._context.configuration.options,g=a.get(133);this._lineHeight=a.get(61),this._renderLineHighlight=a.get(87),this._renderLineHighlightOnlyWhenFocus=a.get(88),this._contentLeft=g.contentLeft,this._contentWidth=g.contentWidth,this._selectionIsEmpty=!0,this._focused=!1,this._cursorLineNumbers=[1],this._selections=[new O.L(1,1,1,1)],this._renderData=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}_readFromSelections(){let n=!1;const a=this._selections.map(E=>E.positionLineNumber);a.sort((E,R)=>E-R),d.aI(this._cursorLineNumbers,a)||(this._cursorLineNumbers=a,n=!0);const g=this._selections.every(E=>E.isEmpty());return this._selectionIsEmpty!==g&&(this._selectionIsEmpty=g,n=!0),n}onThemeChanged(n){return this._readFromSelections()}onConfigurationChanged(n){const a=this._context.configuration.options,g=a.get(133);return this._lineHeight=a.get(61),this._renderLineHighlight=a.get(87),this._renderLineHighlightOnlyWhenFocus=a.get(88),this._contentLeft=g.contentLeft,this._contentWidth=g.contentWidth,!0}onCursorStateChanged(n){return this._selections=n.selections,this._readFromSelections()}onFlushed(n){return!0}onLinesDeleted(n){return!0}onLinesInserted(n){return!0}onScrollChanged(n){return n.scrollWidthChanged||n.scrollTopChanged}onZonesChanged(n){return!0}onFocusChanged(n){return this._renderLineHighlightOnlyWhenFocus?(this._focused=n.isFocused,!0):!1}prepareRender(n){if(!this._shouldRenderThis()){this._renderData=null;return}const a=this._renderOne(n),g=n.visibleRange.startLineNumber,E=n.visibleRange.endLineNumber,R=this._cursorLineNumbers.length;let ne=0;const _e=[];for(let Le=g;Le<=E;Le++){const ke=Le-g;for(;ne<R&&this._cursorLineNumbers[ne]<Le;)ne++;ne<R&&this._cursorLineNumbers[ne]===Le?_e[ke]=a:_e[ke]=""}this._renderData=_e}render(n,a){if(!this._renderData)return"";const g=a-n;return g>=this._renderData.length?"":this._renderData[g]}_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 Gn extends vn{_renderOne(n){return`<div class="${"current-line"+(this._shouldRenderOther()?" current-line-both":"")}" style="width:${Math.max(n.scrollWidth,this._contentWidth)}px; height:${this._lineHeight}px;"></div>`}_shouldRenderThis(){return this._shouldRenderInContent()}_shouldRenderOther(){return this._shouldRenderInMargin()}}class ws extends vn{_renderOne(n){return`<div class="${"current-line"+(this._shouldRenderInMargin()?" current-line-margin":"")+(this._shouldRenderOther()?" current-line-margin-both":"")}" style="width:${this._contentLeft}px; height:${this._lineHeight}px;"></div>`}_shouldRenderThis(){return!0}_shouldRenderOther(){return this._shouldRenderInContent()}}(0,ai.zy)((Je,n)=>{const a=Je.getColor(Jt.kG);if(a&&(n.addRule(`.monaco-editor .view-overlays .current-line { background-color: ${a}; }`),n.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { background-color: ${a}; border: none; }`)),!a||a.isTransparent()||Je.defines(Jt.Mf)){const g=Je.getColor(Jt.Mf);g&&(n.addRule(`.monaco-editor .view-overlays .current-line { border: 2px solid ${g}; }`),n.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { border: 2px solid ${g}; }`),(0,pt.Bb)(Je.type)&&(n.addRule(".monaco-editor .view-overlays .current-line { border-width: 1px; }"),n.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border-width: 1px; }")))}});var fn=f(95524);class ks extends di{constructor(n){super(),this._context=n;const a=this._context.configuration.options;this._lineHeight=a.get(61),this._typicalHalfwidthCharacterWidth=a.get(46).typicalHalfwidthCharacterWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(n){const a=this._context.configuration.options;return this._lineHeight=a.get(61),this._typicalHalfwidthCharacterWidth=a.get(46).typicalHalfwidthCharacterWidth,!0}onDecorationsChanged(n){return!0}onFlushed(n){return!0}onLinesChanged(n){return!0}onLinesDeleted(n){return!0}onLinesInserted(n){return!0}onScrollChanged(n){return n.scrollTopChanged||n.scrollWidthChanged}onZonesChanged(n){return!0}prepareRender(n){const a=n.getDecorationsInViewport();let g=[],E=0;for(let Le=0,ke=a.length;Le<ke;Le++){const Ae=a[Le];Ae.options.className&&(g[E++]=Ae)}g=g.sort((Le,ke)=>{if(Le.options.zIndex<ke.options.zIndex)return-1;if(Le.options.zIndex>ke.options.zIndex)return 1;const Ae=Le.options.className,je=ke.options.className;return Ae<je?-1:Ae>je?1:Te.Q.compareRangesUsingStarts(Le.range,ke.range)});const R=n.visibleRange.startLineNumber,ne=n.visibleRange.endLineNumber,_e=[];for(let Le=R;Le<=ne;Le++){const ke=Le-R;_e[ke]=""}this._renderWholeLineDecorations(n,g,_e),this._renderNormalDecorations(n,g,_e),this._renderResult=_e}_renderWholeLineDecorations(n,a,g){const E=String(this._lineHeight),R=n.visibleRange.startLineNumber,ne=n.visibleRange.endLineNumber;for(let _e=0,Le=a.length;_e<Le;_e++){const ke=a[_e];if(!ke.options.isWholeLine)continue;const Ae='<div class="cdr '+ke.options.className+'" style="left:0;width:100%;height:'+E+'px;"></div>',je=Math.max(ke.range.startLineNumber,R),Xe=Math.min(ke.range.endLineNumber,ne);for(let it=je;it<=Xe;it++){const yt=it-R;g[yt]+=Ae}}}_renderNormalDecorations(n,a,g){const E=String(this._lineHeight),R=n.visibleRange.startLineNumber;let ne=null,_e=!1,Le=null;for(let ke=0,Ae=a.length;ke<Ae;ke++){const je=a[ke];if(je.options.isWholeLine)continue;const Xe=je.options.className,it=!!je.options.showIfCollapsed;let yt=je.range;if(it&&yt.endColumn===1&&yt.endLineNumber!==yt.startLineNumber&&(yt=new Te.Q(yt.startLineNumber,yt.startColumn,yt.endLineNumber-1,this._context.viewModel.getLineMaxColumn(yt.endLineNumber-1))),ne===Xe&&_e===it&&Te.Q.areIntersectingOrTouching(Le,yt)){Le=Te.Q.plusRange(Le,yt);continue}ne!==null&&this._renderNormalDecoration(n,Le,ne,_e,E,R,g),ne=Xe,_e=it,Le=yt}ne!==null&&this._renderNormalDecoration(n,Le,ne,_e,E,R,g)}_renderNormalDecoration(n,a,g,E,R,ne,_e){const Le=n.linesVisibleRangesForRange(a,g==="findMatch");if(Le)for(let ke=0,Ae=Le.length;ke<Ae;ke++){const je=Le[ke];if(je.outsideRenderedLine)continue;const Xe=je.lineNumber-ne;if(E&&je.ranges.length===1){const it=je.ranges[0];if(it.width<this._typicalHalfwidthCharacterWidth){const yt=Math.round(it.left+it.width/2),Nt=Math.max(0,Math.round(yt-this._typicalHalfwidthCharacterWidth/2));je.ranges[0]=new Dt(Nt,this._typicalHalfwidthCharacterWidth)}}for(let it=0,yt=je.ranges.length;it<yt;it++){const Nt=je.ranges[it],Ft='<div class="cdr '+g+'" style="left:'+String(Nt.left)+"px;width:"+String(Nt.width)+"px;height:"+R+'px;"></div>';_e[Xe]+=Ft}}}render(n,a){if(!this._renderResult)return"";const g=a-n;return g<0||g>=this._renderResult.length?"":this._renderResult[g]}}var wn=f(63781),yn=f(4874);class uo extends Ue{constructor(n,a,g,E){super(n);const R=this._context.configuration.options,ne=R.get(94),_e=R.get(69),Le=R.get(36),ke=R.get(97),Ae={listenOnDomNode:g.domNode,className:"editor-scrollable "+(0,ai.Pz)(n.theme.type),useShadows:!1,lazyRender:!0,vertical:ne.vertical,horizontal:ne.horizontal,verticalHasArrows:ne.verticalHasArrows,horizontalHasArrows:ne.horizontalHasArrows,verticalScrollbarSize:ne.verticalScrollbarSize,verticalSliderSize:ne.verticalSliderSize,horizontalScrollbarSize:ne.horizontalScrollbarSize,horizontalSliderSize:ne.horizontalSliderSize,handleMouseWheel:ne.handleMouseWheel,alwaysConsumeMouseWheel:ne.alwaysConsumeMouseWheel,arrowSize:ne.arrowSize,mouseWheelScrollSensitivity:_e,fastScrollSensitivity:Le,scrollPredominantAxis:ke,scrollByPage:ne.scrollByPage};this.scrollbar=this._register(new wn.oO(a.domNode,Ae,this._context.viewLayout.getScrollable())),Re.write(this.scrollbar.getDomNode(),5),this.scrollbarDomNode=(0,ot.Z)(this.scrollbar.getDomNode()),this.scrollbarDomNode.setPosition("absolute"),this._setLayout();const je=(Xe,it,yt)=>{const Nt={};if(it){const Ft=Xe.scrollTop;Ft&&(Nt.scrollTop=this._context.viewLayout.getCurrentScrollTop()+Ft,Xe.scrollTop=0)}if(yt){const Ft=Xe.scrollLeft;Ft&&(Nt.scrollLeft=this._context.viewLayout.getCurrentScrollLeft()+Ft,Xe.scrollLeft=0)}this._context.viewModel.viewLayout.setScrollPosition(Nt,1)};this._register(J.ko(g.domNode,"scroll",Xe=>je(g.domNode,!0,!0))),this._register(J.ko(a.domNode,"scroll",Xe=>je(a.domNode,!0,!1))),this._register(J.ko(E.domNode,"scroll",Xe=>je(E.domNode,!0,!1))),this._register(J.ko(this.scrollbarDomNode.domNode,"scroll",Xe=>je(this.scrollbarDomNode.domNode,!0,!1)))}dispose(){super.dispose()}_setLayout(){const n=this._context.configuration.options,a=n.get(133);this.scrollbarDomNode.setLeft(a.contentLeft),n.get(67).side==="right"?this.scrollbarDomNode.setWidth(a.contentWidth+a.minimap.minimapWidth):this.scrollbarDomNode.setWidth(a.contentWidth),this.scrollbarDomNode.setHeight(a.height)}getOverviewRulerLayoutInfo(){return this.scrollbar.getOverviewRulerLayoutInfo()}getDomNode(){return this.scrollbarDomNode}delegateVerticalScrollbarPointerDown(n){this.scrollbar.delegateVerticalScrollbarPointerDown(n)}onConfigurationChanged(n){if(n.hasChanged(94)||n.hasChanged(69)||n.hasChanged(36)){const a=this._context.configuration.options,g=a.get(94),E=a.get(69),R=a.get(36),ne=a.get(97),_e={vertical:g.vertical,horizontal:g.horizontal,verticalScrollbarSize:g.verticalScrollbarSize,horizontalScrollbarSize:g.horizontalScrollbarSize,scrollByPage:g.scrollByPage,handleMouseWheel:g.handleMouseWheel,mouseWheelScrollSensitivity:E,fastScrollSensitivity:R,scrollPredominantAxis:ne};this.scrollbar.updateOptions(_e)}return n.hasChanged(133)&&this._setLayout(),!0}onScrollChanged(n){return!0}onThemeChanged(n){return this.scrollbar.updateClassName("editor-scrollable "+(0,ai.Pz)(this._context.theme.type)),!0}prepareRender(n){}render(n){this.scrollbar.renderNow()}}(0,ai.zy)((Je,n)=>{const a=Je.getColor(yn.bXl);a&&n.addRule(` .monaco-scrollable-element > .shadow.top { box-shadow: ${a} 0 6px 6px -6px inset; } .monaco-scrollable-element > .shadow.left { box-shadow: ${a} 6px 0 6px -6px inset; } .monaco-scrollable-element > .shadow.top.left { box-shadow: ${a} 6px 6px 6px -6px inset; } `);const g=Je.getColor(yn.gnV);g&&n.addRule(` .monaco-scrollable-element > .scrollbar > .slider { background: ${g}; } `);const E=Je.getColor(yn.cI_);E&&n.addRule(` .monaco-scrollable-element > .scrollbar > .slider:hover { background: ${E}; } `);const R=Je.getColor(yn.mhZ);R&&n.addRule(` .monaco-scrollable-element > .scrollbar > .slider.active { background: ${R}; } `)});var Ms=f(72544);class Ts{constructor(n,a,g){this._decorationToRenderBrand=void 0,this.startLineNumber=+n,this.endLineNumber=+a,this.className=String(g)}}class Et extends di{_render(n,a,g){const E=[];for(let _e=n;_e<=a;_e++){const Le=_e-n;E[Le]=[]}if(g.length===0)return E;g.sort((_e,Le)=>_e.className===Le.className?_e.startLineNumber===Le.startLineNumber?_e.endLineNumber-Le.endLineNumber:_e.startLineNumber-Le.startLineNumber:_e.className<Le.className?-1:1);let R=null,ne=0;for(let _e=0,Le=g.length;_e<Le;_e++){const ke=g[_e],Ae=ke.className;let je=Math.max(ke.startLineNumber,n)-n;const Xe=Math.min(ke.endLineNumber,a)-n;R===Ae?(je=Math.max(ne+1,je),ne=Math.max(ne,Xe)):(R=Ae,ne=Xe);for(let it=je;it<=ne;it++)E[it].push(R)}return E}}class ls extends Et{constructor(n){super(),this._context=n;const a=this._context.configuration.options,g=a.get(133);this._lineHeight=a.get(61),this._glyphMargin=a.get(52),this._glyphMarginLeft=g.glyphMarginLeft,this._glyphMarginWidth=g.glyphMarginWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(n){const a=this._context.configuration.options,g=a.get(133);return this._lineHeight=a.get(61),this._glyphMargin=a.get(52),this._glyphMarginLeft=g.glyphMarginLeft,this._glyphMarginWidth=g.glyphMarginWidth,!0}onDecorationsChanged(n){return!0}onFlushed(n){return!0}onLinesChanged(n){return!0}onLinesDeleted(n){return!0}onLinesInserted(n){return!0}onScrollChanged(n){return n.scrollTopChanged}onZonesChanged(n){return!0}_getDecorations(n){const a=n.getDecorationsInViewport(),g=[];let E=0;for(let R=0,ne=a.length;R<ne;R++){const _e=a[R],Le=_e.options.glyphMarginClassName;Le&&(g[E++]=new Ts(_e.range.startLineNumber,_e.range.endLineNumber,Le))}return g}prepareRender(n){if(!this._glyphMargin){this._renderResult=null;return}const a=n.visibleRange.startLineNumber,g=n.visibleRange.endLineNumber,E=this._render(a,g,this._getDecorations(n)),R=this._lineHeight.toString(),ne=this._glyphMarginLeft.toString(),_e=this._glyphMarginWidth.toString(),Le='" style="left:'+ne+"px;width:"+_e+"px;height:"+R+'px;"></div>',ke=[];for(let Ae=a;Ae<=g;Ae++){const je=Ae-a,Xe=E[je];Xe.length===0?ke[je]="":ke[je]='<div class="cgmr codicon '+Xe.join(" ")+Le}this._renderResult=ke}render(n,a){if(!this._renderResult)return"";const g=a-n;return g<0||g>=this._renderResult.length?"":this._renderResult[g]}}var Ss=f(27988),ts=f(79359),zs=f(52818),vs=f(60779);class As extends di{constructor(n){super(),this._context=n,this._primaryPosition=null;const a=this._context.configuration.options,g=a.get(134),E=a.get(46);this._lineHeight=a.get(61),this._spaceWidth=E.spaceWidth,this._maxIndentLeft=g.wrappingColumn===-1?-1:g.wrappingColumn*E.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=a.get(13),this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(n){const a=this._context.configuration.options,g=a.get(134),E=a.get(46);return this._lineHeight=a.get(61),this._spaceWidth=E.spaceWidth,this._maxIndentLeft=g.wrappingColumn===-1?-1:g.wrappingColumn*E.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=a.get(13),!0}onCursorStateChanged(n){var a;const E=n.selections[0].getPosition();return!((a=this._primaryPosition)===null||a===void 0)&&a.equals(E)?!1:(this._primaryPosition=E,!0)}onDecorationsChanged(n){return!0}onFlushed(n){return!0}onLinesChanged(n){return!0}onLinesDeleted(n){return!0}onLinesInserted(n){return!0}onScrollChanged(n){return n.scrollTopChanged}onZonesChanged(n){return!0}onLanguageConfigurationChanged(n){return!0}prepareRender(n){var a,g,E,R;if(!this._bracketPairGuideOptions.indentation&&this._bracketPairGuideOptions.bracketPairs===!1){this._renderResult=null;return}const ne=n.visibleRange.startLineNumber,_e=n.visibleRange.endLineNumber,Le=n.scrollWidth,ke=this._lineHeight,Ae=this._primaryPosition,je=this.getGuidesByLine(ne,_e,Ae),Xe=[];for(let it=ne;it<=_e;it++){const yt=it-ne,Nt=je[yt];let Ft="";const Ut=(g=(a=n.visibleRangeForPosition(new Di.y(it,1)))===null||a===void 0?void 0:a.left)!==null&&g!==void 0?g:0;for(const ui of Nt){const qt=ui.column===-1?Ut+(ui.visibleColumn-1)*this._spaceWidth:n.visibleRangeForPosition(new Di.y(it,ui.column)).left;if(qt>Le||this._maxIndentLeft>0&&qt>this._maxIndentLeft)break;const ji=ui.horizontalLine?ui.horizontalLine.top?"horizontal-top":"horizontal-bottom":"vertical",li=ui.horizontalLine?((R=(E=n.visibleRangeForPosition(new Di.y(it,ui.horizontalLine.endColumn)))===null||E===void 0?void 0:E.left)!==null&&R!==void 0?R:qt+this._spaceWidth)-qt:this._spaceWidth;Ft+=`<div class="core-guide ${ui.className} ${ji}" style="left:${qt}px;height:${ke}px;width:${li}px"></div>`}Xe[yt]=Ft}this._renderResult=Xe}getGuidesByLine(n,a,g){const E=this._bracketPairGuideOptions.bracketPairs!==!1?this._context.viewModel.getBracketGuidesInRangeByLine(n,a,g,{highlightActive:this._bracketPairGuideOptions.highlightActiveBracketPair,horizontalGuides:this._bracketPairGuideOptions.bracketPairsHorizontal===!0?vs.N6.Enabled:this._bracketPairGuideOptions.bracketPairsHorizontal==="active"?vs.N6.EnabledForActive:vs.N6.Disabled,includeInactive:this._bracketPairGuideOptions.bracketPairs===!0}):null,R=this._bracketPairGuideOptions.indentation?this._context.viewModel.getLinesIndentGuides(n,a):null;let ne=0,_e=0,Le=0;if(this._bracketPairGuideOptions.highlightActiveIndentation!==!1&&g){const je=this._context.viewModel.getActiveIndentGuide(g.lineNumber,n,a);ne=je.startLineNumber,_e=je.endLineNumber,Le=je.indent}const{indentSize:ke}=this._context.viewModel.model.getOptions(),Ae=[];for(let je=n;je<=a;je++){const Xe=new Array;Ae.push(Xe);const it=E?E[je-n]:[],yt=new d.j3(it),Nt=R?R[je-n]:[];for(let Ft=1;Ft<=Nt;Ft++){const Ut=(Ft-1)*ke+1,ui=(this._bracketPairGuideOptions.highlightActiveIndentation==="always"||it.length===0)&&ne<=je&&je<=_e&&Ft===Le;Xe.push(...yt.takeWhile(ji=>ji.visibleColumn<Ut)||[]);const qt=yt.peek();(!qt||qt.visibleColumn!==Ut||qt.horizontalLine)&&Xe.push(new vs.TH(Ut,-1,ui?"core-guide-indent-active":"core-guide-indent",null,-1,-1))}Xe.push(...yt.takeWhile(Ft=>!0)||[])}return Ae}render(n,a){if(!this._renderResult)return"";const g=a-n;return g<0||g>=this._renderResult.length?"":this._renderResult[g]}}function $s(Je){if(!(Je&&Je.isTransparent()))return Je}(0,ai.zy)((Je,n)=>{const a=Je.getColor(Jt.v0);a&&n.addRule(`.monaco-editor .lines-content .core-guide-indent { box-shadow: 1px 0 0 0 ${a} inset; }`);const g=Je.getColor(Jt.fj)||a;g&&n.addRule(`.monaco-editor .lines-content .core-guide-indent-active { box-shadow: 1px 0 0 0 ${g} inset; }`);const E=[{bracketColor:Jt.sN,guideColor:Jt.n4,guideColorActive:Jt.bB},{bracketColor:Jt.lQ,guideColor:Jt.I2,guideColorActive:Jt.WS},{bracketColor:Jt.ss,guideColor:Jt.Bo,guideColorActive:Jt.Pe},{bracketColor:Jt.l5,guideColor:Jt.If,guideColorActive:Jt.WD},{bracketColor:Jt.sH,guideColor:Jt.BD,guideColorActive:Jt.P1},{bracketColor:Jt.zp,guideColor:Jt.IW,guideColorActive:Jt.WY}],R=new zs.k,ne=E.map(_e=>{var Le,ke;const Ae=Je.getColor(_e.bracketColor),je=Je.getColor(_e.guideColor),Xe=Je.getColor(_e.guideColorActive),it=$s((Le=$s(je))!==null&&Le!==void 0?Le:Ae?.transparent(.3)),yt=$s((ke=$s(Xe))!==null&&ke!==void 0?ke:Ae);if(!(!it||!yt))return{guideColor:it,guideColorActive:yt}}).filter(ts.O9);if(ne.length>0){for(let _e=0;_e<30;_e++){const Le=ne[_e%ne.length];n.addRule(`.monaco-editor .${R.getInlineClassNameOfLevel(_e).replace(/ /g,".")} { --guide-color: ${Le.guideColor}; --guide-color-active: ${Le.guideColorActive}; }`)}n.addRule(".monaco-editor .vertical { box-shadow: 1px 0 0 0 var(--guide-color) inset; }"),n.addRule(".monaco-editor .horizontal-top { border-top: 1px solid var(--guide-color); }"),n.addRule(".monaco-editor .horizontal-bottom { border-bottom: 1px solid var(--guide-color); }"),n.addRule(`.monaco-editor .vertical.${R.activeClassName} { box-shadow: 1px 0 0 0 var(--guide-color-active) inset; }`),n.addRule(`.monaco-editor .horizontal-top.${R.activeClassName} { border-top: 1px solid var(--guide-color-active); }`),n.addRule(`.monaco-editor .horizontal-bottom.${R.activeClassName} { border-bottom: 1px solid var(--guide-color-active); }`)}});var Gs=f(94921);class rs{constructor(){this._currentVisibleRange=new Te.Q(1,1,1,1)}getCurrentVisibleRange(){return this._currentVisibleRange}setCurrentVisibleRange(n){this._currentVisibleRange=n}}class Bn{constructor(n,a,g,E,R,ne,_e){this.minimalReveal=n,this.lineNumber=a,this.startColumn=g,this.endColumn=E,this.startScrollTop=R,this.stopScrollTop=ne,this.scrollType=_e,this.type="range",this.minLineNumber=a,this.maxLineNumber=a}}class mn{constructor(n,a,g,E,R){this.minimalReveal=n,this.selections=a,this.startScrollTop=g,this.stopScrollTop=E,this.scrollType=R,this.type="selections";let ne=a[0].startLineNumber,_e=a[0].endLineNumber;for(let Le=1,ke=a.length;Le<ke;Le++){const Ae=a[Le];ne=Math.min(ne,Ae.startLineNumber),_e=Math.max(_e,Ae.endLineNumber)}this.minLineNumber=ne,this.maxLineNumber=_e}}class Kt extends Ue{constructor(n,a){super(n),this._linesContent=a,this._textRangeRestingSpot=document.createElement("div"),this._visibleLines=new Rn(this),this.domNode=this._visibleLines.domNode;const g=this._context.configuration,E=this._context.configuration.options,R=E.get(46),ne=E.get(134),_e=E.get(133);this._lineHeight=E.get(61),this._typicalHalfwidthCharacterWidth=R.typicalHalfwidthCharacterWidth,this._isViewportWrapping=ne.isViewportWrapping,this._revealHorizontalRightPadding=E.get(91),this._horizontalScrollbarHeight=_e.horizontalScrollbarHeight,this._cursorSurroundingLines=E.get(25),this._cursorSurroundingLinesStyle=E.get(26),this._canUseLayerHinting=!E.get(28),this._viewLineOptions=new vi(g,this._context.theme.type),Re.write(this.domNode,7),this.domNode.setClassName(`view-lines ${Ni.S}`),(0,Gt.M)(this.domNode,R),this._maxLineWidth=0,this._asyncUpdateLineWidths=new Ke.uC(()=>{this._updateLineWidthsSlow()},200),this._asyncCheckMonospaceFontAssumptions=new Ke.uC(()=>{this._checkMonospaceFontAssumptions()},2e3),this._lastRenderedData=new rs,this._horizontalRevealRequest=null}dispose(){this._asyncUpdateLineWidths.dispose(),this._asyncCheckMonospaceFontAssumptions.dispose(),super.dispose()}getDomNode(){return this.domNode}createVisibleLine(){return new Ze(this._viewLineOptions)}onConfigurationChanged(n){this._visibleLines.onConfigurationChanged(n),n.hasChanged(134)&&(this._maxLineWidth=0);const a=this._context.configuration.options,g=a.get(46),E=a.get(134),R=a.get(133);return this._lineHeight=a.get(61),this._typicalHalfwidthCharacterWidth=g.typicalHalfwidthCharacterWidth,this._isViewportWrapping=E.isViewportWrapping,this._revealHorizontalRightPadding=a.get(91),this._horizontalScrollbarHeight=R.horizontalScrollbarHeight,this._cursorSurroundingLines=a.get(25),this._cursorSurroundingLinesStyle=a.get(26),this._canUseLayerHinting=!a.get(28),(0,Gt.M)(this.domNode,g),this._onOptionsMaybeChanged(),n.hasChanged(133)&&(this._maxLineWidth=0),!0}_onOptionsMaybeChanged(){const n=this._context.configuration,a=new vi(n,this._context.theme.type);if(!this._viewLineOptions.equals(a)){this._viewLineOptions=a;const g=this._visibleLines.getStartLineNumber(),E=this._visibleLines.getEndLineNumber();for(let R=g;R<=E;R++)this._visibleLines.getVisibleLine(R).onOptionsChanged(this._viewLineOptions);return!0}return!1}onCursorStateChanged(n){const a=this._visibleLines.getStartLineNumber(),g=this._visibleLines.getEndLineNumber();let E=!1;for(let R=a;R<=g;R++)E=this._visibleLines.getVisibleLine(R).onSelectionChanged()||E;return E}onDecorationsChanged(n){{const a=this._visibleLines.getStartLineNumber(),g=this._visibleLines.getEndLineNumber();for(let E=a;E<=g;E++)this._visibleLines.getVisibleLine(E).onDecorationsChanged()}return!0}onFlushed(n){const a=this._visibleLines.onFlushed(n);return this._maxLineWidth=0,a}onLinesChanged(n){return this._visibleLines.onLinesChanged(n)}onLinesDeleted(n){return this._visibleLines.onLinesDeleted(n)}onLinesInserted(n){return this._visibleLines.onLinesInserted(n)}onRevealRangeRequest(n){const a=this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(),n.source,n.minimalReveal,n.range,n.selections,n.verticalType);if(a===-1)return!1;let g=this._context.viewLayout.validateScrollPosition({scrollTop:a});n.revealHorizontal?n.range&&n.range.startLineNumber!==n.range.endLineNumber?g={scrollTop:g.scrollTop,scrollLeft:0}:n.range?this._horizontalRevealRequest=new Bn(n.minimalReveal,n.range.startLineNumber,n.range.startColumn,n.range.endColumn,this._context.viewLayout.getCurrentScrollTop(),g.scrollTop,n.scrollType):n.selections&&n.selections.length>0&&(this._horizontalRevealRequest=new mn(n.minimalReveal,n.selections,this._context.viewLayout.getCurrentScrollTop(),g.scrollTop,n.scrollType)):this._horizontalRevealRequest=null;const R=Math.abs(this._context.viewLayout.getCurrentScrollTop()-g.scrollTop)<=this._lineHeight?1:n.scrollType;return this._context.viewModel.viewLayout.setScrollPosition(g,R),!0}onScrollChanged(n){if(this._horizontalRevealRequest&&n.scrollLeftChanged&&(this._horizontalRevealRequest=null),this._horizontalRevealRequest&&n.scrollTopChanged){const a=Math.min(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop),g=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(n.scrollTop<a||n.scrollTop>g)&&(this._horizontalRevealRequest=null)}return this.domNode.setWidth(n.scrollWidth),this._visibleLines.onScrollChanged(n)||!0}onTokensChanged(n){return this._visibleLines.onTokensChanged(n)}onZonesChanged(n){return this._context.viewModel.viewLayout.setMaxLineWidth(this._maxLineWidth),this._visibleLines.onZonesChanged(n)}onThemeChanged(n){return this._onOptionsMaybeChanged()}getPositionFromDOMInfo(n,a){const g=this._getViewLineDomNode(n);if(g===null)return null;const E=this._getLineNumberFor(g);if(E===-1||E<1||E>this._context.viewModel.getLineCount())return null;if(this._context.viewModel.getLineMaxColumn(E)===1)return new Di.y(E,1);const R=this._visibleLines.getStartLineNumber(),ne=this._visibleLines.getEndLineNumber();if(E<R||E>ne)return null;let _e=this._visibleLines.getVisibleLine(E).getColumnOfNodeOffset(E,n,a);const Le=this._context.viewModel.getLineMinColumn(E);return _e<Le&&(_e=Le),new Di.y(E,_e)}_getViewLineDomNode(n){for(;n&&n.nodeType===1;){if(n.className===Ze.CLASS_NAME)return n;n=n.parentElement}return null}_getLineNumberFor(n){const a=this._visibleLines.getStartLineNumber(),g=this._visibleLines.getEndLineNumber();for(let E=a;E<=g;E++){const R=this._visibleLines.getVisibleLine(E);if(n===R.getDomNode())return E}return-1}getLineWidth(n){const a=this._visibleLines.getStartLineNumber(),g=this._visibleLines.getEndLineNumber();return n<a||n>g?-1:this._visibleLines.getVisibleLine(n).getWidth()}linesVisibleRangesForRange(n,a){if(this.shouldRender())return null;const g=n.endLineNumber,E=Te.Q.intersectRanges(n,this._lastRenderedData.getCurrentVisibleRange());if(!E)return null;const R=[];let ne=0;const _e=new ii(this.domNode.domNode,this._textRangeRestingSpot);let Le=0;a&&(Le=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new Di.y(E.startLineNumber,1)).lineNumber);const ke=this._visibleLines.getStartLineNumber(),Ae=this._visibleLines.getEndLineNumber();for(let je=E.startLineNumber;je<=E.endLineNumber;je++){if(je<ke||je>Ae)continue;const Xe=je===E.startLineNumber?E.startColumn:1,it=je===E.endLineNumber?E.endColumn:this._context.viewModel.getLineMaxColumn(je),yt=this._visibleLines.getVisibleLine(je).getVisibleRangesForRange(je,Xe,it,_e);if(yt){if(a&&je<g){const Nt=Le;Le=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new Di.y(je+1,1)).lineNumber,Nt!==Le&&(yt.ranges[yt.ranges.length-1].width+=this._typicalHalfwidthCharacterWidth)}R[ne++]=new Lt(yt.outsideRenderedLine,je,Dt.from(yt.ranges))}}return ne===0?null:R}_visibleRangesForLineRange(n,a,g){return this.shouldRender()||n<this._visibleLines.getStartLineNumber()||n>this._visibleLines.getEndLineNumber()?null:this._visibleLines.getVisibleLine(n).getVisibleRangesForRange(n,a,g,new ii(this.domNode.domNode,this._textRangeRestingSpot))}visibleRangeForPosition(n){const a=this._visibleRangesForLineRange(n.lineNumber,n.column,n.column);return a?new Ie(a.outsideRenderedLine,a.ranges[0].left):null}updateLineWidths(){this._updateLineWidths(!1)}_updateLineWidthsFast(){return this._updateLineWidths(!0)}_updateLineWidthsSlow(){this._updateLineWidths(!1)}_updateLineWidths(n){const a=this._visibleLines.getStartLineNumber(),g=this._visibleLines.getEndLineNumber();let E=1,R=!0;for(let ne=a;ne<=g;ne++){const _e=this._visibleLines.getVisibleLine(ne);if(n&&!_e.getWidthIsFast()){R=!1;continue}E=Math.max(E,_e.getWidth())}return R&&a===1&&g===this._context.viewModel.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(E),R}_checkMonospaceFontAssumptions(){let n=-1,a=-1;const g=this._visibleLines.getStartLineNumber(),E=this._visibleLines.getEndLineNumber();for(let R=g;R<=E;R++){const ne=this._visibleLines.getVisibleLine(R);if(ne.needsMonospaceFontCheck()){const _e=ne.getWidth();_e>a&&(a=_e,n=R)}}if(n!==-1&&!this._visibleLines.getVisibleLine(n).monospaceAssumptionsAreValid())for(let R=g;R<=E;R++)this._visibleLines.getVisibleLine(R).onMonospaceAssumptionsInvalidated()}prepareRender(){throw new Error("Not supported")}render(){throw new Error("Not supported")}renderText(n){if(this._visibleLines.renderLines(n),this._lastRenderedData.setCurrentVisibleRange(n.visibleRange),this.domNode.setWidth(this._context.viewLayout.getScrollWidth()),this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(),1e6)),this._horizontalRevealRequest){const g=this._horizontalRevealRequest;if(n.startLineNumber<=g.minLineNumber&&g.maxLineNumber<=n.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();const E=this._computeScrollLeftToReveal(g);E&&(this._isViewportWrapping||this._ensureMaxLineWidth(E.maxHorizontalOffset),this._context.viewModel.viewLayout.setScrollPosition({scrollLeft:E.scrollLeft},g.scrollType))}}if(this._updateLineWidthsFast()||this._asyncUpdateLineWidths.schedule(),D.j9&&!this._asyncCheckMonospaceFontAssumptions.isScheduled()){const g=this._visibleLines.getStartLineNumber(),E=this._visibleLines.getEndLineNumber();for(let R=g;R<=E;R++)if(this._visibleLines.getVisibleLine(R).needsMonospaceFontCheck()){this._asyncCheckMonospaceFontAssumptions.schedule();break}}this._linesContent.setLayerHinting(this._canUseLayerHinting),this._linesContent.setContain("strict");const a=this._context.viewLayout.getCurrentScrollTop()-n.bigNumbersDelta;this._linesContent.setTop(-a),this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft())}_ensureMaxLineWidth(n){const a=Math.ceil(n);this._maxLineWidth<a&&(this._maxLineWidth=a,this._context.viewModel.viewLayout.setMaxLineWidth(this._maxLineWidth))}_computeScrollTopToRevealRange(n,a,g,E,R,ne){const _e=n.top,Le=n.height,ke=_e+Le;let Ae,je,Xe;if(R&&R.length>0){let Nt=R[0].startLineNumber,Ft=R[0].endLineNumber;for(let Ut=1,ui=R.length;Ut<ui;Ut++){const qt=R[Ut];Nt=Math.min(Nt,qt.startLineNumber),Ft=Math.max(Ft,qt.endLineNumber)}Ae=!1,je=this._context.viewLayout.getVerticalOffsetForLineNumber(Nt),Xe=this._context.viewLayout.getVerticalOffsetForLineNumber(Ft)+this._lineHeight}else if(E)Ae=!0,je=this._context.viewLayout.getVerticalOffsetForLineNumber(E.startLineNumber),Xe=this._context.viewLayout.getVerticalOffsetForLineNumber(E.endLineNumber)+this._lineHeight;else return-1;if((a==="mouse"||g)&&this._cursorSurroundingLinesStyle==="default")g||(je-=this._lineHeight);else{const Nt=Math.min(Le/this._lineHeight/2,this._cursorSurroundingLines);je-=Nt*this._lineHeight,Xe+=Math.max(0,Nt-1)*this._lineHeight}(ne===0||ne===4)&&(Xe+=g?this._horizontalScrollbarHeight:this._lineHeight);let yt;if(Xe-je>Le){if(!Ae)return-1;yt=je}else if(ne===5||ne===6)if(ne===6&&_e<=je&&Xe<=ke)yt=_e;else{const Nt=Math.max(5*this._lineHeight,Le*.2),Ft=je-Nt,Ut=Xe-Le;yt=Math.max(Ut,Ft)}else if(ne===1||ne===2)if(ne===2&&_e<=je&&Xe<=ke)yt=_e;else{const Nt=(je+Xe)/2;yt=Math.max(0,Nt-Le/2)}else yt=this._computeMinimumScrolling(_e,ke,je,Xe,ne===3,ne===4);return yt}_computeScrollLeftToReveal(n){const a=this._context.viewLayout.getCurrentViewport(),g=a.left,E=g+a.width;let R=1073741824,ne=0;if(n.type==="range"){const Le=this._visibleRangesForLineRange(n.lineNumber,n.startColumn,n.endColumn);if(!Le)return null;for(const ke of Le.ranges)R=Math.min(R,Math.round(ke.left)),ne=Math.max(ne,Math.round(ke.left+ke.width))}else for(const Le of n.selections){if(Le.startLineNumber!==Le.endLineNumber)return null;const ke=this._visibleRangesForLineRange(Le.startLineNumber,Le.startColumn,Le.endColumn);if(!ke)return null;for(const Ae of ke.ranges)R=Math.min(R,Math.round(Ae.left)),ne=Math.max(ne,Math.round(Ae.left+Ae.width))}return n.minimalReveal||(R=Math.max(0,R-Kt.HORIZONTAL_EXTRA_PX),ne+=this._revealHorizontalRightPadding),n.type==="selections"&&ne-R>a.width?null:{scrollLeft:this._computeMinimumScrolling(g,E,R,ne),maxHorizontalOffset:ne}}_computeMinimumScrolling(n,a,g,E,R,ne){n=n|0,a=a|0,g=g|0,E=E|0,R=!!R,ne=!!ne;const _e=a-n;if(E-g<_e){if(R)return g;if(ne)return Math.max(0,E-_e);if(g<n)return g;if(E>a)return Math.max(0,E-_e)}else return g;return n}}Kt.HORIZONTAL_EXTRA_PX=30;var Ri=f(4806);class nn extends Et{constructor(n){super(),this._context=n;const g=this._context.configuration.options.get(133);this._decorationsLeft=g.decorationsLeft,this._decorationsWidth=g.decorationsWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(n){const g=this._context.configuration.options.get(133);return this._decorationsLeft=g.decorationsLeft,this._decorationsWidth=g.decorationsWidth,!0}onDecorationsChanged(n){return!0}onFlushed(n){return!0}onLinesChanged(n){return!0}onLinesDeleted(n){return!0}onLinesInserted(n){return!0}onScrollChanged(n){return n.scrollTopChanged}onZonesChanged(n){return!0}_getDecorations(n){const a=n.getDecorationsInViewport(),g=[];let E=0;for(let R=0,ne=a.length;R<ne;R++){const _e=a[R],Le=_e.options.linesDecorationsClassName;Le&&(g[E++]=new Ts(_e.range.startLineNumber,_e.range.endLineNumber,Le));const ke=_e.options.firstLineDecorationClassName;ke&&(g[E++]=new Ts(_e.range.startLineNumber,_e.range.startLineNumber,ke))}return g}prepareRender(n){const a=n.visibleRange.startLineNumber,g=n.visibleRange.endLineNumber,E=this._render(a,g,this._getDecorations(n)),R=this._decorationsLeft.toString(),ne=this._decorationsWidth.toString(),_e='" style="left:'+R+"px;width:"+ne+'px;"></div>',Le=[];for(let ke=a;ke<=g;ke++){const Ae=ke-a,je=E[Ae];let Xe="";for(let it=0,yt=je.length;it<yt;it++)Xe+='<div class="cldr '+je[it]+_e;Le[Ae]=Xe}this._renderResult=Le}render(n,a){return this._renderResult?this._renderResult[a-n]:""}}var Mn=f(2808);class fs extends Et{constructor(n){super(),this._context=n,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(n){return!0}onDecorationsChanged(n){return!0}onFlushed(n){return!0}onLinesChanged(n){return!0}onLinesDeleted(n){return!0}onLinesInserted(n){return!0}onScrollChanged(n){return n.scrollTopChanged}onZonesChanged(n){return!0}_getDecorations(n){const a=n.getDecorationsInViewport(),g=[];let E=0;for(let R=0,ne=a.length;R<ne;R++){const _e=a[R],Le=_e.options.marginClassName;Le&&(g[E++]=new Ts(_e.range.startLineNumber,_e.range.endLineNumber,Le))}return g}prepareRender(n){const a=n.visibleRange.startLineNumber,g=n.visibleRange.endLineNumber,E=this._render(a,g,this._getDecorations(n)),R=[];for(let ne=a;ne<=g;ne++){const _e=ne-a,Le=E[_e];let ke="";for(let Ae=0,je=Le.length;Ae<je;Ae++)ke+='<div class="cmdr '+Le[Ae]+'" style=""></div>';R[_e]=ke}this._renderResult=R}render(n,a){return this._renderResult?this._renderResult[a-n]:""}}var is=f(46820),qe=f(10176);class b{constructor(n,a,g,E){this._rgba8Brand=void 0,this.r=b._clamp(n),this.g=b._clamp(a),this.b=b._clamp(g),this.a=b._clamp(E)}equals(n){return this.r===n.r&&this.g===n.g&&this.b===n.b&&this.a===n.a}static _clamp(n){return n<0?0:n>255?255:n|0}}b.Empty=new b(0,0,0,0);class P extends _.jG{constructor(){super(),this._onDidChange=new S.vl,this.onDidChange=this._onDidChange.event,this._updateColorMap(),this._register(qi.dG.onDidChange(n=>{n.changedColorMap&&this._updateColorMap()}))}static getInstance(){return this._INSTANCE||(this._INSTANCE=(0,_.lC)(new P)),this._INSTANCE}_updateColorMap(){const n=qi.dG.getColorMap();if(!n){this._colors=[b.Empty],this._backgroundIsLight=!0;return}this._colors=[b.Empty];for(let g=1;g<n.length;g++){const E=n[g].rgba;this._colors[g]=new b(E.r,E.g,E.b,Math.round(E.a*255))}const a=n[2].getRelativeLuminance();this._backgroundIsLight=a>=.5,this._onDidChange.fire(void 0)}getColor(n){return(n<1||n>=this._colors.length)&&(n=2),this._colors[n]}backgroundIsLight(){return this._backgroundIsLight}}P._INSTANCE=null;var M=f(11608);const q=(()=>{const Je=[];for(let n=32;n<=126;n++)Je.push(n);return Je.push(65533),Je})(),p=(Je,n)=>(Je-=32,Je<0||Je>96?n<=2?(Je+96)%96:96-1:Je);var F=f(37512);class de{constructor(n,a){this.scale=a,this._minimapCharRendererBrand=void 0,this.charDataNormal=de.soften(n,12/15),this.charDataLight=de.soften(n,50/60)}static soften(n,a){const g=new Uint8ClampedArray(n.length);for(let E=0,R=n.length;E<R;E++)g[E]=(0,F.W)(n[E]*a);return g}renderChar(n,a,g,E,R,ne,_e,Le,ke,Ae,je){const Xe=1*this.scale,it=2*this.scale,yt=je?1:it;if(a+Xe>n.width||g+yt>n.height){console.warn("bad render request outside image data");return}const Nt=Ae?this.charDataLight:this.charDataNormal,Ft=p(E,ke),Ut=n.width*4,ui=_e.r,qt=_e.g,ji=_e.b,li=R.r-ui,en=R.g-qt,Xi=R.b-ji,Hi=Math.max(ne,Le),on=n.data;let Kn=Ft*Xe*it,Qi=g*Ut+a*4;for(let Vn=0;Vn<yt;Vn++){let gs=Qi;for(let ys=0;ys<Xe;ys++){const Hn=Nt[Kn++]/255*(ne/255);on[gs++]=ui+li*Hn,on[gs++]=qt+en*Hn,on[gs++]=ji+Xi*Hn,on[gs++]=Hi}Qi+=Ut}}blockRenderChar(n,a,g,E,R,ne,_e,Le){const ke=1*this.scale,Ae=2*this.scale,je=Le?1:Ae;if(a+ke>n.width||g+je>n.height){console.warn("bad render request outside image data");return}const Xe=n.width*4,it=.5*(R/255),yt=ne.r,Nt=ne.g,Ft=ne.b,Ut=E.r-yt,ui=E.g-Nt,qt=E.b-Ft,ji=yt+Ut*it,li=Nt+ui*it,en=Ft+qt*it,Xi=Math.max(R,_e),Hi=n.data;let on=g*Xe+a*4;for(let Kn=0;Kn<je;Kn++){let Qi=on;for(let Vn=0;Vn<ke;Vn++)Hi[Qi++]=ji,Hi[Qi++]=li,Hi[Qi++]=en,Hi[Qi++]=Xi;on+=Xe}}}var be=f(48289);const ye={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},Me=Je=>{const n=new Uint8ClampedArray(Je.length/2);for(let a=0;a<Je.length;a+=2)n[a>>1]=ye[Je[a]]<<4|ye[Je[a+1]]&15;return n},He={1:(0,be.O)(()=>Me("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792")),2:(0,be.O)(()=>Me("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126"))};class $e{static create(n,a){if(this.lastCreated&&n===this.lastCreated.scale&&a===this.lastFontFamily)return this.lastCreated;let g;return He[n]?g=new de(He[n](),n):g=$e.createFromSampleData($e.createSampleData(a).data,n),this.lastFontFamily=a,this.lastCreated=g,g}static createSampleData(n){const a=document.createElement("canvas"),g=a.getContext("2d");a.style.height="16px",a.height=16,a.width=96*10,a.style.width=96*10+"px",g.fillStyle="#ffffff",g.font=`bold 16px ${n}`,g.textBaseline="middle";let E=0;for(const R of q)g.fillText(String.fromCharCode(R),E,16/2),E+=10;return g.getImageData(0,0,96*10,16)}static createFromSampleData(n,a){if(n.length!==61440)throw new Error("Unexpected source in MinimapCharRenderer");const E=$e._downsample(n,a);return new de(E,a)}static _downsampleChar(n,a,g,E,R){const ne=1*R,_e=2*R;let Le=E,ke=0;for(let Ae=0;Ae<_e;Ae++){const je=Ae/_e*16,Xe=(Ae+1)/_e*16;for(let it=0;it<ne;it++){const yt=it/ne*10,Nt=(it+1)/ne*10;let Ft=0,Ut=0;for(let qt=je;qt<Xe;qt++){const ji=a+Math.floor(qt)*3840,li=1-(qt-Math.floor(qt));for(let en=yt;en<Nt;en++){const Xi=1-(en-Math.floor(en)),Hi=ji+Math.floor(en)*4,on=Xi*li;Ut+=on,Ft+=n[Hi]*n[Hi+3]/255*on}}const ui=Ft/Ut;ke=Math.max(ke,ui),g[Le++]=(0,F.W)(ui)}}return ke}static _downsample(n,a){const g=2*a*1*a,E=g*96,R=new Uint8ClampedArray(E);let ne=0,_e=0,Le=0;for(let ke=0;ke<96;ke++)Le=Math.max(Le,this._downsampleChar(n,_e,R,ne,a)),ne+=g,_e+=10*4;if(Le>0){const ke=255/Le;for(let Ae=0;Ae<E;Ae++)R[Ae]*=ke}return R}}var gt=f(66055);const wt=140,It=2;class Pt{constructor(n,a,g){const E=n.options,R=E.get(131),ne=E.get(133),_e=ne.minimap,Le=E.get(46),ke=E.get(67);this.renderMinimap=_e.renderMinimap,this.size=ke.size,this.minimapHeightIsEditorHeight=_e.minimapHeightIsEditorHeight,this.scrollBeyondLastLine=E.get(96),this.showSlider=ke.showSlider,this.autohide=ke.autohide,this.pixelRatio=R,this.typicalHalfwidthCharacterWidth=Le.typicalHalfwidthCharacterWidth,this.lineHeight=E.get(61),this.minimapLeft=_e.minimapLeft,this.minimapWidth=_e.minimapWidth,this.minimapHeight=ne.height,this.canvasInnerWidth=_e.minimapCanvasInnerWidth,this.canvasInnerHeight=_e.minimapCanvasInnerHeight,this.canvasOuterWidth=_e.minimapCanvasOuterWidth,this.canvasOuterHeight=_e.minimapCanvasOuterHeight,this.isSampling=_e.minimapIsSampling,this.editorHeight=ne.height,this.fontScale=_e.minimapScale,this.minimapLineHeight=_e.minimapLineHeight,this.minimapCharWidth=1*this.fontScale,this.charRenderer=(0,be.O)(()=>$e.create(this.fontScale,Le.fontFamily)),this.defaultBackgroundColor=g.getColor(2),this.backgroundColor=Pt._getMinimapBackground(a,this.defaultBackgroundColor),this.foregroundAlpha=Pt._getMinimapForegroundOpacity(a)}static _getMinimapBackground(n,a){const g=n.getColor(yn.ILr);return g?new b(g.rgba.r,g.rgba.g,g.rgba.b,Math.round(255*g.rgba.a)):a}static _getMinimapForegroundOpacity(n){const a=n.getColor(yn.K1Z);return a?b._clamp(Math.round(255*a.rgba.a)):255}equals(n){return this.renderMinimap===n.renderMinimap&&this.size===n.size&&this.minimapHeightIsEditorHeight===n.minimapHeightIsEditorHeight&&this.scrollBeyondLastLine===n.scrollBeyondLastLine&&this.showSlider===n.showSlider&&this.autohide===n.autohide&&this.pixelRatio===n.pixelRatio&&this.typicalHalfwidthCharacterWidth===n.typicalHalfwidthCharacterWidth&&this.lineHeight===n.lineHeight&&this.minimapLeft===n.minimapLeft&&this.minimapWidth===n.minimapWidth&&this.minimapHeight===n.minimapHeight&&this.canvasInnerWidth===n.canvasInnerWidth&&this.canvasInnerHeight===n.canvasInnerHeight&&this.canvasOuterWidth===n.canvasOuterWidth&&this.canvasOuterHeight===n.canvasOuterHeight&&this.isSampling===n.isSampling&&this.editorHeight===n.editorHeight&&this.fontScale===n.fontScale&&this.minimapLineHeight===n.minimapLineHeight&&this.minimapCharWidth===n.minimapCharWidth&&this.defaultBackgroundColor&&this.defaultBackgroundColor.equals(n.defaultBackgroundColor)&&this.backgroundColor&&this.backgroundColor.equals(n.backgroundColor)&&this.foregroundAlpha===n.foregroundAlpha}}class Wt{constructor(n,a,g,E,R,ne,_e,Le){this.scrollTop=n,this.scrollHeight=a,this.sliderNeeded=g,this._computedSliderRatio=E,this.sliderTop=R,this.sliderHeight=ne,this.startLineNumber=_e,this.endLineNumber=Le}getDesiredScrollTopFromDelta(n){return Math.round(this.scrollTop+n/this._computedSliderRatio)}getDesiredScrollTopFromTouchLocation(n){return Math.round((n-this.sliderHeight/2)/this._computedSliderRatio)}static create(n,a,g,E,R,ne,_e,Le,ke,Ae,je){const Xe=n.pixelRatio,it=n.minimapLineHeight,yt=Math.floor(n.canvasInnerHeight/it),Nt=n.lineHeight;if(n.minimapHeightIsEditorHeight){const li=Le*n.lineHeight+(n.scrollBeyondLastLine?R-n.lineHeight:0),en=Math.max(1,Math.floor(R*R/li)),Xi=Math.max(0,n.minimapHeight-en),Hi=Xi/(Ae-R),on=ke*Hi,Kn=Xi>0,Qi=Math.floor(n.canvasInnerHeight/n.minimapLineHeight);return new Wt(ke,Ae,Kn,Hi,on,en,1,Math.min(_e,Qi))}let Ft;if(ne&&g!==_e){const li=g-a+1;Ft=Math.floor(li*it/Xe)}else{const li=R/Nt;Ft=Math.floor(li*it/Xe)}let Ut;n.scrollBeyondLastLine?Ut=(_e-1)*it/Xe:Ut=Math.max(0,_e*it/Xe-Ft),Ut=Math.min(n.minimapHeight-Ft,Ut);const ui=Ut/(Ae-R),qt=ke*ui;let ji=0;if(n.scrollBeyondLastLine&&(ji=R/Nt-1),yt>=_e+ji){const en=_e,Xi=Ut>0;return new Wt(ke,Ae,Xi,ui,qt,Ft,1,en)}else{let li=Math.max(1,Math.floor(a-qt*Xe/it));je&&je.scrollHeight===Ae&&(je.scrollTop>ke&&(li=Math.min(li,je.startLineNumber)),je.scrollTop<ke&&(li=Math.max(li,je.startLineNumber)));const en=Math.min(_e,li+yt-1),Xi=(ke-E)/Nt,Hi=(a-li+Xi)*it/Xe;return new Wt(ke,Ae,!0,ui,Hi,Ft,li,en)}}}class Xt{constructor(n){this.dy=n}onContentChanged(){this.dy=-1}onTokensChanged(){this.dy=-1}}Xt.INVALID=new Xt(-1);class mi{constructor(n,a,g){this.renderedLayout=n,this._imageData=a,this._renderedLines=new xn(()=>Xt.INVALID),this._renderedLines._set(n.startLineNumber,g)}linesEquals(n){if(!this.scrollEquals(n))return!1;const g=this._renderedLines._get().lines;for(let E=0,R=g.length;E<R;E++)if(g[E].dy===-1)return!1;return!0}scrollEquals(n){return this.renderedLayout.startLineNumber===n.startLineNumber&&this.renderedLayout.endLineNumber===n.endLineNumber}_get(){const n=this._renderedLines._get();return{imageData:this._imageData,rendLineNumberStart:n.rendLineNumberStart,lines:n.lines}}onLinesChanged(n,a){return this._renderedLines.onLinesChanged(n,a)}onLinesDeleted(n,a){this._renderedLines.onLinesDeleted(n,a)}onLinesInserted(n,a){this._renderedLines.onLinesInserted(n,a)}onTokensChanged(n){return this._renderedLines.onTokensChanged(n)}}class Ii{constructor(n,a,g,E){this._backgroundFillData=Ii._createBackgroundFillData(a,g,E),this._buffers=[n.createImageData(a,g),n.createImageData(a,g)],this._lastUsedBuffer=0}getBuffer(){this._lastUsedBuffer=1-this._lastUsedBuffer;const n=this._buffers[this._lastUsedBuffer];return n.data.set(this._backgroundFillData),n}static _createBackgroundFillData(n,a,g){const E=g.r,R=g.g,ne=g.b,_e=g.a,Le=new Uint8ClampedArray(n*a*4);let ke=0;for(let Ae=0;Ae<a;Ae++)for(let je=0;je<n;je++)Le[ke]=E,Le[ke+1]=R,Le[ke+2]=ne,Le[ke+3]=_e,ke+=4;return Le}}class Ji{constructor(n,a){this.samplingRatio=n,this.minimapLines=a}static compute(n,a,g){if(n.renderMinimap===0||!n.isSampling)return[null,[]];const E=n.pixelRatio,R=n.lineHeight,ne=n.scrollBeyondLastLine,{minimapLineCount:_e}=ee.xZ.computeContainedMinimapLineCount({viewLineCount:a,scrollBeyondLastLine:ne,height:n.editorHeight,lineHeight:R,pixelRatio:E}),Le=a/_e,ke=Le/2;if(!g||g.minimapLines.length===0){const qt=[];if(qt[0]=1,_e>1){for(let ji=0,li=_e-1;ji<li;ji++)qt[ji]=Math.round(ji*Le+ke);qt[_e-1]=a}return[new Ji(Le,qt),[]]}const Ae=g.minimapLines,je=Ae.length,Xe=[];let it=0,yt=0,Nt=1;const Ft=10;let Ut=[],ui=null;for(let qt=0;qt<_e;qt++){const ji=Math.max(Nt,Math.round(qt*Le)),li=Math.max(ji,Math.round((qt+1)*Le));for(;it<je&&Ae[it]<ji;){if(Ut.length<Ft){const Xi=it+1+yt;ui&&ui.type==="deleted"&&ui._oldIndex===it-1?ui.deleteToLineNumber++:(ui={type:"deleted",_oldIndex:it,deleteFromLineNumber:Xi,deleteToLineNumber:Xi},Ut.push(ui)),yt--}it++}let en;if(it<je&&Ae[it]<=li)en=Ae[it],it++;else if(qt===0?en=1:qt+1===_e?en=a:en=Math.round(qt*Le+ke),Ut.length<Ft){const Xi=it+1+yt;ui&&ui.type==="inserted"&&ui._i===qt-1?ui.insertToLineNumber++:(ui={type:"inserted",_i:qt,insertFromLineNumber:Xi,insertToLineNumber:Xi},Ut.push(ui)),yt++}Xe[qt]=en,Nt=en}if(Ut.length<Ft)for(;it<je;){const qt=it+1+yt;ui&&ui.type==="deleted"&&ui._oldIndex===it-1?ui.deleteToLineNumber++:(ui={type:"deleted",_oldIndex:it,deleteFromLineNumber:qt,deleteToLineNumber:qt},Ut.push(ui)),yt--,it++}else Ut=[{type:"flush"}];return[new Ji(Le,Xe),Ut]}modelLineToMinimapLine(n){return Math.min(this.minimapLines.length,Math.max(1,Math.round(n/this.samplingRatio)))}modelLineRangeToMinimapLineRange(n,a){let g=this.modelLineToMinimapLine(n)-1;for(;g>0&&this.minimapLines[g-1]>=n;)g--;let E=this.modelLineToMinimapLine(a)-1;for(;E+1<this.minimapLines.length&&this.minimapLines[E+1]<=a;)E++;if(g===E){const R=this.minimapLines[g];if(R<n||R>a)return null}return[g+1,E+1]}decorationLineRangeToMinimapLineRange(n,a){let g=this.modelLineToMinimapLine(n),E=this.modelLineToMinimapLine(a);return n!==a&&E===g&&(E===this.minimapLines.length?g>1&&g--:E++),[g,E]}onLinesDeleted(n){const a=n.toLineNumber-n.fromLineNumber+1;let g=this.minimapLines.length,E=0;for(let R=this.minimapLines.length-1;R>=0&&!(this.minimapLines[R]<n.fromLineNumber);R--)this.minimapLines[R]<=n.toLineNumber?(this.minimapLines[R]=Math.max(1,n.fromLineNumber-1),g=Math.min(g,R),E=Math.max(E,R)):this.minimapLines[R]-=a;return[g,E]}onLinesInserted(n){const a=n.toLineNumber-n.fromLineNumber+1;for(let g=this.minimapLines.length-1;g>=0&&!(this.minimapLines[g]<n.fromLineNumber);g--)this.minimapLines[g]+=a}}class In extends Ue{constructor(n){super(n),this.tokensColorTracker=P.getInstance(),this._selections=[],this._minimapSelections=null,this.options=new Pt(this._context.configuration,this._context.theme,this.tokensColorTracker);const[a]=Ji.compute(this.options,this._context.viewModel.getLineCount(),null);this._samplingState=a,this._shouldCheckSampling=!1,this._actual=new Mi(n.theme,this)}dispose(){this._actual.dispose(),super.dispose()}getDomNode(){return this._actual.getDomNode()}_onOptionsMaybeChanged(){const n=new Pt(this._context.configuration,this._context.theme,this.tokensColorTracker);return this.options.equals(n)?!1:(this.options=n,this._recreateLineSampling(),this._actual.onDidChangeOptions(),!0)}onConfigurationChanged(n){return this._onOptionsMaybeChanged()}onCursorStateChanged(n){return this._selections=n.selections,this._minimapSelections=null,this._actual.onSelectionChanged()}onDecorationsChanged(n){return n.affectsMinimap?this._actual.onDecorationsChanged():!1}onFlushed(n){return this._samplingState&&(this._shouldCheckSampling=!0),this._actual.onFlushed()}onLinesChanged(n){if(this._samplingState){const a=this._samplingState.modelLineRangeToMinimapLineRange(n.fromLineNumber,n.fromLineNumber+n.count-1);return a?this._actual.onLinesChanged(a[0],a[1]-a[0]+1):!1}else return this._actual.onLinesChanged(n.fromLineNumber,n.count)}onLinesDeleted(n){if(this._samplingState){const[a,g]=this._samplingState.onLinesDeleted(n);return a<=g&&this._actual.onLinesChanged(a+1,g-a+1),this._shouldCheckSampling=!0,!0}else return this._actual.onLinesDeleted(n.fromLineNumber,n.toLineNumber)}onLinesInserted(n){return this._samplingState?(this._samplingState.onLinesInserted(n),this._shouldCheckSampling=!0,!0):this._actual.onLinesInserted(n.fromLineNumber,n.toLineNumber)}onScrollChanged(n){return this._actual.onScrollChanged()}onThemeChanged(n){return this._actual.onThemeChanged(),this._onOptionsMaybeChanged(),!0}onTokensChanged(n){if(this._samplingState){const a=[];for(const g of n.ranges){const E=this._samplingState.modelLineRangeToMinimapLineRange(g.fromLineNumber,g.toLineNumber);E&&a.push({fromLineNumber:E[0],toLineNumber:E[1]})}return a.length?this._actual.onTokensChanged(a):!1}else return this._actual.onTokensChanged(n.ranges)}onTokensColorsChanged(n){return this._onOptionsMaybeChanged(),this._actual.onTokensColorsChanged()}onZonesChanged(n){return this._actual.onZonesChanged()}prepareRender(n){this._shouldCheckSampling&&(this._shouldCheckSampling=!1,this._recreateLineSampling())}render(n){let a=n.visibleRange.startLineNumber,g=n.visibleRange.endLineNumber;this._samplingState&&(a=this._samplingState.modelLineToMinimapLine(a),g=this._samplingState.modelLineToMinimapLine(g));const E={viewportContainsWhitespaceGaps:n.viewportData.whitespaceViewportData.length>0,scrollWidth:n.scrollWidth,scrollHeight:n.scrollHeight,viewportStartLineNumber:a,viewportEndLineNumber:g,viewportStartLineNumberVerticalOffset:n.getVerticalOffsetForLineNumber(a),scrollTop:n.scrollTop,scrollLeft:n.scrollLeft,viewportWidth:n.viewportWidth,viewportHeight:n.viewportHeight};this._actual.render(E)}_recreateLineSampling(){this._minimapSelections=null;const n=!!this._samplingState,[a,g]=Ji.compute(this.options,this._context.viewModel.getLineCount(),this._samplingState);if(this._samplingState=a,n&&this._samplingState)for(const E of g)switch(E.type){case"deleted":this._actual.onLinesDeleted(E.deleteFromLineNumber,E.deleteToLineNumber);break;case"inserted":this._actual.onLinesInserted(E.insertFromLineNumber,E.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(n){return this._samplingState?this._context.viewModel.getLineContent(this._samplingState.minimapLines[n-1]):this._context.viewModel.getLineContent(n)}getLineMaxColumn(n){return this._samplingState?this._context.viewModel.getLineMaxColumn(this._samplingState.minimapLines[n-1]):this._context.viewModel.getLineMaxColumn(n)}getMinimapLinesRenderingData(n,a,g){if(this._samplingState){const E=[];for(let R=0,ne=a-n+1;R<ne;R++)g[R]?E[R]=this._context.viewModel.getViewLineData(this._samplingState.minimapLines[n+R-1]):E[R]=null;return E}return this._context.viewModel.getMinimapLinesRenderingData(n,a,g).data}getSelections(){if(this._minimapSelections===null)if(this._samplingState){this._minimapSelections=[];for(const n of this._selections){const[a,g]=this._samplingState.decorationLineRangeToMinimapLineRange(n.startLineNumber,n.endLineNumber);this._minimapSelections.push(new O.L(a,n.startColumn,g,n.endColumn))}}else this._minimapSelections=this._selections;return this._minimapSelections}getMinimapDecorationsInViewport(n,a){let g;if(this._samplingState){const R=this._samplingState.minimapLines[n-1],ne=this._samplingState.minimapLines[a-1];g=new Te.Q(R,1,ne,this._context.viewModel.getLineMaxColumn(ne))}else g=new Te.Q(n,1,a,this._context.viewModel.getLineMaxColumn(a));const E=this._context.viewModel.getDecorationsInViewport(g);if(this._samplingState){const R=[];for(const ne of E){if(!ne.options.minimap)continue;const _e=ne.range,Le=this._samplingState.modelLineToMinimapLine(_e.startLineNumber),ke=this._samplingState.modelLineToMinimapLine(_e.endLineNumber);R.push(new M.vo(new Te.Q(Le,_e.startColumn,ke,_e.endColumn),ne.options))}return R}return E}getOptions(){return this._context.viewModel.model.getOptions()}revealLineNumber(n){this._samplingState&&(n=this._samplingState.minimapLines[n-1]),this._context.viewModel.revealRange("mouse",!1,new Te.Q(n,1,n,1),1,0)}setScrollTop(n){this._context.viewModel.viewLayout.setScrollPosition({scrollTop:n},1)}}class Mi extends _.jG{constructor(n,a){super(),this._renderDecorations=!1,this._gestureInProgress=!1,this._theme=n,this._model=a,this._lastRenderData=null,this._buffers=null,this._selectionColor=this._theme.getColor(yn.yr0),this._domNode=(0,ot.Z)(document.createElement("div")),Re.write(this._domNode,8),this._domNode.setClassName(this._getMinimapDomNodeClassName()),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._shadow=(0,ot.Z)(document.createElement("div")),this._shadow.setClassName("minimap-shadow-hidden"),this._domNode.appendChild(this._shadow),this._canvas=(0,ot.Z)(document.createElement("canvas")),this._canvas.setPosition("absolute"),this._canvas.setLeft(0),this._domNode.appendChild(this._canvas),this._decorationsCanvas=(0,ot.Z)(document.createElement("canvas")),this._decorationsCanvas.setPosition("absolute"),this._decorationsCanvas.setClassName("minimap-decorations-layer"),this._decorationsCanvas.setLeft(0),this._domNode.appendChild(this._decorationsCanvas),this._slider=(0,ot.Z)(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=(0,ot.Z)(document.createElement("div")),this._sliderHorizontal.setPosition("absolute"),this._sliderHorizontal.setClassName("minimap-slider-horizontal"),this._slider.appendChild(this._sliderHorizontal),this._applyLayout(),this._pointerDownListener=J.b2(this._domNode.domNode,J.Bx.POINTER_DOWN,g=>{if(g.preventDefault(),this._model.options.renderMinimap===0||!this._lastRenderData)return;if(this._model.options.size!=="proportional"){if(g.button===0&&this._lastRenderData){const ke=J.BK(this._slider.domNode),Ae=ke.top+ke.height/2;this._startSliderDragging(g,Ae,this._lastRenderData.renderedLayout)}return}const R=this._model.options.minimapLineHeight,ne=this._model.options.canvasInnerHeight/this._model.options.canvasOuterHeight*g.offsetY;let Le=Math.floor(ne/R)+this._lastRenderData.renderedLayout.startLineNumber;Le=Math.min(Le,this._model.getLineCount()),this._model.revealLineNumber(Le)}),this._sliderPointerMoveMonitor=new qe._,this._sliderPointerDownListener=J.b2(this._slider.domNode,J.Bx.POINTER_DOWN,g=>{g.preventDefault(),g.stopPropagation(),g.button===0&&this._lastRenderData&&this._startSliderDragging(g,g.pageY,this._lastRenderData.renderedLayout)}),this._gestureDisposable=lt.q.addTarget(this._domNode.domNode),this._sliderTouchStartListener=J.ko(this._domNode.domNode,lt.B.Start,g=>{g.preventDefault(),g.stopPropagation(),this._lastRenderData&&(this._slider.toggleClassName("active",!0),this._gestureInProgress=!0,this.scrollDueToTouchEvent(g))},{passive:!1}),this._sliderTouchMoveListener=J.ko(this._domNode.domNode,lt.B.Change,g=>{g.preventDefault(),g.stopPropagation(),this._lastRenderData&&this._gestureInProgress&&this.scrollDueToTouchEvent(g)},{passive:!1}),this._sliderTouchEndListener=J.b2(this._domNode.domNode,lt.B.End,g=>{g.preventDefault(),g.stopPropagation(),this._gestureInProgress=!1,this._slider.toggleClassName("active",!1)})}_startSliderDragging(n,a,g){if(!n.target||!(n.target instanceof Element))return;const E=n.pageX;this._slider.toggleClassName("active",!0);const R=(ne,_e)=>{const Le=Math.abs(_e-E);if(D.uF&&Le>wt){this._model.setScrollTop(g.scrollTop);return}const ke=ne-a;this._model.setScrollTop(g.getDesiredScrollTopFromDelta(ke))};n.pageY!==a&&R(n.pageY,E),this._sliderPointerMoveMonitor.startMonitoring(n.target,n.pointerId,n.buttons,ne=>R(ne.pageY,ne.pageX),()=>{this._slider.toggleClassName("active",!1)})}scrollDueToTouchEvent(n){const a=this._domNode.domNode.getBoundingClientRect().top,g=this._lastRenderData.renderedLayout.getDesiredScrollTopFromTouchLocation(n.pageY-a);this._model.setScrollTop(g)}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 n=["minimap"];return this._model.options.showSlider==="always"?n.push("slider-always"):n.push("slider-mouseover"),this._model.options.autohide&&n.push("autohide"),n.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 Ii(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(n,a){return this._lastRenderData?this._lastRenderData.onLinesChanged(n,a):!1}onLinesDeleted(n,a){var g;return(g=this._lastRenderData)===null||g===void 0||g.onLinesDeleted(n,a),!0}onLinesInserted(n,a){var g;return(g=this._lastRenderData)===null||g===void 0||g.onLinesInserted(n,a),!0}onScrollChanged(){return this._renderDecorations=!0,!0}onThemeChanged(){return this._selectionColor=this._theme.getColor(yn.yr0),this._renderDecorations=!0,!0}onTokensChanged(n){return this._lastRenderData?this._lastRenderData.onTokensChanged(n):!1}onTokensColorsChanged(){return this._lastRenderData=null,this._buffers=null,!0}onZonesChanged(){return this._lastRenderData=null,!0}render(n){if(this._model.options.renderMinimap===0){this._shadow.setClassName("minimap-shadow-hidden"),this._sliderHorizontal.setWidth(0),this._sliderHorizontal.setHeight(0);return}n.scrollLeft+n.viewportWidth>=n.scrollWidth?this._shadow.setClassName("minimap-shadow-hidden"):this._shadow.setClassName("minimap-shadow-visible");const g=Wt.create(this._model.options,n.viewportStartLineNumber,n.viewportEndLineNumber,n.viewportStartLineNumberVerticalOffset,n.viewportHeight,n.viewportContainsWhitespaceGaps,this._model.getLineCount(),this._model.getRealLineCount(),n.scrollTop,n.scrollHeight,this._lastRenderData?this._lastRenderData.renderedLayout:null);this._slider.setDisplay(g.sliderNeeded?"block":"none"),this._slider.setTop(g.sliderTop),this._slider.setHeight(g.sliderHeight),this._sliderHorizontal.setLeft(0),this._sliderHorizontal.setWidth(this._model.options.minimapWidth),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(g.sliderHeight),this.renderDecorations(g),this._lastRenderData=this.renderLines(g)}renderDecorations(n){if(this._renderDecorations){this._renderDecorations=!1;const a=this._model.getSelections();a.sort(Te.Q.compareRangesUsingStarts);const g=this._model.getMinimapDecorationsInViewport(n.startLineNumber,n.endLineNumber);g.sort((Xe,it)=>(Xe.options.zIndex||0)-(it.options.zIndex||0));const{canvasInnerWidth:E,canvasInnerHeight:R}=this._model.options,ne=this._model.options.minimapLineHeight,_e=this._model.options.minimapCharWidth,Le=this._model.getOptions().tabSize,ke=this._decorationsCanvas.domNode.getContext("2d");ke.clearRect(0,0,E,R);const Ae=new Vi(n.startLineNumber,n.endLineNumber,!1);this._renderSelectionLineHighlights(ke,a,Ae,n,ne),this._renderDecorationsLineHighlights(ke,g,Ae,n,ne);const je=new Vi(n.startLineNumber,n.endLineNumber,null);this._renderSelectionsHighlights(ke,a,je,n,ne,Le,_e,E),this._renderDecorationsHighlights(ke,g,je,n,ne,Le,_e,E)}}_renderSelectionLineHighlights(n,a,g,E,R){if(!this._selectionColor||this._selectionColor.isTransparent())return;n.fillStyle=this._selectionColor.transparent(.5).toString();let ne=0,_e=0;for(const Le of a){const ke=Math.max(E.startLineNumber,Le.startLineNumber),Ae=Math.min(E.endLineNumber,Le.endLineNumber);if(ke>Ae)continue;for(let it=ke;it<=Ae;it++)g.set(it,!0);const je=(ke-E.startLineNumber)*R,Xe=(Ae-E.startLineNumber)*R+R;_e>=je||(_e>ne&&n.fillRect(ee.xq,ne,n.canvas.width,_e-ne),ne=je),_e=Xe}_e>ne&&n.fillRect(ee.xq,ne,n.canvas.width,_e-ne)}_renderDecorationsLineHighlights(n,a,g,E,R){const ne=new Map;for(let _e=a.length-1;_e>=0;_e--){const Le=a[_e],ke=Le.options.minimap;if(!ke||ke.position!==gt.R3.Inline)continue;const Ae=Math.max(E.startLineNumber,Le.range.startLineNumber),je=Math.min(E.endLineNumber,Le.range.endLineNumber);if(Ae>je)continue;const Xe=ke.getColor(this._theme.value);if(!Xe||Xe.isTransparent())continue;let it=ne.get(Xe.toString());it||(it=Xe.transparent(.5).toString(),ne.set(Xe.toString(),it)),n.fillStyle=it;for(let yt=Ae;yt<=je;yt++){if(g.has(yt))continue;g.set(yt,!0);const Nt=(Ae-E.startLineNumber)*R;n.fillRect(ee.xq,Nt,n.canvas.width,R)}}}_renderSelectionsHighlights(n,a,g,E,R,ne,_e,Le){if(!(!this._selectionColor||this._selectionColor.isTransparent()))for(const ke of a){const Ae=Math.max(E.startLineNumber,ke.startLineNumber),je=Math.min(E.endLineNumber,ke.endLineNumber);if(!(Ae>je))for(let Xe=Ae;Xe<=je;Xe++)this.renderDecorationOnLine(n,g,ke,this._selectionColor,E,Xe,R,R,ne,_e,Le)}}_renderDecorationsHighlights(n,a,g,E,R,ne,_e,Le){for(const ke of a){const Ae=ke.options.minimap;if(!Ae)continue;const je=Math.max(E.startLineNumber,ke.range.startLineNumber),Xe=Math.min(E.endLineNumber,ke.range.endLineNumber);if(je>Xe)continue;const it=Ae.getColor(this._theme.value);if(!(!it||it.isTransparent()))for(let yt=je;yt<=Xe;yt++)switch(Ae.position){case gt.R3.Inline:this.renderDecorationOnLine(n,g,ke.range,it,E,yt,R,R,ne,_e,Le);continue;case gt.R3.Gutter:{const Nt=(yt-E.startLineNumber)*R,Ft=2;this.renderDecoration(n,it,Ft,Nt,It,R);continue}}}}renderDecorationOnLine(n,a,g,E,R,ne,_e,Le,ke,Ae,je){const Xe=(ne-R.startLineNumber)*Le;if(Xe+_e<0||Xe>this._model.options.canvasInnerHeight)return;const{startLineNumber:it,endLineNumber:yt}=g,Nt=it===ne?g.startColumn:1,Ft=yt===ne?g.endColumn:this._model.getLineMaxColumn(ne),Ut=this.getXOffsetForPosition(a,ne,Nt,ke,Ae,je),ui=this.getXOffsetForPosition(a,ne,Ft,ke,Ae,je);this.renderDecoration(n,E,Ut,Xe,ui-Ut,_e)}getXOffsetForPosition(n,a,g,E,R,ne){if(g===1)return ee.xq;if((g-1)*R>=ne)return ne;let Le=n.get(a);if(!Le){const ke=this._model.getLineContent(a);Le=[ee.xq];let Ae=ee.xq;for(let je=1;je<ke.length+1;je++){const Xe=ke.charCodeAt(je-1),it=Xe===9?E*R:Vt.ne(Xe)?2*R:R,yt=Ae+it;if(yt>=ne){Le[je]=ne;break}Le[je]=yt,Ae=yt}n.set(a,Le)}return g-1<Le.length?Le[g-1]:ne}renderDecoration(n,a,g,E,R,ne){n.fillStyle=a&&a.toString()||"",n.fillRect(g,E,R,ne)}renderLines(n){const a=n.startLineNumber,g=n.endLineNumber,E=this._model.options.minimapLineHeight;if(this._lastRenderData&&this._lastRenderData.linesEquals(n)){const Hn=this._lastRenderData._get();return new mi(n,Hn.imageData,Hn.lines)}const R=this._getBuffer();if(!R)return null;const[ne,_e,Le]=Mi._renderUntouchedLines(R,a,g,E,this._lastRenderData),ke=this._model.getMinimapLinesRenderingData(a,g,Le),Ae=this._model.getOptions().tabSize,je=this._model.options.defaultBackgroundColor,Xe=this._model.options.backgroundColor,it=this._model.options.foregroundAlpha,yt=this._model.tokensColorTracker,Nt=yt.backgroundIsLight(),Ft=this._model.options.renderMinimap,Ut=this._model.options.charRenderer(),ui=this._model.options.fontScale,qt=this._model.options.minimapCharWidth,li=(Ft===1?2:2+1)*ui,en=E>li?Math.floor((E-li)/2):0,Xi=Xe.a/255,Hi=new b(Math.round((Xe.r-je.r)*Xi+je.r),Math.round((Xe.g-je.g)*Xi+je.g),Math.round((Xe.b-je.b)*Xi+je.b),255);let on=0;const Kn=[];for(let Hn=0,Is=g-a+1;Hn<Is;Hn++)Le[Hn]&&Mi._renderLine(R,Hi,Xe.a,Nt,Ft,qt,yt,it,Ut,on,en,Ae,ke[Hn],ui,E),Kn[Hn]=new Xt(on),on+=E;const Qi=ne===-1?0:ne,gs=(_e===-1?R.height:_e)-Qi;return this._canvas.domNode.getContext("2d").putImageData(R,0,0,0,Qi,R.width,gs),new mi(n,R,Kn)}static _renderUntouchedLines(n,a,g,E,R){const ne=[];if(!R){for(let Hi=0,on=g-a+1;Hi<on;Hi++)ne[Hi]=!0;return[-1,-1,ne]}const _e=R._get(),Le=_e.imageData.data,ke=_e.rendLineNumberStart,Ae=_e.lines,je=Ae.length,Xe=n.width,it=n.data,yt=(g-a+1)*E*Xe*4;let Nt=-1,Ft=-1,Ut=-1,ui=-1,qt=-1,ji=-1,li=0;for(let Hi=a;Hi<=g;Hi++){const on=Hi-a,Kn=Hi-ke,Qi=Kn>=0&&Kn<je?Ae[Kn].dy:-1;if(Qi===-1){ne[on]=!0,li+=E;continue}const Vn=Qi*Xe*4,gs=(Qi+E)*Xe*4,ys=li*Xe*4,Hn=(li+E)*Xe*4;ui===Vn&&ji===ys?(ui=gs,ji=Hn):(Ut!==-1&&(it.set(Le.subarray(Ut,ui),qt),Nt===-1&&Ut===0&&Ut===qt&&(Nt=ui),Ft===-1&&ui===yt&&Ut===qt&&(Ft=Ut)),Ut=Vn,ui=gs,qt=ys,ji=Hn),ne[on]=!1,li+=E}Ut!==-1&&(it.set(Le.subarray(Ut,ui),qt),Nt===-1&&Ut===0&&Ut===qt&&(Nt=ui),Ft===-1&&ui===yt&&Ut===qt&&(Ft=Ut));const en=Nt===-1?-1:Nt/(Xe*4),Xi=Ft===-1?-1:Ft/(Xe*4);return[en,Xi,ne]}static _renderLine(n,a,g,E,R,ne,_e,Le,ke,Ae,je,Xe,it,yt,Nt){const Ft=it.content,Ut=it.tokens,ui=n.width-ne,qt=Nt===1;let ji=ee.xq,li=0,en=0;for(let Xi=0,Hi=Ut.getCount();Xi<Hi;Xi++){const on=Ut.getEndOffset(Xi),Kn=Ut.getForeground(Xi),Qi=_e.getColor(Kn);for(;li<on;li++){if(ji>ui)return;const Vn=Ft.charCodeAt(li);if(Vn===9){const gs=Xe-(li+en)%Xe;en+=gs-1,ji+=gs*ne}else if(Vn===32)ji+=ne;else{const gs=Vt.ne(Vn)?2:1;for(let ys=0;ys<gs;ys++)if(R===2?ke.blockRenderChar(n,ji,Ae+je,Qi,Le,a,g,qt):ke.renderChar(n,ji,Ae+je,Vn,Qi,Le,a,g,yt,E,qt),ji+=ne,ji>ui)return}}}}}class Vi{constructor(n,a,g){this._startLineNumber=n,this._endLineNumber=a,this._defaultValue=g,this._values=[];for(let E=0,R=this._endLineNumber-this._startLineNumber+1;E<R;E++)this._values[E]=g}has(n){return this.get(n)!==this._defaultValue}set(n,a){n<this._startLineNumber||n>this._endLineNumber||(this._values[n-this._startLineNumber]=a)}get(n){return n<this._startLineNumber||n>this._endLineNumber?this._defaultValue:this._values[n-this._startLineNumber]}}(0,ai.zy)((Je,n)=>{const a=Je.getColor(yn.rB3);a&&n.addRule(`.monaco-editor .minimap-slider .minimap-slider-horizontal { background: ${a}; }`);const g=Je.getColor(yn.Rig);g&&n.addRule(`.monaco-editor .minimap-slider:hover .minimap-slider-horizontal { background: ${g}; }`);const E=Je.getColor(yn.JVY);E&&n.addRule(`.monaco-editor .minimap-slider.active .minimap-slider-horizontal { background: ${E}; }`);const R=Je.getColor(yn.bXl);R&&n.addRule(`.monaco-editor .minimap-shadow-visible { box-shadow: ${R} -6px 0 6px -6px inset; }`)});var Os=f(48304);class bo extends Ue{constructor(n){super(n);const g=this._context.configuration.options.get(133);this._widgets={},this._verticalScrollbarWidth=g.verticalScrollbarWidth,this._minimapWidth=g.minimap.minimapWidth,this._horizontalScrollbarHeight=g.horizontalScrollbarHeight,this._editorHeight=g.height,this._editorWidth=g.width,this._domNode=(0,ot.Z)(document.createElement("div")),Re.write(this._domNode,4),this._domNode.setClassName("overlayWidgets")}dispose(){super.dispose(),this._widgets={}}getDomNode(){return this._domNode}onConfigurationChanged(n){const g=this._context.configuration.options.get(133);return this._verticalScrollbarWidth=g.verticalScrollbarWidth,this._minimapWidth=g.minimap.minimapWidth,this._horizontalScrollbarHeight=g.horizontalScrollbarHeight,this._editorHeight=g.height,this._editorWidth=g.width,!0}addWidget(n){const a=(0,ot.Z)(n.getDomNode());this._widgets[n.getId()]={widget:n,preference:null,domNode:a},a.setPosition("absolute"),a.setAttribute("widgetId",n.getId()),this._domNode.appendChild(a),this.setShouldRender()}setWidgetPosition(n,a){const g=this._widgets[n.getId()];return g.preference===a?!1:(g.preference=a,this.setShouldRender(),!0)}removeWidget(n){const a=n.getId();if(this._widgets.hasOwnProperty(a)){const E=this._widgets[a].domNode.domNode;delete this._widgets[a],E.parentNode.removeChild(E),this.setShouldRender()}}_renderWidget(n){const a=n.domNode;if(n.preference===null){a.setTop("");return}if(n.preference===0)a.setTop(0),a.setRight(2*this._verticalScrollbarWidth+this._minimapWidth);else if(n.preference===1){const g=a.domNode.clientHeight;a.setTop(this._editorHeight-g-2*this._horizontalScrollbarHeight),a.setRight(2*this._verticalScrollbarWidth+this._minimapWidth)}else n.preference===2&&(a.setTop(0),a.domNode.style.right="50%")}prepareRender(n){}render(n){this._domNode.setWidth(this._editorWidth);const a=Object.keys(this._widgets);for(let g=0,E=a.length;g<E;g++){const R=a[g];this._renderWidget(this._widgets[R])}}}class ns{constructor(n,a){const g=n.options;this.lineHeight=g.get(61),this.pixelRatio=g.get(131),this.overviewRulerLanes=g.get(76),this.renderBorder=g.get(75);const E=a.getColor(Jt.x9);this.borderColor=E?E.toString():null,this.hideCursor=g.get(54);const R=a.getColor(Jt.D0);this.cursorColor=R?R.transparent(.7).toString():null,this.themeType=a.type;const ne=g.get(67),_e=ne.enabled,Le=ne.side,ke=a.getColor(Jt.Xr),Ae=qi.dG.getDefaultBackground();let je=null;ke!==void 0?je=ke:_e&&(je=Ae),je===null||Le==="left"?this.backgroundColor=null:this.backgroundColor=Pi.Q1.Format.CSS.formatHex(je);const it=g.get(133).overviewRuler;this.top=it.top,this.right=it.right,this.domWidth=it.width,this.domHeight=it.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[yt,Nt]=this._initLanes(1,this.canvasWidth,this.overviewRulerLanes);this.x=yt,this.w=Nt}_initLanes(n,a,g){const E=a-n;if(g>=3){const R=Math.floor(E/3),ne=Math.floor(E/3),_e=E-R-ne,Le=n,ke=Le+R,Ae=Le+R+_e;return[[0,Le,ke,Le,Ae,Le,ke,Le],[0,R,_e,R+_e,ne,R+_e+ne,_e+ne,R+_e+ne]]}else if(g===2){const R=Math.floor(E/2),ne=E-R,_e=n,Le=_e+R;return[[0,_e,_e,_e,Le,_e,_e,_e],[0,R,R,R,ne,R+ne,R+ne,R+ne]]}else{const R=n,ne=E;return[[0,R,R,R,R,R,R,R],[0,ne,ne,ne,ne,ne,ne,ne]]}}equals(n){return this.lineHeight===n.lineHeight&&this.pixelRatio===n.pixelRatio&&this.overviewRulerLanes===n.overviewRulerLanes&&this.renderBorder===n.renderBorder&&this.borderColor===n.borderColor&&this.hideCursor===n.hideCursor&&this.cursorColor===n.cursorColor&&this.themeType===n.themeType&&this.backgroundColor===n.backgroundColor&&this.top===n.top&&this.right===n.right&&this.domWidth===n.domWidth&&this.domHeight===n.domHeight&&this.canvasWidth===n.canvasWidth&&this.canvasHeight===n.canvasHeight}}class oo extends Ue{constructor(n){super(n),this._domNode=(0,ot.Z)(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=qi.dG.onDidChange(a=>{a.changedColorMap&&this._updateSettings(!0)}),this._cursorPositions=[]}dispose(){super.dispose(),this._tokensColorTrackerListener.dispose()}_updateSettings(n){const a=new ns(this._context.configuration,this._context.theme);return this._settings&&this._settings.equals(a)?!1:(this._settings=a,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,n&&this._render(),!0)}onConfigurationChanged(n){return this._updateSettings(!1)}onCursorStateChanged(n){this._cursorPositions=[];for(let a=0,g=n.selections.length;a<g;a++)this._cursorPositions[a]=n.selections[a].getPosition();return this._cursorPositions.sort(Di.y.compare),!0}onDecorationsChanged(n){return!!n.affectsOverviewRuler}onFlushed(n){return!0}onScrollChanged(n){return n.scrollHeightChanged}onZonesChanged(n){return!0}onThemeChanged(n){return this._updateSettings(!1)}getDomNode(){return this._domNode.domNode}prepareRender(n){}render(n){this._render()}_render(){if(this._settings.overviewRulerLanes===0){this._domNode.setBackgroundColor(this._settings.backgroundColor?this._settings.backgroundColor:""),this._domNode.setDisplay("none");return}this._domNode.setDisplay("block");const n=this._settings.canvasWidth,a=this._settings.canvasHeight,g=this._settings.lineHeight,E=this._context.viewLayout,R=this._context.viewLayout.getScrollHeight(),ne=a/R,_e=this._context.viewModel.getAllOverviewRulerDecorations(this._context.theme),Le=6*this._settings.pixelRatio|0,ke=Le/2|0,Ae=this._domNode.domNode.getContext("2d");this._settings.backgroundColor===null?Ae.clearRect(0,0,n,a):(Ae.fillStyle=this._settings.backgroundColor,Ae.fillRect(0,0,n,a));const je=this._settings.x,Xe=this._settings.w;_e.sort(M.Uv.cmp);for(const it of _e){const yt=it.color,Nt=it.data;Ae.fillStyle=yt;let Ft=0,Ut=0,ui=0;for(let qt=0,ji=Nt.length/3;qt<ji;qt++){const li=Nt[3*qt],en=Nt[3*qt+1],Xi=Nt[3*qt+2];let Hi=E.getVerticalOffsetForLineNumber(en)*ne|0,on=(E.getVerticalOffsetForLineNumber(Xi)+g)*ne|0;if(on-Hi<Le){let Qi=(Hi+on)/2|0;Qi<ke?Qi=ke:Qi+ke>a&&(Qi=a-ke),Hi=Qi-ke,on=Qi+ke}Hi>ui+1||li!==Ft?(qt!==0&&Ae.fillRect(je[Ft],Ut,Xe[Ft],ui-Ut),Ft=li,Ut=Hi,ui=on):on>ui&&(ui=on)}Ae.fillRect(je[Ft],Ut,Xe[Ft],ui-Ut)}if(!this._settings.hideCursor&&this._settings.cursorColor){const it=2*this._settings.pixelRatio|0,yt=it/2|0,Nt=this._settings.x[7],Ft=this._settings.w[7];Ae.fillStyle=this._settings.cursorColor;let Ut=-100,ui=-100;for(let qt=0,ji=this._cursorPositions.length;qt<ji;qt++){const li=this._cursorPositions[qt];let en=E.getVerticalOffsetForLineNumber(li.lineNumber)*ne|0;en<yt?en=yt:en+yt>a&&(en=a-yt);const Xi=en-yt,Hi=Xi+it;Xi>ui+1?(qt!==0&&Ae.fillRect(Nt,Ut,Ft,ui-Ut),Ut=Xi,ui=Hi):Hi>ui&&(ui=Hi)}Ae.fillRect(Nt,Ut,Ft,ui-Ut)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(Ae.beginPath(),Ae.lineWidth=1,Ae.strokeStyle=this._settings.borderColor,Ae.moveTo(0,0),Ae.lineTo(0,a),Ae.stroke(),Ae.moveTo(0,0),Ae.lineTo(n,0),Ae.stroke())}}var go=f(96803);class Ps extends Pe{constructor(n,a){super(),this._context=n;const g=this._context.configuration.options;this._domNode=(0,ot.Z)(document.createElement("canvas")),this._domNode.setClassName(a),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._zoneManager=new go.rW(E=>this._context.viewLayout.getVerticalOffsetForLineNumber(E)),this._zoneManager.setDOMWidth(0),this._zoneManager.setDOMHeight(0),this._zoneManager.setOuterHeight(this._context.viewLayout.getScrollHeight()),this._zoneManager.setLineHeight(g.get(61)),this._zoneManager.setPixelRatio(g.get(131)),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(n){const a=this._context.configuration.options;return n.hasChanged(61)&&(this._zoneManager.setLineHeight(a.get(61)),this._render()),n.hasChanged(131)&&(this._zoneManager.setPixelRatio(a.get(131)),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(n){return this._render(),!0}onScrollChanged(n){return n.scrollHeightChanged&&(this._zoneManager.setOuterHeight(n.scrollHeight),this._render()),!0}onZonesChanged(n){return this._render(),!0}getDomNode(){return this._domNode.domNode}setLayout(n){this._domNode.setTop(n.top),this._domNode.setRight(n.right);let a=!1;a=this._zoneManager.setDOMWidth(n.width)||a,a=this._zoneManager.setDOMHeight(n.height)||a,a&&(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(n){this._zoneManager.setZones(n),this._render()}_render(){if(this._zoneManager.getOuterHeight()===0)return!1;const n=this._zoneManager.getCanvasWidth(),a=this._zoneManager.getCanvasHeight(),g=this._zoneManager.resolveColorZones(),E=this._zoneManager.getId2Color(),R=this._domNode.domNode.getContext("2d");return R.clearRect(0,0,n,a),g.length>0&&this._renderOneLane(R,g,E,n),!0}_renderOneLane(n,a,g,E){let R=0,ne=0,_e=0;for(const Le of a){const ke=Le.colorId,Ae=Le.from,je=Le.to;ke!==R?(n.fillRect(0,ne,E,_e-ne),R=ke,n.fillStyle=g[R],ne=Ae,_e=je):_e>=Ae?_e=Math.max(_e,je):(n.fillRect(0,ne,E,_e-ne),ne=Ae,_e=je)}n.fillRect(0,ne,E,_e-ne)}}var Us=f(28252);class Js extends Ue{constructor(n){super(n),this.domNode=(0,ot.Z)(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("view-rulers"),this._renderedRulers=[];const a=this._context.configuration.options;this._rulers=a.get(93),this._typicalHalfwidthCharacterWidth=a.get(46).typicalHalfwidthCharacterWidth}dispose(){super.dispose()}onConfigurationChanged(n){const a=this._context.configuration.options;return this._rulers=a.get(93),this._typicalHalfwidthCharacterWidth=a.get(46).typicalHalfwidthCharacterWidth,!0}onScrollChanged(n){return n.scrollHeightChanged}prepareRender(n){}_ensureRulersCount(){const n=this._renderedRulers.length,a=this._rulers.length;if(n===a)return;if(n<a){const{tabSize:E}=this._context.viewModel.model.getOptions(),R=E;let ne=a-n;for(;ne>0;){const _e=(0,ot.Z)(document.createElement("div"));_e.setClassName("view-ruler"),_e.setWidth(R),this.domNode.appendChild(_e),this._renderedRulers.push(_e),ne--}return}let g=n-a;for(;g>0;){const E=this._renderedRulers.pop();this.domNode.removeChild(E),g--}}render(n){this._ensureRulersCount();for(let a=0,g=this._rulers.length;a<g;a++){const E=this._renderedRulers[a],R=this._rulers[a];E.setBoxShadow(R.color?`1px 0 0 0 ${R.color} inset`:""),E.setHeight(Math.min(n.scrollHeight,1e6)),E.setLeft(R.column*this._typicalHalfwidthCharacterWidth)}}}(0,ai.zy)((Je,n)=>{const a=Je.getColor(Jt.ik);a&&n.addRule(`.monaco-editor .view-ruler { box-shadow: 1px 0 0 0 ${a} inset; }`)});var Vs=f(40884);class Hr extends Ue{constructor(n){super(n),this._scrollTop=0,this._width=0,this._updateWidth(),this._shouldShow=!1;const g=this._context.configuration.options.get(94);this._useShadows=g.useShadows,this._domNode=(0,ot.Z)(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true")}dispose(){super.dispose()}_updateShouldShow(){const n=this._useShadows&&this._scrollTop>0;return this._shouldShow!==n?(this._shouldShow=n,!0):!1}getDomNode(){return this._domNode}_updateWidth(){const a=this._context.configuration.options.get(133);a.minimap.renderMinimap===0||a.minimap.minimapWidth>0&&a.minimap.minimapLeft===0?this._width=a.width:this._width=a.width-a.verticalScrollbarWidth}onConfigurationChanged(n){const g=this._context.configuration.options.get(94);return this._useShadows=g.useShadows,this._updateWidth(),this._updateShouldShow(),!0}onScrollChanged(n){return this._scrollTop=n.scrollTop,this._updateShouldShow()}prepareRender(n){}render(n){this._domNode.setWidth(this._width),this._domNode.setClassName(this._shouldShow?"scroll-decoration":"")}}(0,ai.zy)((Je,n)=>{const a=Je.getColor(yn.bXl);a&&n.addRule(`.monaco-editor .scroll-decoration { box-shadow: ${a} 0 6px 6px -6px inset; }`)});var ad=f(67340);class zr{constructor(n){this.left=n.left,this.width=n.width,this.startStyle=null,this.endStyle=null}}class la{constructor(n,a){this.lineNumber=n,this.ranges=a}}function Yn(Je){return new zr(Je)}function Cs(Je){return new la(Je.lineNumber,Je.ranges.map(Yn))}class hn extends di{constructor(n){super(),this._previousFrameVisibleRangesWithStyle=[],this._context=n;const a=this._context.configuration.options;this._lineHeight=a.get(61),this._roundedSelection=a.get(92),this._typicalHalfwidthCharacterWidth=a.get(46).typicalHalfwidthCharacterWidth,this._selections=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(n){const a=this._context.configuration.options;return this._lineHeight=a.get(61),this._roundedSelection=a.get(92),this._typicalHalfwidthCharacterWidth=a.get(46).typicalHalfwidthCharacterWidth,!0}onCursorStateChanged(n){return this._selections=n.selections.slice(0),!0}onDecorationsChanged(n){return!0}onFlushed(n){return!0}onLinesChanged(n){return!0}onLinesDeleted(n){return!0}onLinesInserted(n){return!0}onScrollChanged(n){return n.scrollTopChanged}onZonesChanged(n){return!0}_visibleRangesHaveGaps(n){for(let a=0,g=n.length;a<g;a++)if(n[a].ranges.length>1)return!0;return!1}_enrichVisibleRangesWithStyle(n,a,g){const E=this._typicalHalfwidthCharacterWidth/4;let R=null,ne=null;if(g&&g.length>0&&a.length>0){const _e=a[0].lineNumber;if(_e===n.startLineNumber)for(let ke=0;!R&&ke<g.length;ke++)g[ke].lineNumber===_e&&(R=g[ke].ranges[0]);const Le=a[a.length-1].lineNumber;if(Le===n.endLineNumber)for(let ke=g.length-1;!ne&&ke>=0;ke--)g[ke].lineNumber===Le&&(ne=g[ke].ranges[0]);R&&!R.startStyle&&(R=null),ne&&!ne.startStyle&&(ne=null)}for(let _e=0,Le=a.length;_e<Le;_e++){const ke=a[_e].ranges[0],Ae=ke.left,je=ke.left+ke.width,Xe={top:0,bottom:0},it={top:0,bottom:0};if(_e>0){const yt=a[_e-1].ranges[0].left,Nt=a[_e-1].ranges[0].left+a[_e-1].ranges[0].width;Ir(Ae-yt)<E?Xe.top=2:Ae>yt&&(Xe.top=1),Ir(je-Nt)<E?it.top=2:yt<je&&je<Nt&&(it.top=1)}else R&&(Xe.top=R.startStyle.top,it.top=R.endStyle.top);if(_e+1<Le){const yt=a[_e+1].ranges[0].left,Nt=a[_e+1].ranges[0].left+a[_e+1].ranges[0].width;Ir(Ae-yt)<E?Xe.bottom=2:yt<Ae&&Ae<Nt&&(Xe.bottom=1),Ir(je-Nt)<E?it.bottom=2:je<Nt&&(it.bottom=1)}else ne&&(Xe.bottom=ne.startStyle.bottom,it.bottom=ne.endStyle.bottom);ke.startStyle=Xe,ke.endStyle=it}}_getVisibleRangesWithStyle(n,a,g){const R=(a.linesVisibleRangesForRange(n,!0)||[]).map(Cs);return!this._visibleRangesHaveGaps(R)&&this._roundedSelection&&this._enrichVisibleRangesWithStyle(a.visibleRange,R,g),R}_createSelectionPiece(n,a,g,E,R){return'<div class="cslr '+g+'" style="top:'+n.toString()+"px;left:"+E.toString()+"px;width:"+R.toString()+"px;height:"+a+'px;"></div>'}_actualRenderOneSelection(n,a,g,E){if(E.length===0)return;const R=!!E[0].ranges[0].startStyle,ne=this._lineHeight.toString(),_e=(this._lineHeight-1).toString(),Le=E[0].lineNumber,ke=E[E.length-1].lineNumber;for(let Ae=0,je=E.length;Ae<je;Ae++){const Xe=E[Ae],it=Xe.lineNumber,yt=it-a,Nt=g&&(it===ke||it===Le)?_e:ne,Ft=g&&it===Le?1:0;let Ut="",ui="";for(let qt=0,ji=Xe.ranges.length;qt<ji;qt++){const li=Xe.ranges[qt];if(R){const Xi=li.startStyle,Hi=li.endStyle;if(Xi.top===1||Xi.bottom===1){Ut+=this._createSelectionPiece(Ft,Nt,hn.SELECTION_CLASS_NAME,li.left-hn.ROUNDED_PIECE_WIDTH,hn.ROUNDED_PIECE_WIDTH);let on=hn.EDITOR_BACKGROUND_CLASS_NAME;Xi.top===1&&(on+=" "+hn.SELECTION_TOP_RIGHT),Xi.bottom===1&&(on+=" "+hn.SELECTION_BOTTOM_RIGHT),Ut+=this._createSelectionPiece(Ft,Nt,on,li.left-hn.ROUNDED_PIECE_WIDTH,hn.ROUNDED_PIECE_WIDTH)}if(Hi.top===1||Hi.bottom===1){Ut+=this._createSelectionPiece(Ft,Nt,hn.SELECTION_CLASS_NAME,li.left+li.width,hn.ROUNDED_PIECE_WIDTH);let on=hn.EDITOR_BACKGROUND_CLASS_NAME;Hi.top===1&&(on+=" "+hn.SELECTION_TOP_LEFT),Hi.bottom===1&&(on+=" "+hn.SELECTION_BOTTOM_LEFT),Ut+=this._createSelectionPiece(Ft,Nt,on,li.left+li.width,hn.ROUNDED_PIECE_WIDTH)}}let en=hn.SELECTION_CLASS_NAME;if(R){const Xi=li.startStyle,Hi=li.endStyle;Xi.top===0&&(en+=" "+hn.SELECTION_TOP_LEFT),Xi.bottom===0&&(en+=" "+hn.SELECTION_BOTTOM_LEFT),Hi.top===0&&(en+=" "+hn.SELECTION_TOP_RIGHT),Hi.bottom===0&&(en+=" "+hn.SELECTION_BOTTOM_RIGHT)}ui+=this._createSelectionPiece(Ft,Nt,en,li.left,li.width)}n[yt][0]+=Ut,n[yt][1]+=ui}}prepareRender(n){const a=[],g=n.visibleRange.startLineNumber,E=n.visibleRange.endLineNumber;for(let ne=g;ne<=E;ne++){const _e=ne-g;a[_e]=["",""]}const R=[];for(let ne=0,_e=this._selections.length;ne<_e;ne++){const Le=this._selections[ne];if(Le.isEmpty()){R[ne]=null;continue}const ke=this._getVisibleRangesWithStyle(Le,n,this._previousFrameVisibleRangesWithStyle[ne]);R[ne]=ke,this._actualRenderOneSelection(a,g,this._selections.length>1,ke)}this._previousFrameVisibleRangesWithStyle=R,this._renderResult=a.map(([ne,_e])=>ne+_e)}render(n,a){if(!this._renderResult)return"";const g=a-n;return g<0||g>=this._renderResult.length?"":this._renderResult[g]}}hn.SELECTION_CLASS_NAME="selected-text",hn.SELECTION_TOP_LEFT="top-left-radius",hn.SELECTION_BOTTOM_LEFT="bottom-left-radius",hn.SELECTION_TOP_RIGHT="top-right-radius",hn.SELECTION_BOTTOM_RIGHT="bottom-right-radius",hn.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background",hn.ROUNDED_PIECE_WIDTH=10,(0,ai.zy)((Je,n)=>{const a=Je.getColor(yn.seu);a&&n.addRule(`.monaco-editor .focused .selected-text { background-color: ${a}; }`);const g=Je.getColor(yn.tan);g&&n.addRule(`.monaco-editor .selected-text { background-color: ${g}; }`);const E=Je.getColor(yn.rm4);E&&!E.isTransparent()&&n.addRule(`.monaco-editor .view-line span.inline-selected-text { color: ${E}; }`)});function Ir(Je){return Je<0?-Je:Je}var Nr=f(27168);class Mr{constructor(n,a,g,E,R,ne){this.top=n,this.left=a,this.width=g,this.height=E,this.textContent=R,this.textContentClassName=ne}}class jo{constructor(n){this._context=n;const a=this._context.configuration.options,g=a.get(46);this._cursorStyle=a.get(24),this._lineHeight=a.get(61),this._typicalHalfwidthCharacterWidth=g.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(a.get(27),this._typicalHalfwidthCharacterWidth),this._isVisible=!0,this._domNode=(0,ot.Z)(document.createElement("div")),this._domNode.setClassName(`cursor ${Ni.S}`),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),(0,Gt.M)(this._domNode,g),this._domNode.setDisplay("none"),this._position=new Di.y(1,1),this._lastRenderedContent="",this._renderData=null}getDomNode(){return this._domNode}getPosition(){return this._position}show(){this._isVisible||(this._domNode.setVisibility("inherit"),this._isVisible=!0)}hide(){this._isVisible&&(this._domNode.setVisibility("hidden"),this._isVisible=!1)}onConfigurationChanged(n){const a=this._context.configuration.options,g=a.get(46);return this._cursorStyle=a.get(24),this._lineHeight=a.get(61),this._typicalHalfwidthCharacterWidth=g.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(a.get(27),this._typicalHalfwidthCharacterWidth),(0,Gt.M)(this._domNode,g),!0}onCursorPositionChanged(n){return this._position=n,!0}_getGraphemeAwarePosition(){const{lineNumber:n,column:a}=this._position,g=this._context.viewModel.getLineContent(n),[E,R]=Vt.m(g,a-1);return[new Di.y(n,E+1),g.substring(E,R)]}_prepareRender(n){let a="";const[g,E]=this._getGraphemeAwarePosition();if(this._cursorStyle===ee.m9.Line||this._cursorStyle===ee.m9.LineThin){const Xe=n.visibleRangeForPosition(g);if(!Xe||Xe.outsideRenderedLine)return null;let it;this._cursorStyle===ee.m9.Line?(it=J.vT(this._lineCursorWidth>0?this._lineCursorWidth:2),it>2&&(a=E)):it=J.vT(1);let yt=Xe.left;it>=2&&yt>=1&&(yt-=1);const Nt=n.getVerticalOffsetForLineNumber(g.lineNumber)-n.bigNumbersDelta;return new Mr(Nt,yt,it,this._lineHeight,a,"")}const R=n.linesVisibleRangesForRange(new Te.Q(g.lineNumber,g.column,g.lineNumber,g.column+E.length),!1);if(!R||R.length===0)return null;const ne=R[0];if(ne.outsideRenderedLine||ne.ranges.length===0)return null;const _e=ne.ranges[0],Le=E===" "?this._typicalHalfwidthCharacterWidth:_e.width<1?this._typicalHalfwidthCharacterWidth:_e.width;let ke="";if(this._cursorStyle===ee.m9.Block){const Xe=this._context.viewModel.getViewLineData(g.lineNumber);a=E;const it=Xe.tokens.findTokenIndexAtOffset(g.column-1);ke=Xe.tokens.getClassName(it)}let Ae=n.getVerticalOffsetForLineNumber(g.lineNumber)-n.bigNumbersDelta,je=this._lineHeight;return(this._cursorStyle===ee.m9.Underline||this._cursorStyle===ee.m9.UnderlineThin)&&(Ae+=this._lineHeight-2,je=2),new Mr(Ae,_e.left,Le,je,a,ke)}prepareRender(n){this._renderData=this._prepareRender(n)}render(n){return this._renderData?(this._lastRenderedContent!==this._renderData.textContent&&(this._lastRenderedContent=this._renderData.textContent,this._domNode.domNode.textContent=this._lastRenderedContent),this._domNode.setClassName(`cursor ${Ni.S} ${this._renderData.textContentClassName}`),this._domNode.setDisplay("block"),this._domNode.setTop(this._renderData.top),this._domNode.setLeft(this._renderData.left),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)}}class Tr extends Ue{constructor(n){super(n);const a=this._context.configuration.options;this._readOnly=a.get(83),this._cursorBlinking=a.get(22),this._cursorStyle=a.get(24),this._cursorSmoothCaretAnimation=a.get(23),this._selectionIsEmpty=!0,this._isComposingInput=!1,this._isVisible=!1,this._primaryCursor=new jo(this._context),this._secondaryCursors=[],this._renderData=[],this._domNode=(0,ot.Z)(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 Ke.pc,this._cursorFlatBlinkInterval=new Ke.vb,this._blinkingEnabled=!1,this._editorHasFocus=!1,this._updateBlinking()}dispose(){super.dispose(),this._startCursorBlinkAnimation.dispose(),this._cursorFlatBlinkInterval.dispose()}getDomNode(){return this._domNode}onCompositionStart(n){return this._isComposingInput=!0,this._updateBlinking(),!0}onCompositionEnd(n){return this._isComposingInput=!1,this._updateBlinking(),!0}onConfigurationChanged(n){const a=this._context.configuration.options;this._readOnly=a.get(83),this._cursorBlinking=a.get(22),this._cursorStyle=a.get(24),this._cursorSmoothCaretAnimation=a.get(23),this._updateBlinking(),this._updateDomClassName(),this._primaryCursor.onConfigurationChanged(n);for(let g=0,E=this._secondaryCursors.length;g<E;g++)this._secondaryCursors[g].onConfigurationChanged(n);return!0}_onCursorPositionChanged(n,a){if(this._primaryCursor.onCursorPositionChanged(n),this._updateBlinking(),this._secondaryCursors.length<a.length){const g=a.length-this._secondaryCursors.length;for(let E=0;E<g;E++){const R=new jo(this._context);this._domNode.domNode.insertBefore(R.getDomNode().domNode,this._primaryCursor.getDomNode().domNode.nextSibling),this._secondaryCursors.push(R)}}else if(this._secondaryCursors.length>a.length){const g=this._secondaryCursors.length-a.length;for(let E=0;E<g;E++)this._domNode.removeChild(this._secondaryCursors[0].getDomNode()),this._secondaryCursors.splice(0,1)}for(let g=0;g<a.length;g++)this._secondaryCursors[g].onCursorPositionChanged(a[g])}onCursorStateChanged(n){const a=[];for(let E=0,R=n.selections.length;E<R;E++)a[E]=n.selections[E].getPosition();this._onCursorPositionChanged(a[0],a.slice(1));const g=n.selections[0].isEmpty();return this._selectionIsEmpty!==g&&(this._selectionIsEmpty=g,this._updateDomClassName()),!0}onDecorationsChanged(n){return!0}onFlushed(n){return!0}onFocusChanged(n){return this._editorHasFocus=n.isFocused,this._updateBlinking(),!1}onLinesChanged(n){return!0}onLinesDeleted(n){return!0}onLinesInserted(n){return!0}onScrollChanged(n){return!0}onTokensChanged(n){const a=g=>{for(let E=0,R=n.ranges.length;E<R;E++)if(n.ranges[E].fromLineNumber<=g.lineNumber&&g.lineNumber<=n.ranges[E].toLineNumber)return!0;return!1};if(a(this._primaryCursor.getPosition()))return!0;for(const g of this._secondaryCursors)if(a(g.getPosition()))return!0;return!1}onZonesChanged(n){return!0}_getCursorBlinking(){return this._isComposingInput||!this._editorHasFocus?0:this._readOnly?5:this._cursorBlinking}_updateBlinking(){this._startCursorBlinkAnimation.cancel(),this._cursorFlatBlinkInterval.cancel();const n=this._getCursorBlinking(),a=n===0,g=n===5;a?this._hide():this._show(),this._blinkingEnabled=!1,this._updateDomClassName(),!a&&!g&&(n===1?this._cursorFlatBlinkInterval.cancelAndSet(()=>{this._isVisible?this._hide():this._show()},Tr.BLINK_INTERVAL):this._startCursorBlinkAnimation.setIfNotSet(()=>{this._blinkingEnabled=!0,this._updateDomClassName()},Tr.BLINK_INTERVAL))}_updateDomClassName(){this._domNode.setClassName(this._getClassName())}_getClassName(){let n="cursors-layer";switch(this._selectionIsEmpty||(n+=" has-selection"),this._cursorStyle){case ee.m9.Line:n+=" cursor-line-style";break;case ee.m9.Block:n+=" cursor-block-style";break;case ee.m9.Underline:n+=" cursor-underline-style";break;case ee.m9.LineThin:n+=" cursor-line-thin-style";break;case ee.m9.BlockOutline:n+=" cursor-block-outline-style";break;case ee.m9.UnderlineThin:n+=" cursor-underline-thin-style";break;default:n+=" cursor-line-style"}if(this._blinkingEnabled)switch(this._getCursorBlinking()){case 1:n+=" cursor-blink";break;case 2:n+=" cursor-smooth";break;case 3:n+=" cursor-phase";break;case 4:n+=" cursor-expand";break;case 5:n+=" cursor-solid";break;default:n+=" cursor-solid"}else n+=" cursor-solid";return this._cursorSmoothCaretAnimation&&(n+=" cursor-smooth-caret-animation"),n}_show(){this._primaryCursor.show();for(let n=0,a=this._secondaryCursors.length;n<a;n++)this._secondaryCursors[n].show();this._isVisible=!0}_hide(){this._primaryCursor.hide();for(let n=0,a=this._secondaryCursors.length;n<a;n++)this._secondaryCursors[n].hide();this._isVisible=!1}prepareRender(n){this._primaryCursor.prepareRender(n);for(let a=0,g=this._secondaryCursors.length;a<g;a++)this._secondaryCursors[a].prepareRender(n)}render(n){const a=[];let g=0;const E=this._primaryCursor.render(n);E&&(a[g++]=E);for(let R=0,ne=this._secondaryCursors.length;R<ne;R++){const _e=this._secondaryCursors[R].render(n);_e&&(a[g++]=_e)}this._renderData=a}getLastRenderData(){return this._renderData}}Tr.BLINK_INTERVAL=500,(0,ai.zy)((Je,n)=>{const a=Je.getColor(Jt.D0);if(a){let g=Je.getColor(Jt.kM);g||(g=a.opposite()),n.addRule(`.monaco-editor .inputarea.ime-input { caret-color: ${a}; }`),n.addRule(`.monaco-editor .cursors-layer .cursor { background-color: ${a}; border-color: ${a}; color: ${g}; }`),(0,pt.Bb)(Je.type)&&n.addRule(`.monaco-editor .cursors-layer.has-selection .cursor { border-left: 1px solid ${g}; border-right: 1px solid ${g}; }`)}});const Qs=()=>{throw new Error("Invalid change accessor")};class hc extends Ue{constructor(n){super(n);const a=this._context.configuration.options,g=a.get(133);this._lineHeight=a.get(61),this._contentWidth=g.contentWidth,this._contentLeft=g.contentLeft,this.domNode=(0,ot.Z)(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=(0,ot.Z)(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 n=this._context.viewLayout.getWhitespaces(),a=new Map;for(const E of n)a.set(E.id,E);let g=!1;return this._context.viewModel.changeWhitespace(E=>{const R=Object.keys(this._zones);for(let ne=0,_e=R.length;ne<_e;ne++){const Le=R[ne],ke=this._zones[Le],Ae=this._computeWhitespaceProps(ke.delegate);ke.isInHiddenArea=Ae.isInHiddenArea;const je=a.get(Le);je&&(je.afterLineNumber!==Ae.afterViewLineNumber||je.height!==Ae.heightInPx)&&(E.changeOneWhitespace(Le,Ae.afterViewLineNumber,Ae.heightInPx),this._safeCallOnComputedHeight(ke.delegate,Ae.heightInPx),g=!0)}}),g}onConfigurationChanged(n){const a=this._context.configuration.options,g=a.get(133);return this._lineHeight=a.get(61),this._contentWidth=g.contentWidth,this._contentLeft=g.contentLeft,n.hasChanged(61)&&this._recomputeWhitespacesProps(),!0}onLineMappingChanged(n){return this._recomputeWhitespacesProps()}onLinesDeleted(n){return!0}onScrollChanged(n){return n.scrollTopChanged||n.scrollWidthChanged}onZonesChanged(n){return!0}onLinesInserted(n){return!0}_getZoneOrdinal(n){return typeof n.afterColumn<"u"?n.afterColumn:1e4}_computeWhitespaceProps(n){if(n.afterLineNumber===0)return{isInHiddenArea:!1,afterViewLineNumber:0,heightInPx:this._heightInPixels(n),minWidthInPx:this._minWidthInPixels(n)};let a;if(typeof n.afterColumn<"u")a=this._context.viewModel.model.validatePosition({lineNumber:n.afterLineNumber,column:n.afterColumn});else{const ne=this._context.viewModel.model.validatePosition({lineNumber:n.afterLineNumber,column:1}).lineNumber;a=new Di.y(ne,this._context.viewModel.model.getLineMaxColumn(ne))}let g;a.column===this._context.viewModel.model.getLineMaxColumn(a.lineNumber)?g=this._context.viewModel.model.validatePosition({lineNumber:a.lineNumber+1,column:1}):g=this._context.viewModel.model.validatePosition({lineNumber:a.lineNumber,column:a.column+1});const E=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(a,n.afterColumnAffinity),R=this._context.viewModel.coordinatesConverter.modelPositionIsVisible(g);return{isInHiddenArea:!R,afterViewLineNumber:E.lineNumber,heightInPx:R?this._heightInPixels(n):0,minWidthInPx:this._minWidthInPixels(n)}}changeViewZones(n){let a=!1;return this._context.viewModel.changeWhitespace(g=>{const E={addZone:R=>(a=!0,this._addZone(g,R)),removeZone:R=>{R&&(a=this._removeZone(g,R)||a)},layoutZone:R=>{R&&(a=this._layoutZone(g,R)||a)}};da(n,E),E.addZone=Qs,E.removeZone=Qs,E.layoutZone=Qs}),a}_addZone(n,a){const g=this._computeWhitespaceProps(a),R={whitespaceId:n.insertWhitespace(g.afterViewLineNumber,this._getZoneOrdinal(a),g.heightInPx,g.minWidthInPx),delegate:a,isInHiddenArea:g.isInHiddenArea,isVisible:!1,domNode:(0,ot.Z)(a.domNode),marginDomNode:a.marginDomNode?(0,ot.Z)(a.marginDomNode):null};return this._safeCallOnComputedHeight(R.delegate,g.heightInPx),R.domNode.setPosition("absolute"),R.domNode.domNode.style.width="100%",R.domNode.setDisplay("none"),R.domNode.setAttribute("monaco-view-zone",R.whitespaceId),this.domNode.appendChild(R.domNode),R.marginDomNode&&(R.marginDomNode.setPosition("absolute"),R.marginDomNode.domNode.style.width="100%",R.marginDomNode.setDisplay("none"),R.marginDomNode.setAttribute("monaco-view-zone",R.whitespaceId),this.marginDomNode.appendChild(R.marginDomNode)),this._zones[R.whitespaceId]=R,this.setShouldRender(),R.whitespaceId}_removeZone(n,a){if(this._zones.hasOwnProperty(a)){const g=this._zones[a];return delete this._zones[a],n.removeWhitespace(g.whitespaceId),g.domNode.removeAttribute("monaco-visible-view-zone"),g.domNode.removeAttribute("monaco-view-zone"),g.domNode.domNode.parentNode.removeChild(g.domNode.domNode),g.marginDomNode&&(g.marginDomNode.removeAttribute("monaco-visible-view-zone"),g.marginDomNode.removeAttribute("monaco-view-zone"),g.marginDomNode.domNode.parentNode.removeChild(g.marginDomNode.domNode)),this.setShouldRender(),!0}return!1}_layoutZone(n,a){if(this._zones.hasOwnProperty(a)){const g=this._zones[a],E=this._computeWhitespaceProps(g.delegate);return g.isInHiddenArea=E.isInHiddenArea,n.changeOneWhitespace(g.whitespaceId,E.afterViewLineNumber,E.heightInPx),this._safeCallOnComputedHeight(g.delegate,E.heightInPx),this.setShouldRender(),!0}return!1}shouldSuppressMouseDownOnViewZone(n){return this._zones.hasOwnProperty(n)?!!this._zones[n].delegate.suppressMouseDown:!1}_heightInPixels(n){return typeof n.heightInPx=="number"?n.heightInPx:typeof n.heightInLines=="number"?this._lineHeight*n.heightInLines:this._lineHeight}_minWidthInPixels(n){return typeof n.minWidthInPx=="number"?n.minWidthInPx:0}_safeCallOnComputedHeight(n,a){if(typeof n.onComputedHeight=="function")try{n.onComputedHeight(a)}catch(g){(0,z.dz)(g)}}_safeCallOnDomNodeTop(n,a){if(typeof n.onDomNodeTop=="function")try{n.onDomNodeTop(a)}catch(g){(0,z.dz)(g)}}prepareRender(n){}render(n){const a=n.viewportData.whitespaceViewportData,g={};let E=!1;for(const ne of a)this._zones[ne.id].isInHiddenArea||(g[ne.id]=ne,E=!0);const R=Object.keys(this._zones);for(let ne=0,_e=R.length;ne<_e;ne++){const Le=R[ne],ke=this._zones[Le];let Ae=0,je=0,Xe="none";g.hasOwnProperty(Le)?(Ae=g[Le].verticalOffset-n.bigNumbersDelta,je=g[Le].height,Xe="block",ke.isVisible||(ke.domNode.setAttribute("monaco-visible-view-zone","true"),ke.isVisible=!0),this._safeCallOnDomNodeTop(ke.delegate,n.getScrolledTopFromAbsoluteTop(g[Le].verticalOffset))):(ke.isVisible&&(ke.domNode.removeAttribute("monaco-visible-view-zone"),ke.isVisible=!1),this._safeCallOnDomNodeTop(ke.delegate,n.getScrolledTopFromAbsoluteTop(-1e6))),ke.domNode.setTop(Ae),ke.domNode.setHeight(je),ke.domNode.setDisplay(Xe),ke.marginDomNode&&(ke.marginDomNode.setTop(Ae),ke.marginDomNode.setHeight(je),ke.marginDomNode.setDisplay(Xe))}E&&(this.domNode.setWidth(Math.max(n.scrollWidth,this._contentWidth)),this.marginDomNode.setWidth(this._contentLeft))}}function da(Je,n){try{return Je(n)}catch(a){(0,z.dz)(a)}}class uc{constructor(n){this._theme=n}get type(){return this._theme.type}get value(){return this._theme}update(n){this._theme=n}getColor(n){return this._theme.getColor(n)}}class pr{constructor(n,a,g){this.configuration=n,this.theme=new uc(a),this.viewModel=g,this.viewLayout=g.viewLayout}addEventHandler(n){this.viewModel.addViewEventHandler(n)}removeEventHandler(n){this.viewModel.removeViewEventHandler(n)}}class Ur{constructor(n,a,g,E){this.selections=n,this.startLineNumber=a.startLineNumber|0,this.endLineNumber=a.endLineNumber|0,this.relativeVerticalOffset=a.relativeVerticalOffset,this.bigNumbersDelta=a.bigNumbersDelta|0,this.whitespaceViewportData=g,this._model=E,this.visibleRange=new Te.Q(a.startLineNumber,this._model.getLineMinColumn(a.startLineNumber),a.endLineNumber,this._model.getLineMaxColumn(a.endLineNumber))}getViewLineRenderingData(n){return this._model.getViewportViewLineRenderingData(this.visibleRange,n)}getDecorationsInViewport(){return this._model.getDecorationsInViewport(this.visibleRange)}}var Ko=f(402);class ca extends Ue{constructor(n){super(n),this.blocks=[],this.contentWidth=-1,this.domNode=(0,ot.Z)(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("blockDecorations-container"),this.update()}update(){let n=!1;const g=this._context.configuration.options.get(133),E=g.contentWidth-g.verticalScrollbarWidth;return this.contentWidth!==E&&(this.contentWidth=E,n=!0),n}dispose(){super.dispose()}onConfigurationChanged(n){return this.update()}onScrollChanged(n){return n.scrollTopChanged||n.scrollLeftChanged}onDecorationsChanged(n){return!0}onZonesChanged(n){return!0}prepareRender(n){}render(n){let a=0;const g=n.getDecorationsInViewport();for(const E of g){if(!E.options.blockClassName)continue;let R=this.blocks[a];R||(R=this.blocks[a]=(0,ot.Z)(document.createElement("div")),this.domNode.appendChild(R));const ne=n.getVerticalOffsetForLineNumber(E.range.startLineNumber),_e=n.getVerticalOffsetForLineNumber(E.range.endLineNumber+1);R.setClassName("blockDecorations-block "+E.options.blockClassName),R.setLeft(n.scrollLeft),R.setWidth(this.contentWidth),R.setTop(ne),R.setHeight(_e-ne),a++}for(let E=a;E<this.blocks.length;E++)this.blocks[E].domNode.remove();this.blocks.length=a}}class _r extends Pe{constructor(n,a,g,E,R,ne){super(),this._selections=[new O.L(1,1,1,1)],this._renderAnimationFrame=null;const _e=new rn(a,E,R,n);this._context=new pr(a,g,E),this._context.addEventHandler(this),this._viewParts=[],this._textAreaHandler=new Oi(this._context,_e,this._createTextAreaHandlerHelper()),this._viewParts.push(this._textAreaHandler),this._linesContent=(0,ot.Z)(document.createElement("div")),this._linesContent.setClassName("lines-content monaco-editor-background"),this._linesContent.setPosition("absolute"),this.domNode=(0,ot.Z)(document.createElement("div")),this.domNode.setClassName(this._getEditorClassName()),this.domNode.setAttribute("role","code"),this._overflowGuardContainer=(0,ot.Z)(document.createElement("div")),Re.write(this._overflowGuardContainer,3),this._overflowGuardContainer.setClassName("overflow-guard"),this._scrollbar=new uo(this._context,this._linesContent,this.domNode,this._overflowGuardContainer),this._viewParts.push(this._scrollbar),this._viewLines=new Kt(this._context,this._linesContent),this._viewZones=new hc(this._context),this._viewParts.push(this._viewZones);const Le=new oo(this._context);this._viewParts.push(Le);const ke=new Hr(this._context);this._viewParts.push(ke);const Ae=new Ti(this._context);this._viewParts.push(Ae),Ae.addDynamicOverlay(new Gn(this._context)),Ae.addDynamicOverlay(new hn(this._context)),Ae.addDynamicOverlay(new As(this._context)),Ae.addDynamicOverlay(new ks(this._context));const je=new es(this._context);this._viewParts.push(je),je.addDynamicOverlay(new ws(this._context)),je.addDynamicOverlay(new ls(this._context)),je.addDynamicOverlay(new fs(this._context)),je.addDynamicOverlay(new nn(this._context)),je.addDynamicOverlay(new Ei(this._context));const Xe=new wi(this._context);Xe.getDomNode().appendChild(this._viewZones.marginDomNode),Xe.getDomNode().appendChild(je.getDomNode()),this._viewParts.push(Xe),this._contentWidgets=new os(this._context,this.domNode),this._viewParts.push(this._contentWidgets),this._viewCursors=new Tr(this._context),this._viewParts.push(this._viewCursors),this._overlayWidgets=new bo(this._context),this._viewParts.push(this._overlayWidgets);const it=new Js(this._context);this._viewParts.push(it);const yt=new ca(this._context);this._viewParts.push(yt);const Nt=new In(this._context);if(this._viewParts.push(Nt),Le){const Ft=this._scrollbar.getOverviewRulerLayoutInfo();Ft.parent.insertBefore(Le.getDomNode(),Ft.insertBefore)}this._linesContent.appendChild(Ae.getDomNode()),this._linesContent.appendChild(it.domNode),this._linesContent.appendChild(yt.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(Xe.getDomNode()),this._overflowGuardContainer.appendChild(this._scrollbar.getDomNode()),this._overflowGuardContainer.appendChild(ke.getDomNode()),this._overflowGuardContainer.appendChild(this._textAreaHandler.textArea),this._overflowGuardContainer.appendChild(this._textAreaHandler.textAreaCover),this._overflowGuardContainer.appendChild(this._overlayWidgets.getDomNode()),this._overflowGuardContainer.appendChild(Nt.getDomNode()),this.domNode.appendChild(this._overflowGuardContainer),ne?ne.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode.domNode):this.domNode.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode),this._applyLayout(),this._pointerHandler=this._register(new Ye(this._context,_e,this._createPointerHandlerHelper()))}_flushAccumulatedAndRenderNow(){this._renderNow()}_createPointerHandlerHelper(){return{viewDomNode:this.domNode.domNode,linesContentDomNode:this._linesContent.domNode,viewLinesDomNode:this._viewLines.getDomNode().domNode,focusTextArea:()=>{this.focus()},dispatchTextAreaEvent:n=>{this._textAreaHandler.textArea.domNode.dispatchEvent(n)},getLastRenderData:()=>{const n=this._viewCursors.getLastRenderData()||[],a=this._textAreaHandler.getLastRenderData();return new ut(n,a)},shouldSuppressMouseDownOnViewZone:n=>this._viewZones.shouldSuppressMouseDownOnViewZone(n),shouldSuppressMouseDownOnWidget:n=>this._contentWidgets.shouldSuppressMouseDownOnWidget(n),getPositionFromDOMInfo:(n,a)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getPositionFromDOMInfo(n,a)),visibleRangeForPosition:(n,a)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(new Di.y(n,a))),getLineWidth:n=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getLineWidth(n))}}_createTextAreaHandlerHelper(){return{visibleRangeForPosition:n=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(n))}}_applyLayout(){const a=this._context.configuration.options.get(133);this.domNode.setWidth(a.width),this.domNode.setHeight(a.height),this._overflowGuardContainer.setWidth(a.width),this._overflowGuardContainer.setHeight(a.height),this._linesContent.setWidth(1e6),this._linesContent.setHeight(1e6)}_getEditorClassName(){const n=this._textAreaHandler.isFocused()?" focused":"";return this._context.configuration.options.get(130)+" "+(0,ai.Pz)(this._context.theme.type)+n}handleEvents(n){super.handleEvents(n),this._scheduleRender()}onConfigurationChanged(n){return this.domNode.setClassName(this._getEditorClassName()),this._applyLayout(),!1}onCursorStateChanged(n){return this._selections=n.selections,!1}onFocusChanged(n){return this.domNode.setClassName(this._getEditorClassName()),!1}onThemeChanged(n){return this._context.theme.update(n.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 n of this._viewParts)n.dispose();super.dispose()}_scheduleRender(){this._renderAnimationFrame===null&&(this._renderAnimationFrame=J.Oq(this._onRenderScheduled.bind(this),100))}_onRenderScheduled(){this._renderAnimationFrame=null,this._flushAccumulatedAndRenderNow()}_renderNow(){er(()=>this._actualRender())}_getViewPartsToRender(){const n=[];let a=0;for(const g of this._viewParts)g.shouldRender()&&(n[a++]=g);return n}_actualRender(){if(!J.qD(this.domNode.domNode))return;let n=this._getViewPartsToRender();if(!this._viewLines.shouldRender()&&n.length===0)return;const a=this._context.viewLayout.getLinesViewportData();this._context.viewModel.setViewport(a.startLineNumber,a.endLineNumber,a.centeredLineNumber);const g=new Ur(this._selections,a,this._context.viewLayout.getWhitespaceViewportData(),this._context.viewModel);this._contentWidgets.shouldRender()&&this._contentWidgets.onBeforeRender(g),this._viewLines.shouldRender()&&(this._viewLines.renderText(g),this._viewLines.onDidRender(),n=this._getViewPartsToRender());const E=new rt(this._context.viewLayout,g,this._viewLines);for(const R of n)R.prepareRender(E);for(const R of n)R.render(E),R.onDidRender()}delegateVerticalScrollbarPointerDown(n){this._scrollbar.delegateVerticalScrollbarPointerDown(n)}restoreState(n){this._context.viewModel.viewLayout.setScrollPosition({scrollTop:n.scrollTop},1),this._context.viewModel.tokenizeViewport(),this._renderNow(),this._viewLines.updateLineWidths(),this._context.viewModel.viewLayout.setScrollPosition({scrollLeft:n.scrollLeft},1)}getOffsetForColumn(n,a){const g=this._context.viewModel.model.validatePosition({lineNumber:n,column:a}),E=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(g);this._flushAccumulatedAndRenderNow();const R=this._viewLines.visibleRangeForPosition(new Di.y(E.lineNumber,E.column));return R?R.left:-1}getTargetAtClientPoint(n,a){const g=this._pointerHandler.getTargetAtClientPoint(n,a);return g?_i.convertViewToModelMouseTarget(g,this._context.viewModel.coordinatesConverter):null}createOverviewRuler(n){return new Ps(this._context,n)}change(n){this._viewZones.changeViewZones(n),this._scheduleRender()}render(n,a){if(a){this._viewLines.forceShouldRender();for(const g of this._viewParts)g.forceShouldRender()}n?this._flushAccumulatedAndRenderNow():this._scheduleRender()}focus(){this._textAreaHandler.focusTextArea()}isFocused(){return this._textAreaHandler.isFocused()}setAriaOptions(n){this._textAreaHandler.setAriaOptions(n)}addContentWidget(n){this._contentWidgets.addWidget(n.widget),this.layoutContentWidget(n),this._scheduleRender()}layoutContentWidget(n){var a,g;let E=n.position&&n.position.range||null;if(E===null){const ne=n.position?n.position.position:null;ne!==null&&(E=new Te.Q(ne.lineNumber,ne.column,ne.lineNumber,ne.column))}const R=n.position?n.position.preference:null;this._contentWidgets.setWidgetPosition(n.widget,E,R,(g=(a=n.position)===null||a===void 0?void 0:a.positionAffinity)!==null&&g!==void 0?g:null),this._scheduleRender()}removeContentWidget(n){this._contentWidgets.removeWidget(n.widget),this._scheduleRender()}addOverlayWidget(n){this._overlayWidgets.addWidget(n.widget),this.layoutOverlayWidget(n),this._scheduleRender()}layoutOverlayWidget(n){const a=n.position?n.position.preference:null;this._overlayWidgets.setWidgetPosition(n.widget,a)&&this._scheduleRender()}removeOverlayWidget(n){this._overlayWidgets.removeWidget(n.widget),this._scheduleRender()}}function er(Je){try{return Je()}catch(n){(0,z.dz)(n)}}var ms=f(29895);class ha{constructor(n){this._selTrackedRange=null,this._trackSelection=!0,this._setState(n,new ms.mG(new Te.Q(1,1,1,1),0,new Di.y(1,1),0),new ms.mG(new Te.Q(1,1,1,1),0,new Di.y(1,1),0))}dispose(n){this._removeTrackedRange(n)}startTrackingSelection(n){this._trackSelection=!0,this._updateTrackedRange(n)}stopTrackingSelection(n){this._trackSelection=!1,this._removeTrackedRange(n)}_updateTrackedRange(n){this._trackSelection&&(this._selTrackedRange=n.model._setTrackedRange(this._selTrackedRange,this.modelState.selection,0))}_removeTrackedRange(n){this._selTrackedRange=n.model._setTrackedRange(this._selTrackedRange,null,0)}asCursorState(){return new ms.MF(this.modelState,this.viewState)}readSelectionFromMarkers(n){const a=n.model._getTrackedRange(this._selTrackedRange);return O.L.fromRange(a,this.modelState.selection.getDirection())}ensureValidState(n){this._setState(n,this.modelState,this.viewState)}setState(n,a,g){this._setState(n,a,g)}static _validatePositionWithCache(n,a,g,E){return a.equals(g)?E:n.normalizePosition(a,2)}static _validateViewState(n,a){const g=a.position,E=a.selectionStart.getStartPosition(),R=a.selectionStart.getEndPosition(),ne=n.normalizePosition(g,2),_e=this._validatePositionWithCache(n,E,g,ne),Le=this._validatePositionWithCache(n,R,E,_e);return g.equals(ne)&&E.equals(_e)&&R.equals(Le)?a:new ms.mG(Te.Q.fromPositions(_e,Le),a.selectionStartLeftoverVisibleColumns+E.column-_e.column,ne,a.leftoverVisibleColumns+g.column-ne.column)}_setState(n,a,g){if(g&&(g=ha._validateViewState(n.viewModel,g)),a){const E=n.model.validateRange(a.selectionStart),R=a.selectionStart.equalsRange(E)?a.selectionStartLeftoverVisibleColumns:0,ne=n.model.validatePosition(a.position),_e=a.position.equals(ne)?a.leftoverVisibleColumns:0;a=new ms.mG(E,R,ne,_e)}else{if(!g)return;const E=n.model.validateRange(n.coordinatesConverter.convertViewRangeToModelRange(g.selectionStart)),R=n.model.validatePosition(n.coordinatesConverter.convertViewPositionToModelPosition(g.position));a=new ms.mG(E,g.selectionStartLeftoverVisibleColumns,R,g.leftoverVisibleColumns)}if(g){const E=n.coordinatesConverter.validateViewRange(g.selectionStart,a.selectionStart),R=n.coordinatesConverter.validateViewPosition(g.position,a.position);g=new ms.mG(E,a.selectionStartLeftoverVisibleColumns,R,a.leftoverVisibleColumns)}else{const E=n.coordinatesConverter.convertModelPositionToViewPosition(new Di.y(a.selectionStart.startLineNumber,a.selectionStart.startColumn)),R=n.coordinatesConverter.convertModelPositionToViewPosition(new Di.y(a.selectionStart.endLineNumber,a.selectionStart.endColumn)),ne=new Te.Q(E.lineNumber,E.column,R.lineNumber,R.column),_e=n.coordinatesConverter.convertModelPositionToViewPosition(a.position);g=new ms.mG(ne,a.selectionStartLeftoverVisibleColumns,_e,a.leftoverVisibleColumns)}this.modelState=a,this.viewState=g,this._updateTrackedRange(n)}}class Ia{constructor(n){this.context=n,this.cursors=[new ha(n)],this.lastAddedCursorIndex=0}dispose(){for(const n of this.cursors)n.dispose(this.context)}startTrackingSelections(){for(const n of this.cursors)n.startTrackingSelection(this.context)}stopTrackingSelections(){for(const n of this.cursors)n.stopTrackingSelection(this.context)}updateContext(n){this.context=n}ensureValidState(){for(const n of this.cursors)n.ensureValidState(this.context)}readSelectionFromMarkers(){return this.cursors.map(n=>n.readSelectionFromMarkers(this.context))}getAll(){return this.cursors.map(n=>n.asCursorState())}getViewPositions(){return this.cursors.map(n=>n.viewState.position)}getTopMostViewPosition(){return(0,d.Ly)(this.cursors,(0,d.VE)(n=>n.viewState.position,Di.y.compare)).viewState.position}getBottomMostViewPosition(){return(0,d.Jw)(this.cursors,(0,d.VE)(n=>n.viewState.position,Di.y.compare)).viewState.position}getSelections(){return this.cursors.map(n=>n.modelState.selection)}getViewSelections(){return this.cursors.map(n=>n.viewState.selection)}setSelections(n){this.setStates(ms.MF.fromModelSelections(n))}getPrimaryCursor(){return this.cursors[0].asCursorState()}setStates(n){n!==null&&(this.cursors[0].setState(this.context,n[0].modelState,n[0].viewState),this._setSecondaryStates(n.slice(1)))}_setSecondaryStates(n){const a=this.cursors.length-1,g=n.length;if(a<g){const E=g-a;for(let R=0;R<E;R++)this._addSecondaryCursor()}else if(a>g){const E=a-g;for(let R=0;R<E;R++)this._removeSecondaryCursor(this.cursors.length-2)}for(let E=0;E<g;E++)this.cursors[E+1].setState(this.context,n[E].modelState,n[E].viewState)}killSecondaryCursors(){this._setSecondaryStates([])}_addSecondaryCursor(){this.cursors.push(new ha(this.context)),this.lastAddedCursorIndex=this.cursors.length-1}getLastAddedCursorIndex(){return this.cursors.length===1||this.lastAddedCursorIndex===0?0:this.lastAddedCursorIndex}_removeSecondaryCursor(n){this.lastAddedCursorIndex>=n+1&&this.lastAddedCursorIndex--,this.cursors[n+1].dispose(this.context),this.cursors.splice(n+1,1)}normalize(){if(this.cursors.length===1)return;const n=this.cursors.slice(0),a=[];for(let g=0,E=n.length;g<E;g++)a.push({index:g,selection:n[g].modelState.selection});a.sort((0,d.VE)(g=>g.selection,Te.Q.compareRangesUsingStarts));for(let g=0;g<a.length-1;g++){const E=a[g],R=a[g+1],ne=E.selection,_e=R.selection;if(!this.context.cursorConfig.multiCursorMergeOverlapping)continue;let Le;if(_e.isEmpty()||ne.isEmpty()?Le=_e.getStartPosition().isBeforeOrEqual(ne.getEndPosition()):Le=_e.getStartPosition().isBefore(ne.getEndPosition()),Le){const ke=E.index<R.index?g:g+1,Ae=E.index<R.index?g+1:g,je=a[Ae].index,Xe=a[ke].index,it=a[Ae].selection,yt=a[ke].selection;if(!it.equalsSelection(yt)){const Nt=it.plusRange(yt),Ft=it.selectionStartLineNumber===it.startLineNumber&&it.selectionStartColumn===it.startColumn,Ut=yt.selectionStartLineNumber===yt.startLineNumber&&yt.selectionStartColumn===yt.startColumn;let ui;je===this.lastAddedCursorIndex?(ui=Ft,this.lastAddedCursorIndex=Xe):ui=Ut;let qt;ui?qt=new O.L(Nt.startLineNumber,Nt.startColumn,Nt.endLineNumber,Nt.endColumn):qt=new O.L(Nt.endLineNumber,Nt.endColumn,Nt.startLineNumber,Nt.startColumn),a[ke].selection=qt;const ji=ms.MF.fromModelSelection(qt);n[Xe].setState(this.context,ji.modelState,ji.viewState)}for(const Nt of a)Nt.index>je&&Nt.index--;n.splice(je,1),a.splice(Ae,1),this._removeSecondaryCursor(je-1),g--}}}}class vr{constructor(n,a,g,E){this._cursorContextBrand=void 0,this.model=n,this.viewModel=a,this.coordinatesConverter=g,this.cursorConfig=E}}var wo=f(97666),No=f(61710),ro=f(83455);class ld{constructor(){this.type=0}}class dd{constructor(){this.type=1}}class gc{constructor(n){this.type=2,this._source=n}hasChanged(n){return this._source.hasChanged(n)}}class hl{constructor(n,a){this.type=3,this.selections=n,this.modelSelections=a}}class $o{constructor(n){this.type=4,n?(this.affectsMinimap=n.affectsMinimap,this.affectsOverviewRuler=n.affectsOverviewRuler):(this.affectsMinimap=!0,this.affectsOverviewRuler=!0)}}class qs{constructor(){this.type=5}}class jr{constructor(n){this.type=6,this.isFocused=n}}class ua{constructor(){this.type=7}}class Rr{constructor(){this.type=8}}class So{constructor(n,a){this.fromLineNumber=n,this.count=a,this.type=9}}class tr{constructor(n,a){this.type=10,this.fromLineNumber=n,this.toLineNumber=a}}class yo{constructor(n,a){this.type=11,this.fromLineNumber=n,this.toLineNumber=a}}class ds{constructor(n,a,g,E,R,ne,_e){this.source=n,this.minimalReveal=a,this.range=g,this.selections=E,this.verticalType=R,this.revealHorizontal=ne,this.scrollType=_e,this.type=12}}class pi{constructor(n){this.type=13,this.scrollWidth=n.scrollWidth,this.scrollLeft=n.scrollLeft,this.scrollHeight=n.scrollHeight,this.scrollTop=n.scrollTop,this.scrollWidthChanged=n.scrollWidthChanged,this.scrollLeftChanged=n.scrollLeftChanged,this.scrollHeightChanged=n.scrollHeightChanged,this.scrollTopChanged=n.scrollTopChanged}}class Kr{constructor(n){this.theme=n,this.type=14}}class Na{constructor(n){this.type=15,this.ranges=n}}class Ma{constructor(){this.type=16}}class Vo{constructor(){this.type=17}}class ir extends _.jG{constructor(){super(),this._onEvent=this._register(new S.vl),this.onEvent=this._onEvent.event,this._eventHandlers=[],this._viewEventQueue=null,this._isConsumingViewEventQueue=!1,this._collector=null,this._collectorCnt=0,this._outgoingEvents=[]}emitOutgoingEvent(n){this._addOutgoingEvent(n),this._emitOutgoingEvents()}_addOutgoingEvent(n){for(let a=0,g=this._outgoingEvents.length;a<g;a++){const E=this._outgoingEvents[a].kind===n.kind?this._outgoingEvents[a].attemptToMerge(n):null;if(E){this._outgoingEvents[a]=E;return}}this._outgoingEvents.push(n)}_emitOutgoingEvents(){for(;this._outgoingEvents.length>0;){if(this._collector||this._isConsumingViewEventQueue)return;const n=this._outgoingEvents.shift();n.isNoOp()||this._onEvent.fire(n)}}addViewEventHandler(n){for(let a=0,g=this._eventHandlers.length;a<g;a++)this._eventHandlers[a]===n&&console.warn("Detected duplicate listener in ViewEventDispatcher",n);this._eventHandlers.push(n)}removeViewEventHandler(n){for(let a=0;a<this._eventHandlers.length;a++)if(this._eventHandlers[a]===n){this._eventHandlers.splice(a,1);break}}beginEmitViewEvents(){return this._collectorCnt++,this._collectorCnt===1&&(this._collector=new nr),this._collector}endEmitViewEvents(){if(this._collectorCnt--,this._collectorCnt===0){const n=this._collector.outgoingEvents,a=this._collector.viewEvents;this._collector=null;for(const g of n)this._addOutgoingEvent(g);a.length>0&&this._emitMany(a)}this._emitOutgoingEvents()}emitSingleViewEvent(n){try{this.beginEmitViewEvents().emitViewEvent(n)}finally{this.endEmitViewEvents()}}_emitMany(n){this._viewEventQueue?this._viewEventQueue=this._viewEventQueue.concat(n):this._viewEventQueue=n,this._isConsumingViewEventQueue||this._consumeViewEventQueue()}_consumeViewEventQueue(){try{this._isConsumingViewEventQueue=!0,this._doConsumeQueue()}finally{this._isConsumingViewEventQueue=!1}}_doConsumeQueue(){for(;this._viewEventQueue;){const n=this._viewEventQueue;this._viewEventQueue=null;const a=this._eventHandlers.slice(0);for(const g of a)g.handleEvents(n)}}}class nr{constructor(){this.viewEvents=[],this.outgoingEvents=[]}emitViewEvent(n){this.viewEvents.push(n)}emitOutgoingEvent(n){this.outgoingEvents.push(n)}}class fo{constructor(n,a,g,E){this.kind=0,this._oldContentWidth=n,this._oldContentHeight=a,this.contentWidth=g,this.contentHeight=E,this.contentWidthChanged=this._oldContentWidth!==this.contentWidth,this.contentHeightChanged=this._oldContentHeight!==this.contentHeight}isNoOp(){return!this.contentWidthChanged&&!this.contentHeightChanged}attemptToMerge(n){return n.kind!==this.kind?null:new fo(this._oldContentWidth,this._oldContentHeight,n.contentWidth,n.contentHeight)}}class un{constructor(n,a){this.kind=1,this.oldHasFocus=n,this.hasFocus=a}isNoOp(){return this.oldHasFocus===this.hasFocus}attemptToMerge(n){return n.kind!==this.kind?null:new un(this.oldHasFocus,n.hasFocus)}}class Xn{constructor(n,a,g,E,R,ne,_e,Le){this.kind=2,this._oldScrollWidth=n,this._oldScrollLeft=a,this._oldScrollHeight=g,this._oldScrollTop=E,this.scrollWidth=R,this.scrollLeft=ne,this.scrollHeight=_e,this.scrollTop=Le,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(n){return n.kind!==this.kind?null:new Xn(this._oldScrollWidth,this._oldScrollLeft,this._oldScrollHeight,this._oldScrollTop,n.scrollWidth,n.scrollLeft,n.scrollHeight,n.scrollTop)}}class us{constructor(){this.kind=3}isNoOp(){return!1}attemptToMerge(n){return n.kind!==this.kind?null:this}}class Rs{constructor(){this.kind=4}isNoOp(){return!1}attemptToMerge(n){return n.kind!==this.kind?null:this}}class js{constructor(n,a,g,E,R,ne,_e){this.kind=6,this.oldSelections=n,this.selections=a,this.oldModelVersionId=g,this.modelVersionId=E,this.source=R,this.reason=ne,this.reachedMaxCursorCount=_e}static _selectionsAreEqual(n,a){if(!n&&!a)return!0;if(!n||!a)return!1;const g=n.length,E=a.length;if(g!==E)return!1;for(let R=0;R<g;R++)if(!n[R].equalsSelection(a[R]))return!1;return!0}isNoOp(){return js._selectionsAreEqual(this.oldSelections,this.selections)&&this.oldModelVersionId===this.modelVersionId}attemptToMerge(n){return n.kind!==this.kind?null:new js(this.oldSelections,n.selections,this.oldModelVersionId,n.modelVersionId,n.source,n.reason,this.reachedMaxCursorCount||n.reachedMaxCursorCount)}}class Zs{constructor(){this.kind=5}isNoOp(){return!1}attemptToMerge(n){return n.kind!==this.kind?null:this}}class sr{constructor(n){this.event=n,this.kind=7}isNoOp(){return!1}attemptToMerge(n){return null}}class ul{constructor(n){this.event=n,this.kind=8}isNoOp(){return!1}attemptToMerge(n){return null}}class gl{constructor(n){this.event=n,this.kind=9}isNoOp(){return!1}attemptToMerge(n){return null}}class fl{constructor(n){this.event=n,this.kind=10}isNoOp(){return!1}attemptToMerge(n){return null}}class fc{constructor(n){this.event=n,this.kind=11}isNoOp(){return!1}attemptToMerge(n){return null}}class $r{constructor(n){this.event=n,this.kind=12}isNoOp(){return!1}attemptToMerge(n){return null}}class Lo extends _.jG{constructor(n,a,g,E){super(),this._model=n,this._knownModelVersionId=this._model.getVersionId(),this._viewModel=a,this._coordinatesConverter=g,this.context=new vr(this._model,this._viewModel,this._coordinatesConverter,E),this._cursors=new Ia(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=(0,_.AS)(this._autoClosedActions),super.dispose()}updateConfiguration(n){this.context=new vr(this._model,this._viewModel,this._coordinatesConverter,n),this._cursors.updateContext(this.context)}onLineMappingChanged(n){this._knownModelVersionId===this._model.getVersionId()&&this.setStates(n,"viewModel",0,this.getCursorStates())}setHasFocus(n){this._hasFocus=n}_validateAutoClosedActions(){if(this._autoClosedActions.length>0){const n=this._cursors.getSelections();for(let a=0;a<this._autoClosedActions.length;a++){const g=this._autoClosedActions[a];g.isValid(n)||(g.dispose(),this._autoClosedActions.splice(a,1),a--)}}}getPrimaryCursorState(){return this._cursors.getPrimaryCursor()}getLastAddedCursorIndex(){return this._cursors.getLastAddedCursorIndex()}getCursorStates(){return this._cursors.getAll()}setStates(n,a,g,E){let R=!1;E!==null&&E.length>Lo.MAX_CURSOR_COUNT&&(E=E.slice(0,Lo.MAX_CURSOR_COUNT),R=!0);const ne=Ta.from(this._model,this);return this._cursors.setStates(E),this._cursors.normalize(),this._columnSelectData=null,this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(n,a,g,ne,R)}setCursorColumnSelectData(n){this._columnSelectData=n}revealPrimary(n,a,g,E,R,ne){const _e=this._cursors.getViewPositions();let Le=null,ke=null;_e.length>1?ke=this._cursors.getViewSelections():Le=Te.Q.fromPositions(_e[0],_e[0]),n.emitViewEvent(new ds(a,g,Le,ke,E,R,ne))}saveState(){const n=[],a=this._cursors.getSelections();for(let g=0,E=a.length;g<E;g++){const R=a[g];n.push({inSelectionMode:!R.isEmpty(),selectionStart:{lineNumber:R.selectionStartLineNumber,column:R.selectionStartColumn},position:{lineNumber:R.positionLineNumber,column:R.positionColumn}})}return n}restoreState(n,a){const g=[];for(let E=0,R=a.length;E<R;E++){const ne=a[E];let _e=1,Le=1;ne.position&&ne.position.lineNumber&&(_e=ne.position.lineNumber),ne.position&&ne.position.column&&(Le=ne.position.column);let ke=_e,Ae=Le;ne.selectionStart&&ne.selectionStart.lineNumber&&(ke=ne.selectionStart.lineNumber),ne.selectionStart&&ne.selectionStart.column&&(Ae=ne.selectionStart.column),g.push({selectionStartLineNumber:ke,selectionStartColumn:Ae,positionLineNumber:_e,positionColumn:Le})}this.setStates(n,"restoreState",0,ms.MF.fromModelSelections(g)),this.revealPrimary(n,"restoreState",!1,0,!0,1)}onModelContentChanged(n,a){if(a instanceof ro.vn){if(this._isHandling)return;this._isHandling=!0;try{this.setStates(n,"modelChange",0,this.getCursorStates())}finally{this._isHandling=!1}}else{const g=a.rawContentChangedEvent;if(this._knownModelVersionId=g.versionId,this._isHandling)return;const E=g.containsEvent(1);if(this._prevEditOperationType=0,E)this._cursors.dispose(),this._cursors=new Ia(this.context),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(n,"model",1,null,!1);else if(this._hasFocus&&g.resultingSelection&&g.resultingSelection.length>0){const R=ms.MF.fromModelSelections(g.resultingSelection);this.setStates(n,"modelChange",g.isUndoing?5:g.isRedoing?6:2,R)&&this.revealPrimary(n,"modelChange",!1,0,!0,0)}else{const R=this._cursors.readSelectionFromMarkers();this.setStates(n,"modelChange",2,ms.MF.fromModelSelections(R))}}}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 n=this._cursors.getPrimaryCursor(),a=n.viewState.selectionStart.getStartPosition(),g=n.viewState.position;return{isReal:!1,fromViewLineNumber:a.lineNumber,fromViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,a),toViewLineNumber:g.lineNumber,toViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,g)}}getSelections(){return this._cursors.getSelections()}setSelections(n,a,g,E){this.setStates(n,a,E,ms.MF.fromModelSelections(g))}getPrevEditOperationType(){return this._prevEditOperationType}setPrevEditOperationType(n){this._prevEditOperationType=n}_pushAutoClosedAction(n,a){const g=[],E=[];for(let _e=0,Le=n.length;_e<Le;_e++)g.push({range:n[_e],options:{description:"auto-closed-character",inlineClassName:"auto-closed-character",stickiness:1}}),E.push({range:a[_e],options:{description:"auto-closed-enclosing",stickiness:1}});const R=this._model.deltaDecorations([],g),ne=this._model.deltaDecorations([],E);this._autoClosedActions.push(new ga(this._model,R,ne))}_executeEditOperation(n){if(!n)return;n.shouldPushStackElementBefore&&this._model.pushStackElement();const a=Nh.executeCommands(this._model,this._cursors.getSelections(),n.commands);if(a){this._interpretCommandResult(a);const g=[],E=[];for(let R=0;R<n.commands.length;R++){const ne=n.commands[R];ne instanceof No.yl&&ne.enclosingRange&&ne.closeCharacterRange&&(g.push(ne.closeCharacterRange),E.push(ne.enclosingRange))}g.length>0&&this._pushAutoClosedAction(g,E),this._prevEditOperationType=n.type}n.shouldPushStackElementAfter&&this._model.pushStackElement()}_interpretCommandResult(n){(!n||n.length===0)&&(n=this._cursors.readSelectionFromMarkers()),this._columnSelectData=null,this._cursors.setSelections(n),this._cursors.normalize()}_emitStateChangedIfNecessary(n,a,g,E,R){const ne=Ta.from(this._model,this);if(ne.equals(E))return!1;const _e=this._cursors.getSelections(),Le=this._cursors.getViewSelections();if(n.emitViewEvent(new hl(Le,_e)),!E||E.cursorState.length!==ne.cursorState.length||ne.cursorState.some((ke,Ae)=>!ke.modelState.equals(E.cursorState[Ae].modelState))){const ke=E?E.cursorState.map(je=>je.modelState.selection):null,Ae=E?E.modelVersionId:0;n.emitOutgoingEvent(new js(ke,_e,Ae,ne.modelVersionId,a||"keyboard",g,R))}return!0}_findAutoClosingPairs(n){if(!n.length)return null;const a=[];for(let g=0,E=n.length;g<E;g++){const R=n[g];if(!R.text||R.text.indexOf(` `)>=0)return null;const ne=R.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/);if(!ne)return null;const _e=ne[1],Le=this.context.cursorConfig.autoClosingPairs.autoClosingPairsCloseSingleChar.get(_e);if(!Le||Le.length!==1)return null;const ke=Le[0].open,Ae=R.text.length-ne[2].length-1,je=R.text.lastIndexOf(ke,Ae-1);if(je===-1)return null;a.push([je,Ae])}return a}executeEdits(n,a,g,E){let R=null;a==="snippet"&&(R=this._findAutoClosingPairs(g)),R&&(g[0]._isTracked=!0);const ne=[],_e=[],Le=this._model.pushEditOperations(this.getSelections(),g,ke=>{if(R)for(let je=0,Xe=R.length;je<Xe;je++){const[it,yt]=R[je],Nt=ke[je],Ft=Nt.range.startLineNumber,Ut=Nt.range.startColumn-1+it,ui=Nt.range.startColumn-1+yt;ne.push(new Te.Q(Ft,ui+1,Ft,ui+2)),_e.push(new Te.Q(Ft,Ut+1,Ft,ui+2))}const Ae=E(ke);return Ae&&(this._isHandling=!0),Ae});Le&&(this._isHandling=!1,this.setSelections(n,a,Le,0)),ne.length>0&&this._pushAutoClosedAction(ne,_e)}_executeEdit(n,a,g,E=0){if(this.context.cursorConfig.readOnly)return;const R=Ta.from(this._model,this);this._cursors.stopTrackingSelections(),this._isHandling=!0;try{this._cursors.ensureValidState(),n()}catch(ne){(0,z.dz)(ne)}this._isHandling=!1,this._cursors.startTrackingSelections(),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(a,g,E,R,!1)&&this.revealPrimary(a,g,!1,0,!0,0)}getAutoClosedCharacters(){return ga.getAllAutoClosedCharacters(this._autoClosedActions)}startComposition(n){this._compositionState=new Dn(this._model,this.getSelections())}endComposition(n,a){const g=this._compositionState?this._compositionState.deduceOutcome(this._model,this.getSelections()):null;this._compositionState=null,this._executeEdit(()=>{a==="keyboard"&&this._executeEditOperation(No.TK.compositionEndWithInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,g,this.getSelections(),this.getAutoClosedCharacters()))},n,a)}type(n,a,g){this._executeEdit(()=>{if(g==="keyboard"){const E=a.length;let R=0;for(;R<E;){const ne=Vt.iy(a,R),_e=a.substr(R,ne);this._executeEditOperation(No.TK.typeWithInterceptors(!!this._compositionState,this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),this.getAutoClosedCharacters(),_e)),R+=ne}}else this._executeEditOperation(No.TK.typeWithoutInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),a))},n,g)}compositionType(n,a,g,E,R,ne){if(a.length===0&&g===0&&E===0){if(R!==0){const _e=this.getSelections().map(Le=>{const ke=Le.getPosition();return new O.L(ke.lineNumber,ke.column+R,ke.lineNumber,ke.column+R)});this.setSelections(n,ne,_e,0)}return}this._executeEdit(()=>{this._executeEditOperation(No.TK.compositionType(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),a,g,E,R))},n,ne)}paste(n,a,g,E,R){this._executeEdit(()=>{this._executeEditOperation(No.TK.paste(this.context.cursorConfig,this._model,this.getSelections(),a,g,E||[]))},n,R,4)}cut(n,a){this._executeEdit(()=>{this._executeEditOperation(wo.g.cut(this.context.cursorConfig,this._model,this.getSelections()))},n,a)}executeCommand(n,a,g){this._executeEdit(()=>{this._cursors.killSecondaryCursors(),this._executeEditOperation(new ms.vY(0,[a],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},n,g)}executeCommands(n,a,g){this._executeEdit(()=>{this._executeEditOperation(new ms.vY(0,a,{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},n,g)}}Lo.MAX_CURSOR_COUNT=1e4;class Ta{constructor(n,a){this.modelVersionId=n,this.cursorState=a}static from(n,a){return new Ta(n.getVersionId(),a.getCursorStates())}equals(n){if(!n||this.modelVersionId!==n.modelVersionId||this.cursorState.length!==n.cursorState.length)return!1;for(let a=0,g=this.cursorState.length;a<g;a++)if(!this.cursorState[a].equals(n.cursorState[a]))return!1;return!0}}class ga{constructor(n,a,g){this._model=n,this._autoClosedCharactersDecorations=a,this._autoClosedEnclosingDecorations=g}static getAllAutoClosedCharacters(n){let a=[];for(const g of n)a=a.concat(g.getAutoClosedCharactersRanges());return a}dispose(){this._autoClosedCharactersDecorations=this._model.deltaDecorations(this._autoClosedCharactersDecorations,[]),this._autoClosedEnclosingDecorations=this._model.deltaDecorations(this._autoClosedEnclosingDecorations,[])}getAutoClosedCharactersRanges(){const n=[];for(let a=0;a<this._autoClosedCharactersDecorations.length;a++){const g=this._model.getDecorationRange(this._autoClosedCharactersDecorations[a]);g&&n.push(g)}return n}isValid(n){const a=[];for(let g=0;g<this._autoClosedEnclosingDecorations.length;g++){const E=this._model.getDecorationRange(this._autoClosedEnclosingDecorations[g]);if(E&&(a.push(E),E.startLineNumber!==E.endLineNumber))return!1}a.sort(Te.Q.compareRangesUsingStarts),n.sort(Te.Q.compareRangesUsingStarts);for(let g=0;g<n.length;g++)if(g>=a.length||!a[g].strictContainsRange(n[g]))return!1;return!0}}class Nh{static executeCommands(n,a,g){const E={model:n,selectionsBefore:a,trackedRanges:[],trackedRangesDirection:[]},R=this._innerExecuteCommands(E,g);for(let ne=0,_e=E.trackedRanges.length;ne<_e;ne++)E.model._setTrackedRange(E.trackedRanges[ne],null,0);return R}static _innerExecuteCommands(n,a){if(this._arrayIsEmpty(a))return null;const g=this._getEditOperations(n,a);if(g.operations.length===0)return null;const E=g.operations,R=this._getLoserCursorMap(E);if(R.hasOwnProperty("0"))return console.warn("Ignoring commands"),null;const ne=[];for(let ke=0,Ae=E.length;ke<Ae;ke++)R.hasOwnProperty(E[ke].identifier.major.toString())||ne.push(E[ke]);g.hadTrackedEditOperation&&ne.length>0&&(ne[0]._isTracked=!0);let _e=n.model.pushEditOperations(n.selectionsBefore,ne,ke=>{const Ae=[];for(let it=0;it<n.selectionsBefore.length;it++)Ae[it]=[];for(const it of ke)it.identifier&&Ae[it.identifier.major].push(it);const je=(it,yt)=>it.identifier.minor-yt.identifier.minor,Xe=[];for(let it=0;it<n.selectionsBefore.length;it++)Ae[it].length>0?(Ae[it].sort(je),Xe[it]=a[it].computeCursorState(n.model,{getInverseEditOperations:()=>Ae[it],getTrackedSelection:yt=>{const Nt=parseInt(yt,10),Ft=n.model._getTrackedRange(n.trackedRanges[Nt]);return n.trackedRangesDirection[Nt]===0?new O.L(Ft.startLineNumber,Ft.startColumn,Ft.endLineNumber,Ft.endColumn):new O.L(Ft.endLineNumber,Ft.endColumn,Ft.startLineNumber,Ft.startColumn)}})):Xe[it]=n.selectionsBefore[it];return Xe});_e||(_e=n.selectionsBefore);const Le=[];for(const ke in R)R.hasOwnProperty(ke)&&Le.push(parseInt(ke,10));Le.sort((ke,Ae)=>Ae-ke);for(const ke of Le)_e.splice(ke,1);return _e}static _arrayIsEmpty(n){for(let a=0,g=n.length;a<g;a++)if(n[a])return!1;return!0}static _getEditOperations(n,a){let g=[],E=!1;for(let R=0,ne=a.length;R<ne;R++){const _e=a[R];if(_e){const Le=this._getEditOperationsFromCommand(n,R,_e);g=g.concat(Le.operations),E=E||Le.hadTrackedEditOperation}}return{operations:g,hadTrackedEditOperation:E}}static _getEditOperationsFromCommand(n,a,g){const E=[];let R=0;const ne=(je,Xe,it=!1)=>{Te.Q.isEmpty(je)&&Xe===""||E.push({identifier:{major:a,minor:R++},range:je,text:Xe,forceMoveMarkers:it,isAutoWhitespaceEdit:g.insertsAutoWhitespace})};let _e=!1;const Ae={addEditOperation:ne,addTrackedEditOperation:(je,Xe,it)=>{_e=!0,ne(je,Xe,it)},trackSelection:(je,Xe)=>{const it=O.L.liftSelection(je);let yt;if(it.isEmpty())if(typeof Xe=="boolean")Xe?yt=2:yt=3;else{const Ut=n.model.getLineMaxColumn(it.startLineNumber);it.startColumn===Ut?yt=2:yt=3}else yt=1;const Nt=n.trackedRanges.length,Ft=n.model._setTrackedRange(null,it,yt);return n.trackedRanges[Nt]=Ft,n.trackedRangesDirection[Nt]=it.getDirection(),Nt.toString()}};try{g.getEditOperations(n.model,Ae)}catch(je){return(0,z.dz)(je),{operations:[],hadTrackedEditOperation:!1}}return{operations:E,hadTrackedEditOperation:_e}}static _getLoserCursorMap(n){n=n.slice(0),n.sort((g,E)=>-Te.Q.compareRangesUsingEnds(g.range,E.range));const a={};for(let g=1;g<n.length;g++){const E=n[g-1],R=n[g];if(Te.Q.getStartPosition(E.range).isBefore(Te.Q.getEndPosition(R.range))){let ne;E.identifier.major>R.identifier.major?ne=E.identifier.major:ne=R.identifier.major,a[ne.toString()]=!0;for(let _e=0;_e<n.length;_e++)n[_e].identifier.major===ne&&(n.splice(_e,1),_e<g&&g--,_e--);g>0&&g--}}return a}}class Gr{constructor(n,a,g){this.text=n,this.startSelection=a,this.endSelection=g}}class Dn{constructor(n,a){this._original=Dn._capture(n,a)}static _capture(n,a){const g=[];for(const E of a){if(E.startLineNumber!==E.endLineNumber)return null;g.push(new Gr(n.getLineContent(E.startLineNumber),E.startColumn-1,E.endColumn-1))}return g}deduceOutcome(n,a){if(!this._original)return null;const g=Dn._capture(n,a);if(!g||this._original.length!==g.length)return null;const E=[];for(let R=0,ne=this._original.length;R<ne;R++)E.push(Dn._deduceOutcome(this._original[R],g[R]));return E}static _deduceOutcome(n,a){const g=Math.min(n.startSelection,a.startSelection,Vt.Qp(n.text,a.text)),E=Math.min(n.text.length-n.endSelection,a.text.length-a.endSelection,Vt.Vi(n.text,a.text)),R=n.text.substring(g,n.text.length-E),ne=a.text.substring(g,a.text.length-E);return new No.vS(R,n.startSelection-g,n.endSelection-g,ne,a.startSelection-g,a.endSelection-g)}}var Ys=f(22595),Qr=f(12596),cs=f(38122),ml=f(59922),pl=f(54957),cd=f(1458),Mh=f(94513);class mc{constructor(){this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[]}insert(n){this._hasPending=!0,this._inserts.push(n)}change(n){this._hasPending=!0,this._changes.push(n)}remove(n){this._hasPending=!0,this._removes.push(n)}mustCommit(){return this._hasPending}commit(n){if(!this._hasPending)return;const a=this._inserts,g=this._changes,E=this._removes;this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[],n._commitPendingChanges(a,g,E)}}class Th{constructor(n,a,g,E,R){this.id=n,this.afterLineNumber=a,this.ordinal=g,this.height=E,this.minWidth=R,this.prefixSum=0}}class Go{constructor(n,a,g,E){this._instanceId=Vt.tk(++Go.INSTANCE_COUNT),this._pendingChanges=new mc,this._lastWhitespaceId=0,this._arr=[],this._prefixSumValidIndex=-1,this._minWidth=-1,this._lineCount=n,this._lineHeight=a,this._paddingTop=g,this._paddingBottom=E}static findInsertionIndex(n,a,g){let E=0,R=n.length;for(;E<R;){const ne=E+R>>>1;a===n[ne].afterLineNumber?g<n[ne].ordinal?R=ne:E=ne+1:a<n[ne].afterLineNumber?R=ne:E=ne+1}return E}setLineHeight(n){this._checkPendingChanges(),this._lineHeight=n}setPadding(n,a){this._paddingTop=n,this._paddingBottom=a}onFlushed(n){this._checkPendingChanges(),this._lineCount=n}changeWhitespace(n){let a=!1;try{n({insertWhitespace:(E,R,ne,_e)=>{a=!0,E=E|0,R=R|0,ne=ne|0,_e=_e|0;const Le=this._instanceId+ ++this._lastWhitespaceId;return this._pendingChanges.insert(new Th(Le,E,R,ne,_e)),Le},changeOneWhitespace:(E,R,ne)=>{a=!0,R=R|0,ne=ne|0,this._pendingChanges.change({id:E,newAfterLineNumber:R,newHeight:ne})},removeWhitespace:E=>{a=!0,this._pendingChanges.remove({id:E})}})}finally{this._pendingChanges.commit(this)}return a}_commitPendingChanges(n,a,g){if((n.length>0||g.length>0)&&(this._minWidth=-1),n.length+a.length+g.length<=1){for(const Le of n)this._insertWhitespace(Le);for(const Le of a)this._changeOneWhitespace(Le.id,Le.newAfterLineNumber,Le.newHeight);for(const Le of g){const ke=this._findWhitespaceIndex(Le.id);ke!==-1&&this._removeWhitespace(ke)}return}const E=new Set;for(const Le of g)E.add(Le.id);const R=new Map;for(const Le of a)R.set(Le.id,Le);const ne=Le=>{const ke=[];for(const Ae of Le)if(!E.has(Ae.id)){if(R.has(Ae.id)){const je=R.get(Ae.id);Ae.afterLineNumber=je.newAfterLineNumber,Ae.height=je.newHeight}ke.push(Ae)}return ke},_e=ne(this._arr).concat(ne(n));_e.sort((Le,ke)=>Le.afterLineNumber===ke.afterLineNumber?Le.ordinal-ke.ordinal:Le.afterLineNumber-ke.afterLineNumber),this._arr=_e,this._prefixSumValidIndex=-1}_checkPendingChanges(){this._pendingChanges.mustCommit()&&this._pendingChanges.commit(this)}_insertWhitespace(n){const a=Go.findInsertionIndex(this._arr,n.afterLineNumber,n.ordinal);this._arr.splice(a,0,n),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,a-1)}_findWhitespaceIndex(n){const a=this._arr;for(let g=0,E=a.length;g<E;g++)if(a[g].id===n)return g;return-1}_changeOneWhitespace(n,a,g){const E=this._findWhitespaceIndex(n);if(E!==-1&&(this._arr[E].height!==g&&(this._arr[E].height=g,this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,E-1)),this._arr[E].afterLineNumber!==a)){const R=this._arr[E];this._removeWhitespace(E),R.afterLineNumber=a,this._insertWhitespace(R)}}_removeWhitespace(n){this._arr.splice(n,1),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,n-1)}onLinesDeleted(n,a){this._checkPendingChanges(),n=n|0,a=a|0,this._lineCount-=a-n+1;for(let g=0,E=this._arr.length;g<E;g++){const R=this._arr[g].afterLineNumber;n<=R&&R<=a?this._arr[g].afterLineNumber=n-1:R>a&&(this._arr[g].afterLineNumber-=a-n+1)}}onLinesInserted(n,a){this._checkPendingChanges(),n=n|0,a=a|0,this._lineCount+=a-n+1;for(let g=0,E=this._arr.length;g<E;g++){const R=this._arr[g].afterLineNumber;n<=R&&(this._arr[g].afterLineNumber+=a-n+1)}}getWhitespacesTotalHeight(){return this._checkPendingChanges(),this._arr.length===0?0:this.getWhitespacesAccumulatedHeight(this._arr.length-1)}getWhitespacesAccumulatedHeight(n){this._checkPendingChanges(),n=n|0;let a=Math.max(0,this._prefixSumValidIndex+1);a===0&&(this._arr[0].prefixSum=this._arr[0].height,a++);for(let g=a;g<=n;g++)this._arr[g].prefixSum=this._arr[g-1].prefixSum+this._arr[g].height;return this._prefixSumValidIndex=Math.max(this._prefixSumValidIndex,n),this._arr[n].prefixSum}getLinesTotalHeight(){this._checkPendingChanges();const n=this._lineHeight*this._lineCount,a=this.getWhitespacesTotalHeight();return n+a+this._paddingTop+this._paddingBottom}getWhitespaceAccumulatedHeightBeforeLineNumber(n){this._checkPendingChanges(),n=n|0;const a=this._findLastWhitespaceBeforeLineNumber(n);return a===-1?0:this.getWhitespacesAccumulatedHeight(a)}_findLastWhitespaceBeforeLineNumber(n){n=n|0;const a=this._arr;let g=0,E=a.length-1;for(;g<=E;){const ne=(E-g|0)/2|0,_e=g+ne|0;if(a[_e].afterLineNumber<n){if(_e+1>=a.length||a[_e+1].afterLineNumber>=n)return _e;g=_e+1|0}else E=_e-1|0}return-1}_findFirstWhitespaceAfterLineNumber(n){n=n|0;const g=this._findLastWhitespaceBeforeLineNumber(n)+1;return g<this._arr.length?g:-1}getFirstWhitespaceIndexAfterLineNumber(n){return this._checkPendingChanges(),n=n|0,this._findFirstWhitespaceAfterLineNumber(n)}getVerticalOffsetForLineNumber(n,a=!1){this._checkPendingChanges(),n=n|0;let g;n>1?g=this._lineHeight*(n-1):g=0;const E=this.getWhitespaceAccumulatedHeightBeforeLineNumber(n-(a?1:0));return g+E+this._paddingTop}getVerticalOffsetAfterLineNumber(n,a=!1){this._checkPendingChanges(),n=n|0;const g=this._lineHeight*n,E=this.getWhitespaceAccumulatedHeightBeforeLineNumber(n+(a?1:0));return g+E+this._paddingTop}getWhitespaceMinWidth(){if(this._checkPendingChanges(),this._minWidth===-1){let n=0;for(let a=0,g=this._arr.length;a<g;a++)n=Math.max(n,this._arr[a].minWidth);this._minWidth=n}return this._minWidth}isAfterLines(n){this._checkPendingChanges();const a=this.getLinesTotalHeight();return n>a}isInTopPadding(n){return this._paddingTop===0?!1:(this._checkPendingChanges(),n<this._paddingTop)}isInBottomPadding(n){if(this._paddingBottom===0)return!1;this._checkPendingChanges();const a=this.getLinesTotalHeight();return n>=a-this._paddingBottom}getLineNumberAtOrAfterVerticalOffset(n){if(this._checkPendingChanges(),n=n|0,n<0)return 1;const a=this._lineCount|0,g=this._lineHeight;let E=1,R=a;for(;E<R;){const ne=(E+R)/2|0,_e=this.getVerticalOffsetForLineNumber(ne)|0;if(n>=_e+g)E=ne+1;else{if(n>=_e)return ne;R=ne}}return E>a?a:E}getLinesViewportData(n,a){this._checkPendingChanges(),n=n|0,a=a|0;const g=this._lineHeight,E=this.getLineNumberAtOrAfterVerticalOffset(n)|0,R=this.getVerticalOffsetForLineNumber(E)|0;let ne=this._lineCount|0,_e=this.getFirstWhitespaceIndexAfterLineNumber(E)|0;const Le=this.getWhitespacesCount()|0;let ke,Ae;_e===-1?(_e=Le,Ae=ne+1,ke=0):(Ae=this.getAfterLineNumberForWhitespaceIndex(_e)|0,ke=this.getHeightForWhitespaceIndex(_e)|0);let je=R,Xe=je;const it=5e5;let yt=0;R>=it&&(yt=Math.floor(R/it)*it,yt=Math.floor(yt/g)*g,Xe-=yt);const Nt=[],Ft=n+(a-n)/2;let Ut=-1;for(let li=E;li<=ne;li++){if(Ut===-1){const en=je,Xi=je+g;(en<=Ft&&Ft<Xi||en>Ft)&&(Ut=li)}for(je+=g,Nt[li-E]=Xe,Xe+=g;Ae===li;)Xe+=ke,je+=ke,_e++,_e>=Le?Ae=ne+1:(Ae=this.getAfterLineNumberForWhitespaceIndex(_e)|0,ke=this.getHeightForWhitespaceIndex(_e)|0);if(je>=a){ne=li;break}}Ut===-1&&(Ut=ne);const ui=this.getVerticalOffsetForLineNumber(ne)|0;let qt=E,ji=ne;return qt<ji&&R<n&&qt++,qt<ji&&ui+g>a&&ji--,{bigNumbersDelta:yt,startLineNumber:E,endLineNumber:ne,relativeVerticalOffset:Nt,centeredLineNumber:Ut,completelyVisibleStartLineNumber:qt,completelyVisibleEndLineNumber:ji}}getVerticalOffsetForWhitespaceIndex(n){this._checkPendingChanges(),n=n|0;const a=this.getAfterLineNumberForWhitespaceIndex(n);let g;a>=1?g=this._lineHeight*a:g=0;let E;return n>0?E=this.getWhitespacesAccumulatedHeight(n-1):E=0,g+E+this._paddingTop}getWhitespaceIndexAtOrAfterVerticallOffset(n){this._checkPendingChanges(),n=n|0;let a=0,g=this.getWhitespacesCount()-1;if(g<0)return-1;const E=this.getVerticalOffsetForWhitespaceIndex(g),R=this.getHeightForWhitespaceIndex(g);if(n>=E+R)return-1;for(;a<g;){const ne=Math.floor((a+g)/2),_e=this.getVerticalOffsetForWhitespaceIndex(ne),Le=this.getHeightForWhitespaceIndex(ne);if(n>=_e+Le)a=ne+1;else{if(n>=_e)return ne;g=ne}}return a}getWhitespaceAtVerticalOffset(n){this._checkPendingChanges(),n=n|0;const a=this.getWhitespaceIndexAtOrAfterVerticallOffset(n);if(a<0||a>=this.getWhitespacesCount())return null;const g=this.getVerticalOffsetForWhitespaceIndex(a);if(g>n)return null;const E=this.getHeightForWhitespaceIndex(a),R=this.getIdForWhitespaceIndex(a),ne=this.getAfterLineNumberForWhitespaceIndex(a);return{id:R,afterLineNumber:ne,verticalOffset:g,height:E}}getWhitespaceViewportData(n,a){this._checkPendingChanges(),n=n|0,a=a|0;const g=this.getWhitespaceIndexAtOrAfterVerticallOffset(n),E=this.getWhitespacesCount()-1;if(g<0)return[];const R=[];for(let ne=g;ne<=E;ne++){const _e=this.getVerticalOffsetForWhitespaceIndex(ne),Le=this.getHeightForWhitespaceIndex(ne);if(_e>=a)break;R.push({id:this.getIdForWhitespaceIndex(ne),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(ne),verticalOffset:_e,height:Le})}return R}getWhitespaces(){return this._checkPendingChanges(),this._arr.slice(0)}getWhitespacesCount(){return this._checkPendingChanges(),this._arr.length}getIdForWhitespaceIndex(n){return this._checkPendingChanges(),n=n|0,this._arr[n].id}getAfterLineNumberForWhitespaceIndex(n){return this._checkPendingChanges(),n=n|0,this._arr[n].afterLineNumber}getHeightForWhitespaceIndex(n){return this._checkPendingChanges(),n=n|0,this._arr[n].height}}Go.INSTANCE_COUNT=0;const pc=125;class fa{constructor(n,a,g,E){n=n|0,a=a|0,g=g|0,E=E|0,n<0&&(n=0),a<0&&(a=0),g<0&&(g=0),E<0&&(E=0),this.width=n,this.contentWidth=a,this.scrollWidth=Math.max(n,a),this.height=g,this.contentHeight=E,this.scrollHeight=Math.max(g,E)}equals(n){return this.width===n.width&&this.contentWidth===n.contentWidth&&this.height===n.height&&this.contentHeight===n.contentHeight}}class Cr extends _.jG{constructor(n,a){super(),this._onDidContentSizeChange=this._register(new S.vl),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._dimensions=new fa(0,0,0,0),this._scrollable=this._register(new Mh.yE({forceIntegerValues:!0,smoothScrollDuration:n,scheduleAtNextAnimationFrame:a})),this.onDidScroll=this._scrollable.onScroll}getScrollable(){return this._scrollable}setSmoothScrollDuration(n){this._scrollable.setSmoothScrollDuration(n)}validateScrollPosition(n){return this._scrollable.validateScrollPosition(n)}getScrollDimensions(){return this._dimensions}setScrollDimensions(n){if(this._dimensions.equals(n))return;const a=this._dimensions;this._dimensions=n,this._scrollable.setScrollDimensions({width:n.width,scrollWidth:n.scrollWidth,height:n.height,scrollHeight:n.scrollHeight},!0);const g=a.contentWidth!==n.contentWidth,E=a.contentHeight!==n.contentHeight;(g||E)&&this._onDidContentSizeChange.fire(new fo(a.contentWidth,a.contentHeight,n.contentWidth,n.contentHeight))}getFutureScrollPosition(){return this._scrollable.getFutureScrollPosition()}getCurrentScrollPosition(){return this._scrollable.getCurrentScrollPosition()}setScrollPositionNow(n){this._scrollable.setScrollPositionNow(n)}setScrollPositionSmooth(n){this._scrollable.setScrollPositionSmooth(n)}}class _c extends _.jG{constructor(n,a,g){super(),this._configuration=n;const E=this._configuration.options,R=E.get(133),ne=E.get(77);this._linesLayout=new Go(a,E.get(61),ne.top,ne.bottom),this._scrollable=this._register(new Cr(0,g)),this._configureSmoothScrollDuration(),this._scrollable.setScrollDimensions(new fa(R.contentWidth,0,R.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(105)?pc:0)}onConfigurationChanged(n){const a=this._configuration.options;if(n.hasChanged(61)&&this._linesLayout.setLineHeight(a.get(61)),n.hasChanged(77)){const g=a.get(77);this._linesLayout.setPadding(g.top,g.bottom)}if(n.hasChanged(133)){const g=a.get(133),E=g.contentWidth,R=g.height,ne=this._scrollable.getScrollDimensions(),_e=ne.contentWidth;this._scrollable.setScrollDimensions(new fa(E,ne.contentWidth,R,this._getContentHeight(E,R,_e)))}else this._updateHeight();n.hasChanged(105)&&this._configureSmoothScrollDuration()}onFlushed(n){this._linesLayout.onFlushed(n)}onLinesDeleted(n,a){this._linesLayout.onLinesDeleted(n,a)}onLinesInserted(n,a){this._linesLayout.onLinesInserted(n,a)}_getHorizontalScrollbarHeight(n,a){const E=this._configuration.options.get(94);return E.horizontal===2||n>=a?0:E.horizontalScrollbarSize}_getContentHeight(n,a,g){const E=this._configuration.options;let R=this._linesLayout.getLinesTotalHeight();return E.get(96)?R+=Math.max(0,a-E.get(61)-E.get(77).bottom):R+=this._getHorizontalScrollbarHeight(n,g),R}_updateHeight(){const n=this._scrollable.getScrollDimensions(),a=n.width,g=n.height,E=n.contentWidth;this._scrollable.setScrollDimensions(new fa(a,n.contentWidth,g,this._getContentHeight(a,g,E)))}getCurrentViewport(){const n=this._scrollable.getScrollDimensions(),a=this._scrollable.getCurrentScrollPosition();return new M.LM(a.scrollTop,a.scrollLeft,n.width,n.height)}getFutureViewport(){const n=this._scrollable.getScrollDimensions(),a=this._scrollable.getFutureScrollPosition();return new M.LM(a.scrollTop,a.scrollLeft,n.width,n.height)}_computeContentWidth(n){const a=this._configuration.options,g=a.get(134),E=a.get(46),R=a.get(133);if(g.isViewportWrapping){const ne=a.get(67);return n>R.contentWidth+E.typicalHalfwidthCharacterWidth&&ne.enabled&&ne.side==="right"?n+R.verticalScrollbarWidth:n}else{const ne=a.get(95)*E.typicalHalfwidthCharacterWidth,_e=this._linesLayout.getWhitespaceMinWidth();return Math.max(n+ne+R.verticalScrollbarWidth,_e)}}setMaxLineWidth(n){const a=this._scrollable.getScrollDimensions();this._scrollable.setScrollDimensions(new fa(a.width,this._computeContentWidth(n),a.height,a.contentHeight)),this._updateHeight()}saveState(){const n=this._scrollable.getFutureScrollPosition(),a=n.scrollTop,g=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(a),E=this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(g);return{scrollTop:a,scrollTopWithoutViewZones:a-E,scrollLeft:n.scrollLeft}}changeWhitespace(n){const a=this._linesLayout.changeWhitespace(n);return a&&this.onHeightMaybeChanged(),a}getVerticalOffsetForLineNumber(n,a=!1){return this._linesLayout.getVerticalOffsetForLineNumber(n,a)}getVerticalOffsetAfterLineNumber(n,a=!1){return this._linesLayout.getVerticalOffsetAfterLineNumber(n,a)}isAfterLines(n){return this._linesLayout.isAfterLines(n)}isInTopPadding(n){return this._linesLayout.isInTopPadding(n)}isInBottomPadding(n){return this._linesLayout.isInBottomPadding(n)}getLineNumberAtVerticalOffset(n){return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(n)}getWhitespaceAtVerticalOffset(n){return this._linesLayout.getWhitespaceAtVerticalOffset(n)}getLinesViewportData(){const n=this.getCurrentViewport();return this._linesLayout.getLinesViewportData(n.top,n.top+n.height)}getLinesViewportDataAtScrollTop(n){const a=this._scrollable.getScrollDimensions();return n+a.height>a.scrollHeight&&(n=a.scrollHeight-a.height),n<0&&(n=0),this._linesLayout.getLinesViewportData(n,n+a.height)}getWhitespaceViewportData(){const n=this.getCurrentViewport();return this._linesLayout.getWhitespaceViewportData(n.top,n.top+n.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(n){return this._scrollable.validateScrollPosition(n)}setScrollPosition(n,a){a===1?this._scrollable.setScrollPositionNow(n):this._scrollable.setScrollPositionSmooth(n)}deltaScrollNow(n,a){const g=this._scrollable.getCurrentScrollPosition();this._scrollable.setScrollPositionNow({scrollLeft:g.scrollLeft+n,scrollTop:g.scrollTop+a})}}var Mo=f(31430),vc=f(57445);function hd(Je,n){return Je===null?n?br.INSTANCE:Aa.INSTANCE:new Ra(Je,n)}class Ra{constructor(n,a){this._projectionData=n,this._isVisible=a}isVisible(){return this._isVisible}setVisible(n){return this._isVisible=n,this}getProjectionData(){return this._projectionData}getViewLineCount(){return this._isVisible?this._projectionData.getOutputLineCount():0}getViewLineContent(n,a,g){this._assertVisible();const E=g>0?this._projectionData.breakOffsets[g-1]:0,R=this._projectionData.breakOffsets[g];let ne;if(this._projectionData.injectionOffsets!==null){const _e=this._projectionData.injectionOffsets.map((ke,Ae)=>new ro.uK(0,0,ke+1,this._projectionData.injectionOptions[Ae],0));ne=ro.uK.applyInjectedText(n.getLineContent(a),_e).substring(E,R)}else ne=n.getValueInRange({startLineNumber:a,startColumn:E+1,endLineNumber:a,endColumn:R+1});return g>0&&(ne=_l(this._projectionData.wrappedTextIndentLength)+ne),ne}getViewLineLength(n,a,g){return this._assertVisible(),this._projectionData.getLineLength(g)}getViewLineMinColumn(n,a,g){return this._assertVisible(),this._projectionData.getMinOutputOffset(g)+1}getViewLineMaxColumn(n,a,g){return this._assertVisible(),this._projectionData.getMaxOutputOffset(g)+1}getViewLineData(n,a,g){const E=new Array;return this.getViewLinesData(n,a,g,1,0,[!0],E),E[0]}getViewLinesData(n,a,g,E,R,ne,_e){this._assertVisible();const Le=this._projectionData,ke=Le.injectionOffsets,Ae=Le.injectionOptions;let je=null;if(ke){je=[];let it=0,yt=0;for(let Nt=0;Nt<Le.getOutputLineCount();Nt++){const Ft=new Array;je[Nt]=Ft;const Ut=Nt>0?Le.breakOffsets[Nt-1]:0,ui=Le.breakOffsets[Nt];for(;yt<ke.length;){const qt=Ae[yt].content.length,ji=ke[yt]+it,li=ji+qt;if(ji>ui)break;if(Ut<li){const en=Ae[yt];if(en.inlineClassName){const Xi=Nt>0?Le.wrappedTextIndentLength:0,Hi=Xi+Math.max(ji-Ut,0),on=Xi+Math.min(li-Ut,ui);Hi!==on&&Ft.push(new M.or(Hi,on,en.inlineClassName,en.inlineClassNameAffectsLetterSpacing))}}if(li<=ui)it+=qt,yt++;else break}}}let Xe;ke?Xe=n.tokenization.getLineTokens(a).withInserted(ke.map((it,yt)=>({offset:it,text:Ae[yt].content,tokenMetadata:vc.f.defaultTokenMetadata}))):Xe=n.tokenization.getLineTokens(a);for(let it=g;it<g+E;it++){const yt=R+it-g;if(!ne[yt]){_e[yt]=null;continue}_e[yt]=this._getViewLineData(Xe,je?je[it]:null,it)}}_getViewLineData(n,a,g){this._assertVisible();const E=this._projectionData,R=g>0?E.wrappedTextIndentLength:0,ne=g>0?E.breakOffsets[g-1]:0,_e=E.breakOffsets[g],Le=n.sliceAndInflate(ne,_e,R);let ke=Le.getLineContent();g>0&&(ke=_l(E.wrappedTextIndentLength)+ke);const Ae=this._projectionData.getMinOutputOffset(g)+1,je=ke.length+1,Xe=g+1<this.getViewLineCount(),it=g===0?0:E.breakOffsetsVisibleColumn[g-1];return new M.GP(ke,Xe,Ae,je,it,Le,a)}getModelColumnOfViewPosition(n,a){return this._assertVisible(),this._projectionData.translateToInputOffset(n,a-1)+1}getViewPositionOfModelPosition(n,a,g=2){return this._assertVisible(),this._projectionData.translateToOutputPosition(a-1,g).toPosition(n)}getViewLineNumberOfModelPosition(n,a){this._assertVisible();const g=this._projectionData.translateToOutputPosition(a-1);return n+g.outputLineIndex}normalizePosition(n,a,g){const E=a.lineNumber-n;return this._projectionData.normalizeOutputPosition(n,a.column-1,g).toPosition(E)}getInjectedTextAt(n,a){return this._projectionData.getInjectedText(n,a-1)}_assertVisible(){if(!this._isVisible)throw new Error("Not supported")}}class br{constructor(){}isVisible(){return!0}setVisible(n){return n?this:Aa.INSTANCE}getProjectionData(){return null}getViewLineCount(){return 1}getViewLineContent(n,a,g){return n.getLineContent(a)}getViewLineLength(n,a,g){return n.getLineLength(a)}getViewLineMinColumn(n,a,g){return n.getLineMinColumn(a)}getViewLineMaxColumn(n,a,g){return n.getLineMaxColumn(a)}getViewLineData(n,a,g){const E=n.tokenization.getLineTokens(a),R=E.getLineContent();return new M.GP(R,!1,1,R.length+1,0,E.inflate(),null)}getViewLinesData(n,a,g,E,R,ne,_e){if(!ne[R]){_e[R]=null;return}_e[R]=this.getViewLineData(n,a,0)}getModelColumnOfViewPosition(n,a){return a}getViewPositionOfModelPosition(n,a){return new Di.y(n,a)}getViewLineNumberOfModelPosition(n,a){return n}normalizePosition(n,a,g){return a}getInjectedTextAt(n,a){return null}}br.INSTANCE=new br;class Aa{constructor(){}isVisible(){return!1}setVisible(n){return n?br.INSTANCE:this}getProjectionData(){return null}getViewLineCount(){return 0}getViewLineContent(n,a,g){throw new Error("Not supported")}getViewLineLength(n,a,g){throw new Error("Not supported")}getViewLineMinColumn(n,a,g){throw new Error("Not supported")}getViewLineMaxColumn(n,a,g){throw new Error("Not supported")}getViewLineData(n,a,g){throw new Error("Not supported")}getViewLinesData(n,a,g,E,R,ne,_e){throw new Error("Not supported")}getModelColumnOfViewPosition(n,a){throw new Error("Not supported")}getViewPositionOfModelPosition(n,a){throw new Error("Not supported")}getViewLineNumberOfModelPosition(n,a){throw new Error("Not supported")}normalizePosition(n,a,g){throw new Error("Not supported")}getInjectedTextAt(n,a){throw new Error("Not supported")}}Aa.INSTANCE=new Aa;const Oa=[""];function _l(Je){if(Je>=Oa.length)for(let n=1;n<=Je;n++)Oa[n]=ma(n);return Oa[Je]}function ma(Je){return new Array(Je+1).join(" ")}var vl=f(56158);class ud{constructor(n,a,g,E,R,ne,_e,Le,ke){this._editorId=n,this.model=a,this._validModelVersionId=-1,this._domLineBreaksComputerFactory=g,this._monospaceLineBreaksComputerFactory=E,this.fontInfo=R,this.tabSize=ne,this.wrappingStrategy=_e,this.wrappingColumn=Le,this.wrappingIndent=ke,this._constructLines(!0,null)}dispose(){this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[])}createCoordinatesConverter(){return new Pa(this)}_constructLines(n,a){this.modelLineProjections=[],n&&(this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[]));const g=this.model.getLinesContent(),E=this.model.getInjectedTextDecorations(this._editorId),R=g.length,ne=this.createLineBreaksComputer(),_e=new d.j3(ro.uK.fromDecorations(E));for(let Nt=0;Nt<R;Nt++){const Ft=_e.takeWhile(Ut=>Ut.lineNumber===Nt+1);ne.addRequest(g[Nt],Ft,a?a[Nt]:null)}const Le=ne.finalize(),ke=[],Ae=this.hiddenAreasDecorationIds.map(Nt=>this.model.getDecorationRange(Nt)).sort(Te.Q.compareRangesUsingStarts);let je=1,Xe=0,it=-1,yt=it+1<Ae.length?Xe+1:R+2;for(let Nt=0;Nt<R;Nt++){const Ft=Nt+1;Ft===yt&&(it++,je=Ae[it].startLineNumber,Xe=Ae[it].endLineNumber,yt=it+1<Ae.length?Xe+1:R+2);const Ut=Ft>=je&&Ft<=Xe,ui=hd(Le[Nt],!Ut);ke[Nt]=ui.getViewLineCount(),this.modelLineProjections[Nt]=ui}this._validModelVersionId=this.model.getVersionId(),this.projectedModelLineLineCounts=new vl.c2(ke)}getHiddenAreas(){return this.hiddenAreasDecorationIds.map(n=>this.model.getDecorationRange(n))}setHiddenAreas(n){const a=n.map(Xe=>this.model.validateRange(Xe)),g=Cc(a),E=this.hiddenAreasDecorationIds.map(Xe=>this.model.getDecorationRange(Xe)).sort(Te.Q.compareRangesUsingStarts);if(g.length===E.length){let Xe=!1;for(let it=0;it<g.length;it++)if(!g[it].equalsRange(E[it])){Xe=!0;break}if(!Xe)return!1}const R=g.map(Xe=>({range:Xe,options:ml.kI.EMPTY}));this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,R);const ne=g;let _e=1,Le=0,ke=-1,Ae=ke+1<ne.length?Le+1:this.modelLineProjections.length+2,je=!1;for(let Xe=0;Xe<this.modelLineProjections.length;Xe++){const it=Xe+1;it===Ae&&(ke++,_e=ne[ke].startLineNumber,Le=ne[ke].endLineNumber,Ae=ke+1<ne.length?Le+1:this.modelLineProjections.length+2);let yt=!1;if(it>=_e&&it<=Le?this.modelLineProjections[Xe].isVisible()&&(this.modelLineProjections[Xe]=this.modelLineProjections[Xe].setVisible(!1),yt=!0):(je=!0,this.modelLineProjections[Xe].isVisible()||(this.modelLineProjections[Xe]=this.modelLineProjections[Xe].setVisible(!0),yt=!0)),yt){const Nt=this.modelLineProjections[Xe].getViewLineCount();this.projectedModelLineLineCounts.setValue(Xe,Nt)}}return je||this.setHiddenAreas([]),!0}modelPositionIsVisible(n,a){return n<1||n>this.modelLineProjections.length?!1:this.modelLineProjections[n-1].isVisible()}getModelLineViewLineCount(n){return n<1||n>this.modelLineProjections.length?1:this.modelLineProjections[n-1].getViewLineCount()}setTabSize(n){return this.tabSize===n?!1:(this.tabSize=n,this._constructLines(!1,null),!0)}setWrappingSettings(n,a,g,E){const R=this.fontInfo.equals(n),ne=this.wrappingStrategy===a,_e=this.wrappingColumn===g,Le=this.wrappingIndent===E;if(R&&ne&&_e&&Le)return!1;const ke=R&&ne&&!_e&&Le;this.fontInfo=n,this.wrappingStrategy=a,this.wrappingColumn=g,this.wrappingIndent=E;let Ae=null;if(ke){Ae=[];for(let je=0,Xe=this.modelLineProjections.length;je<Xe;je++)Ae[je]=this.modelLineProjections[je].getProjectionData()}return this._constructLines(!1,Ae),!0}createLineBreaksComputer(){return(this.wrappingStrategy==="advanced"?this._domLineBreaksComputerFactory:this._monospaceLineBreaksComputerFactory).createLineBreaksComputer(this.fontInfo,this.tabSize,this.wrappingColumn,this.wrappingIndent)}onModelFlushed(){this._constructLines(!0,null)}onModelLinesDeleted(n,a,g){if(!n||n<=this._validModelVersionId)return null;const E=a===1?1:this.projectedModelLineLineCounts.getPrefixSum(a-1)+1,R=this.projectedModelLineLineCounts.getPrefixSum(g);return this.modelLineProjections.splice(a-1,g-a+1),this.projectedModelLineLineCounts.removeValues(a-1,g-a+1),new tr(E,R)}onModelLinesInserted(n,a,g,E){if(!n||n<=this._validModelVersionId)return null;const R=a>2&&!this.modelLineProjections[a-2].isVisible(),ne=a===1?1:this.projectedModelLineLineCounts.getPrefixSum(a-1)+1;let _e=0;const Le=[],ke=[];for(let Ae=0,je=E.length;Ae<je;Ae++){const Xe=hd(E[Ae],!R);Le.push(Xe);const it=Xe.getViewLineCount();_e+=it,ke[Ae]=it}return this.modelLineProjections=this.modelLineProjections.slice(0,a-1).concat(Le).concat(this.modelLineProjections.slice(a-1)),this.projectedModelLineLineCounts.insertValues(a-1,ke),new yo(ne,ne+_e-1)}onModelLineChanged(n,a,g){if(n!==null&&n<=this._validModelVersionId)return[!1,null,null,null];const E=a-1,R=this.modelLineProjections[E].getViewLineCount(),ne=this.modelLineProjections[E].isVisible(),_e=hd(g,ne);this.modelLineProjections[E]=_e;const Le=this.modelLineProjections[E].getViewLineCount();let ke=!1,Ae=0,je=-1,Xe=0,it=-1,yt=0,Nt=-1;R>Le?(Ae=this.projectedModelLineLineCounts.getPrefixSum(a-1)+1,je=Ae+Le-1,yt=je+1,Nt=yt+(R-Le)-1,ke=!0):R<Le?(Ae=this.projectedModelLineLineCounts.getPrefixSum(a-1)+1,je=Ae+R-1,Xe=je+1,it=Xe+(Le-R)-1,ke=!0):(Ae=this.projectedModelLineLineCounts.getPrefixSum(a-1)+1,je=Ae+Le-1),this.projectedModelLineLineCounts.setValue(E,Le);const Ft=Ae<=je?new So(Ae,je-Ae+1):null,Ut=Xe<=it?new yo(Xe,it):null,ui=yt<=Nt?new tr(yt,Nt):null;return[ke,Ft,Ut,ui]}acceptVersionId(n){this._validModelVersionId=n,this.modelLineProjections.length===1&&!this.modelLineProjections[0].isVisible()&&this.setHiddenAreas([])}getViewLineCount(){return this.projectedModelLineLineCounts.getTotalSum()}_toValidViewLineNumber(n){if(n<1)return 1;const a=this.getViewLineCount();return n>a?a:n|0}getActiveIndentGuide(n,a,g){n=this._toValidViewLineNumber(n),a=this._toValidViewLineNumber(a),g=this._toValidViewLineNumber(g);const E=this.convertViewPositionToModelPosition(n,this.getViewLineMinColumn(n)),R=this.convertViewPositionToModelPosition(a,this.getViewLineMinColumn(a)),ne=this.convertViewPositionToModelPosition(g,this.getViewLineMinColumn(g)),_e=this.model.guides.getActiveIndentGuide(E.lineNumber,R.lineNumber,ne.lineNumber),Le=this.convertModelPositionToViewPosition(_e.startLineNumber,1),ke=this.convertModelPositionToViewPosition(_e.endLineNumber,this.model.getLineMaxColumn(_e.endLineNumber));return{startLineNumber:Le.lineNumber,endLineNumber:ke.lineNumber,indent:_e.indent}}getViewLineInfo(n){n=this._toValidViewLineNumber(n);const a=this.projectedModelLineLineCounts.getIndexOf(n-1),g=a.index,E=a.remainder;return new Cl(g+1,E)}getMinColumnOfViewLine(n){return this.modelLineProjections[n.modelLineNumber-1].getViewLineMinColumn(this.model,n.modelLineNumber,n.modelLineWrappedLineIdx)}getMaxColumnOfViewLine(n){return this.modelLineProjections[n.modelLineNumber-1].getViewLineMaxColumn(this.model,n.modelLineNumber,n.modelLineWrappedLineIdx)}getModelStartPositionOfViewLine(n){const a=this.modelLineProjections[n.modelLineNumber-1],g=a.getViewLineMinColumn(this.model,n.modelLineNumber,n.modelLineWrappedLineIdx),E=a.getModelColumnOfViewPosition(n.modelLineWrappedLineIdx,g);return new Di.y(n.modelLineNumber,E)}getModelEndPositionOfViewLine(n){const a=this.modelLineProjections[n.modelLineNumber-1],g=a.getViewLineMaxColumn(this.model,n.modelLineNumber,n.modelLineWrappedLineIdx),E=a.getModelColumnOfViewPosition(n.modelLineWrappedLineIdx,g);return new Di.y(n.modelLineNumber,E)}getViewLineInfosGroupedByModelRanges(n,a){const g=this.getViewLineInfo(n),E=this.getViewLineInfo(a),R=new Array;let ne=this.getModelStartPositionOfViewLine(g),_e=new Array;for(let Le=g.modelLineNumber;Le<=E.modelLineNumber;Le++){const ke=this.modelLineProjections[Le-1];if(ke.isVisible()){const Ae=Le===g.modelLineNumber?g.modelLineWrappedLineIdx:0,je=Le===E.modelLineNumber?E.modelLineWrappedLineIdx+1:ke.getViewLineCount();for(let Xe=Ae;Xe<je;Xe++)_e.push(new Cl(Le,Xe))}if(!ke.isVisible()&&ne){const Ae=new Di.y(Le-1,this.model.getLineMaxColumn(Le-1)+1),je=Te.Q.fromPositions(ne,Ae);R.push(new Fs(je,_e)),_e=[],ne=null}else ke.isVisible()&&!ne&&(ne=new Di.y(Le,1))}if(ne){const Le=Te.Q.fromPositions(ne,this.getModelEndPositionOfViewLine(E));R.push(new Fs(Le,_e))}return R}getViewLinesBracketGuides(n,a,g,E){const R=g?this.convertViewPositionToModelPosition(g.lineNumber,g.column):null,ne=[];for(const _e of this.getViewLineInfosGroupedByModelRanges(n,a)){const Le=_e.modelRange.startLineNumber,ke=this.model.guides.getLinesBracketGuides(Le,_e.modelRange.endLineNumber,R,E);for(const Ae of _e.viewLines){const Xe=ke[Ae.modelLineNumber-Le].map(it=>{if(it.forWrappedLinesAfterColumn!==-1&&this.modelLineProjections[Ae.modelLineNumber-1].getViewPositionOfModelPosition(0,it.forWrappedLinesAfterColumn).lineNumber>=Ae.modelLineWrappedLineIdx||it.forWrappedLinesBeforeOrAtColumn!==-1&&this.modelLineProjections[Ae.modelLineNumber-1].getViewPositionOfModelPosition(0,it.forWrappedLinesBeforeOrAtColumn).lineNumber<Ae.modelLineWrappedLineIdx)return;if(!it.horizontalLine)return it;let yt=-1;if(it.column!==-1){const Ut=this.modelLineProjections[Ae.modelLineNumber-1].getViewPositionOfModelPosition(0,it.column);if(Ut.lineNumber===Ae.modelLineWrappedLineIdx)yt=Ut.column;else if(Ut.lineNumber<Ae.modelLineWrappedLineIdx)yt=this.getMinColumnOfViewLine(Ae);else if(Ut.lineNumber>Ae.modelLineWrappedLineIdx)return}const Nt=this.convertModelPositionToViewPosition(Ae.modelLineNumber,it.horizontalLine.endColumn),Ft=this.modelLineProjections[Ae.modelLineNumber-1].getViewPositionOfModelPosition(0,it.horizontalLine.endColumn);return Ft.lineNumber===Ae.modelLineWrappedLineIdx?new vs.TH(it.visibleColumn,yt,it.className,new vs.pv(it.horizontalLine.top,Nt.column),-1,-1):Ft.lineNumber<Ae.modelLineWrappedLineIdx||it.visibleColumn!==-1?void 0:new vs.TH(it.visibleColumn,yt,it.className,new vs.pv(it.horizontalLine.top,this.getMaxColumnOfViewLine(Ae)),-1,-1)});ne.push(Xe.filter(it=>!!it))}}return ne}getViewLinesIndentGuides(n,a){n=this._toValidViewLineNumber(n),a=this._toValidViewLineNumber(a);const g=this.convertViewPositionToModelPosition(n,this.getViewLineMinColumn(n)),E=this.convertViewPositionToModelPosition(a,this.getViewLineMaxColumn(a));let R=[];const ne=[],_e=[],Le=g.lineNumber-1,ke=E.lineNumber-1;let Ae=null;for(let yt=Le;yt<=ke;yt++){const Nt=this.modelLineProjections[yt];if(Nt.isVisible()){const Ft=Nt.getViewLineNumberOfModelPosition(0,yt===Le?g.column:1),Ut=Nt.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(yt+1)),ui=Ut-Ft+1;let qt=0;ui>1&&Nt.getViewLineMinColumn(this.model,yt+1,Ut)===1&&(qt=Ft===0?1:2),ne.push(ui),_e.push(qt),Ae===null&&(Ae=new Di.y(yt+1,0))}else Ae!==null&&(R=R.concat(this.model.guides.getLinesIndentGuides(Ae.lineNumber,yt)),Ae=null)}Ae!==null&&(R=R.concat(this.model.guides.getLinesIndentGuides(Ae.lineNumber,E.lineNumber)),Ae=null);const je=a-n+1,Xe=new Array(je);let it=0;for(let yt=0,Nt=R.length;yt<Nt;yt++){let Ft=R[yt];const Ut=Math.min(je-it,ne[yt]),ui=_e[yt];let qt;ui===2?qt=0:ui===1?qt=1:qt=Ut;for(let ji=0;ji<Ut;ji++)ji===qt&&(Ft=0),Xe[it++]=Ft}return Xe}getViewLineContent(n){const a=this.getViewLineInfo(n);return this.modelLineProjections[a.modelLineNumber-1].getViewLineContent(this.model,a.modelLineNumber,a.modelLineWrappedLineIdx)}getViewLineLength(n){const a=this.getViewLineInfo(n);return this.modelLineProjections[a.modelLineNumber-1].getViewLineLength(this.model,a.modelLineNumber,a.modelLineWrappedLineIdx)}getViewLineMinColumn(n){const a=this.getViewLineInfo(n);return this.modelLineProjections[a.modelLineNumber-1].getViewLineMinColumn(this.model,a.modelLineNumber,a.modelLineWrappedLineIdx)}getViewLineMaxColumn(n){const a=this.getViewLineInfo(n);return this.modelLineProjections[a.modelLineNumber-1].getViewLineMaxColumn(this.model,a.modelLineNumber,a.modelLineWrappedLineIdx)}getViewLineData(n){const a=this.getViewLineInfo(n);return this.modelLineProjections[a.modelLineNumber-1].getViewLineData(this.model,a.modelLineNumber,a.modelLineWrappedLineIdx)}getViewLinesData(n,a,g){n=this._toValidViewLineNumber(n),a=this._toValidViewLineNumber(a);const E=this.projectedModelLineLineCounts.getIndexOf(n-1);let R=n;const ne=E.index,_e=E.remainder,Le=[];for(let ke=ne,Ae=this.model.getLineCount();ke<Ae;ke++){const je=this.modelLineProjections[ke];if(!je.isVisible())continue;const Xe=ke===ne?_e:0;let it=je.getViewLineCount()-Xe,yt=!1;if(R+it>a&&(yt=!0,it=a-R+1),je.getViewLinesData(this.model,ke+1,Xe,it,R-n,g,Le),R+=it,yt)break}return Le}validateViewPosition(n,a,g){n=this._toValidViewLineNumber(n);const E=this.projectedModelLineLineCounts.getIndexOf(n-1),R=E.index,ne=E.remainder,_e=this.modelLineProjections[R],Le=_e.getViewLineMinColumn(this.model,R+1,ne),ke=_e.getViewLineMaxColumn(this.model,R+1,ne);a<Le&&(a=Le),a>ke&&(a=ke);const Ae=_e.getModelColumnOfViewPosition(ne,a);return this.model.validatePosition(new Di.y(R+1,Ae)).equals(g)?new Di.y(n,a):this.convertModelPositionToViewPosition(g.lineNumber,g.column)}validateViewRange(n,a){const g=this.validateViewPosition(n.startLineNumber,n.startColumn,a.getStartPosition()),E=this.validateViewPosition(n.endLineNumber,n.endColumn,a.getEndPosition());return new Te.Q(g.lineNumber,g.column,E.lineNumber,E.column)}convertViewPositionToModelPosition(n,a){const g=this.getViewLineInfo(n),E=this.modelLineProjections[g.modelLineNumber-1].getModelColumnOfViewPosition(g.modelLineWrappedLineIdx,a);return this.model.validatePosition(new Di.y(g.modelLineNumber,E))}convertViewRangeToModelRange(n){const a=this.convertViewPositionToModelPosition(n.startLineNumber,n.startColumn),g=this.convertViewPositionToModelPosition(n.endLineNumber,n.endColumn);return new Te.Q(a.lineNumber,a.column,g.lineNumber,g.column)}convertModelPositionToViewPosition(n,a,g=2){const E=this.model.validatePosition(new Di.y(n,a)),R=E.lineNumber,ne=E.column;let _e=R-1,Le=!1;for(;_e>0&&!this.modelLineProjections[_e].isVisible();)_e--,Le=!0;if(_e===0&&!this.modelLineProjections[_e].isVisible())return new Di.y(1,1);const ke=1+this.projectedModelLineLineCounts.getPrefixSum(_e);let Ae;return Le?Ae=this.modelLineProjections[_e].getViewPositionOfModelPosition(ke,this.model.getLineMaxColumn(_e+1),g):Ae=this.modelLineProjections[R-1].getViewPositionOfModelPosition(ke,ne,g),Ae}convertModelRangeToViewRange(n,a=0){if(n.isEmpty()){const g=this.convertModelPositionToViewPosition(n.startLineNumber,n.startColumn,a);return Te.Q.fromPositions(g)}else{const g=this.convertModelPositionToViewPosition(n.startLineNumber,n.startColumn,1),E=this.convertModelPositionToViewPosition(n.endLineNumber,n.endColumn,0);return new Te.Q(g.lineNumber,g.column,E.lineNumber,E.column)}}getViewLineNumberOfModelPosition(n,a){let g=n-1;if(this.modelLineProjections[g].isVisible()){const R=1+this.projectedModelLineLineCounts.getPrefixSum(g);return this.modelLineProjections[g].getViewLineNumberOfModelPosition(R,a)}for(;g>0&&!this.modelLineProjections[g].isVisible();)g--;if(g===0&&!this.modelLineProjections[g].isVisible())return 1;const E=1+this.projectedModelLineLineCounts.getPrefixSum(g);return this.modelLineProjections[g].getViewLineNumberOfModelPosition(E,this.model.getLineMaxColumn(g+1))}getDecorationsInRange(n,a,g){const E=this.convertViewPositionToModelPosition(n.startLineNumber,n.startColumn),R=this.convertViewPositionToModelPosition(n.endLineNumber,n.endColumn);if(R.lineNumber-E.lineNumber<=n.endLineNumber-n.startLineNumber)return this.model.getDecorationsInRange(new Te.Q(E.lineNumber,1,R.lineNumber,R.column),a,g);let ne=[];const _e=E.lineNumber-1,Le=R.lineNumber-1;let ke=null;for(let it=_e;it<=Le;it++)if(this.modelLineProjections[it].isVisible())ke===null&&(ke=new Di.y(it+1,it===_e?E.column:1));else if(ke!==null){const Nt=this.model.getLineMaxColumn(it);ne=ne.concat(this.model.getDecorationsInRange(new Te.Q(ke.lineNumber,ke.column,it,Nt),a,g)),ke=null}ke!==null&&(ne=ne.concat(this.model.getDecorationsInRange(new Te.Q(ke.lineNumber,ke.column,R.lineNumber,R.column),a,g)),ke=null),ne.sort((it,yt)=>{const Nt=Te.Q.compareRangesUsingStarts(it.range,yt.range);return Nt===0?it.id<yt.id?-1:it.id>yt.id?1:0:Nt});const Ae=[];let je=0,Xe=null;for(const it of ne){const yt=it.id;Xe!==yt&&(Xe=yt,Ae[je++]=it)}return Ae}getInjectedTextAt(n){const a=this.getViewLineInfo(n.lineNumber);return this.modelLineProjections[a.modelLineNumber-1].getInjectedTextAt(a.modelLineWrappedLineIdx,n.column)}normalizePosition(n,a){const g=this.getViewLineInfo(n.lineNumber);return this.modelLineProjections[g.modelLineNumber-1].normalizePosition(g.modelLineWrappedLineIdx,n,a)}getLineIndentColumn(n){const a=this.getViewLineInfo(n);return a.modelLineWrappedLineIdx===0?this.model.getLineIndentColumn(a.modelLineNumber):0}}function Cc(Je){if(Je.length===0)return[];const n=Je.slice();n.sort(Te.Q.compareRangesUsingStarts);const a=[];let g=n[0].startLineNumber,E=n[0].endLineNumber;for(let R=1,ne=n.length;R<ne;R++){const _e=n[R];_e.startLineNumber>E+1?(a.push(new Te.Q(g,1,E,1)),g=_e.startLineNumber,E=_e.endLineNumber):_e.endLineNumber>E&&(E=_e.endLineNumber)}return a.push(new Te.Q(g,1,E,1)),a}class Cl{constructor(n,a){this.modelLineNumber=n,this.modelLineWrappedLineIdx=a}}class Fs{constructor(n,a){this.modelRange=n,this.viewLines=a}}class Pa{constructor(n){this._lines=n}convertViewPositionToModelPosition(n){return this._lines.convertViewPositionToModelPosition(n.lineNumber,n.column)}convertViewRangeToModelRange(n){return this._lines.convertViewRangeToModelRange(n)}validateViewPosition(n,a){return this._lines.validateViewPosition(n.lineNumber,n.column,a)}validateViewRange(n,a){return this._lines.validateViewRange(n,a)}convertModelPositionToViewPosition(n,a){return this._lines.convertModelPositionToViewPosition(n.lineNumber,n.column,a)}convertModelRangeToViewRange(n,a){return this._lines.convertModelRangeToViewRange(n,a)}modelPositionIsVisible(n){return this._lines.modelPositionIsVisible(n.lineNumber,n.column)}getModelLineViewLineCount(n){return this._lines.getModelLineViewLineCount(n)}getViewLineNumberOfModelPosition(n,a){return this._lines.getViewLineNumberOfModelPosition(n,a)}}class Hs{constructor(n){this.model=n}dispose(){}createCoordinatesConverter(){return new Fa(this)}getHiddenAreas(){return[]}setHiddenAreas(n){return!1}setTabSize(n){return!1}setWrappingSettings(n,a,g,E){return!1}createLineBreaksComputer(){const n=[];return{addRequest:(a,g,E)=>{n.push(null)},finalize:()=>n}}onModelFlushed(){}onModelLinesDeleted(n,a,g){return new tr(a,g)}onModelLinesInserted(n,a,g,E){return new yo(a,g)}onModelLineChanged(n,a,g){return[!1,new So(a,1),null,null]}acceptVersionId(n){}getViewLineCount(){return this.model.getLineCount()}getActiveIndentGuide(n,a,g){return{startLineNumber:n,endLineNumber:n,indent:0}}getViewLinesBracketGuides(n,a,g){return new Array(a-n+1).fill([])}getViewLinesIndentGuides(n,a){const g=a-n+1,E=new Array(g);for(let R=0;R<g;R++)E[R]=0;return E}getViewLineContent(n){return this.model.getLineContent(n)}getViewLineLength(n){return this.model.getLineLength(n)}getViewLineMinColumn(n){return this.model.getLineMinColumn(n)}getViewLineMaxColumn(n){return this.model.getLineMaxColumn(n)}getViewLineData(n){const a=this.model.tokenization.getLineTokens(n),g=a.getLineContent();return new M.GP(g,!1,1,g.length+1,0,a.inflate(),null)}getViewLinesData(n,a,g){const E=this.model.getLineCount();n=Math.min(Math.max(1,n),E),a=Math.min(Math.max(1,a),E);const R=[];for(let ne=n;ne<=a;ne++){const _e=ne-n;R[_e]=g[_e]?this.getViewLineData(ne):null}return R}getDecorationsInRange(n,a,g){return this.model.getDecorationsInRange(n,a,g)}normalizePosition(n,a){return this.model.normalizePosition(n,a)}getLineIndentColumn(n){return this.model.getLineIndentColumn(n)}getInjectedTextAt(n){return null}}class Fa{constructor(n){this._lines=n}_validPosition(n){return this._lines.model.validatePosition(n)}_validRange(n){return this._lines.model.validateRange(n)}convertViewPositionToModelPosition(n){return this._validPosition(n)}convertViewRangeToModelRange(n){return this._validRange(n)}validateViewPosition(n,a){return this._validPosition(a)}validateViewRange(n,a){return this._validRange(a)}convertModelPositionToViewPosition(n){return this._validPosition(n)}convertModelRangeToViewRange(n){return this._validRange(n)}modelPositionIsVisible(n){const a=this._lines.model.getLineCount();return!(n.lineNumber<1||n.lineNumber>a)}getModelLineViewLineCount(n){return 1}getViewLineNumberOfModelPosition(n,a){return n}}const Ba=!0;class Wa extends _.jG{constructor(n,a,g,E,R,ne,_e,Le){if(super(),this.languageConfigurationService=_e,this._themeService=Le,this._editorId=n,this._configuration=a,this.model=g,this._eventDispatcher=new ir,this.onEvent=this._eventDispatcher.onEvent,this.cursorConfig=new ms.d$(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._tokenizeViewportSoon=this._register(new Ke.uC(()=>this.tokenizeViewport(),50)),this._updateConfigurationViewLineCount=this._register(new Ke.uC(()=>this._updateConfigurationViewLineCountNow(),0)),this._hasFocus=!1,this._viewportStart=Qo.create(this.model),Ba&&this.model.isTooLargeForTokenization())this._lines=new Hs(this.model);else{const ke=this._configuration.options,Ae=ke.get(46),je=ke.get(127),Xe=ke.get(134),it=ke.get(126);this._lines=new ud(this._editorId,this.model,E,R,Ae,this.model.getOptions().tabSize,je,Xe.wrappingColumn,it)}this.coordinatesConverter=this._lines.createCoordinatesConverter(),this._cursor=this._register(new Lo(g,this,this.coordinatesConverter,this.cursorConfig)),this.viewLayout=this._register(new _c(this._configuration,this.getLineCount(),ne)),this._register(this.viewLayout.onDidScroll(ke=>{ke.scrollTopChanged&&this._tokenizeViewportSoon.schedule(),ke.scrollTopChanged&&this._viewportStart.invalidate(),this._eventDispatcher.emitSingleViewEvent(new pi(ke)),this._eventDispatcher.emitOutgoingEvent(new Xn(ke.oldScrollWidth,ke.oldScrollLeft,ke.oldScrollHeight,ke.oldScrollTop,ke.scrollWidth,ke.scrollLeft,ke.scrollHeight,ke.scrollTop))})),this._register(this.viewLayout.onDidContentSizeChange(ke=>{this._eventDispatcher.emitOutgoingEvent(ke)})),this._decorations=new Mo.UB(this._editorId,this.model,this._configuration,this._lines,this.coordinatesConverter),this._registerModelEvents(),this._register(this._configuration.onDidChangeFast(ke=>{try{const Ae=this._eventDispatcher.beginEmitViewEvents();this._onConfigurationChanged(Ae,ke)}finally{this._eventDispatcher.endEmitViewEvents()}})),this._register(P.getInstance().onDidChange(()=>{this._eventDispatcher.emitSingleViewEvent(new Ma)})),this._register(this._themeService.onDidColorThemeChange(ke=>{this._invalidateDecorationsColorCache(),this._eventDispatcher.emitSingleViewEvent(new Kr(ke))})),this._updateConfigurationViewLineCountNow()}dispose(){super.dispose(),this._decorations.dispose(),this._lines.dispose(),this._viewportStart.dispose(),this._eventDispatcher.dispose()}createLineBreaksComputer(){return this._lines.createLineBreaksComputer()}addViewEventHandler(n){this._eventDispatcher.addViewEventHandler(n)}removeViewEventHandler(n){this._eventDispatcher.removeViewEventHandler(n)}_updateConfigurationViewLineCountNow(){this._configuration.setViewLineCount(this._lines.getViewLineCount())}tokenizeViewport(){const n=this.viewLayout.getLinesViewportData(),a=new Te.Q(n.startLineNumber,this.getLineMinColumn(n.startLineNumber),n.endLineNumber,this.getLineMaxColumn(n.endLineNumber)),g=this._toModelVisibleRanges(a);for(const E of g)this.model.tokenization.tokenizeViewport(E.startLineNumber,E.endLineNumber)}setHasFocus(n){this._hasFocus=n,this._cursor.setHasFocus(n),this._eventDispatcher.emitSingleViewEvent(new jr(n)),this._eventDispatcher.emitOutgoingEvent(new un(!n,n))}onCompositionStart(){this._eventDispatcher.emitSingleViewEvent(new ld)}onCompositionEnd(){this._eventDispatcher.emitSingleViewEvent(new dd)}_onConfigurationChanged(n,a){let g=null;if(this._viewportStart.isValid){const Ae=new Di.y(this._viewportStart.viewLineNumber,this.getLineMinColumn(this._viewportStart.viewLineNumber));g=this.coordinatesConverter.convertViewPositionToModelPosition(Ae)}let E=!1;const R=this._configuration.options,ne=R.get(46),_e=R.get(127),Le=R.get(134),ke=R.get(126);if(this._lines.setWrappingSettings(ne,_e,Le.wrappingColumn,ke)&&(n.emitViewEvent(new qs),n.emitViewEvent(new Rr),n.emitViewEvent(new $o(null)),this._cursor.onLineMappingChanged(n),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this.viewLayout.getCurrentScrollTop()!==0&&(E=!0),this._updateConfigurationViewLineCount.schedule()),a.hasChanged(83)&&(this._decorations.reset(),n.emitViewEvent(new $o(null))),n.emitViewEvent(new gc(a)),this.viewLayout.onConfigurationChanged(a),E&&g){const Ae=this.coordinatesConverter.convertModelPositionToViewPosition(g),je=this.viewLayout.getVerticalOffsetForLineNumber(Ae.lineNumber);this.viewLayout.setScrollPosition({scrollTop:je+this._viewportStart.startLineDelta},1)}ms.d$.shouldRecreate(a)&&(this.cursorConfig=new ms.d$(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig))}_registerModelEvents(){this._register(this.model.onDidChangeContentOrInjectedText(n=>{try{const g=this._eventDispatcher.beginEmitViewEvents();let E=!1,R=!1;const ne=n instanceof ro.Ic?n.rawContentChangedEvent.changes:n.changes,_e=n instanceof ro.Ic?n.rawContentChangedEvent.versionId:null,Le=this._lines.createLineBreaksComputer();for(const je of ne)switch(je.changeType){case 4:{for(let Xe=0;Xe<je.detail.length;Xe++){const it=je.detail[Xe];let yt=je.injectedTexts[Xe];yt&&(yt=yt.filter(Nt=>!Nt.ownerId||Nt.ownerId===this._editorId)),Le.addRequest(it,yt,null)}break}case 2:{let Xe=null;je.injectedText&&(Xe=je.injectedText.filter(it=>!it.ownerId||it.ownerId===this._editorId)),Le.addRequest(je.detail,Xe,null);break}}const ke=Le.finalize(),Ae=new d.j3(ke);for(const je of ne)switch(je.changeType){case 1:{this._lines.onModelFlushed(),g.emitViewEvent(new qs),this._decorations.reset(),this.viewLayout.onFlushed(this.getLineCount()),E=!0;break}case 3:{const Xe=this._lines.onModelLinesDeleted(_e,je.fromLineNumber,je.toLineNumber);Xe!==null&&(g.emitViewEvent(Xe),this.viewLayout.onLinesDeleted(Xe.fromLineNumber,Xe.toLineNumber)),E=!0;break}case 4:{const Xe=Ae.takeCount(je.detail.length),it=this._lines.onModelLinesInserted(_e,je.fromLineNumber,je.toLineNumber,Xe);it!==null&&(g.emitViewEvent(it),this.viewLayout.onLinesInserted(it.fromLineNumber,it.toLineNumber)),E=!0;break}case 2:{const Xe=Ae.dequeue(),[it,yt,Nt,Ft]=this._lines.onModelLineChanged(_e,je.lineNumber,Xe);R=it,yt&&g.emitViewEvent(yt),Nt&&(g.emitViewEvent(Nt),this.viewLayout.onLinesInserted(Nt.fromLineNumber,Nt.toLineNumber)),Ft&&(g.emitViewEvent(Ft),this.viewLayout.onLinesDeleted(Ft.fromLineNumber,Ft.toLineNumber));break}case 5:break}_e!==null&&this._lines.acceptVersionId(_e),this.viewLayout.onHeightMaybeChanged(),!E&&R&&(g.emitViewEvent(new Rr),g.emitViewEvent(new $o(null)),this._cursor.onLineMappingChanged(g),this._decorations.onLineMappingChanged())}finally{this._eventDispatcher.endEmitViewEvents()}const a=this._viewportStart.isValid;if(this._viewportStart.invalidate(),this._configuration.setModelLineCount(this.model.getLineCount()),this._updateConfigurationViewLineCountNow(),!this._hasFocus&&this.model.getAttachedEditorCount()>=2&&a){const g=this.model._getTrackedRange(this._viewportStart.modelTrackedRange);if(g){const E=this.coordinatesConverter.convertModelPositionToViewPosition(g.getStartPosition()),R=this.viewLayout.getVerticalOffsetForLineNumber(E.lineNumber);this.viewLayout.setScrollPosition({scrollTop:R+this._viewportStart.startLineDelta},1)}}try{const g=this._eventDispatcher.beginEmitViewEvents();n instanceof ro.Ic&&g.emitOutgoingEvent(new fl(n.contentChangedEvent)),this._cursor.onModelContentChanged(g,n)}finally{this._eventDispatcher.endEmitViewEvents()}this._tokenizeViewportSoon.schedule()})),this._register(this.model.onDidChangeTokens(n=>{const a=[];for(let g=0,E=n.ranges.length;g<E;g++){const R=n.ranges[g],ne=this.coordinatesConverter.convertModelPositionToViewPosition(new Di.y(R.fromLineNumber,1)).lineNumber,_e=this.coordinatesConverter.convertModelPositionToViewPosition(new Di.y(R.toLineNumber,this.model.getLineMaxColumn(R.toLineNumber))).lineNumber;a[g]={fromLineNumber:ne,toLineNumber:_e}}this._eventDispatcher.emitSingleViewEvent(new Na(a)),n.tokenizationSupportChanged&&this._tokenizeViewportSoon.schedule(),this._eventDispatcher.emitOutgoingEvent(new $r(n))})),this._register(this.model.onDidChangeLanguageConfiguration(n=>{this._eventDispatcher.emitSingleViewEvent(new ua),this.cursorConfig=new ms.d$(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new gl(n))})),this._register(this.model.onDidChangeLanguage(n=>{this.cursorConfig=new ms.d$(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new ul(n))})),this._register(this.model.onDidChangeOptions(n=>{if(this._lines.setTabSize(this.model.getOptions().tabSize)){try{const a=this._eventDispatcher.beginEmitViewEvents();a.emitViewEvent(new qs),a.emitViewEvent(new Rr),a.emitViewEvent(new $o(null)),this._cursor.onLineMappingChanged(a),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule()}this.cursorConfig=new ms.d$(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new fc(n))})),this._register(this.model.onDidChangeDecorations(n=>{this._decorations.onModelDecorationsChanged(),this._eventDispatcher.emitSingleViewEvent(new $o(n)),this._eventDispatcher.emitOutgoingEvent(new sr(n))}))}setHiddenAreas(n){let a=!1;try{const g=this._eventDispatcher.beginEmitViewEvents();a=this._lines.setHiddenAreas(n),a&&(g.emitViewEvent(new qs),g.emitViewEvent(new Rr),g.emitViewEvent(new $o(null)),this._cursor.onLineMappingChanged(g),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this.viewLayout.onHeightMaybeChanged())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule(),a&&this._eventDispatcher.emitOutgoingEvent(new Rs)}getVisibleRangesPlusViewportAboveBelow(){const n=this._configuration.options.get(133),a=this._configuration.options.get(61),g=Math.max(20,Math.round(n.height/a)),E=this.viewLayout.getLinesViewportData(),R=Math.max(1,E.completelyVisibleStartLineNumber-g),ne=Math.min(this.getLineCount(),E.completelyVisibleEndLineNumber+g);return this._toModelVisibleRanges(new Te.Q(R,this.getLineMinColumn(R),ne,this.getLineMaxColumn(ne)))}getVisibleRanges(){const n=this.getCompletelyVisibleViewRange();return this._toModelVisibleRanges(n)}getHiddenAreas(){return this._lines.getHiddenAreas()}_toModelVisibleRanges(n){const a=this.coordinatesConverter.convertViewRangeToModelRange(n),g=this._lines.getHiddenAreas();if(g.length===0)return[a];const E=[];let R=0,ne=a.startLineNumber,_e=a.startColumn;const Le=a.endLineNumber,ke=a.endColumn;for(let Ae=0,je=g.length;Ae<je;Ae++){const Xe=g[Ae].startLineNumber,it=g[Ae].endLineNumber;it<ne||Xe>Le||(ne<Xe&&(E[R++]=new Te.Q(ne,_e,Xe-1,this.model.getLineMaxColumn(Xe-1))),ne=it+1,_e=1)}return(ne<Le||ne===Le&&_e<ke)&&(E[R++]=new Te.Q(ne,_e,Le,ke)),E}getCompletelyVisibleViewRange(){const n=this.viewLayout.getLinesViewportData(),a=n.completelyVisibleStartLineNumber,g=n.completelyVisibleEndLineNumber;return new Te.Q(a,this.getLineMinColumn(a),g,this.getLineMaxColumn(g))}getCompletelyVisibleViewRangeAtScrollTop(n){const a=this.viewLayout.getLinesViewportDataAtScrollTop(n),g=a.completelyVisibleStartLineNumber,E=a.completelyVisibleEndLineNumber;return new Te.Q(g,this.getLineMinColumn(g),E,this.getLineMaxColumn(E))}saveState(){const n=this.viewLayout.saveState(),a=n.scrollTop,g=this.viewLayout.getLineNumberAtVerticalOffset(a),E=this.coordinatesConverter.convertViewPositionToModelPosition(new Di.y(g,this.getLineMinColumn(g))),R=this.viewLayout.getVerticalOffsetForLineNumber(g)-a;return{scrollLeft:n.scrollLeft,firstPosition:E,firstPositionDeltaTop:R}}reduceRestoreState(n){if(typeof n.firstPosition>"u")return this._reduceRestoreStateCompatibility(n);const a=this.model.validatePosition(n.firstPosition),g=this.coordinatesConverter.convertModelPositionToViewPosition(a),E=this.viewLayout.getVerticalOffsetForLineNumber(g.lineNumber)-n.firstPositionDeltaTop;return{scrollLeft:n.scrollLeft,scrollTop:E}}_reduceRestoreStateCompatibility(n){return{scrollLeft:n.scrollLeft,scrollTop:n.scrollTopWithoutViewZones}}getTabSize(){return this.model.getOptions().tabSize}getLineCount(){return this._lines.getViewLineCount()}setViewport(n,a,g){this._viewportStart.update(this,n)}getActiveIndentGuide(n,a,g){return this._lines.getActiveIndentGuide(n,a,g)}getLinesIndentGuides(n,a){return this._lines.getViewLinesIndentGuides(n,a)}getBracketGuidesInRangeByLine(n,a,g,E){return this._lines.getViewLinesBracketGuides(n,a,g,E)}getLineContent(n){return this._lines.getViewLineContent(n)}getLineLength(n){return this._lines.getViewLineLength(n)}getLineMinColumn(n){return this._lines.getViewLineMinColumn(n)}getLineMaxColumn(n){return this._lines.getViewLineMaxColumn(n)}getLineFirstNonWhitespaceColumn(n){const a=Vt.HG(this.getLineContent(n));return a===-1?0:a+1}getLineLastNonWhitespaceColumn(n){const a=Vt.lT(this.getLineContent(n));return a===-1?0:a+2}getDecorationsInViewport(n){return this._decorations.getDecorationsViewportData(n).decorations}getInjectedTextAt(n){return this._lines.getInjectedTextAt(n)}getViewportViewLineRenderingData(n,a){const E=this._decorations.getDecorationsViewportData(n).inlineDecorations[a-n.startLineNumber];return this._getViewLineRenderingData(a,E)}getViewLineRenderingData(n){const a=this._decorations.getInlineDecorationsOnLine(n);return this._getViewLineRenderingData(n,a)}_getViewLineRenderingData(n,a){const g=this.model.mightContainRTL(),E=this.model.mightContainNonBasicASCII(),R=this.getTabSize(),ne=this._lines.getViewLineData(n);return ne.inlineDecorations&&(a=[...a,...ne.inlineDecorations.map(_e=>_e.toInlineDecoration(n))]),new M.qL(ne.minColumn,ne.maxColumn,ne.content,ne.continuesWithWrappedLine,g,E,ne.tokens,a,R,ne.startVisibleColumn)}getViewLineData(n){return this._lines.getViewLineData(n)}getMinimapLinesRenderingData(n,a,g){const E=this._lines.getViewLinesData(n,a,g);return new M.nt(this.getTabSize(),E)}getAllOverviewRulerDecorations(n){const a=this.model.getOverviewRulerDecorations(this._editorId,(0,ee.$C)(this._configuration.options)),g=new bl;for(const E of a){const R=E.options,ne=R.overviewRuler;if(!ne)continue;const _e=ne.position;if(_e===0)continue;const Le=ne.getColor(n.value),ke=this.coordinatesConverter.getViewLineNumberOfModelPosition(E.range.startLineNumber,E.range.startColumn),Ae=this.coordinatesConverter.getViewLineNumberOfModelPosition(E.range.endLineNumber,E.range.endColumn);g.accept(Le,R.zIndex,ke,Ae,_e)}return g.asArray}_invalidateDecorationsColorCache(){const n=this.model.getOverviewRulerDecorations();for(const a of n){const g=a.options.overviewRuler;g&&g.invalidateCachedColor();const E=a.options.minimap;E&&E.invalidateCachedColor()}}getValueInRange(n,a){const g=this.coordinatesConverter.convertViewRangeToModelRange(n);return this.model.getValueInRange(g,a)}deduceModelPositionRelativeToViewPosition(n,a,g){const E=this.coordinatesConverter.convertViewPositionToModelPosition(n);this.model.getEOL().length===2&&(a<0?a-=g:a+=g);const ne=this.model.getOffsetAt(E)+a;return this.model.getPositionAt(ne)}getPlainTextToCopy(n,a,g){const E=g?`\r `:this.model.getEOL();n=n.slice(0),n.sort(Te.Q.compareRangesUsingStarts);let R=!1,ne=!1;for(const Le of n)Le.isEmpty()?R=!0:ne=!0;if(!ne){if(!a)return"";const Le=n.map(Ae=>Ae.startLineNumber);let ke="";for(let Ae=0;Ae<Le.length;Ae++)Ae>0&&Le[Ae-1]===Le[Ae]||(ke+=this.model.getLineContent(Le[Ae])+E);return ke}if(R&&a){const Le=[];let ke=0;for(const Ae of n){const je=Ae.startLineNumber;Ae.isEmpty()?je!==ke&&Le.push(this.model.getLineContent(je)):Le.push(this.model.getValueInRange(Ae,g?2:0)),ke=je}return Le.length===1?Le[0]:Le}const _e=[];for(const Le of n)Le.isEmpty()||_e.push(this.model.getValueInRange(Le,g?2:0));return _e.length===1?_e[0]:_e}getRichTextToCopy(n,a){const g=this.model.getLanguageId();if(g===pl.vH||n.length!==1)return null;let E=n[0];if(E.isEmpty()){if(!a)return null;const Ae=E.startLineNumber;E=new Te.Q(Ae,this.model.getLineMinColumn(Ae),Ae,this.model.getLineMaxColumn(Ae))}const R=this._configuration.options.get(46),ne=this._getColorMap(),Le=/[:;\\\/<>]/.test(R.fontFamily)||R.fontFamily===ee.jU.fontFamily;let ke;return Le?ke=ee.jU.fontFamily:(ke=R.fontFamily,ke=ke.replace(/"/g,"'"),/[,']/.test(ke)||/[+ ]/.test(ke)&&(ke=`'${ke}'`),ke=`${ke}, ${ee.jU.fontFamily}`),{mode:g,html:`<div style="color: ${ne[1]};background-color: ${ne[2]};font-family: ${ke};font-weight: ${R.fontWeight};font-size: ${R.fontSize}px;line-height: ${R.lineHeight}px;white-space: pre;">`+this._getHTMLToCopy(E,ne)+"</div>"}}_getHTMLToCopy(n,a){const g=n.startLineNumber,E=n.startColumn,R=n.endLineNumber,ne=n.endColumn,_e=this.getTabSize();let Le="";for(let ke=g;ke<=R;ke++){const Ae=this.model.tokenization.getLineTokens(ke),je=Ae.getLineContent(),Xe=ke===g?E-1:0,it=ke===R?ne-1:je.length;je===""?Le+="<br>":Le+=(0,cd.s0)(je,Ae.inflate(),a,Xe,it,_e,D.uF)}return Le}_getColorMap(){const n=qi.dG.getColorMap(),a=["#000000"];if(n)for(let g=1,E=n.length;g<E;g++)a[g]=Pi.Q1.Format.CSS.formatHex(n[g]);return a}getPrimaryCursorState(){return this._cursor.getPrimaryCursorState()}getLastAddedCursorIndex(){return this._cursor.getLastAddedCursorIndex()}getCursorStates(){return this._cursor.getCursorStates()}setCursorStates(n,a,g){return this._withViewEventsCollector(E=>this._cursor.setStates(E,n,a,g))}getCursorColumnSelectData(){return this._cursor.getCursorColumnSelectData()}getCursorAutoClosedCharacters(){return this._cursor.getAutoClosedCharacters()}setCursorColumnSelectData(n){this._cursor.setCursorColumnSelectData(n)}getPrevEditOperationType(){return this._cursor.getPrevEditOperationType()}setPrevEditOperationType(n){this._cursor.setPrevEditOperationType(n)}getSelection(){return this._cursor.getSelection()}getSelections(){return this._cursor.getSelections()}getPosition(){return this._cursor.getPrimaryCursorState().modelState.position}setSelections(n,a,g=0){this._withViewEventsCollector(E=>this._cursor.setSelections(E,n,a,g))}saveCursorState(){return this._cursor.saveState()}restoreCursorState(n){this._withViewEventsCollector(a=>this._cursor.restoreState(a,n))}_executeCursorEdit(n){if(this._cursor.context.cursorConfig.readOnly){this._eventDispatcher.emitOutgoingEvent(new Zs);return}this._withViewEventsCollector(n)}executeEdits(n,a,g){this._executeCursorEdit(E=>this._cursor.executeEdits(E,n,a,g))}startComposition(){this._executeCursorEdit(n=>this._cursor.startComposition(n))}endComposition(n){this._executeCursorEdit(a=>this._cursor.endComposition(a,n))}type(n,a){this._executeCursorEdit(g=>this._cursor.type(g,n,a))}compositionType(n,a,g,E,R){this._executeCursorEdit(ne=>this._cursor.compositionType(ne,n,a,g,E,R))}paste(n,a,g,E){this._executeCursorEdit(R=>this._cursor.paste(R,n,a,g,E))}cut(n){this._executeCursorEdit(a=>this._cursor.cut(a,n))}executeCommand(n,a){this._executeCursorEdit(g=>this._cursor.executeCommand(g,n,a))}executeCommands(n,a){this._executeCursorEdit(g=>this._cursor.executeCommands(g,n,a))}revealPrimaryCursor(n,a,g=!1){this._withViewEventsCollector(E=>this._cursor.revealPrimary(E,n,g,0,a,0))}revealTopMostCursor(n){const a=this._cursor.getTopMostViewPosition(),g=new Te.Q(a.lineNumber,a.column,a.lineNumber,a.column);this._withViewEventsCollector(E=>E.emitViewEvent(new ds(n,!1,g,null,0,!0,0)))}revealBottomMostCursor(n){const a=this._cursor.getBottomMostViewPosition(),g=new Te.Q(a.lineNumber,a.column,a.lineNumber,a.column);this._withViewEventsCollector(E=>E.emitViewEvent(new ds(n,!1,g,null,0,!0,0)))}revealRange(n,a,g,E,R){this._withViewEventsCollector(ne=>ne.emitViewEvent(new ds(n,!1,g,null,E,a,R)))}changeWhitespace(n){this.viewLayout.changeWhitespace(n)&&(this._eventDispatcher.emitSingleViewEvent(new Vo),this._eventDispatcher.emitOutgoingEvent(new us))}_withViewEventsCollector(n){try{const a=this._eventDispatcher.beginEmitViewEvents();return n(a)}finally{this._eventDispatcher.endEmitViewEvents()}}normalizePosition(n,a){return this._lines.normalizePosition(n,a)}getLineIndentColumn(n){return this._lines.getLineIndentColumn(n)}}class Qo{constructor(n,a,g,E,R){this._model=n,this._viewLineNumber=a,this._isValid=g,this._modelTrackedRange=E,this._startLineDelta=R}static create(n){const a=n._setTrackedRange(null,new Te.Q(1,1,1,1),1);return new Qo(n,1,!1,a,0)}get viewLineNumber(){return this._viewLineNumber}get isValid(){return this._isValid}get modelTrackedRange(){return this._modelTrackedRange}get startLineDelta(){return this._startLineDelta}dispose(){this._model._setTrackedRange(this._modelTrackedRange,null,1)}update(n,a){const g=n.coordinatesConverter.convertViewPositionToModelPosition(new Di.y(a,n.getLineMinColumn(a))),E=n.model._setTrackedRange(this._modelTrackedRange,new Te.Q(g.lineNumber,g.column,g.lineNumber,g.column),1),R=n.viewLayout.getVerticalOffsetForLineNumber(a),ne=n.viewLayout.getCurrentScrollTop();this._viewLineNumber=a,this._isValid=!0,this._modelTrackedRange=E,this._startLineDelta=ne-R}invalidate(){this._isValid=!1}}class bl{constructor(){this._asMap=Object.create(null),this.asArray=[]}accept(n,a,g,E,R){const ne=this._asMap[n];if(ne){const _e=ne.data,Le=_e[_e.length-3],ke=_e[_e.length-1];if(Le===R&&ke+1>=g){E>ke&&(_e[_e.length-1]=E);return}_e.push(R,g,E)}else{const _e=new M.Uv(n,a,[R,g,E]);this._asMap[n]=_e,this.asArray.push(_e)}}}var wl=f(59715),Zr=f(96655),Va=f(82399),sg=f(30657),Fo=f(29879),ao=f(27454);class Ha{constructor(n,a,g,E,R){this.injectionOffsets=n,this.injectionOptions=a,this.breakOffsets=g,this.breakOffsetsVisibleColumn=E,this.wrappedTextIndentLength=R}getOutputLineCount(){return this.breakOffsets.length}getMinOutputOffset(n){return n>0?this.wrappedTextIndentLength:0}getLineLength(n){const a=n>0?this.breakOffsets[n-1]:0;let E=this.breakOffsets[n]-a;return n>0&&(E+=this.wrappedTextIndentLength),E}getMaxOutputOffset(n){return this.getLineLength(n)}translateToInputOffset(n,a){n>0&&(a=Math.max(0,a-this.wrappedTextIndentLength));let E=n===0?a:this.breakOffsets[n-1]+a;if(this.injectionOffsets!==null)for(let R=0;R<this.injectionOffsets.length&&E>this.injectionOffsets[R];R++)E<this.injectionOffsets[R]+this.injectionOptions[R].content.length?E=this.injectionOffsets[R]:E-=this.injectionOptions[R].content.length;return E}translateToOutputPosition(n,a=2){let g=n;if(this.injectionOffsets!==null)for(let E=0;E<this.injectionOffsets.length&&!(n<this.injectionOffsets[E]||a!==1&&n===this.injectionOffsets[E]);E++)g+=this.injectionOptions[E].content.length;return this.offsetInInputWithInjectionsToOutputPosition(g,a)}offsetInInputWithInjectionsToOutputPosition(n,a=2){let g=0,E=this.breakOffsets.length-1,R=0,ne=0;for(;g<=E;){R=g+(E-g)/2|0;const Le=this.breakOffsets[R];if(ne=R>0?this.breakOffsets[R-1]:0,a===0)if(n<=ne)E=R-1;else if(n>Le)g=R+1;else break;else if(n<ne)E=R-1;else if(n>=Le)g=R+1;else break}let _e=n-ne;return R>0&&(_e+=this.wrappedTextIndentLength),new wr(R,_e)}normalizeOutputPosition(n,a,g){if(this.injectionOffsets!==null){const E=this.outputPositionToOffsetInInputWithInjections(n,a),R=this.normalizeOffsetInInputWithInjectionsAroundInjections(E,g);if(R!==E)return this.offsetInInputWithInjectionsToOutputPosition(R,g)}if(g===0){if(n>0&&a===this.getMinOutputOffset(n))return new wr(n-1,this.getMaxOutputOffset(n-1))}else if(g===1){const E=this.getOutputLineCount()-1;if(n<E&&a===this.getMaxOutputOffset(n))return new wr(n+1,this.getMinOutputOffset(n+1))}return new wr(n,a)}outputPositionToOffsetInInputWithInjections(n,a){return n>0&&(a=Math.max(0,a-this.wrappedTextIndentLength)),(n>0?this.breakOffsets[n-1]:0)+a}normalizeOffsetInInputWithInjectionsAroundInjections(n,a){const g=this.getInjectedTextAtOffset(n);if(!g)return n;if(a===2){if(n===g.offsetInInputWithInjections+g.length&&To(this.injectionOptions[g.injectedTextIndex].cursorStops))return g.offsetInInputWithInjections+g.length;{let E=g.offsetInInputWithInjections;if(or(this.injectionOptions[g.injectedTextIndex].cursorStops))return E;let R=g.injectedTextIndex-1;for(;R>=0&&this.injectionOffsets[R]===this.injectionOffsets[g.injectedTextIndex]&&!(To(this.injectionOptions[R].cursorStops)||(E-=this.injectionOptions[R].content.length,or(this.injectionOptions[R].cursorStops)));)R--;return E}}else if(a===1||a===4){let E=g.offsetInInputWithInjections+g.length,R=g.injectedTextIndex;for(;R+1<this.injectionOffsets.length&&this.injectionOffsets[R+1]===this.injectionOffsets[R];)E+=this.injectionOptions[R+1].content.length,R++;return E}else if(a===0||a===3){let E=g.offsetInInputWithInjections,R=g.injectedTextIndex;for(;R-1>=0&&this.injectionOffsets[R-1]===this.injectionOffsets[R];)E-=this.injectionOptions[R-1].content.length,R--;return E}(0,ts.xb)(a)}getInjectedText(n,a){const g=this.outputPositionToOffsetInInputWithInjections(n,a),E=this.getInjectedTextAtOffset(g);return E?{options:this.injectionOptions[E.injectedTextIndex]}:null}getInjectedTextAtOffset(n){const a=this.injectionOffsets,g=this.injectionOptions;if(a!==null){let E=0;for(let R=0;R<a.length;R++){const ne=g[R].content.length,_e=a[R]+E,Le=a[R]+E+ne;if(_e>n)break;if(n<=Le)return{injectedTextIndex:R,offsetInInputWithInjections:_e,length:ne};E+=ne}}}}function To(Je){return Je==null?!0:Je===gt.VW.Right||Je===gt.VW.Both}function or(Je){return Je==null?!0:Je===gt.VW.Left||Je===gt.VW.Both}class Ar{constructor(n){this.options=n}}class wr{constructor(n,a){this.outputLineIndex=n,this.outputOffset=a}toString(){return`${this.outputLineIndex}:${this.outputOffset}`}toPosition(n){return new Di.y(n+this.outputLineIndex,this.outputOffset+1)}}class pa{constructor(n,a){this.classifier=new Sl(n,a)}static create(n){return new pa(n.get(122),n.get(121))}createLineBreaksComputer(n,a,g,E){const R=[],ne=[],_e=[];return{addRequest:(Le,ke,Ae)=>{R.push(Le),ne.push(ke),_e.push(Ae)},finalize:()=>{const Le=n.typicalFullwidthCharacterWidth/n.typicalHalfwidthCharacterWidth,ke=[];for(let Ae=0,je=R.length;Ae<je;Ae++){const Xe=ne[Ae],it=_e[Ae];it&&!it.injectionOptions&&!Xe?ke[Ae]=gd(this.classifier,it,R[Ae],a,g,Le,E):ke[Ae]=fd(this.classifier,R[Ae],Xe,a,g,Le,E)}return _a.length=0,Sr.length=0,ke}}}}class Sl extends ao.V{constructor(n,a){super(0);for(let g=0;g<n.length;g++)this.set(n.charCodeAt(g),1);for(let g=0;g<a.length;g++)this.set(a.charCodeAt(g),2)}get(n){return n>=0&&n<256?this._asciiMap[n]:n>=12352&&n<=12543||n>=13312&&n<=19903||n>=19968&&n<=40959?3:this._map.get(n)||this._defaultValue}}let _a=[],Sr=[];function gd(Je,n,a,g,E,R,ne){if(E===-1)return null;const _e=a.length;if(_e<=1)return null;const Le=n.breakOffsets,ke=n.breakOffsetsVisibleColumn,Ae=Un(a,g,E,R,ne),je=E-Ae,Xe=_a,it=Sr;let yt=0,Nt=0,Ft=0,Ut=E;const ui=Le.length;let qt=0;if(qt>=0){let ji=Math.abs(ke[qt]-Ut);for(;qt+1<ui;){const li=Math.abs(ke[qt+1]-Ut);if(li>=ji)break;ji=li,qt++}}for(;qt<ui;){let ji=qt<0?0:Le[qt],li=qt<0?0:ke[qt];Nt>ji&&(ji=Nt,li=Ft);let en=0,Xi=0,Hi=0,on=0;if(li<=Ut){let Qi=li,Vn=ji===0?0:a.charCodeAt(ji-1),gs=ji===0?0:Je.get(Vn),ys=!0;for(let Hn=ji;Hn<_e;Hn++){const Is=Hn,Ns=a.charCodeAt(Hn);let Es,Bo;if(Vt.pc(Ns)?(Hn++,Es=0,Bo=2):(Es=Je.get(Ns),Bo=rr(Ns,Qi,g,R)),Is>Nt&&yr(Vn,gs,Ns,Es)&&(en=Is,Xi=Qi),Qi+=Bo,Qi>Ut){Is>Nt?(Hi=Is,on=Qi-Bo):(Hi=Hn+1,on=Qi),Qi-Xi>je&&(en=0),ys=!1;break}Vn=Ns,gs=Es}if(ys){yt>0&&(Xe[yt]=Le[Le.length-1],it[yt]=ke[Le.length-1],yt++);break}}if(en===0){let Qi=li,Vn=a.charCodeAt(ji),gs=Je.get(Vn),ys=!1;for(let Hn=ji-1;Hn>=Nt;Hn--){const Is=Hn+1,Ns=a.charCodeAt(Hn);if(Ns===9){ys=!0;break}let Es,Bo;if(Vt.LJ(Ns)?(Hn--,Es=0,Bo=2):(Es=Je.get(Ns),Bo=Vt.ne(Ns)?R:1),Qi<=Ut){if(Hi===0&&(Hi=Is,on=Qi),Qi<=Ut-je)break;if(yr(Ns,Es,Vn,gs)){en=Is,Xi=Qi;break}}Qi-=Bo,Vn=Ns,gs=Es}if(en!==0){const Hn=je-(on-Xi);if(Hn<=g){const Is=a.charCodeAt(Hi);let Ns;Vt.pc(Is)?Ns=2:Ns=rr(Is,on,g,R),Hn-Ns<0&&(en=0)}}if(ys){qt--;continue}}if(en===0&&(en=Hi,Xi=on),en<=Nt){const Qi=a.charCodeAt(Nt);Vt.pc(Qi)?(en=Nt+2,Xi=Ft+2):(en=Nt+1,Xi=Ft+rr(Qi,Ft,g,R))}for(Nt=en,Xe[yt]=en,Ft=Xi,it[yt]=Xi,yt++,Ut=Xi+je;qt<0||qt<ui&&ke[qt]<Xi;)qt++;let Kn=Math.abs(ke[qt]-Ut);for(;qt+1<ui;){const Qi=Math.abs(ke[qt+1]-Ut);if(Qi>=Kn)break;Kn=Qi,qt++}}return yt===0?null:(Xe.length=yt,it.length=yt,_a=n.breakOffsets,Sr=n.breakOffsetsVisibleColumn,n.breakOffsets=Xe,n.breakOffsetsVisibleColumn=it,n.wrappedTextIndentLength=Ae,n)}function fd(Je,n,a,g,E,R,ne){const _e=ro.uK.applyInjectedText(n,a);let Le,ke;if(a&&a.length>0?(Le=a.map(Xi=>Xi.options),ke=a.map(Xi=>Xi.column-1)):(Le=null,ke=null),E===-1)return Le?new Ha(ke,Le,[_e.length],[],0):null;const Ae=_e.length;if(Ae<=1)return Le?new Ha(ke,Le,[_e.length],[],0):null;const je=Un(_e,g,E,R,ne),Xe=E-je,it=[],yt=[];let Nt=0,Ft=0,Ut=0,ui=E,qt=_e.charCodeAt(0),ji=Je.get(qt),li=rr(qt,0,g,R),en=1;Vt.pc(qt)&&(li+=1,qt=_e.charCodeAt(1),ji=Je.get(qt),en++);for(let Xi=en;Xi<Ae;Xi++){const Hi=Xi,on=_e.charCodeAt(Xi);let Kn,Qi;Vt.pc(on)?(Xi++,Kn=0,Qi=2):(Kn=Je.get(on),Qi=rr(on,li,g,R)),yr(qt,ji,on,Kn)&&(Ft=Hi,Ut=li),li+=Qi,li>ui&&((Ft===0||li-Ut>Xe)&&(Ft=Hi,Ut=li-Qi),it[Nt]=Ft,yt[Nt]=Ut,Nt++,ui=Ut+Xe,Ft=0),qt=on,ji=Kn}return Nt===0&&(!a||a.length===0)?null:(it[Nt]=Ae,yt[Nt]=li,new Ha(ke,Le,it,yt,je))}function rr(Je,n,a,g){return Je===9?a-n%a:Vt.ne(Je)||Je<32?g:1}function mo(Je,n){return n-Je%n}function yr(Je,n,a,g){return a!==32&&(n===2&&g!==2||n!==1&&g===1||n===3&&g!==2||g===3&&n!==1)}function Un(Je,n,a,g,E){let R=0;if(E!==0){const ne=Vt.HG(Je);if(ne!==-1){for(let Le=0;Le<ne;Le++){const ke=Je.charCodeAt(Le)===9?mo(R,n):1;R+=ke}const _e=E===3?2:E===2?1:0;for(let Le=0;Le<_e;Le++){const ke=mo(R,n);R+=ke}R+g>a&&(R=0)}}return R}var bc;const yl=(bc=window.trustedTypes)===null||bc===void 0?void 0:bc.createPolicy("domLineBreaksComputer",{createHTML:Je=>Je});class md{static create(){return new md}constructor(){}createLineBreaksComputer(n,a,g,E){const R=[],ne=[];return{addRequest:(_e,Le,ke)=>{R.push(_e),ne.push(Le)},finalize:()=>Ll(R,n,a,g,E,ne)}}}function Ll(Je,n,a,g,E,R){var ne;function _e(Hi){const on=R[Hi];if(on){const Kn=ro.uK.applyInjectedText(Je[Hi],on),Qi=on.map(gs=>gs.options),Vn=on.map(gs=>gs.column-1);return new Ha(Vn,Qi,[Kn.length],[],0)}else return null}if(g===-1){const Hi=[];for(let on=0,Kn=Je.length;on<Kn;on++)Hi[on]=_e(on);return Hi}const Le=Math.round(g*n.typicalHalfwidthCharacterWidth),Ae=Math.round(a*(E===3?2:E===2?1:0)),je=Math.ceil(n.spaceWidth*Ae),Xe=document.createElement("div");(0,Gt.M)(Xe,n);const it=(0,jn.Du)(1e4),yt=[],Nt=[],Ft=[],Ut=[],ui=[];for(let Hi=0;Hi<Je.length;Hi++){const on=ro.uK.applyInjectedText(Je[Hi],R[Hi]);let Kn=0,Qi=0,Vn=Le;if(E!==0)if(Kn=Vt.HG(on),Kn===-1)Kn=0;else{for(let Is=0;Is<Kn;Is++){const Ns=on.charCodeAt(Is)===9?a-Qi%a:1;Qi+=Ns}const Hn=Math.ceil(n.spaceWidth*Qi);Hn+n.typicalFullwidthCharacterWidth>Le?(Kn=0,Qi=0):Vn=Le-Hn}const gs=on.substr(Kn),ys=Rh(gs,Qi,a,Vn,it,je);yt[Hi]=Kn,Nt[Hi]=Qi,Ft[Hi]=gs,Ut[Hi]=ys[0],ui[Hi]=ys[1]}const qt=it.build(),ji=(ne=yl?.createHTML(qt))!==null&&ne!==void 0?ne:qt;Xe.innerHTML=ji,Xe.style.position="absolute",Xe.style.top="10000",Xe.style.wordWrap="break-word",document.body.appendChild(Xe);const li=document.createRange(),en=Array.prototype.slice.call(Xe.children,0),Xi=[];for(let Hi=0;Hi<Je.length;Hi++){const on=en[Hi],Kn=og(li,on,Ft[Hi],Ut[Hi]);if(Kn===null){Xi[Hi]=_e(Hi);continue}const Qi=yt[Hi],Vn=Nt[Hi]+Ae,gs=ui[Hi],ys=[];for(let Es=0,Bo=Kn.length;Es<Bo;Es++)ys[Es]=gs[Kn[Es]];if(Qi!==0)for(let Es=0,Bo=Kn.length;Es<Bo;Es++)Kn[Es]+=Qi;let Hn,Is;const Ns=R[Hi];Ns?(Hn=Ns.map(Es=>Es.options),Is=Ns.map(Es=>Es.column-1)):(Hn=null,Is=null),Xi[Hi]=new Ha(Is,Hn,Kn,ys,Vn)}return document.body.removeChild(Xe),Xi}function Rh(Je,n,a,g,E,R){if(R!==0){const Xe=String(R);E.appendASCIIString('<div style="text-indent: -'),E.appendASCIIString(Xe),E.appendASCIIString("px; padding-left: "),E.appendASCIIString(Xe),E.appendASCIIString("px; box-sizing: border-box; width:")}else E.appendASCIIString('<div style="width:');E.appendASCIIString(String(g)),E.appendASCIIString('px;">');const ne=Je.length;let _e=n,Le=0;const ke=[],Ae=[];let je=0<ne?Je.charCodeAt(0):0;E.appendASCIIString("<span>");for(let Xe=0;Xe<ne;Xe++){Xe!==0&&Xe%16384===0&&E.appendASCIIString("</span><span>"),ke[Xe]=Le,Ae[Xe]=_e;const it=je;je=Xe+1<ne?Je.charCodeAt(Xe+1):0;let yt=1,Nt=1;switch(it){case 9:yt=a-_e%a,Nt=yt;for(let Ft=1;Ft<=yt;Ft++)Ft<yt?E.write1(160):E.appendASCII(32);break;case 32:je===32?E.write1(160):E.appendASCII(32);break;case 60:E.appendASCIIString("<");break;case 62:E.appendASCIIString(">");break;case 38:E.appendASCIIString("&");break;case 0:E.appendASCIIString("�");break;case 65279:case 8232:case 8233:case 133:E.write1(65533);break;default:Vt.ne(it)&&Nt++,it<32?E.write1(9216+it):E.write1(it)}Le+=yt,_e+=Nt}return E.appendASCIIString("</span>"),ke[Je.length]=Le,Ae[Je.length]=_e,E.appendASCIIString("</div>"),[ke,Ae]}function og(Je,n,a,g){if(a.length<=1)return null;const E=Array.prototype.slice.call(n.children,0),R=[];try{Ro(Je,E,g,0,null,a.length-1,null,R)}catch(ne){return console.log(ne),null}return R.length===0?null:(R.push(a.length),R)}function Ro(Je,n,a,g,E,R,ne,_e){if(g===R||(E=E||za(Je,n,a[g],a[g+1]),ne=ne||za(Je,n,a[R],a[R+1]),Math.abs(E[0].top-ne[0].top)<=.1))return;if(g+1===R){_e.push(R);return}const Le=g+(R-g)/2|0,ke=za(Je,n,a[Le],a[Le+1]);Ro(Je,n,a,g,E,Le,ke,_e),Ro(Je,n,a,Le,ke,R,ne,_e)}function za(Je,n,a,g){return Je.setStart(n[a/16384|0].firstChild,a%16384),Je.setEnd(n[g/16384|0].firstChild,g%16384),Je.getClientRects()}var eo=f(89673),pd=f(52394),va=f(52230),rg=function(Je,n,a,g){var E=arguments.length,R=E<3?n:g===null?g=Object.getOwnPropertyDescriptor(n,a):g,ne;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(Je,n,a,g);else for(var _e=Je.length-1;_e>=0;_e--)(ne=Je[_e])&&(R=(E<3?ne(R):E>3?ne(n,a,R):ne(n,a))||R);return E>3&&R&&Object.defineProperty(n,a,R),R},Lr=function(Je,n){return function(a,g){n(a,g,Je)}},Yr=function(Je,n,a,g){function E(R){return R instanceof a?R:new a(function(ne){ne(R)})}return new(a||(a=Promise))(function(R,ne){function _e(Ae){try{ke(g.next(Ae))}catch(je){ne(je)}}function Le(Ae){try{ke(g.throw(Ae))}catch(je){ne(je)}}function ke(Ae){Ae.done?R(Ae.value):E(Ae.value).then(_e,Le)}ke((g=g.apply(Je,n||[])).next())})};let Dl=0;class wc{constructor(n,a,g,E,R){this.model=n,this.viewModel=a,this.view=g,this.hasRealView=E,this.listenersToRemove=R}dispose(){(0,_.AS)(this.listenersToRemove),this.model.onBeforeDetached(),this.hasRealView&&this.view.dispose(),this.viewModel.dispose()}}let Ua=class Eh extends _.jG{constructor(n,a,g,E,R,ne,_e,Le,ke,Ae,je,Xe){super(),this.languageConfigurationService=je,this._deliveryQueue=new S.ci,this._onDidDispose=this._register(new S.vl),this.onDidDispose=this._onDidDispose.event,this._onDidChangeModelContent=this._register(new S.vl({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelContent=this._onDidChangeModelContent.event,this._onDidChangeModelLanguage=this._register(new S.vl({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelLanguage=this._onDidChangeModelLanguage.event,this._onDidChangeModelLanguageConfiguration=this._register(new S.vl({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelLanguageConfiguration=this._onDidChangeModelLanguageConfiguration.event,this._onDidChangeModelOptions=this._register(new S.vl({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelOptions=this._onDidChangeModelOptions.event,this._onDidChangeModelDecorations=this._register(new S.vl({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelDecorations=this._onDidChangeModelDecorations.event,this._onDidChangeModelTokens=this._register(new S.vl({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelTokens=this._onDidChangeModelTokens.event,this._onDidChangeConfiguration=this._register(new S.vl({deliveryQueue:this._deliveryQueue})),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._onDidChangeModel=this._register(new S.vl({deliveryQueue:this._deliveryQueue})),this.onDidChangeModel=this._onDidChangeModel.event,this._onDidChangeCursorPosition=this._register(new S.vl({deliveryQueue:this._deliveryQueue})),this.onDidChangeCursorPosition=this._onDidChangeCursorPosition.event,this._onDidChangeCursorSelection=this._register(new S.vl({deliveryQueue:this._deliveryQueue})),this.onDidChangeCursorSelection=this._onDidChangeCursorSelection.event,this._onDidAttemptReadOnlyEdit=this._register(new S.vl({deliveryQueue:this._deliveryQueue})),this.onDidAttemptReadOnlyEdit=this._onDidAttemptReadOnlyEdit.event,this._onDidLayoutChange=this._register(new S.vl({deliveryQueue:this._deliveryQueue})),this.onDidLayoutChange=this._onDidLayoutChange.event,this._editorTextFocus=this._register(new kl({deliveryQueue:this._deliveryQueue})),this.onDidFocusEditorText=this._editorTextFocus.onDidChangeToTrue,this.onDidBlurEditorText=this._editorTextFocus.onDidChangeToFalse,this._editorWidgetFocus=this._register(new kl({deliveryQueue:this._deliveryQueue})),this.onDidFocusEditorWidget=this._editorWidgetFocus.onDidChangeToTrue,this.onDidBlurEditorWidget=this._editorWidgetFocus.onDidChangeToFalse,this._onWillType=this._register(new S.vl({deliveryQueue:this._deliveryQueue})),this.onWillType=this._onWillType.event,this._onDidType=this._register(new S.vl({deliveryQueue:this._deliveryQueue})),this.onDidType=this._onDidType.event,this._onDidCompositionStart=this._register(new S.vl({deliveryQueue:this._deliveryQueue})),this.onDidCompositionStart=this._onDidCompositionStart.event,this._onDidCompositionEnd=this._register(new S.vl({deliveryQueue:this._deliveryQueue})),this.onDidCompositionEnd=this._onDidCompositionEnd.event,this._onDidPaste=this._register(new S.vl({deliveryQueue:this._deliveryQueue})),this.onDidPaste=this._onDidPaste.event,this._onMouseUp=this._register(new S.vl({deliveryQueue:this._deliveryQueue})),this.onMouseUp=this._onMouseUp.event,this._onMouseDown=this._register(new S.vl({deliveryQueue:this._deliveryQueue})),this.onMouseDown=this._onMouseDown.event,this._onMouseDrag=this._register(new S.vl({deliveryQueue:this._deliveryQueue})),this.onMouseDrag=this._onMouseDrag.event,this._onMouseDrop=this._register(new S.vl({deliveryQueue:this._deliveryQueue})),this.onMouseDrop=this._onMouseDrop.event,this._onMouseDropCanceled=this._register(new S.vl({deliveryQueue:this._deliveryQueue})),this.onMouseDropCanceled=this._onMouseDropCanceled.event,this._onDropIntoEditor=this._register(new S.vl({deliveryQueue:this._deliveryQueue})),this.onDropIntoEditor=this._onDropIntoEditor.event,this._onContextMenu=this._register(new S.vl({deliveryQueue:this._deliveryQueue})),this.onContextMenu=this._onContextMenu.event,this._onMouseMove=this._register(new S.vl({deliveryQueue:this._deliveryQueue})),this.onMouseMove=this._onMouseMove.event,this._onMouseLeave=this._register(new S.vl({deliveryQueue:this._deliveryQueue})),this.onMouseLeave=this._onMouseLeave.event,this._onMouseWheel=this._register(new S.vl({deliveryQueue:this._deliveryQueue})),this.onMouseWheel=this._onMouseWheel.event,this._onKeyUp=this._register(new S.vl({deliveryQueue:this._deliveryQueue})),this.onKeyUp=this._onKeyUp.event,this._onKeyDown=this._register(new S.vl({deliveryQueue:this._deliveryQueue})),this.onKeyDown=this._onKeyDown.event,this._onDidContentSizeChange=this._register(new S.vl({deliveryQueue:this._deliveryQueue})),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._onDidScrollChange=this._register(new S.vl({deliveryQueue:this._deliveryQueue})),this.onDidScrollChange=this._onDidScrollChange.event,this._onDidChangeViewZones=this._register(new S.vl({deliveryQueue:this._deliveryQueue})),this.onDidChangeViewZones=this._onDidChangeViewZones.event,this._onDidChangeHiddenAreas=this._register(new S.vl({deliveryQueue:this._deliveryQueue})),this.onDidChangeHiddenAreas=this._onDidChangeHiddenAreas.event,this._bannerDomNode=null,this._dropIntoEditorDecorations=this.createDecorationsCollection();const it=Object.assign({},a);this._domElement=n,this._overflowWidgetsDomNode=it.overflowWidgetsDomNode,delete it.overflowWidgetsDomNode,this._id=++Dl,this._decorationTypeKeysToIds={},this._decorationTypeSubtypes={},this._telemetryData=g.telemetryData,this._configuration=this._register(this._createConfiguration(g.isSimpleWidget||!1,it,Ae)),this._register(this._configuration.onDidChange(Ft=>{this._onDidChangeConfiguration.fire(Ft);const Ut=this._configuration.options;if(Ft.hasChanged(133)){const ui=Ut.get(133);this._onDidLayoutChange.fire(ui)}})),this._contextKeyService=this._register(_e.createScoped(this._domElement)),this._notificationService=ke,this._codeEditorService=R,this._commandService=ne,this._themeService=Le,this._register(new El(this,this._contextKeyService)),this._register(new xl(this,this._contextKeyService,Xe)),this._instantiationService=E.createChild(new sg.a([Zr.fN,this._contextKeyService])),this._modelData=null,this._contributions={},this._actions={},this._focusTracker=new lo(n),this._register(this._focusTracker.onChange(()=>{this._editorWidgetFocus.setValue(this._focusTracker.hasFocus())})),this._contentWidgets={},this._overlayWidgets={};let yt;Array.isArray(g.contributions)?yt=g.contributions:yt=h.dS.getEditorContributions();for(const Ft of yt){if(this._contributions[Ft.id]){(0,z.dz)(new Error(`Cannot have two contributions with the same id ${Ft.id}`));continue}try{const Ut=this._instantiationService.createInstance(Ft.ctor,this);this._contributions[Ft.id]=Ut}catch(Ut){(0,z.dz)(Ut)}}h.dS.getEditorActions().forEach(Ft=>{if(this._actions[Ft.id]){(0,z.dz)(new Error(`Cannot have two actions with the same id ${Ft.id}`));return}const Ut=new Ys.f(Ft.id,Ft.label,Ft.alias,(0,ts.UH)(Ft.precondition),()=>this._instantiationService.invokeFunction(ui=>Promise.resolve(Ft.runEditorCommand(ui,this,null))),this._contextKeyService);this._actions[Ut.id]=Ut});const Nt=()=>!this._configuration.options.get(83)&&this._configuration.options.get(32).enabled;this._register(new J.pN(this._domElement,{onDragEnter:()=>{},onDragOver:Ft=>{if(!Nt())return;const Ut=this.getTargetAtClientPoint(Ft.clientX,Ft.clientY);Ut?.position&&this.showDropIndicatorAt(Ut.position)},onDrop:Ft=>Yr(this,void 0,void 0,function*(){if(!Nt()||(this.removeDropIndicator(),!Ft.dataTransfer))return;const Ut=this.getTargetAtClientPoint(Ft.clientX,Ft.clientY);Ut?.position&&this._onDropIntoEditor.fire({position:Ut.position,event:Ft})}),onDragLeave:()=>{this.removeDropIndicator()},onDragEnd:()=>{this.removeDropIndicator()}})),this._codeEditorService.addCodeEditor(this)}get isSimpleWidget(){return this._configuration.isSimpleWidget}_createConfiguration(n,a,g){return new Z(n,a,this._domElement,g)}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return Qr._.ICodeEditor}dispose(){this._codeEditorService.removeCodeEditor(this),this._focusTracker.dispose();const n=Object.keys(this._contributions);for(let a=0,g=n.length;a<g;a++){const E=n[a];this._contributions[E].dispose()}this._contributions={},this._actions={},this._contentWidgets={},this._overlayWidgets={},this._removeDecorationTypes(),this._postDetachModelCleanup(this._detachModel()),this._onDidDispose.fire(),super.dispose()}invokeWithinContext(n){return this._instantiationService.invokeFunction(n)}updateOptions(n){this._configuration.updateOptions(n||{})}getOptions(){return this._configuration.options}getOption(n){return this._configuration.options.get(n)}getRawOptions(){return this._configuration.getRawOptions()}getOverflowWidgetsDomNode(){return this._overflowWidgetsDomNode}getConfiguredWordAtPosition(n){return this._modelData?eo.z.getWordAtPosition(this._modelData.model,this._configuration.options.get(119),n):null}getValue(n=null){if(!this._modelData)return"";const a=!!(n&&n.preserveBOM);let g=0;return n&&n.lineEnding&&n.lineEnding===` `?g=1:n&&n.lineEnding&&n.lineEnding===`\r `&&(g=2),this._modelData.model.getValue(g,a)}setValue(n){this._modelData&&this._modelData.model.setValue(n)}getModel(){return this._modelData?this._modelData.model:null}setModel(n=null){const a=n;if(this._modelData===null&&a===null||this._modelData&&this._modelData.model===a)return;const g=this.hasTextFocus(),E=this._detachModel();this._attachModel(a),g&&this.hasModel()&&this.focus();const R={oldModelUrl:E?E.uri:null,newModelUrl:a?a.uri:null};this._removeDecorationTypes(),this._onDidChangeModel.fire(R),this._postDetachModelCleanup(E)}_removeDecorationTypes(){if(this._decorationTypeKeysToIds={},this._decorationTypeSubtypes){for(const n in this._decorationTypeSubtypes){const a=this._decorationTypeSubtypes[n];for(const g in a)this._removeDecorationType(n+"-"+g)}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(n,a,g,E){const R=n.model.validatePosition({lineNumber:a,column:g}),ne=n.viewModel.coordinatesConverter.convertModelPositionToViewPosition(R);return n.viewModel.viewLayout.getVerticalOffsetAfterLineNumber(ne.lineNumber,E)}getTopForLineNumber(n,a=!1){return this._modelData?Eh._getVerticalOffsetForPosition(this._modelData,n,1,a):-1}getTopForPosition(n,a){return this._modelData?Eh._getVerticalOffsetForPosition(this._modelData,n,a,!1):-1}static _getVerticalOffsetForPosition(n,a,g,E=!1){const R=n.model.validatePosition({lineNumber:a,column:g}),ne=n.viewModel.coordinatesConverter.convertModelPositionToViewPosition(R);return n.viewModel.viewLayout.getVerticalOffsetForLineNumber(ne.lineNumber,E)}getBottomForLineNumber(n,a=!1){return this._modelData?Eh._getVerticalOffsetAfterPosition(this._modelData,n,1,a):-1}setHiddenAreas(n){var a;(a=this._modelData)===null||a===void 0||a.viewModel.setHiddenAreas(n.map(g=>Te.Q.lift(g)))}getVisibleColumnFromPosition(n){if(!this._modelData)return n.column;const a=this._modelData.model.validatePosition(n),g=this._modelData.model.getOptions().tabSize;return ki.A.visibleColumnFromColumn(this._modelData.model.getLineContent(a.lineNumber),a.column,g)+1}getPosition(){return this._modelData?this._modelData.viewModel.getPosition():null}setPosition(n,a="api"){if(this._modelData){if(!Di.y.isIPosition(n))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections(a,[{selectionStartLineNumber:n.lineNumber,selectionStartColumn:n.column,positionLineNumber:n.lineNumber,positionColumn:n.column}])}}_sendRevealRange(n,a,g,E){if(!this._modelData)return;if(!Te.Q.isIRange(n))throw new Error("Invalid arguments");const R=this._modelData.model.validateRange(n),ne=this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(R);this._modelData.viewModel.revealRange("api",g,ne,a,E)}revealLine(n,a=0){this._revealLine(n,0,a)}revealLineInCenter(n,a=0){this._revealLine(n,1,a)}revealLineInCenterIfOutsideViewport(n,a=0){this._revealLine(n,2,a)}revealLineNearTop(n,a=0){this._revealLine(n,5,a)}_revealLine(n,a,g){if(typeof n!="number")throw new Error("Invalid arguments");this._sendRevealRange(new Te.Q(n,1,n,1),a,!1,g)}revealPosition(n,a=0){this._revealPosition(n,0,!0,a)}revealPositionInCenter(n,a=0){this._revealPosition(n,1,!0,a)}revealPositionInCenterIfOutsideViewport(n,a=0){this._revealPosition(n,2,!0,a)}revealPositionNearTop(n,a=0){this._revealPosition(n,5,!0,a)}_revealPosition(n,a,g,E){if(!Di.y.isIPosition(n))throw new Error("Invalid arguments");this._sendRevealRange(new Te.Q(n.lineNumber,n.column,n.lineNumber,n.column),a,g,E)}getSelection(){return this._modelData?this._modelData.viewModel.getSelection():null}getSelections(){return this._modelData?this._modelData.viewModel.getSelections():null}setSelection(n,a="api"){const g=O.L.isISelection(n),E=Te.Q.isIRange(n);if(!g&&!E)throw new Error("Invalid arguments");if(g)this._setSelectionImpl(n,a);else if(E){const R={selectionStartLineNumber:n.startLineNumber,selectionStartColumn:n.startColumn,positionLineNumber:n.endLineNumber,positionColumn:n.endColumn};this._setSelectionImpl(R,a)}}_setSelectionImpl(n,a){if(!this._modelData)return;const g=new O.L(n.selectionStartLineNumber,n.selectionStartColumn,n.positionLineNumber,n.positionColumn);this._modelData.viewModel.setSelections(a,[g])}revealLines(n,a,g=0){this._revealLines(n,a,0,g)}revealLinesInCenter(n,a,g=0){this._revealLines(n,a,1,g)}revealLinesInCenterIfOutsideViewport(n,a,g=0){this._revealLines(n,a,2,g)}revealLinesNearTop(n,a,g=0){this._revealLines(n,a,5,g)}_revealLines(n,a,g,E){if(typeof n!="number"||typeof a!="number")throw new Error("Invalid arguments");this._sendRevealRange(new Te.Q(n,1,a,1),g,!1,E)}revealRange(n,a=0,g=!1,E=!0){this._revealRange(n,g?1:0,E,a)}revealRangeInCenter(n,a=0){this._revealRange(n,1,!0,a)}revealRangeInCenterIfOutsideViewport(n,a=0){this._revealRange(n,2,!0,a)}revealRangeNearTop(n,a=0){this._revealRange(n,5,!0,a)}revealRangeNearTopIfOutsideViewport(n,a=0){this._revealRange(n,6,!0,a)}revealRangeAtTop(n,a=0){this._revealRange(n,3,!0,a)}_revealRange(n,a,g,E){if(!Te.Q.isIRange(n))throw new Error("Invalid arguments");this._sendRevealRange(Te.Q.lift(n),a,g,E)}setSelections(n,a="api",g=0){if(this._modelData){if(!n||n.length===0)throw new Error("Invalid arguments");for(let E=0,R=n.length;E<R;E++)if(!O.L.isISelection(n[E]))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections(a,n,g)}}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(n,a=1){if(this._modelData){if(typeof n!="number")throw new Error("Invalid arguments");this._modelData.viewModel.viewLayout.setScrollPosition({scrollLeft:n},a)}}setScrollTop(n,a=1){if(this._modelData){if(typeof n!="number")throw new Error("Invalid arguments");this._modelData.viewModel.viewLayout.setScrollPosition({scrollTop:n},a)}}setScrollPosition(n,a=1){this._modelData&&this._modelData.viewModel.viewLayout.setScrollPosition(n,a)}saveViewState(){if(!this._modelData)return null;const n={},a=Object.keys(this._contributions);for(const R of a){const ne=this._contributions[R];typeof ne.saveViewState=="function"&&(n[R]=ne.saveViewState())}const g=this._modelData.viewModel.saveCursorState(),E=this._modelData.viewModel.saveState();return{cursorState:g,viewState:E,contributionsState:n}}restoreViewState(n){if(!this._modelData||!this._modelData.hasRealView)return;const a=n;if(a&&a.cursorState&&a.viewState){const g=a.cursorState;Array.isArray(g)?g.length>0&&this._modelData.viewModel.restoreCursorState(g):this._modelData.viewModel.restoreCursorState([g]);const E=a.contributionsState||{},R=Object.keys(this._contributions);for(let _e=0,Le=R.length;_e<Le;_e++){const ke=R[_e],Ae=this._contributions[ke];typeof Ae.restoreViewState=="function"&&Ae.restoreViewState(E[ke])}const ne=this._modelData.viewModel.reduceRestoreState(a.viewState);this._modelData.view.restoreState(ne)}}getContribution(n){return this._contributions[n]||null}getActions(){const n=[],a=Object.keys(this._actions);for(let g=0,E=a.length;g<E;g++){const R=a[g];n.push(this._actions[R])}return n}getSupportedActions(){let n=this.getActions();return n=n.filter(a=>a.isSupported()),n}getAction(n){return this._actions[n]||null}trigger(n,a,g){switch(g=g||{},a){case"compositionStart":this._startComposition();return;case"compositionEnd":this._endComposition(n);return;case"type":{const R=g;this._type(n,R.text||"");return}case"replacePreviousChar":{const R=g;this._compositionType(n,R.text||"",R.replaceCharCnt||0,0,0);return}case"compositionType":{const R=g;this._compositionType(n,R.text||"",R.replacePrevCharCnt||0,R.replaceNextCharCnt||0,R.positionDelta||0);return}case"paste":{const R=g;this._paste(n,R.text||"",R.pasteOnNewLine||!1,R.multicursorText||null,R.mode||null);return}case"cut":this._cut(n);return}const E=this.getAction(a);if(E){Promise.resolve(E.run()).then(void 0,z.dz);return}this._modelData&&(this._triggerEditorCommand(n,a,g)||this._triggerCommand(a,g))}_triggerCommand(n,a){this._commandService.executeCommand(n,a)}_startComposition(){this._modelData&&(this._modelData.viewModel.startComposition(),this._onDidCompositionStart.fire())}_endComposition(n){this._modelData&&(this._modelData.viewModel.endComposition(n),this._onDidCompositionEnd.fire())}_type(n,a){!this._modelData||a.length===0||(n==="keyboard"&&this._onWillType.fire(a),this._modelData.viewModel.type(a,n),n==="keyboard"&&this._onDidType.fire(a))}_compositionType(n,a,g,E,R){this._modelData&&this._modelData.viewModel.compositionType(a,g,E,R,n)}_paste(n,a,g,E,R){if(!this._modelData||a.length===0)return;const ne=this._modelData.viewModel,_e=ne.getSelection().getStartPosition();ne.paste(a,g,E,n);const Le=ne.getSelection().getStartPosition();n==="keyboard"&&this._onDidPaste.fire({range:new Te.Q(_e.lineNumber,_e.column,Le.lineNumber,Le.column),languageId:R})}_cut(n){this._modelData&&this._modelData.viewModel.cut(n)}_triggerEditorCommand(n,a,g){const E=h.dS.getEditorCommand(a);return E?(g=g||{},g.source=n,this._instantiationService.invokeFunction(R=>{Promise.resolve(E.runEditorCommand(R,this,g)).then(void 0,z.dz)}),!0):!1}_getViewModel(){return this._modelData?this._modelData.viewModel:null}pushUndoStop(){return!this._modelData||this._configuration.options.get(83)?!1:(this._modelData.model.pushStackElement(),!0)}popUndoStop(){return!this._modelData||this._configuration.options.get(83)?!1:(this._modelData.model.popStackElement(),!0)}executeEdits(n,a,g){if(!this._modelData||this._configuration.options.get(83))return!1;let E;return g?Array.isArray(g)?E=()=>g:E=g:E=()=>null,this._modelData.viewModel.executeEdits(n,a,E),!0}executeCommand(n,a){this._modelData&&this._modelData.viewModel.executeCommand(a,n)}executeCommands(n,a){this._modelData&&this._modelData.viewModel.executeCommands(a,n)}createDecorationsCollection(n){return new ja(this,n)}changeDecorations(n){return this._modelData?this._modelData.model.changeDecorations(n,this._id):null}getLineDecorations(n){return this._modelData?this._modelData.model.getLineDecorations(n,this._id,(0,ee.$C)(this._configuration.options)):null}getDecorationsInRange(n){return this._modelData?this._modelData.model.getDecorationsInRange(n,this._id,(0,ee.$C)(this._configuration.options)):null}deltaDecorations(n,a){return this._modelData?n.length===0&&a.length===0?n:this._modelData.model.deltaDecorations(n,a,this._id):[]}removeDecorations(n){!this._modelData||n.length===0||this._modelData.model.changeDecorations(a=>{a.deltaDecorations(n,[])})}removeDecorationsByType(n){const a=this._decorationTypeKeysToIds[n];a&&this.deltaDecorations(a,[]),this._decorationTypeKeysToIds.hasOwnProperty(n)&&delete this._decorationTypeKeysToIds[n],this._decorationTypeSubtypes.hasOwnProperty(n)&&delete this._decorationTypeSubtypes[n]}getLayoutInfo(){return this._configuration.options.get(133)}createOverviewRuler(n){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.createOverviewRuler(n)}getContainerDomNode(){return this._domElement}getDomNode(){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.domNode.domNode}delegateVerticalScrollbarPointerDown(n){!this._modelData||!this._modelData.hasRealView||this._modelData.view.delegateVerticalScrollbarPointerDown(n)}layout(n){this._configuration.observeContainer(n),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(n){const a={widget:n,position:n.getPosition()};this._contentWidgets.hasOwnProperty(n.getId())&&console.warn("Overwriting a content widget with the same id."),this._contentWidgets[n.getId()]=a,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addContentWidget(a)}layoutContentWidget(n){const a=n.getId();if(this._contentWidgets.hasOwnProperty(a)){const g=this._contentWidgets[a];g.position=n.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutContentWidget(g)}}removeContentWidget(n){const a=n.getId();if(this._contentWidgets.hasOwnProperty(a)){const g=this._contentWidgets[a];delete this._contentWidgets[a],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeContentWidget(g)}}addOverlayWidget(n){const a={widget:n,position:n.getPosition()};this._overlayWidgets.hasOwnProperty(n.getId())&&console.warn("Overwriting an overlay widget with the same id."),this._overlayWidgets[n.getId()]=a,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addOverlayWidget(a)}layoutOverlayWidget(n){const a=n.getId();if(this._overlayWidgets.hasOwnProperty(a)){const g=this._overlayWidgets[a];g.position=n.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutOverlayWidget(g)}}removeOverlayWidget(n){const a=n.getId();if(this._overlayWidgets.hasOwnProperty(a)){const g=this._overlayWidgets[a];delete this._overlayWidgets[a],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeOverlayWidget(g)}}changeViewZones(n){!this._modelData||!this._modelData.hasRealView||this._modelData.view.change(n)}getTargetAtClientPoint(n,a){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.getTargetAtClientPoint(n,a)}getScrolledVisiblePosition(n){if(!this._modelData||!this._modelData.hasRealView)return null;const a=this._modelData.model.validatePosition(n),g=this._configuration.options,E=g.get(133),R=Eh._getVerticalOffsetForPosition(this._modelData,a.lineNumber,a.column)-this.getScrollTop(),ne=this._modelData.view.getOffsetForColumn(a.lineNumber,a.column)+E.glyphMarginWidth+E.lineNumbersWidth+E.decorationsWidth-this.getScrollLeft();return{top:R,left:ne,height:g.get(61)}}getOffsetForColumn(n,a){return!this._modelData||!this._modelData.hasRealView?-1:this._modelData.view.getOffsetForColumn(n,a)}render(n=!1){!this._modelData||!this._modelData.hasRealView||this._modelData.view.render(!0,n)}setAriaOptions(n){!this._modelData||!this._modelData.hasRealView||this._modelData.view.setAriaOptions(n)}applyFontInfo(n){(0,Gt.M)(n,this._configuration.options.get(46))}setBanner(n,a){this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._domElement.removeChild(this._bannerDomNode),this._bannerDomNode=n,this._configuration.setReservedHeight(n?a:0),this._bannerDomNode&&this._domElement.prepend(this._bannerDomNode)}_attachModel(n){if(!n){this._modelData=null;return}const a=[];this._domElement.setAttribute("data-mode-id",n.getLanguageId()),this._configuration.setIsDominatedByLongLines(n.isDominatedByLongLines()),this._configuration.setModelLineCount(n.getLineCount()),n.onBeforeAttached();const g=new Wa(this._id,this._configuration,n,md.create(),pa.create(this._configuration.options),ne=>J.PG(ne),this.languageConfigurationService,this._themeService);a.push(n.onWillDispose(()=>this.setModel(null))),a.push(g.onEvent(ne=>{switch(ne.kind){case 0:this._onDidContentSizeChange.fire(ne);break;case 1:this._editorTextFocus.setValue(ne.hasFocus);break;case 2:this._onDidScrollChange.fire(ne);break;case 3:this._onDidChangeViewZones.fire();break;case 4:this._onDidChangeHiddenAreas.fire();break;case 5:this._onDidAttemptReadOnlyEdit.fire();break;case 6:{ne.reachedMaxCursorCount&&this._notificationService.warn(Q.kg("cursors.maximum","The number of cursors has been limited to {0}.",Lo.MAX_CURSOR_COUNT));const _e=[];for(let Ae=0,je=ne.selections.length;Ae<je;Ae++)_e[Ae]=ne.selections[Ae].getPosition();const Le={position:_e[0],secondaryPositions:_e.slice(1),reason:ne.reason,source:ne.source};this._onDidChangeCursorPosition.fire(Le);const ke={selection:ne.selections[0],secondarySelections:ne.selections.slice(1),modelVersionId:ne.modelVersionId,oldSelections:ne.oldSelections,oldModelVersionId:ne.oldModelVersionId,source:ne.source,reason:ne.reason};this._onDidChangeCursorSelection.fire(ke);break}case 7:this._onDidChangeModelDecorations.fire(ne.event);break;case 8:this._domElement.setAttribute("data-mode-id",n.getLanguageId()),this._onDidChangeModelLanguage.fire(ne.event);break;case 9:this._onDidChangeModelLanguageConfiguration.fire(ne.event);break;case 10:this._onDidChangeModelContent.fire(ne.event);break;case 11:this._onDidChangeModelOptions.fire(ne.event);break;case 12:this._onDidChangeModelTokens.fire(ne.event);break}}));const[E,R]=this._createView(g);if(R){this._domElement.appendChild(E.domNode.domNode);let ne=Object.keys(this._contentWidgets);for(let _e=0,Le=ne.length;_e<Le;_e++){const ke=ne[_e];E.addContentWidget(this._contentWidgets[ke])}ne=Object.keys(this._overlayWidgets);for(let _e=0,Le=ne.length;_e<Le;_e++){const ke=ne[_e];E.addOverlayWidget(this._overlayWidgets[ke])}E.render(!1,!0),E.domNode.domNode.setAttribute("data-uri",n.uri.toString())}this._modelData=new wc(n,g,E,R,a)}_createView(n){let a;this.isSimpleWidget?a={paste:(R,ne,_e,Le)=>{this._paste("keyboard",R,ne,_e,Le)},type:R=>{this._type("keyboard",R)},compositionType:(R,ne,_e,Le)=>{this._compositionType("keyboard",R,ne,_e,Le)},startComposition:()=>{this._startComposition()},endComposition:()=>{this._endComposition("keyboard")},cut:()=>{this._cut("keyboard")}}:a={paste:(R,ne,_e,Le)=>{const ke={text:R,pasteOnNewLine:ne,multicursorText:_e,mode:Le};this._commandService.executeCommand("paste",ke)},type:R=>{const ne={text:R};this._commandService.executeCommand("type",ne)},compositionType:(R,ne,_e,Le)=>{if(_e||Le){const ke={text:R,replacePrevCharCnt:ne,replaceNextCharCnt:_e,positionDelta:Le};this._commandService.executeCommand("compositionType",ke)}else{const ke={text:R,replaceCharCnt:ne};this._commandService.executeCommand("replacePreviousChar",ke)}},startComposition:()=>{this._commandService.executeCommand("compositionStart",{})},endComposition:()=>{this._commandService.executeCommand("compositionEnd",{})},cut:()=>{this._commandService.executeCommand("cut",{})}};const g=new _i(n.coordinatesConverter);return g.onKeyDown=R=>this._onKeyDown.fire(R),g.onKeyUp=R=>this._onKeyUp.fire(R),g.onContextMenu=R=>this._onContextMenu.fire(R),g.onMouseMove=R=>this._onMouseMove.fire(R),g.onMouseLeave=R=>this._onMouseLeave.fire(R),g.onMouseDown=R=>this._onMouseDown.fire(R),g.onMouseUp=R=>this._onMouseUp.fire(R),g.onMouseDrag=R=>this._onMouseDrag.fire(R),g.onMouseDrop=R=>this._onMouseDrop.fire(R),g.onMouseDropCanceled=R=>this._onMouseDropCanceled.fire(R),g.onMouseWheel=R=>this._onMouseWheel.fire(R),[new _r(a,this._configuration,this._themeService.getColorTheme(),n,g,this._overflowWidgetsDomNode),!0]}_postDetachModelCleanup(n){n?.removeAllDecorationsWithOwnerId(this._id)}_detachModel(){if(!this._modelData)return null;const n=this._modelData.model,a=this._modelData.hasRealView?this._modelData.view.domNode.domNode:null;return this._modelData.dispose(),this._modelData=null,this._domElement.removeAttribute("data-mode-id"),a&&this._domElement.contains(a)&&this._domElement.removeChild(a),this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._domElement.removeChild(this._bannerDomNode),n}_removeDecorationType(n){this._codeEditorService.removeDecorationType(n)}hasModel(){return this._modelData!==null}showDropIndicatorAt(n){const a=[{range:new Te.Q(n.lineNumber,n.column,n.lineNumber,n.column),options:Eh.dropIntoEditorDecorationOptions}];this._dropIntoEditorDecorations.set(a),this.revealPosition(n,1)}removeDropIndicator(){this._dropIntoEditorDecorations.clear()}};Ua.dropIntoEditorDecorationOptions=ml.kI.register({description:"workbench-dnd-target",className:"dnd-target"}),Ua=rg([Lr(3,Va._Y),Lr(4,Ee.T),Lr(5,wl.wT),Lr(6,Zr.fN),Lr(7,ai.Gy),Lr(8,Fo.Ot),Lr(9,ge.j),Lr(10,pd.JZ),Lr(11,va.u)],Ua);class kl extends _.jG{constructor(n){super(),this._emitterOptions=n,this._onDidChangeToTrue=this._register(new S.vl(this._emitterOptions)),this.onDidChangeToTrue=this._onDidChangeToTrue.event,this._onDidChangeToFalse=this._register(new S.vl(this._emitterOptions)),this.onDidChangeToFalse=this._onDidChangeToFalse.event,this._value=0}setValue(n){const a=n?2:1;this._value!==a&&(this._value=a,this._value===2?this._onDidChangeToTrue.fire():this._value===1&&this._onDidChangeToFalse.fire())}}class El extends _.jG{constructor(n,a){super(),this._editor=n,a.createKey("editorId",n.getId()),this._editorSimpleInput=cs.R.editorSimpleInput.bindTo(a),this._editorFocus=cs.R.focus.bindTo(a),this._textInputFocus=cs.R.textInputFocus.bindTo(a),this._editorTextFocus=cs.R.editorTextFocus.bindTo(a),this._editorTabMovesFocus=cs.R.tabMovesFocus.bindTo(a),this._editorReadonly=cs.R.readOnly.bindTo(a),this._inDiffEditor=cs.R.inDiffEditor.bindTo(a),this._editorColumnSelection=cs.R.columnSelection.bindTo(a),this._hasMultipleSelections=cs.R.hasMultipleSelections.bindTo(a),this._hasNonEmptySelection=cs.R.hasNonEmptySelection.bindTo(a),this._canUndo=cs.R.canUndo.bindTo(a),this._canRedo=cs.R.canRedo.bindTo(a),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._updateFromConfig(),this._updateFromSelection(),this._updateFromFocus(),this._updateFromModel(),this._editorSimpleInput.set(this._editor.isSimpleWidget)}_updateFromConfig(){const n=this._editor.getOptions();this._editorTabMovesFocus.set(n.get(132)),this._editorReadonly.set(n.get(83)),this._inDiffEditor.set(n.get(56)),this._editorColumnSelection.set(n.get(18))}_updateFromSelection(){const n=this._editor.getSelections();n?(this._hasMultipleSelections.set(n.length>1),this._hasNonEmptySelection.set(n.some(a=>!a.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 n=this._editor.getModel();this._canUndo.set(!!(n&&n.canUndo())),this._canRedo.set(!!(n&&n.canRedo()))}}class xl extends _.jG{constructor(n,a,g){super(),this._editor=n,this._contextKeyService=a,this._languageFeaturesService=g,this._langId=cs.R.languageId.bindTo(a),this._hasCompletionItemProvider=cs.R.hasCompletionItemProvider.bindTo(a),this._hasCodeActionsProvider=cs.R.hasCodeActionsProvider.bindTo(a),this._hasCodeLensProvider=cs.R.hasCodeLensProvider.bindTo(a),this._hasDefinitionProvider=cs.R.hasDefinitionProvider.bindTo(a),this._hasDeclarationProvider=cs.R.hasDeclarationProvider.bindTo(a),this._hasImplementationProvider=cs.R.hasImplementationProvider.bindTo(a),this._hasTypeDefinitionProvider=cs.R.hasTypeDefinitionProvider.bindTo(a),this._hasHoverProvider=cs.R.hasHoverProvider.bindTo(a),this._hasDocumentHighlightProvider=cs.R.hasDocumentHighlightProvider.bindTo(a),this._hasDocumentSymbolProvider=cs.R.hasDocumentSymbolProvider.bindTo(a),this._hasReferenceProvider=cs.R.hasReferenceProvider.bindTo(a),this._hasRenameProvider=cs.R.hasRenameProvider.bindTo(a),this._hasSignatureHelpProvider=cs.R.hasSignatureHelpProvider.bindTo(a),this._hasInlayHintsProvider=cs.R.hasInlayHintsProvider.bindTo(a),this._hasDocumentFormattingProvider=cs.R.hasDocumentFormattingProvider.bindTo(a),this._hasDocumentSelectionFormattingProvider=cs.R.hasDocumentSelectionFormattingProvider.bindTo(a),this._hasMultipleDocumentFormattingProvider=cs.R.hasMultipleDocumentFormattingProvider.bindTo(a),this._hasMultipleDocumentSelectionFormattingProvider=cs.R.hasMultipleDocumentSelectionFormattingProvider.bindTo(a),this._isInWalkThrough=cs.R.isInWalkThroughSnippet.bindTo(a);const E=()=>this._update();this._register(n.onDidChangeModel(E)),this._register(n.onDidChangeModelLanguage(E)),this._register(g.completionProvider.onDidChange(E)),this._register(g.codeActionProvider.onDidChange(E)),this._register(g.codeLensProvider.onDidChange(E)),this._register(g.definitionProvider.onDidChange(E)),this._register(g.declarationProvider.onDidChange(E)),this._register(g.implementationProvider.onDidChange(E)),this._register(g.typeDefinitionProvider.onDidChange(E)),this._register(g.hoverProvider.onDidChange(E)),this._register(g.documentHighlightProvider.onDidChange(E)),this._register(g.documentSymbolProvider.onDidChange(E)),this._register(g.referenceProvider.onDidChange(E)),this._register(g.renameProvider.onDidChange(E)),this._register(g.documentFormattingEditProvider.onDidChange(E)),this._register(g.documentRangeFormattingEditProvider.onDidChange(E)),this._register(g.signatureHelpProvider.onDidChange(E)),this._register(g.inlayHintsProvider.onDidChange(E)),E()}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._isInWalkThrough.reset()})}_update(){const n=this._editor.getModel();if(!n){this.reset();return}this._contextKeyService.bufferChangeEvents(()=>{this._langId.set(n.getLanguageId()),this._hasCompletionItemProvider.set(this._languageFeaturesService.completionProvider.has(n)),this._hasCodeActionsProvider.set(this._languageFeaturesService.codeActionProvider.has(n)),this._hasCodeLensProvider.set(this._languageFeaturesService.codeLensProvider.has(n)),this._hasDefinitionProvider.set(this._languageFeaturesService.definitionProvider.has(n)),this._hasDeclarationProvider.set(this._languageFeaturesService.declarationProvider.has(n)),this._hasImplementationProvider.set(this._languageFeaturesService.implementationProvider.has(n)),this._hasTypeDefinitionProvider.set(this._languageFeaturesService.typeDefinitionProvider.has(n)),this._hasHoverProvider.set(this._languageFeaturesService.hoverProvider.has(n)),this._hasDocumentHighlightProvider.set(this._languageFeaturesService.documentHighlightProvider.has(n)),this._hasDocumentSymbolProvider.set(this._languageFeaturesService.documentSymbolProvider.has(n)),this._hasReferenceProvider.set(this._languageFeaturesService.referenceProvider.has(n)),this._hasRenameProvider.set(this._languageFeaturesService.renameProvider.has(n)),this._hasSignatureHelpProvider.set(this._languageFeaturesService.signatureHelpProvider.has(n)),this._hasInlayHintsProvider.set(this._languageFeaturesService.inlayHintsProvider.has(n)),this._hasDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.has(n)||this._languageFeaturesService.documentRangeFormattingEditProvider.has(n)),this._hasDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.has(n)),this._hasMultipleDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.all(n).length+this._languageFeaturesService.documentRangeFormattingEditProvider.all(n).length>1),this._hasMultipleDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.all(n).length>1),this._isInWalkThrough.set(n.uri.scheme===y.ny.walkThroughSnippet)})}}class lo extends _.jG{constructor(n){super(),this._onChange=this._register(new S.vl),this.onChange=this._onChange.event,this._hasFocus=!1,this._domFocusTracker=this._register(J.w5(n)),this._register(this._domFocusTracker.onDidFocus(()=>{this._hasFocus=!0,this._onChange.fire(void 0)})),this._register(this._domFocusTracker.onDidBlur(()=>{this._hasFocus=!1,this._onChange.fire(void 0)}))}hasFocus(){return this._hasFocus}}class ja{constructor(n,a){this._editor=n,this._decorationIds=[],this._isChangingDecorations=!1,Array.isArray(a)&&a.length>0&&this.set(a)}get length(){return this._decorationIds.length}onDidChange(n,a,g){return this._editor.onDidChangeModelDecorations(E=>{this._isChangingDecorations||n.call(a,E)},g)}getRange(n){return!this._editor.hasModel()||n>=this._decorationIds.length?null:this._editor.getModel().getDecorationRange(this._decorationIds[n])}getRanges(){if(!this._editor.hasModel())return[];const n=this._editor.getModel(),a=[];for(const g of this._decorationIds){const E=n.getDecorationRange(g);E&&a.push(E)}return a}has(n){return this._decorationIds.includes(n.id)}clear(){this._decorationIds.length!==0&&this.set([])}set(n){try{this._isChangingDecorations=!0,this._editor.changeDecorations(a=>{this._decorationIds=a.deltaDecorations(this._decorationIds,n)})}finally{this._isChangingDecorations=!1}}}const Il=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='"),Ah=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 Ka(Je){return Il+encodeURIComponent(Je.toString())+Ah}const _d=encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" height="3" width="12"><g fill="'),Sc=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 Nl(Je){return _d+encodeURIComponent(Je.toString())+Sc}(0,ai.zy)((Je,n)=>{const a=Je.getColor(yn.AN$);a&&n.addRule(`.monaco-editor .squiggly-error { border-bottom: 4px double ${a}; }`);const g=Je.getColor(yn.Rbi);g&&n.addRule(`.monaco-editor .squiggly-error { background: url("data:image/svg+xml,${Ka(g)}") repeat-x bottom left; }`);const E=Je.getColor(yn.Sj);E&&n.addRule(`.monaco-editor .squiggly-error::before { display: block; content: ''; width: 100%; height: 100%; background: ${E}; }`);const R=Je.getColor(yn.Stt);R&&n.addRule(`.monaco-editor .squiggly-warning { border-bottom: 4px double ${R}; }`);const ne=Je.getColor(yn.Hng);ne&&n.addRule(`.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,${Ka(ne)}") repeat-x bottom left; }`);const _e=Je.getColor(yn.whs);_e&&n.addRule(`.monaco-editor .squiggly-warning::before { display: block; content: ''; width: 100%; height: 100%; background: ${_e}; }`);const Le=Je.getColor(yn.IIb);Le&&n.addRule(`.monaco-editor .squiggly-info { border-bottom: 4px double ${Le}; }`);const ke=Je.getColor(yn.pOz);ke&&n.addRule(`.monaco-editor .squiggly-info { background: url("data:image/svg+xml,${Ka(ke)}") repeat-x bottom left; }`);const Ae=Je.getColor(yn.sDQ);Ae&&n.addRule(`.monaco-editor .squiggly-info::before { display: block; content: ''; width: 100%; height: 100%; background: ${Ae}; }`);const je=Je.getColor(yn.HWC);je&&n.addRule(`.monaco-editor .squiggly-hint { border-bottom: 2px dotted ${je}; }`);const Xe=Je.getColor(yn.i61);Xe&&n.addRule(`.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,${Nl(Xe)}") no-repeat bottom left; }`);const it=Je.getColor(Jt.yw);it&&n.addRule(`.monaco-editor.showUnused .squiggly-inline-unnecessary { opacity: ${it.rgba.a}; }`);const yt=Je.getColor(Jt.Ln);yt&&n.addRule(`.monaco-editor.showUnused .squiggly-unnecessary { border-bottom: 2px dashed ${yt}; }`);const Nt=Je.getColor(yn.By2)||"inherit";n.addRule(`.monaco-editor.showDeprecated .squiggly-inline-deprecated { text-decoration: line-through; text-decoration-color: ${Nt}}`)})},648:(Tt,Fe,f)=>{f.d(Fe,{T:()=>ki});var I=f(13837),h=f(3765),te=f(59095),$=f(87110),x=f(5043),ie=f(86843),Q=f(65958),J=f(2106),z=f(10998),S=f(25837),_=f(80878),y=f(87301),C=f(70651),d=f(32662),w=f(77439),D=f(63781),L=f(27969),k=f(50946),j=f(66476),N=f(57445),B=f(15365),T=f(48295),H=f(39723),Y=f(11608),ee=f(96655),ce=f(4874),pe=f(89044),ge=f(26048),fe=f(11210),oe=f(77922),Z=function(ni,xe,Ce,Ye){var Rt=arguments.length,Vt=Rt<3?xe:Ye===null?Ye=Object.getOwnPropertyDescriptor(xe,Ce):Ye,Gt;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Vt=Reflect.decorate(ni,xe,Ce,Ye);else for(var ri=ni.length-1;ri>=0;ri--)(Gt=ni[ri])&&(Vt=(Rt<3?Gt(Vt):Rt>3?Gt(xe,Ce,Vt):Gt(xe,Ce))||Vt);return Rt>3&&Vt&&Object.defineProperty(xe,Ce,Vt),Vt},le=function(ni,xe){return function(Ce,Ye){xe(Ce,Ye,ni)}},se=function(ni,xe,Ce,Ye){function Rt(Vt){return Vt instanceof Ce?Vt:new Ce(function(Gt){Gt(Vt)})}return new(Ce||(Ce=Promise))(function(Vt,Gt){function ri(Jt){try{di(Ye.next(Jt))}catch(ai){Gt(ai)}}function fi(Jt){try{di(Ye.throw(Jt))}catch(ai){Gt(ai)}}function di(Jt){Jt.done?Vt(Jt.value):Rt(Jt.value).then(ri,fi)}di((Ye=Ye.apply(ni,xe||[])).next())})},X;const K=3;class he{constructor(xe,Ce,Ye,Rt){this.originalLineStart=xe,this.originalLineEnd=Ce,this.modifiedLineStart=Ye,this.modifiedLineEnd=Rt}getType(){return this.originalLineStart===0?1:this.modifiedLineStart===0?2:0}}class ve{constructor(xe){this.entries=xe}}const Ee=(0,fe.pU)("diff-review-insert",ge.W6.add,h.kg("diffReviewInsertIcon","Icon for 'Insert' in diff review.")),O=(0,fe.pU)("diff-review-remove",ge.W6.remove,h.kg("diffReviewRemoveIcon","Icon for 'Remove' in diff review.")),ot=(0,fe.pU)("diff-review-close",ge.W6.close,h.kg("diffReviewCloseIcon","Icon for 'Close' in diff review."));let lt=class dc extends z.jG{constructor(xe,Ce){super(),this._languageService=Ce,this._width=0,this._diffEditor=xe,this._isVisible=!1,this.shadow=(0,x.Z)(document.createElement("div")),this.shadow.setClassName("diff-review-shadow"),this.actionBarContainer=(0,x.Z)(document.createElement("div")),this.actionBarContainer.setClassName("diff-review-actions"),this._actionBar=this._register(new w.E(this.actionBarContainer.domNode)),this._actionBar.push(new L.rc("diffreview.close",h.kg("label.close","Close"),"close-diff-review "+pe.L0.asClassName(ot),!0,()=>se(this,void 0,void 0,function*(){return this.hide()})),{label:!1,icon:!0}),this.domNode=(0,x.Z)(document.createElement("div")),this.domNode.setClassName("diff-review monaco-editor-background"),this._content=(0,x.Z)(document.createElement("div")),this._content.setClassName("diff-review-content"),this._content.setAttribute("role","code"),this.scrollbar=this._register(new D.MU(this._content.domNode,{})),this.domNode.domNode.appendChild(this.scrollbar.getDomNode()),this._register(xe.onDidUpdateDiff(()=>{this._isVisible&&(this._diffs=this._compute(),this._render())})),this._register(xe.getModifiedEditor().onDidChangeCursorPosition(()=>{this._isVisible&&this._render()})),this._register(te.b2(this.domNode.domNode,"click",Ye=>{Ye.preventDefault();const Rt=te.m1(Ye.target,"diff-review-row");Rt&&this._goToRow(Rt)})),this._register(te.b2(this.domNode.domNode,"keydown",Ye=>{(Ye.equals(18)||Ye.equals(2066)||Ye.equals(530))&&(Ye.preventDefault(),this._goToRow(this._getNextRow())),(Ye.equals(16)||Ye.equals(2064)||Ye.equals(528))&&(Ye.preventDefault(),this._goToRow(this._getPrevRow())),(Ye.equals(9)||Ye.equals(2057)||Ye.equals(521)||Ye.equals(1033))&&(Ye.preventDefault(),this.hide()),(Ye.equals(10)||Ye.equals(3))&&(Ye.preventDefault(),this.accept())})),this._diffs=[],this._currentDiff=null}prev(){let xe=0;if(this._isVisible||(this._diffs=this._compute()),this._isVisible){let Ye=-1;for(let Rt=0,Vt=this._diffs.length;Rt<Vt;Rt++)if(this._diffs[Rt]===this._currentDiff){Ye=Rt;break}xe=this._diffs.length+Ye-1}else xe=this._findDiffIndex(this._diffEditor.getPosition());if(this._diffs.length===0)return;xe=xe%this._diffs.length;const Ce=this._diffs[xe].entries;this._diffEditor.setPosition(new B.y(Ce[0].modifiedLineStart,1)),this._diffEditor.setSelection({startColumn:1,startLineNumber:Ce[0].modifiedLineStart,endColumn:1073741824,endLineNumber:Ce[Ce.length-1].modifiedLineEnd}),this._isVisible=!0,this._diffEditor.doLayout(),this._render(),this._goToRow(this._getNextRow())}next(){let xe=0;if(this._isVisible||(this._diffs=this._compute()),this._isVisible){let Ye=-1;for(let Rt=0,Vt=this._diffs.length;Rt<Vt;Rt++)if(this._diffs[Rt]===this._currentDiff){Ye=Rt;break}xe=Ye+1}else xe=this._findDiffIndex(this._diffEditor.getPosition());if(this._diffs.length===0)return;xe=xe%this._diffs.length;const Ce=this._diffs[xe].entries;this._diffEditor.setPosition(new B.y(Ce[0].modifiedLineStart,1)),this._diffEditor.setSelection({startColumn:1,startLineNumber:Ce[0].modifiedLineStart,endColumn:1073741824,endLineNumber:Ce[Ce.length-1].modifiedLineEnd}),this._isVisible=!0,this._diffEditor.doLayout(),this._render(),this._goToRow(this._getNextRow())}accept(){let xe=-1;const Ce=this._getCurrentFocusedRow();if(Ce){const Ye=parseInt(Ce.getAttribute("data-line"),10);isNaN(Ye)||(xe=Ye)}this.hide(),xe!==-1&&(this._diffEditor.setPosition(new B.y(xe,1)),this._diffEditor.revealPosition(new B.y(xe,1),1))}hide(){this._isVisible=!1,this._diffEditor.updateOptions({readOnly:!1}),this._diffEditor.focus(),this._diffEditor.doLayout(),this._render()}_getPrevRow(){const xe=this._getCurrentFocusedRow();return xe?xe.previousElementSibling?xe.previousElementSibling:xe:this._getFirstRow()}_getNextRow(){const xe=this._getCurrentFocusedRow();return xe?xe.nextElementSibling?xe.nextElementSibling:xe:this._getFirstRow()}_getFirstRow(){return this.domNode.domNode.querySelector(".diff-review-row")}_getCurrentFocusedRow(){const xe=document.activeElement;return xe&&/diff-review-row/.test(xe.className)?xe:null}_goToRow(xe){const Ce=this._getCurrentFocusedRow();xe.tabIndex=0,xe.focus(),Ce&&Ce!==xe&&(Ce.tabIndex=-1),this.scrollbar.scanDomNode()}isVisible(){return this._isVisible}layout(xe,Ce,Ye){this._width=Ce,this.shadow.setTop(xe-6),this.shadow.setWidth(Ce),this.shadow.setHeight(this._isVisible?6:0),this.domNode.setTop(xe),this.domNode.setWidth(Ce),this.domNode.setHeight(Ye),this._content.setHeight(Ye),this._content.setWidth(Ce),this._isVisible?(this.actionBarContainer.setAttribute("aria-hidden","false"),this.actionBarContainer.setDisplay("block")):(this.actionBarContainer.setAttribute("aria-hidden","true"),this.actionBarContainer.setDisplay("none"))}_compute(){const xe=this._diffEditor.getLineChanges();if(!xe||xe.length===0)return[];const Ce=this._diffEditor.getOriginalEditor().getModel(),Ye=this._diffEditor.getModifiedEditor().getModel();return!Ce||!Ye?[]:dc._mergeAdjacent(xe,Ce.getLineCount(),Ye.getLineCount())}static _mergeAdjacent(xe,Ce,Ye){if(!xe||xe.length===0)return[];const Rt=[];let Vt=0;for(let di=0,Jt=xe.length;di<Jt;di++){const ai=xe[di],Ei=ai.originalStartLineNumber,wi=ai.originalEndLineNumber,Ai=ai.modifiedStartLineNumber,Ni=ai.modifiedEndLineNumber,qi=[];let Pi=0;{const gn=wi===0?Ei:Ei-1,Gi=Ni===0?Ai:Ai-1;let Oi=1,Fi=1;if(di>0){const _i=xe[di-1];_i.originalEndLineNumber===0?Oi=_i.originalStartLineNumber+1:Oi=_i.originalEndLineNumber+1,_i.modifiedEndLineNumber===0?Fi=_i.modifiedStartLineNumber+1:Fi=_i.modifiedEndLineNumber+1}let Bi=gn-K+1,rn=Gi-K+1;if(Bi<Oi){const _i=Oi-Bi;Bi=Bi+_i,rn=rn+_i}if(rn<Fi){const _i=Fi-rn;Bi=Bi+_i,rn=rn+_i}qi[Pi++]=new he(Bi,gn,rn,Gi)}wi!==0&&(qi[Pi++]=new he(Ei,wi,0,0)),Ni!==0&&(qi[Pi++]=new he(0,0,Ai,Ni));{const gn=wi===0?Ei+1:wi+1,Gi=Ni===0?Ai+1:Ni+1;let Oi=Ce,Fi=Ye;if(di+1<Jt){const _i=xe[di+1];_i.originalEndLineNumber===0?Oi=_i.originalStartLineNumber:Oi=_i.originalStartLineNumber-1,_i.modifiedEndLineNumber===0?Fi=_i.modifiedStartLineNumber:Fi=_i.modifiedStartLineNumber-1}let Bi=gn+K-1,rn=Gi+K-1;if(Bi>Oi){const _i=Oi-Bi;Bi=Bi+_i,rn=rn+_i}if(rn>Fi){const _i=Fi-rn;Bi=Bi+_i,rn=rn+_i}qi[Pi++]=new he(gn,Bi,Gi,rn)}Rt[Vt++]=new ve(qi)}let Gt=Rt[0].entries;const ri=[];let fi=0;for(let di=1,Jt=Rt.length;di<Jt;di++){const ai=Rt[di].entries,Ei=Gt[Gt.length-1],wi=ai[0];if(Ei.getType()===0&&wi.getType()===0&&wi.originalLineStart<=Ei.originalLineEnd){Gt[Gt.length-1]=new he(Ei.originalLineStart,wi.originalLineEnd,Ei.modifiedLineStart,wi.modifiedLineEnd),Gt=Gt.concat(ai.slice(1));continue}ri[fi++]=new ve(Gt),Gt=ai}return ri[fi++]=new ve(Gt),ri}_findDiffIndex(xe){const Ce=xe.lineNumber;for(let Ye=0,Rt=this._diffs.length;Ye<Rt;Ye++){const Vt=this._diffs[Ye].entries,Gt=Vt[Vt.length-1].modifiedLineEnd;if(Ce<=Gt)return Ye}return 0}_render(){const xe=this._diffEditor.getOriginalEditor().getOptions(),Ce=this._diffEditor.getModifiedEditor().getOptions(),Ye=this._diffEditor.getOriginalEditor().getModel(),Rt=this._diffEditor.getModifiedEditor().getModel(),Vt=Ye.getOptions(),Gt=Rt.getOptions();if(!this._isVisible||!Ye||!Rt){te.w_(this._content.domNode),this._currentDiff=null,this.scrollbar.scanDomNode();return}this._diffEditor.updateOptions({readOnly:!0});const ri=this._findDiffIndex(this._diffEditor.getPosition());if(this._diffs[ri]===this._currentDiff)return;this._currentDiff=this._diffs[ri];const fi=this._diffs[ri].entries,di=document.createElement("div");di.className="diff-review-table",di.setAttribute("role","list"),di.setAttribute("aria-label",'Difference review. Use "Stage | Unstage | Revert Selected Ranges" commands'),(0,S.M)(di,Ce.get(46));let Jt=0,ai=0,Ei=0,wi=0;for(let rn=0,_i=fi.length;rn<_i;rn++){const jn=fi[rn],Wn=jn.originalLineStart,xn=jn.originalLineEnd,Rn=jn.modifiedLineStart,$i=jn.modifiedLineEnd;Wn!==0&&(Jt===0||Wn<Jt)&&(Jt=Wn),xn!==0&&(ai===0||xn>ai)&&(ai=xn),Rn!==0&&(Ei===0||Rn<Ei)&&(Ei=Rn),$i!==0&&(wi===0||$i>wi)&&(wi=$i)}const Ai=document.createElement("div");Ai.className="diff-review-row";const Ni=document.createElement("div");Ni.className="diff-review-cell diff-review-summary";const qi=ai-Jt+1,Pi=wi-Ei+1;Ni.appendChild(document.createTextNode(`${ri+1}/${this._diffs.length}: @@ -${Jt},${qi} +${Ei},${Pi} @@`)),Ai.setAttribute("data-line",String(Ei));const gn=rn=>rn===0?h.kg("no_lines_changed","no lines changed"):rn===1?h.kg("one_line_changed","1 line changed"):h.kg("more_lines_changed","{0} lines changed",rn),Gi=gn(qi),Oi=gn(Pi);Ai.setAttribute("aria-label",h.kg({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}",ri+1,this._diffs.length,Jt,Gi,Ei,Oi)),Ai.appendChild(Ni),Ai.setAttribute("role","listitem"),di.appendChild(Ai);const Fi=Ce.get(61);let Bi=Ei;for(let rn=0,_i=fi.length;rn<_i;rn++){const jn=fi[rn];dc._renderSection(di,jn,Bi,Fi,this._width,xe,Ye,Vt,Ce,Rt,Gt,this._languageService.languageIdCodec),jn.modifiedLineStart!==0&&(Bi=jn.modifiedLineEnd)}te.w_(this._content.domNode),this._content.domNode.appendChild(di),this.scrollbar.scanDomNode()}static _renderSection(xe,Ce,Ye,Rt,Vt,Gt,ri,fi,di,Jt,ai,Ei){const wi=Ce.getType();let Ai="diff-review-row",Ni="";const qi="diff-review-spacer";let Pi=null;switch(wi){case 1:Ai="diff-review-row line-insert",Ni=" char-insert",Pi=Ee;break;case 2:Ai="diff-review-row line-delete",Ni=" char-delete",Pi=O;break}const gn=Ce.originalLineStart,Gi=Ce.originalLineEnd,Oi=Ce.modifiedLineStart,Fi=Ce.modifiedLineEnd,Bi=Math.max(Fi-Oi,Gi-gn),rn=Gt.get(133),_i=rn.glyphMarginWidth+rn.lineNumbersWidth,jn=di.get(133),Wn=10+jn.glyphMarginWidth+jn.lineNumbersWidth;for(let xn=0;xn<=Bi;xn++){const Rn=gn===0?0:gn+xn,$i=Oi===0?0:Oi+xn,Nn=document.createElement("div");Nn.style.minWidth=Vt+"px",Nn.className=Ai,Nn.setAttribute("role","listitem"),$i!==0&&(Ye=$i),Nn.setAttribute("data-line",String(Ye));const Jn=document.createElement("div");Jn.className="diff-review-cell",Jn.style.height=`${Rt}px`,Nn.appendChild(Jn);const Ti=document.createElement("span");Ti.style.width=_i+"px",Ti.style.minWidth=_i+"px",Ti.className="diff-review-line-number"+Ni,Rn!==0?Ti.appendChild(document.createTextNode(String(Rn))):Ti.innerText="\xA0",Jn.appendChild(Ti);const es=document.createElement("span");es.style.width=Wn+"px",es.style.minWidth=Wn+"px",es.style.paddingRight="10px",es.className="diff-review-line-number"+Ni,$i!==0?es.appendChild(document.createTextNode(String($i))):es.innerText="\xA0",Jn.appendChild(es);const xi=document.createElement("span");if(xi.className=qi,Pi){const cn=document.createElement("span");cn.className=pe.L0.asClassName(Pi),cn.innerText="\xA0\xA0",xi.appendChild(cn)}else xi.innerText="\xA0\xA0";Jn.appendChild(xi);let os;if($i!==0){let cn=this._renderLine(Jt,di,ai.tabSize,$i,Ei);dc._ttPolicy&&(cn=dc._ttPolicy.createHTML(cn)),Jn.insertAdjacentHTML("beforeend",cn),os=Jt.getLineContent($i)}else{let cn=this._renderLine(ri,Gt,fi.tabSize,Rn,Ei);dc._ttPolicy&&(cn=dc._ttPolicy.createHTML(cn)),Jn.insertAdjacentHTML("beforeend",cn),os=ri.getLineContent(Rn)}os.length===0&&(os=h.kg("blankLine","blank"));let Zi="";switch(wi){case 0:Rn===$i?Zi=h.kg({key:"unchangedLine",comment:["The placeholders are contents of the line and should not be translated."]},"{0} unchanged line {1}",os,Rn):Zi=h.kg("equalLine","{0} original line {1} modified line {2}",os,Rn,$i);break;case 1:Zi=h.kg("insertLine","+ {0} modified line {1}",os,$i);break;case 2:Zi=h.kg("deleteLine","- {0} original line {1}",os,Rn);break}Nn.setAttribute("aria-label",Zi),xe.appendChild(Nn)}}static _renderLine(xe,Ce,Ye,Rt,Vt){const Gt=xe.getLineContent(Rt),ri=Ce.get(46),fi=N.f.createEmpty(Gt,Vt),di=Y.qL.isBasicASCII(Gt,xe.mightContainNonBasicASCII()),Jt=Y.qL.containsRTL(Gt,di,xe.mightContainRTL());return(0,H.Md)(new H.zL(ri.isMonospace&&!Ce.get(29),ri.canUseHalfwidthRightwardsArrow,Gt,!1,di,Jt,0,fi,[],Ye,0,ri.spaceWidth,ri.middotWidth,ri.wsmiddotWidth,Ce.get(107),Ce.get(90),Ce.get(85),Ce.get(47)!==j.Bc.OFF,null)).html}};lt._ttPolicy=(X=window.trustedTypes)===null||X===void 0?void 0:X.createPolicy("diffReview",{createHTML:ni=>ni}),lt=Z([le(1,oe.L)],lt),(0,pe.zy)((ni,xe)=>{const Ce=ni.getColor(T.Qt);Ce&&xe.addRule(`.monaco-diff-editor .diff-review-line-number { color: ${Ce}; }`);const Ye=ni.getColor(ce.bXl);Ye&&xe.addRule(`.monaco-diff-editor .diff-review-shadow { box-shadow: ${Ye} 0 -6px 6px -6px inset; }`)});class We extends k.ks{constructor(){super({id:"editor.action.diffReview.next",label:h.kg("editor.action.diffReview.next","Go to Next Difference"),alias:"Go to Next Difference",precondition:ee.M$.has("isInDiffEditor"),kbOpts:{kbExpr:null,primary:65,weight:100}})}run(xe,Ce){const Ye=De(xe);Ye&&Ye.diffReviewNext()}}class Ke extends k.ks{constructor(){super({id:"editor.action.diffReview.prev",label:h.kg("editor.action.diffReview.prev","Go to Previous Difference"),alias:"Go to Previous Difference",precondition:ee.M$.has("isInDiffEditor"),kbOpts:{kbExpr:null,primary:1089,weight:100}})}run(xe,Ce){const Ye=De(xe);Ye&&Ye.diffReviewPrev()}}function De(ni){const xe=ni.get(y.T),Ce=xe.listDiffEditors(),Ye=xe.getActiveCodeEditor();if(!Ye)return null;for(let Rt=0,Vt=Ce.length;Rt<Vt;Rt++){const Gt=Ce[Rt];if(Gt.getModifiedEditor().getId()===Ye.getId()||Gt.getOriginalEditor().getId()===Ye.getId())return Gt}return null}(0,k.Fl)(We),(0,k.Fl)(Ke);var Pe=f(28061),Ue=f(54324),Re=f(12596),et=f(59922),rt=f(90304),Lt=f(96803),Dt=f(45561),xt=f(82399),Ie=f(30657),dt=f(29879),ft=f(52348),Bt=function(ni,xe,Ce,Ye){function Rt(Vt){return Vt instanceof Ce?Vt:new Ce(function(Gt){Gt(Vt)})}return new(Ce||(Ce=Promise))(function(Vt,Gt){function ri(Jt){try{di(Ye.next(Jt))}catch(ai){Gt(ai)}}function fi(Jt){try{di(Ye.throw(Jt))}catch(ai){Gt(ai)}}function di(Jt){Jt.done?Vt(Jt.value):Rt(Jt.value).then(ri,fi)}di((Ye=Ye.apply(ni,xe||[])).next())})};class jt extends z.jG{constructor(xe,Ce,Ye,Rt,Vt,Gt){super(),this._viewZoneId=xe,this._marginDomNode=Ce,this.editor=Ye,this.diff=Rt,this._contextMenuService=Vt,this._clipboardService=Gt,this._visibility=!1,this._marginDomNode.style.zIndex="10",this._diffActions=document.createElement("div"),this._diffActions.className=ge.W6.lightBulb.classNames+" lightbulb-glyph",this._diffActions.style.position="absolute";const ri=Ye.getOption(61),fi=Ye.getModel().getEOL();this._diffActions.style.right="0px",this._diffActions.style.visibility="hidden",this._diffActions.style.height=`${ri}px`,this._diffActions.style.lineHeight=`${ri}px`,this._marginDomNode.appendChild(this._diffActions);const di=[],Jt=Rt.modifiedEndLineNumber===0;di.push(new L.rc("diff.clipboard.copyDeletedContent",Jt?Rt.originalEndLineNumber>Rt.modifiedStartLineNumber?h.kg("diff.clipboard.copyDeletedLinesContent.label","Copy deleted lines"):h.kg("diff.clipboard.copyDeletedLinesContent.single.label","Copy deleted line"):Rt.originalEndLineNumber>Rt.modifiedStartLineNumber?h.kg("diff.clipboard.copyChangedLinesContent.label","Copy changed lines"):h.kg("diff.clipboard.copyChangedLinesContent.single.label","Copy changed line"),void 0,!0,()=>Bt(this,void 0,void 0,function*(){const Ni=new Pe.Q(Rt.originalStartLineNumber,1,Rt.originalEndLineNumber+1,1),qi=Rt.originalModel.getValueInRange(Ni);yield this._clipboardService.writeText(qi)})));let ai=0,Ei;Rt.originalEndLineNumber>Rt.modifiedStartLineNumber&&(Ei=new L.rc("diff.clipboard.copyDeletedLineContent",Jt?h.kg("diff.clipboard.copyDeletedLineContent.label","Copy deleted line ({0})",Rt.originalStartLineNumber):h.kg("diff.clipboard.copyChangedLineContent.label","Copy changed line ({0})",Rt.originalStartLineNumber),void 0,!0,()=>Bt(this,void 0,void 0,function*(){const Ni=Rt.originalModel.getLineContent(Rt.originalStartLineNumber+ai);if(Ni===""){const qi=Rt.originalModel.getEndOfLineSequence();yield this._clipboardService.writeText(qi===0?` `:`\r `)}else yield this._clipboardService.writeText(Ni)})),di.push(Ei)),Ye.getOption(83)||di.push(new L.rc("diff.inline.revertChange",h.kg("diff.inline.revertChange.label","Revert this change"),void 0,!0,()=>Bt(this,void 0,void 0,function*(){const Ni=new Pe.Q(Rt.originalStartLineNumber,1,Rt.originalEndLineNumber,Rt.originalModel.getLineMaxColumn(Rt.originalEndLineNumber)),qi=Rt.originalModel.getValueInRange(Ni);if(Rt.modifiedEndLineNumber===0){const Pi=Ye.getModel().getLineMaxColumn(Rt.modifiedStartLineNumber);Ye.executeEdits("diffEditor",[{range:new Pe.Q(Rt.modifiedStartLineNumber,Pi,Rt.modifiedStartLineNumber,Pi),text:fi+qi}])}else{const Pi=Ye.getModel().getLineMaxColumn(Rt.modifiedEndLineNumber);Ye.executeEdits("diffEditor",[{range:new Pe.Q(Rt.modifiedStartLineNumber,1,Rt.modifiedEndLineNumber,Pi),text:qi}])}})));const Ai=(Ni,qi)=>{this._contextMenuService.showContextMenu({getAnchor:()=>({x:Ni,y:qi}),getActions:()=>(Ei&&(Ei.label=Jt?h.kg("diff.clipboard.copyDeletedLineContent.label","Copy deleted line ({0})",Rt.originalStartLineNumber+ai):h.kg("diff.clipboard.copyChangedLineContent.label","Copy changed line ({0})",Rt.originalStartLineNumber+ai)),di),autoSelectFirstItem:!0})};this._register(te.b2(this._diffActions,"mousedown",Ni=>{const{top:qi,height:Pi}=te.BK(this._diffActions),gn=Math.floor(ri/3);Ni.preventDefault(),Ai(Ni.posx,qi+Pi+gn)})),this._register(Ye.onMouseMove(Ni=>{Ni.target.type===8||Ni.target.type===5?Ni.target.detail.viewZoneId===this._viewZoneId?(this.visibility=!0,ai=this._updateLightBulbPosition(this._marginDomNode,Ni.event.browserEvent.y,ri)):this.visibility=!1:this.visibility=!1})),this._register(Ye.onMouseDown(Ni=>{Ni.event.rightButton&&(Ni.target.type===8||Ni.target.type===5)&&Ni.target.detail.viewZoneId===this._viewZoneId&&(Ni.event.preventDefault(),ai=this._updateLightBulbPosition(this._marginDomNode,Ni.event.browserEvent.y,ri),Ai(Ni.event.posx,Ni.event.posy+ri))}))}get visibility(){return this._visibility}set visibility(xe){this._visibility!==xe&&(this._visibility=xe,xe?this._diffActions.style.visibility="visible":this._diffActions.style.visibility="hidden")}_updateLightBulbPosition(xe,Ce,Ye){const{top:Rt}=te.BK(xe),Vt=Ce-Rt,Gt=Math.floor(Vt/Ye),ri=Gt*Ye;if(this._diffActions.style.top=`${ri}px`,this.diff.viewLineCounts){let fi=0;for(let di=0;di<this.diff.viewLineCounts.length;di++)if(fi+=this.diff.viewLineCounts[di],Gt<fi)return di}return Gt}}var pt=f(3338),bt=f(94327),zt=f(44023),ii=f(5711),vi=f(68107),Ze=f(89563),_t=function(ni,xe,Ce,Ye){var Rt=arguments.length,Vt=Rt<3?xe:Ye===null?Ye=Object.getOwnPropertyDescriptor(xe,Ce):Ye,Gt;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Vt=Reflect.decorate(ni,xe,Ce,Ye);else for(var ri=ni.length-1;ri>=0;ri--)(Gt=ni[ri])&&(Vt=(Rt<3?Gt(Vt):Rt>3?Gt(xe,Ce,Vt):Gt(xe,Ce))||Vt);return Rt>3&&Vt&&Object.defineProperty(xe,Ce,Vt),Vt},At=function(ni,xe){return function(Ce,Ye){xe(Ce,Ye,ni)}},ei;class oi{constructor(xe,Ce){this._contextMenuService=xe,this._clipboardService=Ce,this._zones=[],this._inlineDiffMargins=[],this._zonesMap={},this._decorations=[]}getForeignViewZones(xe){return xe.filter(Ce=>!this._zonesMap[String(Ce.id)])}clean(xe){this._zones.length>0&&xe.changeViewZones(Ce=>{for(const Ye of this._zones)Ce.removeZone(Ye)}),this._zones=[],this._zonesMap={},xe.changeDecorations(Ce=>{this._decorations=Ce.deltaDecorations(this._decorations,[])})}apply(xe,Ce,Ye,Rt){const Vt=Rt?_.D.capture(xe):null;xe.changeViewZones(Gt=>{var ri;for(const fi of this._zones)Gt.removeZone(fi);for(const fi of this._inlineDiffMargins)fi.dispose();this._zones=[],this._zonesMap={},this._inlineDiffMargins=[];for(let fi=0,di=Ye.zones.length;fi<di;fi++){const Jt=Ye.zones[fi];Jt.suppressMouseDown=!0;const ai=Gt.addZone(Jt);this._zones.push(ai),this._zonesMap[String(ai)]=!0,Ye.zones[fi].diff&&Jt.marginDomNode&&(Jt.suppressMouseDown=!1,((ri=Ye.zones[fi].diff)===null||ri===void 0?void 0:ri.originalModel.getValueLength())!==0&&this._inlineDiffMargins.push(new jt(ai,Jt.marginDomNode,xe,Ye.zones[fi].diff,this._contextMenuService,this._clipboardService)))}}),Vt?.restore(xe),xe.changeDecorations(Gt=>{this._decorations=Gt.deltaDecorations(this._decorations,Ye.decorations)}),Ce?.setZones(Ye.overviewZones)}}let Li=0;const zi=(0,fe.pU)("diff-insert",ge.W6.add,h.kg("diffInsertIcon","Line decoration for inserts in the diff editor.")),Di=(0,fe.pU)("diff-remove",ge.W6.remove,h.kg("diffRemoveIcon","Line decoration for removals in the diff editor.")),Te=(ei=window.trustedTypes)===null||ei===void 0?void 0:ei.createPolicy("diffEditorWidget",{createHTML:ni=>ni});let ki=class Io extends z.jG{constructor(xe,Ce,Ye,Rt,Vt,Gt,ri,fi,di,Jt,ai,Ei){super(),this._editorProgressService=Ei,this._onDidDispose=this._register(new J.vl),this.onDidDispose=this._onDidDispose.event,this._onDidUpdateDiff=this._register(new J.vl),this.onDidUpdateDiff=this._onDidUpdateDiff.event,this._onDidContentSizeChange=this._register(new J.vl),this._lastOriginalWarning=null,this._lastModifiedWarning=null,this._editorWorkerService=Vt,this._codeEditorService=fi,this._contextKeyService=this._register(Gt.createScoped(xe)),this._instantiationService=ri.createChild(new Ie.a([ee.fN,this._contextKeyService])),this._contextKeyService.createKey("isInDiffEditor",!0),this._themeService=di,this._notificationService=Jt,this._id=++Li,this._state=0,this._updatingDiffProgress=null,this._domElement=xe,Ce=Ce||{},this._options=bn(Ce,{enableSplitViewResizing:!0,renderSideBySide:!0,renderMarginRevertIcon:!0,maxComputationTime:5e3,maxFileSize:50,ignoreTrimWhitespace:!0,renderIndicators:!0,originalEditable:!1,diffCodeLens:!1,renderOverviewRuler:!0,diffWordWrap:"inherit"}),typeof Ce.isInEmbeddedEditor<"u"?this._contextKeyService.createKey("isInEmbeddedDiffEditor",Ce.isInEmbeddedEditor):this._contextKeyService.createKey("isInEmbeddedDiffEditor",!1),this._updateDecorationsRunner=this._register(new Q.uC(()=>this._updateDecorations(),0)),this._containerDomElement=document.createElement("div"),this._containerDomElement.className=Io._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide),this._containerDomElement.style.position="relative",this._containerDomElement.style.height="100%",this._domElement.appendChild(this._containerDomElement),this._overviewViewportDomElement=(0,x.Z)(document.createElement("div")),this._overviewViewportDomElement.setClassName("diffViewport"),this._overviewViewportDomElement.setPosition("absolute"),this._overviewDomElement=document.createElement("div"),this._overviewDomElement.className="diffOverview",this._overviewDomElement.style.position="absolute",this._overviewDomElement.appendChild(this._overviewViewportDomElement.domNode),this._register(te.b2(this._overviewDomElement,te.Bx.POINTER_DOWN,Ai=>{this._modifiedEditor.delegateVerticalScrollbarPointerDown(Ai)})),this._options.renderOverviewRuler&&this._containerDomElement.appendChild(this._overviewDomElement),this._originalDomNode=document.createElement("div"),this._originalDomNode.className="editor original",this._originalDomNode.style.position="absolute",this._originalDomNode.style.height="100%",this._containerDomElement.appendChild(this._originalDomNode),this._modifiedDomNode=document.createElement("div"),this._modifiedDomNode.className="editor modified",this._modifiedDomNode.style.position="absolute",this._modifiedDomNode.style.height="100%",this._containerDomElement.appendChild(this._modifiedDomNode),this._beginUpdateDecorationsTimeout=-1,this._currentlyChangingViewZones=!1,this._diffComputationToken=0,this._originalEditorState=new oi(ai,Rt),this._modifiedEditorState=new oi(ai,Rt),this._isVisible=!0,this._isHandlingScrollEvent=!1,this._elementSizeObserver=this._register(new ii.u(this._containerDomElement,Ce.dimension)),this._register(this._elementSizeObserver.onDidChange(()=>this._onDidContainerSizeChanged())),Ce.automaticLayout&&this._elementSizeObserver.startObserving(),this._diffComputationResult=null,this._originalEditor=this._createLeftHandSideEditor(Ce,Ye.originalEditor||{}),this._modifiedEditor=this._createRightHandSideEditor(Ce,Ye.modifiedEditor||{}),this._originalOverviewRuler=null,this._modifiedOverviewRuler=null,this._reviewPane=ri.createInstance(lt,this),this._containerDomElement.appendChild(this._reviewPane.domNode.domNode),this._containerDomElement.appendChild(this._reviewPane.shadow.domNode),this._containerDomElement.appendChild(this._reviewPane.actionBarContainer.domNode),this._options.renderSideBySide?this._setStrategy(new Zt(this._createDataSource(),this._options.enableSplitViewResizing)):this._setStrategy(new Ki(this._createDataSource(),this._options.enableSplitViewResizing)),this._register(di.onDidColorThemeChange(Ai=>{this._strategy&&this._strategy.applyColors(Ai)&&this._updateDecorationsRunner.schedule(),this._containerDomElement.className=Io._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide)}));const wi=k.dS.getDiffEditorContributions();for(const Ai of wi)try{this._register(ri.createInstance(Ai.ctor,this))}catch(Ni){(0,bt.dz)(Ni)}this._codeEditorService.addDiffEditor(this)}_setState(xe){this._state!==xe&&(this._state=xe,this._updatingDiffProgress&&(this._updatingDiffProgress.done(),this._updatingDiffProgress=null),this._state===1&&(this._updatingDiffProgress=this._editorProgressService.show(!0,1e3)))}diffReviewNext(){this._reviewPane.next()}diffReviewPrev(){this._reviewPane.prev()}static _getClassName(xe,Ce){let Ye="monaco-diff-editor monaco-editor-background ";return Ce&&(Ye+="side-by-side "),Ye+=(0,pe.Pz)(xe.type),Ye}_disposeOverviewRulers(){this._originalOverviewRuler&&(this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode()),this._originalOverviewRuler.dispose(),this._originalOverviewRuler=null),this._modifiedOverviewRuler&&(this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode()),this._modifiedOverviewRuler.dispose(),this._modifiedOverviewRuler=null)}_createOverviewRulers(){this._options.renderOverviewRuler&&($.ok(!this._originalOverviewRuler&&!this._modifiedOverviewRuler),this._originalEditor.hasModel()&&(this._originalOverviewRuler=this._originalEditor.createOverviewRuler("original diffOverviewRuler"),this._overviewDomElement.appendChild(this._originalOverviewRuler.getDomNode())),this._modifiedEditor.hasModel()&&(this._modifiedOverviewRuler=this._modifiedEditor.createOverviewRuler("modified diffOverviewRuler"),this._overviewDomElement.appendChild(this._modifiedOverviewRuler.getDomNode())),this._layoutOverviewRulers())}_createLeftHandSideEditor(xe,Ce){const Ye=this._createInnerEditor(this._instantiationService,this._originalDomNode,this._adjustOptionsForLeftHandSide(xe),Ce);this._register(Ye.onDidScrollChange(Vt=>{this._isHandlingScrollEvent||!Vt.scrollTopChanged&&!Vt.scrollLeftChanged&&!Vt.scrollHeightChanged||(this._isHandlingScrollEvent=!0,this._modifiedEditor.setScrollPosition({scrollLeft:Vt.scrollLeft,scrollTop:Vt.scrollTop}),this._isHandlingScrollEvent=!1,this._layoutOverviewViewport())})),this._register(Ye.onDidChangeViewZones(()=>{this._onViewZonesChanged()})),this._register(Ye.onDidChangeConfiguration(Vt=>{Ye.getModel()&&(Vt.hasChanged(46)&&this._updateDecorationsRunner.schedule(),Vt.hasChanged(134)&&(this._updateDecorationsRunner.cancel(),this._updateDecorations()))})),this._register(Ye.onDidChangeHiddenAreas(()=>{this._updateDecorationsRunner.cancel(),this._updateDecorations()})),this._register(Ye.onDidChangeModelContent(()=>{this._isVisible&&this._beginUpdateDecorationsSoon()}));const Rt=this._contextKeyService.createKey("isInDiffLeftEditor",Ye.hasWidgetFocus());return this._register(Ye.onDidFocusEditorWidget(()=>Rt.set(!0))),this._register(Ye.onDidBlurEditorWidget(()=>Rt.set(!1))),this._register(Ye.onDidContentSizeChange(Vt=>{const Gt=this._originalEditor.getContentWidth()+this._modifiedEditor.getContentWidth()+Io.ONE_OVERVIEW_WIDTH,ri=Math.max(this._modifiedEditor.getContentHeight(),this._originalEditor.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:ri,contentWidth:Gt,contentHeightChanged:Vt.contentHeightChanged,contentWidthChanged:Vt.contentWidthChanged})})),Ye}_createRightHandSideEditor(xe,Ce){const Ye=this._createInnerEditor(this._instantiationService,this._modifiedDomNode,this._adjustOptionsForRightHandSide(xe),Ce);this._register(Ye.onDidScrollChange(Vt=>{this._isHandlingScrollEvent||!Vt.scrollTopChanged&&!Vt.scrollLeftChanged&&!Vt.scrollHeightChanged||(this._isHandlingScrollEvent=!0,this._originalEditor.setScrollPosition({scrollLeft:Vt.scrollLeft,scrollTop:Vt.scrollTop}),this._isHandlingScrollEvent=!1,this._layoutOverviewViewport())})),this._register(Ye.onDidChangeViewZones(()=>{this._onViewZonesChanged()})),this._register(Ye.onDidChangeConfiguration(Vt=>{Ye.getModel()&&(Vt.hasChanged(46)&&this._updateDecorationsRunner.schedule(),Vt.hasChanged(134)&&(this._updateDecorationsRunner.cancel(),this._updateDecorations()))})),this._register(Ye.onDidChangeHiddenAreas(()=>{this._updateDecorationsRunner.cancel(),this._updateDecorations()})),this._register(Ye.onDidChangeModelContent(()=>{this._isVisible&&this._beginUpdateDecorationsSoon()})),this._register(Ye.onDidChangeModelOptions(Vt=>{Vt.tabSize&&this._updateDecorationsRunner.schedule()}));const Rt=this._contextKeyService.createKey("isInDiffRightEditor",Ye.hasWidgetFocus());return this._register(Ye.onDidFocusEditorWidget(()=>Rt.set(!0))),this._register(Ye.onDidBlurEditorWidget(()=>Rt.set(!1))),this._register(Ye.onDidContentSizeChange(Vt=>{const Gt=this._originalEditor.getContentWidth()+this._modifiedEditor.getContentWidth()+Io.ONE_OVERVIEW_WIDTH,ri=Math.max(this._modifiedEditor.getContentHeight(),this._originalEditor.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:ri,contentWidth:Gt,contentHeightChanged:Vt.contentHeightChanged,contentWidthChanged:Vt.contentWidthChanged})})),this._register(Ye.onMouseDown(Vt=>{var Gt,ri;if(!Vt.event.rightButton&&Vt.target.position&&(!((Gt=Vt.target.element)===null||Gt===void 0)&&Gt.className.includes("arrow-revert-change"))){const fi=Vt.target.position.lineNumber,di=(ri=this._diffComputationResult)===null||ri===void 0?void 0:ri.changes.find(Jt=>Jt.modifiedStartLineNumber===fi-1||Jt.modifiedStartLineNumber===fi);di&&this.revertChange(di),Vt.event.stopPropagation(),this._updateDecorations();return}})),Ye}revertChange(xe){const Ce=this._modifiedEditor,Ye=this._originalEditor.getModel(),Rt=this._modifiedEditor.getModel();if(!Ye||!Rt||!Ce)return;const Vt=xe.originalEndLineNumber>0?new Pe.Q(xe.originalStartLineNumber,1,xe.originalEndLineNumber,Ye.getLineMaxColumn(xe.originalEndLineNumber)):null,Gt=Vt?Ye.getValueInRange(Vt):null,ri=xe.modifiedEndLineNumber>0?new Pe.Q(xe.modifiedStartLineNumber,1,xe.modifiedEndLineNumber,Rt.getLineMaxColumn(xe.modifiedEndLineNumber)):null,fi=Rt.getEOL();if(xe.originalEndLineNumber===0&&ri){let di=ri;xe.modifiedStartLineNumber>1?di=ri.setStartPosition(xe.modifiedStartLineNumber-1,Rt.getLineMaxColumn(xe.modifiedStartLineNumber-1)):xe.modifiedEndLineNumber<Rt.getLineCount()&&(di=ri.setEndPosition(xe.modifiedEndLineNumber+1,1)),Ce.executeEdits("diffEditor",[{range:di,text:""}])}else if(xe.modifiedEndLineNumber===0&&Gt!==null){const di=xe.modifiedStartLineNumber<Rt.getLineCount()?new B.y(xe.modifiedStartLineNumber+1,1):new B.y(xe.modifiedStartLineNumber,Rt.getLineMaxColumn(xe.modifiedStartLineNumber));Ce.executeEdits("diffEditor",[{range:Pe.Q.fromPositions(di,di),text:xe.modifiedStartLineNumber<Rt.getLineCount()?Gt+fi:fi+Gt}])}else ri&&Gt!==null&&Ce.executeEdits("diffEditor",[{range:ri,text:Gt}])}_createInnerEditor(xe,Ce,Ye,Rt){return xe.createInstance(C.x,Ce,Ye,Rt)}dispose(){this._codeEditorService.removeDiffEditor(this),this._beginUpdateDecorationsTimeout!==-1&&(window.clearTimeout(this._beginUpdateDecorationsTimeout),this._beginUpdateDecorationsTimeout=-1),this._cleanViewZonesAndDecorations(),this._originalOverviewRuler&&(this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode()),this._originalOverviewRuler.dispose()),this._modifiedOverviewRuler&&(this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode()),this._modifiedOverviewRuler.dispose()),this._overviewDomElement.removeChild(this._overviewViewportDomElement.domNode),this._options.renderOverviewRuler&&this._containerDomElement.removeChild(this._overviewDomElement),this._containerDomElement.removeChild(this._originalDomNode),this._originalEditor.dispose(),this._containerDomElement.removeChild(this._modifiedDomNode),this._modifiedEditor.dispose(),this._strategy.dispose(),this._containerDomElement.removeChild(this._reviewPane.domNode.domNode),this._containerDomElement.removeChild(this._reviewPane.shadow.domNode),this._containerDomElement.removeChild(this._reviewPane.actionBarContainer.domNode),this._reviewPane.dispose(),this._domElement.removeChild(this._containerDomElement),this._onDidDispose.fire(),super.dispose()}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return Re._.IDiffEditor}getLineChanges(){return this._diffComputationResult?this._diffComputationResult.changes:null}getOriginalEditor(){return this._originalEditor}getModifiedEditor(){return this._modifiedEditor}updateOptions(xe){const Ce=bn(xe,this._options),Ye=sn(this._options,Ce);this._options=Ce;const Rt=Ye.ignoreTrimWhitespace||Ye.renderIndicators||Ye.renderMarginRevertIcon,Vt=this._isVisible&&(Ye.maxComputationTime||Ye.maxFileSize);Rt?this._beginUpdateDecorations():Vt&&this._beginUpdateDecorationsSoon(),this._modifiedEditor.updateOptions(this._adjustOptionsForRightHandSide(xe)),this._originalEditor.updateOptions(this._adjustOptionsForLeftHandSide(xe)),this._strategy.setEnableSplitViewResizing(this._options.enableSplitViewResizing),Ye.renderSideBySide&&(this._options.renderSideBySide?this._setStrategy(new Zt(this._createDataSource(),this._options.enableSplitViewResizing)):this._setStrategy(new Ki(this._createDataSource(),this._options.enableSplitViewResizing)),this._containerDomElement.className=Io._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide)),Ye.renderOverviewRuler&&(this._options.renderOverviewRuler?this._containerDomElement.appendChild(this._overviewDomElement):this._containerDomElement.removeChild(this._overviewDomElement))}getModel(){return{original:this._originalEditor.getModel(),modified:this._modifiedEditor.getModel()}}setModel(xe){if(xe&&(!xe.original||!xe.modified))throw new Error(xe.original?"DiffEditorWidget.setModel: Modified model is null":"DiffEditorWidget.setModel: Original model is null");this._cleanViewZonesAndDecorations(),this._disposeOverviewRulers(),this._originalEditor.setModel(xe?xe.original:null),this._modifiedEditor.setModel(xe?xe.modified:null),this._updateDecorationsRunner.cancel(),xe&&(this._originalEditor.setScrollTop(0),this._modifiedEditor.setScrollTop(0)),this._diffComputationResult=null,this._diffComputationToken++,this._setState(0),xe&&(this._createOverviewRulers(),this._beginUpdateDecorations()),this._layoutOverviewViewport()}getContainerDomNode(){return this._domElement}getVisibleColumnFromPosition(xe){return this._modifiedEditor.getVisibleColumnFromPosition(xe)}getPosition(){return this._modifiedEditor.getPosition()}setPosition(xe,Ce="api"){this._modifiedEditor.setPosition(xe,Ce)}revealLine(xe,Ce=0){this._modifiedEditor.revealLine(xe,Ce)}revealLineInCenter(xe,Ce=0){this._modifiedEditor.revealLineInCenter(xe,Ce)}revealLineInCenterIfOutsideViewport(xe,Ce=0){this._modifiedEditor.revealLineInCenterIfOutsideViewport(xe,Ce)}revealLineNearTop(xe,Ce=0){this._modifiedEditor.revealLineNearTop(xe,Ce)}revealPosition(xe,Ce=0){this._modifiedEditor.revealPosition(xe,Ce)}revealPositionInCenter(xe,Ce=0){this._modifiedEditor.revealPositionInCenter(xe,Ce)}revealPositionInCenterIfOutsideViewport(xe,Ce=0){this._modifiedEditor.revealPositionInCenterIfOutsideViewport(xe,Ce)}revealPositionNearTop(xe,Ce=0){this._modifiedEditor.revealPositionNearTop(xe,Ce)}getSelection(){return this._modifiedEditor.getSelection()}getSelections(){return this._modifiedEditor.getSelections()}setSelection(xe,Ce="api"){this._modifiedEditor.setSelection(xe,Ce)}setSelections(xe,Ce="api"){this._modifiedEditor.setSelections(xe,Ce)}revealLines(xe,Ce,Ye=0){this._modifiedEditor.revealLines(xe,Ce,Ye)}revealLinesInCenter(xe,Ce,Ye=0){this._modifiedEditor.revealLinesInCenter(xe,Ce,Ye)}revealLinesInCenterIfOutsideViewport(xe,Ce,Ye=0){this._modifiedEditor.revealLinesInCenterIfOutsideViewport(xe,Ce,Ye)}revealLinesNearTop(xe,Ce,Ye=0){this._modifiedEditor.revealLinesNearTop(xe,Ce,Ye)}revealRange(xe,Ce=0,Ye=!1,Rt=!0){this._modifiedEditor.revealRange(xe,Ce,Ye,Rt)}revealRangeInCenter(xe,Ce=0){this._modifiedEditor.revealRangeInCenter(xe,Ce)}revealRangeInCenterIfOutsideViewport(xe,Ce=0){this._modifiedEditor.revealRangeInCenterIfOutsideViewport(xe,Ce)}revealRangeNearTop(xe,Ce=0){this._modifiedEditor.revealRangeNearTop(xe,Ce)}revealRangeNearTopIfOutsideViewport(xe,Ce=0){this._modifiedEditor.revealRangeNearTopIfOutsideViewport(xe,Ce)}revealRangeAtTop(xe,Ce=0){this._modifiedEditor.revealRangeAtTop(xe,Ce)}getSupportedActions(){return this._modifiedEditor.getSupportedActions()}saveViewState(){const xe=this._originalEditor.saveViewState(),Ce=this._modifiedEditor.saveViewState();return{original:xe,modified:Ce}}restoreViewState(xe){if(xe&&xe.original&&xe.modified){const Ce=xe;this._originalEditor.restoreViewState(Ce.original),this._modifiedEditor.restoreViewState(Ce.modified)}}layout(xe){this._elementSizeObserver.observe(xe)}focus(){this._modifiedEditor.focus()}hasTextFocus(){return this._originalEditor.hasTextFocus()||this._modifiedEditor.hasTextFocus()}trigger(xe,Ce,Ye){this._modifiedEditor.trigger(xe,Ce,Ye)}createDecorationsCollection(xe){return this._modifiedEditor.createDecorationsCollection(xe)}changeDecorations(xe){return this._modifiedEditor.changeDecorations(xe)}_onDidContainerSizeChanged(){this._doLayout()}_getReviewHeight(){return this._reviewPane.isVisible()?this._elementSizeObserver.getHeight():0}_layoutOverviewRulers(){if(!this._options.renderOverviewRuler||!this._originalOverviewRuler||!this._modifiedOverviewRuler)return;const xe=this._elementSizeObserver.getHeight(),Ce=this._getReviewHeight(),Ye=Io.ENTIRE_DIFF_OVERVIEW_WIDTH-2*Io.ONE_OVERVIEW_WIDTH;this._modifiedEditor.getLayoutInfo()&&(this._originalOverviewRuler.setLayout({top:0,width:Io.ONE_OVERVIEW_WIDTH,right:Ye+Io.ONE_OVERVIEW_WIDTH,height:xe-Ce}),this._modifiedOverviewRuler.setLayout({top:0,right:0,width:Io.ONE_OVERVIEW_WIDTH,height:xe-Ce}))}_onViewZonesChanged(){this._currentlyChangingViewZones||this._updateDecorationsRunner.schedule()}_beginUpdateDecorationsSoon(){this._beginUpdateDecorationsTimeout!==-1&&(window.clearTimeout(this._beginUpdateDecorationsTimeout),this._beginUpdateDecorationsTimeout=-1),this._beginUpdateDecorationsTimeout=window.setTimeout(()=>this._beginUpdateDecorations(),Io.UPDATE_DIFF_DECORATIONS_DELAY)}static _equals(xe,Ce){return!xe&&!Ce?!0:!xe||!Ce?!1:xe.toString()===Ce.toString()}_beginUpdateDecorations(){this._beginUpdateDecorationsTimeout=-1;const xe=this._originalEditor.getModel(),Ce=this._modifiedEditor.getModel();if(!xe||!Ce)return;this._diffComputationToken++;const Ye=this._diffComputationToken,Rt=this._options.maxFileSize*1024*1024,Vt=Gt=>{const ri=Gt.getValueLength();return Rt===0||ri<=Rt};if(!Vt(xe)||!Vt(Ce)){(!Io._equals(xe.uri,this._lastOriginalWarning)||!Io._equals(Ce.uri,this._lastModifiedWarning))&&(this._lastOriginalWarning=xe.uri,this._lastModifiedWarning=Ce.uri,this._notificationService.warn(h.kg("diff.tooLarge","Cannot compare files because one file is too large.")));return}this._setState(1),this._editorWorkerService.computeDiff(xe.uri,Ce.uri,this._options.ignoreTrimWhitespace,this._options.maxComputationTime).then(Gt=>{Ye===this._diffComputationToken&&xe===this._originalEditor.getModel()&&Ce===this._modifiedEditor.getModel()&&(this._setState(2),this._diffComputationResult=Gt,this._updateDecorationsRunner.schedule(),this._onDidUpdateDiff.fire())},Gt=>{Ye===this._diffComputationToken&&xe===this._originalEditor.getModel()&&Ce===this._modifiedEditor.getModel()&&(this._setState(2),this._diffComputationResult=null,this._updateDecorationsRunner.schedule())})}_cleanViewZonesAndDecorations(){this._originalEditorState.clean(this._originalEditor),this._modifiedEditorState.clean(this._modifiedEditor)}_updateDecorations(){if(!this._originalEditor.getModel()||!this._modifiedEditor.getModel())return;const xe=this._diffComputationResult?this._diffComputationResult.changes:[],Ce=this._originalEditorState.getForeignViewZones(this._originalEditor.getWhitespaces()),Ye=this._modifiedEditorState.getForeignViewZones(this._modifiedEditor.getWhitespaces()),Rt=this._strategy.getEditorsDiffDecorations(xe,this._options.ignoreTrimWhitespace,this._options.renderIndicators,this._options.renderMarginRevertIcon,Ce,Ye);try{this._currentlyChangingViewZones=!0,this._originalEditorState.apply(this._originalEditor,this._originalOverviewRuler,Rt.original,!1),this._modifiedEditorState.apply(this._modifiedEditor,this._modifiedOverviewRuler,Rt.modified,!0)}finally{this._currentlyChangingViewZones=!1}}_adjustOptionsForSubEditor(xe){const Ce=Object.assign({},xe);return Ce.inDiffEditor=!0,Ce.automaticLayout=!1,Ce.scrollbar=Object.assign({},Ce.scrollbar||{}),Ce.scrollbar.vertical="visible",Ce.folding=!1,Ce.codeLens=this._options.diffCodeLens,Ce.fixedOverflowWidgets=!0,Ce.minimap=Object.assign({},Ce.minimap||{}),Ce.minimap.enabled=!1,Ce}_adjustOptionsForLeftHandSide(xe){const Ce=this._adjustOptionsForSubEditor(xe);return this._options.renderSideBySide?Ce.wordWrapOverride1=this._options.diffWordWrap:(Ce.wordWrapOverride1="off",Ce.wordWrapOverride2="off"),xe.originalAriaLabel&&(Ce.ariaLabel=xe.originalAriaLabel),Ce.readOnly=!this._options.originalEditable,Ce.dropIntoEditor={enabled:!Ce.readOnly},Ce.extraEditorClassName="original-in-monaco-diff-editor",Object.assign(Object.assign({},Ce),{dimension:{height:0,width:0}})}_adjustOptionsForRightHandSide(xe){const Ce=this._adjustOptionsForSubEditor(xe);return xe.modifiedAriaLabel&&(Ce.ariaLabel=xe.modifiedAriaLabel),Ce.wordWrapOverride1=this._options.diffWordWrap,Ce.revealHorizontalRightPadding=j.qB.revealHorizontalRightPadding.defaultValue+Io.ENTIRE_DIFF_OVERVIEW_WIDTH,Ce.scrollbar.verticalHasArrows=!1,Ce.extraEditorClassName="modified-in-monaco-diff-editor",Object.assign(Object.assign({},Ce),{dimension:{height:0,width:0}})}doLayout(){this._elementSizeObserver.observe(),this._doLayout()}_doLayout(){const xe=this._elementSizeObserver.getWidth(),Ce=this._elementSizeObserver.getHeight(),Ye=this._getReviewHeight(),Rt=this._strategy.layout();this._originalDomNode.style.width=Rt+"px",this._originalDomNode.style.left="0px",this._modifiedDomNode.style.width=xe-Rt+"px",this._modifiedDomNode.style.left=Rt+"px",this._overviewDomElement.style.top="0px",this._overviewDomElement.style.height=Ce-Ye+"px",this._overviewDomElement.style.width=Io.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewDomElement.style.left=xe-Io.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewViewportDomElement.setWidth(Io.ENTIRE_DIFF_OVERVIEW_WIDTH),this._overviewViewportDomElement.setHeight(30),this._originalEditor.layout({width:Rt,height:Ce-Ye}),this._modifiedEditor.layout({width:xe-Rt-(this._options.renderOverviewRuler?Io.ENTIRE_DIFF_OVERVIEW_WIDTH:0),height:Ce-Ye}),(this._originalOverviewRuler||this._modifiedOverviewRuler)&&this._layoutOverviewRulers(),this._reviewPane.layout(Ce-Ye,xe,Ye),this._layoutOverviewViewport()}_layoutOverviewViewport(){const xe=this._computeOverviewViewport();xe?(this._overviewViewportDomElement.setTop(xe.top),this._overviewViewportDomElement.setHeight(xe.height)):(this._overviewViewportDomElement.setTop(0),this._overviewViewportDomElement.setHeight(0))}_computeOverviewViewport(){const xe=this._modifiedEditor.getLayoutInfo();if(!xe)return null;const Ce=this._modifiedEditor.getScrollTop(),Ye=this._modifiedEditor.getScrollHeight(),Rt=Math.max(0,xe.height),Vt=Math.max(0,Rt-2*0),Gt=Ye>0?Vt/Ye:0,ri=Math.max(0,Math.floor(xe.height*Gt)),fi=Math.floor(Ce*Gt);return{height:ri,top:fi}}_createDataSource(){return{getWidth:()=>this._elementSizeObserver.getWidth(),getHeight:()=>this._elementSizeObserver.getHeight()-this._getReviewHeight(),getOptions:()=>({renderOverviewRuler:this._options.renderOverviewRuler}),getContainerDomNode:()=>this._containerDomElement,relayoutEditors:()=>{this._doLayout()},getOriginalEditor:()=>this._originalEditor,getModifiedEditor:()=>this._modifiedEditor}}_setStrategy(xe){this._strategy&&this._strategy.dispose(),this._strategy=xe,xe.applyColors(this._themeService.getColorTheme()),this._diffComputationResult&&this._updateDecorations(),this._doLayout()}_getLineChangeAtOrBeforeLineNumber(xe,Ce){const Ye=this._diffComputationResult?this._diffComputationResult.changes:[];if(Ye.length===0||xe<Ce(Ye[0]))return null;let Rt=0,Vt=Ye.length-1;for(;Rt<Vt;){const Gt=Math.floor((Rt+Vt)/2),ri=Ce(Ye[Gt]),fi=Gt+1<=Vt?Ce(Ye[Gt+1]):1073741824;xe<ri?Vt=Gt-1:xe>=fi?Rt=Gt+1:(Rt=Gt,Vt=Gt)}return Ye[Rt]}_getEquivalentLineForOriginalLineNumber(xe){const Ce=this._getLineChangeAtOrBeforeLineNumber(xe,fi=>fi.originalStartLineNumber);if(!Ce)return xe;const Ye=Ce.originalStartLineNumber+(Ce.originalEndLineNumber>0?-1:0),Rt=Ce.modifiedStartLineNumber+(Ce.modifiedEndLineNumber>0?-1:0),Vt=Ce.originalEndLineNumber>0?Ce.originalEndLineNumber-Ce.originalStartLineNumber+1:0,Gt=Ce.modifiedEndLineNumber>0?Ce.modifiedEndLineNumber-Ce.modifiedStartLineNumber+1:0,ri=xe-Ye;return ri<=Vt?Rt+Math.min(ri,Gt):Rt+Gt-Vt+ri}_getEquivalentLineForModifiedLineNumber(xe){const Ce=this._getLineChangeAtOrBeforeLineNumber(xe,fi=>fi.modifiedStartLineNumber);if(!Ce)return xe;const Ye=Ce.originalStartLineNumber+(Ce.originalEndLineNumber>0?-1:0),Rt=Ce.modifiedStartLineNumber+(Ce.modifiedEndLineNumber>0?-1:0),Vt=Ce.originalEndLineNumber>0?Ce.originalEndLineNumber-Ce.originalStartLineNumber+1:0,Gt=Ce.modifiedEndLineNumber>0?Ce.modifiedEndLineNumber-Ce.modifiedStartLineNumber+1:0,ri=xe-Rt;return ri<=Gt?Ye+Math.min(ri,Vt):Ye+Vt-Gt+ri}getDiffLineInformationForOriginal(xe){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForOriginalLineNumber(xe)}:null}getDiffLineInformationForModified(xe){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForModifiedLineNumber(xe)}:null}};ki.ONE_OVERVIEW_WIDTH=15,ki.ENTIRE_DIFF_OVERVIEW_WIDTH=30,ki.UPDATE_DIFF_DECORATIONS_DELAY=200,ki=_t([At(3,pt.h),At(4,rt.w),At(5,ee.fN),At(6,xt._Y),At(7,y.T),At(8,pe.Gy),At(9,dt.Ot),At(10,ft.Z),At(11,zt.N8)],ki);class ze extends z.jG{constructor(xe){super(),this._dataSource=xe,this._insertColor=null,this._removeColor=null}applyColors(xe){const Ce=xe.getColor(ce.ld8)||(xe.getColor(ce.Gj6)||ce.EY1).transparent(2),Ye=xe.getColor(ce.$BZ)||(xe.getColor(ce.GNm)||ce.ZEf).transparent(2),Rt=!Ce.equals(this._insertColor)||!Ye.equals(this._removeColor);return this._insertColor=Ce,this._removeColor=Ye,Rt}getEditorsDiffDecorations(xe,Ce,Ye,Rt,Vt,Gt){Gt=Gt.sort((Jt,ai)=>Jt.afterLineNumber-ai.afterLineNumber),Vt=Vt.sort((Jt,ai)=>Jt.afterLineNumber-ai.afterLineNumber);const ri=this._getViewZones(xe,Vt,Gt,Ye),fi=this._getOriginalEditorDecorations(ri,xe,Ce,Ye),di=this._getModifiedEditorDecorations(ri,xe,Ce,Ye,Rt);return{original:{decorations:fi.decorations,overviewZones:fi.overviewZones,zones:ri.original},modified:{decorations:di.decorations,overviewZones:di.overviewZones,zones:ri.modified}}}}class we{constructor(xe){this._source=xe,this._index=-1,this.current=null,this.advance()}advance(){this._index++,this._index<this._source.length?this.current=this._source[this._index]:this.current=null}}class ct{constructor(xe,Ce,Ye,Rt,Vt){this._lineChanges=xe,this._originalForeignVZ=Ce,this._modifiedForeignVZ=Ye,this._originalEditor=Rt,this._modifiedEditor=Vt}static _getViewLineCount(xe,Ce,Ye){const Rt=xe.getModel(),Vt=xe._getViewModel();if(Rt&&Vt){const Gt=St(Rt,Vt,Ce,Ye);return Gt.endLineNumber-Gt.startLineNumber+1}return Ye-Ce+1}getViewZones(){const xe=this._originalEditor.getOption(61),Ce=this._modifiedEditor.getOption(61),Ye=this._originalEditor.getOption(134).wrappingColumn!==-1,Rt=this._modifiedEditor.getOption(134).wrappingColumn!==-1,Vt=Ye||Rt,Gt=this._originalEditor.getModel(),ri=this._originalEditor._getViewModel().coordinatesConverter,fi=this._modifiedEditor._getViewModel().coordinatesConverter,di={original:[],modified:[]};let Jt=0,ai=0,Ei=0,wi=0,Ai=0,Ni=0;const qi=(Bi,rn)=>Bi.afterLineNumber-rn.afterLineNumber,Pi=(Bi,rn)=>{if(rn.domNode===null&&Bi.length>0){const _i=Bi[Bi.length-1];if(_i.afterLineNumber===rn.afterLineNumber&&_i.domNode===null){_i.heightInLines+=rn.heightInLines;return}}Bi.push(rn)},gn=new we(this._modifiedForeignVZ),Gi=new we(this._originalForeignVZ);let Oi=1,Fi=1;for(let Bi=0,rn=this._lineChanges.length;Bi<=rn;Bi++){const _i=Bi<rn?this._lineChanges[Bi]:null;_i!==null?(Ei=_i.originalStartLineNumber+(_i.originalEndLineNumber>0?-1:0),wi=_i.modifiedStartLineNumber+(_i.modifiedEndLineNumber>0?-1:0),ai=_i.originalEndLineNumber>0?ct._getViewLineCount(this._originalEditor,_i.originalStartLineNumber,_i.originalEndLineNumber):0,Jt=_i.modifiedEndLineNumber>0?ct._getViewLineCount(this._modifiedEditor,_i.modifiedStartLineNumber,_i.modifiedEndLineNumber):0,Ai=Math.max(_i.originalStartLineNumber,_i.originalEndLineNumber),Ni=Math.max(_i.modifiedStartLineNumber,_i.modifiedEndLineNumber)):(Ei+=1e7+ai,wi+=1e7+Jt,Ai=Ei,Ni=wi);let jn=[],Wn=[];if(Vt){let $i;_i?_i.originalEndLineNumber>0?$i=_i.originalStartLineNumber-Oi:$i=_i.modifiedStartLineNumber-Fi:$i=Gt.getLineCount()-Oi+1;for(let Nn=0;Nn<$i;Nn++){const Jn=Oi+Nn,Ti=Fi+Nn,es=ri.getModelLineViewLineCount(Jn),xi=fi.getModelLineViewLineCount(Ti);es<xi?jn.push({afterLineNumber:Jn,heightInLines:xi-es,domNode:null,marginDomNode:null}):es>xi&&Wn.push({afterLineNumber:Ti,heightInLines:es-xi,domNode:null,marginDomNode:null})}_i&&(Oi=(_i.originalEndLineNumber>0?_i.originalEndLineNumber:_i.originalStartLineNumber)+1,Fi=(_i.modifiedEndLineNumber>0?_i.modifiedEndLineNumber:_i.modifiedStartLineNumber)+1)}for(;gn.current&&gn.current.afterLineNumber<=Ni;){let $i;gn.current.afterLineNumber<=wi?$i=Ei-wi+gn.current.afterLineNumber:$i=Ai;let Nn=null;_i&&_i.modifiedStartLineNumber<=gn.current.afterLineNumber&&gn.current.afterLineNumber<=_i.modifiedEndLineNumber&&(Nn=this._createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion()),jn.push({afterLineNumber:$i,heightInLines:gn.current.height/Ce,domNode:null,marginDomNode:Nn}),gn.advance()}for(;Gi.current&&Gi.current.afterLineNumber<=Ai;){let $i;Gi.current.afterLineNumber<=Ei?$i=wi-Ei+Gi.current.afterLineNumber:$i=Ni,Wn.push({afterLineNumber:$i,heightInLines:Gi.current.height/xe,domNode:null}),Gi.advance()}if(_i!==null&&Ct(_i)){const $i=this._produceOriginalFromDiff(_i,ai,Jt);$i&&jn.push($i)}if(_i!==null&&Qt(_i)){const $i=this._produceModifiedFromDiff(_i,ai,Jt);$i&&Wn.push($i)}let xn=0,Rn=0;for(jn=jn.sort(qi),Wn=Wn.sort(qi);xn<jn.length&&Rn<Wn.length;){const $i=jn[xn],Nn=Wn[Rn],Jn=$i.afterLineNumber-Ei,Ti=Nn.afterLineNumber-wi;Jn<Ti?(Pi(di.original,$i),xn++):Ti<Jn?(Pi(di.modified,Nn),Rn++):$i.shouldNotShrink?(Pi(di.original,$i),xn++):Nn.shouldNotShrink?(Pi(di.modified,Nn),Rn++):$i.heightInLines>=Nn.heightInLines?($i.heightInLines-=Nn.heightInLines,Rn++):(Nn.heightInLines-=$i.heightInLines,xn++)}for(;xn<jn.length;)Pi(di.original,jn[xn]),xn++;for(;Rn<Wn.length;)Pi(di.modified,Wn[Rn]),Rn++}return{original:ct._ensureDomNodes(di.original),modified:ct._ensureDomNodes(di.modified)}}static _ensureDomNodes(xe){return xe.map(Ce=>(Ce.domNode||(Ce.domNode=Yi()),Ce))}}function Oe(ni,xe,Ce,Ye,Rt){return{range:new Pe.Q(ni,xe,Ce,Ye),options:Rt}}const ut={arrowRevertChange:et.kI.register({description:"diff-editor-arrow-revert-change",glyphMarginClassName:"arrow-revert-change "+pe.L0.asClassName(ge.W6.arrowRight)}),charDelete:et.kI.register({description:"diff-editor-char-delete",className:"char-delete"}),charDeleteWholeLine:et.kI.register({description:"diff-editor-char-delete-whole-line",className:"char-delete",isWholeLine:!0}),charInsert:et.kI.register({description:"diff-editor-char-insert",className:"char-insert"}),charInsertWholeLine:et.kI.register({description:"diff-editor-char-insert-whole-line",className:"char-insert",isWholeLine:!0}),lineInsert:et.kI.register({description:"diff-editor-line-insert",className:"line-insert",marginClassName:"gutter-insert",isWholeLine:!0}),lineInsertWithSign:et.kI.register({description:"diff-editor-line-insert-with-sign",className:"line-insert",linesDecorationsClassName:"insert-sign "+pe.L0.asClassName(zi),marginClassName:"gutter-insert",isWholeLine:!0}),lineDelete:et.kI.register({description:"diff-editor-line-delete",className:"line-delete",marginClassName:"gutter-delete",isWholeLine:!0}),lineDeleteWithSign:et.kI.register({description:"diff-editor-line-delete-with-sign",className:"line-delete",linesDecorationsClassName:"delete-sign "+pe.L0.asClassName(Di),marginClassName:"gutter-delete",isWholeLine:!0}),lineDeleteMargin:et.kI.register({description:"diff-editor-line-delete-margin",marginClassName:"gutter-delete"})};class Zt extends ze{constructor(xe,Ce){super(xe),this._disableSash=Ce===!1,this._sashRatio=null,this._sashPosition=null,this._startSashPosition=null,this._sash=this._register(new ie.m(this._dataSource.getContainerDomNode(),this,{orientation:0})),this._disableSash&&(this._sash.state=0),this._sash.onDidStart(()=>this._onSashDragStart()),this._sash.onDidChange(Ye=>this._onSashDrag(Ye)),this._sash.onDidEnd(()=>this._onSashDragEnd()),this._sash.onDidReset(()=>this._onSashReset())}setEnableSplitViewResizing(xe){const Ce=xe===!1;this._disableSash!==Ce&&(this._disableSash=Ce,this._sash.state=this._disableSash?0:3)}layout(xe=this._sashRatio){const Ye=this._dataSource.getWidth()-(this._dataSource.getOptions().renderOverviewRuler?ki.ENTIRE_DIFF_OVERVIEW_WIDTH:0);let Rt=Math.floor((xe||.5)*Ye);const Vt=Math.floor(.5*Ye);return Rt=this._disableSash?Vt:Rt||Vt,Ye>Zt.MINIMUM_EDITOR_WIDTH*2?(Rt<Zt.MINIMUM_EDITOR_WIDTH&&(Rt=Zt.MINIMUM_EDITOR_WIDTH),Rt>Ye-Zt.MINIMUM_EDITOR_WIDTH&&(Rt=Ye-Zt.MINIMUM_EDITOR_WIDTH)):Rt=Vt,this._sashPosition!==Rt&&(this._sashPosition=Rt),this._sash.layout(),this._sashPosition}_onSashDragStart(){this._startSashPosition=this._sashPosition}_onSashDrag(xe){const Ye=this._dataSource.getWidth()-(this._dataSource.getOptions().renderOverviewRuler?ki.ENTIRE_DIFF_OVERVIEW_WIDTH:0),Rt=this.layout((this._startSashPosition+(xe.currentX-xe.startX))/Ye);this._sashRatio=Rt/Ye,this._dataSource.relayoutEditors()}_onSashDragEnd(){this._sash.layout()}_onSashReset(){this._sashRatio=.5,this._dataSource.relayoutEditors(),this._sash.layout()}getVerticalSashTop(xe){return 0}getVerticalSashLeft(xe){return this._sashPosition}getVerticalSashHeight(xe){return this._dataSource.getHeight()}_getViewZones(xe,Ce,Ye){const Rt=this._dataSource.getOriginalEditor(),Vt=this._dataSource.getModifiedEditor();return new Ci(xe,Ce,Ye,Rt,Vt).getViewZones()}_getOriginalEditorDecorations(xe,Ce,Ye,Rt){const Vt=this._dataSource.getOriginalEditor(),Gt=String(this._removeColor),ri={decorations:[],overviewZones:[]},fi=Vt.getModel(),di=Vt._getViewModel();for(const Jt of Ce)if(Qt(Jt)){ri.decorations.push({range:new Pe.Q(Jt.originalStartLineNumber,1,Jt.originalEndLineNumber,1073741824),options:Rt?ut.lineDeleteWithSign:ut.lineDelete}),(!Ct(Jt)||!Jt.charChanges)&&ri.decorations.push(Oe(Jt.originalStartLineNumber,1,Jt.originalEndLineNumber,1073741824,ut.charDeleteWholeLine));const ai=St(fi,di,Jt.originalStartLineNumber,Jt.originalEndLineNumber);if(ri.overviewZones.push(new Lt.iE(ai.startLineNumber,ai.endLineNumber,0,Gt)),Jt.charChanges){for(const Ei of Jt.charChanges)if(at(Ei))if(Ye)for(let wi=Ei.originalStartLineNumber;wi<=Ei.originalEndLineNumber;wi++){let Ai,Ni;wi===Ei.originalStartLineNumber?Ai=Ei.originalStartColumn:Ai=fi.getLineFirstNonWhitespaceColumn(wi),wi===Ei.originalEndLineNumber?Ni=Ei.originalEndColumn:Ni=fi.getLineLastNonWhitespaceColumn(wi),ri.decorations.push(Oe(wi,Ai,wi,Ni,ut.charDelete))}else ri.decorations.push(Oe(Ei.originalStartLineNumber,Ei.originalStartColumn,Ei.originalEndLineNumber,Ei.originalEndColumn,ut.charDelete))}}return ri}_getModifiedEditorDecorations(xe,Ce,Ye,Rt,Vt){const Gt=this._dataSource.getModifiedEditor(),ri=String(this._insertColor),fi={decorations:[],overviewZones:[]},di=Gt.getModel(),Jt=Gt._getViewModel();for(const ai of Ce){if(Vt)if(ai.modifiedEndLineNumber>0)fi.decorations.push({range:new Pe.Q(ai.modifiedStartLineNumber,1,ai.modifiedStartLineNumber,1),options:ut.arrowRevertChange});else{const Ei=xe.modified.find(wi=>wi.afterLineNumber===ai.modifiedStartLineNumber);Ei&&(Ei.marginDomNode=bi())}if(Ct(ai)){fi.decorations.push({range:new Pe.Q(ai.modifiedStartLineNumber,1,ai.modifiedEndLineNumber,1073741824),options:Rt?ut.lineInsertWithSign:ut.lineInsert}),(!Qt(ai)||!ai.charChanges)&&fi.decorations.push(Oe(ai.modifiedStartLineNumber,1,ai.modifiedEndLineNumber,1073741824,ut.charInsertWholeLine));const Ei=St(di,Jt,ai.modifiedStartLineNumber,ai.modifiedEndLineNumber);if(fi.overviewZones.push(new Lt.iE(Ei.startLineNumber,Ei.endLineNumber,0,ri)),ai.charChanges){for(const wi of ai.charChanges)if(Ot(wi))if(Ye)for(let Ai=wi.modifiedStartLineNumber;Ai<=wi.modifiedEndLineNumber;Ai++){let Ni,qi;Ai===wi.modifiedStartLineNumber?Ni=wi.modifiedStartColumn:Ni=di.getLineFirstNonWhitespaceColumn(Ai),Ai===wi.modifiedEndLineNumber?qi=wi.modifiedEndColumn:qi=di.getLineLastNonWhitespaceColumn(Ai),fi.decorations.push(Oe(Ai,Ni,Ai,qi,ut.charInsert))}else fi.decorations.push(Oe(wi.modifiedStartLineNumber,wi.modifiedStartColumn,wi.modifiedEndLineNumber,wi.modifiedEndColumn,ut.charInsert))}}}return fi}}Zt.MINIMUM_EDITOR_WIDTH=100;class Ci extends ct{constructor(xe,Ce,Ye,Rt,Vt){super(xe,Ce,Ye,Rt,Vt)}_createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion(){return null}_produceOriginalFromDiff(xe,Ce,Ye){return Ye>Ce?{afterLineNumber:Math.max(xe.originalStartLineNumber,xe.originalEndLineNumber),heightInLines:Ye-Ce,domNode:null}:null}_produceModifiedFromDiff(xe,Ce,Ye){return Ce>Ye?{afterLineNumber:Math.max(xe.modifiedStartLineNumber,xe.modifiedEndLineNumber),heightInLines:Ce-Ye,domNode:null}:null}}class Ki extends ze{constructor(xe,Ce){super(xe),this._decorationsLeft=xe.getOriginalEditor().getLayoutInfo().decorationsLeft,this._register(xe.getOriginalEditor().onDidLayoutChange(Ye=>{this._decorationsLeft!==Ye.decorationsLeft&&(this._decorationsLeft=Ye.decorationsLeft,xe.relayoutEditors())}))}setEnableSplitViewResizing(xe){}_getViewZones(xe,Ce,Ye,Rt){const Vt=this._dataSource.getOriginalEditor(),Gt=this._dataSource.getModifiedEditor();return new Ln(xe,Ce,Ye,Vt,Gt,Rt).getViewZones()}_getOriginalEditorDecorations(xe,Ce,Ye,Rt){const Vt=String(this._removeColor),Gt={decorations:[],overviewZones:[]},ri=this._dataSource.getOriginalEditor(),fi=ri.getModel(),di=ri._getViewModel();let Jt=0;for(const ai of Ce)if(Qt(ai)){for(Gt.decorations.push({range:new Pe.Q(ai.originalStartLineNumber,1,ai.originalEndLineNumber,1073741824),options:ut.lineDeleteMargin});Jt<xe.modified.length;){const Ai=xe.modified[Jt];if(Ai.diff&&Ai.diff.originalStartLineNumber>=ai.originalStartLineNumber)break;Jt++}let Ei=0;if(Jt<xe.modified.length){const Ai=xe.modified[Jt];Ai.diff&&Ai.diff.originalStartLineNumber===ai.originalStartLineNumber&&Ai.diff.originalEndLineNumber===ai.originalEndLineNumber&&Ai.diff.modifiedStartLineNumber===ai.modifiedStartLineNumber&&Ai.diff.modifiedEndLineNumber===ai.modifiedEndLineNumber&&(Ei=Ai.heightInLines)}const wi=St(fi,di,ai.originalStartLineNumber,ai.originalEndLineNumber);Gt.overviewZones.push(new Lt.iE(wi.startLineNumber,wi.endLineNumber,Ei,Vt))}return Gt}_getModifiedEditorDecorations(xe,Ce,Ye,Rt,Vt){const Gt=this._dataSource.getModifiedEditor(),ri=String(this._insertColor),fi={decorations:[],overviewZones:[]},di=Gt.getModel(),Jt=Gt._getViewModel();for(const ai of Ce)if(Ct(ai)){fi.decorations.push({range:new Pe.Q(ai.modifiedStartLineNumber,1,ai.modifiedEndLineNumber,1073741824),options:Rt?ut.lineInsertWithSign:ut.lineInsert});const Ei=St(di,Jt,ai.modifiedStartLineNumber,ai.modifiedEndLineNumber);if(fi.overviewZones.push(new Lt.iE(Ei.startLineNumber,Ei.endLineNumber,0,ri)),ai.charChanges){for(const wi of ai.charChanges)if(Ot(wi))if(Ye)for(let Ai=wi.modifiedStartLineNumber;Ai<=wi.modifiedEndLineNumber;Ai++){let Ni,qi;Ai===wi.modifiedStartLineNumber?Ni=wi.modifiedStartColumn:Ni=di.getLineFirstNonWhitespaceColumn(Ai),Ai===wi.modifiedEndLineNumber?qi=wi.modifiedEndColumn:qi=di.getLineLastNonWhitespaceColumn(Ai),fi.decorations.push(Oe(Ai,Ni,Ai,qi,ut.charInsert))}else fi.decorations.push(Oe(wi.modifiedStartLineNumber,wi.modifiedStartColumn,wi.modifiedEndLineNumber,wi.modifiedEndColumn,ut.charInsert))}else fi.decorations.push(Oe(ai.modifiedStartLineNumber,1,ai.modifiedEndLineNumber,1073741824,ut.charInsertWholeLine))}return fi}layout(){return Math.max(5,this._decorationsLeft)}}class Ln extends ct{constructor(xe,Ce,Ye,Rt,Vt,Gt){super(xe,Ce,Ye,Rt,Vt),this._originalModel=Rt.getModel(),this._renderIndicators=Gt,this._pendingLineChange=[],this._pendingViewZones=[],this._lineBreaksComputer=this._modifiedEditor._getViewModel().createLineBreaksComputer()}getViewZones(){const xe=super.getViewZones();return this._finalize(xe),xe}_createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion(){const xe=document.createElement("div");return xe.className="inline-added-margin-view-zone",xe}_produceOriginalFromDiff(xe,Ce,Ye){const Rt=document.createElement("div");return Rt.className="inline-added-margin-view-zone",{afterLineNumber:Math.max(xe.originalStartLineNumber,xe.originalEndLineNumber),heightInLines:Ye,domNode:document.createElement("div"),marginDomNode:Rt}}_produceModifiedFromDiff(xe,Ce,Ye){const Rt=document.createElement("div");Rt.className=`view-lines line-delete ${vi.S}`;const Vt=document.createElement("div");Vt.className="inline-deleted-margin-view-zone";const Gt={shouldNotShrink:!0,afterLineNumber:xe.modifiedEndLineNumber===0?xe.modifiedStartLineNumber:xe.modifiedStartLineNumber-1,heightInLines:Ce,minWidthInPx:0,domNode:Rt,marginDomNode:Vt,diff:{originalStartLineNumber:xe.originalStartLineNumber,originalEndLineNumber:xe.originalEndLineNumber,modifiedStartLineNumber:xe.modifiedStartLineNumber,modifiedEndLineNumber:xe.modifiedEndLineNumber,originalModel:this._originalModel,viewLineCounts:null}};for(let ri=xe.originalStartLineNumber;ri<=xe.originalEndLineNumber;ri++)this._lineBreaksComputer.addRequest(this._originalModel.getLineContent(ri),null,null);return this._pendingLineChange.push(xe),this._pendingViewZones.push(Gt),Gt}_finalize(xe){const Ce=this._modifiedEditor.getOptions(),Ye=this._modifiedEditor.getModel().getOptions().tabSize,Rt=Ce.get(46),Vt=Ce.get(29),Gt=Rt.typicalHalfwidthCharacterWidth,ri=Ce.get(95),fi=this._originalModel.mightContainNonBasicASCII(),di=this._originalModel.mightContainRTL(),Jt=Ce.get(61),Ei=Ce.get(133).decorationsWidth,wi=Ce.get(107),Ai=Ce.get(90),Ni=Ce.get(85),qi=Ce.get(47),Pi=this._lineBreaksComputer.finalize();let gn=0;for(let Gi=0;Gi<this._pendingLineChange.length;Gi++){const Oi=this._pendingLineChange[Gi],Fi=this._pendingViewZones[Gi],Bi=Fi.domNode;(0,S.M)(Bi,Rt);const rn=Fi.marginDomNode;(0,S.M)(rn,Rt);const _i=[];if(Oi.charChanges)for(const Ti of Oi.charChanges)at(Ti)&&_i.push(new Y.kI(new Pe.Q(Ti.originalStartLineNumber,Ti.originalStartColumn,Ti.originalEndLineNumber,Ti.originalEndColumn),"char-delete",0));const jn=_i.length>0,Wn=(0,Ue.Du)(1e4);let xn=0,Rn=0,$i=null;for(let Ti=Oi.originalStartLineNumber;Ti<=Oi.originalEndLineNumber;Ti++){const es=Ti-Oi.originalStartLineNumber,xi=this._originalModel.tokenization.getLineTokens(Ti),os=xi.getLineContent(),Zi=Pi[gn++],cn=Dt.d.filter(_i,Ti,1,os.length+1);if(Zi){let Wi=0;for(const Gn of Zi.breakOffsets){const ws=xi.sliceAndInflate(Wi,Gn,0),fn=os.substring(Wi,Gn);xn=Math.max(xn,this._renderOriginalLine(Rn++,fn,ws,Dt.d.extractWrapped(cn,Wi,Gn),jn,fi,di,Rt,Vt,Jt,Ei,wi,Ai,Ni,qi,Ye,Wn,rn)),Wi=Gn}for($i||($i=[]);$i.length<es;)$i[$i.length]=1;$i[es]=Zi.breakOffsets.length,Fi.heightInLines+=Zi.breakOffsets.length-1;const vn=document.createElement("div");vn.className="gutter-delete",xe.original.push({afterLineNumber:Ti,afterColumn:0,heightInLines:Zi.breakOffsets.length-1,domNode:Yi(),marginDomNode:vn})}else xn=Math.max(xn,this._renderOriginalLine(Rn++,os,xi,cn,jn,fi,di,Rt,Vt,Jt,Ei,wi,Ai,Ni,qi,Ye,Wn,rn))}xn+=ri;const Nn=Wn.build(),Jn=Te?Te.createHTML(Nn):Nn;if(Bi.innerHTML=Jn,Fi.minWidthInPx=xn*Gt,$i){const Ti=Oi.originalEndLineNumber-Oi.originalStartLineNumber;for(;$i.length<=Ti;)$i[$i.length]=1}Fi.diff.viewLineCounts=$i}xe.original.sort((Gi,Oi)=>Gi.afterLineNumber-Oi.afterLineNumber)}_renderOriginalLine(xe,Ce,Ye,Rt,Vt,Gt,ri,fi,di,Jt,ai,Ei,wi,Ai,Ni,qi,Pi,gn){Pi.appendASCIIString('<div class="view-line'),Vt||Pi.appendASCIIString(" char-delete"),Pi.appendASCIIString('" style="top:'),Pi.appendASCIIString(String(xe*Jt)),Pi.appendASCIIString('px;width:1000000px;">');const Gi=Y.qL.isBasicASCII(Ce,Gt),Oi=Y.qL.containsRTL(Ce,Gi,ri),Fi=(0,H.UW)(new H.zL(fi.isMonospace&&!di,fi.canUseHalfwidthRightwardsArrow,Ce,!1,Gi,Oi,0,Ye,Rt,qi,0,fi.spaceWidth,fi.middotWidth,fi.wsmiddotWidth,Ei,wi,Ai,Ni!==j.Bc.OFF,null),Pi);if(Pi.appendASCIIString("</div>"),this._renderIndicators){const Bi=document.createElement("div");Bi.className=`delete-sign ${pe.L0.asClassName(Di)}`,Bi.setAttribute("style",`position:absolute;top:${xe*Jt}px;width:${ai}px;height:${Jt}px;right:0;`),gn.appendChild(Bi)}return Fi.characterMapping.getHorizontalOffset(Fi.characterMapping.length)}}function nt(ni,xe){return(0,j.O4)(ni,xe,["off","on","inherit"])}function Ct(ni){return ni.modifiedEndLineNumber>0}function Qt(ni){return ni.originalEndLineNumber>0}function Ot(ni){return ni.modifiedStartLineNumber===ni.modifiedEndLineNumber?ni.modifiedEndColumn-ni.modifiedStartColumn>0:ni.modifiedEndLineNumber-ni.modifiedStartLineNumber>0}function at(ni){return ni.originalStartLineNumber===ni.originalEndLineNumber?ni.originalEndColumn-ni.originalStartColumn>0:ni.originalEndLineNumber-ni.originalStartLineNumber>0}function Yi(){const ni=document.createElement("div");return ni.className="diagonal-fill",ni}function bi(){const ni=document.createElement("div");return ni.className="arrow-revert-change "+pe.L0.asClassName(ge.W6.arrowRight),te.$("div",{},ni)}function St(ni,xe,Ce,Ye){const Rt=ni.getLineCount();return Ce=Math.min(Rt,Math.max(1,Ce)),Ye=Math.min(Rt,Math.max(1,Ye)),xe.coordinatesConverter.convertModelRangeToViewRange(new Pe.Q(Ce,ni.getLineMinColumn(Ce),Ye,ni.getLineMaxColumn(Ye)))}function bn(ni,xe){return{enableSplitViewResizing:(0,j.zM)(ni.enableSplitViewResizing,xe.enableSplitViewResizing),renderSideBySide:(0,j.zM)(ni.renderSideBySide,xe.renderSideBySide),renderMarginRevertIcon:(0,j.zM)(ni.renderMarginRevertIcon,xe.renderMarginRevertIcon),maxComputationTime:(0,j.wA)(ni.maxComputationTime,xe.maxComputationTime,0,1073741824),maxFileSize:(0,j.wA)(ni.maxFileSize,xe.maxFileSize,0,1073741824),ignoreTrimWhitespace:(0,j.zM)(ni.ignoreTrimWhitespace,xe.ignoreTrimWhitespace),renderIndicators:(0,j.zM)(ni.renderIndicators,xe.renderIndicators),originalEditable:(0,j.zM)(ni.originalEditable,xe.originalEditable),diffCodeLens:(0,j.zM)(ni.diffCodeLens,xe.diffCodeLens),renderOverviewRuler:(0,j.zM)(ni.renderOverviewRuler,xe.renderOverviewRuler),diffWordWrap:nt(ni.diffWordWrap,xe.diffWordWrap)}}function sn(ni,xe){return{enableSplitViewResizing:ni.enableSplitViewResizing!==xe.enableSplitViewResizing,renderSideBySide:ni.renderSideBySide!==xe.renderSideBySide,renderMarginRevertIcon:ni.renderMarginRevertIcon!==xe.renderMarginRevertIcon,maxComputationTime:ni.maxComputationTime!==xe.maxComputationTime,maxFileSize:ni.maxFileSize!==xe.maxFileSize,ignoreTrimWhitespace:ni.ignoreTrimWhitespace!==xe.ignoreTrimWhitespace,renderIndicators:ni.renderIndicators!==xe.renderIndicators,originalEditable:ni.originalEditable!==xe.originalEditable,diffCodeLens:ni.diffCodeLens!==xe.diffCodeLens,renderOverviewRuler:ni.renderOverviewRuler!==xe.renderOverviewRuler,diffWordWrap:ni.diffWordWrap!==xe.diffWordWrap}}(0,pe.zy)((ni,xe)=>{const Ce=ni.getColor(ce.Gj6);Ce&&xe.addRule(`.monaco-editor .char-insert, .monaco-diff-editor .char-insert { background-color: ${Ce}; }`);const Ye=ni.getColor(ce.w3w)||Ce;Ye&&xe.addRule(`.monaco-editor .line-insert, .monaco-diff-editor .line-insert { background-color: ${Ye}; }`);const Rt=ni.getColor(ce.NXK)||Ye;Rt&&(xe.addRule(`.monaco-editor .inline-added-margin-view-zone { background-color: ${Rt}; }`),xe.addRule(`.monaco-editor .gutter-insert, .monaco-diff-editor .gutter-insert { background-color: ${Rt}; }`));const Vt=ni.getColor(ce.GNm);Vt&&xe.addRule(`.monaco-editor .char-delete, .monaco-diff-editor .char-delete { background-color: ${Vt}; }`);const Gt=ni.getColor(ce.MHP)||Vt;Gt&&xe.addRule(`.monaco-editor .line-delete, .monaco-diff-editor .line-delete { background-color: ${Gt}; }`);const ri=ni.getColor(ce.$Qy)||Gt;ri&&(xe.addRule(`.monaco-editor .inline-deleted-margin-view-zone { background-color: ${ri}; }`),xe.addRule(`.monaco-editor .gutter-delete, .monaco-diff-editor .gutter-delete { background-color: ${ri}; }`));const fi=ni.getColor(ce.YZM);fi&&xe.addRule(`.monaco-editor .line-insert, .monaco-editor .char-insert { border: 1px ${(0,Ze.Bb)(ni.type)?"dashed":"solid"} ${fi}; }`);const di=ni.getColor(ce.qaw);di&&xe.addRule(`.monaco-editor .line-delete, .monaco-editor .char-delete { border: 1px ${(0,Ze.Bb)(ni.type)?"dashed":"solid"} ${di}; }`);const Jt=ni.getColor(ce.bXl);Jt&&xe.addRule(`.monaco-diff-editor.side-by-side .editor.modified { box-shadow: -6px 0 5px -5px ${Jt}; }`);const ai=ni.getColor(ce.w3C);ai&&xe.addRule(`.monaco-diff-editor.side-by-side .editor.modified { border-left: 1px solid ${ai}; }`);const Ei=ni.getColor(ce.gnV);Ei&&xe.addRule(` .monaco-diff-editor .diffViewport { background: ${Ei}; } `);const wi=ni.getColor(ce.cI_);wi&&xe.addRule(` .monaco-diff-editor .diffViewport:hover { background: ${wi}; } `);const Ai=ni.getColor(ce.mhZ);Ai&&xe.addRule(` .monaco-diff-editor .diffViewport:active { background: ${Ai}; } `);const Ni=ni.getColor(ce.WmU);xe.addRule(` .monaco-editor .diagonal-fill { background-image: linear-gradient( -45deg, ${Ni} 12.5%, #0000 12.5%, #0000 50%, ${Ni} 50%, ${Ni} 62.5%, #0000 62.5%, #0000 100% ); background-size: 8px 8px; } `)})},16878:(Tt,Fe,f)=>{f.d(Fe,{b:()=>Q});var I=f(87110),h=f(2106),te=f(10998),$=f(71386),x=f(28061);const ie={followsCaret:!0,ignoreCharChanges:!0,alwaysRevealFirst:!0};class Q extends te.jG{constructor(z,S={}){super(),this._onDidUpdate=this._register(new h.vl),this._editor=z,this._options=$.co(S,ie,!1),this.disposed=!1,this.nextIdx=-1,this.ranges=[],this.ignoreSelectionChange=!1,this.revealFirst=!!this._options.alwaysRevealFirst,this._register(this._editor.onDidDispose(()=>this.dispose())),this._register(this._editor.onDidUpdateDiff(()=>this._onDiffUpdated())),this._options.followsCaret&&this._register(this._editor.getModifiedEditor().onDidChangeCursorPosition(_=>{this.ignoreSelectionChange||(this.nextIdx=-1)})),this._options.alwaysRevealFirst&&this._register(this._editor.getModifiedEditor().onDidChangeModel(_=>{this.revealFirst=!0})),this._init()}_init(){this._editor.getLineChanges()}_onDiffUpdated(){this._init(),this._compute(this._editor.getLineChanges()),this.revealFirst&&this._editor.getLineChanges()!==null&&(this.revealFirst=!1,this.nextIdx=-1,this.next(1))}_compute(z){this.ranges=[],z&&z.forEach(S=>{!this._options.ignoreCharChanges&&S.charChanges?S.charChanges.forEach(_=>{this.ranges.push({rhs:!0,range:new x.Q(_.modifiedStartLineNumber,_.modifiedStartColumn,_.modifiedEndLineNumber,_.modifiedEndColumn)})}):S.modifiedEndLineNumber===0?this.ranges.push({rhs:!0,range:new x.Q(S.modifiedStartLineNumber,1,S.modifiedStartLineNumber+1,1)}):this.ranges.push({rhs:!0,range:new x.Q(S.modifiedStartLineNumber,1,S.modifiedEndLineNumber+1,1)})}),this.ranges.sort((S,_)=>x.Q.compareRangesUsingStarts(S.range,_.range)),this._onDidUpdate.fire(this)}_initIdx(z){let S=!1;const _=this._editor.getPosition();if(!_){this.nextIdx=0;return}for(let y=0,C=this.ranges.length;y<C&&!S;y++){const d=this.ranges[y].range;_.isBeforeOrEqual(d.getStartPosition())&&(this.nextIdx=y+(z?0:-1),S=!0)}S||(this.nextIdx=z?0:this.ranges.length-1),this.nextIdx<0&&(this.nextIdx=this.ranges.length-1)}_move(z,S){if(I.ok(!this.disposed,"Illegal State - diff navigator has been disposed"),!this.canNavigate())return;this.nextIdx===-1?this._initIdx(z):z?(this.nextIdx+=1,this.nextIdx>=this.ranges.length&&(this.nextIdx=0)):(this.nextIdx-=1,this.nextIdx<0&&(this.nextIdx=this.ranges.length-1));const _=this.ranges[this.nextIdx];this.ignoreSelectionChange=!0;try{const y=_.range.getStartPosition();this._editor.setPosition(y),this._editor.revealRangeInCenter(_.range,S)}finally{this.ignoreSelectionChange=!1}}canNavigate(){return this.ranges&&this.ranges.length>0}next(z=0){this._move(!0,z)}previous(z=0){this._move(!1,z)}dispose(){super.dispose(),this.ranges=[],this.disposed=!0}}},66316:(Tt,Fe,f)=>{f.d(Fe,{iP:()=>x,iu:()=>h,q2:()=>$,tA:()=>te,ui:()=>ie});var I=f(93702);class h{constructor(J,z,S=!1){this._range=J,this._text=z,this.insertsAutoWhitespace=S}getEditOperations(J,z){z.addTrackedEditOperation(this._range,this._text)}computeCursorState(J,z){const _=z.getInverseEditOperations()[0].range;return I.L.fromPositions(_.getEndPosition())}}class te{constructor(J,z){this._range=J,this._text=z}getEditOperations(J,z){z.addTrackedEditOperation(this._range,this._text)}computeCursorState(J,z){const _=z.getInverseEditOperations()[0].range;return I.L.fromRange(_,0)}}class ${constructor(J,z,S=!1){this._range=J,this._text=z,this.insertsAutoWhitespace=S}getEditOperations(J,z){z.addTrackedEditOperation(this._range,this._text)}computeCursorState(J,z){const _=z.getInverseEditOperations()[0].range;return I.L.fromPositions(_.getStartPosition())}}class x{constructor(J,z,S,_,y=!1){this._range=J,this._text=z,this._columnDeltaOffset=_,this._lineNumberDeltaOffset=S,this.insertsAutoWhitespace=y}getEditOperations(J,z){z.addTrackedEditOperation(this._range,this._text)}computeCursorState(J,z){const _=z.getInverseEditOperations()[0].range;return I.L.fromPositions(_.getEndPosition().delta(this._lineNumberDeltaOffset,this._columnDeltaOffset))}}class ie{constructor(J,z,S,_=!1){this._range=J,this._text=z,this._initialSelection=S,this._forceMoveMarkers=_,this._selectionId=null}getEditOperations(J,z){z.addTrackedEditOperation(this._range,this._text,this._forceMoveMarkers),this._selectionId=z.trackSelection(this._initialSelection)}computeCursorState(J,z){return z.getTrackedSelection(this._selectionId)}}},41672:(Tt,Fe,f)=>{f.d(Fe,{Y:()=>_});var I=f(16844),h=f(62549),te=f(28061),$=f(93702),x=f(80794),ie=f(52394),Q=function(y,C,d,w){var D=arguments.length,L=D<3?C:w===null?w=Object.getOwnPropertyDescriptor(C,d):w,k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(y,C,d,w);else for(var j=y.length-1;j>=0;j--)(k=y[j])&&(L=(D<3?k(L):D>3?k(C,d,L):k(C,d))||L);return D>3&&L&&Object.defineProperty(C,d,L),L},J=function(y,C){return function(d,w){C(d,w,y)}};const z=Object.create(null);function S(y,C){if(C<=0)return"";z[y]||(z[y]=["",y]);const d=z[y];for(let w=d.length;w<=C;w++)d[w]=d[w-1]+y;return d[C]}let _=class S_{constructor(C,d,w){this._languageConfigurationService=w,this._opts=d,this._selection=C,this._selectionId=null,this._useLastEditRangeForCursorEndPosition=!1,this._selectionStartColumnStaysPut=!1}static unshiftIndent(C,d,w,D,L){const k=h.A.visibleColumnFromColumn(C,d,w);if(L){const j=S(" ",D),B=h.A.prevIndentTabStop(k,D)/D;return S(j,B)}else{const j=" ",B=h.A.prevRenderTabStop(k,w)/w;return S(j,B)}}static shiftIndent(C,d,w,D,L){const k=h.A.visibleColumnFromColumn(C,d,w);if(L){const j=S(" ",D),B=h.A.nextIndentTabStop(k,D)/D;return S(j,B)}else{const j=" ",B=h.A.nextRenderTabStop(k,w)/w;return S(j,B)}}_addEditOperation(C,d,w){this._useLastEditRangeForCursorEndPosition?C.addTrackedEditOperation(d,w):C.addEditOperation(d,w)}getEditOperations(C,d){const w=this._selection.startLineNumber;let D=this._selection.endLineNumber;this._selection.endColumn===1&&w!==D&&(D=D-1);const{tabSize:L,indentSize:k,insertSpaces:j}=this._opts,N=w===D;if(this._opts.useTabStops){this._selection.isEmpty()&&/^\s*$/.test(C.getLineContent(w))&&(this._useLastEditRangeForCursorEndPosition=!0);let B=0,T=0;for(let H=w;H<=D;H++,B=T){T=0;const Y=C.getLineContent(H);let ee=I.HG(Y);if(this._opts.isUnshift&&(Y.length===0||ee===0)||!N&&!this._opts.isUnshift&&Y.length===0)continue;if(ee===-1&&(ee=Y.length),H>1&&h.A.visibleColumnFromColumn(Y,ee+1,L)%k!==0&&C.tokenization.isCheapToTokenize(H-1)){const ge=(0,x.h)(this._opts.autoIndent,C,new te.Q(H-1,C.getLineMaxColumn(H-1),H-1,C.getLineMaxColumn(H-1)),this._languageConfigurationService);if(ge){if(T=B,ge.appendText)for(let fe=0,oe=ge.appendText.length;fe<oe&&T<k&&ge.appendText.charCodeAt(fe)===32;fe++)T++;ge.removeText&&(T=Math.max(0,T-ge.removeText));for(let fe=0;fe<T&&!(ee===0||Y.charCodeAt(ee-1)!==32);fe++)ee--}}if(this._opts.isUnshift&&ee===0)continue;let ce;this._opts.isUnshift?ce=S_.unshiftIndent(Y,ee+1,L,k,j):ce=S_.shiftIndent(Y,ee+1,L,k,j),this._addEditOperation(d,new te.Q(H,1,H,ee+1),ce),H===w&&!this._selection.isEmpty()&&(this._selectionStartColumnStaysPut=this._selection.startColumn<=ee+1)}}else{!this._opts.isUnshift&&this._selection.isEmpty()&&C.getLineLength(w)===0&&(this._useLastEditRangeForCursorEndPosition=!0);const B=j?S(" ",k):" ";for(let T=w;T<=D;T++){const H=C.getLineContent(T);let Y=I.HG(H);if(!(this._opts.isUnshift&&(H.length===0||Y===0))&&!(!N&&!this._opts.isUnshift&&H.length===0)&&(Y===-1&&(Y=H.length),!(this._opts.isUnshift&&Y===0)))if(this._opts.isUnshift){Y=Math.min(Y,k);for(let ee=0;ee<Y;ee++)if(H.charCodeAt(ee)===9){Y=ee+1;break}this._addEditOperation(d,new te.Q(T,1,T,Y+1),"")}else this._addEditOperation(d,new te.Q(T,1,T,1),B),T===w&&!this._selection.isEmpty()&&(this._selectionStartColumnStaysPut=this._selection.startColumn===1)}}this._selectionId=d.trackSelection(this._selection)}computeCursorState(C,d){if(this._useLastEditRangeForCursorEndPosition){const D=d.getInverseEditOperations()[0];return new $.L(D.range.endLineNumber,D.range.endColumn,D.range.endLineNumber,D.range.endColumn)}const w=d.getTrackedSelection(this._selectionId);if(this._selectionStartColumnStaysPut){const D=this._selection.startColumn;return w.startColumn<=D?w:w.getDirection()===0?new $.L(w.startLineNumber,D,w.endLineNumber,w.endColumn):new $.L(w.endLineNumber,w.endColumn,w.startLineNumber,D)}return w}};_=Q([J(2,ie.JZ)],_)},85003:(Tt,Fe,f)=>{f.d(Fe,{Gn:()=>y,JJ:()=>ie,vf:()=>_});var I=f(66476),h=f(12590),te=f(3765),$=f(27142),x=f(67167);const ie=Object.freeze({id:"editor",order:5,type:"object",title:te.kg("editorConfigurationTitle","Editor"),scope:5}),Q=Object.assign(Object.assign({},ie),{properties:{"editor.tabSize":{type:"number",default:h.R.tabSize,minimum:1,markdownDescription:te.kg("tabSize","The number of spaces a tab is equal to. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.")},"editor.insertSpaces":{type:"boolean",default:h.R.insertSpaces,markdownDescription:te.kg("insertSpaces","Insert spaces when pressing `Tab`. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.")},"editor.detectIndentation":{type:"boolean",default:h.R.detectIndentation,markdownDescription:te.kg("detectIndentation","Controls whether `#editor.tabSize#` and `#editor.insertSpaces#` will be automatically detected when a file is opened based on the file contents.")},"editor.trimAutoWhitespace":{type:"boolean",default:h.R.trimAutoWhitespace,description:te.kg("trimAutoWhitespace","Remove trailing auto inserted whitespace.")},"editor.largeFileOptimizations":{type:"boolean",default:h.R.largeFileOptimizations,description:te.kg("largeFileOptimizations","Special handling for large files to disable certain memory intensive features.")},"editor.wordBasedSuggestions":{type:"boolean",default:!0,description:te.kg("wordBasedSuggestions","Controls whether completions should be computed based on words in the document.")},"editor.wordBasedSuggestionsMode":{enum:["currentDocument","matchingDocuments","allDocuments"],default:"matchingDocuments",enumDescriptions:[te.kg("wordBasedSuggestionsMode.currentDocument","Only suggest words from the active document."),te.kg("wordBasedSuggestionsMode.matchingDocuments","Suggest words from all open documents of the same language."),te.kg("wordBasedSuggestionsMode.allDocuments","Suggest words from all open documents.")],description:te.kg("wordBasedSuggestionsMode","Controls from which documents word based completions are computed.")},"editor.semanticHighlighting.enabled":{enum:[!0,!1,"configuredByTheme"],enumDescriptions:[te.kg("semanticHighlighting.true","Semantic highlighting enabled for all color themes."),te.kg("semanticHighlighting.false","Semantic highlighting disabled for all color themes."),te.kg("semanticHighlighting.configuredByTheme","Semantic highlighting is configured by the current color theme's `semanticHighlighting` setting.")],default:"configuredByTheme",description:te.kg("semanticHighlighting.enabled","Controls whether the semanticHighlighting is shown for the languages that support it.")},"editor.stablePeek":{type:"boolean",default:!1,markdownDescription:te.kg("stablePeek","Keep peek editors open even when double clicking their content or when hitting `Escape`.")},"editor.maxTokenizationLineLength":{type:"integer",default:2e4,description:te.kg("maxTokenizationLineLength","Lines above this length will not be tokenized for performance reasons")},"editor.language.brackets":{type:["array","null"],default:null,description:te.kg("schema.brackets","Defines the bracket symbols that increase or decrease the indentation."),items:{type:"array",items:[{type:"string",description:te.kg("schema.openBracket","The opening bracket character or string sequence.")},{type:"string",description:te.kg("schema.closeBracket","The closing bracket character or string sequence.")}]}},"editor.language.colorizedBracketPairs":{type:["array","null"],default:null,description:te.kg("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:te.kg("schema.openBracket","The opening bracket character or string sequence.")},{type:"string",description:te.kg("schema.closeBracket","The closing bracket character or string sequence.")}]}},"diffEditor.maxComputationTime":{type:"number",default:5e3,description:te.kg("maxComputationTime","Timeout in milliseconds after which diff computation is cancelled. Use 0 for no timeout.")},"diffEditor.maxFileSize":{type:"number",default:50,description:te.kg("maxFileSize","Maximum file size in MB for which to compute diffs. Use 0 for no limit.")},"diffEditor.renderSideBySide":{type:"boolean",default:!0,description:te.kg("sideBySide","Controls whether the diff editor shows the diff side by side or inline.")},"diffEditor.renderMarginRevertIcon":{type:"boolean",default:!0,description:te.kg("renderMarginRevertIcon","When enabled, the diff editor shows arrows in its glyph margin to revert changes.")},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:!0,description:te.kg("ignoreTrimWhitespace","When enabled, the diff editor ignores changes in leading or trailing whitespace.")},"diffEditor.renderIndicators":{type:"boolean",default:!0,description:te.kg("renderIndicators","Controls whether the diff editor shows +/- indicators for added/removed changes.")},"diffEditor.codeLens":{type:"boolean",default:!1,description:te.kg("codeLens","Controls whether the editor shows CodeLens.")},"diffEditor.wordWrap":{type:"string",enum:["off","on","inherit"],default:"inherit",markdownEnumDescriptions:[te.kg("wordWrap.off","Lines will never wrap."),te.kg("wordWrap.on","Lines will wrap at the viewport width."),te.kg("wordWrap.inherit","Lines will wrap according to the `#editor.wordWrap#` setting.")]}}});function J(d){return typeof d.type<"u"||typeof d.anyOf<"u"}for(const d of I.BE){const w=d.schema;if(typeof w<"u")if(J(w))Q.properties[`editor.${d.name}`]=w;else for(const D in w)Object.hasOwnProperty.call(w,D)&&(Q.properties[D]=w[D])}let z=null;function S(){return z===null&&(z=Object.create(null),Object.keys(Q.properties).forEach(d=>{z[d]=!0})),z}function _(d){return S()[`editor.${d}`]||!1}function y(d){return S()[`diffEditor.${d}`]||!1}x.O.as($.Fd.Configuration).registerConfiguration(Q)},66476:(Tt,Fe,f)=>{f.d(Fe,{$C:()=>Dt,BE:()=>ki,Bc:()=>se,O4:()=>B,Of:()=>Bt,XR:()=>ft,hZ:()=>_,jU:()=>Te,lw:()=>J,m9:()=>ge,n0:()=>z,qB:()=>we,wA:()=>L,xZ:()=>O,xq:()=>Q,zM:()=>w});var I=f(3765),h=f(63339),te=f(18782),$=f(13338),x=f(71386),ie=f(12590);const Q=8;class J{constructor(Oe){this._values=Oe}hasChanged(Oe){return this._values[Oe]}}class z{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}}class S{constructor(Oe,ut,Zt,Ci){this.id=Oe,this.name=ut,this.defaultValue=Zt,this.schema=Ci}applyUpdate(Oe,ut){return y(Oe,ut)}compute(Oe,ut,Zt){return Zt}}class _{constructor(Oe,ut){this.newValue=Oe,this.didChange=ut}}function y(ct,Oe){if(typeof ct!="object"||typeof Oe!="object"||!ct||!Oe)return new _(Oe,ct!==Oe);if(Array.isArray(ct)||Array.isArray(Oe)){const Zt=Array.isArray(ct)&&Array.isArray(Oe)&&$.aI(ct,Oe);return new _(Oe,!Zt)}let ut=!1;for(const Zt in Oe)if(Oe.hasOwnProperty(Zt)){const Ci=y(ct[Zt],Oe[Zt]);Ci.didChange&&(ct[Zt]=Ci.newValue,ut=!0)}return new _(ct,ut)}class C{constructor(Oe){this.schema=void 0,this.id=Oe,this.name="_never_",this.defaultValue=void 0}applyUpdate(Oe,ut){return y(Oe,ut)}validate(Oe){return this.defaultValue}}class d{constructor(Oe,ut,Zt,Ci){this.id=Oe,this.name=ut,this.defaultValue=Zt,this.schema=Ci}applyUpdate(Oe,ut){return y(Oe,ut)}validate(Oe){return typeof Oe>"u"?this.defaultValue:Oe}compute(Oe,ut,Zt){return Zt}}function w(ct,Oe){return typeof ct>"u"?Oe:ct==="false"?!1:!!ct}class D extends d{constructor(Oe,ut,Zt,Ci=void 0){typeof Ci<"u"&&(Ci.type="boolean",Ci.default=Zt),super(Oe,ut,Zt,Ci)}validate(Oe){return w(Oe,this.defaultValue)}}function L(ct,Oe,ut,Zt){if(typeof ct>"u")return Oe;let Ci=parseInt(ct,10);return isNaN(Ci)?Oe:(Ci=Math.max(ut,Ci),Ci=Math.min(Zt,Ci),Ci|0)}class k extends d{constructor(Oe,ut,Zt,Ci,Ki,Ln=void 0){typeof Ln<"u"&&(Ln.type="integer",Ln.default=Zt,Ln.minimum=Ci,Ln.maximum=Ki),super(Oe,ut,Zt,Ln),this.minimum=Ci,this.maximum=Ki}static clampedInt(Oe,ut,Zt,Ci){return L(Oe,ut,Zt,Ci)}validate(Oe){return k.clampedInt(Oe,this.defaultValue,this.minimum,this.maximum)}}class j extends d{constructor(Oe,ut,Zt,Ci,Ki){typeof Ki<"u"&&(Ki.type="number",Ki.default=Zt),super(Oe,ut,Zt,Ki),this.validationFn=Ci}static clamp(Oe,ut,Zt){return Oe<ut?ut:Oe>Zt?Zt:Oe}static float(Oe,ut){if(typeof Oe=="number")return Oe;if(typeof Oe>"u")return ut;const Zt=parseFloat(Oe);return isNaN(Zt)?ut:Zt}validate(Oe){return this.validationFn(j.float(Oe,this.defaultValue))}}class N extends d{static string(Oe,ut){return typeof Oe!="string"?ut:Oe}constructor(Oe,ut,Zt,Ci=void 0){typeof Ci<"u"&&(Ci.type="string",Ci.default=Zt),super(Oe,ut,Zt,Ci)}validate(Oe){return N.string(Oe,this.defaultValue)}}function B(ct,Oe,ut){return typeof ct!="string"||ut.indexOf(ct)===-1?Oe:ct}class T extends d{constructor(Oe,ut,Zt,Ci,Ki=void 0){typeof Ki<"u"&&(Ki.type="string",Ki.enum=Ci,Ki.default=Zt),super(Oe,ut,Zt,Ki),this._allowedValues=Ci}validate(Oe){return B(Oe,this.defaultValue,this._allowedValues)}}class H extends S{constructor(Oe,ut,Zt,Ci,Ki,Ln,nt=void 0){typeof nt<"u"&&(nt.type="string",nt.enum=Ki,nt.default=Ci),super(Oe,ut,Zt,nt),this._allowedValues=Ki,this._convert=Ln}validate(Oe){return typeof Oe!="string"?this.defaultValue:this._allowedValues.indexOf(Oe)===-1?this.defaultValue:this._convert(Oe)}}function Y(ct){switch(ct){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}class ee extends S{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[I.kg("accessibilitySupport.auto","The editor will use platform APIs to detect when a Screen Reader is attached."),I.kg("accessibilitySupport.on","The editor will be permanently optimized for usage with a Screen Reader. Word wrapping will be disabled."),I.kg("accessibilitySupport.off","The editor will never be optimized for usage with a Screen Reader.")],default:"auto",description:I.kg("accessibilitySupport","Controls whether the editor should run in a mode where it is optimized for screen readers. Setting to on will disable word wrapping.")})}validate(Oe){switch(Oe){case"auto":return 0;case"off":return 1;case"on":return 2}return this.defaultValue}compute(Oe,ut,Zt){return Zt===0?Oe.accessibilitySupport:Zt}}class ce extends S{constructor(){const Oe={insertSpace:!0,ignoreEmptyLines:!0};super(19,"comments",Oe,{"editor.comments.insertSpace":{type:"boolean",default:Oe.insertSpace,description:I.kg("comments.insertSpace","Controls whether a space character is inserted when commenting.")},"editor.comments.ignoreEmptyLines":{type:"boolean",default:Oe.ignoreEmptyLines,description:I.kg("comments.ignoreEmptyLines","Controls if empty lines should be ignored with toggle, add or remove actions for line comments.")}})}validate(Oe){if(!Oe||typeof Oe!="object")return this.defaultValue;const ut=Oe;return{insertSpace:w(ut.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:w(ut.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}}function pe(ct){switch(ct){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}var ge;(function(ct){ct[ct.Line=1]="Line",ct[ct.Block=2]="Block",ct[ct.Underline=3]="Underline",ct[ct.LineThin=4]="LineThin",ct[ct.BlockOutline=5]="BlockOutline",ct[ct.UnderlineThin=6]="UnderlineThin"})(ge||(ge={}));function fe(ct){switch(ct){case"line":return ge.Line;case"block":return ge.Block;case"underline":return ge.Underline;case"line-thin":return ge.LineThin;case"block-outline":return ge.BlockOutline;case"underline-thin":return ge.UnderlineThin}}class oe extends C{constructor(){super(130)}compute(Oe,ut,Zt){const Ci=["monaco-editor"];return ut.get(35)&&Ci.push(ut.get(35)),Oe.extraEditorClassName&&Ci.push(Oe.extraEditorClassName),ut.get(68)==="default"?Ci.push("mouse-default"):ut.get(68)==="copy"&&Ci.push("mouse-copy"),ut.get(102)&&Ci.push("showUnused"),ut.get(128)&&Ci.push("showDeprecated"),Ci.join(" ")}}class Z extends D{constructor(){super(33,"emptySelectionClipboard",!0,{description:I.kg("emptySelectionClipboard","Controls whether copying without a selection copies the current line.")})}compute(Oe,ut,Zt){return Zt&&Oe.emptySelectionClipboard}}class le extends S{constructor(){const Oe={cursorMoveOnType:!0,seedSearchStringFromSelection:"always",autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(37,"find",Oe,{"editor.find.cursorMoveOnType":{type:"boolean",default:Oe.cursorMoveOnType,description:I.kg("find.cursorMoveOnType","Controls whether the cursor should jump to find matches while typing.")},"editor.find.seedSearchStringFromSelection":{type:"string",enum:["never","always","selection"],default:Oe.seedSearchStringFromSelection,enumDescriptions:[I.kg("editor.find.seedSearchStringFromSelection.never","Never seed search string from the editor selection."),I.kg("editor.find.seedSearchStringFromSelection.always","Always seed search string from the editor selection, including word at cursor position."),I.kg("editor.find.seedSearchStringFromSelection.selection","Only seed search string from the editor selection.")],description:I.kg("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:Oe.autoFindInSelection,enumDescriptions:[I.kg("editor.find.autoFindInSelection.never","Never turn on Find in Selection automatically (default)."),I.kg("editor.find.autoFindInSelection.always","Always turn on Find in Selection automatically."),I.kg("editor.find.autoFindInSelection.multiline","Turn on Find in Selection automatically when multiple lines of content are selected.")],description:I.kg("find.autoFindInSelection","Controls the condition for turning on Find in Selection automatically.")},"editor.find.globalFindClipboard":{type:"boolean",default:Oe.globalFindClipboard,description:I.kg("find.globalFindClipboard","Controls whether the Find Widget should read or modify the shared find clipboard on macOS."),included:h.zx},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:Oe.addExtraSpaceOnTop,description:I.kg("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:Oe.loop,description:I.kg("find.loop","Controls whether the search automatically restarts from the beginning (or the end) when no further matches can be found.")}})}validate(Oe){if(!Oe||typeof Oe!="object")return this.defaultValue;const ut=Oe;return{cursorMoveOnType:w(ut.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:typeof Oe.seedSearchStringFromSelection=="boolean"?Oe.seedSearchStringFromSelection?"always":"never":B(ut.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection,["never","always","selection"]),autoFindInSelection:typeof Oe.autoFindInSelection=="boolean"?Oe.autoFindInSelection?"always":"never":B(ut.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:w(ut.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:w(ut.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:w(ut.loop,this.defaultValue.loop)}}}class se extends S{constructor(){super(47,"fontLigatures",se.OFF,{anyOf:[{type:"boolean",description:I.kg("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:I.kg("fontFeatureSettings","Explicit 'font-feature-settings' CSS property. A boolean can be passed instead if one only needs to turn on/off ligatures.")}],description:I.kg("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(Oe){return typeof Oe>"u"?this.defaultValue:typeof Oe=="string"?Oe==="false"?se.OFF:Oe==="true"?se.ON:Oe:Oe?se.ON:se.OFF}}se.OFF='"liga" off, "calt" off',se.ON='"liga" on, "calt" on';class X extends C{constructor(){super(46)}compute(Oe,ut,Zt){return Oe.fontInfo}}class K extends d{constructor(){super(48,"fontSize",Te.fontSize,{type:"number",minimum:6,maximum:100,default:Te.fontSize,description:I.kg("fontSize","Controls the font size in pixels.")})}validate(Oe){const ut=j.float(Oe,this.defaultValue);return ut===0?Te.fontSize:j.clamp(ut,6,100)}compute(Oe,ut,Zt){return Oe.fontInfo.fontSize}}class he extends S{constructor(){super(49,"fontWeight",Te.fontWeight,{anyOf:[{type:"number",minimum:he.MINIMUM_VALUE,maximum:he.MAXIMUM_VALUE,errorMessage:I.kg("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:he.SUGGESTION_VALUES}],default:Te.fontWeight,description:I.kg("fontWeight",'Controls the font weight. Accepts "normal" and "bold" keywords or numbers between 1 and 1000.')})}validate(Oe){return Oe==="normal"||Oe==="bold"?Oe:String(k.clampedInt(Oe,Te.fontWeight,he.MINIMUM_VALUE,he.MAXIMUM_VALUE))}}he.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"],he.MINIMUM_VALUE=1,he.MAXIMUM_VALUE=1e3;class ve extends S{constructor(){const Oe={multiple:"peek",multipleDefinitions:"peek",multipleTypeDefinitions:"peek",multipleDeclarations:"peek",multipleImplementations:"peek",multipleReferences:"peek",alternativeDefinitionCommand:"editor.action.goToReferences",alternativeTypeDefinitionCommand:"editor.action.goToReferences",alternativeDeclarationCommand:"editor.action.goToReferences",alternativeImplementationCommand:"",alternativeReferenceCommand:""},ut={type:"string",enum:["peek","gotoAndPeek","goto"],default:Oe.multiple,enumDescriptions:[I.kg("editor.gotoLocation.multiple.peek","Show peek view of the results (default)"),I.kg("editor.gotoLocation.multiple.gotoAndPeek","Go to the primary result and show a peek view"),I.kg("editor.gotoLocation.multiple.goto","Go to the primary result and enable peek-less navigation to others")]},Zt=["","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(53,"gotoLocation",Oe,{"editor.gotoLocation.multiple":{deprecationMessage:I.kg("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":Object.assign({description:I.kg("editor.editor.gotoLocation.multipleDefinitions","Controls the behavior the 'Go to Definition'-command when multiple target locations exist.")},ut),"editor.gotoLocation.multipleTypeDefinitions":Object.assign({description:I.kg("editor.editor.gotoLocation.multipleTypeDefinitions","Controls the behavior the 'Go to Type Definition'-command when multiple target locations exist.")},ut),"editor.gotoLocation.multipleDeclarations":Object.assign({description:I.kg("editor.editor.gotoLocation.multipleDeclarations","Controls the behavior the 'Go to Declaration'-command when multiple target locations exist.")},ut),"editor.gotoLocation.multipleImplementations":Object.assign({description:I.kg("editor.editor.gotoLocation.multipleImplemenattions","Controls the behavior the 'Go to Implementations'-command when multiple target locations exist.")},ut),"editor.gotoLocation.multipleReferences":Object.assign({description:I.kg("editor.editor.gotoLocation.multipleReferences","Controls the behavior the 'Go to References'-command when multiple target locations exist.")},ut),"editor.gotoLocation.alternativeDefinitionCommand":{type:"string",default:Oe.alternativeDefinitionCommand,enum:Zt,description:I.kg("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:Oe.alternativeTypeDefinitionCommand,enum:Zt,description:I.kg("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:Oe.alternativeDeclarationCommand,enum:Zt,description:I.kg("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:Oe.alternativeImplementationCommand,enum:Zt,description:I.kg("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:Oe.alternativeReferenceCommand,enum:Zt,description:I.kg("alternativeReferenceCommand","Alternative command id that is being executed when the result of 'Go to Reference' is the current location.")}})}validate(Oe){var ut,Zt,Ci,Ki,Ln;if(!Oe||typeof Oe!="object")return this.defaultValue;const nt=Oe;return{multiple:B(nt.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:(ut=nt.multipleDefinitions)!==null&&ut!==void 0?ut:B(nt.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:(Zt=nt.multipleTypeDefinitions)!==null&&Zt!==void 0?Zt:B(nt.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:(Ci=nt.multipleDeclarations)!==null&&Ci!==void 0?Ci:B(nt.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:(Ki=nt.multipleImplementations)!==null&&Ki!==void 0?Ki:B(nt.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:(Ln=nt.multipleReferences)!==null&&Ln!==void 0?Ln:B(nt.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:N.string(nt.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:N.string(nt.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:N.string(nt.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:N.string(nt.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:N.string(nt.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand)}}}class Ee extends S{constructor(){const Oe={enabled:!0,delay:300,sticky:!0,above:!0};super(55,"hover",Oe,{"editor.hover.enabled":{type:"boolean",default:Oe.enabled,description:I.kg("hover.enabled","Controls whether the hover is shown.")},"editor.hover.delay":{type:"number",default:Oe.delay,minimum:0,maximum:1e4,description:I.kg("hover.delay","Controls the delay in milliseconds after which the hover is shown.")},"editor.hover.sticky":{type:"boolean",default:Oe.sticky,description:I.kg("hover.sticky","Controls whether the hover should remain visible when mouse is moved over it.")},"editor.hover.above":{type:"boolean",default:Oe.above,description:I.kg("hover.above","Prefer showing hovers above the line, if there's space.")}})}validate(Oe){if(!Oe||typeof Oe!="object")return this.defaultValue;const ut=Oe;return{enabled:w(ut.enabled,this.defaultValue.enabled),delay:k.clampedInt(ut.delay,this.defaultValue.delay,0,1e4),sticky:w(ut.sticky,this.defaultValue.sticky),above:w(ut.above,this.defaultValue.above)}}}class O extends C{constructor(){super(133)}compute(Oe,ut,Zt){return O.computeLayout(ut,{memory:Oe.memory,outerWidth:Oe.outerWidth,outerHeight:Oe.outerHeight,isDominatedByLongLines:Oe.isDominatedByLongLines,lineHeight:Oe.fontInfo.lineHeight,viewLineCount:Oe.viewLineCount,lineNumbersDigitCount:Oe.lineNumbersDigitCount,typicalHalfwidthCharacterWidth:Oe.fontInfo.typicalHalfwidthCharacterWidth,maxDigitWidth:Oe.fontInfo.maxDigitWidth,pixelRatio:Oe.pixelRatio})}static computeContainedMinimapLineCount(Oe){const ut=Oe.height/Oe.lineHeight,Zt=Oe.scrollBeyondLastLine?ut-1:0,Ci=(Oe.viewLineCount+Zt)/(Oe.pixelRatio*Oe.height),Ki=Math.floor(Oe.viewLineCount/Ci);return{typicalViewportLineCount:ut,extraLinesBeyondLastLine:Zt,desiredRatio:Ci,minimapLineCount:Ki}}static _computeMinimapLayout(Oe,ut){const Zt=Oe.outerWidth,Ci=Oe.outerHeight,Ki=Oe.pixelRatio;if(!Oe.minimap.enabled)return{renderMinimap:0,minimapLeft:0,minimapWidth:0,minimapHeightIsEditorHeight:!1,minimapIsSampling:!1,minimapScale:1,minimapLineHeight:1,minimapCanvasInnerWidth:0,minimapCanvasInnerHeight:Math.floor(Ki*Ci),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:Ci};const Ln=ut.stableMinimapLayoutInput,nt=Ln&&Oe.outerHeight===Ln.outerHeight&&Oe.lineHeight===Ln.lineHeight&&Oe.typicalHalfwidthCharacterWidth===Ln.typicalHalfwidthCharacterWidth&&Oe.pixelRatio===Ln.pixelRatio&&Oe.scrollBeyondLastLine===Ln.scrollBeyondLastLine&&Oe.minimap.enabled===Ln.minimap.enabled&&Oe.minimap.side===Ln.minimap.side&&Oe.minimap.size===Ln.minimap.size&&Oe.minimap.showSlider===Ln.minimap.showSlider&&Oe.minimap.renderCharacters===Ln.minimap.renderCharacters&&Oe.minimap.maxColumn===Ln.minimap.maxColumn&&Oe.minimap.scale===Ln.minimap.scale&&Oe.verticalScrollbarWidth===Ln.verticalScrollbarWidth&&Oe.isViewportWrapping===Ln.isViewportWrapping,Ct=Oe.lineHeight,Qt=Oe.typicalHalfwidthCharacterWidth,Ot=Oe.scrollBeyondLastLine,at=Oe.minimap.renderCharacters;let Yi=Ki>=2?Math.round(Oe.minimap.scale*2):Oe.minimap.scale;const bi=Oe.minimap.maxColumn,St=Oe.minimap.size,bn=Oe.minimap.side,sn=Oe.verticalScrollbarWidth,ni=Oe.viewLineCount,xe=Oe.remainingWidth,Ce=Oe.isViewportWrapping,Ye=at?2:3;let Rt=Math.floor(Ki*Ci);const Vt=Rt/Ki;let Gt=!1,ri=!1,fi=Ye*Yi,di=Yi/Ki,Jt=1;if(St==="fill"||St==="fit"){const{typicalViewportLineCount:Pi,extraLinesBeyondLastLine:gn,desiredRatio:Gi,minimapLineCount:Oi}=O.computeContainedMinimapLineCount({viewLineCount:ni,scrollBeyondLastLine:Ot,height:Ci,lineHeight:Ct,pixelRatio:Ki});if(ni/Oi>1)Gt=!0,ri=!0,Yi=1,fi=1,di=Yi/Ki;else{let Bi=!1,rn=Yi+1;if(St==="fit"){const _i=Math.ceil((ni+gn)*fi);Ce&&nt&&xe<=ut.stableFitRemainingWidth?(Bi=!0,rn=ut.stableFitMaxMinimapScale):Bi=_i>Rt}if(St==="fill"||Bi){Gt=!0;const _i=Yi;fi=Math.min(Ct*Ki,Math.max(1,Math.floor(1/Gi))),Ce&&nt&&xe<=ut.stableFitRemainingWidth&&(rn=ut.stableFitMaxMinimapScale),Yi=Math.min(rn,Math.max(1,Math.floor(fi/Ye))),Yi>_i&&(Jt=Math.min(2,Yi/_i)),di=Yi/Ki/Jt,Rt=Math.ceil(Math.max(Pi,ni+gn)*fi),Ce?(ut.stableMinimapLayoutInput=Oe,ut.stableFitRemainingWidth=xe,ut.stableFitMaxMinimapScale=Yi):(ut.stableMinimapLayoutInput=null,ut.stableFitRemainingWidth=0)}}}const ai=Math.floor(bi*di),Ei=Math.min(ai,Math.max(0,Math.floor((xe-sn-2)*di/(Qt+di)))+Q);let wi=Math.floor(Ki*Ei);const Ai=wi/Ki;wi=Math.floor(wi*Jt);const Ni=at?1:2,qi=bn==="left"?0:Zt-Ei-sn;return{renderMinimap:Ni,minimapLeft:qi,minimapWidth:Ei,minimapHeightIsEditorHeight:Gt,minimapIsSampling:ri,minimapScale:Yi,minimapLineHeight:fi,minimapCanvasInnerWidth:wi,minimapCanvasInnerHeight:Rt,minimapCanvasOuterWidth:Ai,minimapCanvasOuterHeight:Vt}}static computeLayout(Oe,ut){const Zt=ut.outerWidth|0,Ci=ut.outerHeight|0,Ki=ut.lineHeight|0,Ln=ut.lineNumbersDigitCount|0,nt=ut.typicalHalfwidthCharacterWidth,Ct=ut.maxDigitWidth,Qt=ut.pixelRatio,Ot=ut.viewLineCount,at=Oe.get(125),Yi=at==="inherit"?Oe.get(124):at,bi=Yi==="inherit"?Oe.get(120):Yi,St=Oe.get(123),bn=Oe.get(2),sn=ut.isDominatedByLongLines,ni=Oe.get(52),xe=Oe.get(62).renderType!==0,Ce=Oe.get(63),Ye=Oe.get(96),Rt=Oe.get(67),Vt=Oe.get(94),Gt=Vt.verticalScrollbarSize,ri=Vt.verticalHasArrows,fi=Vt.arrowSize,di=Vt.horizontalScrollbarSize,Jt=Oe.get(60),ai=Oe.get(39),Ei=Oe.get(101)!=="never";let wi;if(typeof Jt=="string"&&/^\d+(\.\d+)?ch$/.test(Jt)){const Rn=parseFloat(Jt.substr(0,Jt.length-2));wi=k.clampedInt(Rn*nt,0,0,1e3)}else wi=k.clampedInt(Jt,0,0,1e3);ai&&Ei&&(wi+=16);let Ai=0;if(xe){const Rn=Math.max(Ln,Ce);Ai=Math.round(Rn*Ct)}let Ni=0;ni&&(Ni=Ki);let qi=0,Pi=qi+Ni,gn=Pi+Ai,Gi=gn+wi;const Oi=Zt-Ni-Ai-wi;let Fi=!1,Bi=!1,rn=-1;bn!==2&&(Yi==="inherit"&&sn?(Fi=!0,Bi=!0):bi==="on"||bi==="bounded"?Bi=!0:bi==="wordWrapColumn"&&(rn=St));const _i=O._computeMinimapLayout({outerWidth:Zt,outerHeight:Ci,lineHeight:Ki,typicalHalfwidthCharacterWidth:nt,pixelRatio:Qt,scrollBeyondLastLine:Ye,minimap:Rt,verticalScrollbarWidth:Gt,viewLineCount:Ot,remainingWidth:Oi,isViewportWrapping:Bi},ut.memory||new z);_i.renderMinimap!==0&&_i.minimapLeft===0&&(qi+=_i.minimapWidth,Pi+=_i.minimapWidth,gn+=_i.minimapWidth,Gi+=_i.minimapWidth);const jn=Oi-_i.minimapWidth,Wn=Math.max(1,Math.floor((jn-Gt-2)/nt)),xn=ri?fi:0;return Bi&&(rn=Math.max(1,Wn),bi==="bounded"&&(rn=Math.min(rn,St))),{width:Zt,height:Ci,glyphMarginLeft:qi,glyphMarginWidth:Ni,lineNumbersLeft:Pi,lineNumbersWidth:Ai,decorationsLeft:gn,decorationsWidth:wi,contentLeft:Gi,contentWidth:jn,minimap:_i,viewportColumn:Wn,isWordWrapMinified:Fi,isViewportWrapping:Bi,wrappingColumn:rn,verticalScrollbarWidth:Gt,horizontalScrollbarHeight:di,overviewRuler:{top:xn,width:Gt,height:Ci-2*xn,right:0}}}}class ot extends S{constructor(){const Oe={enabled:!0};super(59,"lightbulb",Oe,{"editor.lightbulb.enabled":{type:"boolean",default:Oe.enabled,description:I.kg("codeActions","Enables the code action lightbulb in the editor.")}})}validate(Oe){return!Oe||typeof Oe!="object"?this.defaultValue:{enabled:w(Oe.enabled,this.defaultValue.enabled)}}}class lt extends S{constructor(){const Oe={stickyScroll:{enabled:!1}};super(34,"experimental",Oe,{"editor.experimental.stickyScroll.enabled":{type:"boolean",default:Oe.stickyScroll.enabled,description:I.kg("editor.experimental.stickyScroll","Shows the nested current scopes during the scroll at the top of the editor.")}})}validate(Oe){var ut;return!Oe||typeof Oe!="object"?this.defaultValue:{stickyScroll:{enabled:w((ut=Oe.stickyScroll)===null||ut===void 0?void 0:ut.enabled,this.defaultValue.stickyScroll.enabled)}}}}class We extends S{constructor(){const Oe={enabled:"on",fontSize:0,fontFamily:"",padding:!1};super(129,"inlayHints",Oe,{"editor.inlayHints.enabled":{type:"string",default:Oe.enabled,description:I.kg("inlayHints.enable","Enables the inlay hints in the editor."),enum:["on","onUnlessPressed","offUnlessPressed","off"],markdownEnumDescriptions:[I.kg("editor.inlayHints.on","Inlay hints are enabled"),I.kg("editor.inlayHints.onUnlessPressed","Inlay hints are showing by default and hide when holding `Ctrl+Alt`"),I.kg("editor.inlayHints.offUnlessPressed","Inlay hints are hidden by default and show when holding `Ctrl+Alt`"),I.kg("editor.inlayHints.off","Inlay hints are disabled")]},"editor.inlayHints.fontSize":{type:"number",default:Oe.fontSize,markdownDescription:I.kg("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:Oe.fontFamily,markdownDescription:I.kg("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:Oe.padding,description:I.kg("inlayHints.padding","Enables the padding around the inlay hints in the editor.")}})}validate(Oe){if(!Oe||typeof Oe!="object")return this.defaultValue;const ut=Oe;return typeof ut.enabled=="boolean"&&(ut.enabled=ut.enabled?"on":"off"),{enabled:B(ut.enabled,this.defaultValue.enabled,["on","off","offUnlessPressed","onUnlessPressed"]),fontSize:k.clampedInt(ut.fontSize,this.defaultValue.fontSize,0,100),fontFamily:N.string(ut.fontFamily,this.defaultValue.fontFamily),padding:w(ut.padding,this.defaultValue.padding)}}}class Ke extends j{constructor(){super(61,"lineHeight",Te.lineHeight,Oe=>j.clamp(Oe,0,150),{markdownDescription:I.kg("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(Oe,ut,Zt){return Oe.fontInfo.lineHeight}}class De extends S{constructor(){const Oe={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",autohide:!1,renderCharacters:!0,maxColumn:120,scale:1};super(67,"minimap",Oe,{"editor.minimap.enabled":{type:"boolean",default:Oe.enabled,description:I.kg("minimap.enabled","Controls whether the minimap is shown.")},"editor.minimap.autohide":{type:"boolean",default:Oe.autohide,description:I.kg("minimap.autohide","Controls whether the minimap is hidden automatically.")},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[I.kg("minimap.size.proportional","The minimap has the same size as the editor contents (and might scroll)."),I.kg("minimap.size.fill","The minimap will stretch or shrink as necessary to fill the height of the editor (no scrolling)."),I.kg("minimap.size.fit","The minimap will shrink as necessary to never be larger than the editor (no scrolling).")],default:Oe.size,description:I.kg("minimap.size","Controls the size of the minimap.")},"editor.minimap.side":{type:"string",enum:["left","right"],default:Oe.side,description:I.kg("minimap.side","Controls the side where to render the minimap.")},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:Oe.showSlider,description:I.kg("minimap.showSlider","Controls when the minimap slider is shown.")},"editor.minimap.scale":{type:"number",default:Oe.scale,minimum:1,maximum:3,enum:[1,2,3],description:I.kg("minimap.scale","Scale of content drawn in the minimap: 1, 2 or 3.")},"editor.minimap.renderCharacters":{type:"boolean",default:Oe.renderCharacters,description:I.kg("minimap.renderCharacters","Render the actual characters on a line as opposed to color blocks.")},"editor.minimap.maxColumn":{type:"number",default:Oe.maxColumn,description:I.kg("minimap.maxColumn","Limit the width of the minimap to render at most a certain number of columns.")}})}validate(Oe){if(!Oe||typeof Oe!="object")return this.defaultValue;const ut=Oe;return{enabled:w(ut.enabled,this.defaultValue.enabled),autohide:w(ut.autohide,this.defaultValue.autohide),size:B(ut.size,this.defaultValue.size,["proportional","fill","fit"]),side:B(ut.side,this.defaultValue.side,["right","left"]),showSlider:B(ut.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:w(ut.renderCharacters,this.defaultValue.renderCharacters),scale:k.clampedInt(ut.scale,1,1,3),maxColumn:k.clampedInt(ut.maxColumn,this.defaultValue.maxColumn,1,1e4)}}}function Pe(ct){return ct==="ctrlCmd"?h.zx?"metaKey":"ctrlKey":"altKey"}class Ue extends S{constructor(){super(77,"padding",{top:0,bottom:0},{"editor.padding.top":{type:"number",default:0,minimum:0,maximum:1e3,description:I.kg("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:I.kg("padding.bottom","Controls the amount of space between the bottom edge of the editor and the last line.")}})}validate(Oe){if(!Oe||typeof Oe!="object")return this.defaultValue;const ut=Oe;return{top:k.clampedInt(ut.top,0,0,1e3),bottom:k.clampedInt(ut.bottom,0,0,1e3)}}}class Re extends S{constructor(){const Oe={enabled:!0,cycle:!1};super(78,"parameterHints",Oe,{"editor.parameterHints.enabled":{type:"boolean",default:Oe.enabled,description:I.kg("parameterHints.enabled","Enables a pop-up that shows parameter documentation and type information as you type.")},"editor.parameterHints.cycle":{type:"boolean",default:Oe.cycle,description:I.kg("parameterHints.cycle","Controls whether the parameter hints menu cycles or closes when reaching the end of the list.")}})}validate(Oe){if(!Oe||typeof Oe!="object")return this.defaultValue;const ut=Oe;return{enabled:w(ut.enabled,this.defaultValue.enabled),cycle:w(ut.cycle,this.defaultValue.cycle)}}}class et extends C{constructor(){super(131)}compute(Oe,ut,Zt){return Oe.pixelRatio}}class rt extends S{constructor(){const Oe={other:"on",comments:"off",strings:"off"},ut=[{type:"boolean"},{type:"string",enum:["on","inline","off"],enumDescriptions:[I.kg("on","Quick suggestions show inside the suggest widget"),I.kg("inline","Quick suggestions show as ghost text"),I.kg("off","Quick suggestions are disabled")]}];super(81,"quickSuggestions",Oe,{type:"object",additionalProperties:!1,properties:{strings:{anyOf:ut,default:Oe.strings,description:I.kg("quickSuggestions.strings","Enable quick suggestions inside strings.")},comments:{anyOf:ut,default:Oe.comments,description:I.kg("quickSuggestions.comments","Enable quick suggestions inside comments.")},other:{anyOf:ut,default:Oe.other,description:I.kg("quickSuggestions.other","Enable quick suggestions outside of strings and comments.")}},default:Oe,markdownDescription:I.kg("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=Oe}validate(Oe){if(typeof Oe=="boolean"){const Qt=Oe?"on":"off";return{comments:Qt,strings:Qt,other:Qt}}if(!Oe||typeof Oe!="object")return this.defaultValue;const{other:ut,comments:Zt,strings:Ci}=Oe,Ki=["on","inline","off"];let Ln,nt,Ct;return typeof ut=="boolean"?Ln=ut?"on":"off":Ln=B(ut,this.defaultValue.other,Ki),typeof Zt=="boolean"?nt=Zt?"on":"off":nt=B(Zt,this.defaultValue.comments,Ki),typeof Ci=="boolean"?Ct=Ci?"on":"off":Ct=B(Ci,this.defaultValue.strings,Ki),{other:Ln,comments:nt,strings:Ct}}}class Lt extends S{constructor(){super(62,"lineNumbers",{renderType:1,renderFn:null},{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[I.kg("lineNumbers.off","Line numbers are not rendered."),I.kg("lineNumbers.on","Line numbers are rendered as absolute number."),I.kg("lineNumbers.relative","Line numbers are rendered as distance in lines to cursor position."),I.kg("lineNumbers.interval","Line numbers are rendered every 10 lines.")],default:"on",description:I.kg("lineNumbers","Controls the display of line numbers.")})}validate(Oe){let ut=this.defaultValue.renderType,Zt=this.defaultValue.renderFn;return typeof Oe<"u"&&(typeof Oe=="function"?(ut=4,Zt=Oe):Oe==="interval"?ut=3:Oe==="relative"?ut=2:Oe==="on"?ut=1:ut=0),{renderType:ut,renderFn:Zt}}}function Dt(ct){const Oe=ct.get(89);return Oe==="editable"?ct.get(83):Oe!=="on"}class xt extends S{constructor(){const Oe=[],ut={type:"number",description:I.kg("rulers.size","Number of monospace characters at which this editor ruler will render.")};super(93,"rulers",Oe,{type:"array",items:{anyOf:[ut,{type:["object"],properties:{column:ut,color:{type:"string",description:I.kg("rulers.color","Color of this editor ruler."),format:"color-hex"}}}]},default:Oe,description:I.kg("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(Oe){if(Array.isArray(Oe)){const ut=[];for(const Zt of Oe)if(typeof Zt=="number")ut.push({column:k.clampedInt(Zt,0,0,1e4),color:null});else if(Zt&&typeof Zt=="object"){const Ci=Zt;ut.push({column:k.clampedInt(Ci.column,0,0,1e4),color:Ci.color})}return ut.sort((Zt,Ci)=>Zt.column-Ci.column),ut}return this.defaultValue}}function Ie(ct,Oe){if(typeof ct!="string")return Oe;switch(ct){case"hidden":return 2;case"visible":return 3;default:return 1}}class dt extends S{constructor(){const Oe={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};super(94,"scrollbar",Oe,{"editor.scrollbar.vertical":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[I.kg("scrollbar.vertical.auto","The vertical scrollbar will be visible only when necessary."),I.kg("scrollbar.vertical.visible","The vertical scrollbar will always be visible."),I.kg("scrollbar.vertical.fit","The vertical scrollbar will always be hidden.")],default:"auto",description:I.kg("scrollbar.vertical","Controls the visibility of the vertical scrollbar.")},"editor.scrollbar.horizontal":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[I.kg("scrollbar.horizontal.auto","The horizontal scrollbar will be visible only when necessary."),I.kg("scrollbar.horizontal.visible","The horizontal scrollbar will always be visible."),I.kg("scrollbar.horizontal.fit","The horizontal scrollbar will always be hidden.")],default:"auto",description:I.kg("scrollbar.horizontal","Controls the visibility of the horizontal scrollbar.")},"editor.scrollbar.verticalScrollbarSize":{type:"number",default:Oe.verticalScrollbarSize,description:I.kg("scrollbar.verticalScrollbarSize","The width of the vertical scrollbar.")},"editor.scrollbar.horizontalScrollbarSize":{type:"number",default:Oe.horizontalScrollbarSize,description:I.kg("scrollbar.horizontalScrollbarSize","The height of the horizontal scrollbar.")},"editor.scrollbar.scrollByPage":{type:"boolean",default:Oe.scrollByPage,description:I.kg("scrollbar.scrollByPage","Controls whether clicks scroll by page or jump to click position.")}})}validate(Oe){if(!Oe||typeof Oe!="object")return this.defaultValue;const ut=Oe,Zt=k.clampedInt(ut.horizontalScrollbarSize,this.defaultValue.horizontalScrollbarSize,0,1e3),Ci=k.clampedInt(ut.verticalScrollbarSize,this.defaultValue.verticalScrollbarSize,0,1e3);return{arrowSize:k.clampedInt(ut.arrowSize,this.defaultValue.arrowSize,0,1e3),vertical:Ie(ut.vertical,this.defaultValue.vertical),horizontal:Ie(ut.horizontal,this.defaultValue.horizontal),useShadows:w(ut.useShadows,this.defaultValue.useShadows),verticalHasArrows:w(ut.verticalHasArrows,this.defaultValue.verticalHasArrows),horizontalHasArrows:w(ut.horizontalHasArrows,this.defaultValue.horizontalHasArrows),handleMouseWheel:w(ut.handleMouseWheel,this.defaultValue.handleMouseWheel),alwaysConsumeMouseWheel:w(ut.alwaysConsumeMouseWheel,this.defaultValue.alwaysConsumeMouseWheel),horizontalScrollbarSize:Zt,horizontalSliderSize:k.clampedInt(ut.horizontalSliderSize,Zt,0,1e3),verticalScrollbarSize:Ci,verticalSliderSize:k.clampedInt(ut.verticalSliderSize,Ci,0,1e3),scrollByPage:w(ut.scrollByPage,this.defaultValue.scrollByPage)}}}const ft="inUntrustedWorkspace",Bt={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 jt extends S{constructor(){const Oe={nonBasicASCII:ft,invisibleCharacters:!0,ambiguousCharacters:!0,includeComments:ft,includeStrings:!0,allowedCharacters:{},allowedLocales:{_os:!0,_vscode:!0}};super(115,"unicodeHighlight",Oe,{[Bt.nonBasicASCII]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,ft],default:Oe.nonBasicASCII,description:I.kg("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.")},[Bt.invisibleCharacters]:{restricted:!0,type:"boolean",default:Oe.invisibleCharacters,description:I.kg("unicodeHighlight.invisibleCharacters","Controls whether characters that just reserve space or have no width at all are highlighted.")},[Bt.ambiguousCharacters]:{restricted:!0,type:"boolean",default:Oe.ambiguousCharacters,description:I.kg("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.")},[Bt.includeComments]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,ft],default:Oe.includeComments,description:I.kg("unicodeHighlight.includeComments","Controls whether characters in comments should also be subject to unicode highlighting.")},[Bt.includeStrings]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,ft],default:Oe.includeStrings,description:I.kg("unicodeHighlight.includeStrings","Controls whether characters in strings should also be subject to unicode highlighting.")},[Bt.allowedCharacters]:{restricted:!0,type:"object",default:Oe.allowedCharacters,description:I.kg("unicodeHighlight.allowedCharacters","Defines allowed characters that are not being highlighted."),additionalProperties:{type:"boolean"}},[Bt.allowedLocales]:{restricted:!0,type:"object",additionalProperties:{type:"boolean"},default:Oe.allowedLocales,description:I.kg("unicodeHighlight.allowedLocales","Unicode characters that are common in allowed locales are not being highlighted.")}})}applyUpdate(Oe,ut){let Zt=!1;ut.allowedCharacters&&Oe&&(x.aI(Oe.allowedCharacters,ut.allowedCharacters)||(Oe=Object.assign(Object.assign({},Oe),{allowedCharacters:ut.allowedCharacters}),Zt=!0)),ut.allowedLocales&&Oe&&(x.aI(Oe.allowedLocales,ut.allowedLocales)||(Oe=Object.assign(Object.assign({},Oe),{allowedLocales:ut.allowedLocales}),Zt=!0));const Ci=super.applyUpdate(Oe,ut);return Zt?new _(Ci.newValue,!0):Ci}validate(Oe){if(!Oe||typeof Oe!="object")return this.defaultValue;const ut=Oe;return{nonBasicASCII:ii(ut.nonBasicASCII,ft,[!0,!1,ft]),invisibleCharacters:w(ut.invisibleCharacters,this.defaultValue.invisibleCharacters),ambiguousCharacters:w(ut.ambiguousCharacters,this.defaultValue.ambiguousCharacters),includeComments:ii(ut.includeComments,ft,[!0,!1,ft]),includeStrings:ii(ut.includeStrings,ft,[!0,!1,ft]),allowedCharacters:this.validateBooleanMap(Oe.allowedCharacters,this.defaultValue.allowedCharacters),allowedLocales:this.validateBooleanMap(Oe.allowedLocales,this.defaultValue.allowedLocales)}}validateBooleanMap(Oe,ut){if(typeof Oe!="object"||!Oe)return ut;const Zt={};for(const[Ci,Ki]of Object.entries(Oe))Ki===!0&&(Zt[Ci]=!0);return Zt}}class pt extends S{constructor(){const Oe={enabled:!0,mode:"subwordSmart"};super(57,"inlineSuggest",Oe,{"editor.inlineSuggest.enabled":{type:"boolean",default:Oe.enabled,description:I.kg("inlineSuggest.enabled","Controls whether to automatically show inline suggestions in the editor.")}})}validate(Oe){if(!Oe||typeof Oe!="object")return this.defaultValue;const ut=Oe;return{enabled:w(ut.enabled,this.defaultValue.enabled),mode:B(ut.mode,this.defaultValue.mode,["prefix","subword","subwordSmart"])}}}class bt extends S{constructor(){const Oe={enabled:ie.R.bracketPairColorizationOptions.enabled,independentColorPoolPerBracketType:ie.R.bracketPairColorizationOptions.independentColorPoolPerBracketType};super(12,"bracketPairColorization",Oe,{"editor.bracketPairColorization.enabled":{type:"boolean",default:Oe.enabled,markdownDescription:I.kg("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:Oe.independentColorPoolPerBracketType,description:I.kg("bracketPairColorization.independentColorPoolPerBracketType","Controls whether each bracket type has its own independent color pool.")}})}validate(Oe){if(!Oe||typeof Oe!="object")return this.defaultValue;const ut=Oe;return{enabled:w(ut.enabled,this.defaultValue.enabled),independentColorPoolPerBracketType:w(ut.independentColorPoolPerBracketType,this.defaultValue.independentColorPoolPerBracketType)}}}class zt extends S{constructor(){const Oe={bracketPairs:!1,bracketPairsHorizontal:"active",highlightActiveBracketPair:!0,indentation:!0,highlightActiveIndentation:!0};super(13,"guides",Oe,{"editor.guides.bracketPairs":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[I.kg("editor.guides.bracketPairs.true","Enables bracket pair guides."),I.kg("editor.guides.bracketPairs.active","Enables bracket pair guides only for the active bracket pair."),I.kg("editor.guides.bracketPairs.false","Disables bracket pair guides.")],default:Oe.bracketPairs,description:I.kg("editor.guides.bracketPairs","Controls whether bracket pair guides are enabled or not.")},"editor.guides.bracketPairsHorizontal":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[I.kg("editor.guides.bracketPairsHorizontal.true","Enables horizontal guides as addition to vertical bracket pair guides."),I.kg("editor.guides.bracketPairsHorizontal.active","Enables horizontal guides only for the active bracket pair."),I.kg("editor.guides.bracketPairsHorizontal.false","Disables horizontal bracket pair guides.")],default:Oe.bracketPairsHorizontal,description:I.kg("editor.guides.bracketPairsHorizontal","Controls whether horizontal bracket pair guides are enabled or not.")},"editor.guides.highlightActiveBracketPair":{type:"boolean",default:Oe.highlightActiveBracketPair,description:I.kg("editor.guides.highlightActiveBracketPair","Controls whether the editor should highlight the active bracket pair.")},"editor.guides.indentation":{type:"boolean",default:Oe.indentation,description:I.kg("editor.guides.indentation","Controls whether the editor should render indent guides.")},"editor.guides.highlightActiveIndentation":{type:["boolean","string"],enum:[!0,"always",!1],enumDescriptions:[I.kg("editor.guides.highlightActiveIndentation.true","Highlights the active indent guide."),I.kg("editor.guides.highlightActiveIndentation.always","Highlights the active indent guide even if bracket guides are highlighted."),I.kg("editor.guides.highlightActiveIndentation.false","Do not highlight the active indent guide.")],default:Oe.highlightActiveIndentation,description:I.kg("editor.guides.highlightActiveIndentation","Controls whether the editor should highlight the active indent guide.")}})}validate(Oe){if(!Oe||typeof Oe!="object")return this.defaultValue;const ut=Oe;return{bracketPairs:ii(ut.bracketPairs,this.defaultValue.bracketPairs,[!0,!1,"active"]),bracketPairsHorizontal:ii(ut.bracketPairsHorizontal,this.defaultValue.bracketPairsHorizontal,[!0,!1,"active"]),highlightActiveBracketPair:w(ut.highlightActiveBracketPair,this.defaultValue.highlightActiveBracketPair),indentation:w(ut.indentation,this.defaultValue.indentation),highlightActiveIndentation:ii(ut.highlightActiveIndentation,this.defaultValue.highlightActiveIndentation,[!0,!1,"always"])}}}function ii(ct,Oe,ut){const Zt=ut.indexOf(ct);return Zt===-1?Oe:ut[Zt]}class vi extends S{constructor(){const Oe={insertMode:"insert",filterGraceful:!0,snippetsPreventQuickSuggestions:!0,localityBonus:!1,shareSuggestSelections:!1,showIcons:!0,showStatusBar:!1,preview:!1,previewMode:"subwordSmart",showInlineDetails:!0,showMethods:!0,showFunctions:!0,showConstructors:!0,showDeprecated:!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(108,"suggest",Oe,{"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[I.kg("suggest.insertMode.insert","Insert suggestion without overwriting text right of the cursor."),I.kg("suggest.insertMode.replace","Insert suggestion and overwrite text right of the cursor.")],default:Oe.insertMode,description:I.kg("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:Oe.filterGraceful,description:I.kg("suggest.filterGraceful","Controls whether filtering and sorting suggestions accounts for small typos.")},"editor.suggest.localityBonus":{type:"boolean",default:Oe.localityBonus,description:I.kg("suggest.localityBonus","Controls whether sorting favors words that appear close to the cursor.")},"editor.suggest.shareSuggestSelections":{type:"boolean",default:Oe.shareSuggestSelections,markdownDescription:I.kg("suggest.shareSuggestSelections","Controls whether remembered suggestion selections are shared between multiple workspaces and windows (needs `#editor.suggestSelection#`).")},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:Oe.snippetsPreventQuickSuggestions,description:I.kg("suggest.snippetsPreventQuickSuggestions","Controls whether an active snippet prevents quick suggestions.")},"editor.suggest.showIcons":{type:"boolean",default:Oe.showIcons,description:I.kg("suggest.showIcons","Controls whether to show or hide icons in suggestions.")},"editor.suggest.showStatusBar":{type:"boolean",default:Oe.showStatusBar,description:I.kg("suggest.showStatusBar","Controls the visibility of the status bar at the bottom of the suggest widget.")},"editor.suggest.preview":{type:"boolean",default:Oe.preview,description:I.kg("suggest.preview","Controls whether to preview the suggestion outcome in the editor.")},"editor.suggest.showInlineDetails":{type:"boolean",default:Oe.showInlineDetails,description:I.kg("suggest.showInlineDetails","Controls whether suggest details show inline with the label or only in the details widget")},"editor.suggest.maxVisibleSuggestions":{type:"number",deprecationMessage:I.kg("suggest.maxVisibleSuggestions.dep","This setting is deprecated. The suggest widget can now be resized.")},"editor.suggest.filteredTypes":{type:"object",deprecationMessage:I.kg("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:I.kg("editor.suggest.showMethods","When enabled IntelliSense shows `method`-suggestions.")},"editor.suggest.showFunctions":{type:"boolean",default:!0,markdownDescription:I.kg("editor.suggest.showFunctions","When enabled IntelliSense shows `function`-suggestions.")},"editor.suggest.showConstructors":{type:"boolean",default:!0,markdownDescription:I.kg("editor.suggest.showConstructors","When enabled IntelliSense shows `constructor`-suggestions.")},"editor.suggest.showDeprecated":{type:"boolean",default:!0,markdownDescription:I.kg("editor.suggest.showDeprecated","When enabled IntelliSense shows `deprecated`-suggestions.")},"editor.suggest.showFields":{type:"boolean",default:!0,markdownDescription:I.kg("editor.suggest.showFields","When enabled IntelliSense shows `field`-suggestions.")},"editor.suggest.showVariables":{type:"boolean",default:!0,markdownDescription:I.kg("editor.suggest.showVariables","When enabled IntelliSense shows `variable`-suggestions.")},"editor.suggest.showClasses":{type:"boolean",default:!0,markdownDescription:I.kg("editor.suggest.showClasss","When enabled IntelliSense shows `class`-suggestions.")},"editor.suggest.showStructs":{type:"boolean",default:!0,markdownDescription:I.kg("editor.suggest.showStructs","When enabled IntelliSense shows `struct`-suggestions.")},"editor.suggest.showInterfaces":{type:"boolean",default:!0,markdownDescription:I.kg("editor.suggest.showInterfaces","When enabled IntelliSense shows `interface`-suggestions.")},"editor.suggest.showModules":{type:"boolean",default:!0,markdownDescription:I.kg("editor.suggest.showModules","When enabled IntelliSense shows `module`-suggestions.")},"editor.suggest.showProperties":{type:"boolean",default:!0,markdownDescription:I.kg("editor.suggest.showPropertys","When enabled IntelliSense shows `property`-suggestions.")},"editor.suggest.showEvents":{type:"boolean",default:!0,markdownDescription:I.kg("editor.suggest.showEvents","When enabled IntelliSense shows `event`-suggestions.")},"editor.suggest.showOperators":{type:"boolean",default:!0,markdownDescription:I.kg("editor.suggest.showOperators","When enabled IntelliSense shows `operator`-suggestions.")},"editor.suggest.showUnits":{type:"boolean",default:!0,markdownDescription:I.kg("editor.suggest.showUnits","When enabled IntelliSense shows `unit`-suggestions.")},"editor.suggest.showValues":{type:"boolean",default:!0,markdownDescription:I.kg("editor.suggest.showValues","When enabled IntelliSense shows `value`-suggestions.")},"editor.suggest.showConstants":{type:"boolean",default:!0,markdownDescription:I.kg("editor.suggest.showConstants","When enabled IntelliSense shows `constant`-suggestions.")},"editor.suggest.showEnums":{type:"boolean",default:!0,markdownDescription:I.kg("editor.suggest.showEnums","When enabled IntelliSense shows `enum`-suggestions.")},"editor.suggest.showEnumMembers":{type:"boolean",default:!0,markdownDescription:I.kg("editor.suggest.showEnumMembers","When enabled IntelliSense shows `enumMember`-suggestions.")},"editor.suggest.showKeywords":{type:"boolean",default:!0,markdownDescription:I.kg("editor.suggest.showKeywords","When enabled IntelliSense shows `keyword`-suggestions.")},"editor.suggest.showWords":{type:"boolean",default:!0,markdownDescription:I.kg("editor.suggest.showTexts","When enabled IntelliSense shows `text`-suggestions.")},"editor.suggest.showColors":{type:"boolean",default:!0,markdownDescription:I.kg("editor.suggest.showColors","When enabled IntelliSense shows `color`-suggestions.")},"editor.suggest.showFiles":{type:"boolean",default:!0,markdownDescription:I.kg("editor.suggest.showFiles","When enabled IntelliSense shows `file`-suggestions.")},"editor.suggest.showReferences":{type:"boolean",default:!0,markdownDescription:I.kg("editor.suggest.showReferences","When enabled IntelliSense shows `reference`-suggestions.")},"editor.suggest.showCustomcolors":{type:"boolean",default:!0,markdownDescription:I.kg("editor.suggest.showCustomcolors","When enabled IntelliSense shows `customcolor`-suggestions.")},"editor.suggest.showFolders":{type:"boolean",default:!0,markdownDescription:I.kg("editor.suggest.showFolders","When enabled IntelliSense shows `folder`-suggestions.")},"editor.suggest.showTypeParameters":{type:"boolean",default:!0,markdownDescription:I.kg("editor.suggest.showTypeParameters","When enabled IntelliSense shows `typeParameter`-suggestions.")},"editor.suggest.showSnippets":{type:"boolean",default:!0,markdownDescription:I.kg("editor.suggest.showSnippets","When enabled IntelliSense shows `snippet`-suggestions.")},"editor.suggest.showUsers":{type:"boolean",default:!0,markdownDescription:I.kg("editor.suggest.showUsers","When enabled IntelliSense shows `user`-suggestions.")},"editor.suggest.showIssues":{type:"boolean",default:!0,markdownDescription:I.kg("editor.suggest.showIssues","When enabled IntelliSense shows `issues`-suggestions.")}})}validate(Oe){if(!Oe||typeof Oe!="object")return this.defaultValue;const ut=Oe;return{insertMode:B(ut.insertMode,this.defaultValue.insertMode,["insert","replace"]),filterGraceful:w(ut.filterGraceful,this.defaultValue.filterGraceful),snippetsPreventQuickSuggestions:w(ut.snippetsPreventQuickSuggestions,this.defaultValue.filterGraceful),localityBonus:w(ut.localityBonus,this.defaultValue.localityBonus),shareSuggestSelections:w(ut.shareSuggestSelections,this.defaultValue.shareSuggestSelections),showIcons:w(ut.showIcons,this.defaultValue.showIcons),showStatusBar:w(ut.showStatusBar,this.defaultValue.showStatusBar),preview:w(ut.preview,this.defaultValue.preview),previewMode:B(ut.previewMode,this.defaultValue.previewMode,["prefix","subword","subwordSmart"]),showInlineDetails:w(ut.showInlineDetails,this.defaultValue.showInlineDetails),showMethods:w(ut.showMethods,this.defaultValue.showMethods),showFunctions:w(ut.showFunctions,this.defaultValue.showFunctions),showConstructors:w(ut.showConstructors,this.defaultValue.showConstructors),showDeprecated:w(ut.showDeprecated,this.defaultValue.showDeprecated),showFields:w(ut.showFields,this.defaultValue.showFields),showVariables:w(ut.showVariables,this.defaultValue.showVariables),showClasses:w(ut.showClasses,this.defaultValue.showClasses),showStructs:w(ut.showStructs,this.defaultValue.showStructs),showInterfaces:w(ut.showInterfaces,this.defaultValue.showInterfaces),showModules:w(ut.showModules,this.defaultValue.showModules),showProperties:w(ut.showProperties,this.defaultValue.showProperties),showEvents:w(ut.showEvents,this.defaultValue.showEvents),showOperators:w(ut.showOperators,this.defaultValue.showOperators),showUnits:w(ut.showUnits,this.defaultValue.showUnits),showValues:w(ut.showValues,this.defaultValue.showValues),showConstants:w(ut.showConstants,this.defaultValue.showConstants),showEnums:w(ut.showEnums,this.defaultValue.showEnums),showEnumMembers:w(ut.showEnumMembers,this.defaultValue.showEnumMembers),showKeywords:w(ut.showKeywords,this.defaultValue.showKeywords),showWords:w(ut.showWords,this.defaultValue.showWords),showColors:w(ut.showColors,this.defaultValue.showColors),showFiles:w(ut.showFiles,this.defaultValue.showFiles),showReferences:w(ut.showReferences,this.defaultValue.showReferences),showFolders:w(ut.showFolders,this.defaultValue.showFolders),showTypeParameters:w(ut.showTypeParameters,this.defaultValue.showTypeParameters),showSnippets:w(ut.showSnippets,this.defaultValue.showSnippets),showUsers:w(ut.showUsers,this.defaultValue.showUsers),showIssues:w(ut.showIssues,this.defaultValue.showIssues)}}}class Ze extends S{constructor(){super(104,"smartSelect",{selectLeadingAndTrailingWhitespace:!0},{"editor.smartSelect.selectLeadingAndTrailingWhitespace":{description:I.kg("selectLeadingAndTrailingWhitespace","Whether leading and trailing whitespace should always be selected."),default:!0,type:"boolean"}})}validate(Oe){return!Oe||typeof Oe!="object"?this.defaultValue:{selectLeadingAndTrailingWhitespace:w(Oe.selectLeadingAndTrailingWhitespace,this.defaultValue.selectLeadingAndTrailingWhitespace)}}}class _t extends C{constructor(){super(132)}compute(Oe,ut,Zt){return ut.get(83)?!0:Oe.tabFocusMode}}function At(ct){switch(ct){case"none":return 0;case"same":return 1;case"indent":return 2;case"deepIndent":return 3}}class ei extends C{constructor(){super(134)}compute(Oe,ut,Zt){const Ci=ut.get(133);return{isDominatedByLongLines:Oe.isDominatedByLongLines,isWordWrapMinified:Ci.isWordWrapMinified,isViewportWrapping:Ci.isViewportWrapping,wrappingColumn:Ci.wrappingColumn}}}class oi extends S{constructor(){const Oe={enabled:!0};super(32,"dropIntoEditor",Oe,{"editor.dropIntoEditor.enabled":{type:"boolean",default:Oe.enabled,markdownDescription:I.kg("dropIntoEditor.enabled","Controls whether you can drag and drop a file into a text editor by holding down `shift` (instead of opening the file in an editor).")}})}validate(Oe){return!Oe||typeof Oe!="object"?this.defaultValue:{enabled:w(Oe.enabled,this.defaultValue.enabled)}}}const Li="Consolas, 'Courier New', monospace",zi="Menlo, Monaco, 'Courier New', monospace",Di="'Droid Sans Mono', 'monospace', monospace",Te={fontFamily:h.zx?zi:h.j9?Di:Li,fontWeight:"normal",fontSize:h.zx?12:14,lineHeight:0,letterSpacing:0},ki=[];function ze(ct){return ki[ct.id]=ct,ct}const we={acceptSuggestionOnCommitCharacter:ze(new D(0,"acceptSuggestionOnCommitCharacter",!0,{markdownDescription:I.kg("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:ze(new T(1,"acceptSuggestionOnEnter","on",["on","smart","off"],{markdownEnumDescriptions:["",I.kg("acceptSuggestionOnEnterSmart","Only accept a suggestion with `Enter` when it makes a textual change."),""],markdownDescription:I.kg("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:ze(new ee),accessibilityPageSize:ze(new k(3,"accessibilityPageSize",10,1,1073741824,{description:I.kg("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.")})),ariaLabel:ze(new N(4,"ariaLabel",I.kg("editorViewAccessibleLabel","Editor content"))),autoClosingBrackets:ze(new T(5,"autoClosingBrackets","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",I.kg("editor.autoClosingBrackets.languageDefined","Use language configurations to determine when to autoclose brackets."),I.kg("editor.autoClosingBrackets.beforeWhitespace","Autoclose brackets only when the cursor is to the left of whitespace."),""],description:I.kg("autoClosingBrackets","Controls whether the editor should automatically close brackets after the user adds an opening bracket.")})),autoClosingDelete:ze(new T(6,"autoClosingDelete","auto",["always","auto","never"],{enumDescriptions:["",I.kg("editor.autoClosingDelete.auto","Remove adjacent closing quotes or brackets only if they were automatically inserted."),""],description:I.kg("autoClosingDelete","Controls whether the editor should remove adjacent closing quotes or brackets when deleting.")})),autoClosingOvertype:ze(new T(7,"autoClosingOvertype","auto",["always","auto","never"],{enumDescriptions:["",I.kg("editor.autoClosingOvertype.auto","Type over closing quotes or brackets only if they were automatically inserted."),""],description:I.kg("autoClosingOvertype","Controls whether the editor should type over closing quotes or brackets.")})),autoClosingQuotes:ze(new T(8,"autoClosingQuotes","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",I.kg("editor.autoClosingQuotes.languageDefined","Use language configurations to determine when to autoclose quotes."),I.kg("editor.autoClosingQuotes.beforeWhitespace","Autoclose quotes only when the cursor is to the left of whitespace."),""],description:I.kg("autoClosingQuotes","Controls whether the editor should automatically close quotes after the user adds an opening quote.")})),autoIndent:ze(new H(9,"autoIndent",4,"full",["none","keep","brackets","advanced","full"],Y,{enumDescriptions:[I.kg("editor.autoIndent.none","The editor will not insert indentation automatically."),I.kg("editor.autoIndent.keep","The editor will keep the current line's indentation."),I.kg("editor.autoIndent.brackets","The editor will keep the current line's indentation and honor language defined brackets."),I.kg("editor.autoIndent.advanced","The editor will keep the current line's indentation, honor language defined brackets and invoke special onEnterRules defined by languages."),I.kg("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:I.kg("autoIndent","Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines.")})),automaticLayout:ze(new D(10,"automaticLayout",!1)),autoSurround:ze(new T(11,"autoSurround","languageDefined",["languageDefined","quotes","brackets","never"],{enumDescriptions:[I.kg("editor.autoSurround.languageDefined","Use language configurations to determine when to automatically surround selections."),I.kg("editor.autoSurround.quotes","Surround with quotes but not brackets."),I.kg("editor.autoSurround.brackets","Surround with brackets but not quotes."),""],description:I.kg("autoSurround","Controls whether the editor should automatically surround selections when typing quotes or brackets.")})),bracketPairColorization:ze(new bt),bracketPairGuides:ze(new zt),stickyTabStops:ze(new D(106,"stickyTabStops",!1,{description:I.kg("stickyTabStops","Emulate selection behavior of tab characters when using spaces for indentation. Selection will stick to tab stops.")})),codeLens:ze(new D(14,"codeLens",!0,{description:I.kg("codeLens","Controls whether the editor shows CodeLens.")})),codeLensFontFamily:ze(new N(15,"codeLensFontFamily","",{description:I.kg("codeLensFontFamily","Controls the font family for CodeLens.")})),codeLensFontSize:ze(new k(16,"codeLensFontSize",0,0,100,{type:"number",default:0,minimum:0,maximum:100,markdownDescription:I.kg("codeLensFontSize","Controls the font size in pixels for CodeLens. When set to `0`, 90% of `#editor.fontSize#` is used.")})),colorDecorators:ze(new D(17,"colorDecorators",!0,{description:I.kg("colorDecorators","Controls whether the editor should render the inline color decorators and color picker.")})),columnSelection:ze(new D(18,"columnSelection",!1,{description:I.kg("columnSelection","Enable that the selection with the mouse and keys is doing column selection.")})),comments:ze(new ce),contextmenu:ze(new D(20,"contextmenu",!0)),copyWithSyntaxHighlighting:ze(new D(21,"copyWithSyntaxHighlighting",!0,{description:I.kg("copyWithSyntaxHighlighting","Controls whether syntax highlighting should be copied into the clipboard.")})),cursorBlinking:ze(new H(22,"cursorBlinking",1,"blink",["blink","smooth","phase","expand","solid"],pe,{description:I.kg("cursorBlinking","Control the cursor animation style.")})),cursorSmoothCaretAnimation:ze(new D(23,"cursorSmoothCaretAnimation",!1,{description:I.kg("cursorSmoothCaretAnimation","Controls whether the smooth caret animation should be enabled.")})),cursorStyle:ze(new H(24,"cursorStyle",ge.Line,"line",["line","block","underline","line-thin","block-outline","underline-thin"],fe,{description:I.kg("cursorStyle","Controls the cursor style.")})),cursorSurroundingLines:ze(new k(25,"cursorSurroundingLines",0,0,1073741824,{description:I.kg("cursorSurroundingLines","Controls the minimal number of visible leading and trailing lines surrounding the cursor. Known as 'scrollOff' or 'scrollOffset' in some other editors.")})),cursorSurroundingLinesStyle:ze(new T(26,"cursorSurroundingLinesStyle","default",["default","all"],{enumDescriptions:[I.kg("cursorSurroundingLinesStyle.default","`cursorSurroundingLines` is enforced only when triggered via the keyboard or API."),I.kg("cursorSurroundingLinesStyle.all","`cursorSurroundingLines` is enforced always.")],description:I.kg("cursorSurroundingLinesStyle","Controls when `cursorSurroundingLines` should be enforced.")})),cursorWidth:ze(new k(27,"cursorWidth",0,0,1073741824,{markdownDescription:I.kg("cursorWidth","Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.")})),disableLayerHinting:ze(new D(28,"disableLayerHinting",!1)),disableMonospaceOptimizations:ze(new D(29,"disableMonospaceOptimizations",!1)),domReadOnly:ze(new D(30,"domReadOnly",!1)),dragAndDrop:ze(new D(31,"dragAndDrop",!0,{description:I.kg("dragAndDrop","Controls whether the editor should allow moving selections via drag and drop.")})),emptySelectionClipboard:ze(new Z),dropIntoEditor:ze(new oi),experimental:ze(new lt),extraEditorClassName:ze(new N(35,"extraEditorClassName","")),fastScrollSensitivity:ze(new j(36,"fastScrollSensitivity",5,ct=>ct<=0?5:ct,{markdownDescription:I.kg("fastScrollSensitivity","Scrolling speed multiplier when pressing `Alt`.")})),find:ze(new le),fixedOverflowWidgets:ze(new D(38,"fixedOverflowWidgets",!1)),folding:ze(new D(39,"folding",!0,{description:I.kg("folding","Controls whether the editor has code folding enabled.")})),foldingStrategy:ze(new T(40,"foldingStrategy","auto",["auto","indentation"],{enumDescriptions:[I.kg("foldingStrategy.auto","Use a language-specific folding strategy if available, else the indentation-based one."),I.kg("foldingStrategy.indentation","Use the indentation-based folding strategy.")],description:I.kg("foldingStrategy","Controls the strategy for computing folding ranges.")})),foldingHighlight:ze(new D(41,"foldingHighlight",!0,{description:I.kg("foldingHighlight","Controls whether the editor should highlight folded ranges.")})),foldingImportsByDefault:ze(new D(42,"foldingImportsByDefault",!1,{description:I.kg("foldingImportsByDefault","Controls whether the editor automatically collapses import ranges.")})),foldingMaximumRegions:ze(new k(43,"foldingMaximumRegions",5e3,10,65e3,{description:I.kg("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:ze(new D(44,"unfoldOnClickAfterEndOfLine",!1,{description:I.kg("unfoldOnClickAfterEndOfLine","Controls whether clicking on the empty content after a folded line will unfold the line.")})),fontFamily:ze(new N(45,"fontFamily",Te.fontFamily,{description:I.kg("fontFamily","Controls the font family.")})),fontInfo:ze(new X),fontLigatures2:ze(new se),fontSize:ze(new K),fontWeight:ze(new he),formatOnPaste:ze(new D(50,"formatOnPaste",!1,{description:I.kg("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:ze(new D(51,"formatOnType",!1,{description:I.kg("formatOnType","Controls whether the editor should automatically format the line after typing.")})),glyphMargin:ze(new D(52,"glyphMargin",!0,{description:I.kg("glyphMargin","Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.")})),gotoLocation:ze(new ve),hideCursorInOverviewRuler:ze(new D(54,"hideCursorInOverviewRuler",!1,{description:I.kg("hideCursorInOverviewRuler","Controls whether the cursor should be hidden in the overview ruler.")})),hover:ze(new Ee),inDiffEditor:ze(new D(56,"inDiffEditor",!1)),letterSpacing:ze(new j(58,"letterSpacing",Te.letterSpacing,ct=>j.clamp(ct,-5,20),{description:I.kg("letterSpacing","Controls the letter spacing in pixels.")})),lightbulb:ze(new ot),lineDecorationsWidth:ze(new d(60,"lineDecorationsWidth",10)),lineHeight:ze(new Ke),lineNumbers:ze(new Lt),lineNumbersMinChars:ze(new k(63,"lineNumbersMinChars",5,1,300)),linkedEditing:ze(new D(64,"linkedEditing",!1,{description:I.kg("linkedEditing","Controls whether the editor has linked editing enabled. Depending on the language, related symbols, e.g. HTML tags, are updated while editing.")})),links:ze(new D(65,"links",!0,{description:I.kg("links","Controls whether the editor should detect links and make them clickable.")})),matchBrackets:ze(new T(66,"matchBrackets","always",["always","near","never"],{description:I.kg("matchBrackets","Highlight matching brackets.")})),minimap:ze(new De),mouseStyle:ze(new T(68,"mouseStyle","text",["text","default","copy"])),mouseWheelScrollSensitivity:ze(new j(69,"mouseWheelScrollSensitivity",1,ct=>ct===0?1:ct,{markdownDescription:I.kg("mouseWheelScrollSensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")})),mouseWheelZoom:ze(new D(70,"mouseWheelZoom",!1,{markdownDescription:I.kg("mouseWheelZoom","Zoom the font of the editor when using mouse wheel and holding `Ctrl`.")})),multiCursorMergeOverlapping:ze(new D(71,"multiCursorMergeOverlapping",!0,{description:I.kg("multiCursorMergeOverlapping","Merge multiple cursors when they are overlapping.")})),multiCursorModifier:ze(new H(72,"multiCursorModifier","altKey","alt",["ctrlCmd","alt"],Pe,{markdownEnumDescriptions:[I.kg("multiCursorModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),I.kg("multiCursorModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],markdownDescription:I.kg({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:ze(new T(73,"multiCursorPaste","spread",["spread","full"],{markdownEnumDescriptions:[I.kg("multiCursorPaste.spread","Each cursor pastes a single line of the text."),I.kg("multiCursorPaste.full","Each cursor pastes the full text.")],markdownDescription:I.kg("multiCursorPaste","Controls pasting when the line count of the pasted text matches the cursor count.")})),occurrencesHighlight:ze(new D(74,"occurrencesHighlight",!0,{description:I.kg("occurrencesHighlight","Controls whether the editor should highlight semantic symbol occurrences.")})),overviewRulerBorder:ze(new D(75,"overviewRulerBorder",!0,{description:I.kg("overviewRulerBorder","Controls whether a border should be drawn around the overview ruler.")})),overviewRulerLanes:ze(new k(76,"overviewRulerLanes",3,0,3)),padding:ze(new Ue),parameterHints:ze(new Re),peekWidgetDefaultFocus:ze(new T(79,"peekWidgetDefaultFocus","tree",["tree","editor"],{enumDescriptions:[I.kg("peekWidgetDefaultFocus.tree","Focus the tree when opening peek"),I.kg("peekWidgetDefaultFocus.editor","Focus the editor when opening peek")],description:I.kg("peekWidgetDefaultFocus","Controls whether to focus the inline editor or the tree in the peek widget.")})),definitionLinkOpensInPeek:ze(new D(80,"definitionLinkOpensInPeek",!1,{description:I.kg("definitionLinkOpensInPeek","Controls whether the Go to Definition mouse gesture always opens the peek widget.")})),quickSuggestions:ze(new rt),quickSuggestionsDelay:ze(new k(82,"quickSuggestionsDelay",10,0,1073741824,{description:I.kg("quickSuggestionsDelay","Controls the delay in milliseconds after which quick suggestions will show up.")})),readOnly:ze(new D(83,"readOnly",!1)),renameOnType:ze(new D(84,"renameOnType",!1,{description:I.kg("renameOnType","Controls whether the editor auto renames on type."),markdownDeprecationMessage:I.kg("renameOnTypeDeprecate","Deprecated, use `editor.linkedEditing` instead.")})),renderControlCharacters:ze(new D(85,"renderControlCharacters",!0,{description:I.kg("renderControlCharacters","Controls whether the editor should render control characters."),restricted:!0})),renderFinalNewline:ze(new D(86,"renderFinalNewline",!0,{description:I.kg("renderFinalNewline","Render last line number when the file ends with a newline.")})),renderLineHighlight:ze(new T(87,"renderLineHighlight","line",["none","gutter","line","all"],{enumDescriptions:["","","",I.kg("renderLineHighlight.all","Highlights both the gutter and the current line.")],description:I.kg("renderLineHighlight","Controls how the editor should render the current line highlight.")})),renderLineHighlightOnlyWhenFocus:ze(new D(88,"renderLineHighlightOnlyWhenFocus",!1,{description:I.kg("renderLineHighlightOnlyWhenFocus","Controls if the editor should render the current line highlight only when the editor is focused.")})),renderValidationDecorations:ze(new T(89,"renderValidationDecorations","editable",["editable","on","off"])),renderWhitespace:ze(new T(90,"renderWhitespace","selection",["none","boundary","selection","trailing","all"],{enumDescriptions:["",I.kg("renderWhitespace.boundary","Render whitespace characters except for single spaces between words."),I.kg("renderWhitespace.selection","Render whitespace characters only on selected text."),I.kg("renderWhitespace.trailing","Render only trailing whitespace characters."),""],description:I.kg("renderWhitespace","Controls how the editor should render whitespace characters.")})),revealHorizontalRightPadding:ze(new k(91,"revealHorizontalRightPadding",30,0,1e3)),roundedSelection:ze(new D(92,"roundedSelection",!0,{description:I.kg("roundedSelection","Controls whether selections should have rounded corners.")})),rulers:ze(new xt),scrollbar:ze(new dt),scrollBeyondLastColumn:ze(new k(95,"scrollBeyondLastColumn",4,0,1073741824,{description:I.kg("scrollBeyondLastColumn","Controls the number of extra characters beyond which the editor will scroll horizontally.")})),scrollBeyondLastLine:ze(new D(96,"scrollBeyondLastLine",!0,{description:I.kg("scrollBeyondLastLine","Controls whether the editor will scroll beyond the last line.")})),scrollPredominantAxis:ze(new D(97,"scrollPredominantAxis",!0,{description:I.kg("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:ze(new D(98,"selectionClipboard",!0,{description:I.kg("selectionClipboard","Controls whether the Linux primary clipboard should be supported."),included:h.j9})),selectionHighlight:ze(new D(99,"selectionHighlight",!0,{description:I.kg("selectionHighlight","Controls whether the editor should highlight matches similar to the selection.")})),selectOnLineNumbers:ze(new D(100,"selectOnLineNumbers",!0)),showFoldingControls:ze(new T(101,"showFoldingControls","mouseover",["always","never","mouseover"],{enumDescriptions:[I.kg("showFoldingControls.always","Always show the folding controls."),I.kg("showFoldingControls.never","Never show the folding controls and reduce the gutter size."),I.kg("showFoldingControls.mouseover","Only show the folding controls when the mouse is over the gutter.")],description:I.kg("showFoldingControls","Controls when the folding controls on the gutter are shown.")})),showUnused:ze(new D(102,"showUnused",!0,{description:I.kg("showUnused","Controls fading out of unused code.")})),showDeprecated:ze(new D(128,"showDeprecated",!0,{description:I.kg("showDeprecated","Controls strikethrough deprecated variables.")})),inlayHints:ze(new We),snippetSuggestions:ze(new T(103,"snippetSuggestions","inline",["top","bottom","inline","none"],{enumDescriptions:[I.kg("snippetSuggestions.top","Show snippet suggestions on top of other suggestions."),I.kg("snippetSuggestions.bottom","Show snippet suggestions below other suggestions."),I.kg("snippetSuggestions.inline","Show snippets suggestions with other suggestions."),I.kg("snippetSuggestions.none","Do not show snippet suggestions.")],description:I.kg("snippetSuggestions","Controls whether snippets are shown with other suggestions and how they are sorted.")})),smartSelect:ze(new Ze),smoothScrolling:ze(new D(105,"smoothScrolling",!1,{description:I.kg("smoothScrolling","Controls whether the editor will scroll using an animation.")})),stopRenderingLineAfter:ze(new k(107,"stopRenderingLineAfter",1e4,-1,1073741824)),suggest:ze(new vi),inlineSuggest:ze(new pt),suggestFontSize:ze(new k(109,"suggestFontSize",0,0,1e3,{markdownDescription:I.kg("suggestFontSize","Font size for the suggest widget. When set to {0}, the value of {1} is used.","`0`","`#editor.fontSize#`")})),suggestLineHeight:ze(new k(110,"suggestLineHeight",0,0,1e3,{markdownDescription:I.kg("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:ze(new D(111,"suggestOnTriggerCharacters",!0,{description:I.kg("suggestOnTriggerCharacters","Controls whether suggestions should automatically show up when typing trigger characters.")})),suggestSelection:ze(new T(112,"suggestSelection","first",["first","recentlyUsed","recentlyUsedByPrefix"],{markdownEnumDescriptions:[I.kg("suggestSelection.first","Always select the first suggestion."),I.kg("suggestSelection.recentlyUsed","Select recent suggestions unless further typing selects one, e.g. `console.| -> console.log` because `log` has been completed recently."),I.kg("suggestSelection.recentlyUsedByPrefix","Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.")],description:I.kg("suggestSelection","Controls how suggestions are pre-selected when showing the suggest list.")})),tabCompletion:ze(new T(113,"tabCompletion","off",["on","off","onlySnippets"],{enumDescriptions:[I.kg("tabCompletion.on","Tab complete will insert the best matching suggestion when pressing tab."),I.kg("tabCompletion.off","Disable tab completions."),I.kg("tabCompletion.onlySnippets","Tab complete snippets when their prefix match. Works best when 'quickSuggestions' aren't enabled.")],description:I.kg("tabCompletion","Enables tab completions.")})),tabIndex:ze(new k(114,"tabIndex",0,-1,1073741824)),unicodeHighlight:ze(new jt),unusualLineTerminators:ze(new T(116,"unusualLineTerminators","prompt",["auto","off","prompt"],{enumDescriptions:[I.kg("unusualLineTerminators.auto","Unusual line terminators are automatically removed."),I.kg("unusualLineTerminators.off","Unusual line terminators are ignored."),I.kg("unusualLineTerminators.prompt","Unusual line terminators prompt to be removed.")],description:I.kg("unusualLineTerminators","Remove unusual line terminators that might cause problems.")})),useShadowDOM:ze(new D(117,"useShadowDOM",!0)),useTabStops:ze(new D(118,"useTabStops",!0,{description:I.kg("useTabStops","Inserting and deleting whitespace follows tab stops.")})),wordSeparators:ze(new N(119,"wordSeparators",te.J3,{description:I.kg("wordSeparators","Characters that will be used as word separators when doing word related navigations or operations.")})),wordWrap:ze(new T(120,"wordWrap","off",["off","on","wordWrapColumn","bounded"],{markdownEnumDescriptions:[I.kg("wordWrap.off","Lines will never wrap."),I.kg("wordWrap.on","Lines will wrap at the viewport width."),I.kg({key:"wordWrap.wordWrapColumn",comment:["- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at `#editor.wordWrapColumn#`."),I.kg({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:I.kg({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:ze(new N(121,"wordWrapBreakAfterCharacters"," })]?|/&.,;\xA2\xB0\u2032\u2033\u2030\u2103\u3001\u3002\uFF61\uFF64\uFFE0\uFF0C\uFF0E\uFF1A\uFF1B\uFF1F\uFF01\uFF05\u30FB\uFF65\u309D\u309E\u30FD\u30FE\u30FC\u30A1\u30A3\u30A5\u30A7\u30A9\u30C3\u30E3\u30E5\u30E7\u30EE\u30F5\u30F6\u3041\u3043\u3045\u3047\u3049\u3063\u3083\u3085\u3087\u308E\u3095\u3096\u31F0\u31F1\u31F2\u31F3\u31F4\u31F5\u31F6\u31F7\u31F8\u31F9\u31FA\u31FB\u31FC\u31FD\u31FE\u31FF\u3005\u303B\uFF67\uFF68\uFF69\uFF6A\uFF6B\uFF6C\uFF6D\uFF6E\uFF6F\uFF70\u201D\u3009\u300B\u300D\u300F\u3011\u3015\uFF09\uFF3D\uFF5D\uFF63")),wordWrapBreakBeforeCharacters:ze(new N(122,"wordWrapBreakBeforeCharacters","([{\u2018\u201C\u3008\u300A\u300C\u300E\u3010\u3014\uFF08\uFF3B\uFF5B\uFF62\xA3\xA5\uFF04\uFFE1\uFFE5+\uFF0B")),wordWrapColumn:ze(new k(123,"wordWrapColumn",80,1,1073741824,{markdownDescription:I.kg({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:ze(new T(124,"wordWrapOverride1","inherit",["off","on","inherit"])),wordWrapOverride2:ze(new T(125,"wordWrapOverride2","inherit",["off","on","inherit"])),wrappingIndent:ze(new H(126,"wrappingIndent",1,"same",["none","same","indent","deepIndent"],At,{enumDescriptions:[I.kg("wrappingIndent.none","No indentation. Wrapped lines begin at column 1."),I.kg("wrappingIndent.same","Wrapped lines get the same indentation as the parent."),I.kg("wrappingIndent.indent","Wrapped lines get +1 indentation toward the parent."),I.kg("wrappingIndent.deepIndent","Wrapped lines get +2 indentation toward the parent.")],description:I.kg("wrappingIndent","Controls the indentation of wrapped lines.")})),wrappingStrategy:ze(new T(127,"wrappingStrategy","simple",["simple","advanced"],{enumDescriptions:[I.kg("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."),I.kg("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.")],description:I.kg("wrappingStrategy","Controls the algorithm that computes wrapping points.")})),editorClassName:ze(new oe),pixelRatio:ze(new et),tabFocusMode:ze(new _t),layoutInfo:ze(new O),wrappingInfo:ze(new ei)}},84587:(Tt,Fe,f)=>{f.d(Fe,{D:()=>h});var I=f(2106);const h=new class{constructor(){this._zoomLevel=0,this._onDidChangeZoomLevel=new I.vl,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event}getZoomLevel(){return this._zoomLevel}setZoomLevel(te){te=Math.min(Math.max(-5,te),20),this._zoomLevel!==te&&(this._zoomLevel=te,this._onDidChangeZoomLevel.fire(this._zoomLevel))}}},28060:(Tt,Fe,f)=>{f.d(Fe,{YJ:()=>J,_8:()=>ie});var I=f(63339),h=f(66476),te=f(84587);const $=I.zx?1.5:1.35,x=8;class ie{constructor(S){this._bareFontInfoBrand=void 0,this.pixelRatio=S.pixelRatio,this.fontFamily=String(S.fontFamily),this.fontWeight=String(S.fontWeight),this.fontSize=S.fontSize,this.fontFeatureSettings=S.fontFeatureSettings,this.lineHeight=S.lineHeight|0,this.letterSpacing=S.letterSpacing}static createFromValidatedSettings(S,_,y){const C=S.get(45),d=S.get(49),w=S.get(48),D=S.get(47),L=S.get(61),k=S.get(58);return ie._create(C,d,w,D,L,k,_,y)}static _create(S,_,y,C,d,w,D,L){d===0?d=$*y:d<x&&(d=d*y),d=Math.round(d),d<x&&(d=x);const k=1+(L?0:te.D.getZoomLevel()*.1);return y*=k,d*=k,new ie({pixelRatio:D,fontFamily:S,fontWeight:_,fontSize:y,fontFeatureSettings:C,lineHeight:d,letterSpacing:w})}getId(){return`${this.pixelRatio}-${this.fontFamily}-${this.fontWeight}-${this.fontSize}-${this.fontFeatureSettings}-${this.lineHeight}-${this.letterSpacing}`}getMassagedFontFamily(){const S=h.jU.fontFamily,_=ie._wrapInQuotes(this.fontFamily);return S&&this.fontFamily!==S?`${_}, ${S}`:_}static _wrapInQuotes(S){return/[,"']/.test(S)?S:/[+ ]/.test(S)?`"${S}"`:S}}const Q=1;class J extends ie{constructor(S,_){super(S),this._editorStylingBrand=void 0,this.version=Q,this.isTrusted=_,this.isMonospace=S.isMonospace,this.typicalHalfwidthCharacterWidth=S.typicalHalfwidthCharacterWidth,this.typicalFullwidthCharacterWidth=S.typicalFullwidthCharacterWidth,this.canUseHalfwidthRightwardsArrow=S.canUseHalfwidthRightwardsArrow,this.spaceWidth=S.spaceWidth,this.middotWidth=S.middotWidth,this.wsmiddotWidth=S.wsmiddotWidth,this.maxDigitWidth=S.maxDigitWidth}equals(S){return this.fontFamily===S.fontFamily&&this.fontWeight===S.fontWeight&&this.fontSize===S.fontSize&&this.fontFeatureSettings===S.fontFeatureSettings&&this.lineHeight===S.lineHeight&&this.letterSpacing===S.letterSpacing&&this.typicalHalfwidthCharacterWidth===S.typicalHalfwidthCharacterWidth&&this.typicalFullwidthCharacterWidth===S.typicalFullwidthCharacterWidth&&this.canUseHalfwidthRightwardsArrow===S.canUseHalfwidthRightwardsArrow&&this.spaceWidth===S.spaceWidth&&this.middotWidth===S.middotWidth&&this.wsmiddotWidth===S.wsmiddotWidth&&this.maxDigitWidth===S.maxDigitWidth}}},27454:(Tt,Fe,f)=>{f.d(Fe,{V:()=>h,y:()=>te});var I=f(37512);class h{constructor(x){const ie=(0,I.W)(x);this._defaultValue=ie,this._asciiMap=h._createAsciiMap(ie),this._map=new Map}static _createAsciiMap(x){const ie=new Uint8Array(256);for(let Q=0;Q<256;Q++)ie[Q]=x;return ie}set(x,ie){const Q=(0,I.W)(ie);x>=0&&x<256?this._asciiMap[x]=Q:this._map.set(x,Q)}get(x){return x>=0&&x<256?this._asciiMap[x]:this._map.get(x)||this._defaultValue}}class te{constructor(){this._actual=new h(0)}add(x){this._actual.set(x,1)}has(x){return this._actual.get(x)===1}}},62549:(Tt,Fe,f)=>{f.d(Fe,{A:()=>h});var I=f(16844);class h{static _nextVisibleColumn($,x,ie){return $===9?h.nextRenderTabStop(x,ie):I.ne($)||I.Ss($)?x+2:x+1}static visibleColumnFromColumn($,x,ie){const Q=Math.min(x-1,$.length),J=$.substring(0,Q),z=new I.km(J);let S=0;for(;!z.eol();){const _=I.Z5(J,Q,z.offset);z.nextGraphemeLength(),S=this._nextVisibleColumn(_,S,ie)}return S}static columnFromVisibleColumn($,x,ie){if(x<=0)return 1;const Q=$.length,J=new I.km($);let z=0,S=1;for(;!J.eol();){const _=I.Z5($,Q,J.offset);J.nextGraphemeLength();const y=this._nextVisibleColumn(_,z,ie),C=J.offset+1;if(y>=x){const d=x-z;return y-x<d?C:S}z=y,S=C}return Q+1}static nextRenderTabStop($,x){return $+x-$%x}static nextIndentTabStop($,x){return $+x-$%x}static prevRenderTabStop($,x){return Math.max(0,$-1-($-1)%x)}static prevIndentTabStop($,x){return Math.max(0,$-1-($-1)%x)}}},23877:(Tt,Fe,f)=>{f.d(Fe,{k:()=>h});var I=f(28061);class h{static insert($,x){return{range:new I.Q($.lineNumber,$.column,$.lineNumber,$.column),text:x,forceMoveMarkers:!0}}static delete($){return{range:$,text:null}}static replace($,x){return{range:$,text:x}}static replaceMove($,x){return{range:$,text:x,forceMoveMarkers:!0}}}},48295:(Tt,Fe,f)=>{f.d(Fe,{$u:()=>H,AQ:()=>he,BD:()=>et,Bo:()=>Ue,D0:()=>y,DH:()=>fe,Ek:()=>oe,I2:()=>Pe,IW:()=>rt,If:()=>Re,Ln:()=>pe,Mf:()=>Q,P1:()=>dt,Pe:()=>xt,Qt:()=>L,RH:()=>Z,RU:()=>T,WD:()=>Ie,WS:()=>Dt,WY:()=>ft,Xr:()=>ee,aZ:()=>K,bB:()=>Lt,fj:()=>D,ik:()=>N,kG:()=>ie,kM:()=>C,l5:()=>ot,lQ:()=>Ee,n4:()=>De,pw:()=>j,s7:()=>Ke,sH:()=>lt,sN:()=>ve,ss:()=>O,v0:()=>w,vp:()=>se,x9:()=>Y,yI:()=>X,yw:()=>ge,zp:()=>We});var I=f(3765),h=f(94901),te=f(4874),$=f(89044),x=f(89563);const ie=(0,te.x1A)("editor.lineHighlightBackground",{dark:null,light:null,hcDark:null,hcLight:null},I.kg("lineHighlight","Background color for the highlight of line at the cursor position.")),Q=(0,te.x1A)("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hcDark:"#f38518",hcLight:te.b1q},I.kg("lineHighlightBorderBox","Background color for the border around the line at the cursor position.")),J=(0,te.x1A)("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hcDark:null,hcLight:null},I.kg("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),z=(0,te.x1A)("editor.rangeHighlightBorder",{dark:null,light:null,hcDark:te.buw,hcLight:te.buw},I.kg("rangeHighlightBorder","Background color of the border around highlighted ranges."),!0),S=(0,te.x1A)("editor.symbolHighlightBackground",{dark:te.Ubg,light:te.Ubg,hcDark:null,hcLight:null},I.kg("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),_=(0,te.x1A)("editor.symbolHighlightBorder",{dark:null,light:null,hcDark:te.buw,hcLight:te.buw},I.kg("symbolHighlightBorder","Background color of the border around highlighted symbols."),!0),y=(0,te.x1A)("editorCursor.foreground",{dark:"#AEAFAD",light:h.Q1.black,hcDark:h.Q1.white,hcLight:"#0F4A85"},I.kg("caret","Color of the editor cursor.")),C=(0,te.x1A)("editorCursor.background",null,I.kg("editorCursorBackground","The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.")),d=(0,te.x1A)("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hcDark:"#e3e4e229",hcLight:"#CCCCCC"},I.kg("editorWhitespaces","Color of whitespace characters in the editor.")),w=(0,te.x1A)("editorIndentGuide.background",{dark:d,light:d,hcDark:d,hcLight:d},I.kg("editorIndentGuides","Color of the editor indentation guides.")),D=(0,te.x1A)("editorIndentGuide.activeBackground",{dark:d,light:d,hcDark:d,hcLight:d},I.kg("editorActiveIndentGuide","Color of the active editor indentation guides.")),L=(0,te.x1A)("editorLineNumber.foreground",{dark:"#858585",light:"#237893",hcDark:h.Q1.white,hcLight:"#292929"},I.kg("editorLineNumbers","Color of editor line numbers.")),k=(0,te.x1A)("editorActiveLineNumber.foreground",{dark:"#c6c6c6",light:"#0B216F",hcDark:te.buw,hcLight:te.buw},I.kg("editorActiveLineNumber","Color of editor active line number"),!1,I.kg("deprecatedEditorActiveLineNumber","Id is deprecated. Use 'editorLineNumber.activeForeground' instead.")),j=(0,te.x1A)("editorLineNumber.activeForeground",{dark:k,light:k,hcDark:k,hcLight:k},I.kg("editorActiveLineNumber","Color of editor active line number")),N=(0,te.x1A)("editorRuler.foreground",{dark:"#5A5A5A",light:h.Q1.lightgrey,hcDark:h.Q1.white,hcLight:"#292929"},I.kg("editorRuler","Color of the editor rulers.")),B=(0,te.x1A)("editorCodeLens.foreground",{dark:"#999999",light:"#919191",hcDark:"#999999",hcLight:"#292929"},I.kg("editorCodeLensForeground","Foreground color of editor CodeLens")),T=(0,te.x1A)("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hcDark:"#0064001a",hcLight:"#0000"},I.kg("editorBracketMatchBackground","Background color behind matching brackets")),H=(0,te.x1A)("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hcDark:te.b1q,hcLight:te.b1q},I.kg("editorBracketMatchBorder","Color for matching brackets boxes")),Y=(0,te.x1A)("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hcDark:"#7f7f7f4d",hcLight:"#666666"},I.kg("editorOverviewRulerBorder","Color of the overview ruler border.")),ee=(0,te.x1A)("editorOverviewRuler.background",null,I.kg("editorOverviewRulerBackground","Background color of the editor overview ruler. Only used when the minimap is enabled and placed on the right side of the editor.")),ce=(0,te.x1A)("editorGutter.background",{dark:te.YtV,light:te.YtV,hcDark:te.YtV,hcLight:te.YtV},I.kg("editorGutter","Background color of the editor gutter. The gutter contains the glyph margins and the line numbers.")),pe=(0,te.x1A)("editorUnnecessaryCode.border",{dark:null,light:null,hcDark:h.Q1.fromHex("#fff").transparent(.8),hcLight:te.b1q},I.kg("unnecessaryCodeBorder","Border color of unnecessary (unused) source code in the editor.")),ge=(0,te.x1A)("editorUnnecessaryCode.opacity",{dark:h.Q1.fromHex("#000a"),light:h.Q1.fromHex("#0007"),hcDark:null,hcLight:null},I.kg("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.`)),fe=(0,te.x1A)("editorGhostText.border",{dark:null,light:null,hcDark:h.Q1.fromHex("#fff").transparent(.8),hcLight:h.Q1.fromHex("#292929").transparent(.8)},I.kg("editorGhostTextBorder","Border color of ghost text in the editor.")),oe=(0,te.x1A)("editorGhostText.foreground",{dark:h.Q1.fromHex("#ffffff56"),light:h.Q1.fromHex("#0007"),hcDark:null,hcLight:null},I.kg("editorGhostTextForeground","Foreground color of the ghost text in the editor.")),Z=(0,te.x1A)("editorGhostText.background",{dark:null,light:null,hcDark:null,hcLight:null},I.kg("editorGhostTextBackground","Background color of the ghost text in the editor.")),le=new h.Q1(new h.bU(0,122,204,.6)),se=(0,te.x1A)("editorOverviewRuler.rangeHighlightForeground",{dark:le,light:le,hcDark:le,hcLight:le},I.kg("overviewRulerRangeHighlight","Overview ruler marker color for range highlights. The color must not be opaque so as not to hide underlying decorations."),!0),X=(0,te.x1A)("editorOverviewRuler.errorForeground",{dark:new h.Q1(new h.bU(255,18,18,.7)),light:new h.Q1(new h.bU(255,18,18,.7)),hcDark:new h.Q1(new h.bU(255,50,50,1)),hcLight:"#B5200D"},I.kg("overviewRuleError","Overview ruler marker color for errors.")),K=(0,te.x1A)("editorOverviewRuler.warningForeground",{dark:te.Hng,light:te.Hng,hcDark:te.Stt,hcLight:te.Stt},I.kg("overviewRuleWarning","Overview ruler marker color for warnings.")),he=(0,te.x1A)("editorOverviewRuler.infoForeground",{dark:te.pOz,light:te.pOz,hcDark:te.IIb,hcLight:te.IIb},I.kg("overviewRuleInfo","Overview ruler marker color for infos.")),ve=(0,te.x1A)("editorBracketHighlight.foreground1",{dark:"#FFD700",light:"#0431FAFF",hcDark:"#FFD700",hcLight:"#0431FAFF"},I.kg("editorBracketHighlightForeground1","Foreground color of brackets (1). Requires enabling bracket pair colorization.")),Ee=(0,te.x1A)("editorBracketHighlight.foreground2",{dark:"#DA70D6",light:"#319331FF",hcDark:"#DA70D6",hcLight:"#319331FF"},I.kg("editorBracketHighlightForeground2","Foreground color of brackets (2). Requires enabling bracket pair colorization.")),O=(0,te.x1A)("editorBracketHighlight.foreground3",{dark:"#179FFF",light:"#7B3814FF",hcDark:"#87CEFA",hcLight:"#7B3814FF"},I.kg("editorBracketHighlightForeground3","Foreground color of brackets (3). Requires enabling bracket pair colorization.")),ot=(0,te.x1A)("editorBracketHighlight.foreground4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},I.kg("editorBracketHighlightForeground4","Foreground color of brackets (4). Requires enabling bracket pair colorization.")),lt=(0,te.x1A)("editorBracketHighlight.foreground5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},I.kg("editorBracketHighlightForeground5","Foreground color of brackets (5). Requires enabling bracket pair colorization.")),We=(0,te.x1A)("editorBracketHighlight.foreground6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},I.kg("editorBracketHighlightForeground6","Foreground color of brackets (6). Requires enabling bracket pair colorization.")),Ke=(0,te.x1A)("editorBracketHighlight.unexpectedBracket.foreground",{dark:new h.Q1(new h.bU(255,18,18,.8)),light:new h.Q1(new h.bU(255,18,18,.8)),hcDark:new h.Q1(new h.bU(255,50,50,1)),hcLight:""},I.kg("editorBracketHighlightUnexpectedBracketForeground","Foreground color of unexpected brackets.")),De=(0,te.x1A)("editorBracketPairGuide.background1",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},I.kg("editorBracketPairGuide.background1","Background color of inactive bracket pair guides (1). Requires enabling bracket pair guides.")),Pe=(0,te.x1A)("editorBracketPairGuide.background2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},I.kg("editorBracketPairGuide.background2","Background color of inactive bracket pair guides (2). Requires enabling bracket pair guides.")),Ue=(0,te.x1A)("editorBracketPairGuide.background3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},I.kg("editorBracketPairGuide.background3","Background color of inactive bracket pair guides (3). Requires enabling bracket pair guides.")),Re=(0,te.x1A)("editorBracketPairGuide.background4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},I.kg("editorBracketPairGuide.background4","Background color of inactive bracket pair guides (4). Requires enabling bracket pair guides.")),et=(0,te.x1A)("editorBracketPairGuide.background5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},I.kg("editorBracketPairGuide.background5","Background color of inactive bracket pair guides (5). Requires enabling bracket pair guides.")),rt=(0,te.x1A)("editorBracketPairGuide.background6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},I.kg("editorBracketPairGuide.background6","Background color of inactive bracket pair guides (6). Requires enabling bracket pair guides.")),Lt=(0,te.x1A)("editorBracketPairGuide.activeBackground1",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},I.kg("editorBracketPairGuide.activeBackground1","Background color of active bracket pair guides (1). Requires enabling bracket pair guides.")),Dt=(0,te.x1A)("editorBracketPairGuide.activeBackground2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},I.kg("editorBracketPairGuide.activeBackground2","Background color of active bracket pair guides (2). Requires enabling bracket pair guides.")),xt=(0,te.x1A)("editorBracketPairGuide.activeBackground3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},I.kg("editorBracketPairGuide.activeBackground3","Background color of active bracket pair guides (3). Requires enabling bracket pair guides.")),Ie=(0,te.x1A)("editorBracketPairGuide.activeBackground4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},I.kg("editorBracketPairGuide.activeBackground4","Background color of active bracket pair guides (4). Requires enabling bracket pair guides.")),dt=(0,te.x1A)("editorBracketPairGuide.activeBackground5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},I.kg("editorBracketPairGuide.activeBackground5","Background color of active bracket pair guides (5). Requires enabling bracket pair guides.")),ft=(0,te.x1A)("editorBracketPairGuide.activeBackground6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},I.kg("editorBracketPairGuide.activeBackground6","Background color of active bracket pair guides (6). Requires enabling bracket pair guides.")),Bt=(0,te.x1A)("editorUnicodeHighlight.border",{dark:"#BD9B03",light:"#CEA33D",hcDark:"#ff0000",hcLight:""},I.kg("editorUnicodeHighlight.border","Border color used to highlight unicode characters.")),jt=(0,te.x1A)("editorUnicodeHighlight.background",{dark:"#bd9b0326",light:"#cea33d14",hcDark:"#00000000",hcLight:""},I.kg("editorUnicodeHighlight.background","Background color used to highlight unicode characters."));(0,$.zy)((pt,bt)=>{const zt=pt.getColor(te.YtV);zt&&bt.addRule(`.monaco-editor, .monaco-editor-background { background-color: ${zt}; }`);const ii=pt.getColor(ie),vi=ii&&!ii.isTransparent()?ii:zt;vi&&bt.addRule(`.monaco-editor .inputarea.ime-input { background-color: ${vi}; }`);const Ze=pt.getColor(te.By2);Ze&&bt.addRule(`.monaco-editor, .monaco-editor .inputarea.ime-input { color: ${Ze}; }`);const _t=pt.getColor(ce);_t&&bt.addRule(`.monaco-editor .margin { background-color: ${_t}; }`);const At=pt.getColor(J);At&&bt.addRule(`.monaco-editor .rangeHighlight { background-color: ${At}; }`);const ei=pt.getColor(z);ei&&bt.addRule(`.monaco-editor .rangeHighlight { border: 1px ${(0,x.Bb)(pt.type)?"dotted":"solid"} ${ei}; }`);const oi=pt.getColor(S);oi&&bt.addRule(`.monaco-editor .symbolHighlight { background-color: ${oi}; }`);const Li=pt.getColor(_);Li&&bt.addRule(`.monaco-editor .symbolHighlight { border: 1px ${(0,x.Bb)(pt.type)?"dotted":"solid"} ${Li}; }`);const zi=pt.getColor(d);zi&&(bt.addRule(`.monaco-editor .mtkw { color: ${zi} !important; }`),bt.addRule(`.monaco-editor .mtkz { color: ${zi} !important; }`))})},3902:(Tt,Fe,f)=>{f.d(Fe,{W:()=>I});function I(h){let te=0,$=0,x=0,ie=0;for(let Q=0,J=h.length;Q<J;Q++){const z=h.charCodeAt(Q);z===13?(te===0&&($=Q),te++,Q+1<J&&h.charCodeAt(Q+1)===10?(ie|=2,Q++):ie|=3,x=Q+1):z===10&&(ie|=1,te===0&&($=Q),te++,x=Q+1)}return te===0&&($=h.length),[te,$,h.length-x,ie]}},57999:(Tt,Fe,f)=>{f.d(Fe,{P:()=>$});var I=f(16844),h=f(62549);function te(x,ie,Q){let J=0;for(let S=0;S<x.length;S++)x.charAt(S)===" "?J=h.A.nextIndentTabStop(J,ie):J++;let z="";if(!Q){const S=Math.floor(J/ie);J=J%ie;for(let _=0;_<S;_++)z+=" "}for(let S=0;S<J;S++)z+=" ";return z}function $(x,ie,Q){let J=I.HG(x);return J===-1&&(J=x.length),te(x.substring(0,J),ie,Q)+x.substring(J)}},15365:(Tt,Fe,f)=>{f.d(Fe,{y:()=>I});class I{constructor(te,$){this.lineNumber=te,this.column=$}with(te=this.lineNumber,$=this.column){return te===this.lineNumber&&$===this.column?this:new I(te,$)}delta(te=0,$=0){return this.with(this.lineNumber+te,this.column+$)}equals(te){return I.equals(this,te)}static equals(te,$){return!te&&!$?!0:!!te&&!!$&&te.lineNumber===$.lineNumber&&te.column===$.column}isBefore(te){return I.isBefore(this,te)}static isBefore(te,$){return te.lineNumber<$.lineNumber?!0:$.lineNumber<te.lineNumber?!1:te.column<$.column}isBeforeOrEqual(te){return I.isBeforeOrEqual(this,te)}static isBeforeOrEqual(te,$){return te.lineNumber<$.lineNumber?!0:$.lineNumber<te.lineNumber?!1:te.column<=$.column}static compare(te,$){const x=te.lineNumber|0,ie=$.lineNumber|0;if(x===ie){const Q=te.column|0,J=$.column|0;return Q-J}return x-ie}clone(){return new I(this.lineNumber,this.column)}toString(){return"("+this.lineNumber+","+this.column+")"}static lift(te){return new I(te.lineNumber,te.column)}static isIPosition(te){return te&&typeof te.lineNumber=="number"&&typeof te.column=="number"}}},28061:(Tt,Fe,f)=>{f.d(Fe,{Q:()=>h});var I=f(15365);class h{constructor($,x,ie,Q){$>ie||$===ie&&x>Q?(this.startLineNumber=ie,this.startColumn=Q,this.endLineNumber=$,this.endColumn=x):(this.startLineNumber=$,this.startColumn=x,this.endLineNumber=ie,this.endColumn=Q)}isEmpty(){return h.isEmpty(this)}static isEmpty($){return $.startLineNumber===$.endLineNumber&&$.startColumn===$.endColumn}containsPosition($){return h.containsPosition(this,$)}static containsPosition($,x){return!(x.lineNumber<$.startLineNumber||x.lineNumber>$.endLineNumber||x.lineNumber===$.startLineNumber&&x.column<$.startColumn||x.lineNumber===$.endLineNumber&&x.column>$.endColumn)}static strictContainsPosition($,x){return!(x.lineNumber<$.startLineNumber||x.lineNumber>$.endLineNumber||x.lineNumber===$.startLineNumber&&x.column<=$.startColumn||x.lineNumber===$.endLineNumber&&x.column>=$.endColumn)}containsRange($){return h.containsRange(this,$)}static containsRange($,x){return!(x.startLineNumber<$.startLineNumber||x.endLineNumber<$.startLineNumber||x.startLineNumber>$.endLineNumber||x.endLineNumber>$.endLineNumber||x.startLineNumber===$.startLineNumber&&x.startColumn<$.startColumn||x.endLineNumber===$.endLineNumber&&x.endColumn>$.endColumn)}strictContainsRange($){return h.strictContainsRange(this,$)}static strictContainsRange($,x){return!(x.startLineNumber<$.startLineNumber||x.endLineNumber<$.startLineNumber||x.startLineNumber>$.endLineNumber||x.endLineNumber>$.endLineNumber||x.startLineNumber===$.startLineNumber&&x.startColumn<=$.startColumn||x.endLineNumber===$.endLineNumber&&x.endColumn>=$.endColumn)}plusRange($){return h.plusRange(this,$)}static plusRange($,x){let ie,Q,J,z;return x.startLineNumber<$.startLineNumber?(ie=x.startLineNumber,Q=x.startColumn):x.startLineNumber===$.startLineNumber?(ie=x.startLineNumber,Q=Math.min(x.startColumn,$.startColumn)):(ie=$.startLineNumber,Q=$.startColumn),x.endLineNumber>$.endLineNumber?(J=x.endLineNumber,z=x.endColumn):x.endLineNumber===$.endLineNumber?(J=x.endLineNumber,z=Math.max(x.endColumn,$.endColumn)):(J=$.endLineNumber,z=$.endColumn),new h(ie,Q,J,z)}intersectRanges($){return h.intersectRanges(this,$)}static intersectRanges($,x){let ie=$.startLineNumber,Q=$.startColumn,J=$.endLineNumber,z=$.endColumn;const S=x.startLineNumber,_=x.startColumn,y=x.endLineNumber,C=x.endColumn;return ie<S?(ie=S,Q=_):ie===S&&(Q=Math.max(Q,_)),J>y?(J=y,z=C):J===y&&(z=Math.min(z,C)),ie>J||ie===J&&Q>z?null:new h(ie,Q,J,z)}equalsRange($){return h.equalsRange(this,$)}static equalsRange($,x){return!!$&&!!x&&$.startLineNumber===x.startLineNumber&&$.startColumn===x.startColumn&&$.endLineNumber===x.endLineNumber&&$.endColumn===x.endColumn}getEndPosition(){return h.getEndPosition(this)}static getEndPosition($){return new I.y($.endLineNumber,$.endColumn)}getStartPosition(){return h.getStartPosition(this)}static getStartPosition($){return new I.y($.startLineNumber,$.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition($,x){return new h(this.startLineNumber,this.startColumn,$,x)}setStartPosition($,x){return new h($,x,this.endLineNumber,this.endColumn)}collapseToStart(){return h.collapseToStart(this)}static collapseToStart($){return new h($.startLineNumber,$.startColumn,$.startLineNumber,$.startColumn)}static fromPositions($,x=$){return new h($.lineNumber,$.column,x.lineNumber,x.column)}static lift($){return $?new h($.startLineNumber,$.startColumn,$.endLineNumber,$.endColumn):null}static isIRange($){return $&&typeof $.startLineNumber=="number"&&typeof $.startColumn=="number"&&typeof $.endLineNumber=="number"&&typeof $.endColumn=="number"}static areIntersectingOrTouching($,x){return!($.endLineNumber<x.startLineNumber||$.endLineNumber===x.startLineNumber&&$.endColumn<x.startColumn||x.endLineNumber<$.startLineNumber||x.endLineNumber===$.startLineNumber&&x.endColumn<$.startColumn)}static areIntersecting($,x){return!($.endLineNumber<x.startLineNumber||$.endLineNumber===x.startLineNumber&&$.endColumn<=x.startColumn||x.endLineNumber<$.startLineNumber||x.endLineNumber===$.startLineNumber&&x.endColumn<=$.startColumn)}static compareRangesUsingStarts($,x){if($&&x){const J=$.startLineNumber|0,z=x.startLineNumber|0;if(J===z){const S=$.startColumn|0,_=x.startColumn|0;if(S===_){const y=$.endLineNumber|0,C=x.endLineNumber|0;if(y===C){const d=$.endColumn|0,w=x.endColumn|0;return d-w}return y-C}return S-_}return J-z}return($?1:0)-(x?1:0)}static compareRangesUsingEnds($,x){return $.endLineNumber===x.endLineNumber?$.endColumn===x.endColumn?$.startLineNumber===x.startLineNumber?$.startColumn-x.startColumn:$.startLineNumber-x.startLineNumber:$.endColumn-x.endColumn:$.endLineNumber-x.endLineNumber}static spansMultipleLines($){return $.endLineNumber>$.startLineNumber}toJSON(){return this}}},93702:(Tt,Fe,f)=>{f.d(Fe,{L:()=>te});var I=f(15365),h=f(28061);class te extends h.Q{constructor(x,ie,Q,J){super(x,ie,Q,J),this.selectionStartLineNumber=x,this.selectionStartColumn=ie,this.positionLineNumber=Q,this.positionColumn=J}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(x){return te.selectionsEqual(this,x)}static selectionsEqual(x,ie){return x.selectionStartLineNumber===ie.selectionStartLineNumber&&x.selectionStartColumn===ie.selectionStartColumn&&x.positionLineNumber===ie.positionLineNumber&&x.positionColumn===ie.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(x,ie){return this.getDirection()===0?new te(this.startLineNumber,this.startColumn,x,ie):new te(x,ie,this.startLineNumber,this.startColumn)}getPosition(){return new I.y(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new I.y(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(x,ie){return this.getDirection()===0?new te(x,ie,this.endLineNumber,this.endColumn):new te(this.endLineNumber,this.endColumn,x,ie)}static fromPositions(x,ie=x){return new te(x.lineNumber,x.column,ie.lineNumber,ie.column)}static fromRange(x,ie){return ie===0?new te(x.startLineNumber,x.startColumn,x.endLineNumber,x.endColumn):new te(x.endLineNumber,x.endColumn,x.startLineNumber,x.startColumn)}static liftSelection(x){return new te(x.selectionStartLineNumber,x.selectionStartColumn,x.positionLineNumber,x.positionColumn)}static selectionsArrEqual(x,ie){if(x&&!ie||!x&&ie)return!1;if(!x&&!ie)return!0;if(x.length!==ie.length)return!1;for(let Q=0,J=x.length;Q<J;Q++)if(!this.selectionsEqual(x[Q],ie[Q]))return!1;return!0}static isISelection(x){return x&&typeof x.selectionStartLineNumber=="number"&&typeof x.selectionStartColumn=="number"&&typeof x.positionLineNumber=="number"&&typeof x.positionColumn=="number"}static createWithDirection(x,ie,Q,J,z){return z===0?new te(x,ie,Q,J):new te(Q,J,x,ie)}}},54324:(Tt,Fe,f)=>{f.d(Fe,{Du:()=>_,Su:()=>y,aI:()=>S,b7:()=>z});var I=f(16844),h=f(63339),te=f(42802);let $;function x(){return $||($=new TextDecoder("UTF-16LE")),$}let ie;function Q(){return ie||(ie=new TextDecoder("UTF-16BE")),ie}let J;function z(){return J||(J=h.cm()?x():Q()),J}const S=typeof TextDecoder<"u";let _,y;S?(_=L=>new w(L),y=C):(_=L=>new D,y=d);function C(L,k,j){const N=new Uint16Array(L.buffer,k,j);return j>0&&(N[0]===65279||N[0]===65534)?d(L,k,j):x().decode(N)}function d(L,k,j){const N=[];let B=0;for(let T=0;T<j;T++){const H=te.$l(L,k);k+=2,N[B++]=String.fromCharCode(H)}return N.join("")}class w{constructor(k){this._capacity=k|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 k=new Uint16Array(this._buffer.buffer,0,this._bufferLength);return z().decode(k)}_flushBuffer(){const k=this._buildBuffer();this._bufferLength=0,this._completedStrings===null?this._completedStrings=[k]:this._completedStrings[this._completedStrings.length]=k}write1(k){const j=this._capacity-this._bufferLength;j<=1&&(j===0||I.pc(k))&&this._flushBuffer(),this._buffer[this._bufferLength++]=k}appendASCII(k){this._bufferLength===this._capacity&&this._flushBuffer(),this._buffer[this._bufferLength++]=k}appendASCIIString(k){const j=k.length;if(this._bufferLength+j>=this._capacity){this._flushBuffer(),this._completedStrings[this._completedStrings.length]=k;return}for(let N=0;N<j;N++)this._buffer[this._bufferLength++]=k.charCodeAt(N)}}class D{constructor(){this._pieces=[],this._piecesLen=0}reset(){this._pieces=[],this._piecesLen=0}build(){return this._pieces.join("")}write1(k){this._pieces[this._piecesLen++]=String.fromCharCode(k)}appendASCII(k){this._pieces[this._piecesLen++]=String.fromCharCode(k)}appendASCIIString(k){this._pieces[this._piecesLen++]=k}}},6949:(Tt,Fe,f)=>{f.d(Fe,{k:()=>$,x:()=>x});var I=f(42802),h=f(54324);function te(Q){return Q.replace(/\n/g,"\\n").replace(/\r/g,"\\r")}class ${constructor(J,z,S,_){this.oldPosition=J,this.oldText=z,this.newPosition=S,this.newText=_}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}toString(){return this.oldText.length===0?`(insert@${this.oldPosition} "${te(this.newText)}")`:this.newText.length===0?`(delete@${this.oldPosition} "${te(this.oldText)}")`:`(replace@${this.oldPosition} "${te(this.oldText)}" with "${te(this.newText)}")`}static _writeStringSize(J){return 4+2*J.length}static _writeString(J,z,S){const _=z.length;I.Sw(J,_,S),S+=4;for(let y=0;y<_;y++)I.gN(J,z.charCodeAt(y),S),S+=2;return S}static _readString(J,z){const S=I.bb(J,z);return z+=4,(0,h.Su)(J,z,S)}writeSize(){return 4+4+$._writeStringSize(this.oldText)+$._writeStringSize(this.newText)}write(J,z){return I.Sw(J,this.oldPosition,z),z+=4,I.Sw(J,this.newPosition,z),z+=4,z=$._writeString(J,this.oldText,z),z=$._writeString(J,this.newText,z),z}static read(J,z,S){const _=I.bb(J,z);z+=4;const y=I.bb(J,z);z+=4;const C=$._readString(J,z);z+=$._writeStringSize(C);const d=$._readString(J,z);return z+=$._writeStringSize(d),S.push(new $(_,C,y,d)),z}}function x(Q,J){return Q===null||Q.length===0?J:new ie(Q,J).compress()}class ie{constructor(J,z){this._prevEdits=J,this._currEdits=z,this._result=[],this._resultLen=0,this._prevLen=this._prevEdits.length,this._prevDeltaOffset=0,this._currLen=this._currEdits.length,this._currDeltaOffset=0}compress(){let J=0,z=0,S=this._getPrev(J),_=this._getCurr(z);for(;J<this._prevLen||z<this._currLen;){if(S===null){this._acceptCurr(_),_=this._getCurr(++z);continue}if(_===null){this._acceptPrev(S),S=this._getPrev(++J);continue}if(_.oldEnd<=S.newPosition){this._acceptCurr(_),_=this._getCurr(++z);continue}if(S.newEnd<=_.oldPosition){this._acceptPrev(S),S=this._getPrev(++J);continue}if(_.oldPosition<S.newPosition){const[D,L]=ie._splitCurr(_,S.newPosition-_.oldPosition);this._acceptCurr(D),_=L;continue}if(S.newPosition<_.oldPosition){const[D,L]=ie._splitPrev(S,_.oldPosition-S.newPosition);this._acceptPrev(D),S=L;continue}let d,w;if(_.oldEnd===S.newEnd)d=S,w=_,S=this._getPrev(++J),_=this._getCurr(++z);else if(_.oldEnd<S.newEnd){const[D,L]=ie._splitPrev(S,_.oldLength);d=D,w=_,S=L,_=this._getCurr(++z)}else{const[D,L]=ie._splitCurr(_,S.newLength);d=S,w=D,S=this._getPrev(++J),_=L}this._result[this._resultLen++]=new $(d.oldPosition,d.oldText,w.newPosition,w.newText),this._prevDeltaOffset+=d.newLength-d.oldLength,this._currDeltaOffset+=w.newLength-w.oldLength}const y=ie._merge(this._result);return ie._removeNoOps(y)}_acceptCurr(J){this._result[this._resultLen++]=ie._rebaseCurr(this._prevDeltaOffset,J),this._currDeltaOffset+=J.newLength-J.oldLength}_getCurr(J){return J<this._currLen?this._currEdits[J]:null}_acceptPrev(J){this._result[this._resultLen++]=ie._rebasePrev(this._currDeltaOffset,J),this._prevDeltaOffset+=J.newLength-J.oldLength}_getPrev(J){return J<this._prevLen?this._prevEdits[J]:null}static _rebaseCurr(J,z){return new $(z.oldPosition-J,z.oldText,z.newPosition,z.newText)}static _rebasePrev(J,z){return new $(z.oldPosition,z.oldText,z.newPosition+J,z.newText)}static _splitPrev(J,z){const S=J.newText.substr(0,z),_=J.newText.substr(z);return[new $(J.oldPosition,J.oldText,J.newPosition,S),new $(J.oldEnd,"",J.newPosition+z,_)]}static _splitCurr(J,z){const S=J.oldText.substr(0,z),_=J.oldText.substr(z);return[new $(J.oldPosition,S,J.newPosition,J.newText),new $(J.oldPosition+z,_,J.newEnd,"")]}static _merge(J){if(J.length===0)return J;const z=[];let S=0,_=J[0];for(let y=1;y<J.length;y++){const C=J[y];_.oldEnd===C.oldPosition?_=new $(_.oldPosition,_.oldText+C.oldText,_.newPosition,_.newText+C.newText):(z[S++]=_,_=C)}return z[S++]=_,z}static _removeNoOps(J){if(J.length===0)return J;const z=[];let S=0;for(let _=0;_<J.length;_++){const y=J[_];y.oldText!==y.newText&&(z[S++]=y)}return z}}},12590:(Tt,Fe,f)=>{f.d(Fe,{R:()=>I});const I={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0,bracketPairColorizationOptions:{enabled:!0,independentColorPoolPerBracketType:!1}}},82862:(Tt,Fe,f)=>{f.d(Fe,{i:()=>$});var I=f(27454);class h extends I.V{constructor(ie){super(0);for(let Q=0,J=ie.length;Q<J;Q++)this.set(ie.charCodeAt(Q),2);this.set(32,1),this.set(9,1)}}function te(x){const ie={};return Q=>(ie.hasOwnProperty(Q)||(ie[Q]=x(Q)),ie[Q])}const $=te(x=>new h(x))},18782:(Tt,Fe,f)=>{f.d(Fe,{Io:()=>ie,J3:()=>te,Ld:()=>x,Th:()=>J});var I=f(17954),h=f(85525);const te="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function $(S=""){let _="(-?\\d*\\.\\d\\w*)|([^";for(const y of te)S.indexOf(y)>=0||(_+="\\"+y);return _+="\\s]+)",new RegExp(_,"g")}const x=$();function ie(S){let _=x;if(S&&S instanceof RegExp)if(S.global)_=S;else{let y="g";S.ignoreCase&&(y+="i"),S.multiline&&(y+="m"),S.unicode&&(y+="u"),_=new RegExp(S.source,y)}return _.lastIndex=0,_}const Q=new h.w;Q.unshift({maxLen:1e3,windowSize:15,timeBudget:150});function J(S,_,y,C,d){if(d||(d=I.f.first(Q)),y.length>d.maxLen){let j=S-d.maxLen/2;return j<0?j=0:C+=j,y=y.substring(j,S+d.maxLen/2),J(S,_,y,C,d)}const w=Date.now(),D=S-1-C;let L=-1,k=null;for(let j=1;!(Date.now()-w>=d.timeBudget);j++){const N=D-d.windowSize*j;_.lastIndex=Math.max(0,N);const B=z(_,y,D,L);if(!B&&k||(k=B,N<=0))break;L=N}if(k){const j={word:k[0],startColumn:C+1+k.index,endColumn:C+1+k.index+k[0].length};return _.lastIndex=0,j}return null}function z(S,_,y,C){let d;for(;d=S.exec(_);){const w=d.index||0;if(w<=y&&S.lastIndex>=y)return d;if(C>0&&w>C)return null}return null}},71937:(Tt,Fe,f)=>{f.d(Fe,{s:()=>h});var I=f(62549);class h{static whitespaceVisibleColumn($,x,ie){const Q=$.length;let J=0,z=-1,S=-1;for(let _=0;_<Q;_++){if(_===x)return[z,S,J];switch(J%ie===0&&(z=_,S=J),$.charCodeAt(_)){case 32:J+=1;break;case 9:J=I.A.nextRenderTabStop(J,ie);break;default:return[-1,-1,-1]}}return x===Q?[z,S,J]:[-1,-1,-1]}static atomicPosition($,x,ie,Q){const J=$.length,[z,S,_]=h.whitespaceVisibleColumn($,x,ie);if(_===-1)return-1;let y;switch(Q){case 0:y=!0;break;case 1:y=!1;break;case 2:if(_%ie===0)return x;y=_%ie<=ie/2;break}if(y){if(z===-1)return-1;let w=S;for(let D=z;D<J;++D){if(w===S+ie)return z;switch($.charCodeAt(D)){case 32:w+=1;break;case 9:w=I.A.nextRenderTabStop(w,ie);break;default:return-1}}return w===S+ie?z:-1}const C=I.A.nextRenderTabStop(_,ie);let d=_;for(let w=x;w<J;w++){if(d===C)return w;switch($.charCodeAt(w)){case 32:d+=1;break;case 9:d=I.A.nextRenderTabStop(d,ie);break;default:return-1}}return d===C?J:-1}}},97666:(Tt,Fe,f)=>{f.d(Fe,{g:()=>J});var I=f(16844),h=f(66316),te=f(29895),$=f(62549),x=f(50572),ie=f(28061),Q=f(15365);class J{static deleteRight(S,_,y,C){const d=[];let w=S!==3;for(let D=0,L=C.length;D<L;D++){const k=C[D];let j=k;if(j.isEmpty()){const N=k.getPosition(),B=x.I.right(_,y,N);j=new ie.Q(B.lineNumber,B.column,N.lineNumber,N.column)}if(j.isEmpty()){d[D]=null;continue}j.startLineNumber!==j.endLineNumber&&(w=!0),d[D]=new h.iu(j,"")}return[w,d]}static isAutoClosingPairDelete(S,_,y,C,d,w,D){if(_==="never"&&y==="never"||S==="never")return!1;for(let L=0,k=w.length;L<k;L++){const j=w[L],N=j.getPosition();if(!j.isEmpty())return!1;const B=d.getLineContent(N.lineNumber);if(N.column<2||N.column>=B.length+1)return!1;const T=B.charAt(N.column-2),H=C.get(T);if(!H)return!1;if((0,te.vG)(T)){if(y==="never")return!1}else if(_==="never")return!1;const Y=B.charAt(N.column-1);let ee=!1;for(const ce of H)ce.open===T&&ce.close===Y&&(ee=!0);if(!ee)return!1;if(S==="auto"){let ce=!1;for(let pe=0,ge=D.length;pe<ge;pe++){const fe=D[pe];if(N.lineNumber===fe.startLineNumber&&N.column===fe.startColumn){ce=!0;break}}if(!ce)return!1}}return!0}static _runAutoClosingPairDelete(S,_,y){const C=[];for(let d=0,w=y.length;d<w;d++){const D=y[d].getPosition(),L=new ie.Q(D.lineNumber,D.column-1,D.lineNumber,D.column+1);C[d]=new h.iu(L,"")}return[!0,C]}static deleteLeft(S,_,y,C,d){if(this.isAutoClosingPairDelete(_.autoClosingDelete,_.autoClosingBrackets,_.autoClosingQuotes,_.autoClosingPairs.autoClosingPairsOpenByEnd,y,C,d))return this._runAutoClosingPairDelete(_,y,C);const w=[];let D=S!==2;for(let L=0,k=C.length;L<k;L++){const j=J.getDeleteRange(C[L],y,_);if(j.isEmpty()){w[L]=null;continue}j.startLineNumber!==j.endLineNumber&&(D=!0),w[L]=new h.iu(j,"")}return[D,w]}static getDeleteRange(S,_,y){if(!S.isEmpty())return S;const C=S.getPosition();if(y.useTabStops&&C.column>1){const d=_.getLineContent(C.lineNumber),w=I.HG(d),D=w===-1?d.length+1:w+1;if(C.column<=D){const L=y.visibleColumnFromColumn(_,C),k=$.A.prevIndentTabStop(L,y.indentSize),j=y.columnFromVisibleColumn(_,C.lineNumber,k);return new ie.Q(C.lineNumber,j,C.lineNumber,C.column)}}return ie.Q.fromPositions(J.getPositionAfterDeleteLeft(C,_),C)}static getPositionAfterDeleteLeft(S,_){if(S.column>1){const y=I.Wd(S.column-1,_.getLineContent(S.lineNumber));return S.with(void 0,y+1)}else if(S.lineNumber>1){const y=S.lineNumber-1;return new Q.y(y,_.getLineMaxColumn(y))}else return S}static cut(S,_,y){const C=[];let d=null;y.sort((w,D)=>Q.y.compare(w.getStartPosition(),D.getEndPosition()));for(let w=0,D=y.length;w<D;w++){const L=y[w];if(L.isEmpty())if(S.emptySelectionClipboard){const k=L.getPosition();let j,N,B,T;k.lineNumber<_.getLineCount()?(j=k.lineNumber,N=1,B=k.lineNumber+1,T=1):k.lineNumber>1&&d?.endLineNumber!==k.lineNumber?(j=k.lineNumber-1,N=_.getLineMaxColumn(k.lineNumber-1),B=k.lineNumber,T=_.getLineMaxColumn(k.lineNumber)):(j=k.lineNumber,N=1,B=k.lineNumber,T=_.getLineMaxColumn(k.lineNumber));const H=new ie.Q(j,N,B,T);d=H,H.isEmpty()?C[w]=null:C[w]=new h.iu(H,"")}else C[w]=null;else C[w]=new h.iu(L,"")}return new te.vY(0,C,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}}},27064:(Tt,Fe,f)=>{f.d(Fe,{S:()=>J,c:()=>Q});var I=f(79359),h=f(29895),te=f(50572),$=f(89673),x=f(15365),ie=f(28061);class Q{static addCursorDown(S,_,y){const C=[];let d=0;for(let w=0,D=_.length;w<D;w++){const L=_[w];C[d++]=new h.MF(L.modelState,L.viewState),y?C[d++]=h.MF.fromModelState(te.I.translateDown(S.cursorConfig,S.model,L.modelState)):C[d++]=h.MF.fromViewState(te.I.translateDown(S.cursorConfig,S,L.viewState))}return C}static addCursorUp(S,_,y){const C=[];let d=0;for(let w=0,D=_.length;w<D;w++){const L=_[w];C[d++]=new h.MF(L.modelState,L.viewState),y?C[d++]=h.MF.fromModelState(te.I.translateUp(S.cursorConfig,S.model,L.modelState)):C[d++]=h.MF.fromViewState(te.I.translateUp(S.cursorConfig,S,L.viewState))}return C}static moveToBeginningOfLine(S,_,y){const C=[];for(let d=0,w=_.length;d<w;d++){const D=_[d];C[d]=this._moveToLineStart(S,D,y)}return C}static _moveToLineStart(S,_,y){const C=_.viewState.position.column,d=_.modelState.position.column,w=C===d,D=_.viewState.position.lineNumber,L=S.getLineFirstNonWhitespaceColumn(D);return!w&&!(C===L)?this._moveToLineStartByView(S,_,y):this._moveToLineStartByModel(S,_,y)}static _moveToLineStartByView(S,_,y){return h.MF.fromViewState(te.I.moveToBeginningOfLine(S.cursorConfig,S,_.viewState,y))}static _moveToLineStartByModel(S,_,y){return h.MF.fromModelState(te.I.moveToBeginningOfLine(S.cursorConfig,S.model,_.modelState,y))}static moveToEndOfLine(S,_,y,C){const d=[];for(let w=0,D=_.length;w<D;w++){const L=_[w];d[w]=this._moveToLineEnd(S,L,y,C)}return d}static _moveToLineEnd(S,_,y,C){const d=_.viewState.position,w=S.getLineMaxColumn(d.lineNumber),D=d.column===w,L=_.modelState.position,k=S.model.getLineMaxColumn(L.lineNumber),j=w-d.column===k-L.column;return D||j?this._moveToLineEndByModel(S,_,y,C):this._moveToLineEndByView(S,_,y,C)}static _moveToLineEndByView(S,_,y,C){return h.MF.fromViewState(te.I.moveToEndOfLine(S.cursorConfig,S,_.viewState,y,C))}static _moveToLineEndByModel(S,_,y,C){return h.MF.fromModelState(te.I.moveToEndOfLine(S.cursorConfig,S.model,_.modelState,y,C))}static expandLineSelection(S,_){const y=[];for(let C=0,d=_.length;C<d;C++){const w=_[C],D=w.modelState.selection.startLineNumber,L=S.model.getLineCount();let k=w.modelState.selection.endLineNumber,j;k===L?j=S.model.getLineMaxColumn(L):(k++,j=1),y[C]=h.MF.fromModelState(new h.mG(new ie.Q(D,1,D,1),0,new x.y(k,j),0))}return y}static moveToBeginningOfBuffer(S,_,y){const C=[];for(let d=0,w=_.length;d<w;d++){const D=_[d];C[d]=h.MF.fromModelState(te.I.moveToBeginningOfBuffer(S.cursorConfig,S.model,D.modelState,y))}return C}static moveToEndOfBuffer(S,_,y){const C=[];for(let d=0,w=_.length;d<w;d++){const D=_[d];C[d]=h.MF.fromModelState(te.I.moveToEndOfBuffer(S.cursorConfig,S.model,D.modelState,y))}return C}static selectAll(S,_){const y=S.model.getLineCount(),C=S.model.getLineMaxColumn(y);return h.MF.fromModelState(new h.mG(new ie.Q(1,1,1,1),0,new x.y(y,C),0))}static line(S,_,y,C,d){const w=S.model.validatePosition(C),D=d?S.coordinatesConverter.validateViewPosition(new x.y(d.lineNumber,d.column),w):S.coordinatesConverter.convertModelPositionToViewPosition(w);if(!y||!_.modelState.hasSelection()){const k=S.model.getLineCount();let j=w.lineNumber+1,N=1;return j>k&&(j=k,N=S.model.getLineMaxColumn(j)),h.MF.fromModelState(new h.mG(new ie.Q(w.lineNumber,1,j,N),0,new x.y(j,N),0))}const L=_.modelState.selectionStart.getStartPosition().lineNumber;if(w.lineNumber<L)return h.MF.fromViewState(_.viewState.move(_.modelState.hasSelection(),D.lineNumber,1,0));if(w.lineNumber>L){const k=S.getLineCount();let j=D.lineNumber+1,N=1;return j>k&&(j=k,N=S.getLineMaxColumn(j)),h.MF.fromViewState(_.viewState.move(_.modelState.hasSelection(),j,N,0))}else{const k=_.modelState.selectionStart.getEndPosition();return h.MF.fromModelState(_.modelState.move(_.modelState.hasSelection(),k.lineNumber,k.column,0))}}static word(S,_,y,C){const d=S.model.validatePosition(C);return h.MF.fromModelState($.z.word(S.cursorConfig,S.model,_.modelState,y,d))}static cancelSelection(S,_){if(!_.modelState.hasSelection())return new h.MF(_.modelState,_.viewState);const y=_.viewState.position.lineNumber,C=_.viewState.position.column;return h.MF.fromViewState(new h.mG(new ie.Q(y,C,y,C),0,new x.y(y,C),0))}static moveTo(S,_,y,C,d){const w=S.model.validatePosition(C),D=d?S.coordinatesConverter.validateViewPosition(new x.y(d.lineNumber,d.column),w):S.coordinatesConverter.convertModelPositionToViewPosition(w);return h.MF.fromViewState(_.viewState.move(y,D.lineNumber,D.column,0))}static simpleMove(S,_,y,C,d,w){switch(y){case 0:return w===4?this._moveHalfLineLeft(S,_,C):this._moveLeft(S,_,C,d);case 1:return w===4?this._moveHalfLineRight(S,_,C):this._moveRight(S,_,C,d);case 2:return w===2?this._moveUpByViewLines(S,_,C,d):this._moveUpByModelLines(S,_,C,d);case 3:return w===2?this._moveDownByViewLines(S,_,C,d):this._moveDownByModelLines(S,_,C,d);case 4:return w===2?_.map(D=>h.MF.fromViewState(te.I.moveToPrevBlankLine(S.cursorConfig,S,D.viewState,C))):_.map(D=>h.MF.fromModelState(te.I.moveToPrevBlankLine(S.cursorConfig,S.model,D.modelState,C)));case 5:return w===2?_.map(D=>h.MF.fromViewState(te.I.moveToNextBlankLine(S.cursorConfig,S,D.viewState,C))):_.map(D=>h.MF.fromModelState(te.I.moveToNextBlankLine(S.cursorConfig,S.model,D.modelState,C)));case 6:return this._moveToViewMinColumn(S,_,C);case 7:return this._moveToViewFirstNonWhitespaceColumn(S,_,C);case 8:return this._moveToViewCenterColumn(S,_,C);case 9:return this._moveToViewMaxColumn(S,_,C);case 10:return this._moveToViewLastNonWhitespaceColumn(S,_,C);default:return null}}static viewportMove(S,_,y,C,d){const w=S.getCompletelyVisibleViewRange(),D=S.coordinatesConverter.convertViewRangeToModelRange(w);switch(y){case 11:{const L=this._firstLineNumberInRange(S.model,D,d),k=S.model.getLineFirstNonWhitespaceColumn(L);return[this._moveToModelPosition(S,_[0],C,L,k)]}case 13:{const L=this._lastLineNumberInRange(S.model,D,d),k=S.model.getLineFirstNonWhitespaceColumn(L);return[this._moveToModelPosition(S,_[0],C,L,k)]}case 12:{const L=Math.round((D.startLineNumber+D.endLineNumber)/2),k=S.model.getLineFirstNonWhitespaceColumn(L);return[this._moveToModelPosition(S,_[0],C,L,k)]}case 14:{const L=[];for(let k=0,j=_.length;k<j;k++){const N=_[k];L[k]=this.findPositionInViewportIfOutside(S,N,w,C)}return L}default:return null}}static findPositionInViewportIfOutside(S,_,y,C){const d=_.viewState.position.lineNumber;if(y.startLineNumber<=d&&d<=y.endLineNumber-1)return new h.MF(_.modelState,_.viewState);{let w;d>y.endLineNumber-1?w=y.endLineNumber-1:d<y.startLineNumber?w=y.startLineNumber:w=d;const D=te.I.vertical(S.cursorConfig,S,d,_.viewState.position.column,_.viewState.leftoverVisibleColumns,w,!1);return h.MF.fromViewState(_.viewState.move(C,D.lineNumber,D.column,D.leftoverVisibleColumns))}}static _firstLineNumberInRange(S,_,y){let C=_.startLineNumber;return _.startColumn!==S.getLineMinColumn(C)&&C++,Math.min(_.endLineNumber,C+y-1)}static _lastLineNumberInRange(S,_,y){let C=_.startLineNumber;return _.startColumn!==S.getLineMinColumn(C)&&C++,Math.max(C,_.endLineNumber-y+1)}static _moveLeft(S,_,y,C){return _.map(d=>h.MF.fromViewState(te.I.moveLeft(S.cursorConfig,S,d.viewState,y,C)))}static _moveHalfLineLeft(S,_,y){const C=[];for(let d=0,w=_.length;d<w;d++){const D=_[d],L=D.viewState.position.lineNumber,k=Math.round(S.getLineContent(L).length/2);C[d]=h.MF.fromViewState(te.I.moveLeft(S.cursorConfig,S,D.viewState,y,k))}return C}static _moveRight(S,_,y,C){return _.map(d=>h.MF.fromViewState(te.I.moveRight(S.cursorConfig,S,d.viewState,y,C)))}static _moveHalfLineRight(S,_,y){const C=[];for(let d=0,w=_.length;d<w;d++){const D=_[d],L=D.viewState.position.lineNumber,k=Math.round(S.getLineContent(L).length/2);C[d]=h.MF.fromViewState(te.I.moveRight(S.cursorConfig,S,D.viewState,y,k))}return C}static _moveDownByViewLines(S,_,y,C){const d=[];for(let w=0,D=_.length;w<D;w++){const L=_[w];d[w]=h.MF.fromViewState(te.I.moveDown(S.cursorConfig,S,L.viewState,y,C))}return d}static _moveDownByModelLines(S,_,y,C){const d=[];for(let w=0,D=_.length;w<D;w++){const L=_[w];d[w]=h.MF.fromModelState(te.I.moveDown(S.cursorConfig,S.model,L.modelState,y,C))}return d}static _moveUpByViewLines(S,_,y,C){const d=[];for(let w=0,D=_.length;w<D;w++){const L=_[w];d[w]=h.MF.fromViewState(te.I.moveUp(S.cursorConfig,S,L.viewState,y,C))}return d}static _moveUpByModelLines(S,_,y,C){const d=[];for(let w=0,D=_.length;w<D;w++){const L=_[w];d[w]=h.MF.fromModelState(te.I.moveUp(S.cursorConfig,S.model,L.modelState,y,C))}return d}static _moveToViewPosition(S,_,y,C,d){return h.MF.fromViewState(_.viewState.move(y,C,d,0))}static _moveToModelPosition(S,_,y,C,d){return h.MF.fromModelState(_.modelState.move(y,C,d,0))}static _moveToViewMinColumn(S,_,y){const C=[];for(let d=0,w=_.length;d<w;d++){const D=_[d],L=D.viewState.position.lineNumber,k=S.getLineMinColumn(L);C[d]=this._moveToViewPosition(S,D,y,L,k)}return C}static _moveToViewFirstNonWhitespaceColumn(S,_,y){const C=[];for(let d=0,w=_.length;d<w;d++){const D=_[d],L=D.viewState.position.lineNumber,k=S.getLineFirstNonWhitespaceColumn(L);C[d]=this._moveToViewPosition(S,D,y,L,k)}return C}static _moveToViewCenterColumn(S,_,y){const C=[];for(let d=0,w=_.length;d<w;d++){const D=_[d],L=D.viewState.position.lineNumber,k=Math.round((S.getLineMaxColumn(L)+S.getLineMinColumn(L))/2);C[d]=this._moveToViewPosition(S,D,y,L,k)}return C}static _moveToViewMaxColumn(S,_,y){const C=[];for(let d=0,w=_.length;d<w;d++){const D=_[d],L=D.viewState.position.lineNumber,k=S.getLineMaxColumn(L);C[d]=this._moveToViewPosition(S,D,y,L,k)}return C}static _moveToViewLastNonWhitespaceColumn(S,_,y){const C=[];for(let d=0,w=_.length;d<w;d++){const D=_[d],L=D.viewState.position.lineNumber,k=S.getLineLastNonWhitespaceColumn(L);C[d]=this._moveToViewPosition(S,D,y,L,k)}return C}}var J;(function(z){const S=function(y){if(!I.Gv(y))return!1;const C=y;return!(!I.Kg(C.to)||!I.b0(C.select)&&!I.Lm(C.select)||!I.b0(C.by)&&!I.Kg(C.by)||!I.b0(C.value)&&!I.Et(C.value))};z.description={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:S,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}}}}]},z.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"},z.RawUnit={Line:"line",WrappedLine:"wrappedLine",Character:"character",HalfLine:"halfLine"};function _(y){if(!y.to)return null;let C;switch(y.to){case z.RawDirection.Left:C=0;break;case z.RawDirection.Right:C=1;break;case z.RawDirection.Up:C=2;break;case z.RawDirection.Down:C=3;break;case z.RawDirection.PrevBlankLine:C=4;break;case z.RawDirection.NextBlankLine:C=5;break;case z.RawDirection.WrappedLineStart:C=6;break;case z.RawDirection.WrappedLineFirstNonWhitespaceCharacter:C=7;break;case z.RawDirection.WrappedLineColumnCenter:C=8;break;case z.RawDirection.WrappedLineEnd:C=9;break;case z.RawDirection.WrappedLineLastNonWhitespaceCharacter:C=10;break;case z.RawDirection.ViewPortTop:C=11;break;case z.RawDirection.ViewPortBottom:C=13;break;case z.RawDirection.ViewPortCenter:C=12;break;case z.RawDirection.ViewPortIfOutside:C=14;break;default:return null}let d=0;switch(y.by){case z.RawUnit.Line:d=1;break;case z.RawUnit.WrappedLine:d=2;break;case z.RawUnit.Character:d=3;break;case z.RawUnit.HalfLine:d=4;break}return{direction:C,unit:d,select:!!y.select,value:y.value||1}}z.parse=_})(J||(J={}))},50572:(Tt,Fe,f)=>{f.d(Fe,{I:()=>J});var I=f(29895),h=f(62549),te=f(15365),$=f(28061),x=f(16844),ie=f(71937);class Q{constructor(S,_,y){this._cursorPositionBrand=void 0,this.lineNumber=S,this.column=_,this.leftoverVisibleColumns=y}}class J{static leftPosition(S,_){if(_.column>S.getLineMinColumn(_.lineNumber))return _.delta(void 0,-x.MV(S.getLineContent(_.lineNumber),_.column-1));if(_.lineNumber>1){const y=_.lineNumber-1;return new te.y(y,S.getLineMaxColumn(y))}else return _}static leftPositionAtomicSoftTabs(S,_,y){if(_.column<=S.getLineIndentColumn(_.lineNumber)){const C=S.getLineMinColumn(_.lineNumber),d=S.getLineContent(_.lineNumber),w=ie.s.atomicPosition(d,_.column-1,y,0);if(w!==-1&&w+1>=C)return new te.y(_.lineNumber,w+1)}return this.leftPosition(S,_)}static left(S,_,y){const C=S.stickyTabStops?J.leftPositionAtomicSoftTabs(_,y,S.tabSize):J.leftPosition(_,y);return new Q(C.lineNumber,C.column,0)}static moveLeft(S,_,y,C,d){let w,D;if(y.hasSelection()&&!C)w=y.selection.startLineNumber,D=y.selection.startColumn;else{const L=y.position.delta(void 0,-(d-1)),k=_.normalizePosition(J.clipPositionColumn(L,_),0),j=J.left(S,_,k);w=j.lineNumber,D=j.column}return y.move(C,w,D,0)}static clipPositionColumn(S,_){return new te.y(S.lineNumber,J.clipRange(S.column,_.getLineMinColumn(S.lineNumber),_.getLineMaxColumn(S.lineNumber)))}static clipRange(S,_,y){return S<_?_:S>y?y:S}static rightPosition(S,_,y){return y<S.getLineMaxColumn(_)?y=y+x.iy(S.getLineContent(_),y-1):_<S.getLineCount()&&(_=_+1,y=S.getLineMinColumn(_)),new te.y(_,y)}static rightPositionAtomicSoftTabs(S,_,y,C,d){if(y<S.getLineIndentColumn(_)){const w=S.getLineContent(_),D=ie.s.atomicPosition(w,y-1,C,1);if(D!==-1)return new te.y(_,D+1)}return this.rightPosition(S,_,y)}static right(S,_,y){const C=S.stickyTabStops?J.rightPositionAtomicSoftTabs(_,y.lineNumber,y.column,S.tabSize,S.indentSize):J.rightPosition(_,y.lineNumber,y.column);return new Q(C.lineNumber,C.column,0)}static moveRight(S,_,y,C,d){let w,D;if(y.hasSelection()&&!C)w=y.selection.endLineNumber,D=y.selection.endColumn;else{const L=y.position.delta(void 0,d-1),k=_.normalizePosition(J.clipPositionColumn(L,_),1),j=J.right(S,_,k);w=j.lineNumber,D=j.column}return y.move(C,w,D,0)}static vertical(S,_,y,C,d,w,D,L){const k=h.A.visibleColumnFromColumn(_.getLineContent(y),C,S.tabSize)+d,j=_.getLineCount(),N=y===1&&C===1,B=y===j&&C===_.getLineMaxColumn(y),T=w<y?N:B;if(y=w,y<1?(y=1,D?C=_.getLineMinColumn(y):C=Math.min(_.getLineMaxColumn(y),C)):y>j?(y=j,D?C=_.getLineMaxColumn(y):C=Math.min(_.getLineMaxColumn(y),C)):C=S.columnFromVisibleColumn(_,y,k),T?d=0:d=k-h.A.visibleColumnFromColumn(_.getLineContent(y),C,S.tabSize),L!==void 0){const H=new te.y(y,C),Y=_.normalizePosition(H,L);d=d+(C-Y.column),y=Y.lineNumber,C=Y.column}return new Q(y,C,d)}static down(S,_,y,C,d,w,D){return this.vertical(S,_,y,C,d,y+w,D,4)}static moveDown(S,_,y,C,d){let w,D;y.hasSelection()&&!C?(w=y.selection.endLineNumber,D=y.selection.endColumn):(w=y.position.lineNumber,D=y.position.column);const L=J.down(S,_,w,D,y.leftoverVisibleColumns,d,!0);return y.move(C,L.lineNumber,L.column,L.leftoverVisibleColumns)}static translateDown(S,_,y){const C=y.selection,d=J.down(S,_,C.selectionStartLineNumber,C.selectionStartColumn,y.selectionStartLeftoverVisibleColumns,1,!1),w=J.down(S,_,C.positionLineNumber,C.positionColumn,y.leftoverVisibleColumns,1,!1);return new I.mG(new $.Q(d.lineNumber,d.column,d.lineNumber,d.column),d.leftoverVisibleColumns,new te.y(w.lineNumber,w.column),w.leftoverVisibleColumns)}static up(S,_,y,C,d,w,D){return this.vertical(S,_,y,C,d,y-w,D,3)}static moveUp(S,_,y,C,d){let w,D;y.hasSelection()&&!C?(w=y.selection.startLineNumber,D=y.selection.startColumn):(w=y.position.lineNumber,D=y.position.column);const L=J.up(S,_,w,D,y.leftoverVisibleColumns,d,!0);return y.move(C,L.lineNumber,L.column,L.leftoverVisibleColumns)}static translateUp(S,_,y){const C=y.selection,d=J.up(S,_,C.selectionStartLineNumber,C.selectionStartColumn,y.selectionStartLeftoverVisibleColumns,1,!1),w=J.up(S,_,C.positionLineNumber,C.positionColumn,y.leftoverVisibleColumns,1,!1);return new I.mG(new $.Q(d.lineNumber,d.column,d.lineNumber,d.column),d.leftoverVisibleColumns,new te.y(w.lineNumber,w.column),w.leftoverVisibleColumns)}static _isBlankLine(S,_){return S.getLineFirstNonWhitespaceColumn(_)===0}static moveToPrevBlankLine(S,_,y,C){let d=y.position.lineNumber;for(;d>1&&this._isBlankLine(_,d);)d--;for(;d>1&&!this._isBlankLine(_,d);)d--;return y.move(C,d,_.getLineMinColumn(d),0)}static moveToNextBlankLine(S,_,y,C){const d=_.getLineCount();let w=y.position.lineNumber;for(;w<d&&this._isBlankLine(_,w);)w++;for(;w<d&&!this._isBlankLine(_,w);)w++;return y.move(C,w,_.getLineMinColumn(w),0)}static moveToBeginningOfLine(S,_,y,C){const d=y.position.lineNumber,w=_.getLineMinColumn(d),D=_.getLineFirstNonWhitespaceColumn(d)||w;let L;return y.position.column===D?L=w:L=D,y.move(C,d,L,0)}static moveToEndOfLine(S,_,y,C,d){const w=y.position.lineNumber,D=_.getLineMaxColumn(w);return y.move(C,w,D,d?1073741824-D:0)}static moveToBeginningOfBuffer(S,_,y,C){return y.move(C,1,1,0)}static moveToEndOfBuffer(S,_,y,C){const d=_.getLineCount(),w=_.getLineMaxColumn(d);return y.move(C,d,w,0)}}},61710:(Tt,Fe,f)=>{f.d(Fe,{vS:()=>j,TK:()=>L,yl:()=>k});var I=f(94327),h=f(16844),te=f(66316),$=f(41672),x=f(28061),ie=f(93702);class Q{constructor(ee,ce,pe){this._range=ee,this._charBeforeSelection=ce,this._charAfterSelection=pe}getEditOperations(ee,ce){ce.addTrackedEditOperation(new x.Q(this._range.startLineNumber,this._range.startColumn,this._range.startLineNumber,this._range.startColumn),this._charBeforeSelection),ce.addTrackedEditOperation(new x.Q(this._range.endLineNumber,this._range.endColumn,this._range.endLineNumber,this._range.endColumn),this._charAfterSelection)}computeCursorState(ee,ce){const pe=ce.getInverseEditOperations(),ge=pe[0].range,fe=pe[1].range;return new ie.L(ge.endLineNumber,ge.endColumn,fe.endLineNumber,fe.endColumn-this._charAfterSelection.length)}}class J{constructor(ee,ce,pe){this._position=ee,this._text=ce,this._charAfter=pe}getEditOperations(ee,ce){ce.addTrackedEditOperation(new x.Q(this._position.lineNumber,this._position.column,this._position.lineNumber,this._position.column),this._text+this._charAfter)}computeCursorState(ee,ce){const ge=ce.getInverseEditOperations()[0].range;return new ie.L(ge.endLineNumber,ge.startColumn,ge.endLineNumber,ge.endColumn-this._charAfter.length)}}var z=f(29895),S=f(82862),_=f(15365),y=f(49550),C=f(52394),d=f(19184),w=f(70645),D=f(80794);class L{static indent(ee,ce,pe){if(ce===null||pe===null)return[];const ge=[];for(let fe=0,oe=pe.length;fe<oe;fe++)ge[fe]=new $.Y(pe[fe],{isUnshift:!1,tabSize:ee.tabSize,indentSize:ee.indentSize,insertSpaces:ee.insertSpaces,useTabStops:ee.useTabStops,autoIndent:ee.autoIndent},ee.languageConfigurationService);return ge}static outdent(ee,ce,pe){const ge=[];for(let fe=0,oe=pe.length;fe<oe;fe++)ge[fe]=new $.Y(pe[fe],{isUnshift:!0,tabSize:ee.tabSize,indentSize:ee.indentSize,insertSpaces:ee.insertSpaces,useTabStops:ee.useTabStops,autoIndent:ee.autoIndent},ee.languageConfigurationService);return ge}static shiftIndent(ee,ce,pe){return pe=pe||1,$.Y.shiftIndent(ce,ce.length+pe,ee.tabSize,ee.indentSize,ee.insertSpaces)}static unshiftIndent(ee,ce,pe){return pe=pe||1,$.Y.unshiftIndent(ce,ce.length+pe,ee.tabSize,ee.indentSize,ee.insertSpaces)}static _distributedPaste(ee,ce,pe,ge){const fe=[];for(let oe=0,Z=pe.length;oe<Z;oe++)fe[oe]=new te.iu(pe[oe],ge[oe]);return new z.vY(0,fe,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _simplePaste(ee,ce,pe,ge,fe){const oe=[];for(let Z=0,le=pe.length;Z<le;Z++){const se=pe[Z],X=se.getPosition();if(fe&&!se.isEmpty()&&(fe=!1),fe&&ge.indexOf(` `)!==ge.length-1&&(fe=!1),fe){const K=new x.Q(X.lineNumber,1,X.lineNumber,1);oe[Z]=new te.ui(K,ge,se,!0)}else oe[Z]=new te.iu(se,ge)}return new z.vY(0,oe,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _distributePasteToCursors(ee,ce,pe,ge,fe){if(ge||ce.length===1)return null;if(fe&&fe.length===ce.length)return fe;if(ee.multiCursorPaste==="spread"){pe.charCodeAt(pe.length-1)===10&&(pe=pe.substr(0,pe.length-1)),pe.charCodeAt(pe.length-1)===13&&(pe=pe.substr(0,pe.length-1));const oe=h.uz(pe);if(oe.length===ce.length)return oe}return null}static paste(ee,ce,pe,ge,fe,oe){const Z=this._distributePasteToCursors(ee,pe,ge,fe,oe);return Z?(pe=pe.sort(x.Q.compareRangesUsingStarts),this._distributedPaste(ee,ce,pe,Z)):this._simplePaste(ee,ce,pe,ge,fe)}static _goodIndentForLine(ee,ce,pe){let ge=null,fe="";const oe=(0,w.vn)(ee.autoIndent,ce,pe,!1,ee.languageConfigurationService);if(oe)ge=oe.action,fe=oe.indentation;else if(pe>1){let Z;for(Z=pe-1;Z>=1;Z--){const X=ce.getLineContent(Z);if(h.lT(X)>=0)break}if(Z<1)return null;const le=ce.getLineMaxColumn(Z),se=(0,D.h)(ee.autoIndent,ce,new x.Q(Z,le,Z,le),ee.languageConfigurationService);se&&(fe=se.indentation+se.appendText)}return ge&&(ge===y.l.Indent&&(fe=L.shiftIndent(ee,fe)),ge===y.l.Outdent&&(fe=L.unshiftIndent(ee,fe)),fe=ee.normalizeIndentation(fe)),fe||null}static _replaceJumpToNextIndent(ee,ce,pe,ge){let fe="";const oe=pe.getStartPosition();if(ee.insertSpaces){const Z=ee.visibleColumnFromColumn(ce,oe),le=ee.indentSize,se=le-Z%le;for(let X=0;X<se;X++)fe+=" "}else fe=" ";return new te.iu(pe,fe,ge)}static tab(ee,ce,pe){const ge=[];for(let fe=0,oe=pe.length;fe<oe;fe++){const Z=pe[fe];if(Z.isEmpty()){const le=ce.getLineContent(Z.startLineNumber);if(/^\s*$/.test(le)&&ce.tokenization.isCheapToTokenize(Z.startLineNumber)){let se=this._goodIndentForLine(ee,ce,Z.startLineNumber);se=se||" ";const X=ee.normalizeIndentation(se);if(!le.startsWith(X)){ge[fe]=new te.iu(new x.Q(Z.startLineNumber,1,Z.startLineNumber,le.length+1),X,!0);continue}}ge[fe]=this._replaceJumpToNextIndent(ee,ce,Z,!0)}else{if(Z.startLineNumber===Z.endLineNumber){const le=ce.getLineMaxColumn(Z.startLineNumber);if(Z.startColumn!==1||Z.endColumn!==le){ge[fe]=this._replaceJumpToNextIndent(ee,ce,Z,!1);continue}}ge[fe]=new $.Y(Z,{isUnshift:!1,tabSize:ee.tabSize,indentSize:ee.indentSize,insertSpaces:ee.insertSpaces,useTabStops:ee.useTabStops,autoIndent:ee.autoIndent},ee.languageConfigurationService)}}return ge}static compositionType(ee,ce,pe,ge,fe,oe,Z,le){const se=ge.map(X=>this._compositionType(pe,X,fe,oe,Z,le));return new z.vY(4,se,{shouldPushStackElementBefore:B(ee,4),shouldPushStackElementAfter:!1})}static _compositionType(ee,ce,pe,ge,fe,oe){if(!ce.isEmpty())return null;const Z=ce.getPosition(),le=Math.max(1,Z.column-ge),se=Math.min(ee.getLineMaxColumn(Z.lineNumber),Z.column+fe),X=new x.Q(Z.lineNumber,le,Z.lineNumber,se);return ee.getValueInRange(X)===pe&&oe===0?null:new te.iP(X,pe,0,oe)}static _typeCommand(ee,ce,pe){return pe?new te.q2(ee,ce,!0):new te.iu(ee,ce,!0)}static _enter(ee,ce,pe,ge){if(ee.autoIndent===0)return L._typeCommand(ge,` `,pe);if(!ce.tokenization.isCheapToTokenize(ge.getStartPosition().lineNumber)||ee.autoIndent===1){const le=ce.getLineContent(ge.startLineNumber),se=h.UU(le).substring(0,ge.startColumn-1);return L._typeCommand(ge,` `+ee.normalizeIndentation(se),pe)}const fe=(0,D.h)(ee.autoIndent,ce,ge,ee.languageConfigurationService);if(fe){if(fe.indentAction===y.l.None)return L._typeCommand(ge,` `+ee.normalizeIndentation(fe.indentation+fe.appendText),pe);if(fe.indentAction===y.l.Indent)return L._typeCommand(ge,` `+ee.normalizeIndentation(fe.indentation+fe.appendText),pe);if(fe.indentAction===y.l.IndentOutdent){const le=ee.normalizeIndentation(fe.indentation),se=ee.normalizeIndentation(fe.indentation+fe.appendText),X=` `+se+` `+le;return pe?new te.q2(ge,X,!0):new te.iP(ge,X,-1,se.length-le.length,!0)}else if(fe.indentAction===y.l.Outdent){const le=L.unshiftIndent(ee,fe.indentation);return L._typeCommand(ge,` `+ee.normalizeIndentation(le+fe.appendText),pe)}}const oe=ce.getLineContent(ge.startLineNumber),Z=h.UU(oe).substring(0,ge.startColumn-1);if(ee.autoIndent>=4){const le=(0,w.MU)(ee.autoIndent,ce,ge,{unshiftIndent:se=>L.unshiftIndent(ee,se),shiftIndent:se=>L.shiftIndent(ee,se),normalizeIndentation:se=>ee.normalizeIndentation(se)},ee.languageConfigurationService);if(le){let se=ee.visibleColumnFromColumn(ce,ge.getEndPosition());const X=ge.endColumn,K=ce.getLineContent(ge.endLineNumber),he=h.HG(K);if(he>=0?ge=ge.setEndPosition(ge.endLineNumber,Math.max(ge.endColumn,he+1)):ge=ge.setEndPosition(ge.endLineNumber,ce.getLineMaxColumn(ge.endLineNumber)),pe)return new te.q2(ge,` `+ee.normalizeIndentation(le.afterEnter),!0);{let ve=0;return X<=he+1&&(ee.insertSpaces||(se=Math.ceil(se/ee.indentSize)),ve=Math.min(se+1-ee.normalizeIndentation(le.afterEnter).length-1,0)),new te.iP(ge,` `+ee.normalizeIndentation(le.afterEnter),0,ve,!0)}}}return L._typeCommand(ge,` `+ee.normalizeIndentation(Z),pe)}static _isAutoIndentType(ee,ce,pe){if(ee.autoIndent<4)return!1;for(let ge=0,fe=pe.length;ge<fe;ge++)if(!ce.tokenization.isCheapToTokenize(pe[ge].getEndPosition().lineNumber))return!1;return!0}static _runAutoIndentType(ee,ce,pe,ge){const fe=(0,C.Cw)(ce,pe.startLineNumber,pe.startColumn),oe=(0,w._t)(ee.autoIndent,ce,pe,ge,{shiftIndent:Z=>L.shiftIndent(ee,Z),unshiftIndent:Z=>L.unshiftIndent(ee,Z)},ee.languageConfigurationService);if(oe===null)return null;if(oe!==ee.normalizeIndentation(fe)){const Z=ce.getLineFirstNonWhitespaceColumn(pe.startLineNumber);return Z===0?L._typeCommand(new x.Q(pe.startLineNumber,1,pe.endLineNumber,pe.endColumn),ee.normalizeIndentation(oe)+ge,!1):L._typeCommand(new x.Q(pe.startLineNumber,1,pe.endLineNumber,pe.endColumn),ee.normalizeIndentation(oe)+ce.getLineContent(pe.startLineNumber).substring(Z-1,pe.startColumn-1)+ge,!1)}return null}static _isAutoClosingOvertype(ee,ce,pe,ge,fe){if(ee.autoClosingOvertype==="never"||!ee.autoClosingPairs.autoClosingPairsCloseSingleChar.has(fe))return!1;for(let oe=0,Z=pe.length;oe<Z;oe++){const le=pe[oe];if(!le.isEmpty())return!1;const se=le.getPosition(),X=ce.getLineContent(se.lineNumber);if(X.charAt(se.column-1)!==fe)return!1;const he=(0,z.vG)(fe);if((se.column>2?X.charCodeAt(se.column-2):0)===92&&he)return!1;if(ee.autoClosingOvertype==="auto"){let Ee=!1;for(let O=0,ot=ge.length;O<ot;O++){const lt=ge[O];if(se.lineNumber===lt.startLineNumber&&se.column===lt.startColumn){Ee=!0;break}}if(!Ee)return!1}}return!0}static _runAutoClosingOvertype(ee,ce,pe,ge,fe){const oe=[];for(let Z=0,le=ge.length;Z<le;Z++){const X=ge[Z].getPosition(),K=new x.Q(X.lineNumber,X.column,X.lineNumber,X.column+1);oe[Z]=new te.iu(K,fe)}return new z.vY(4,oe,{shouldPushStackElementBefore:B(ee,4),shouldPushStackElementAfter:!1})}static _isBeforeClosingBrace(ee,ce){const pe=ce.charAt(0),ge=ee.autoClosingPairs.autoClosingPairsOpenByStart.get(pe)||[],fe=ee.autoClosingPairs.autoClosingPairsCloseByStart.get(pe)||[],oe=ge.some(le=>ce.startsWith(le.open)),Z=fe.some(le=>ce.startsWith(le.close));return!oe&&Z}static _findAutoClosingPairOpen(ee,ce,pe,ge){const fe=ee.autoClosingPairs.autoClosingPairsOpenByEnd.get(ge);if(!fe)return null;let oe=null;for(const Z of fe)if(oe===null||Z.open.length>oe.open.length){let le=!0;for(const se of pe)if(ce.getValueInRange(new x.Q(se.lineNumber,se.column-Z.open.length+1,se.lineNumber,se.column))+ge!==Z.open){le=!1;break}le&&(oe=Z)}return oe}static _findContainedAutoClosingPair(ee,ce){if(ce.open.length<=1)return null;const pe=ce.close.charAt(ce.close.length-1),ge=ee.autoClosingPairs.autoClosingPairsCloseByEnd.get(pe)||[];let fe=null;for(const oe of ge)oe.open!==ce.open&&ce.open.includes(oe.open)&&ce.close.endsWith(oe.close)&&(!fe||oe.open.length>fe.open.length)&&(fe=oe);return fe}static _getAutoClosingPairClose(ee,ce,pe,ge,fe){const oe=(0,z.vG)(ge),Z=oe?ee.autoClosingQuotes:ee.autoClosingBrackets,le=oe?ee.shouldAutoCloseBefore.quote:ee.shouldAutoCloseBefore.bracket;if(Z==="never")return null;for(const Ee of pe)if(!Ee.isEmpty())return null;const se=pe.map(Ee=>{const O=Ee.getPosition();return fe?{lineNumber:O.lineNumber,beforeColumn:O.column-ge.length,afterColumn:O.column}:{lineNumber:O.lineNumber,beforeColumn:O.column,afterColumn:O.column}}),X=this._findAutoClosingPairOpen(ee,ce,se.map(Ee=>new _.y(Ee.lineNumber,Ee.beforeColumn)),ge);if(!X)return null;const K=this._findContainedAutoClosingPair(ee,X),he=K?K.close:"";let ve=!0;for(const Ee of se){const{lineNumber:O,beforeColumn:ot,afterColumn:lt}=Ee,We=ce.getLineContent(O),Ke=We.substring(0,ot-1),De=We.substring(lt-1);if(De.startsWith(he)||(ve=!1),De.length>0){const et=De.charAt(0);if(!L._isBeforeClosingBrace(ee,De)&&!le(et))return null}if(X.open.length===1&&(ge==="'"||ge==='"')&&Z!=="always"){const et=(0,S.i)(ee.wordSeparators);if(Ke.length>0){const rt=Ke.charCodeAt(Ke.length-1);if(et.get(rt)===0)return null}}if(!ce.tokenization.isCheapToTokenize(O))return null;ce.tokenization.forceTokenization(O);const Pe=ce.tokenization.getLineTokens(O),Ue=(0,d.BQ)(Pe,ot-1);if(!X.shouldAutoClose(Ue,ot-Ue.firstCharOffset))return null;const Re=X.findNeutralCharacter();if(Re){const et=ce.tokenization.getTokenTypeIfInsertingCharacter(O,ot,Re);if(!X.isOK(et))return null}}return ve?X.close.substring(0,X.close.length-he.length):X.close}static _runAutoClosingOpenCharType(ee,ce,pe,ge,fe,oe,Z){const le=[];for(let se=0,X=ge.length;se<X;se++){const K=ge[se];le[se]=new k(K,fe,!oe,Z)}return new z.vY(4,le,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}static _shouldSurroundChar(ee,ce){return(0,z.vG)(ce)?ee.autoSurround==="quotes"||ee.autoSurround==="languageDefined":ee.autoSurround==="brackets"||ee.autoSurround==="languageDefined"}static _isSurroundSelectionType(ee,ce,pe,ge){if(!L._shouldSurroundChar(ee,ge)||!ee.surroundingPairs.hasOwnProperty(ge))return!1;const fe=(0,z.vG)(ge);for(const oe of pe){if(oe.isEmpty())return!1;let Z=!0;for(let le=oe.startLineNumber;le<=oe.endLineNumber;le++){const se=ce.getLineContent(le),X=le===oe.startLineNumber?oe.startColumn-1:0,K=le===oe.endLineNumber?oe.endColumn-1:se.length,he=se.substring(X,K);if(/[^ \t]/.test(he)){Z=!1;break}}if(Z)return!1;if(fe&&oe.startLineNumber===oe.endLineNumber&&oe.startColumn+1===oe.endColumn){const le=ce.getValueInRange(oe);if((0,z.vG)(le))return!1}}return!0}static _runSurroundSelectionType(ee,ce,pe,ge,fe){const oe=[];for(let Z=0,le=ge.length;Z<le;Z++){const se=ge[Z],X=ce.surroundingPairs[fe];oe[Z]=new Q(se,fe,X)}return new z.vY(0,oe,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _isTypeInterceptorElectricChar(ee,ce,pe){return!!(pe.length===1&&ce.tokenization.isCheapToTokenize(pe[0].getEndPosition().lineNumber))}static _typeInterceptorElectricChar(ee,ce,pe,ge,fe){if(!ce.electricChars.hasOwnProperty(fe)||!ge.isEmpty())return null;const oe=ge.getPosition();pe.tokenization.forceTokenization(oe.lineNumber);const Z=pe.tokenization.getLineTokens(oe.lineNumber);let le;try{le=ce.onElectricCharacter(fe,Z,oe.column)}catch(se){return(0,I.dz)(se),null}if(!le)return null;if(le.matchOpenBracket){const se=(Z.getLineContent()+fe).lastIndexOf(le.matchOpenBracket)+1,X=pe.bracketPairs.findMatchingBracketUp(le.matchOpenBracket,{lineNumber:oe.lineNumber,column:se},500);if(X){if(X.startLineNumber===oe.lineNumber)return null;const K=pe.getLineContent(X.startLineNumber),he=h.UU(K),ve=ce.normalizeIndentation(he),Ee=pe.getLineContent(oe.lineNumber),O=pe.getLineFirstNonWhitespaceColumn(oe.lineNumber)||oe.column,ot=Ee.substring(O-1,oe.column-1),lt=ve+ot+fe,We=new x.Q(oe.lineNumber,1,oe.lineNumber,oe.column),Ke=new te.iu(We,lt);return new z.vY(N(lt,ee),[Ke],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!0})}}return null}static compositionEndWithInterceptors(ee,ce,pe,ge,fe,oe){if(!ge)return null;let Z=null;for(const K of ge)if(Z===null)Z=K.insertedText;else if(Z!==K.insertedText)return null;if(!Z||Z.length!==1)return null;const le=Z;let se=!1;for(const K of ge)if(K.deletedText.length!==0){se=!0;break}if(se){if(!L._shouldSurroundChar(ce,le)||!ce.surroundingPairs.hasOwnProperty(le))return null;const K=(0,z.vG)(le);for(const Ee of ge)if(Ee.deletedSelectionStart!==0||Ee.deletedSelectionEnd!==Ee.deletedText.length||/^[ \t]+$/.test(Ee.deletedText)||K&&(0,z.vG)(Ee.deletedText))return null;const he=[];for(const Ee of fe){if(!Ee.isEmpty())return null;he.push(Ee.getPosition())}if(he.length!==ge.length)return null;const ve=[];for(let Ee=0,O=he.length;Ee<O;Ee++)ve.push(new J(he[Ee],ge[Ee].deletedText,le));return new z.vY(4,ve,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}if(this._isAutoClosingOvertype(ce,pe,fe,oe,le)){const K=fe.map(he=>new te.iu(new x.Q(he.positionLineNumber,he.positionColumn,he.positionLineNumber,he.positionColumn+1),"",!1));return new z.vY(4,K,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}const X=this._getAutoClosingPairClose(ce,pe,fe,le,!0);return X!==null?this._runAutoClosingOpenCharType(ee,ce,pe,fe,le,!0,X):null}static typeWithInterceptors(ee,ce,pe,ge,fe,oe,Z){if(!ee&&Z===` `){const X=[];for(let K=0,he=fe.length;K<he;K++)X[K]=L._enter(pe,ge,!1,fe[K]);return new z.vY(4,X,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}if(!ee&&this._isAutoIndentType(pe,ge,fe)){const X=[];let K=!1;for(let he=0,ve=fe.length;he<ve;he++)if(X[he]=this._runAutoIndentType(pe,ge,fe[he],Z),!X[he]){K=!0;break}if(!K)return new z.vY(4,X,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}if(this._isAutoClosingOvertype(pe,ge,fe,oe,Z))return this._runAutoClosingOvertype(ce,pe,ge,fe,Z);if(!ee){const X=this._getAutoClosingPairClose(pe,ge,fe,Z,!1);if(X)return this._runAutoClosingOpenCharType(ce,pe,ge,fe,Z,!1,X)}if(!ee&&this._isSurroundSelectionType(pe,ge,fe,Z))return this._runSurroundSelectionType(ce,pe,ge,fe,Z);if(!ee&&this._isTypeInterceptorElectricChar(pe,ge,fe)){const X=this._typeInterceptorElectricChar(ce,pe,ge,fe[0],Z);if(X)return X}const le=[];for(let X=0,K=fe.length;X<K;X++)le[X]=new te.iu(fe[X],Z);const se=N(Z,ce);return new z.vY(se,le,{shouldPushStackElementBefore:B(ce,se),shouldPushStackElementAfter:!1})}static typeWithoutInterceptors(ee,ce,pe,ge,fe){const oe=[];for(let le=0,se=ge.length;le<se;le++)oe[le]=new te.iu(ge[le],fe);const Z=N(fe,ee);return new z.vY(Z,oe,{shouldPushStackElementBefore:B(ee,Z),shouldPushStackElementAfter:!1})}static lineInsertBefore(ee,ce,pe){if(ce===null||pe===null)return[];const ge=[];for(let fe=0,oe=pe.length;fe<oe;fe++){let Z=pe[fe].positionLineNumber;if(Z===1)ge[fe]=new te.q2(new x.Q(1,1,1,1),` `);else{Z--;const le=ce.getLineMaxColumn(Z);ge[fe]=this._enter(ee,ce,!1,new x.Q(Z,le,Z,le))}}return ge}static lineInsertAfter(ee,ce,pe){if(ce===null||pe===null)return[];const ge=[];for(let fe=0,oe=pe.length;fe<oe;fe++){const Z=pe[fe].positionLineNumber,le=ce.getLineMaxColumn(Z);ge[fe]=this._enter(ee,ce,!1,new x.Q(Z,le,Z,le))}return ge}static lineBreakInsert(ee,ce,pe){const ge=[];for(let fe=0,oe=pe.length;fe<oe;fe++)ge[fe]=this._enter(ee,ce,!0,pe[fe]);return ge}}class k extends te.iP{constructor(ee,ce,pe,ge){super(ee,(pe?ce:"")+ge,0,-ge.length),this._openCharacter=ce,this._closeCharacter=ge,this.closeCharacterRange=null,this.enclosingRange=null}computeCursorState(ee,ce){const ge=ce.getInverseEditOperations()[0].range;return this.closeCharacterRange=new x.Q(ge.startLineNumber,ge.endColumn-this._closeCharacter.length,ge.endLineNumber,ge.endColumn),this.enclosingRange=new x.Q(ge.startLineNumber,ge.endColumn-this._openCharacter.length-this._closeCharacter.length,ge.endLineNumber,ge.endColumn),super.computeCursorState(ee,ce)}}class j{constructor(ee,ce,pe,ge,fe,oe){this.deletedText=ee,this.deletedSelectionStart=ce,this.deletedSelectionEnd=pe,this.insertedText=ge,this.insertedSelectionStart=fe,this.insertedSelectionEnd=oe}}function N(Y,ee){return Y===" "?ee===5||ee===6?6:5:4}function B(Y,ee){return H(Y)&&!H(ee)?!0:Y===5?!1:T(Y)!==T(ee)}function T(Y){return Y===6||Y===5?"space":Y}function H(Y){return Y===4||Y===5||Y===6}},89673:(Tt,Fe,f)=>{f.d(Fe,{c:()=>J,z:()=>Q});var I=f(16844),h=f(29895),te=f(97666),$=f(82862),x=f(15365),ie=f(28061);class Q{static _createWord(_,y,C,d,w){return{start:d,end:w,wordType:y,nextCharClass:C}}static _findPreviousWordOnLine(_,y,C){const d=y.getLineContent(C.lineNumber);return this._doFindPreviousWordOnLine(d,_,C)}static _doFindPreviousWordOnLine(_,y,C){let d=0;for(let w=C.column-2;w>=0;w--){const D=_.charCodeAt(w),L=y.get(D);if(L===0){if(d===2)return this._createWord(_,d,L,w+1,this._findEndOfWord(_,y,d,w+1));d=1}else if(L===2){if(d===1)return this._createWord(_,d,L,w+1,this._findEndOfWord(_,y,d,w+1));d=2}else if(L===1&&d!==0)return this._createWord(_,d,L,w+1,this._findEndOfWord(_,y,d,w+1))}return d!==0?this._createWord(_,d,1,0,this._findEndOfWord(_,y,d,0)):null}static _findEndOfWord(_,y,C,d){const w=_.length;for(let D=d;D<w;D++){const L=_.charCodeAt(D),k=y.get(L);if(k===1||C===1&&k===2||C===2&&k===0)return D}return w}static _findNextWordOnLine(_,y,C){const d=y.getLineContent(C.lineNumber);return this._doFindNextWordOnLine(d,_,C)}static _doFindNextWordOnLine(_,y,C){let d=0;const w=_.length;for(let D=C.column-1;D<w;D++){const L=_.charCodeAt(D),k=y.get(L);if(k===0){if(d===2)return this._createWord(_,d,k,this._findStartOfWord(_,y,d,D-1),D);d=1}else if(k===2){if(d===1)return this._createWord(_,d,k,this._findStartOfWord(_,y,d,D-1),D);d=2}else if(k===1&&d!==0)return this._createWord(_,d,k,this._findStartOfWord(_,y,d,D-1),D)}return d!==0?this._createWord(_,d,1,this._findStartOfWord(_,y,d,w-1),w):null}static _findStartOfWord(_,y,C,d){for(let w=d;w>=0;w--){const D=_.charCodeAt(w),L=y.get(D);if(L===1||C===1&&L===2||C===2&&L===0)return w+1}return 0}static moveWordLeft(_,y,C,d){let w=C.lineNumber,D=C.column;D===1&&w>1&&(w=w-1,D=y.getLineMaxColumn(w));let L=Q._findPreviousWordOnLine(_,y,new x.y(w,D));if(d===0)return new x.y(w,L?L.start+1:1);if(d===1)return L&&L.wordType===2&&L.end-L.start===1&&L.nextCharClass===0&&(L=Q._findPreviousWordOnLine(_,y,new x.y(w,L.start+1))),new x.y(w,L?L.start+1:1);if(d===3){for(;L&&L.wordType===2;)L=Q._findPreviousWordOnLine(_,y,new x.y(w,L.start+1));return new x.y(w,L?L.start+1:1)}return L&&D<=L.end+1&&(L=Q._findPreviousWordOnLine(_,y,new x.y(w,L.start+1))),new x.y(w,L?L.end+1:1)}static _moveWordPartLeft(_,y){const C=y.lineNumber,d=_.getLineMaxColumn(C);if(y.column===1)return C>1?new x.y(C-1,_.getLineMaxColumn(C-1)):y;const w=_.getLineContent(C);for(let D=y.column-1;D>1;D--){const L=w.charCodeAt(D-2),k=w.charCodeAt(D-1);if(L===95&&k!==95)return new x.y(C,D);if((I.Lv(L)||I.DB(L))&&I.Wv(k))return new x.y(C,D);if(I.Wv(L)&&I.Wv(k)&&D+1<d){const j=w.charCodeAt(D);if(I.Lv(j)||I.DB(j))return new x.y(C,D)}}return new x.y(C,1)}static moveWordRight(_,y,C,d){let w=C.lineNumber,D=C.column,L=!1;D===y.getLineMaxColumn(w)&&w<y.getLineCount()&&(L=!0,w=w+1,D=1);let k=Q._findNextWordOnLine(_,y,new x.y(w,D));if(d===2)k&&k.wordType===2&&k.end-k.start===1&&k.nextCharClass===0&&(k=Q._findNextWordOnLine(_,y,new x.y(w,k.end+1))),k?D=k.end+1:D=y.getLineMaxColumn(w);else if(d===3){for(L&&(D=0);k&&(k.wordType===2||k.start+1<=D);)k=Q._findNextWordOnLine(_,y,new x.y(w,k.end+1));k?D=k.start+1:D=y.getLineMaxColumn(w)}else k&&!L&&D>=k.start+1&&(k=Q._findNextWordOnLine(_,y,new x.y(w,k.end+1))),k?D=k.start+1:D=y.getLineMaxColumn(w);return new x.y(w,D)}static _moveWordPartRight(_,y){const C=y.lineNumber,d=_.getLineMaxColumn(C);if(y.column===d)return C<_.getLineCount()?new x.y(C+1,1):y;const w=_.getLineContent(C);for(let D=y.column+1;D<d;D++){const L=w.charCodeAt(D-2),k=w.charCodeAt(D-1);if(L!==95&&k===95)return new x.y(C,D);if((I.Lv(L)||I.DB(L))&&I.Wv(k))return new x.y(C,D);if(I.Wv(L)&&I.Wv(k)&&D+1<d){const j=w.charCodeAt(D);if(I.Lv(j)||I.DB(j))return new x.y(C,D)}}return new x.y(C,d)}static _deleteWordLeftWhitespace(_,y){const C=_.getLineContent(y.lineNumber),d=y.column-2,w=I.lT(C,d);return w+1<d?new ie.Q(y.lineNumber,w+2,y.lineNumber,y.column):null}static deleteWordLeft(_,y){const C=_.wordSeparators,d=_.model,w=_.selection,D=_.whitespaceHeuristics;if(!w.isEmpty())return w;if(te.g.isAutoClosingPairDelete(_.autoClosingDelete,_.autoClosingBrackets,_.autoClosingQuotes,_.autoClosingPairs.autoClosingPairsOpenByEnd,_.model,[_.selection],_.autoClosedCharacters)){const B=_.selection.getPosition();return new ie.Q(B.lineNumber,B.column-1,B.lineNumber,B.column+1)}const L=new x.y(w.positionLineNumber,w.positionColumn);let k=L.lineNumber,j=L.column;if(k===1&&j===1)return null;if(D){const B=this._deleteWordLeftWhitespace(d,L);if(B)return B}let N=Q._findPreviousWordOnLine(C,d,L);return y===0?N?j=N.start+1:j>1?j=1:(k--,j=d.getLineMaxColumn(k)):(N&&j<=N.end+1&&(N=Q._findPreviousWordOnLine(C,d,new x.y(k,N.start+1))),N?j=N.end+1:j>1?j=1:(k--,j=d.getLineMaxColumn(k))),new ie.Q(k,j,L.lineNumber,L.column)}static deleteInsideWord(_,y,C){if(!C.isEmpty())return C;const d=new x.y(C.positionLineNumber,C.positionColumn),w=this._deleteInsideWordWhitespace(y,d);return w||this._deleteInsideWordDetermineDeleteRange(_,y,d)}static _charAtIsWhitespace(_,y){const C=_.charCodeAt(y);return C===32||C===9}static _deleteInsideWordWhitespace(_,y){const C=_.getLineContent(y.lineNumber),d=C.length;if(d===0)return null;let w=Math.max(y.column-2,0);if(!this._charAtIsWhitespace(C,w))return null;let D=Math.min(y.column-1,d-1);if(!this._charAtIsWhitespace(C,D))return null;for(;w>0&&this._charAtIsWhitespace(C,w-1);)w--;for(;D+1<d&&this._charAtIsWhitespace(C,D+1);)D++;return new ie.Q(y.lineNumber,w+1,y.lineNumber,D+2)}static _deleteInsideWordDetermineDeleteRange(_,y,C){const d=y.getLineContent(C.lineNumber),w=d.length;if(w===0)return C.lineNumber>1?new ie.Q(C.lineNumber-1,y.getLineMaxColumn(C.lineNumber-1),C.lineNumber,1):C.lineNumber<y.getLineCount()?new ie.Q(C.lineNumber,1,C.lineNumber+1,1):new ie.Q(C.lineNumber,1,C.lineNumber,1);const D=B=>B.start+1<=C.column&&C.column<=B.end+1,L=(B,T)=>(B=Math.min(B,C.column),T=Math.max(T,C.column),new ie.Q(C.lineNumber,B,C.lineNumber,T)),k=B=>{let T=B.start+1,H=B.end+1,Y=!1;for(;H-1<w&&this._charAtIsWhitespace(d,H-1);)Y=!0,H++;if(!Y)for(;T>1&&this._charAtIsWhitespace(d,T-2);)T--;return L(T,H)},j=Q._findPreviousWordOnLine(_,y,C);if(j&&D(j))return k(j);const N=Q._findNextWordOnLine(_,y,C);return N&&D(N)?k(N):j&&N?L(j.end+1,N.start+1):j?L(j.start+1,j.end+1):N?L(N.start+1,N.end+1):L(1,w+1)}static _deleteWordPartLeft(_,y){if(!y.isEmpty())return y;const C=y.getPosition(),d=Q._moveWordPartLeft(_,C);return new ie.Q(C.lineNumber,C.column,d.lineNumber,d.column)}static _findFirstNonWhitespaceChar(_,y){const C=_.length;for(let d=y;d<C;d++){const w=_.charAt(d);if(w!==" "&&w!==" ")return d}return C}static _deleteWordRightWhitespace(_,y){const C=_.getLineContent(y.lineNumber),d=y.column-1,w=this._findFirstNonWhitespaceChar(C,d);return d+1<w?new ie.Q(y.lineNumber,y.column,y.lineNumber,w+1):null}static deleteWordRight(_,y){const C=_.wordSeparators,d=_.model,w=_.selection,D=_.whitespaceHeuristics;if(!w.isEmpty())return w;const L=new x.y(w.positionLineNumber,w.positionColumn);let k=L.lineNumber,j=L.column;const N=d.getLineCount(),B=d.getLineMaxColumn(k);if(k===N&&j===B)return null;if(D){const H=this._deleteWordRightWhitespace(d,L);if(H)return H}let T=Q._findNextWordOnLine(C,d,L);return y===2?T?j=T.end+1:j<B||k===N?j=B:(k++,T=Q._findNextWordOnLine(C,d,new x.y(k,1)),T?j=T.start+1:j=d.getLineMaxColumn(k)):(T&&j>=T.start+1&&(T=Q._findNextWordOnLine(C,d,new x.y(k,T.end+1))),T?j=T.start+1:j<B||k===N?j=B:(k++,T=Q._findNextWordOnLine(C,d,new x.y(k,1)),T?j=T.start+1:j=d.getLineMaxColumn(k))),new ie.Q(k,j,L.lineNumber,L.column)}static _deleteWordPartRight(_,y){if(!y.isEmpty())return y;const C=y.getPosition(),d=Q._moveWordPartRight(_,C);return new ie.Q(C.lineNumber,C.column,d.lineNumber,d.column)}static _createWordAtPosition(_,y,C){const d=new ie.Q(y,C.start+1,y,C.end+1);return{word:_.getValueInRange(d),startColumn:d.startColumn,endColumn:d.endColumn}}static getWordAtPosition(_,y,C){const d=(0,$.i)(y),w=Q._findPreviousWordOnLine(d,_,C);if(w&&w.wordType===1&&w.start<=C.column-1&&C.column-1<=w.end)return Q._createWordAtPosition(_,C.lineNumber,w);const D=Q._findNextWordOnLine(d,_,C);return D&&D.wordType===1&&D.start<=C.column-1&&C.column-1<=D.end?Q._createWordAtPosition(_,C.lineNumber,D):null}static word(_,y,C,d,w){const D=(0,$.i)(_.wordSeparators),L=Q._findPreviousWordOnLine(D,y,w),k=Q._findNextWordOnLine(D,y,w);if(!d){let H,Y;return L&&L.wordType===1&&L.start<=w.column-1&&w.column-1<=L.end?(H=L.start+1,Y=L.end+1):k&&k.wordType===1&&k.start<=w.column-1&&w.column-1<=k.end?(H=k.start+1,Y=k.end+1):(L?H=L.end+1:H=1,k?Y=k.start+1:Y=y.getLineMaxColumn(w.lineNumber)),new h.mG(new ie.Q(w.lineNumber,H,w.lineNumber,Y),0,new x.y(w.lineNumber,Y),0)}let j,N;L&&L.wordType===1&&L.start<w.column-1&&w.column-1<L.end?(j=L.start+1,N=L.end+1):k&&k.wordType===1&&k.start<w.column-1&&w.column-1<k.end?(j=k.start+1,N=k.end+1):(j=w.column,N=w.column);const B=w.lineNumber;let T;if(C.selectionStart.containsPosition(w))T=C.selectionStart.endColumn;else if(w.isBeforeOrEqual(C.selectionStart.getStartPosition())){T=j;const H=new x.y(B,T);C.selectionStart.containsPosition(H)&&(T=C.selectionStart.endColumn)}else{T=N;const H=new x.y(B,T);C.selectionStart.containsPosition(H)&&(T=C.selectionStart.startColumn)}return C.move(!0,B,T,0)}}class J extends Q{static deleteWordPartLeft(_){const y=z([Q.deleteWordLeft(_,0),Q.deleteWordLeft(_,2),Q._deleteWordPartLeft(_.model,_.selection)]);return y.sort(ie.Q.compareRangesUsingEnds),y[2]}static deleteWordPartRight(_){const y=z([Q.deleteWordRight(_,0),Q.deleteWordRight(_,2),Q._deleteWordPartRight(_.model,_.selection)]);return y.sort(ie.Q.compareRangesUsingStarts),y[0]}static moveWordPartLeft(_,y,C){const d=z([Q.moveWordLeft(_,y,C,0),Q.moveWordLeft(_,y,C,2),Q._moveWordPartLeft(y,C)]);return d.sort(x.y.compare),d[2]}static moveWordPartRight(_,y,C){const d=z([Q.moveWordRight(_,y,C,0),Q.moveWordRight(_,y,C,2),Q._moveWordPartRight(y,C)]);return d.sort(x.y.compare),d[0]}}function z(S){return S.filter(_=>!!_)}},29895:(Tt,Fe,f)=>{f.d(Fe,{MF:()=>_,d$:()=>S,mG:()=>d,vG:()=>D,vY:()=>w});var I=f(15365),h=f(28061),te=f(93702),$=f(19184),x=f(62549),ie=f(57999);const Q=()=>!0,J=()=>!1,z=L=>L===" "||L===" ";class S{constructor(k,j,N,B){this.languageConfigurationService=B,this._cursorMoveConfigurationBrand=void 0,this._languageId=k;const T=N.options,H=T.get(133);this.readOnly=T.get(83),this.tabSize=j.tabSize,this.indentSize=j.indentSize,this.insertSpaces=j.insertSpaces,this.stickyTabStops=T.get(106),this.lineHeight=T.get(61),this.pageSize=Math.max(1,Math.floor(H.height/this.lineHeight)-2),this.useTabStops=T.get(118),this.wordSeparators=T.get(119),this.emptySelectionClipboard=T.get(33),this.copyWithSyntaxHighlighting=T.get(21),this.multiCursorMergeOverlapping=T.get(71),this.multiCursorPaste=T.get(73),this.autoClosingBrackets=T.get(5),this.autoClosingQuotes=T.get(8),this.autoClosingDelete=T.get(6),this.autoClosingOvertype=T.get(7),this.autoSurround=T.get(11),this.autoIndent=T.get(9),this.surroundingPairs={},this._electricChars=null,this.shouldAutoCloseBefore={quote:this._getShouldAutoClose(k,this.autoClosingQuotes),bracket:this._getShouldAutoClose(k,this.autoClosingBrackets)},this.autoClosingPairs=this.languageConfigurationService.getLanguageConfiguration(k).getAutoClosingPairs();const Y=this.languageConfigurationService.getLanguageConfiguration(k).getSurroundingPairs();if(Y)for(const ee of Y)this.surroundingPairs[ee.open]=ee.close}static shouldRecreate(k){return k.hasChanged(133)||k.hasChanged(119)||k.hasChanged(33)||k.hasChanged(71)||k.hasChanged(73)||k.hasChanged(5)||k.hasChanged(8)||k.hasChanged(6)||k.hasChanged(7)||k.hasChanged(11)||k.hasChanged(118)||k.hasChanged(61)||k.hasChanged(83)}get electricChars(){var k;if(!this._electricChars){this._electricChars={};const j=(k=this.languageConfigurationService.getLanguageConfiguration(this._languageId).electricCharacter)===null||k===void 0?void 0:k.getElectricCharacters();if(j)for(const N of j)this._electricChars[N]=!0}return this._electricChars}onElectricCharacter(k,j,N){const B=(0,$.BQ)(j,N-1),T=this.languageConfigurationService.getLanguageConfiguration(B.languageId).electricCharacter;return T?T.onElectricCharacter(k,B,N-B.firstCharOffset):null}normalizeIndentation(k){return(0,ie.P)(k,this.indentSize,this.insertSpaces)}_getShouldAutoClose(k,j){switch(j){case"beforeWhitespace":return z;case"languageDefined":return this._getLanguageDefinedShouldAutoClose(k);case"always":return Q;case"never":return J}}_getLanguageDefinedShouldAutoClose(k){const j=this.languageConfigurationService.getLanguageConfiguration(k).getAutoCloseBeforeSet();return N=>j.indexOf(N)!==-1}visibleColumnFromColumn(k,j){return x.A.visibleColumnFromColumn(k.getLineContent(j.lineNumber),j.column,this.tabSize)}columnFromVisibleColumn(k,j,N){const B=x.A.columnFromVisibleColumn(k.getLineContent(j),N,this.tabSize),T=k.getLineMinColumn(j);if(B<T)return T;const H=k.getLineMaxColumn(j);return B>H?H:B}}class _{constructor(k,j){this._cursorStateBrand=void 0,this.modelState=k,this.viewState=j}static fromModelState(k){return new y(k)}static fromViewState(k){return new C(k)}static fromModelSelection(k){const j=te.L.liftSelection(k),N=new d(h.Q.fromPositions(j.getSelectionStart()),0,j.getPosition(),0);return _.fromModelState(N)}static fromModelSelections(k){const j=[];for(let N=0,B=k.length;N<B;N++)j[N]=this.fromModelSelection(k[N]);return j}equals(k){return this.viewState.equals(k.viewState)&&this.modelState.equals(k.modelState)}}class y{constructor(k){this.modelState=k,this.viewState=null}}class C{constructor(k){this.modelState=null,this.viewState=k}}class d{constructor(k,j,N,B){this._singleCursorStateBrand=void 0,this.selectionStart=k,this.selectionStartLeftoverVisibleColumns=j,this.position=N,this.leftoverVisibleColumns=B,this.selection=d._computeSelection(this.selectionStart,this.position)}equals(k){return this.selectionStartLeftoverVisibleColumns===k.selectionStartLeftoverVisibleColumns&&this.leftoverVisibleColumns===k.leftoverVisibleColumns&&this.position.equals(k.position)&&this.selectionStart.equalsRange(k.selectionStart)}hasSelection(){return!this.selection.isEmpty()||!this.selectionStart.isEmpty()}move(k,j,N,B){return k?new d(this.selectionStart,this.selectionStartLeftoverVisibleColumns,new I.y(j,N),B):new d(new h.Q(j,N,j,N),B,new I.y(j,N),B)}static _computeSelection(k,j){return k.isEmpty()||!j.isBeforeOrEqual(k.getStartPosition())?te.L.fromPositions(k.getStartPosition(),j):te.L.fromPositions(k.getEndPosition(),j)}}class w{constructor(k,j,N){this._editOperationResultBrand=void 0,this.type=k,this.commands=j,this.shouldPushStackElementBefore=N.shouldPushStackElementBefore,this.shouldPushStackElementAfter=N.shouldPushStackElementAfter}}function D(L){return L==="'"||L==='"'||L==="`"}},22595:(Tt,Fe,f)=>{f.d(Fe,{f:()=>I});class I{constructor(te,$,x,ie,Q,J){this.id=te,this.label=$,this.alias=x,this._precondition=ie,this._run=Q,this._contextKeyService=J}isSupported(){return this._contextKeyService.contextMatchesRules(this._precondition)}run(){return this.isSupported()?this._run():Promise.resolve(void 0)}}},12596:(Tt,Fe,f)=>{f.d(Fe,{_:()=>I});const I={ICodeEditor:"vs.editor.ICodeEditor",IDiffEditor:"vs.editor.IDiffEditor"}},38122:(Tt,Fe,f)=>{f.d(Fe,{R:()=>te});var I=f(3765),h=f(96655),te;(function($){$.editorSimpleInput=new h.N1("editorSimpleInput",!1,!0),$.editorTextFocus=new h.N1("editorTextFocus",!1,I.kg("editorTextFocus","Whether the editor text has focus (cursor is blinking)")),$.focus=new h.N1("editorFocus",!1,I.kg("editorFocus","Whether the editor or an editor widget has focus (e.g. focus is in the find widget)")),$.textInputFocus=new h.N1("textInputFocus",!1,I.kg("textInputFocus","Whether an editor or a rich text input has focus (cursor is blinking)")),$.readOnly=new h.N1("editorReadonly",!1,I.kg("editorReadonly","Whether the editor is read only")),$.inDiffEditor=new h.N1("inDiffEditor",!1,I.kg("inDiffEditor","Whether the context is a diff editor")),$.columnSelection=new h.N1("editorColumnSelection",!1,I.kg("editorColumnSelection","Whether `editor.columnSelection` is enabled")),$.writable=$.readOnly.toNegated(),$.hasNonEmptySelection=new h.N1("editorHasSelection",!1,I.kg("editorHasSelection","Whether the editor has text selected")),$.hasOnlyEmptySelection=$.hasNonEmptySelection.toNegated(),$.hasMultipleSelections=new h.N1("editorHasMultipleSelections",!1,I.kg("editorHasMultipleSelections","Whether the editor has multiple selections")),$.hasSingleSelection=$.hasMultipleSelections.toNegated(),$.tabMovesFocus=new h.N1("editorTabMovesFocus",!1,I.kg("editorTabMovesFocus","Whether `Tab` will move focus out of the editor")),$.tabDoesNotMoveFocus=$.tabMovesFocus.toNegated(),$.isInWalkThroughSnippet=new h.N1("isInEmbeddedEditor",!1,!0),$.canUndo=new h.N1("canUndo",!1,!0),$.canRedo=new h.N1("canRedo",!1,!0),$.hoverVisible=new h.N1("editorHoverVisible",!1,I.kg("editorHoverVisible","Whether the editor hover is visible")),$.inCompositeEditor=new h.N1("inCompositeEditor",void 0,I.kg("inCompositeEditor","Whether the editor is part of a larger editor (e.g. notebooks)")),$.notInCompositeEditor=$.inCompositeEditor.toNegated(),$.languageId=new h.N1("editorLangId","",I.kg("editorLangId","The language identifier of the editor")),$.hasCompletionItemProvider=new h.N1("editorHasCompletionItemProvider",!1,I.kg("editorHasCompletionItemProvider","Whether the editor has a completion item provider")),$.hasCodeActionsProvider=new h.N1("editorHasCodeActionsProvider",!1,I.kg("editorHasCodeActionsProvider","Whether the editor has a code actions provider")),$.hasCodeLensProvider=new h.N1("editorHasCodeLensProvider",!1,I.kg("editorHasCodeLensProvider","Whether the editor has a code lens provider")),$.hasDefinitionProvider=new h.N1("editorHasDefinitionProvider",!1,I.kg("editorHasDefinitionProvider","Whether the editor has a definition provider")),$.hasDeclarationProvider=new h.N1("editorHasDeclarationProvider",!1,I.kg("editorHasDeclarationProvider","Whether the editor has a declaration provider")),$.hasImplementationProvider=new h.N1("editorHasImplementationProvider",!1,I.kg("editorHasImplementationProvider","Whether the editor has an implementation provider")),$.hasTypeDefinitionProvider=new h.N1("editorHasTypeDefinitionProvider",!1,I.kg("editorHasTypeDefinitionProvider","Whether the editor has a type definition provider")),$.hasHoverProvider=new h.N1("editorHasHoverProvider",!1,I.kg("editorHasHoverProvider","Whether the editor has a hover provider")),$.hasDocumentHighlightProvider=new h.N1("editorHasDocumentHighlightProvider",!1,I.kg("editorHasDocumentHighlightProvider","Whether the editor has a document highlight provider")),$.hasDocumentSymbolProvider=new h.N1("editorHasDocumentSymbolProvider",!1,I.kg("editorHasDocumentSymbolProvider","Whether the editor has a document symbol provider")),$.hasReferenceProvider=new h.N1("editorHasReferenceProvider",!1,I.kg("editorHasReferenceProvider","Whether the editor has a reference provider")),$.hasRenameProvider=new h.N1("editorHasRenameProvider",!1,I.kg("editorHasRenameProvider","Whether the editor has a rename provider")),$.hasSignatureHelpProvider=new h.N1("editorHasSignatureHelpProvider",!1,I.kg("editorHasSignatureHelpProvider","Whether the editor has a signature help provider")),$.hasInlayHintsProvider=new h.N1("editorHasInlayHintsProvider",!1,I.kg("editorHasInlayHintsProvider","Whether the editor has an inline hints provider")),$.hasDocumentFormattingProvider=new h.N1("editorHasDocumentFormattingProvider",!1,I.kg("editorHasDocumentFormattingProvider","Whether the editor has a document formatting provider")),$.hasDocumentSelectionFormattingProvider=new h.N1("editorHasDocumentSelectionFormattingProvider",!1,I.kg("editorHasDocumentSelectionFormattingProvider","Whether the editor has a document selection formatting provider")),$.hasMultipleDocumentFormattingProvider=new h.N1("editorHasMultipleDocumentFormattingProvider",!1,I.kg("editorHasMultipleDocumentFormattingProvider","Whether the editor has multiple document formatting providers")),$.hasMultipleDocumentSelectionFormattingProvider=new h.N1("editorHasMultipleDocumentSelectionFormattingProvider",!1,I.kg("editorHasMultipleDocumentSelectionFormattingProvider","Whether the editor has multiple document selection formatting providers"))})(te||(te={}))},15910:(Tt,Fe,f)=>{f.d(Fe,{x:()=>I});class I{static getLanguageId(te){return(te&255)>>>0}static getTokenType(te){return(te&768)>>>8}static containsBalancedBrackets(te){return(te&1024)!==0}static getFontStyle(te){return(te&30720)>>>11}static getForeground(te){return(te&16744448)>>>15}static getBackground(te){return(te&4278190080)>>>24}static getClassNameFromMetadata(te){let x="mtk"+this.getForeground(te);const ie=this.getFontStyle(te);return ie&1&&(x+=" mtki"),ie&2&&(x+=" mtkb"),ie&4&&(x+=" mtku"),ie&8&&(x+=" mtks"),x}static getInlineStyleFromMetadata(te,$){const x=this.getForeground(te),ie=this.getFontStyle(te);let Q=`color: ${$[x]};`;ie&1&&(Q+="font-style: italic;"),ie&2&&(Q+="font-weight: bold;");let J="";return ie&4&&(J+=" underline"),ie&8&&(J+=" line-through"),J&&(Q+=`text-decoration:${J};`),Q}static getPresentationFromMetadata(te){const $=this.getForeground(te),x=this.getFontStyle(te);return{foreground:$,italic:!!(x&1),bold:!!(x&2),underline:!!(x&4),strikethrough:!!(x&8)}}}},44364:(Tt,Fe,f)=>{f.d(Fe,{uB:()=>j,HC:()=>y,Kb:()=>w,rY:()=>_,lO:()=>k,r4:()=>N,qw:()=>C,WA:()=>d,gP:()=>L,ou:()=>z,dG:()=>B,$M:()=>S,Iu:()=>D});var I=f(26048),h=f(37264),te=f(28061),$=f(2106),x=f(10998),ie=function(T,H,Y,ee){function ce(pe){return pe instanceof Y?pe:new Y(function(ge){ge(pe)})}return new(Y||(Y=Promise))(function(pe,ge){function fe(le){try{Z(ee.next(le))}catch(se){ge(se)}}function oe(le){try{Z(ee.throw(le))}catch(se){ge(se)}}function Z(le){le.done?pe(le.value):ce(le.value).then(fe,oe)}Z((ee=ee.apply(T,H||[])).next())})};class Q{constructor(){this._map=new Map,this._factories=new Map,this._onDidChange=new $.vl,this.onDidChange=this._onDidChange.event,this._colorMap=null}fire(H){this._onDidChange.fire({changedLanguages:H,changedColorMap:!1})}register(H,Y){return this._map.set(H,Y),this.fire([H]),(0,x.s)(()=>{this._map.get(H)===Y&&(this._map.delete(H),this.fire([H]))})}registerFactory(H,Y){var ee;(ee=this._factories.get(H))===null||ee===void 0||ee.dispose();const ce=new J(this,H,Y);return this._factories.set(H,ce),(0,x.s)(()=>{const pe=this._factories.get(H);!pe||pe!==ce||(this._factories.delete(H),pe.dispose())})}getOrCreate(H){return ie(this,void 0,void 0,function*(){const Y=this.get(H);if(Y)return Y;const ee=this._factories.get(H);return!ee||ee.isResolved?null:(yield ee.resolve(),this.get(H))})}get(H){return this._map.get(H)||null}isResolved(H){if(this.get(H))return!0;const ee=this._factories.get(H);return!!(!ee||ee.isResolved)}setColorMap(H){this._colorMap=H,this._onDidChange.fire({changedLanguages:Array.from(this._map.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}}class J extends x.jG{constructor(H,Y,ee){super(),this._registry=H,this._languageId=Y,this._factory=ee,this._isDisposed=!1,this._resolvePromise=null,this._isResolved=!1}get isResolved(){return this._isResolved}dispose(){this._isDisposed=!0,super.dispose()}resolve(){return ie(this,void 0,void 0,function*(){return this._resolvePromise||(this._resolvePromise=this._create()),this._resolvePromise})}_create(){return ie(this,void 0,void 0,function*(){const H=yield Promise.resolve(this._factory.createTokenizationSupport());this._isResolved=!0,H&&!this._isDisposed&&this._register(this._registry.register(this._languageId,H))})}}class z{constructor(H,Y,ee){this._tokenBrand=void 0,this.offset=H,this.type=Y,this.language=ee}toString(){return"("+this.offset+", "+this.type+")"}}class S{constructor(H,Y){this._tokenizationResultBrand=void 0,this.tokens=H,this.endState=Y}}class _{constructor(H,Y){this._encodedTokenizationResultBrand=void 0,this.tokens=H,this.endState=Y}}var y;(function(T){const H=new Map;H.set(0,I.W6.symbolMethod),H.set(1,I.W6.symbolFunction),H.set(2,I.W6.symbolConstructor),H.set(3,I.W6.symbolField),H.set(4,I.W6.symbolVariable),H.set(5,I.W6.symbolClass),H.set(6,I.W6.symbolStruct),H.set(7,I.W6.symbolInterface),H.set(8,I.W6.symbolModule),H.set(9,I.W6.symbolProperty),H.set(10,I.W6.symbolEvent),H.set(11,I.W6.symbolOperator),H.set(12,I.W6.symbolUnit),H.set(13,I.W6.symbolValue),H.set(15,I.W6.symbolEnum),H.set(14,I.W6.symbolConstant),H.set(15,I.W6.symbolEnum),H.set(16,I.W6.symbolEnumMember),H.set(17,I.W6.symbolKeyword),H.set(27,I.W6.symbolSnippet),H.set(18,I.W6.symbolText),H.set(19,I.W6.symbolColor),H.set(20,I.W6.symbolFile),H.set(21,I.W6.symbolReference),H.set(22,I.W6.symbolCustomColor),H.set(23,I.W6.symbolFolder),H.set(24,I.W6.symbolTypeParameter),H.set(25,I.W6.account),H.set(26,I.W6.issues);function Y(pe){let ge=H.get(pe);return ge||(console.info("No codicon found for CompletionItemKind "+pe),ge=I.W6.symbolProperty),ge}T.toIcon=Y;const ee=new Map;ee.set("method",0),ee.set("function",1),ee.set("constructor",2),ee.set("field",3),ee.set("variable",4),ee.set("class",5),ee.set("struct",6),ee.set("interface",7),ee.set("module",8),ee.set("property",9),ee.set("event",10),ee.set("operator",11),ee.set("unit",12),ee.set("value",13),ee.set("constant",14),ee.set("enum",15),ee.set("enum-member",16),ee.set("enumMember",16),ee.set("keyword",17),ee.set("snippet",27),ee.set("text",18),ee.set("color",19),ee.set("file",20),ee.set("reference",21),ee.set("customcolor",22),ee.set("folder",23),ee.set("type-parameter",24),ee.set("typeParameter",24),ee.set("account",25),ee.set("issue",26);function ce(pe,ge){let fe=ee.get(pe);return typeof fe>"u"&&!ge&&(fe=9),fe}T.fromString=ce})(y||(y={}));var C;(function(T){T[T.Automatic=0]="Automatic",T[T.Explicit=1]="Explicit"})(C||(C={}));var d;(function(T){T[T.Invoke=1]="Invoke",T[T.TriggerCharacter=2]="TriggerCharacter",T[T.ContentChange=3]="ContentChange"})(d||(d={}));var w;(function(T){T[T.Text=0]="Text",T[T.Read=1]="Read",T[T.Write=2]="Write"})(w||(w={}));function D(T){return T&&h.r.isUri(T.uri)&&te.Q.isIRange(T.range)&&(te.Q.isIRange(T.originSelectionRange)||te.Q.isIRange(T.targetSelectionRange))}var L;(function(T){const H=new Map;H.set(0,I.W6.symbolFile),H.set(1,I.W6.symbolModule),H.set(2,I.W6.symbolNamespace),H.set(3,I.W6.symbolPackage),H.set(4,I.W6.symbolClass),H.set(5,I.W6.symbolMethod),H.set(6,I.W6.symbolProperty),H.set(7,I.W6.symbolField),H.set(8,I.W6.symbolConstructor),H.set(9,I.W6.symbolEnum),H.set(10,I.W6.symbolInterface),H.set(11,I.W6.symbolFunction),H.set(12,I.W6.symbolVariable),H.set(13,I.W6.symbolConstant),H.set(14,I.W6.symbolString),H.set(15,I.W6.symbolNumber),H.set(16,I.W6.symbolBoolean),H.set(17,I.W6.symbolArray),H.set(18,I.W6.symbolObject),H.set(19,I.W6.symbolKey),H.set(20,I.W6.symbolNull),H.set(21,I.W6.symbolEnumMember),H.set(22,I.W6.symbolStruct),H.set(23,I.W6.symbolEvent),H.set(24,I.W6.symbolOperator),H.set(25,I.W6.symbolTypeParameter);function Y(ee){let ce=H.get(ee);return ce||(console.info("No codicon found for SymbolKind "+ee),ce=I.W6.symbolProperty),ce}T.toIcon=Y})(L||(L={}));class k{constructor(H){this.value=H}}k.Comment=new k("comment"),k.Imports=new k("imports"),k.Region=new k("region");var j;(function(T){function H(Y){return!Y||typeof Y!="object"?!1:typeof Y.id=="string"&&typeof Y.title=="string"}T.is=H})(j||(j={}));var N;(function(T){T[T.Type=1]="Type",T[T.Parameter=2]="Parameter"})(N||(N={}));const B=new Q},70645:(Tt,Fe,f)=>{f.d(Fe,{$f:()=>Q,MU:()=>J,Yb:()=>S,_t:()=>z,vn:()=>ie});var I=f(16844),h=f(49550),te=f(19184),$=f(52394);function x(_,y,C){const d=_.tokenization.getLanguageIdAtPosition(y,0);if(y>1){let w,D=-1;for(w=y-1;w>=1;w--){if(_.tokenization.getLanguageIdAtPosition(w,0)!==d)return D;const L=_.getLineContent(w);if(C.shouldIgnore(L)||/^\s+$/.test(L)||L===""){D=w;continue}return w}}return-1}function ie(_,y,C,d=!0,w){if(_<4)return null;const D=w.getLanguageConfiguration(y.tokenization.getLanguageId()).indentRulesSupport;if(!D)return null;if(C<=1)return{indentation:"",action:null};const L=x(y,C,D);if(L<0)return null;if(L<1)return{indentation:"",action:null};const k=y.getLineContent(L);if(D.shouldIncrease(k)||D.shouldIndentNextLine(k))return{indentation:I.UU(k),action:h.l.Indent,line:L};if(D.shouldDecrease(k))return{indentation:I.UU(k),action:null,line:L};{if(L===1)return{indentation:I.UU(y.getLineContent(L)),action:null,line:L};const j=L-1,N=D.getIndentMetadata(y.getLineContent(j));if(!(N&3)&&N&4){let B=0;for(let T=j-1;T>0;T--)if(!D.shouldIndentNextLine(y.getLineContent(T))){B=T;break}return{indentation:I.UU(y.getLineContent(B+1)),action:null,line:B+1}}if(d)return{indentation:I.UU(y.getLineContent(L)),action:null,line:L};for(let B=L;B>0;B--){const T=y.getLineContent(B);if(D.shouldIncrease(T))return{indentation:I.UU(T),action:h.l.Indent,line:B};if(D.shouldIndentNextLine(T)){let H=0;for(let Y=B-1;Y>0;Y--)if(!D.shouldIndentNextLine(y.getLineContent(B))){H=Y;break}return{indentation:I.UU(y.getLineContent(H+1)),action:null,line:H+1}}else if(D.shouldDecrease(T))return{indentation:I.UU(T),action:null,line:B}}return{indentation:I.UU(y.getLineContent(1)),action:null,line:1}}}function Q(_,y,C,d,w,D){if(_<4)return null;const L=D.getLanguageConfiguration(C);if(!L)return null;const k=D.getLanguageConfiguration(C).indentRulesSupport;if(!k)return null;const j=ie(_,y,d,void 0,D),N=y.getLineContent(d);if(j){const B=j.line;if(B!==void 0){const T=L.onEnter(_,"",y.getLineContent(B),"");if(T){let H=I.UU(y.getLineContent(B));return T.removeText&&(H=H.substring(0,H.length-T.removeText)),T.indentAction===h.l.Indent||T.indentAction===h.l.IndentOutdent?H=w.shiftIndent(H):T.indentAction===h.l.Outdent&&(H=w.unshiftIndent(H)),k.shouldDecrease(N)&&(H=w.unshiftIndent(H)),T.appendText&&(H+=T.appendText),I.UU(H)}}return k.shouldDecrease(N)?j.action===h.l.Indent?j.indentation:w.unshiftIndent(j.indentation):j.action===h.l.Indent?w.shiftIndent(j.indentation):j.indentation}return null}function J(_,y,C,d,w){if(_<4)return null;y.tokenization.forceTokenization(C.startLineNumber);const D=y.tokenization.getLineTokens(C.startLineNumber),L=(0,te.BQ)(D,C.startColumn-1),k=L.getLineContent();let j=!1,N;L.firstCharOffset>0&&D.getLanguageId(0)!==L.languageId?(j=!0,N=k.substr(0,C.startColumn-1-L.firstCharOffset)):N=D.getLineContent().substring(0,C.startColumn-1);let B;C.isEmpty()?B=k.substr(C.startColumn-1-L.firstCharOffset):B=(0,$.P6)(y,C.endLineNumber,C.endColumn).getLineContent().substr(C.endColumn-1-L.firstCharOffset);const T=w.getLanguageConfiguration(L.languageId).indentRulesSupport;if(!T)return null;const H=N,Y=I.UU(N),ee={tokenization:{getLineTokens:fe=>y.tokenization.getLineTokens(fe),getLanguageId:()=>y.getLanguageId(),getLanguageIdAtPosition:(fe,oe)=>y.getLanguageIdAtPosition(fe,oe)},getLineContent:fe=>fe===C.startLineNumber?H:y.getLineContent(fe)},ce=I.UU(D.getLineContent()),pe=ie(_,ee,C.startLineNumber+1,void 0,w);if(!pe){const fe=j?ce:Y;return{beforeEnter:fe,afterEnter:fe}}let ge=j?ce:pe.indentation;return pe.action===h.l.Indent&&(ge=d.shiftIndent(ge)),T.shouldDecrease(B)&&(ge=d.unshiftIndent(ge)),{beforeEnter:j?ce:Y,afterEnter:ge}}function z(_,y,C,d,w,D){if(_<4)return null;const L=(0,$.P6)(y,C.startLineNumber,C.startColumn);if(L.firstCharOffset)return null;const k=D.getLanguageConfiguration(L.languageId).indentRulesSupport;if(!k)return null;const j=L.getLineContent(),N=j.substr(0,C.startColumn-1-L.firstCharOffset);let B;if(C.isEmpty()?B=j.substr(C.startColumn-1-L.firstCharOffset):B=(0,$.P6)(y,C.endLineNumber,C.endColumn).getLineContent().substr(C.endColumn-1-L.firstCharOffset),!k.shouldDecrease(N+B)&&k.shouldDecrease(N+d+B)){const T=ie(_,y,C.startLineNumber,!1,D);if(!T)return null;let H=T.indentation;return T.action!==h.l.Indent&&(H=w.unshiftIndent(H)),H}return null}function S(_,y,C){const d=C.getLanguageConfiguration(_.getLanguageId()).indentRulesSupport;return!d||y<1||y>_.getLineCount()?null:d.getIndentMetadata(_.getLineContent(y))}},80794:(Tt,Fe,f)=>{f.d(Fe,{h:()=>te});var I=f(49550),h=f(52394);function te($,x,ie,Q){const J=(0,h.P6)(x,ie.startLineNumber,ie.startColumn),z=Q.getLanguageConfiguration(J.languageId);if(!z)return null;const S=J.getLineContent(),_=S.substr(0,ie.startColumn-1-J.firstCharOffset);let y;ie.isEmpty()?y=S.substr(ie.startColumn-1-J.firstCharOffset):y=(0,h.P6)(x,ie.endLineNumber,ie.endColumn).getLineContent().substr(ie.endColumn-1-J.firstCharOffset);let C="";if(ie.startLineNumber>1&&J.firstCharOffset===0){const j=(0,h.P6)(x,ie.startLineNumber-1);j.languageId===J.languageId&&(C=j.getLineContent())}const d=z.onEnter($,C,_,y);if(!d)return null;const w=d.indentAction;let D=d.appendText;const L=d.removeText||0;D?w===I.l.Indent&&(D=" "+D):w===I.l.Indent||w===I.l.IndentOutdent?D=" ":D="";let k=(0,h.Cw)(x,ie.startLineNumber,ie.startColumn);return L&&(k=k.substring(0,k.length-L)),{indentAction:w,appendText:D,removeText:L,indentation:k}}},77922:(Tt,Fe,f)=>{f.d(Fe,{L:()=>h});var I=f(82399);const h=(0,I.u1)("languageService")},49550:(Tt,Fe,f)=>{f.d(Fe,{GB:()=>te,i3:()=>h,l:()=>I});var I;(function(x){x[x.None=0]="None",x[x.Indent=1]="Indent",x[x.IndentOutdent=2]="IndentOutdent",x[x.Outdent=3]="Outdent"})(I||(I={}));class h{constructor(ie){if(this._neutralCharacter=null,this._neutralCharacterSearched=!1,this.open=ie.open,this.close=ie.close,this._inString=!0,this._inComment=!0,this._inRegEx=!0,Array.isArray(ie.notIn))for(let Q=0,J=ie.notIn.length;Q<J;Q++)switch(ie.notIn[Q]){case"string":this._inString=!1;break;case"comment":this._inComment=!1;break;case"regex":this._inRegEx=!1;break}}isOK(ie){switch(ie){case 0:return!0;case 1:return this._inComment;case 2:return this._inString;case 3:return this._inRegEx}}shouldAutoClose(ie,Q){if(ie.getTokenCount()===0)return!0;const J=ie.findTokenIndexAtOffset(Q-2),z=ie.getStandardTokenType(J);return this.isOK(z)}_findNeutralCharacterInRange(ie,Q){for(let J=ie;J<=Q;J++){const z=String.fromCharCode(J);if(!this.open.includes(z)&&!this.close.includes(z))return z}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 te{constructor(ie){this.autoClosingPairsOpenByStart=new Map,this.autoClosingPairsOpenByEnd=new Map,this.autoClosingPairsCloseByStart=new Map,this.autoClosingPairsCloseByEnd=new Map,this.autoClosingPairsCloseSingleChar=new Map;for(const Q of ie)$(this.autoClosingPairsOpenByStart,Q.open.charAt(0),Q),$(this.autoClosingPairsOpenByEnd,Q.open.charAt(Q.open.length-1),Q),$(this.autoClosingPairsCloseByStart,Q.close.charAt(0),Q),$(this.autoClosingPairsCloseByEnd,Q.close.charAt(Q.close.length-1),Q),Q.close.length===1&&Q.open.length===1&&$(this.autoClosingPairsCloseSingleChar,Q.close,Q)}}function $(x,ie,Q){x.has(ie)?x.get(ie).push(Q):x.set(ie,[Q])}},52394:(Tt,Fe,f)=>{f.d(Fe,{JZ:()=>fe,Cw:()=>K,P6:()=>he});var I=f(2106),h=f(10998),te=f(16844),$=f(18782),x=f(49550),ie=f(19184);class Q{constructor(De){if(De.autoClosingPairs?this._autoClosingPairs=De.autoClosingPairs.map(Pe=>new x.i3(Pe)):De.brackets?this._autoClosingPairs=De.brackets.map(Pe=>new x.i3({open:Pe[0],close:Pe[1]})):this._autoClosingPairs=[],De.__electricCharacterSupport&&De.__electricCharacterSupport.docComment){const Pe=De.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new x.i3({open:Pe.open,close:Pe.close||""}))}this._autoCloseBefore=typeof De.autoCloseBefore=="string"?De.autoCloseBefore:Q.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED,this._surroundingPairs=De.surroundingPairs||this._autoClosingPairs}getAutoClosingPairs(){return this._autoClosingPairs}getAutoCloseBeforeSet(){return this._autoCloseBefore}getSurroundingPairs(){return this._surroundingPairs}}Q.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED=`;:.,=}])> `;var J=f(13338),z=f(1804);class S{constructor(De){this._richEditBrackets=De}getElectricCharacters(){const De=[];if(this._richEditBrackets)for(const Pe of this._richEditBrackets.brackets)for(const Ue of Pe.close){const Re=Ue.charAt(Ue.length-1);De.push(Re)}return(0,J.dM)(De)}onElectricCharacter(De,Pe,Ue){if(!this._richEditBrackets||this._richEditBrackets.brackets.length===0)return null;const Re=Pe.findTokenIndexAtOffset(Ue-1);if((0,ie.Yo)(Pe.getStandardTokenType(Re)))return null;const et=this._richEditBrackets.reversedRegex,rt=Pe.getLineContent().substring(0,Ue-1)+De,Lt=z.Fu.findPrevBracketInRange(et,1,rt,0,rt.length);if(!Lt)return null;const Dt=rt.substring(Lt.startColumn-1,Lt.endColumn-1).toLowerCase();if(this._richEditBrackets.textIsOpenBracket[Dt])return null;const Ie=Pe.getActualLineContentBefore(Lt.startColumn-1);return/^\s*$/.test(Ie)?{matchOpenBracket:Dt}:null}}function _(Ke){return Ke.global&&(Ke.lastIndex=0),!0}class y{constructor(De){this._indentationRules=De}shouldIncrease(De){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&_(this._indentationRules.increaseIndentPattern)&&this._indentationRules.increaseIndentPattern.test(De))}shouldDecrease(De){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&_(this._indentationRules.decreaseIndentPattern)&&this._indentationRules.decreaseIndentPattern.test(De))}shouldIndentNextLine(De){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&_(this._indentationRules.indentNextLinePattern)&&this._indentationRules.indentNextLinePattern.test(De))}shouldIgnore(De){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&_(this._indentationRules.unIndentedLinePattern)&&this._indentationRules.unIndentedLinePattern.test(De))}getIndentMetadata(De){let Pe=0;return this.shouldIncrease(De)&&(Pe+=1),this.shouldDecrease(De)&&(Pe+=2),this.shouldIndentNextLine(De)&&(Pe+=4),this.shouldIgnore(De)&&(Pe+=8),Pe}}var C=f(94327);class d{constructor(De){De=De||{},De.brackets=De.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],De.brackets.forEach(Pe=>{const Ue=d._createOpenBracketRegExp(Pe[0]),Re=d._createCloseBracketRegExp(Pe[1]);Ue&&Re&&this._brackets.push({open:Pe[0],openRegExp:Ue,close:Pe[1],closeRegExp:Re})}),this._regExpRules=De.onEnterRules||[]}onEnter(De,Pe,Ue,Re){if(De>=3)for(let et=0,rt=this._regExpRules.length;et<rt;et++){const Lt=this._regExpRules[et];if([{reg:Lt.beforeText,text:Ue},{reg:Lt.afterText,text:Re},{reg:Lt.previousLineText,text:Pe}].every(xt=>xt.reg?(xt.reg.lastIndex=0,xt.reg.test(xt.text)):!0))return Lt.action}if(De>=2&&Ue.length>0&&Re.length>0)for(let et=0,rt=this._brackets.length;et<rt;et++){const Lt=this._brackets[et];if(Lt.openRegExp.test(Ue)&&Lt.closeRegExp.test(Re))return{indentAction:x.l.IndentOutdent}}if(De>=2&&Ue.length>0){for(let et=0,rt=this._brackets.length;et<rt;et++)if(this._brackets[et].openRegExp.test(Ue))return{indentAction:x.l.Indent}}return null}static _createOpenBracketRegExp(De){let Pe=te.bm(De);return/\B/.test(Pe.charAt(0))||(Pe="\\b"+Pe),Pe+="\\s*$",d._safeRegExp(Pe)}static _createCloseBracketRegExp(De){let Pe=te.bm(De);return/\B/.test(Pe.charAt(Pe.length-1))||(Pe=Pe+"\\b"),Pe="^\\s*"+Pe,d._safeRegExp(Pe)}static _safeRegExp(De){try{return new RegExp(De)}catch(Pe){return(0,C.dz)(Pe),null}}}var w=f(82399),D=f(85753),L=f(77922),k=f(66726),j=f(54957),N=f(36260);class B{constructor(De,Pe){this.languageId=De;let Ue;Pe.colorizedBracketPairs?Ue=T(Pe.colorizedBracketPairs.map(rt=>[rt[0],rt[1]])):Pe.brackets?Ue=T(Pe.brackets.map(rt=>[rt[0],rt[1]]).filter(rt=>!(rt[0]==="<"&&rt[1]===">"))):Ue=[];const Re=new N.V(rt=>{const Lt=new Set;return{info:new Y(this,rt,Lt),closing:Lt}}),et=new N.V(rt=>{const Lt=new Set;return{info:new ee(this,rt,Lt),opening:Lt}});for(const[rt,Lt]of Ue){const Dt=Re.get(rt),xt=et.get(Lt);Dt.closing.add(xt.info),xt.opening.add(Dt.info)}this._openingBrackets=new Map([...Re.cachedValues].map(([rt,Lt])=>[rt,Lt.info])),this._closingBrackets=new Map([...et.cachedValues].map(([rt,Lt])=>[rt,Lt.info]))}get openingBrackets(){return[...this._openingBrackets.values()]}get closingBrackets(){return[...this._closingBrackets.values()]}getOpeningBracketInfo(De){return this._openingBrackets.get(De)}getClosingBracketInfo(De){return this._closingBrackets.get(De)}getBracketInfo(De){return this.getOpeningBracketInfo(De)||this.getClosingBracketInfo(De)}}function T(Ke){return Ke.filter(([De,Pe])=>De!==""&&Pe!=="")}class H{constructor(De,Pe){this.config=De,this.bracketText=Pe}get languageId(){return this.config.languageId}}class Y extends H{constructor(De,Pe,Ue){super(De,Pe),this.openedBrackets=Ue,this.isOpeningBracket=!0}}class ee extends H{constructor(De,Pe,Ue){super(De,Pe),this.closedBrackets=Ue,this.isOpeningBracket=!1}closes(De){if(De.languageId===this.languageId&&De.config!==this.config)throw new C.D7("Brackets from different language configuration cannot be used.");return this.closedBrackets.has(De)}getClosedBrackets(){return[...this.closedBrackets]}}var ce=function(Ke,De,Pe,Ue){var Re=arguments.length,et=Re<3?De:Ue===null?Ue=Object.getOwnPropertyDescriptor(De,Pe):Ue,rt;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")et=Reflect.decorate(Ke,De,Pe,Ue);else for(var Lt=Ke.length-1;Lt>=0;Lt--)(rt=Ke[Lt])&&(et=(Re<3?rt(et):Re>3?rt(De,Pe,et):rt(De,Pe))||et);return Re>3&&et&&Object.defineProperty(De,Pe,et),et},pe=function(Ke,De){return function(Pe,Ue){De(Pe,Ue,Ke)}};class ge{constructor(De){this.languageId=De}affects(De){return this.languageId?this.languageId===De:!0}}const fe=(0,w.u1)("languageConfigurationService");let oe=class extends h.jG{constructor(De,Pe){super(),this.configurationService=De,this.languageService=Pe,this._registry=this._register(new lt),this.onDidChangeEmitter=this._register(new I.vl),this.onDidChange=this.onDidChangeEmitter.event,this.configurations=new Map;const Ue=new Set(Object.values(le));this._register(this.configurationService.onDidChangeConfiguration(Re=>{const et=Re.change.keys.some(Lt=>Ue.has(Lt)),rt=Re.change.overrides.filter(([Lt,Dt])=>Dt.some(xt=>Ue.has(xt))).map(([Lt])=>Lt);if(et)this.configurations.clear(),this.onDidChangeEmitter.fire(new ge(void 0));else for(const Lt of rt)this.languageService.isRegisteredLanguageId(Lt)&&(this.configurations.delete(Lt),this.onDidChangeEmitter.fire(new ge(Lt)))})),this._register(this._registry.onDidChange(Re=>{this.configurations.delete(Re.languageId),this.onDidChangeEmitter.fire(new ge(Re.languageId))}))}register(De,Pe,Ue){return this._registry.register(De,Pe,Ue)}getLanguageConfiguration(De){let Pe=this.configurations.get(De);return Pe||(Pe=Z(De,this._registry,this.configurationService,this.languageService),this.configurations.set(De,Pe)),Pe}};oe=ce([pe(0,D.pG),pe(1,L.L)],oe);function Z(Ke,De,Pe,Ue){let Re=De.getLanguageConfiguration(Ke);if(!Re){if(!Ue.isRegisteredLanguageId(Ke))throw new Error(`Language id "${Ke}" is not configured nor known`);Re=new We(Ke,{})}const et=se(Re.languageId,Pe),rt=Ee([Re.underlyingConfig,et]);return new We(Re.languageId,rt)}const le={brackets:"editor.language.brackets",colorizedBracketPairs:"editor.language.colorizedBracketPairs"};function se(Ke,De){const Pe=De.getValue(le.brackets,{overrideIdentifier:Ke}),Ue=De.getValue(le.colorizedBracketPairs,{overrideIdentifier:Ke});return{brackets:X(Pe),colorizedBracketPairs:X(Ue)}}function X(Ke){if(Array.isArray(Ke))return Ke.map(De=>{if(!(!Array.isArray(De)||De.length!==2))return[De[0],De[1]]}).filter(De=>!!De)}function K(Ke,De,Pe){const Ue=Ke.getLineContent(De);let Re=te.UU(Ue);return Re.length>Pe-1&&(Re=Re.substring(0,Pe-1)),Re}function he(Ke,De,Pe){Ke.tokenization.forceTokenization(De);const Ue=Ke.tokenization.getLineTokens(De),Re=typeof Pe>"u"?Ke.getLineMaxColumn(De)-1:Pe-1;return(0,ie.BQ)(Ue,Re)}class ve{constructor(De){this.languageId=De,this._resolved=null,this._entries=[],this._order=0,this._resolved=null}register(De,Pe){const Ue=new O(De,Pe,++this._order);return this._entries.push(Ue),this._resolved=null,(0,h.s)(()=>{for(let Re=0;Re<this._entries.length;Re++)if(this._entries[Re]===Ue){this._entries.splice(Re,1),this._resolved=null;break}})}getResolvedConfiguration(){if(!this._resolved){const De=this._resolve();De&&(this._resolved=new We(this.languageId,De))}return this._resolved}_resolve(){return this._entries.length===0?null:(this._entries.sort(O.cmp),Ee(this._entries.map(De=>De.configuration)))}}function Ee(Ke){let De={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 Pe of Ke)De={comments:Pe.comments||De.comments,brackets:Pe.brackets||De.brackets,wordPattern:Pe.wordPattern||De.wordPattern,indentationRules:Pe.indentationRules||De.indentationRules,onEnterRules:Pe.onEnterRules||De.onEnterRules,autoClosingPairs:Pe.autoClosingPairs||De.autoClosingPairs,surroundingPairs:Pe.surroundingPairs||De.surroundingPairs,autoCloseBefore:Pe.autoCloseBefore||De.autoCloseBefore,folding:Pe.folding||De.folding,colorizedBracketPairs:Pe.colorizedBracketPairs||De.colorizedBracketPairs,__electricCharacterSupport:Pe.__electricCharacterSupport||De.__electricCharacterSupport};return De}class O{constructor(De,Pe,Ue){this.configuration=De,this.priority=Pe,this.order=Ue}static cmp(De,Pe){return De.priority===Pe.priority?De.order-Pe.order:De.priority-Pe.priority}}class ot{constructor(De){this.languageId=De}}class lt extends h.jG{constructor(){super(),this._entries=new Map,this._onDidChange=this._register(new I.vl),this.onDidChange=this._onDidChange.event,this._register(this.register(j.vH,{brackets:[["(",")"],["[","]"],["{","}"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],colorizedBracketPairs:[],folding:{offSide:!0}},0))}register(De,Pe,Ue=0){let Re=this._entries.get(De);Re||(Re=new ve(De),this._entries.set(De,Re));const et=Re.register(Pe,Ue);return this._onDidChange.fire(new ot(De)),(0,h.s)(()=>{et.dispose(),this._onDidChange.fire(new ot(De))})}getLanguageConfiguration(De){const Pe=this._entries.get(De);return Pe?.getResolvedConfiguration()||null}}class We{constructor(De,Pe){this.languageId=De,this.underlyingConfig=Pe,this._brackets=null,this._electricCharacter=null,this._onEnterSupport=this.underlyingConfig.brackets||this.underlyingConfig.indentationRules||this.underlyingConfig.onEnterRules?new d(this.underlyingConfig):null,this.comments=We._handleComments(this.underlyingConfig),this.characterPair=new Q(this.underlyingConfig),this.wordDefinition=this.underlyingConfig.wordPattern||$.Ld,this.indentationRules=this.underlyingConfig.indentationRules,this.underlyingConfig.indentationRules?this.indentRulesSupport=new y(this.underlyingConfig.indentationRules):this.indentRulesSupport=null,this.foldingRules=this.underlyingConfig.folding||{},this.bracketsNew=new B(De,this.underlyingConfig)}getWordDefinition(){return(0,$.Io)(this.wordDefinition)}get brackets(){return!this._brackets&&this.underlyingConfig.brackets&&(this._brackets=new z.az(this.languageId,this.underlyingConfig.brackets)),this._brackets}get electricCharacter(){return this._electricCharacter||(this._electricCharacter=new S(this.brackets)),this._electricCharacter}onEnter(De,Pe,Ue,Re){return this._onEnterSupport?this._onEnterSupport.onEnter(De,Pe,Ue,Re):null}getAutoClosingPairs(){return new x.GB(this.characterPair.getAutoClosingPairs())}getAutoCloseBeforeSet(){return this.characterPair.getAutoCloseBeforeSet()}getSurroundingPairs(){return this.characterPair.getSurroundingPairs()}static _handleComments(De){const Pe=De.comments;if(!Pe)return null;const Ue={};if(Pe.lineComment&&(Ue.lineCommentToken=Pe.lineComment),Pe.blockComment){const[Re,et]=Pe.blockComment;Ue.blockCommentStartToken=Re,Ue.blockCommentEndToken=et}return Ue}}(0,k.v)(fe,oe)},54957:(Tt,Fe,f)=>{f.d(Fe,{W6:()=>J,vH:()=>z});var I=f(3765),h=f(2106),te=f(67167),$=f(53720),x=f(27142);const ie={ModesRegistry:"editor.modesRegistry"};class Q{constructor(){this._onDidChangeLanguages=new h.vl,this.onDidChangeLanguages=this._onDidChangeLanguages.event,this._languages=[]}registerLanguage(y){return this._languages.push(y),this._onDidChangeLanguages.fire(void 0),{dispose:()=>{for(let C=0,d=this._languages.length;C<d;C++)if(this._languages[C]===y){this._languages.splice(C,1);return}}}}getLanguages(){return this._languages}}const J=new Q;te.O.add(ie.ModesRegistry,J);const z="plaintext",S=".txt";J.registerLanguage({id:z,extensions:[S],aliases:[I.kg("plainText.alias","Plain Text"),"text"],mimetypes:[$.K.text]}),te.O.as(x.Fd.Configuration).registerDefaultConfigurations([{overrides:{"[plaintext]":{"editor.unicodeHighlight.ambiguousCharacters":!1,"editor.unicodeHighlight.invisibleCharacters":!1}}}])},97036:(Tt,Fe,f)=>{f.d(Fe,{$H:()=>te,Lh:()=>$,r3:()=>h});var I=f(44364);const h=new class{clone(){return this}equals(x){return this===x}};function te(x,ie){return new I.$M([new I.ou(0,"",x)],ie)}function $(x,ie){const Q=new Uint32Array(2);return Q[0]=0,Q[1]=(x<<0|0|0|32768|2<<24)>>>0,new I.rY(Q,ie===null?h:ie)}},19184:(Tt,Fe,f)=>{f.d(Fe,{BQ:()=>I,Yo:()=>te});function I($,x){const ie=$.getCount(),Q=$.findTokenIndexAtOffset(x),J=$.getLanguageId(Q);let z=Q;for(;z+1<ie&&$.getLanguageId(z+1)===J;)z++;let S=Q;for(;S>0&&$.getLanguageId(S-1)===J;)S--;return new h($,J,S,z+1,$.getStartOffset(S),$.getEndOffset(z))}class h{constructor(x,ie,Q,J,z,S){this._scopedLineTokensBrand=void 0,this._actual=x,this.languageId=ie,this._firstTokenIndex=Q,this._lastTokenIndex=J,this.firstCharOffset=z,this._lastCharOffset=S}getLineContent(){return this._actual.getLineContent().substring(this.firstCharOffset,this._lastCharOffset)}getActualLineContentBefore(x){return this._actual.getLineContent().substring(0,this.firstCharOffset+x)}getTokenCount(){return this._lastTokenIndex-this._firstTokenIndex}findTokenIndexAtOffset(x){return this._actual.findTokenIndexAtOffset(x+this.firstCharOffset)-this._firstTokenIndex}getStandardTokenType(x){return this._actual.getStandardTokenType(x+this._firstTokenIndex)}}function te($){return($&3)!==0}},1804:(Tt,Fe,f)=>{f.d(Fe,{Fu:()=>L,az:()=>ie});var I=f(16844),h=f(54324),te=f(28061);class ${constructor(j,N,B,T,H,Y){this._richEditBracketBrand=void 0,this.languageId=j,this.index=N,this.open=B,this.close=T,this.forwardRegex=H,this.reversedRegex=Y,this._openSet=$._toSet(this.open),this._closeSet=$._toSet(this.close)}isOpen(j){return this._openSet.has(j)}isClose(j){return this._closeSet.has(j)}static _toSet(j){const N=new Set;for(const B of j)N.add(B);return N}}function x(k){const j=k.length;k=k.map(Y=>[Y[0].toLowerCase(),Y[1].toLowerCase()]);const N=[];for(let Y=0;Y<j;Y++)N[Y]=Y;const B=(Y,ee)=>{const[ce,pe]=Y,[ge,fe]=ee;return ce===ge||ce===fe||pe===ge||pe===fe},T=(Y,ee)=>{const ce=Math.min(Y,ee),pe=Math.max(Y,ee);for(let ge=0;ge<j;ge++)N[ge]===pe&&(N[ge]=ce)};for(let Y=0;Y<j;Y++){const ee=k[Y];for(let ce=Y+1;ce<j;ce++){const pe=k[ce];B(ee,pe)&&T(N[Y],N[ce])}}const H=[];for(let Y=0;Y<j;Y++){const ee=[],ce=[];for(let pe=0;pe<j;pe++)if(N[pe]===Y){const[ge,fe]=k[pe];ee.push(ge),ce.push(fe)}ee.length>0&&H.push({open:ee,close:ce})}return H}class ie{constructor(j,N){this._richEditBracketsBrand=void 0;const B=x(N);this.brackets=B.map((T,H)=>new $(j,H,T.open,T.close,S(T.open,T.close,B,H),_(T.open,T.close,B,H))),this.forwardRegex=y(this.brackets),this.reversedRegex=C(this.brackets),this.textIsBracket={},this.textIsOpenBracket={},this.maxBracketLength=0;for(const T of this.brackets){for(const H of T.open)this.textIsBracket[H]=T,this.textIsOpenBracket[H]=!0,this.maxBracketLength=Math.max(this.maxBracketLength,H.length);for(const H of T.close)this.textIsBracket[H]=T,this.textIsOpenBracket[H]=!1,this.maxBracketLength=Math.max(this.maxBracketLength,H.length)}}}function Q(k,j,N,B){for(let T=0,H=j.length;T<H;T++){if(T===N)continue;const Y=j[T];for(const ee of Y.open)ee.indexOf(k)>=0&&B.push(ee);for(const ee of Y.close)ee.indexOf(k)>=0&&B.push(ee)}}function J(k,j){return k.length-j.length}function z(k){if(k.length<=1)return k;const j=[],N=new Set;for(const B of k)N.has(B)||(j.push(B),N.add(B));return j}function S(k,j,N,B){let T=[];T=T.concat(k),T=T.concat(j);for(let H=0,Y=T.length;H<Y;H++)Q(T[H],N,B,T);return T=z(T),T.sort(J),T.reverse(),w(T)}function _(k,j,N,B){let T=[];T=T.concat(k),T=T.concat(j);for(let H=0,Y=T.length;H<Y;H++)Q(T[H],N,B,T);return T=z(T),T.sort(J),T.reverse(),w(T.map(D))}function y(k){let j=[];for(const N of k){for(const B of N.open)j.push(B);for(const B of N.close)j.push(B)}return j=z(j),w(j)}function C(k){let j=[];for(const N of k){for(const B of N.open)j.push(B);for(const B of N.close)j.push(B)}return j=z(j),w(j.map(D))}function d(k){const j=/^[\w ]+$/.test(k);return k=I.bm(k),j?`\\b${k}\\b`:k}function w(k){const j=`(${k.map(d).join(")|(")})`;return I.OS(j,!0)}const D=function(){function k(B){if(h.aI){const T=new Uint16Array(B.length);let H=0;for(let Y=B.length-1;Y>=0;Y--)T[H++]=B.charCodeAt(Y);return h.b7().decode(T)}else{const T=[];let H=0;for(let Y=B.length-1;Y>=0;Y--)T[H++]=B.charAt(Y);return T.join("")}}let j=null,N=null;return function(T){return j!==T&&(j=T,N=k(j)),N}}();class L{static _findPrevBracketInText(j,N,B,T){const H=B.match(j);if(!H)return null;const Y=B.length-(H.index||0),ee=H[0].length,ce=T+Y;return new te.Q(N,ce-ee+1,N,ce+1)}static findPrevBracketInRange(j,N,B,T,H){const ee=D(B).substring(B.length-H,B.length-T);return this._findPrevBracketInText(j,N,ee,T)}static findNextBracketInText(j,N,B,T){const H=B.match(j);if(!H)return null;const Y=H.index||0,ee=H[0].length;if(ee===0)return null;const ce=T+Y;return new te.Q(N,ce+1,N,ce+1+ee)}static findNextBracketInRange(j,N,B,T,H){const Y=B.substring(T,H);return this.findNextBracketInText(j,N,Y,T)}}},1458:(Tt,Fe,f)=>{f.d(Fe,{Yj:()=>Q,s0:()=>J});var I=f(16844),h=f(57445),te=f(44364),$=f(97036),x=function(S,_,y,C){function d(w){return w instanceof y?w:new y(function(D){D(w)})}return new(y||(y=Promise))(function(w,D){function L(N){try{j(C.next(N))}catch(B){D(B)}}function k(N){try{j(C.throw(N))}catch(B){D(B)}}function j(N){N.done?w(N.value):d(N.value).then(L,k)}j((C=C.apply(S,_||[])).next())})};const ie={getInitialState:()=>$.r3,tokenizeEncoded:(S,_,y)=>(0,$.Lh)(0,y)};function Q(S,_,y){return x(this,void 0,void 0,function*(){if(!y)return z(_,S.languageIdCodec,ie);const C=yield te.dG.getOrCreate(y);return z(_,S.languageIdCodec,C||ie)})}function J(S,_,y,C,d,w,D){let L="<div>",k=C,j=0,N=!0;for(let B=0,T=_.getCount();B<T;B++){const H=_.getEndOffset(B);if(H<=C)continue;let Y="";for(;k<H&&k<d;k++){const ee=S.charCodeAt(k);switch(ee){case 9:{let ce=w-(k+j)%w;for(j+=ce-1;ce>0;)D&&N?(Y+=" ",N=!1):(Y+=" ",N=!0),ce--;break}case 60:Y+="<",N=!1;break;case 62:Y+=">",N=!1;break;case 38:Y+="&",N=!1;break;case 0:Y+="�",N=!1;break;case 65279:case 8232:case 8233:case 133:Y+="\uFFFD",N=!1;break;case 13:Y+="​",N=!1;break;case 32:D&&N?(Y+=" ",N=!1):(Y+=" ",N=!0);break;default:Y+=String.fromCharCode(ee),N=!1}}if(L+=`<span style="${_.getInlineStyle(B,y)}">${Y}</span>`,H>d||k>=d)break}return L+="</div>",L}function z(S,_,y){let C='<div class="monaco-tokenized-source">';const d=I.uz(S);let w=y.getInitialState();for(let D=0,L=d.length;D<L;D++){const k=d[D];D>0&&(C+="<br/>");const j=y.tokenizeEncoded(k,!0,w);h.f.convertToEndOffset(j.tokens,k.length);const B=new h.f(j.tokens,k,_).inflate();let T=0;for(let H=0,Y=B.getCount();H<Y;H++){const ee=B.getClassName(H),ce=B.getEndOffset(H);C+=`<span class="${ee}">${I.ih(k.substring(T,ce))}</span>`,T=ce}w=j.endState}return C+="</div>",C}},66055:(Tt,Fe,f)=>{f.d(Fe,{A5:()=>h,Dg:()=>ie,F4:()=>S,L5:()=>z,R3:()=>te,VW:()=>$,Wo:()=>J,X2:()=>x,nk:()=>Q,vd:()=>_});var I=f(71386),h;(function(y){y[y.Left=1]="Left",y[y.Center=2]="Center",y[y.Right=4]="Right",y[y.Full=7]="Full"})(h||(h={}));var te;(function(y){y[y.Inline=1]="Inline",y[y.Gutter=2]="Gutter"})(te||(te={}));var $;(function(y){y[y.Both=0]="Both",y[y.Right=1]="Right",y[y.Left=2]="Left",y[y.None=3]="None"})($||($={}));class x{constructor(C){this._textModelResolvedOptionsBrand=void 0,this.tabSize=Math.max(1,C.tabSize|0),this.indentSize=C.tabSize|0,this.insertSpaces=!!C.insertSpaces,this.defaultEOL=C.defaultEOL|0,this.trimAutoWhitespace=!!C.trimAutoWhitespace,this.bracketPairColorizationOptions=C.bracketPairColorizationOptions}equals(C){return this.tabSize===C.tabSize&&this.indentSize===C.indentSize&&this.insertSpaces===C.insertSpaces&&this.defaultEOL===C.defaultEOL&&this.trimAutoWhitespace===C.trimAutoWhitespace&&(0,I.aI)(this.bracketPairColorizationOptions,C.bracketPairColorizationOptions)}createChangeEvent(C){return{tabSize:this.tabSize!==C.tabSize,indentSize:this.indentSize!==C.indentSize,insertSpaces:this.insertSpaces!==C.insertSpaces,trimAutoWhitespace:this.trimAutoWhitespace!==C.trimAutoWhitespace}}}class ie{constructor(C,d){this._findMatchBrand=void 0,this.range=C,this.matches=d}}function Q(y){return y&&typeof y.read=="function"}class J{constructor(C,d,w,D,L,k){this.identifier=C,this.range=d,this.text=w,this.forceMoveMarkers=D,this.isAutoWhitespaceEdit=L,this._isTracked=k}}class z{constructor(C,d,w){this.regex=C,this.wordSeparators=d,this.simpleSearch=w}}class S{constructor(C,d,w){this.reverseEdits=C,this.changes=d,this.trimAutoWhitespaceLineNumbers=w}}function _(y){return!y.isTooLargeForSyncing()&&!y.isForSimpleWidget}},64651:(Tt,Fe,f)=>{f.d(Fe,{Gc:()=>w,Nn:()=>x,Xw:()=>ie,rh:()=>d,yF:()=>C});var I=f(62549),h=f(34883),te=f(60756);class ${constructor(L){this._length=L}get length(){return this._length}}class x extends ${constructor(L,k,j,N,B){super(L),this.openingBracket=k,this.child=j,this.closingBracket=N,this.missingOpeningBracketIds=B}static create(L,k,j){let N=L.length;return k&&(N=(0,h.QB)(N,k.length)),j&&(N=(0,h.QB)(N,j.length)),new x(N,L,k,j,k?k.missingOpeningBracketIds:te.gV.getEmpty())}get kind(){return 2}get listHeight(){return 0}get childrenLength(){return 3}getChild(L){switch(L){case 0:return this.openingBracket;case 1:return this.child;case 2:return this.closingBracket}throw new Error("Invalid child index")}get children(){const L=new Array;return L.push(this.openingBracket),this.child&&L.push(this.child),this.closingBracket&&L.push(this.closingBracket),L}canBeReused(L){return!(this.closingBracket===null||L.intersects(this.missingOpeningBracketIds))}deepClone(){return new x(this.length,this.openingBracket.deepClone(),this.child&&this.child.deepClone(),this.closingBracket&&this.closingBracket.deepClone(),this.missingOpeningBracketIds)}computeMinIndentation(L,k){return this.child?this.child.computeMinIndentation((0,h.QB)(L,this.openingBracket.length),k):Number.MAX_SAFE_INTEGER}}class ie extends ${constructor(L,k,j){super(L),this.listHeight=k,this._missingOpeningBracketIds=j,this.cachedMinIndentation=-1}static create23(L,k,j,N=!1){let B=L.length,T=L.missingOpeningBracketIds;if(L.listHeight!==k.listHeight)throw new Error("Invalid list heights");if(B=(0,h.QB)(B,k.length),T=T.merge(k.missingOpeningBracketIds),j){if(L.listHeight!==j.listHeight)throw new Error("Invalid list heights");B=(0,h.QB)(B,j.length),T=T.merge(j.missingOpeningBracketIds)}return N?new J(B,L.listHeight+1,L,k,j,T):new Q(B,L.listHeight+1,L,k,j,T)}static getEmpty(){return new S(h.Vp,0,[],te.gV.getEmpty())}get kind(){return 4}get missingOpeningBracketIds(){return this._missingOpeningBracketIds}throwIfImmutable(){}makeLastElementMutable(){this.throwIfImmutable();const L=this.childrenLength;if(L===0)return;const k=this.getChild(L-1),j=k.kind===4?k.toMutable():k;return k!==j&&this.setChild(L-1,j),j}makeFirstElementMutable(){if(this.throwIfImmutable(),this.childrenLength===0)return;const k=this.getChild(0),j=k.kind===4?k.toMutable():k;return k!==j&&this.setChild(0,j),j}canBeReused(L){if(L.intersects(this.missingOpeningBracketIds))return!1;let k=this,j;for(;k.kind===4&&(j=k.childrenLength)>0;)k=k.getChild(j-1);return k.canBeReused(L)}handleChildrenChanged(){this.throwIfImmutable();const L=this.childrenLength;let k=this.getChild(0).length,j=this.getChild(0).missingOpeningBracketIds;for(let N=1;N<L;N++){const B=this.getChild(N);k=(0,h.QB)(k,B.length),j=j.merge(B.missingOpeningBracketIds)}this._length=k,this._missingOpeningBracketIds=j,this.cachedMinIndentation=-1}computeMinIndentation(L,k){if(this.cachedMinIndentation!==-1)return this.cachedMinIndentation;let j=Number.MAX_SAFE_INTEGER,N=L;for(let B=0;B<this.childrenLength;B++){const T=this.getChild(B);T&&(j=Math.min(j,T.computeMinIndentation(N,k)),N=(0,h.QB)(N,T.length))}return this.cachedMinIndentation=j,j}}class Q extends ie{constructor(L,k,j,N,B,T){super(L,k,T),this._item1=j,this._item2=N,this._item3=B}get childrenLength(){return this._item3!==null?3:2}getChild(L){switch(L){case 0:return this._item1;case 1:return this._item2;case 2:return this._item3}throw new Error("Invalid child index")}setChild(L,k){switch(L){case 0:this._item1=k;return;case 1:this._item2=k;return;case 2:this._item3=k;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}deepClone(){return new Q(this.length,this.listHeight,this._item1.deepClone(),this._item2.deepClone(),this._item3?this._item3.deepClone():null,this.missingOpeningBracketIds)}appendChildOfSameHeight(L){if(this._item3)throw new Error("Cannot append to a full (2,3) tree node");this.throwIfImmutable(),this._item3=L,this.handleChildrenChanged()}unappendChild(){if(!this._item3)throw new Error("Cannot remove from a non-full (2,3) tree node");this.throwIfImmutable();const L=this._item3;return this._item3=null,this.handleChildrenChanged(),L}prependChildOfSameHeight(L){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=L,this.handleChildrenChanged()}unprependChild(){if(!this._item3)throw new Error("Cannot remove from a non-full (2,3) tree node");this.throwIfImmutable();const L=this._item1;return this._item1=this._item2,this._item2=this._item3,this._item3=null,this.handleChildrenChanged(),L}toMutable(){return this}}class J extends Q{toMutable(){return new Q(this.length,this.listHeight,this.item1,this.item2,this.item3,this.missingOpeningBracketIds)}throwIfImmutable(){throw new Error("this instance is immutable")}}class z extends ie{constructor(L,k,j,N){super(L,k,N),this._children=j}get childrenLength(){return this._children.length}getChild(L){return this._children[L]}setChild(L,k){this._children[L]=k}get children(){return this._children}deepClone(){const L=new Array(this._children.length);for(let k=0;k<this._children.length;k++)L[k]=this._children[k].deepClone();return new z(this.length,this.listHeight,L,this.missingOpeningBracketIds)}appendChildOfSameHeight(L){this.throwIfImmutable(),this._children.push(L),this.handleChildrenChanged()}unappendChild(){this.throwIfImmutable();const L=this._children.pop();return this.handleChildrenChanged(),L}prependChildOfSameHeight(L){this.throwIfImmutable(),this._children.unshift(L),this.handleChildrenChanged()}unprependChild(){this.throwIfImmutable();const L=this._children.shift();return this.handleChildrenChanged(),L}toMutable(){return this}}class S extends z{toMutable(){return new z(this.length,this.listHeight,[...this.children],this.missingOpeningBracketIds)}throwIfImmutable(){throw new Error("this instance is immutable")}}const _=[];class y extends ${get listHeight(){return 0}get childrenLength(){return 0}getChild(L){return null}get children(){return _}deepClone(){return this}}class C extends y{get kind(){return 0}get missingOpeningBracketIds(){return te.gV.getEmpty()}canBeReused(L){return!0}computeMinIndentation(L,k){const j=(0,h.l4)(L),N=(j.columnCount===0?j.lineCount:j.lineCount+1)+1,B=(0,h.eu)((0,h.QB)(L,this.length))+1;let T=Number.MAX_SAFE_INTEGER;for(let H=N;H<=B;H++){const Y=k.getLineFirstNonWhitespaceColumn(H),ee=k.getLineContent(H);if(Y===0)continue;const ce=I.A.visibleColumnFromColumn(ee,Y,k.getOptions().tabSize);T=Math.min(T,ce)}return T}}class d extends y{constructor(L,k,j){super(L),this.bracketInfo=k,this.bracketIds=j}static create(L,k,j){return new d(L,k,j)}get kind(){return 1}get missingOpeningBracketIds(){return te.gV.getEmpty()}get text(){return this.bracketInfo.bracketText}get languageId(){return this.bracketInfo.languageId}canBeReused(L){return!1}computeMinIndentation(L,k){return Number.MAX_SAFE_INTEGER}}class w extends y{constructor(L,k){super(k),this.missingOpeningBracketIds=L}get kind(){return 3}canBeReused(L){return!L.intersects(this.missingOpeningBracketIds)}computeMinIndentation(L,k){return Number.MAX_SAFE_INTEGER}}},22994:(Tt,Fe,f)=>{f.d(Fe,{W:()=>te,c:()=>h});var I=f(34883);class h{constructor(ie,Q,J){this.startOffset=ie,this.endOffset=Q,this.newLength=J}}class te{constructor(ie,Q){this.documentLength=Q,this.nextEditIdx=0,this.deltaOldToNewLineCount=0,this.deltaOldToNewColumnCount=0,this.deltaLineIdxInOld=-1,this.edits=ie.map(J=>$.from(J))}getOffsetBeforeChange(ie){return this.adjustNextEdit(ie),this.translateCurToOld(ie)}getDistanceToNextChange(ie){this.adjustNextEdit(ie);const Q=this.edits[this.nextEditIdx],J=Q?this.translateOldToCur(Q.offsetObj):this.documentLength;return(0,I.MS)(ie,J)}translateOldToCur(ie){return ie.lineCount===this.deltaLineIdxInOld?(0,I.qe)(ie.lineCount+this.deltaOldToNewLineCount,ie.columnCount+this.deltaOldToNewColumnCount):(0,I.qe)(ie.lineCount+this.deltaOldToNewLineCount,ie.columnCount)}translateCurToOld(ie){const Q=(0,I.l4)(ie);return Q.lineCount-this.deltaOldToNewLineCount===this.deltaLineIdxInOld?(0,I.qe)(Q.lineCount-this.deltaOldToNewLineCount,Q.columnCount-this.deltaOldToNewColumnCount):(0,I.qe)(Q.lineCount-this.deltaOldToNewLineCount,Q.columnCount)}adjustNextEdit(ie){for(;this.nextEditIdx<this.edits.length;){const Q=this.edits[this.nextEditIdx],J=this.translateOldToCur(Q.endOffsetAfterObj);if((0,I.vr)(J,ie)){this.nextEditIdx++;const z=(0,I.l4)(J),S=(0,I.l4)(this.translateOldToCur(Q.endOffsetBeforeObj)),_=z.lineCount-S.lineCount;this.deltaOldToNewLineCount+=_;const y=this.deltaLineIdxInOld===Q.endOffsetBeforeObj.lineCount?this.deltaOldToNewColumnCount:0,C=z.columnCount-S.columnCount;this.deltaOldToNewColumnCount=y+C,this.deltaLineIdxInOld=Q.endOffsetBeforeObj.lineCount}else break}}}class ${constructor(ie,Q,J){this.endOffsetBeforeObj=(0,I.l4)(Q),this.endOffsetAfterObj=(0,I.l4)((0,I.QB)(ie,J)),this.offsetObj=(0,I.l4)(ie)}static from(ie){return new $(ie.startOffset,ie.endOffset,ie.newLength)}}},85702:(Tt,Fe,f)=>{f.d(Fe,{Z:()=>J});var I=f(16844),h=f(64651),te=f(34883),$=f(60756),x=f(33206);class ie{constructor(S){this.map=S,this.hasRegExp=!1,this._regExpGlobal=null}static createFromLanguage(S,_){function y(d){return _.getKey(`${d.languageId}:::${d.bracketText}`)}const C=new Map;for(const d of S.bracketsNew.openingBrackets){const w=(0,te.qe)(0,d.bracketText.length),D=y(d),L=$.gV.getEmpty().add(D,$.FD);C.set(d.bracketText,new x.ou(w,1,D,L,h.rh.create(w,d,L)))}for(const d of S.bracketsNew.closingBrackets){const w=(0,te.qe)(0,d.bracketText.length);let D=$.gV.getEmpty();const L=d.getClosedBrackets();for(const k of L)D=D.add(y(k),$.FD);C.set(d.bracketText,new x.ou(w,2,y(L[0]),D,h.rh.create(w,d,D)))}return new ie(C)}getRegExpStr(){if(this.isEmpty)return null;{const S=[...this.map.keys()];return S.sort(),S.reverse(),S.map(_=>Q(_)).join("|")}}get regExpGlobal(){if(!this.hasRegExp){const S=this.getRegExpStr();this._regExpGlobal=S?new RegExp(S,"gi"):null,this.hasRegExp=!0}return this._regExpGlobal}getToken(S){return this.map.get(S.toLowerCase())}findClosingTokenText(S){for(const[_,y]of this.map)if(y.kind===2&&y.bracketIds.intersects(S))return _}get isEmpty(){return this.map.size===0}}function Q(z){let S=(0,I.bm)(z);return/^[\w ]+/.test(z)&&(S=`\\b${S}`),/[\w ]+$/.test(z)&&(S=`${S}\\b`),S}class J{constructor(S,_){this.denseKeyProvider=S,this.getLanguageConfiguration=_,this.languageIdToBracketTokens=new Map}didLanguageChange(S){return this.languageIdToBracketTokens.has(S)}getSingleLanguageBracketTokens(S){let _=this.languageIdToBracketTokens.get(S);return _||(_=ie.createFromLanguage(this.getLanguageConfiguration(S),this.denseKeyProvider),this.languageIdToBracketTokens.set(S,_)),_}}},34883:(Tt,Fe,f)=>{f.d(Fe,{C7:()=>$,MS:()=>C,QB:()=>y,Qx:()=>k,VL:()=>L,Vh:()=>ie,Vp:()=>x,eu:()=>S,l4:()=>z,o0:()=>D,qe:()=>J,rR:()=>j,sS:()=>_,vr:()=>w,zG:()=>d});var I=f(16844),h=f(28061);class te{constructor(B,T){this.lineCount=B,this.columnCount=T}toString(){return`${this.lineCount},${this.columnCount}`}}te.zero=new te(0,0);function $(N,B,T,H){return N!==T?J(T-N,H):J(0,H-B)}const x=0;function ie(N){return N===0}const Q=Math.pow(2,26);function J(N,B){return N*Q+B}function z(N){const B=N,T=Math.floor(B/Q),H=B-T*Q;return new te(T,H)}function S(N){return Math.floor(N/Q)}function _(N){return N}function y(N,B){return B<Q?N+B:N-N%Q+B}function C(N,B){const T=N,H=B;if(H-T<=0)return x;const ee=Math.floor(T/Q),ce=Math.floor(H/Q),pe=H-ce*Q;if(ee===ce){const ge=T-ee*Q;return J(0,pe-ge)}else return J(ce-ee,pe)}function d(N,B){return N<B}function w(N,B){return N<=B}function D(N,B){return N>=B}function L(N){return J(N.lineNumber-1,N.column-1)}function k(N,B){const T=N,H=Math.floor(T/Q),Y=T-H*Q,ee=B,ce=Math.floor(ee/Q),pe=ee-ce*Q;return new h.Q(H+1,Y+1,ce+1,pe+1)}function j(N){const B=(0,I.uz)(N);return J(B.length-1,B[B.length-1].length)}},68302:(Tt,Fe,f)=>{f.d(Fe,{T:()=>d});var I=f(64651),h=f(22994),te=f(60756),$=f(34883);function x(D){if(D.length===0)return null;if(D.length===1)return D[0];let L=0;function k(){if(L>=D.length)return null;const T=L,H=D[T].listHeight;for(L++;L<D.length&&D[L].listHeight===H;)L++;return L-T>=2?ie(T===0&&L===D.length?D:D.slice(T,L),!1):D[T]}let j=k(),N=k();if(!N)return j;for(let T=k();T;T=k())Q(j,N)<=Q(N,T)?(j=J(j,N),N=T):N=J(N,T);return J(j,N)}function ie(D,L=!1){if(D.length===0)return null;if(D.length===1)return D[0];let k=D.length;for(;k>3;){const j=k>>1;for(let N=0;N<j;N++){const B=N<<1;D[N]=I.Xw.create23(D[B],D[B+1],B+3===k?D[B+2]:null,L)}k=j}return I.Xw.create23(D[0],D[1],k>=3?D[2]:null,L)}function Q(D,L){return Math.abs(D.listHeight-L.listHeight)}function J(D,L){return D.listHeight===L.listHeight?I.Xw.create23(D,L,null,!1):D.listHeight>L.listHeight?z(D,L):S(L,D)}function z(D,L){D=D.toMutable();let k=D;const j=new Array;let N;for(;;){if(L.listHeight===k.listHeight){N=L;break}if(k.kind!==4)throw new Error("unexpected");j.push(k),k=k.makeLastElementMutable()}for(let B=j.length-1;B>=0;B--){const T=j[B];N?T.childrenLength>=3?N=I.Xw.create23(T.unappendChild(),N,null,!1):(T.appendChildOfSameHeight(N),N=void 0):T.handleChildrenChanged()}return N?I.Xw.create23(D,N,null,!1):D}function S(D,L){D=D.toMutable();let k=D;const j=new Array;for(;L.listHeight!==k.listHeight;){if(k.kind!==4)throw new Error("unexpected");j.push(k),k=k.makeFirstElementMutable()}let N=L;for(let B=j.length-1;B>=0;B--){const T=j[B];N?T.childrenLength>=3?N=I.Xw.create23(N,T.unprependChild(),null,!1):(T.prependChildOfSameHeight(N),N=void 0):T.handleChildrenChanged()}return N?I.Xw.create23(N,D,null,!1):D}class _{constructor(L){this.lastOffset=$.Vp,this.nextNodes=[L],this.offsets=[$.Vp],this.idxs=[]}readLongestNodeAt(L,k){if((0,$.zG)(L,this.lastOffset))throw new Error("Invalid offset");for(this.lastOffset=L;;){const j=C(this.nextNodes);if(!j)return;const N=C(this.offsets);if((0,$.zG)(L,N))return;if((0,$.zG)(N,L))if((0,$.QB)(N,j.length)<=L)this.nextNodeAfterCurrent();else{const B=y(j);B!==-1?(this.nextNodes.push(j.getChild(B)),this.offsets.push(N),this.idxs.push(B)):this.nextNodeAfterCurrent()}else{if(k(j))return this.nextNodeAfterCurrent(),j;{const B=y(j);if(B===-1){this.nextNodeAfterCurrent();return}else this.nextNodes.push(j.getChild(B)),this.offsets.push(N),this.idxs.push(B)}}}}nextNodeAfterCurrent(){for(;;){const L=C(this.offsets),k=C(this.nextNodes);if(this.nextNodes.pop(),this.offsets.pop(),this.idxs.length===0)break;const j=C(this.nextNodes),N=y(j,this.idxs[this.idxs.length-1]);if(N!==-1){this.nextNodes.push(j.getChild(N)),this.offsets.push((0,$.QB)(L,k.length)),this.idxs[this.idxs.length-1]=N;break}else this.idxs.pop()}}}function y(D,L=-1){for(;;){if(L++,L>=D.childrenLength)return-1;if(D.getChild(L))return L}}function C(D){return D.length>0?D[D.length-1]:void 0}function d(D,L,k,j){return new w(D,L,k,j).parseDocument()}class w{constructor(L,k,j,N){if(this.tokenizer=L,this.createImmutableLists=N,this._itemsConstructed=0,this._itemsFromCache=0,j&&N)throw new Error("Not supported");this.oldNodeReader=j?new _(j):void 0,this.positionMapper=new h.W(k,L.length)}parseDocument(){this._itemsConstructed=0,this._itemsFromCache=0;let L=this.parseList(te.gV.getEmpty());return L||(L=I.Xw.getEmpty()),L}parseList(L){const k=new Array;for(;;){const N=this.tokenizer.peek();if(!N||N.kind===2&&N.bracketIds.intersects(L))break;const B=this.parseChild(L);B.kind===4&&B.childrenLength===0||k.push(B)}return this.oldNodeReader?x(k):ie(k,this.createImmutableLists)}parseChild(L){if(this.oldNodeReader){const j=this.positionMapper.getDistanceToNextChange(this.tokenizer.offset);if(!(0,$.Vh)(j)){const N=this.oldNodeReader.readLongestNodeAt(this.positionMapper.getOffsetBeforeChange(this.tokenizer.offset),B=>(0,$.zG)(B.length,j)?B.canBeReused(L):!1);if(N)return this._itemsFromCache++,this.tokenizer.skip(N.length),N}}this._itemsConstructed++;const k=this.tokenizer.read();switch(k.kind){case 2:return new I.Gc(k.bracketIds,k.length);case 0:return k.astNode;case 1:{const j=L.merge(k.bracketIds),N=this.parseList(j),B=this.tokenizer.peek();return B&&B.kind===2&&(B.bracketId===k.bracketId||B.bracketIds.intersects(k.bracketIds))?(this.tokenizer.read(),I.Nn.create(k.astNode,N,B.astNode)):I.Nn.create(k.astNode,N,null)}default:throw new Error("unexpected")}}}},60756:(Tt,Fe,f)=>{f.d(Fe,{FD:()=>te,Mg:()=>$,gV:()=>h});const I=new Array;class h{constructor(ie,Q){this.items=ie,this.additionalItems=Q}static create(ie,Q){if(ie<=128&&Q.length===0){let J=h.cache[ie];return J||(J=new h(ie,Q),h.cache[ie]=J),J}return new h(ie,Q)}static getEmpty(){return this.empty}add(ie,Q){const J=Q.getKey(ie);let z=J>>5;if(z===0){const _=1<<J|this.items;return _===this.items?this:h.create(_,this.additionalItems)}z--;const S=this.additionalItems.slice(0);for(;S.length<z;)S.push(0);return S[z]|=1<<(J&31),h.create(this.items,S)}merge(ie){const Q=this.items|ie.items;if(this.additionalItems===I&&ie.additionalItems===I)return Q===this.items?this:Q===ie.items?ie:h.create(Q,I);const J=new Array;for(let z=0;z<Math.max(this.additionalItems.length,ie.additionalItems.length);z++){const S=this.additionalItems[z]||0,_=ie.additionalItems[z]||0;J.push(S|_)}return h.create(Q,J)}intersects(ie){if(this.items&ie.items)return!0;for(let Q=0;Q<Math.min(this.additionalItems.length,ie.additionalItems.length);Q++)if(this.additionalItems[Q]&ie.additionalItems[Q])return!0;return!1}}h.cache=new Array(129),h.empty=h.create(0,I);const te={getKey(x){return x}};class ${constructor(){this.items=new Map}getKey(ie){let Q=this.items.get(ie);return Q===void 0&&(Q=this.items.size,this.items.set(ie,Q)),Q}}},33206:(Tt,Fe,f)=>{f.d(Fe,{_:()=>z,ou:()=>ie,tk:()=>Q});var I=f(94327),h=f(15910),te=f(64651),$=f(34883),x=f(60756);class ie{constructor(_,y,C,d,w){this.length=_,this.kind=y,this.bracketId=C,this.bracketIds=d,this.astNode=w}}class Q{constructor(_,y){this.textModel=_,this.bracketTokens=y,this.reader=new J(this.textModel,this.bracketTokens),this._offset=$.Vp,this.didPeek=!1,this.peeked=null,this.textBufferLineCount=_.getLineCount(),this.textBufferLastLineLength=_.getLineLength(this.textBufferLineCount)}get offset(){return this._offset}get length(){return(0,$.qe)(this.textBufferLineCount,this.textBufferLastLineLength)}skip(_){this.didPeek=!1,this._offset=(0,$.QB)(this._offset,_);const y=(0,$.l4)(this._offset);this.reader.setPosition(y.lineCount,y.columnCount)}read(){let _;return this.peeked?(this.didPeek=!1,_=this.peeked):_=this.reader.read(),_&&(this._offset=(0,$.QB)(this._offset,_.length)),_}peek(){return this.didPeek||(this.peeked=this.reader.read(),this.didPeek=!0),this.peeked}}class J{constructor(_,y){this.textModel=_,this.bracketTokens=y,this.lineIdx=0,this.line=null,this.lineCharOffset=0,this.lineTokens=null,this.lineTokenOffset=0,this.peekedToken=null,this.textBufferLineCount=_.getLineCount(),this.textBufferLastLineLength=_.getLineLength(this.textBufferLineCount)}setPosition(_,y){_===this.lineIdx?(this.lineCharOffset=y,this.lineTokenOffset=this.lineCharOffset===0?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset)):(this.lineIdx=_,this.lineCharOffset=y,this.line=null),this.peekedToken=null}read(){if(this.peekedToken){const w=this.peekedToken;return this.peekedToken=null,this.lineCharOffset+=(0,$.sS)(w.length),w}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 _=this.lineIdx,y=this.lineCharOffset;let C=0;for(;;){const w=this.lineTokens,D=w.getCount();let L=null;if(this.lineTokenOffset<D){const k=w.getMetadata(this.lineTokenOffset);for(;this.lineTokenOffset+1<D&&k===w.getMetadata(this.lineTokenOffset+1);)this.lineTokenOffset++;const j=h.x.getTokenType(k)===0,N=h.x.containsBalancedBrackets(k),B=w.getEndOffset(this.lineTokenOffset);if(N&&j&&this.lineCharOffset<B){const T=w.getLanguageId(this.lineTokenOffset),H=this.line.substring(this.lineCharOffset,B),Y=this.bracketTokens.getSingleLanguageBracketTokens(T),ee=Y.regExpGlobal;if(ee){ee.lastIndex=0;const ce=ee.exec(H);ce&&(L=Y.getToken(ce[0]),L&&(this.lineCharOffset+=ce.index))}}if(C+=B-this.lineCharOffset,L)if(_!==this.lineIdx||y!==this.lineCharOffset){this.peekedToken=L;break}else return this.lineCharOffset+=(0,$.sS)(L.length),L;else this.lineTokenOffset++,this.lineCharOffset=B}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,C+=33,C>1e3))break;if(C>1500)break}const d=(0,$.C7)(_,y,this.lineIdx,this.lineCharOffset);return new ie(d,0,-1,x.gV.getEmpty(),new te.yF(d))}}class z{constructor(_,y){this.text=_,this._offset=$.Vp,this.idx=0;const C=y.getRegExpStr(),d=C?new RegExp(C+`| `,"gi"):null,w=[];let D,L=0,k=0,j=0,N=0;const B=new Array;for(let Y=0;Y<60;Y++)B.push(new ie((0,$.qe)(0,Y),0,-1,x.gV.getEmpty(),new te.yF((0,$.qe)(0,Y))));const T=new Array;for(let Y=0;Y<60;Y++)T.push(new ie((0,$.qe)(1,Y),0,-1,x.gV.getEmpty(),new te.yF((0,$.qe)(1,Y))));if(d)for(d.lastIndex=0;(D=d.exec(_))!==null;){const Y=D.index,ee=D[0];if(ee===` `)L++,k=Y+1;else{if(j!==Y){let ce;if(N===L){const pe=Y-j;if(pe<B.length)ce=B[pe];else{const ge=(0,$.qe)(0,pe);ce=new ie(ge,0,-1,x.gV.getEmpty(),new te.yF(ge))}}else{const pe=L-N,ge=Y-k;if(pe===1&&ge<T.length)ce=T[ge];else{const fe=(0,$.qe)(pe,ge);ce=new ie(fe,0,-1,x.gV.getEmpty(),new te.yF(fe))}}w.push(ce)}w.push(y.getToken(ee)),j=Y+ee.length,N=L}}const H=_.length;if(j!==H){const Y=N===L?(0,$.qe)(0,H-j):(0,$.qe)(L-N,H-k);w.push(new ie(Y,0,-1,x.gV.getEmpty(),new te.yF(Y)))}this.length=(0,$.qe)(L,H-k),this.tokens=w}get offset(){return this._offset}read(){return this.tokens[this.idx++]||null}peek(){return this.tokens[this.idx]||null}skip(_){throw new I.EM}}},54296:(Tt,Fe,f)=>{f.d(Fe,{Th:()=>C,z8:()=>d});var I=f(3765),h=f(94327),te=f(93702),$=f(37264),x=f(6949),ie=f(42802),Q=f(22467);function J(w){return w.toString()}class z{constructor(D,L,k,j,N,B,T){this.beforeVersionId=D,this.afterVersionId=L,this.beforeEOL=k,this.afterEOL=j,this.beforeCursorState=N,this.afterCursorState=B,this.changes=T}static create(D,L){const k=D.getAlternativeVersionId(),j=y(D);return new z(k,k,j,j,L,L,[])}append(D,L,k,j,N){L.length>0&&(this.changes=(0,x.x)(this.changes,L)),this.afterEOL=k,this.afterVersionId=j,this.afterCursorState=N}static _writeSelectionsSize(D){return 4+4*4*(D?D.length:0)}static _writeSelections(D,L,k){if(ie.Sw(D,L?L.length:0,k),k+=4,L)for(const j of L)ie.Sw(D,j.selectionStartLineNumber,k),k+=4,ie.Sw(D,j.selectionStartColumn,k),k+=4,ie.Sw(D,j.positionLineNumber,k),k+=4,ie.Sw(D,j.positionColumn,k),k+=4;return k}static _readSelections(D,L,k){const j=ie.bb(D,L);L+=4;for(let N=0;N<j;N++){const B=ie.bb(D,L);L+=4;const T=ie.bb(D,L);L+=4;const H=ie.bb(D,L);L+=4;const Y=ie.bb(D,L);L+=4,k.push(new te.L(B,T,H,Y))}return L}serialize(){let D=10+z._writeSelectionsSize(this.beforeCursorState)+z._writeSelectionsSize(this.afterCursorState)+4;for(const j of this.changes)D+=j.writeSize();const L=new Uint8Array(D);let k=0;ie.Sw(L,this.beforeVersionId,k),k+=4,ie.Sw(L,this.afterVersionId,k),k+=4,ie.Gs(L,this.beforeEOL,k),k+=1,ie.Gs(L,this.afterEOL,k),k+=1,k=z._writeSelections(L,this.beforeCursorState,k),k=z._writeSelections(L,this.afterCursorState,k),ie.Sw(L,this.changes.length,k),k+=4;for(const j of this.changes)k=j.write(L,k);return L.buffer}static deserialize(D){const L=new Uint8Array(D);let k=0;const j=ie.bb(L,k);k+=4;const N=ie.bb(L,k);k+=4;const B=ie.pJ(L,k);k+=1;const T=ie.pJ(L,k);k+=1;const H=[];k=z._readSelections(L,k,H);const Y=[];k=z._readSelections(L,k,Y);const ee=ie.bb(L,k);k+=4;const ce=[];for(let pe=0;pe<ee;pe++)k=x.k.read(L,k,ce);return new z(j,N,B,T,H,Y,ce)}}class S{constructor(D,L,k,j){this.label=D,this.code=L,this.model=k,this._data=z.create(k,j)}get type(){return 0}get resource(){return $.r.isUri(this.model)?this.model:this.model.uri}toString(){return(this._data instanceof z?this._data:z.deserialize(this._data)).changes.map(L=>L.toString()).join(", ")}matchesResource(D){return($.r.isUri(this.model)?this.model:this.model.uri).toString()===D.toString()}setModel(D){this.model=D}canAppend(D){return this.model===D&&this._data instanceof z}append(D,L,k,j,N){this._data instanceof z&&this._data.append(D,L,k,j,N)}close(){this._data instanceof z&&(this._data=this._data.serialize())}open(){this._data instanceof z||(this._data=z.deserialize(this._data))}undo(){if($.r.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof z&&(this._data=this._data.serialize());const D=z.deserialize(this._data);this.model._applyUndo(D.changes,D.beforeEOL,D.beforeVersionId,D.beforeCursorState)}redo(){if($.r.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof z&&(this._data=this._data.serialize());const D=z.deserialize(this._data);this.model._applyRedo(D.changes,D.afterEOL,D.afterVersionId,D.afterCursorState)}heapSize(){return this._data instanceof z&&(this._data=this._data.serialize()),this._data.byteLength+168}}class _{constructor(D,L,k){this.label=D,this.code=L,this.type=1,this._isOpen=!0,this._editStackElementsArr=k.slice(0),this._editStackElementsMap=new Map;for(const j of this._editStackElementsArr){const N=J(j.resource);this._editStackElementsMap.set(N,j)}this._delegate=null}get resources(){return this._editStackElementsArr.map(D=>D.resource)}prepareUndoRedo(){if(this._delegate)return this._delegate.prepareUndoRedo(this)}matchesResource(D){const L=J(D);return this._editStackElementsMap.has(L)}setModel(D){const L=J($.r.isUri(D)?D:D.uri);this._editStackElementsMap.has(L)&&this._editStackElementsMap.get(L).setModel(D)}canAppend(D){if(!this._isOpen)return!1;const L=J(D.uri);return this._editStackElementsMap.has(L)?this._editStackElementsMap.get(L).canAppend(D):!1}append(D,L,k,j,N){const B=J(D.uri);this._editStackElementsMap.get(B).append(D,L,k,j,N)}close(){this._isOpen=!1}open(){}undo(){this._isOpen=!1;for(const D of this._editStackElementsArr)D.undo()}redo(){for(const D of this._editStackElementsArr)D.redo()}heapSize(D){const L=J(D);return this._editStackElementsMap.has(L)?this._editStackElementsMap.get(L).heapSize():0}split(){return this._editStackElementsArr}toString(){const D=[];for(const L of this._editStackElementsArr)D.push(`${(0,Q.P8)(L.resource)}: ${L}`);return`{${D.join(", ")}}`}}function y(w){return w.getEOL()===` `?0:1}function C(w){return w?w instanceof S||w instanceof _:!1}class d{constructor(D,L){this._model=D,this._undoRedoService=L}pushStackElement(){const D=this._undoRedoService.getLastElement(this._model.uri);C(D)&&D.close()}popStackElement(){const D=this._undoRedoService.getLastElement(this._model.uri);C(D)&&D.open()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(D){const L=this._undoRedoService.getLastElement(this._model.uri);if(C(L)&&L.canAppend(this._model))return L;const k=new S(I.kg("edit","Typing"),"undoredo.textBufferEdit",this._model,D);return this._undoRedoService.pushElement(k),k}pushEOL(D){const L=this._getOrCreateEditStackElement(null);this._model.setEOL(D),L.append(this._model,[],y(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(D,L,k){const j=this._getOrCreateEditStackElement(D),N=this._model.applyEdits(L,!0),B=d._computeCursorState(k,N),T=N.map((H,Y)=>({index:Y,textChange:H.textChange}));return T.sort((H,Y)=>H.textChange.oldPosition===Y.textChange.oldPosition?H.index-Y.index:H.textChange.oldPosition-Y.textChange.oldPosition),j.append(this._model,T.map(H=>H.textChange),y(this._model),this._model.getAlternativeVersionId(),B),B}static _computeCursorState(D,L){try{return D?D(L):null}catch(k){return(0,h.dz)(k),null}}}},52818:(Tt,Fe,f)=>{f.d(Fe,{P:()=>J,k:()=>z});var I=f(13338),h=f(16844),te=f(62549),$=f(28061),x=f(32177),ie=f(50969),Q=f(60779);class J extends x._{constructor(_,y){super(),this.textModel=_,this.languageConfigurationService=y}getLanguageConfiguration(_){return this.languageConfigurationService.getLanguageConfiguration(_)}_computeIndentLevel(_){return(0,ie.G)(this.textModel.getLineContent(_+1),this.textModel.getOptions().tabSize)}getActiveIndentGuide(_,y,C){this.assertNotDisposed();const d=this.textModel.getLineCount();if(_<1||_>d)throw new Error("Illegal value for lineNumber");const w=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,D=!!(w&&w.offSide);let L=-2,k=-1,j=-2,N=-1;const B=se=>{if(L!==-1&&(L===-2||L>se-1)){L=-1,k=-1;for(let X=se-2;X>=0;X--){const K=this._computeIndentLevel(X);if(K>=0){L=X,k=K;break}}}if(j===-2){j=-1,N=-1;for(let X=se;X<d;X++){const K=this._computeIndentLevel(X);if(K>=0){j=X,N=K;break}}}};let T=-2,H=-1,Y=-2,ee=-1;const ce=se=>{if(T===-2){T=-1,H=-1;for(let X=se-2;X>=0;X--){const K=this._computeIndentLevel(X);if(K>=0){T=X,H=K;break}}}if(Y!==-1&&(Y===-2||Y<se-1)){Y=-1,ee=-1;for(let X=se;X<d;X++){const K=this._computeIndentLevel(X);if(K>=0){Y=X,ee=K;break}}}};let pe=0,ge=!0,fe=0,oe=!0,Z=0,le=0;for(let se=0;ge||oe;se++){const X=_-se,K=_+se;se>1&&(X<1||X<y)&&(ge=!1),se>1&&(K>d||K>C)&&(oe=!1),se>5e4&&(ge=!1,oe=!1);let he=-1;if(ge&&X>=1){const Ee=this._computeIndentLevel(X-1);Ee>=0?(j=X-1,N=Ee,he=Math.ceil(Ee/this.textModel.getOptions().indentSize)):(B(X),he=this._getIndentLevelForWhitespaceLine(D,k,N))}let ve=-1;if(oe&&K<=d){const Ee=this._computeIndentLevel(K-1);Ee>=0?(T=K-1,H=Ee,ve=Math.ceil(Ee/this.textModel.getOptions().indentSize)):(ce(K),ve=this._getIndentLevelForWhitespaceLine(D,H,ee))}if(se===0){le=he;continue}if(se===1){if(K<=d&&ve>=0&&le+1===ve){ge=!1,pe=K,fe=K,Z=ve;continue}if(X>=1&&he>=0&&he-1===le){oe=!1,pe=X,fe=X,Z=he;continue}if(pe=_,fe=_,Z=le,Z===0)return{startLineNumber:pe,endLineNumber:fe,indent:Z}}ge&&(he>=Z?pe=X:ge=!1),oe&&(ve>=Z?fe=K:oe=!1)}return{startLineNumber:pe,endLineNumber:fe,indent:Z}}getLinesBracketGuides(_,y,C,d){var w;const D=[];for(let T=_;T<=y;T++)D.push([]);const L=!0,k=this.textModel.bracketPairs.getBracketPairsInRangeWithMinIndentation(new $.Q(_,1,y,this.textModel.getLineMaxColumn(y)));let j;if(C&&k.length>0){const T=(_<=C.lineNumber&&C.lineNumber<=y?k:this.textModel.bracketPairs.getBracketPairsInRange($.Q.fromPositions(C))).filter(H=>$.Q.strictContainsPosition(H.range,C));j=(w=(0,I.Uk)(T,H=>L||H.range.startLineNumber!==H.range.endLineNumber))===null||w===void 0?void 0:w.range}const N=this.textModel.getOptions().bracketPairColorizationOptions.independentColorPoolPerBracketType,B=new z;for(const T of k){if(!T.closingBracketRange)continue;const H=j&&T.range.equalsRange(j);if(!H&&!d.includeInactive)continue;const Y=B.getInlineClassName(T.nestingLevel,T.nestingLevelOfEqualBracketType,N)+(d.highlightActive&&H?" "+B.activeClassName:""),ee=T.openingBracketRange.getStartPosition(),ce=T.closingBracketRange.getStartPosition(),pe=d.horizontalGuides===Q.N6.Enabled||d.horizontalGuides===Q.N6.EnabledForActive&&H;if(T.range.startLineNumber===T.range.endLineNumber){L&&pe&&D[T.range.startLineNumber-_].push(new Q.TH(-1,T.openingBracketRange.getEndPosition().column,Y,new Q.pv(!1,ce.column),-1,-1));continue}const ge=this.getVisibleColumnFromPosition(ce),fe=this.getVisibleColumnFromPosition(T.openingBracketRange.getStartPosition()),oe=Math.min(fe,ge,T.minVisibleColumnIndentation+1);let Z=!1;h.HG(this.textModel.getLineContent(T.closingBracketRange.startLineNumber))<T.closingBracketRange.startColumn-1&&(Z=!0);const X=Math.max(ee.lineNumber,_),K=Math.min(ce.lineNumber,y),he=Z?1:0;for(let ve=X;ve<K+he;ve++)D[ve-_].push(new Q.TH(oe,-1,Y,null,ve===ee.lineNumber?ee.column:-1,ve===ce.lineNumber?ce.column:-1));pe&&(ee.lineNumber>=_&&fe>oe&&D[ee.lineNumber-_].push(new Q.TH(oe,-1,Y,new Q.pv(!1,ee.column),-1,-1)),ce.lineNumber<=y&&ge>oe&&D[ce.lineNumber-_].push(new Q.TH(oe,-1,Y,new Q.pv(!Z,ce.column),-1,-1)))}for(const T of D)T.sort((H,Y)=>H.visibleColumn-Y.visibleColumn);return D}getVisibleColumnFromPosition(_){return te.A.visibleColumnFromColumn(this.textModel.getLineContent(_.lineNumber),_.column,this.textModel.getOptions().tabSize)+1}getLinesIndentGuides(_,y){this.assertNotDisposed();const C=this.textModel.getLineCount();if(_<1||_>C)throw new Error("Illegal value for startLineNumber");if(y<1||y>C)throw new Error("Illegal value for endLineNumber");const d=this.textModel.getOptions(),w=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,D=!!(w&&w.offSide),L=new Array(y-_+1);let k=-2,j=-1,N=-2,B=-1;for(let T=_;T<=y;T++){const H=T-_,Y=this._computeIndentLevel(T-1);if(Y>=0){k=T-1,j=Y,L[H]=Math.ceil(Y/d.indentSize);continue}if(k===-2){k=-1,j=-1;for(let ee=T-2;ee>=0;ee--){const ce=this._computeIndentLevel(ee);if(ce>=0){k=ee,j=ce;break}}}if(N!==-1&&(N===-2||N<T-1)){N=-1,B=-1;for(let ee=T;ee<C;ee++){const ce=this._computeIndentLevel(ee);if(ce>=0){N=ee,B=ce;break}}}L[H]=this._getIndentLevelForWhitespaceLine(D,j,B)}return L}_getIndentLevelForWhitespaceLine(_,y,C){const d=this.textModel.getOptions();return y===-1||C===-1?0:y<C?1+Math.floor(y/d.indentSize):y===C||_?Math.ceil(C/d.indentSize):1+Math.floor(C/d.indentSize)}}class z{constructor(){this.activeClassName="indent-active"}getInlineClassName(_,y,C){return this.getInlineClassNameOfLevel(C?y:_)}getInlineClassNameOfLevel(_){return`bracket-indent-guide lvl-${_%30}`}}},56158:(Tt,Fe,f)=>{f.d(Fe,{N:()=>te,c2:()=>$});var I=f(13338),h=f(37512);class te{constructor(Q){this.values=Q,this.prefixSum=new Uint32Array(Q.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(Q,J){Q=(0,h.j)(Q);const z=this.values,S=this.prefixSum,_=J.length;return _===0?!1:(this.values=new Uint32Array(z.length+_),this.values.set(z.subarray(0,Q),0),this.values.set(z.subarray(Q),Q+_),this.values.set(J,Q),Q-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=Q-1),this.prefixSum=new Uint32Array(this.values.length),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(S.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(Q,J){return Q=(0,h.j)(Q),J=(0,h.j)(J),this.values[Q]===J?!1:(this.values[Q]=J,Q-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=Q-1),!0)}removeValues(Q,J){Q=(0,h.j)(Q),J=(0,h.j)(J);const z=this.values,S=this.prefixSum;if(Q>=z.length)return!1;const _=z.length-Q;return J>=_&&(J=_),J===0?!1:(this.values=new Uint32Array(z.length-J),this.values.set(z.subarray(0,Q),0),this.values.set(z.subarray(Q+J),Q),this.prefixSum=new Uint32Array(this.values.length),Q-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=Q-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(Q){return Q<0?0:(Q=(0,h.j)(Q),this._getPrefixSum(Q))}_getPrefixSum(Q){if(Q<=this.prefixSumValidIndex[0])return this.prefixSum[Q];let J=this.prefixSumValidIndex[0]+1;J===0&&(this.prefixSum[0]=this.values[0],J++),Q>=this.values.length&&(Q=this.values.length-1);for(let z=J;z<=Q;z++)this.prefixSum[z]=this.prefixSum[z-1]+this.values[z];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],Q),this.prefixSum[Q]}getIndexOf(Q){Q=Math.floor(Q),this.getTotalSum();let J=0,z=this.values.length-1,S=0,_=0,y=0;for(;J<=z;)if(S=J+(z-J)/2|0,_=this.prefixSum[S],y=_-this.values[S],Q<y)z=S-1;else if(Q>=_)J=S+1;else break;return new x(S,Q-y)}}class ${constructor(Q){this._values=Q,this._isValid=!1,this._validEndIndex=-1,this._prefixSum=[],this._indexBySum=[]}getTotalSum(){return this._ensureValid(),this._indexBySum.length}getPrefixSum(Q){return this._ensureValid(),Q===0?0:this._prefixSum[Q-1]}getIndexOf(Q){this._ensureValid();const J=this._indexBySum[Q],z=J>0?this._prefixSum[J-1]:0;return new x(J,Q-z)}removeValues(Q,J){this._values.splice(Q,J),this._invalidate(Q)}insertValues(Q,J){this._values=(0,I.nK)(this._values,Q,J),this._invalidate(Q)}_invalidate(Q){this._isValid=!1,this._validEndIndex=Math.min(this._validEndIndex,Q-1)}_ensureValid(){if(!this._isValid){for(let Q=this._validEndIndex+1,J=this._values.length;Q<J;Q++){const z=this._values[Q],S=Q>0?this._prefixSum[Q-1]:0;this._prefixSum[Q]=S+z;for(let _=0;_<z;_++)this._indexBySum[S+_]=Q}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(Q,J){this._values[Q]!==J&&(this._values[Q]=J,this._invalidate(Q))}}class x{constructor(Q,J){this.index=Q,this.remainder=J,this._prefixSumIndexOfResultBrand=void 0,this.index=Q,this.remainder=J}}},59922:(Tt,Fe,f)=>{f.d(Fe,{Ho:()=>Kt,kI:()=>Ri,Bz:()=>ts});var I=f(13338),h=f(94901),te=f(94327),$=f(2106),x=f(10998),ie=f(16844),Q=f(37264),J=f(3902),z=f(57999),S=f(15365),_=f(28061),y=f(93702),C=f(12590),d=f(77922),w=f(52394),D=f(66055);class L{constructor(b,P,M,q){this.range=b,this.nestingLevel=P,this.nestingLevelOfEqualBracketType=M,this.isInvalid=q}}class k{constructor(b,P,M,q,p,F){this.range=b,this.openingBracketRange=P,this.closingBracketRange=M,this.nestingLevel=q,this.nestingLevelOfEqualBracketType=p,this.bracketPairNode=F}get openingBracketInfo(){return this.bracketPairNode.openingBracket.bracketInfo}}class j extends k{constructor(b,P,M,q,p,F,de){super(b,P,M,q,p,F),this.minVisibleColumnIndentation=de}}var N=f(22994),B=f(85702),T=f(34883),H=f(68302),Y=f(60756),ee=f(33206);class ce extends x.jG{constructor(b,P){if(super(),this.textModel=b,this.getLanguageConfiguration=P,this.didChangeEmitter=new $.vl,this.denseKeyProvider=new Y.Mg,this.brackets=new B.Z(this.denseKeyProvider,this.getLanguageConfiguration),this.onDidChange=this.didChangeEmitter.event,b.tokenization.backgroundTokenizationState===0){const M=this.brackets.getSingleLanguageBracketTokens(this.textModel.getLanguageId()),q=new ee._(this.textModel.getValue(),M);this.initialAstWithoutTokens=(0,H.T)(q,[],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens}else b.tokenization.backgroundTokenizationState===2?(this.initialAstWithoutTokens=void 0,this.astWithTokens=this.parseDocumentFromTextBuffer([],void 0,!1)):b.tokenization.backgroundTokenizationState===1&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer([],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens)}didLanguageChange(b){return this.brackets.didLanguageChange(b)}handleDidChangeBackgroundTokenizationState(){if(this.textModel.tokenization.backgroundTokenizationState===2){const b=this.initialAstWithoutTokens===void 0;this.initialAstWithoutTokens=void 0,b||this.didChangeEmitter.fire()}}handleDidChangeTokens({ranges:b}){const P=b.map(M=>new N.c((0,T.qe)(M.fromLineNumber-1,0),(0,T.qe)(M.toLineNumber,0),(0,T.qe)(M.toLineNumber-M.fromLineNumber+1,0)));this.astWithTokens=this.parseDocumentFromTextBuffer(P,this.astWithTokens,!1),this.initialAstWithoutTokens||this.didChangeEmitter.fire()}handleContentChanged(b){const P=b.changes.map(M=>{const q=_.Q.lift(M.range);return new N.c((0,T.VL)(q.getStartPosition()),(0,T.VL)(q.getEndPosition()),(0,T.rR)(M.text))}).reverse();this.astWithTokens=this.parseDocumentFromTextBuffer(P,this.astWithTokens,!1),this.initialAstWithoutTokens&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer(P,this.initialAstWithoutTokens,!1))}parseDocumentFromTextBuffer(b,P,M){const p=P,F=new ee.tk(this.textModel,this.brackets);return(0,H.T)(F,b,p,M)}getBracketsInRange(b){const P=(0,T.qe)(b.startLineNumber-1,b.startColumn-1),M=(0,T.qe)(b.endLineNumber-1,b.endColumn-1),q=new Array,p=this.initialAstWithoutTokens||this.astWithTokens;return fe(p,T.Vp,p.length,P,M,q,0,new Map),q}getBracketPairsInRange(b,P){const M=new Array,q=(0,T.VL)(b.getStartPosition()),p=(0,T.VL)(b.getEndPosition()),F=this.initialAstWithoutTokens||this.astWithTokens,de=new oe(M,P,this.textModel);return Z(F,T.Vp,F.length,q,p,de,0,new Map),M}getFirstBracketAfter(b){const P=this.initialAstWithoutTokens||this.astWithTokens;return ge(P,T.Vp,P.length,(0,T.VL)(b))}getFirstBracketBefore(b){const P=this.initialAstWithoutTokens||this.astWithTokens;return pe(P,T.Vp,P.length,(0,T.VL)(b))}}function pe(qe,b,P,M){if(qe.kind===4||qe.kind===2){const q=[];for(const p of qe.children)P=(0,T.QB)(b,p.length),q.push({nodeOffsetStart:b,nodeOffsetEnd:P}),b=P;for(let p=q.length-1;p>=0;p--){const{nodeOffsetStart:F,nodeOffsetEnd:de}=q[p];if((0,T.zG)(F,M)){const be=pe(qe.children[p],F,de,M);if(be)return be}}return null}else{if(qe.kind===3)return null;if(qe.kind===1){const q=(0,T.Qx)(b,P);return{bracketInfo:qe.bracketInfo,range:q}}}return null}function ge(qe,b,P,M){if(qe.kind===4||qe.kind===2){for(const q of qe.children){if(P=(0,T.QB)(b,q.length),(0,T.zG)(M,P)){const p=ge(q,b,P,M);if(p)return p}b=P}return null}else{if(qe.kind===3)return null;if(qe.kind===1){const q=(0,T.Qx)(b,P);return{bracketInfo:qe.bracketInfo,range:q}}}return null}function fe(qe,b,P,M,q,p,F,de){if(!(F>200)){if(qe.kind===4)for(const be of qe.children)P=(0,T.QB)(b,be.length),(0,T.vr)(b,q)&&(0,T.o0)(P,M)&&fe(be,b,P,M,q,p,F,de),b=P;else if(qe.kind===2){let be=0;if(de){let ye=de.get(qe.openingBracket.text);ye===void 0&&(ye=0),be=ye,ye++,de.set(qe.openingBracket.text,ye)}{const ye=qe.openingBracket;if(P=(0,T.QB)(b,ye.length),(0,T.vr)(b,q)&&(0,T.o0)(P,M)){const Me=(0,T.Qx)(b,P);p.push(new L(Me,F,be,!qe.closingBracket))}b=P}if(qe.child){const ye=qe.child;P=(0,T.QB)(b,ye.length),(0,T.vr)(b,q)&&(0,T.o0)(P,M)&&fe(ye,b,P,M,q,p,F+1,de),b=P}if(qe.closingBracket){const ye=qe.closingBracket;if(P=(0,T.QB)(b,ye.length),(0,T.vr)(b,q)&&(0,T.o0)(P,M)){const Me=(0,T.Qx)(b,P);p.push(new L(Me,F,be,!1))}b=P}de?.set(qe.openingBracket.text,be)}else if(qe.kind===3){const be=(0,T.Qx)(b,P);p.push(new L(be,F-1,0,!0))}else if(qe.kind===1){const be=(0,T.Qx)(b,P);p.push(new L(be,F-1,0,!1))}}}class oe{constructor(b,P,M){this.result=b,this.includeMinIndentation=P,this.textModel=M}}function Z(qe,b,P,M,q,p,F,de){var be;if(!(F>200))if(qe.kind===2){let ye=0;if(de){let $e=de.get(qe.openingBracket.text);$e===void 0&&($e=0),ye=$e,$e++,de.set(qe.openingBracket.text,$e)}const Me=(0,T.QB)(b,qe.openingBracket.length);let He=-1;if(p.includeMinIndentation&&(He=qe.computeMinIndentation(b,p.textModel)),p.result.push(new j((0,T.Qx)(b,P),(0,T.Qx)(b,Me),qe.closingBracket?(0,T.Qx)((0,T.QB)(Me,((be=qe.child)===null||be===void 0?void 0:be.length)||T.Vp),P):void 0,F,ye,qe,He)),b=Me,qe.child){const $e=qe.child;P=(0,T.QB)(b,$e.length),(0,T.vr)(b,q)&&(0,T.o0)(P,M)&&Z($e,b,P,M,q,p,F+1,de)}de?.set(qe.openingBracket.text,ye)}else{let ye=b;for(const Me of qe.children){const He=ye;ye=(0,T.QB)(ye,Me.length),(0,T.vr)(He,q)&&(0,T.vr)(M,ye)&&Z(Me,He,ye,M,q,p,F,de)}}}var le=f(19184),se=f(1804);class X extends x.jG{constructor(b,P){super(),this.textModel=b,this.languageConfigurationService=P,this.bracketPairsTree=this._register(new x.HE),this.onDidChangeEmitter=new $.vl,this.onDidChange=this.onDidChangeEmitter.event,this.bracketsRequested=!1,this._register(this.languageConfigurationService.onDidChange(M=>{var q;(!M.languageId||!((q=this.bracketPairsTree.value)===null||q===void 0)&&q.object.didLanguageChange(M.languageId))&&(this.bracketPairsTree.clear(),this.updateBracketPairsTree())}))}get canBuildAST(){return this.textModel.getValueLength()<=5e6}handleDidChangeOptions(b){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeLanguage(b){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeContent(b){var P;(P=this.bracketPairsTree.value)===null||P===void 0||P.object.handleContentChanged(b)}handleDidChangeBackgroundTokenizationState(){var b;(b=this.bracketPairsTree.value)===null||b===void 0||b.object.handleDidChangeBackgroundTokenizationState()}handleDidChangeTokens(b){var P;(P=this.bracketPairsTree.value)===null||P===void 0||P.object.handleDidChangeTokens(b)}updateBracketPairsTree(){if(this.bracketsRequested&&this.canBuildAST){if(!this.bracketPairsTree.value){const b=new x.Cm;this.bracketPairsTree.value=K(b.add(new ce(this.textModel,P=>this.languageConfigurationService.getLanguageConfiguration(P))),b),b.add(this.bracketPairsTree.value.object.onDidChange(P=>this.onDidChangeEmitter.fire(P))),this.onDidChangeEmitter.fire()}}else this.bracketPairsTree.value&&(this.bracketPairsTree.clear(),this.onDidChangeEmitter.fire())}getBracketPairsInRange(b){var P;return this.bracketsRequested=!0,this.updateBracketPairsTree(),((P=this.bracketPairsTree.value)===null||P===void 0?void 0:P.object.getBracketPairsInRange(b,!1))||[]}getBracketPairsInRangeWithMinIndentation(b){var P;return this.bracketsRequested=!0,this.updateBracketPairsTree(),((P=this.bracketPairsTree.value)===null||P===void 0?void 0:P.object.getBracketPairsInRange(b,!0))||[]}getBracketsInRange(b){var P;return this.bracketsRequested=!0,this.updateBracketPairsTree(),((P=this.bracketPairsTree.value)===null||P===void 0?void 0:P.object.getBracketsInRange(b))||[]}findMatchingBracketUp(b,P,M){const q=this.textModel.validatePosition(P),p=this.textModel.getLanguageIdAtPosition(q.lineNumber,q.column);if(this.canBuildAST){const F=this.languageConfigurationService.getLanguageConfiguration(p).bracketsNew.getClosingBracketInfo(b);if(!F)return null;const de=(0,I.Uk)(this.getBracketPairsInRange(_.Q.fromPositions(P,P))||[],be=>F.closes(be.openingBracketInfo));return de?de.openingBracketRange:null}else{const F=b.toLowerCase(),de=this.languageConfigurationService.getLanguageConfiguration(p).brackets;if(!de)return null;const be=de.textIsBracket[F];return be?Ee(this._findMatchingBracketUp(be,q,he(M))):null}}matchBracket(b,P){if(this.canBuildAST){const M=(0,I.Jw)(this.getBracketPairsInRange(_.Q.fromPositions(b,b)).filter(q=>q.closingBracketRange!==void 0&&(q.openingBracketRange.containsPosition(b)||q.closingBracketRange.containsPosition(b))),(0,I.VE)(q=>q.openingBracketRange.containsPosition(b)?q.openingBracketRange:q.closingBracketRange,_.Q.compareRangesUsingStarts));return M?[M.openingBracketRange,M.closingBracketRange]:null}else{const M=he(P);return this._matchBracket(this.textModel.validatePosition(b),M)}}_establishBracketSearchOffsets(b,P,M,q){const p=P.getCount(),F=P.getLanguageId(q);let de=Math.max(0,b.column-1-M.maxBracketLength);for(let ye=q-1;ye>=0;ye--){const Me=P.getEndOffset(ye);if(Me<=de)break;if((0,le.Yo)(P.getStandardTokenType(ye))||P.getLanguageId(ye)!==F){de=Me;break}}let be=Math.min(P.getLineContent().length,b.column-1+M.maxBracketLength);for(let ye=q+1;ye<p;ye++){const Me=P.getStartOffset(ye);if(Me>=be)break;if((0,le.Yo)(P.getStandardTokenType(ye))||P.getLanguageId(ye)!==F){be=Me;break}}return{searchStartOffset:de,searchEndOffset:be}}_matchBracket(b,P){const M=b.lineNumber,q=this.textModel.tokenization.getLineTokens(M),p=this.textModel.getLineContent(M),F=q.findTokenIndexAtOffset(b.column-1);if(F<0)return null;const de=this.languageConfigurationService.getLanguageConfiguration(q.getLanguageId(F)).brackets;if(de&&!(0,le.Yo)(q.getStandardTokenType(F))){let{searchStartOffset:be,searchEndOffset:ye}=this._establishBracketSearchOffsets(b,q,de,F),Me=null;for(;;){const He=se.Fu.findNextBracketInRange(de.forwardRegex,M,p,be,ye);if(!He)break;if(He.startColumn<=b.column&&b.column<=He.endColumn){const $e=p.substring(He.startColumn-1,He.endColumn-1).toLowerCase(),gt=this._matchFoundBracket(He,de.textIsBracket[$e],de.textIsOpenBracket[$e],P);if(gt){if(gt instanceof ve)return null;Me=gt}}be=He.endColumn-1}if(Me)return Me}if(F>0&&q.getStartOffset(F)===b.column-1){const be=F-1,ye=this.languageConfigurationService.getLanguageConfiguration(q.getLanguageId(be)).brackets;if(ye&&!(0,le.Yo)(q.getStandardTokenType(be))){const{searchStartOffset:Me,searchEndOffset:He}=this._establishBracketSearchOffsets(b,q,ye,be),$e=se.Fu.findPrevBracketInRange(ye.reversedRegex,M,p,Me,He);if($e&&$e.startColumn<=b.column&&b.column<=$e.endColumn){const gt=p.substring($e.startColumn-1,$e.endColumn-1).toLowerCase(),wt=this._matchFoundBracket($e,ye.textIsBracket[gt],ye.textIsOpenBracket[gt],P);if(wt)return wt instanceof ve?null:wt}}}return null}_matchFoundBracket(b,P,M,q){if(!P)return null;const p=M?this._findMatchingBracketDown(P,b.getEndPosition(),q):this._findMatchingBracketUp(P,b.getStartPosition(),q);return p?p instanceof ve?p:[b,p]:null}_findMatchingBracketUp(b,P,M){const q=b.languageId,p=b.reversedRegex;let F=-1,de=0;const be=(ye,Me,He,$e)=>{for(;;){if(M&&++de%100===0&&!M())return ve.INSTANCE;const gt=se.Fu.findPrevBracketInRange(p,ye,Me,He,$e);if(!gt)break;const wt=Me.substring(gt.startColumn-1,gt.endColumn-1).toLowerCase();if(b.isOpen(wt)?F++:b.isClose(wt)&&F--,F===0)return gt;$e=gt.startColumn-1}return null};for(let ye=P.lineNumber;ye>=1;ye--){const Me=this.textModel.tokenization.getLineTokens(ye),He=Me.getCount(),$e=this.textModel.getLineContent(ye);let gt=He-1,wt=$e.length,It=$e.length;ye===P.lineNumber&&(gt=Me.findTokenIndexAtOffset(P.column-1),wt=P.column-1,It=P.column-1);let Pt=!0;for(;gt>=0;gt--){const Wt=Me.getLanguageId(gt)===q&&!(0,le.Yo)(Me.getStandardTokenType(gt));if(Wt)Pt?wt=Me.getStartOffset(gt):(wt=Me.getStartOffset(gt),It=Me.getEndOffset(gt));else if(Pt&&wt!==It){const Xt=be(ye,$e,wt,It);if(Xt)return Xt}Pt=Wt}if(Pt&&wt!==It){const Wt=be(ye,$e,wt,It);if(Wt)return Wt}}return null}_findMatchingBracketDown(b,P,M){const q=b.languageId,p=b.forwardRegex;let F=1,de=0;const be=(Me,He,$e,gt)=>{for(;;){if(M&&++de%100===0&&!M())return ve.INSTANCE;const wt=se.Fu.findNextBracketInRange(p,Me,He,$e,gt);if(!wt)break;const It=He.substring(wt.startColumn-1,wt.endColumn-1).toLowerCase();if(b.isOpen(It)?F++:b.isClose(It)&&F--,F===0)return wt;$e=wt.endColumn-1}return null},ye=this.textModel.getLineCount();for(let Me=P.lineNumber;Me<=ye;Me++){const He=this.textModel.tokenization.getLineTokens(Me),$e=He.getCount(),gt=this.textModel.getLineContent(Me);let wt=0,It=0,Pt=0;Me===P.lineNumber&&(wt=He.findTokenIndexAtOffset(P.column-1),It=P.column-1,Pt=P.column-1);let Wt=!0;for(;wt<$e;wt++){const Xt=He.getLanguageId(wt)===q&&!(0,le.Yo)(He.getStandardTokenType(wt));if(Xt)Wt||(It=He.getStartOffset(wt)),Pt=He.getEndOffset(wt);else if(Wt&&It!==Pt){const mi=be(Me,gt,It,Pt);if(mi)return mi}Wt=Xt}if(Wt&&It!==Pt){const Xt=be(Me,gt,It,Pt);if(Xt)return Xt}}return null}findPrevBracket(b){var P;const M=this.textModel.validatePosition(b);if(this.canBuildAST)return this.bracketsRequested=!0,this.updateBracketPairsTree(),((P=this.bracketPairsTree.value)===null||P===void 0?void 0:P.object.getFirstBracketBefore(M))||null;let q=null,p=null,F=null;for(let de=M.lineNumber;de>=1;de--){const be=this.textModel.tokenization.getLineTokens(de),ye=be.getCount(),Me=this.textModel.getLineContent(de);let He=ye-1,$e=Me.length,gt=Me.length;if(de===M.lineNumber){He=be.findTokenIndexAtOffset(M.column-1),$e=M.column-1,gt=M.column-1;const It=be.getLanguageId(He);q!==It&&(q=It,p=this.languageConfigurationService.getLanguageConfiguration(q).brackets,F=this.languageConfigurationService.getLanguageConfiguration(q).bracketsNew)}let wt=!0;for(;He>=0;He--){const It=be.getLanguageId(He);if(q!==It){if(p&&F&&wt&&$e!==gt){const Wt=se.Fu.findPrevBracketInRange(p.reversedRegex,de,Me,$e,gt);if(Wt)return this._toFoundBracket(F,Wt);wt=!1}q=It,p=this.languageConfigurationService.getLanguageConfiguration(q).brackets,F=this.languageConfigurationService.getLanguageConfiguration(q).bracketsNew}const Pt=!!p&&!(0,le.Yo)(be.getStandardTokenType(He));if(Pt)wt?$e=be.getStartOffset(He):($e=be.getStartOffset(He),gt=be.getEndOffset(He));else if(F&&p&&wt&&$e!==gt){const Wt=se.Fu.findPrevBracketInRange(p.reversedRegex,de,Me,$e,gt);if(Wt)return this._toFoundBracket(F,Wt)}wt=Pt}if(F&&p&&wt&&$e!==gt){const It=se.Fu.findPrevBracketInRange(p.reversedRegex,de,Me,$e,gt);if(It)return this._toFoundBracket(F,It)}}return null}findNextBracket(b){var P;const M=this.textModel.validatePosition(b);if(this.canBuildAST)return this.bracketsRequested=!0,this.updateBracketPairsTree(),((P=this.bracketPairsTree.value)===null||P===void 0?void 0:P.object.getFirstBracketAfter(M))||null;const q=this.textModel.getLineCount();let p=null,F=null,de=null;for(let be=M.lineNumber;be<=q;be++){const ye=this.textModel.tokenization.getLineTokens(be),Me=ye.getCount(),He=this.textModel.getLineContent(be);let $e=0,gt=0,wt=0;if(be===M.lineNumber){$e=ye.findTokenIndexAtOffset(M.column-1),gt=M.column-1,wt=M.column-1;const Pt=ye.getLanguageId($e);p!==Pt&&(p=Pt,F=this.languageConfigurationService.getLanguageConfiguration(p).brackets,de=this.languageConfigurationService.getLanguageConfiguration(p).bracketsNew)}let It=!0;for(;$e<Me;$e++){const Pt=ye.getLanguageId($e);if(p!==Pt){if(de&&F&&It&>!==wt){const Xt=se.Fu.findNextBracketInRange(F.forwardRegex,be,He,gt,wt);if(Xt)return this._toFoundBracket(de,Xt);It=!1}p=Pt,F=this.languageConfigurationService.getLanguageConfiguration(p).brackets,de=this.languageConfigurationService.getLanguageConfiguration(p).bracketsNew}const Wt=!!F&&!(0,le.Yo)(ye.getStandardTokenType($e));if(Wt)It||(gt=ye.getStartOffset($e)),wt=ye.getEndOffset($e);else if(de&&F&&It&>!==wt){const Xt=se.Fu.findNextBracketInRange(F.forwardRegex,be,He,gt,wt);if(Xt)return this._toFoundBracket(de,Xt)}It=Wt}if(de&&F&&It&>!==wt){const Pt=se.Fu.findNextBracketInRange(F.forwardRegex,be,He,gt,wt);if(Pt)return this._toFoundBracket(de,Pt)}}return null}findEnclosingBrackets(b,P){const M=this.textModel.validatePosition(b);if(this.canBuildAST){const gt=_.Q.fromPositions(M),wt=(0,I.Uk)(this.getBracketPairsInRange(_.Q.fromPositions(M,M)),It=>It.closingBracketRange!==void 0&&It.range.strictContainsRange(gt));return wt?[wt.openingBracketRange,wt.closingBracketRange]:null}const q=he(P),p=this.textModel.getLineCount(),F=new Map;let de=[];const be=(gt,wt)=>{if(!F.has(gt)){const It=[];for(let Pt=0,Wt=wt?wt.brackets.length:0;Pt<Wt;Pt++)It[Pt]=0;F.set(gt,It)}de=F.get(gt)};let ye=0;const Me=(gt,wt,It,Pt,Wt)=>{for(;;){if(q&&++ye%100===0&&!q())return ve.INSTANCE;const Xt=se.Fu.findNextBracketInRange(gt.forwardRegex,wt,It,Pt,Wt);if(!Xt)break;const mi=It.substring(Xt.startColumn-1,Xt.endColumn-1).toLowerCase(),Ii=gt.textIsBracket[mi];if(Ii&&(Ii.isOpen(mi)?de[Ii.index]++:Ii.isClose(mi)&&de[Ii.index]--,de[Ii.index]===-1))return this._matchFoundBracket(Xt,Ii,!1,q);Pt=Xt.endColumn-1}return null};let He=null,$e=null;for(let gt=M.lineNumber;gt<=p;gt++){const wt=this.textModel.tokenization.getLineTokens(gt),It=wt.getCount(),Pt=this.textModel.getLineContent(gt);let Wt=0,Xt=0,mi=0;if(gt===M.lineNumber){Wt=wt.findTokenIndexAtOffset(M.column-1),Xt=M.column-1,mi=M.column-1;const Ji=wt.getLanguageId(Wt);He!==Ji&&(He=Ji,$e=this.languageConfigurationService.getLanguageConfiguration(He).brackets,be(He,$e))}let Ii=!0;for(;Wt<It;Wt++){const Ji=wt.getLanguageId(Wt);if(He!==Ji){if($e&&Ii&&Xt!==mi){const Mi=Me($e,gt,Pt,Xt,mi);if(Mi)return Ee(Mi);Ii=!1}He=Ji,$e=this.languageConfigurationService.getLanguageConfiguration(He).brackets,be(He,$e)}const In=!!$e&&!(0,le.Yo)(wt.getStandardTokenType(Wt));if(In)Ii||(Xt=wt.getStartOffset(Wt)),mi=wt.getEndOffset(Wt);else if($e&&Ii&&Xt!==mi){const Mi=Me($e,gt,Pt,Xt,mi);if(Mi)return Ee(Mi)}Ii=In}if($e&&Ii&&Xt!==mi){const Ji=Me($e,gt,Pt,Xt,mi);if(Ji)return Ee(Ji)}}return null}_toFoundBracket(b,P){if(!P)return null;let M=this.textModel.getValueInRange(P);M=M.toLowerCase();const q=b.getBracketInfo(M);return q?{range:P,bracketInfo:q}:null}}function K(qe,b){return{object:qe,dispose:()=>b?.dispose()}}function he(qe){if(typeof qe>"u")return()=>!0;{const b=Date.now();return()=>Date.now()-b<=qe}}class ve{constructor(){this._searchCanceledBrand=void 0}}ve.INSTANCE=new ve;function Ee(qe){return qe instanceof ve?null:qe}var O=f(48295),ot=f(89044);class lt extends x.jG{constructor(b){super(),this.textModel=b,this.colorProvider=new We,this.onDidChangeEmitter=new $.vl,this.onDidChange=this.onDidChangeEmitter.event,this.colorizationOptions=b.getOptions().bracketPairColorizationOptions,this._register(b.bracketPairs.onDidChange(P=>{this.onDidChangeEmitter.fire()}))}handleDidChangeOptions(b){this.colorizationOptions=this.textModel.getOptions().bracketPairColorizationOptions}getDecorationsInRange(b,P,M){if(P===void 0)return[];if(!this.colorizationOptions.enabled)return[];const q=new Array,p=this.textModel.bracketPairs.getBracketsInRange(b);for(const F of p)q.push({id:`bracket${F.range.toString()}-${F.nestingLevel}`,options:{description:"BracketPairColorization",inlineClassName:this.colorProvider.getInlineClassName(F,this.colorizationOptions.independentColorPoolPerBracketType)},ownerId:0,range:F.range});return q}getAllDecorations(b,P){return b===void 0?[]:this.colorizationOptions.enabled?this.getDecorationsInRange(new _.Q(1,1,this.textModel.getLineCount(),1),b,P):[]}}class We{constructor(){this.unexpectedClosingBracketClassName="unexpected-closing-bracket"}getInlineClassName(b,P){return b.isInvalid?this.unexpectedClosingBracketClassName:this.getInlineClassNameOfLevel(P?b.nestingLevelOfEqualBracketType:b.nestingLevel)}getInlineClassNameOfLevel(b){return`bracket-highlighting-${b%30}`}}(0,ot.zy)((qe,b)=>{const P=[O.sN,O.lQ,O.ss,O.l5,O.sH,O.zp],M=new We;b.addRule(`.monaco-editor .${M.unexpectedClosingBracketClassName} { color: ${qe.getColor(O.s7)}; }`);const q=P.map(p=>qe.getColor(p)).filter(p=>!!p).filter(p=>!p.isTransparent());for(let p=0;p<30;p++){const F=q[p%q.length];b.addRule(`.monaco-editor .${M.getInlineClassNameOfLevel(p)} { color: ${F}; }`)}});var Ke=f(54296),De=f(52818);class Pe{constructor(){this.spacesDiff=0,this.looksLikeAlignment=!1}}function Ue(qe,b,P,M,q){q.spacesDiff=0,q.looksLikeAlignment=!1;let p;for(p=0;p<b&&p<M;p++){const $e=qe.charCodeAt(p),gt=P.charCodeAt(p);if($e!==gt)break}let F=0,de=0;for(let $e=p;$e<b;$e++)qe.charCodeAt($e)===32?F++:de++;let be=0,ye=0;for(let $e=p;$e<M;$e++)P.charCodeAt($e)===32?be++:ye++;if(F>0&&de>0||be>0&&ye>0)return;const Me=Math.abs(de-ye),He=Math.abs(F-be);if(Me===0){q.spacesDiff=He,He>0&&0<=be-1&&be-1<qe.length&&be<P.length&&P.charCodeAt(be)!==32&&qe.charCodeAt(be-1)===32&&qe.charCodeAt(qe.length-1)===44&&(q.looksLikeAlignment=!0);return}if(He%Me===0){q.spacesDiff=He/Me;return}}function Re(qe,b,P){const M=Math.min(qe.getLineCount(),1e4);let q=0,p=0,F="",de=0;const be=[2,4,6,8,3,5,7],ye=8,Me=[0,0,0,0,0,0,0,0,0],He=new Pe;for(let wt=1;wt<=M;wt++){const It=qe.getLineLength(wt),Pt=qe.getLineContent(wt),Wt=It<=65536;let Xt=!1,mi=0,Ii=0,Ji=0;for(let Mi=0,Vi=It;Mi<Vi;Mi++){const Os=Wt?Pt.charCodeAt(Mi):qe.getLineCharCode(wt,Mi);if(Os===9)Ji++;else if(Os===32)Ii++;else{Xt=!0,mi=Mi;break}}if(!Xt||(Ji>0?q++:Ii>1&&p++,Ue(F,de,Pt,mi,He),He.looksLikeAlignment&&!(P&&b===He.spacesDiff)))continue;const In=He.spacesDiff;In<=ye&&Me[In]++,F=Pt,de=mi}let $e=P;q!==p&&($e=q<p);let gt=b;if($e){let wt=$e?0:.1*M;be.forEach(It=>{const Pt=Me[It];Pt>wt&&(wt=Pt,gt=It)}),gt===4&&Me[4]>0&&Me[2]>0&&Me[2]>=Me[4]/2&&(gt=2)}return{insertSpaces:$e,tabSize:gt}}function et(qe){return(qe.metadata&1)>>>0}function rt(qe,b){qe.metadata=qe.metadata&254|b<<0}function Lt(qe){return(qe.metadata&2)>>>1===1}function Dt(qe,b){qe.metadata=qe.metadata&253|(b?1:0)<<1}function xt(qe){return(qe.metadata&4)>>>2===1}function Ie(qe,b){qe.metadata=qe.metadata&251|(b?1:0)<<2}function dt(qe){return(qe.metadata&24)>>>3}function ft(qe,b){qe.metadata=qe.metadata&231|b<<3}function Bt(qe){return(qe.metadata&32)>>>5===1}function jt(qe,b){qe.metadata=qe.metadata&223|(b?1:0)<<5}class pt{constructor(b,P,M){this.metadata=0,this.parent=this,this.left=this,this.right=this,rt(this,1),this.start=P,this.end=M,this.delta=0,this.maxEnd=M,this.id=b,this.ownerId=0,this.options=null,Ie(this,!1),ft(this,1),jt(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=P,this.cachedAbsoluteEnd=M,this.range=null,Dt(this,!1)}reset(b,P,M,q){this.start=P,this.end=M,this.maxEnd=M,this.cachedVersionId=b,this.cachedAbsoluteStart=P,this.cachedAbsoluteEnd=M,this.range=q}setOptions(b){this.options=b;const P=this.options.className;Ie(this,P==="squiggly-error"||P==="squiggly-warning"||P==="squiggly-info"),ft(this,this.options.stickiness),jt(this,this.options.collapseOnReplaceEdit)}setCachedOffsets(b,P,M){this.cachedVersionId!==M&&(this.range=null),this.cachedVersionId=M,this.cachedAbsoluteStart=b,this.cachedAbsoluteEnd=P}detach(){this.parent=null,this.left=null,this.right=null}}const bt=new pt(null,0,0);bt.parent=bt,bt.left=bt,bt.right=bt,rt(bt,0);class zt{constructor(){this.root=bt,this.requestNormalizeDelta=!1}intervalSearch(b,P,M,q,p){return this.root===bt?[]:zi(this,b,P,M,q,p)}search(b,P,M){return this.root===bt?[]:Li(this,b,P,M)}collectNodesFromOwner(b){return ei(this,b)}collectNodesPostOrder(){return oi(this)}insert(b){Di(this,b),this._normalizeDeltaIfNecessary()}delete(b){ki(this,b),this._normalizeDeltaIfNecessary()}resolveNode(b,P){const M=b;let q=0;for(;b!==this.root;)b===b.parent.right&&(q+=b.parent.delta),b=b.parent;const p=M.start+q,F=M.end+q;M.setCachedOffsets(p,F,P)}acceptReplace(b,P,M,q){const p=_t(this,b,b+P);for(let F=0,de=p.length;F<de;F++){const be=p[F];ki(this,be)}this._normalizeDeltaIfNecessary(),At(this,b,b+P,M),this._normalizeDeltaIfNecessary();for(let F=0,de=p.length;F<de;F++){const be=p[F];be.start=be.cachedAbsoluteStart,be.end=be.cachedAbsoluteEnd,Ze(be,b,b+P,M,q),be.maxEnd=be.end,Di(this,be)}this._normalizeDeltaIfNecessary()}_normalizeDeltaIfNecessary(){this.requestNormalizeDelta&&(this.requestNormalizeDelta=!1,ii(this))}}function ii(qe){let b=qe.root,P=0;for(;b!==bt;){if(b.left!==bt&&!Lt(b.left)){b=b.left;continue}if(b.right!==bt&&!Lt(b.right)){P+=b.delta,b=b.right;continue}b.start=P+b.start,b.end=P+b.end,b.delta=0,Zt(b),Dt(b,!0),Dt(b.left,!1),Dt(b.right,!1),b===b.parent.right&&(P-=b.parent.delta),b=b.parent}Dt(qe.root,!1)}function vi(qe,b,P,M){return qe<P?!0:qe>P||M===1?!1:M===2?!0:b}function Ze(qe,b,P,M,q){const p=dt(qe),F=p===0||p===2,de=p===1||p===2,be=P-b,ye=M,Me=Math.min(be,ye),He=qe.start;let $e=!1;const gt=qe.end;let wt=!1;b<=He&><=P&&Bt(qe)&&(qe.start=b,$e=!0,qe.end=b,wt=!0);{const Pt=q?1:be>0?2:0;!$e&&vi(He,F,b,Pt)&&($e=!0),!wt&&vi(gt,de,b,Pt)&&(wt=!0)}if(Me>0&&!q){const Pt=be>ye?2:0;!$e&&vi(He,F,b+Me,Pt)&&($e=!0),!wt&&vi(gt,de,b+Me,Pt)&&(wt=!0)}{const Pt=q?1:0;!$e&&vi(He,F,P,Pt)&&(qe.start=b+ye,$e=!0),!wt&&vi(gt,de,P,Pt)&&(qe.end=b+ye,wt=!0)}const It=ye-be;$e||(qe.start=Math.max(0,He+It)),wt||(qe.end=Math.max(0,gt+It)),qe.start>qe.end&&(qe.end=qe.start)}function _t(qe,b,P){let M=qe.root,q=0,p=0,F=0,de=0;const be=[];let ye=0;for(;M!==bt;){if(Lt(M)){Dt(M.left,!1),Dt(M.right,!1),M===M.parent.right&&(q-=M.parent.delta),M=M.parent;continue}if(!Lt(M.left)){if(p=q+M.maxEnd,p<b){Dt(M,!0);continue}if(M.left!==bt){M=M.left;continue}}if(F=q+M.start,F>P){Dt(M,!0);continue}if(de=q+M.end,de>=b&&(M.setCachedOffsets(F,de,0),be[ye++]=M),Dt(M,!0),M.right!==bt&&!Lt(M.right)){q+=M.delta,M=M.right;continue}}return Dt(qe.root,!1),be}function At(qe,b,P,M){let q=qe.root,p=0,F=0,de=0;const be=M-(P-b);for(;q!==bt;){if(Lt(q)){Dt(q.left,!1),Dt(q.right,!1),q===q.parent.right&&(p-=q.parent.delta),Zt(q),q=q.parent;continue}if(!Lt(q.left)){if(F=p+q.maxEnd,F<b){Dt(q,!0);continue}if(q.left!==bt){q=q.left;continue}}if(de=p+q.start,de>P){q.start+=be,q.end+=be,q.delta+=be,(q.delta<-1073741824||q.delta>1073741824)&&(qe.requestNormalizeDelta=!0),Dt(q,!0);continue}if(Dt(q,!0),q.right!==bt&&!Lt(q.right)){p+=q.delta,q=q.right;continue}}Dt(qe.root,!1)}function ei(qe,b){let P=qe.root;const M=[];let q=0;for(;P!==bt;){if(Lt(P)){Dt(P.left,!1),Dt(P.right,!1),P=P.parent;continue}if(P.left!==bt&&!Lt(P.left)){P=P.left;continue}if(P.ownerId===b&&(M[q++]=P),Dt(P,!0),P.right!==bt&&!Lt(P.right)){P=P.right;continue}}return Dt(qe.root,!1),M}function oi(qe){let b=qe.root;const P=[];let M=0;for(;b!==bt;){if(Lt(b)){Dt(b.left,!1),Dt(b.right,!1),b=b.parent;continue}if(b.left!==bt&&!Lt(b.left)){b=b.left;continue}if(b.right!==bt&&!Lt(b.right)){b=b.right;continue}P[M++]=b,Dt(b,!0)}return Dt(qe.root,!1),P}function Li(qe,b,P,M){let q=qe.root,p=0,F=0,de=0;const be=[];let ye=0;for(;q!==bt;){if(Lt(q)){Dt(q.left,!1),Dt(q.right,!1),q===q.parent.right&&(p-=q.parent.delta),q=q.parent;continue}if(q.left!==bt&&!Lt(q.left)){q=q.left;continue}F=p+q.start,de=p+q.end,q.setCachedOffsets(F,de,M);let Me=!0;if(b&&q.ownerId&&q.ownerId!==b&&(Me=!1),P&&xt(q)&&(Me=!1),Me&&(be[ye++]=q),Dt(q,!0),q.right!==bt&&!Lt(q.right)){p+=q.delta,q=q.right;continue}}return Dt(qe.root,!1),be}function zi(qe,b,P,M,q,p){let F=qe.root,de=0,be=0,ye=0,Me=0;const He=[];let $e=0;for(;F!==bt;){if(Lt(F)){Dt(F.left,!1),Dt(F.right,!1),F===F.parent.right&&(de-=F.parent.delta),F=F.parent;continue}if(!Lt(F.left)){if(be=de+F.maxEnd,be<b){Dt(F,!0);continue}if(F.left!==bt){F=F.left;continue}}if(ye=de+F.start,ye>P){Dt(F,!0);continue}if(Me=de+F.end,Me>=b){F.setCachedOffsets(ye,Me,p);let gt=!0;M&&F.ownerId&&F.ownerId!==M&&(gt=!1),q&&xt(F)&&(gt=!1),gt&&(He[$e++]=F)}if(Dt(F,!0),F.right!==bt&&!Lt(F.right)){de+=F.delta,F=F.right;continue}}return Dt(qe.root,!1),He}function Di(qe,b){if(qe.root===bt)return b.parent=bt,b.left=bt,b.right=bt,rt(b,0),qe.root=b,qe.root;Te(qe,b),Ci(b.parent);let P=b;for(;P!==qe.root&&et(P.parent)===1;)if(P.parent===P.parent.parent.left){const M=P.parent.parent.right;et(M)===1?(rt(P.parent,0),rt(M,0),rt(P.parent.parent,1),P=P.parent.parent):(P===P.parent.right&&(P=P.parent,ct(qe,P)),rt(P.parent,0),rt(P.parent.parent,1),Oe(qe,P.parent.parent))}else{const M=P.parent.parent.left;et(M)===1?(rt(P.parent,0),rt(M,0),rt(P.parent.parent,1),P=P.parent.parent):(P===P.parent.left&&(P=P.parent,Oe(qe,P)),rt(P.parent,0),rt(P.parent.parent,1),ct(qe,P.parent.parent))}return rt(qe.root,0),b}function Te(qe,b){let P=0,M=qe.root;const q=b.start,p=b.end;for(;;)if(Ki(q,p,M.start+P,M.end+P)<0)if(M.left===bt){b.start-=P,b.end-=P,b.maxEnd-=P,M.left=b;break}else M=M.left;else if(M.right===bt){b.start-=P+M.delta,b.end-=P+M.delta,b.maxEnd-=P+M.delta,M.right=b;break}else P+=M.delta,M=M.right;b.parent=M,b.left=bt,b.right=bt,rt(b,1)}function ki(qe,b){let P,M;if(b.left===bt?(P=b.right,M=b,P.delta+=b.delta,(P.delta<-1073741824||P.delta>1073741824)&&(qe.requestNormalizeDelta=!0),P.start+=b.delta,P.end+=b.delta):b.right===bt?(P=b.left,M=b):(M=ze(b.right),P=M.right,P.start+=M.delta,P.end+=M.delta,P.delta+=M.delta,(P.delta<-1073741824||P.delta>1073741824)&&(qe.requestNormalizeDelta=!0),M.start+=b.delta,M.end+=b.delta,M.delta=b.delta,(M.delta<-1073741824||M.delta>1073741824)&&(qe.requestNormalizeDelta=!0)),M===qe.root){qe.root=P,rt(P,0),b.detach(),we(),Zt(P),qe.root.parent=bt;return}const q=et(M)===1;if(M===M.parent.left?M.parent.left=P:M.parent.right=P,M===b?P.parent=M.parent:(M.parent===b?P.parent=M:P.parent=M.parent,M.left=b.left,M.right=b.right,M.parent=b.parent,rt(M,et(b)),b===qe.root?qe.root=M:b===b.parent.left?b.parent.left=M:b.parent.right=M,M.left!==bt&&(M.left.parent=M),M.right!==bt&&(M.right.parent=M)),b.detach(),q){Ci(P.parent),M!==b&&(Ci(M),Ci(M.parent)),we();return}Ci(P),Ci(P.parent),M!==b&&(Ci(M),Ci(M.parent));let p;for(;P!==qe.root&&et(P)===0;)P===P.parent.left?(p=P.parent.right,et(p)===1&&(rt(p,0),rt(P.parent,1),ct(qe,P.parent),p=P.parent.right),et(p.left)===0&&et(p.right)===0?(rt(p,1),P=P.parent):(et(p.right)===0&&(rt(p.left,0),rt(p,1),Oe(qe,p),p=P.parent.right),rt(p,et(P.parent)),rt(P.parent,0),rt(p.right,0),ct(qe,P.parent),P=qe.root)):(p=P.parent.left,et(p)===1&&(rt(p,0),rt(P.parent,1),Oe(qe,P.parent),p=P.parent.left),et(p.left)===0&&et(p.right)===0?(rt(p,1),P=P.parent):(et(p.left)===0&&(rt(p.right,0),rt(p,1),ct(qe,p),p=P.parent.left),rt(p,et(P.parent)),rt(P.parent,0),rt(p.left,0),Oe(qe,P.parent),P=qe.root));rt(P,0),we()}function ze(qe){for(;qe.left!==bt;)qe=qe.left;return qe}function we(){bt.parent=bt,bt.delta=0,bt.start=0,bt.end=0}function ct(qe,b){const P=b.right;P.delta+=b.delta,(P.delta<-1073741824||P.delta>1073741824)&&(qe.requestNormalizeDelta=!0),P.start+=b.delta,P.end+=b.delta,b.right=P.left,P.left!==bt&&(P.left.parent=b),P.parent=b.parent,b.parent===bt?qe.root=P:b===b.parent.left?b.parent.left=P:b.parent.right=P,P.left=b,b.parent=P,Zt(b),Zt(P)}function Oe(qe,b){const P=b.left;b.delta-=P.delta,(b.delta<-1073741824||b.delta>1073741824)&&(qe.requestNormalizeDelta=!0),b.start-=P.delta,b.end-=P.delta,b.left=P.right,P.right!==bt&&(P.right.parent=b),P.parent=b.parent,b.parent===bt?qe.root=P:b===b.parent.right?b.parent.right=P:b.parent.left=P,P.right=b,b.parent=P,Zt(b),Zt(P)}function ut(qe){let b=qe.end;if(qe.left!==bt){const P=qe.left.maxEnd;P>b&&(b=P)}if(qe.right!==bt){const P=qe.right.maxEnd+qe.delta;P>b&&(b=P)}return b}function Zt(qe){qe.maxEnd=ut(qe)}function Ci(qe){for(;qe!==bt;){const b=ut(qe);if(qe.maxEnd===b)return;qe.maxEnd=b,qe=qe.parent}}function Ki(qe,b,P,M){return qe===P?b-M:qe-P}class Ln{constructor(b,P){this.piece=b,this.color=P,this.size_left=0,this.lf_left=0,this.parent=this,this.left=this,this.right=this}next(){if(this.right!==nt)return Ct(this.right);let b=this;for(;b.parent!==nt&&b.parent.left!==b;)b=b.parent;return b.parent===nt?nt:b.parent}prev(){if(this.left!==nt)return Qt(this.left);let b=this;for(;b.parent!==nt&&b.parent.right!==b;)b=b.parent;return b.parent===nt?nt:b.parent}detach(){this.parent=null,this.left=null,this.right=null}}const nt=new Ln(null,0);nt.parent=nt,nt.left=nt,nt.right=nt,nt.color=0;function Ct(qe){for(;qe.left!==nt;)qe=qe.left;return qe}function Qt(qe){for(;qe.right!==nt;)qe=qe.right;return qe}function Ot(qe){return qe===nt?0:qe.size_left+qe.piece.length+Ot(qe.right)}function at(qe){return qe===nt?0:qe.lf_left+qe.piece.lineFeedCnt+at(qe.right)}function Yi(){nt.parent=nt}function bi(qe,b){const P=b.right;P.size_left+=b.size_left+(b.piece?b.piece.length:0),P.lf_left+=b.lf_left+(b.piece?b.piece.lineFeedCnt:0),b.right=P.left,P.left!==nt&&(P.left.parent=b),P.parent=b.parent,b.parent===nt?qe.root=P:b.parent.left===b?b.parent.left=P:b.parent.right=P,P.left=b,b.parent=P}function St(qe,b){const P=b.left;b.left=P.right,P.right!==nt&&(P.right.parent=b),P.parent=b.parent,b.size_left-=P.size_left+(P.piece?P.piece.length:0),b.lf_left-=P.lf_left+(P.piece?P.piece.lineFeedCnt:0),b.parent===nt?qe.root=P:b===b.parent.right?b.parent.right=P:b.parent.left=P,P.right=b,b.parent=P}function bn(qe,b){let P,M;if(b.left===nt?(M=b,P=M.right):b.right===nt?(M=b,P=M.left):(M=Ct(b.right),P=M.right),M===qe.root){qe.root=P,P.color=0,b.detach(),Yi(),qe.root.parent=nt;return}const q=M.color===1;if(M===M.parent.left?M.parent.left=P:M.parent.right=P,M===b?(P.parent=M.parent,xe(qe,P)):(M.parent===b?P.parent=M:P.parent=M.parent,xe(qe,P),M.left=b.left,M.right=b.right,M.parent=b.parent,M.color=b.color,b===qe.root?qe.root=M:b===b.parent.left?b.parent.left=M:b.parent.right=M,M.left!==nt&&(M.left.parent=M),M.right!==nt&&(M.right.parent=M),M.size_left=b.size_left,M.lf_left=b.lf_left,xe(qe,M)),b.detach(),P.parent.left===P){const F=Ot(P),de=at(P);if(F!==P.parent.size_left||de!==P.parent.lf_left){const be=F-P.parent.size_left,ye=de-P.parent.lf_left;P.parent.size_left=F,P.parent.lf_left=de,ni(qe,P.parent,be,ye)}}if(xe(qe,P.parent),q){Yi();return}let p;for(;P!==qe.root&&P.color===0;)P===P.parent.left?(p=P.parent.right,p.color===1&&(p.color=0,P.parent.color=1,bi(qe,P.parent),p=P.parent.right),p.left.color===0&&p.right.color===0?(p.color=1,P=P.parent):(p.right.color===0&&(p.left.color=0,p.color=1,St(qe,p),p=P.parent.right),p.color=P.parent.color,P.parent.color=0,p.right.color=0,bi(qe,P.parent),P=qe.root)):(p=P.parent.left,p.color===1&&(p.color=0,P.parent.color=1,St(qe,P.parent),p=P.parent.left),p.left.color===0&&p.right.color===0?(p.color=1,P=P.parent):(p.left.color===0&&(p.right.color=0,p.color=1,bi(qe,p),p=P.parent.left),p.color=P.parent.color,P.parent.color=0,p.left.color=0,St(qe,P.parent),P=qe.root));P.color=0,Yi()}function sn(qe,b){for(xe(qe,b);b!==qe.root&&b.parent.color===1;)if(b.parent===b.parent.parent.left){const P=b.parent.parent.right;P.color===1?(b.parent.color=0,P.color=0,b.parent.parent.color=1,b=b.parent.parent):(b===b.parent.right&&(b=b.parent,bi(qe,b)),b.parent.color=0,b.parent.parent.color=1,St(qe,b.parent.parent))}else{const P=b.parent.parent.left;P.color===1?(b.parent.color=0,P.color=0,b.parent.parent.color=1,b=b.parent.parent):(b===b.parent.left&&(b=b.parent,St(qe,b)),b.parent.color=0,b.parent.parent.color=1,bi(qe,b.parent.parent))}qe.root.color=0}function ni(qe,b,P,M){for(;b!==qe.root&&b!==nt;)b.parent.left===b&&(b.parent.size_left+=P,b.parent.lf_left+=M),b=b.parent}function xe(qe,b){let P=0,M=0;if(b!==qe.root){for(;b!==qe.root&&b===b.parent.right;)b=b.parent;if(b!==qe.root)for(b=b.parent,P=Ot(b.left)-b.size_left,M=at(b.left)-b.lf_left,b.size_left+=P,b.lf_left+=M;b!==qe.root&&(P!==0||M!==0);)b.parent.left===b&&(b.parent.size_left+=P,b.parent.lf_left+=M),b=b.parent}}var Ce=f(104);const Ye=65535;function Rt(qe){let b;return qe[qe.length-1]<65536?b=new Uint16Array(qe.length):b=new Uint32Array(qe.length),b.set(qe,0),b}class Vt{constructor(b,P,M,q,p){this.lineStarts=b,this.cr=P,this.lf=M,this.crlf=q,this.isBasicASCII=p}}function Gt(qe,b=!0){const P=[0];let M=1;for(let q=0,p=qe.length;q<p;q++){const F=qe.charCodeAt(q);F===13?q+1<p&&qe.charCodeAt(q+1)===10?(P[M++]=q+2,q++):P[M++]=q+1:F===10&&(P[M++]=q+1)}return b?Rt(P):P}function ri(qe,b){qe.length=0,qe[0]=0;let P=1,M=0,q=0,p=0,F=!0;for(let be=0,ye=b.length;be<ye;be++){const Me=b.charCodeAt(be);Me===13?be+1<ye&&b.charCodeAt(be+1)===10?(p++,qe[P++]=be+2,be++):(M++,qe[P++]=be+1):Me===10?(q++,qe[P++]=be+1):F&&Me!==9&&(Me<32||Me>126)&&(F=!1)}const de=new Vt(Rt(qe),M,q,p,F);return qe.length=0,de}class fi{constructor(b,P,M,q,p){this.bufferIndex=b,this.start=P,this.end=M,this.lineFeedCnt=q,this.length=p}}class di{constructor(b,P){this.buffer=b,this.lineStarts=P}}class Jt{constructor(b,P){this._pieces=[],this._tree=b,this._BOM=P,this._index=0,b.root!==nt&&b.iterate(b.root,M=>(M!==nt&&this._pieces.push(M.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 ai{constructor(b){this._limit=b,this._cache=[]}get(b){for(let P=this._cache.length-1;P>=0;P--){const M=this._cache[P];if(M.nodeStartOffset<=b&&M.nodeStartOffset+M.node.piece.length>=b)return M}return null}get2(b){for(let P=this._cache.length-1;P>=0;P--){const M=this._cache[P];if(M.nodeStartLineNumber&&M.nodeStartLineNumber<b&&M.nodeStartLineNumber+M.node.piece.lineFeedCnt>=b)return M}return null}set(b){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(b)}validate(b){let P=!1;const M=this._cache;for(let q=0;q<M.length;q++){const p=M[q];if(p.node.parent===null||p.nodeStartOffset>=b){M[q]=null,P=!0;continue}}if(P){const q=[];for(const p of M)p!==null&&q.push(p);this._cache=q}}}class Ei{constructor(b,P,M){this.create(b,P,M)}create(b,P,M){this._buffers=[new di("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=nt,this._lineCnt=1,this._length=0,this._EOL=P,this._EOLLength=P.length,this._EOLNormalized=M;let q=null;for(let p=0,F=b.length;p<F;p++)if(b[p].buffer.length>0){b[p].lineStarts||(b[p].lineStarts=Gt(b[p].buffer));const de=new fi(p+1,{line:0,column:0},{line:b[p].lineStarts.length-1,column:b[p].buffer.length-b[p].lineStarts[b[p].lineStarts.length-1]},b[p].lineStarts.length-1,b[p].buffer.length);this._buffers.push(b[p]),q=this.rbInsertRight(q,de)}this._searchCache=new ai(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()}normalizeEOL(b){const P=Ye,M=P-Math.floor(P/3),q=M*2;let p="",F=0;const de=[];if(this.iterate(this.root,be=>{const ye=this.getNodeContent(be),Me=ye.length;if(F<=M||F+Me<q)return p+=ye,F+=Me,!0;const He=p.replace(/\r\n|\r|\n/g,b);return de.push(new di(He,Gt(He))),p=ye,F=Me,!0}),F>0){const be=p.replace(/\r\n|\r|\n/g,b);de.push(new di(be,Gt(be)))}this.create(de,b,!0)}getEOL(){return this._EOL}setEOL(b){this._EOL=b,this._EOLLength=this._EOL.length,this.normalizeEOL(b)}createSnapshot(b){return new Jt(this,b)}getOffsetAt(b,P){let M=0,q=this.root;for(;q!==nt;)if(q.left!==nt&&q.lf_left+1>=b)q=q.left;else if(q.lf_left+q.piece.lineFeedCnt+1>=b){M+=q.size_left;const p=this.getAccumulatedValue(q,b-q.lf_left-2);return M+=p+P-1}else b-=q.lf_left+q.piece.lineFeedCnt,M+=q.size_left+q.piece.length,q=q.right;return M}getPositionAt(b){b=Math.floor(b),b=Math.max(0,b);let P=this.root,M=0;const q=b;for(;P!==nt;)if(P.size_left!==0&&P.size_left>=b)P=P.left;else if(P.size_left+P.piece.length>=b){const p=this.getIndexOf(P,b-P.size_left);if(M+=P.lf_left+p.index,p.index===0){const F=this.getOffsetAt(M+1,1),de=q-F;return new S.y(M+1,de+1)}return new S.y(M+1,p.remainder+1)}else if(b-=P.size_left+P.piece.length,M+=P.lf_left+P.piece.lineFeedCnt,P.right===nt){const p=this.getOffsetAt(M+1,1),F=q-b-p;return new S.y(M+1,F+1)}else P=P.right;return new S.y(1,1)}getValueInRange(b,P){if(b.startLineNumber===b.endLineNumber&&b.startColumn===b.endColumn)return"";const M=this.nodeAt2(b.startLineNumber,b.startColumn),q=this.nodeAt2(b.endLineNumber,b.endColumn),p=this.getValueInRange2(M,q);return P?P!==this._EOL||!this._EOLNormalized?p.replace(/\r\n|\r|\n/g,P):P===this.getEOL()&&this._EOLNormalized?p:p.replace(/\r\n|\r|\n/g,P):p}getValueInRange2(b,P){if(b.node===P.node){const de=b.node,be=this._buffers[de.piece.bufferIndex].buffer,ye=this.offsetInBuffer(de.piece.bufferIndex,de.piece.start);return be.substring(ye+b.remainder,ye+P.remainder)}let M=b.node;const q=this._buffers[M.piece.bufferIndex].buffer,p=this.offsetInBuffer(M.piece.bufferIndex,M.piece.start);let F=q.substring(p+b.remainder,p+M.piece.length);for(M=M.next();M!==nt;){const de=this._buffers[M.piece.bufferIndex].buffer,be=this.offsetInBuffer(M.piece.bufferIndex,M.piece.start);if(M===P.node){F+=de.substring(be,be+P.remainder);break}else F+=de.substr(be,M.piece.length);M=M.next()}return F}getLinesContent(){const b=[];let P=0,M="",q=!1;return this.iterate(this.root,p=>{if(p===nt)return!0;const F=p.piece;let de=F.length;if(de===0)return!0;const be=this._buffers[F.bufferIndex].buffer,ye=this._buffers[F.bufferIndex].lineStarts,Me=F.start.line,He=F.end.line;let $e=ye[Me]+F.start.column;if(q&&(be.charCodeAt($e)===10&&($e++,de--),b[P++]=M,M="",q=!1,de===0))return!0;if(Me===He)return!this._EOLNormalized&&be.charCodeAt($e+de-1)===13?(q=!0,M+=be.substr($e,de-1)):M+=be.substr($e,de),!0;M+=this._EOLNormalized?be.substring($e,Math.max($e,ye[Me+1]-this._EOLLength)):be.substring($e,ye[Me+1]).replace(/(\r\n|\r|\n)$/,""),b[P++]=M;for(let gt=Me+1;gt<He;gt++)M=this._EOLNormalized?be.substring(ye[gt],ye[gt+1]-this._EOLLength):be.substring(ye[gt],ye[gt+1]).replace(/(\r\n|\r|\n)$/,""),b[P++]=M;return!this._EOLNormalized&&be.charCodeAt(ye[He]+F.end.column-1)===13?(q=!0,F.end.column===0?P--:M=be.substr(ye[He],F.end.column-1)):M=be.substr(ye[He],F.end.column),!0}),q&&(b[P++]=M,M=""),b[P++]=M,b}getLength(){return this._length}getLineCount(){return this._lineCnt}getLineContent(b){return this._lastVisitedLine.lineNumber===b?this._lastVisitedLine.value:(this._lastVisitedLine.lineNumber=b,b===this._lineCnt?this._lastVisitedLine.value=this.getLineRawContent(b):this._EOLNormalized?this._lastVisitedLine.value=this.getLineRawContent(b,this._EOLLength):this._lastVisitedLine.value=this.getLineRawContent(b).replace(/(\r\n|\r|\n)$/,""),this._lastVisitedLine.value)}_getCharCode(b){if(b.remainder===b.node.piece.length){const P=b.node.next();if(!P)return 0;const M=this._buffers[P.piece.bufferIndex],q=this.offsetInBuffer(P.piece.bufferIndex,P.piece.start);return M.buffer.charCodeAt(q)}else{const P=this._buffers[b.node.piece.bufferIndex],q=this.offsetInBuffer(b.node.piece.bufferIndex,b.node.piece.start)+b.remainder;return P.buffer.charCodeAt(q)}}getLineCharCode(b,P){const M=this.nodeAt2(b,P+1);return this._getCharCode(M)}getLineLength(b){if(b===this.getLineCount()){const P=this.getOffsetAt(b,1);return this.getLength()-P}return this.getOffsetAt(b+1,1)-this.getOffsetAt(b,1)-this._EOLLength}findMatchesInNode(b,P,M,q,p,F,de,be,ye,Me,He){const $e=this._buffers[b.piece.bufferIndex],gt=this.offsetInBuffer(b.piece.bufferIndex,b.piece.start),wt=this.offsetInBuffer(b.piece.bufferIndex,p),It=this.offsetInBuffer(b.piece.bufferIndex,F);let Pt;const Wt={line:0,column:0};let Xt,mi;P._wordSeparators?(Xt=$e.buffer.substring(wt,It),mi=Ii=>Ii+wt,P.reset(0)):(Xt=$e.buffer,mi=Ii=>Ii,P.reset(wt));do if(Pt=P.next(Xt),Pt){if(mi(Pt.index)>=It)return Me;this.positionInBuffer(b,mi(Pt.index)-gt,Wt);const Ii=this.getLineFeedCnt(b.piece.bufferIndex,p,Wt),Ji=Wt.line===p.line?Wt.column-p.column+q:Wt.column+1,In=Ji+Pt[0].length;if(He[Me++]=(0,Ce.dr)(new _.Q(M+Ii,Ji,M+Ii,In),Pt,be),mi(Pt.index)+Pt[0].length>=It||Me>=ye)return Me}while(Pt);return Me}findMatchesLineByLine(b,P,M,q){const p=[];let F=0;const de=new Ce.W5(P.wordSeparators,P.regex);let be=this.nodeAt2(b.startLineNumber,b.startColumn);if(be===null)return[];const ye=this.nodeAt2(b.endLineNumber,b.endColumn);if(ye===null)return[];let Me=this.positionInBuffer(be.node,be.remainder);const He=this.positionInBuffer(ye.node,ye.remainder);if(be.node===ye.node)return this.findMatchesInNode(be.node,de,b.startLineNumber,b.startColumn,Me,He,P,M,q,F,p),p;let $e=b.startLineNumber,gt=be.node;for(;gt!==ye.node;){const It=this.getLineFeedCnt(gt.piece.bufferIndex,Me,gt.piece.end);if(It>=1){const Wt=this._buffers[gt.piece.bufferIndex].lineStarts,Xt=this.offsetInBuffer(gt.piece.bufferIndex,gt.piece.start),mi=Wt[Me.line+It],Ii=$e===b.startLineNumber?b.startColumn:1;if(F=this.findMatchesInNode(gt,de,$e,Ii,Me,this.positionInBuffer(gt,mi-Xt),P,M,q,F,p),F>=q)return p;$e+=It}const Pt=$e===b.startLineNumber?b.startColumn-1:0;if($e===b.endLineNumber){const Wt=this.getLineContent($e).substring(Pt,b.endColumn-1);return F=this._findMatchesInLine(P,de,Wt,b.endLineNumber,Pt,F,p,M,q),p}if(F=this._findMatchesInLine(P,de,this.getLineContent($e).substr(Pt),$e,Pt,F,p,M,q),F>=q)return p;$e++,be=this.nodeAt2($e,1),gt=be.node,Me=this.positionInBuffer(be.node,be.remainder)}if($e===b.endLineNumber){const It=$e===b.startLineNumber?b.startColumn-1:0,Pt=this.getLineContent($e).substring(It,b.endColumn-1);return F=this._findMatchesInLine(P,de,Pt,b.endLineNumber,It,F,p,M,q),p}const wt=$e===b.startLineNumber?b.startColumn:1;return F=this.findMatchesInNode(ye.node,de,$e,wt,Me,He,P,M,q,F,p),p}_findMatchesInLine(b,P,M,q,p,F,de,be,ye){const Me=b.wordSeparators;if(!be&&b.simpleSearch){const $e=b.simpleSearch,gt=$e.length,wt=M.length;let It=-gt;for(;(It=M.indexOf($e,It+gt))!==-1;)if((!Me||(0,Ce.wC)(Me,M,wt,It,gt))&&(de[F++]=new D.Dg(new _.Q(q,It+1+p,q,It+1+gt+p),null),F>=ye))return F;return F}let He;P.reset(0);do if(He=P.next(M),He&&(de[F++]=(0,Ce.dr)(new _.Q(q,He.index+1+p,q,He.index+1+He[0].length+p),He,be),F>=ye))return F;while(He);return F}insert(b,P,M=!1){if(this._EOLNormalized=this._EOLNormalized&&M,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==nt){const{node:q,remainder:p,nodeStartOffset:F}=this.nodeAt(b),de=q.piece,be=de.bufferIndex,ye=this.positionInBuffer(q,p);if(q.piece.bufferIndex===0&&de.end.line===this._lastChangeBufferPos.line&&de.end.column===this._lastChangeBufferPos.column&&F+de.length===b&&P.length<Ye){this.appendToNode(q,P),this.computeBufferMetadata();return}if(F===b)this.insertContentToNodeLeft(P,q),this._searchCache.validate(b);else if(F+q.piece.length>b){const Me=[];let He=new fi(de.bufferIndex,ye,de.end,this.getLineFeedCnt(de.bufferIndex,ye,de.end),this.offsetInBuffer(be,de.end)-this.offsetInBuffer(be,ye));if(this.shouldCheckCRLF()&&this.endWithCR(P)&&this.nodeCharCodeAt(q,p)===10){const It={line:He.start.line+1,column:0};He=new fi(He.bufferIndex,It,He.end,this.getLineFeedCnt(He.bufferIndex,It,He.end),He.length-1),P+=` `}if(this.shouldCheckCRLF()&&this.startWithLF(P))if(this.nodeCharCodeAt(q,p-1)===13){const It=this.positionInBuffer(q,p-1);this.deleteNodeTail(q,It),P="\r"+P,q.piece.length===0&&Me.push(q)}else this.deleteNodeTail(q,ye);else this.deleteNodeTail(q,ye);const $e=this.createNewPieces(P);He.length>0&&this.rbInsertRight(q,He);let gt=q;for(let wt=0;wt<$e.length;wt++)gt=this.rbInsertRight(gt,$e[wt]);this.deleteNodes(Me)}else this.insertContentToNodeRight(P,q)}else{const q=this.createNewPieces(P);let p=this.rbInsertLeft(null,q[0]);for(let F=1;F<q.length;F++)p=this.rbInsertRight(p,q[F])}this.computeBufferMetadata()}delete(b,P){if(this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",P<=0||this.root===nt)return;const M=this.nodeAt(b),q=this.nodeAt(b+P),p=M.node,F=q.node;if(p===F){const $e=this.positionInBuffer(p,M.remainder),gt=this.positionInBuffer(p,q.remainder);if(M.nodeStartOffset===b){if(P===p.piece.length){const wt=p.next();bn(this,p),this.validateCRLFWithPrevNode(wt),this.computeBufferMetadata();return}this.deleteNodeHead(p,gt),this._searchCache.validate(b),this.validateCRLFWithPrevNode(p),this.computeBufferMetadata();return}if(M.nodeStartOffset+p.piece.length===b+P){this.deleteNodeTail(p,$e),this.validateCRLFWithNextNode(p),this.computeBufferMetadata();return}this.shrinkNode(p,$e,gt),this.computeBufferMetadata();return}const de=[],be=this.positionInBuffer(p,M.remainder);this.deleteNodeTail(p,be),this._searchCache.validate(b),p.piece.length===0&&de.push(p);const ye=this.positionInBuffer(F,q.remainder);this.deleteNodeHead(F,ye),F.piece.length===0&&de.push(F);const Me=p.next();for(let $e=Me;$e!==nt&&$e!==F;$e=$e.next())de.push($e);const He=p.piece.length===0?p.prev():p;this.deleteNodes(de),this.validateCRLFWithNextNode(He),this.computeBufferMetadata()}insertContentToNodeLeft(b,P){const M=[];if(this.shouldCheckCRLF()&&this.endWithCR(b)&&this.startWithLF(P)){const F=P.piece,de={line:F.start.line+1,column:0},be=new fi(F.bufferIndex,de,F.end,this.getLineFeedCnt(F.bufferIndex,de,F.end),F.length-1);P.piece=be,b+=` `,ni(this,P,-1,-1),P.piece.length===0&&M.push(P)}const q=this.createNewPieces(b);let p=this.rbInsertLeft(P,q[q.length-1]);for(let F=q.length-2;F>=0;F--)p=this.rbInsertLeft(p,q[F]);this.validateCRLFWithPrevNode(p),this.deleteNodes(M)}insertContentToNodeRight(b,P){this.adjustCarriageReturnFromNext(b,P)&&(b+=` `);const M=this.createNewPieces(b),q=this.rbInsertRight(P,M[0]);let p=q;for(let F=1;F<M.length;F++)p=this.rbInsertRight(p,M[F]);this.validateCRLFWithPrevNode(q)}positionInBuffer(b,P,M){const q=b.piece,p=b.piece.bufferIndex,F=this._buffers[p].lineStarts,be=F[q.start.line]+q.start.column+P;let ye=q.start.line,Me=q.end.line,He=0,$e=0,gt=0;for(;ye<=Me&&(He=ye+(Me-ye)/2|0,gt=F[He],He!==Me);)if($e=F[He+1],be<gt)Me=He-1;else if(be>=$e)ye=He+1;else break;return M?(M.line=He,M.column=be-gt,null):{line:He,column:be-gt}}getLineFeedCnt(b,P,M){if(M.column===0)return M.line-P.line;const q=this._buffers[b].lineStarts;if(M.line===q.length-1)return M.line-P.line;const p=q[M.line+1],F=q[M.line]+M.column;if(p>F+1)return M.line-P.line;const de=F-1;return this._buffers[b].buffer.charCodeAt(de)===13?M.line-P.line+1:M.line-P.line}offsetInBuffer(b,P){return this._buffers[b].lineStarts[P.line]+P.column}deleteNodes(b){for(let P=0;P<b.length;P++)bn(this,b[P])}createNewPieces(b){if(b.length>Ye){const Me=[];for(;b.length>Ye;){const $e=b.charCodeAt(Ye-1);let gt;$e===13||$e>=55296&&$e<=56319?(gt=b.substring(0,Ye-1),b=b.substring(Ye-1)):(gt=b.substring(0,Ye),b=b.substring(Ye));const wt=Gt(gt);Me.push(new fi(this._buffers.length,{line:0,column:0},{line:wt.length-1,column:gt.length-wt[wt.length-1]},wt.length-1,gt.length)),this._buffers.push(new di(gt,wt))}const He=Gt(b);return Me.push(new fi(this._buffers.length,{line:0,column:0},{line:He.length-1,column:b.length-He[He.length-1]},He.length-1,b.length)),this._buffers.push(new di(b,He)),Me}let P=this._buffers[0].buffer.length;const M=Gt(b,!1);let q=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===P&&P!==0&&this.startWithLF(b)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},q=this._lastChangeBufferPos;for(let Me=0;Me<M.length;Me++)M[Me]+=P+1;this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(M.slice(1)),this._buffers[0].buffer+="_"+b,P+=1}else{if(P!==0)for(let Me=0;Me<M.length;Me++)M[Me]+=P;this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(M.slice(1)),this._buffers[0].buffer+=b}const p=this._buffers[0].buffer.length,F=this._buffers[0].lineStarts.length-1,de=p-this._buffers[0].lineStarts[F],be={line:F,column:de},ye=new fi(0,q,be,this.getLineFeedCnt(0,q,be),p-P);return this._lastChangeBufferPos=be,[ye]}getLineRawContent(b,P=0){let M=this.root,q="";const p=this._searchCache.get2(b);if(p){M=p.node;const F=this.getAccumulatedValue(M,b-p.nodeStartLineNumber-1),de=this._buffers[M.piece.bufferIndex].buffer,be=this.offsetInBuffer(M.piece.bufferIndex,M.piece.start);if(p.nodeStartLineNumber+M.piece.lineFeedCnt===b)q=de.substring(be+F,be+M.piece.length);else{const ye=this.getAccumulatedValue(M,b-p.nodeStartLineNumber);return de.substring(be+F,be+ye-P)}}else{let F=0;const de=b;for(;M!==nt;)if(M.left!==nt&&M.lf_left>=b-1)M=M.left;else if(M.lf_left+M.piece.lineFeedCnt>b-1){const be=this.getAccumulatedValue(M,b-M.lf_left-2),ye=this.getAccumulatedValue(M,b-M.lf_left-1),Me=this._buffers[M.piece.bufferIndex].buffer,He=this.offsetInBuffer(M.piece.bufferIndex,M.piece.start);return F+=M.size_left,this._searchCache.set({node:M,nodeStartOffset:F,nodeStartLineNumber:de-(b-1-M.lf_left)}),Me.substring(He+be,He+ye-P)}else if(M.lf_left+M.piece.lineFeedCnt===b-1){const be=this.getAccumulatedValue(M,b-M.lf_left-2),ye=this._buffers[M.piece.bufferIndex].buffer,Me=this.offsetInBuffer(M.piece.bufferIndex,M.piece.start);q=ye.substring(Me+be,Me+M.piece.length);break}else b-=M.lf_left+M.piece.lineFeedCnt,F+=M.size_left+M.piece.length,M=M.right}for(M=M.next();M!==nt;){const F=this._buffers[M.piece.bufferIndex].buffer;if(M.piece.lineFeedCnt>0){const de=this.getAccumulatedValue(M,0),be=this.offsetInBuffer(M.piece.bufferIndex,M.piece.start);return q+=F.substring(be,be+de-P),q}else{const de=this.offsetInBuffer(M.piece.bufferIndex,M.piece.start);q+=F.substr(de,M.piece.length)}M=M.next()}return q}computeBufferMetadata(){let b=this.root,P=1,M=0;for(;b!==nt;)P+=b.lf_left+b.piece.lineFeedCnt,M+=b.size_left+b.piece.length,b=b.right;this._lineCnt=P,this._length=M,this._searchCache.validate(this._length)}getIndexOf(b,P){const M=b.piece,q=this.positionInBuffer(b,P),p=q.line-M.start.line;if(this.offsetInBuffer(M.bufferIndex,M.end)-this.offsetInBuffer(M.bufferIndex,M.start)===P){const F=this.getLineFeedCnt(b.piece.bufferIndex,M.start,q);if(F!==p)return{index:F,remainder:0}}return{index:p,remainder:q.column}}getAccumulatedValue(b,P){if(P<0)return 0;const M=b.piece,q=this._buffers[M.bufferIndex].lineStarts,p=M.start.line+P+1;return p>M.end.line?q[M.end.line]+M.end.column-q[M.start.line]-M.start.column:q[p]-q[M.start.line]-M.start.column}deleteNodeTail(b,P){const M=b.piece,q=M.lineFeedCnt,p=this.offsetInBuffer(M.bufferIndex,M.end),F=P,de=this.offsetInBuffer(M.bufferIndex,F),be=this.getLineFeedCnt(M.bufferIndex,M.start,F),ye=be-q,Me=de-p,He=M.length+Me;b.piece=new fi(M.bufferIndex,M.start,F,be,He),ni(this,b,Me,ye)}deleteNodeHead(b,P){const M=b.piece,q=M.lineFeedCnt,p=this.offsetInBuffer(M.bufferIndex,M.start),F=P,de=this.getLineFeedCnt(M.bufferIndex,F,M.end),be=this.offsetInBuffer(M.bufferIndex,F),ye=de-q,Me=p-be,He=M.length+Me;b.piece=new fi(M.bufferIndex,F,M.end,de,He),ni(this,b,Me,ye)}shrinkNode(b,P,M){const q=b.piece,p=q.start,F=q.end,de=q.length,be=q.lineFeedCnt,ye=P,Me=this.getLineFeedCnt(q.bufferIndex,q.start,ye),He=this.offsetInBuffer(q.bufferIndex,P)-this.offsetInBuffer(q.bufferIndex,p);b.piece=new fi(q.bufferIndex,q.start,ye,Me,He),ni(this,b,He-de,Me-be);const $e=new fi(q.bufferIndex,M,F,this.getLineFeedCnt(q.bufferIndex,M,F),this.offsetInBuffer(q.bufferIndex,F)-this.offsetInBuffer(q.bufferIndex,M)),gt=this.rbInsertRight(b,$e);this.validateCRLFWithPrevNode(gt)}appendToNode(b,P){this.adjustCarriageReturnFromNext(P,b)&&(P+=` `);const M=this.shouldCheckCRLF()&&this.startWithLF(P)&&this.endWithCR(b),q=this._buffers[0].buffer.length;this._buffers[0].buffer+=P;const p=Gt(P,!1);for(let gt=0;gt<p.length;gt++)p[gt]+=q;if(M){const gt=this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-2];this._buffers[0].lineStarts.pop(),this._lastChangeBufferPos={line:this._lastChangeBufferPos.line-1,column:q-gt}}this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(p.slice(1));const F=this._buffers[0].lineStarts.length-1,de=this._buffers[0].buffer.length-this._buffers[0].lineStarts[F],be={line:F,column:de},ye=b.piece.length+P.length,Me=b.piece.lineFeedCnt,He=this.getLineFeedCnt(0,b.piece.start,be),$e=He-Me;b.piece=new fi(b.piece.bufferIndex,b.piece.start,be,He,ye),this._lastChangeBufferPos=be,ni(this,b,P.length,$e)}nodeAt(b){let P=this.root;const M=this._searchCache.get(b);if(M)return{node:M.node,nodeStartOffset:M.nodeStartOffset,remainder:b-M.nodeStartOffset};let q=0;for(;P!==nt;)if(P.size_left>b)P=P.left;else if(P.size_left+P.piece.length>=b){q+=P.size_left;const p={node:P,remainder:b-P.size_left,nodeStartOffset:q};return this._searchCache.set(p),p}else b-=P.size_left+P.piece.length,q+=P.size_left+P.piece.length,P=P.right;return null}nodeAt2(b,P){let M=this.root,q=0;for(;M!==nt;)if(M.left!==nt&&M.lf_left>=b-1)M=M.left;else if(M.lf_left+M.piece.lineFeedCnt>b-1){const p=this.getAccumulatedValue(M,b-M.lf_left-2),F=this.getAccumulatedValue(M,b-M.lf_left-1);return q+=M.size_left,{node:M,remainder:Math.min(p+P-1,F),nodeStartOffset:q}}else if(M.lf_left+M.piece.lineFeedCnt===b-1){const p=this.getAccumulatedValue(M,b-M.lf_left-2);if(p+P-1<=M.piece.length)return{node:M,remainder:p+P-1,nodeStartOffset:q};P-=M.piece.length-p;break}else b-=M.lf_left+M.piece.lineFeedCnt,q+=M.size_left+M.piece.length,M=M.right;for(M=M.next();M!==nt;){if(M.piece.lineFeedCnt>0){const p=this.getAccumulatedValue(M,0),F=this.offsetOfNode(M);return{node:M,remainder:Math.min(P-1,p),nodeStartOffset:F}}else if(M.piece.length>=P-1){const p=this.offsetOfNode(M);return{node:M,remainder:P-1,nodeStartOffset:p}}else P-=M.piece.length;M=M.next()}return null}nodeCharCodeAt(b,P){if(b.piece.lineFeedCnt<1)return-1;const M=this._buffers[b.piece.bufferIndex],q=this.offsetInBuffer(b.piece.bufferIndex,b.piece.start)+P;return M.buffer.charCodeAt(q)}offsetOfNode(b){if(!b)return 0;let P=b.size_left;for(;b!==this.root;)b.parent.right===b&&(P+=b.parent.size_left+b.parent.piece.length),b=b.parent;return P}shouldCheckCRLF(){return!(this._EOLNormalized&&this._EOL===` `)}startWithLF(b){if(typeof b=="string")return b.charCodeAt(0)===10;if(b===nt||b.piece.lineFeedCnt===0)return!1;const P=b.piece,M=this._buffers[P.bufferIndex].lineStarts,q=P.start.line,p=M[q]+P.start.column;return q===M.length-1||M[q+1]>p+1?!1:this._buffers[P.bufferIndex].buffer.charCodeAt(p)===10}endWithCR(b){return typeof b=="string"?b.charCodeAt(b.length-1)===13:b===nt||b.piece.lineFeedCnt===0?!1:this.nodeCharCodeAt(b,b.piece.length-1)===13}validateCRLFWithPrevNode(b){if(this.shouldCheckCRLF()&&this.startWithLF(b)){const P=b.prev();this.endWithCR(P)&&this.fixCRLF(P,b)}}validateCRLFWithNextNode(b){if(this.shouldCheckCRLF()&&this.endWithCR(b)){const P=b.next();this.startWithLF(P)&&this.fixCRLF(b,P)}}fixCRLF(b,P){const M=[],q=this._buffers[b.piece.bufferIndex].lineStarts;let p;b.piece.end.column===0?p={line:b.piece.end.line-1,column:q[b.piece.end.line]-q[b.piece.end.line-1]-1}:p={line:b.piece.end.line,column:b.piece.end.column-1};const F=b.piece.length-1,de=b.piece.lineFeedCnt-1;b.piece=new fi(b.piece.bufferIndex,b.piece.start,p,de,F),ni(this,b,-1,-1),b.piece.length===0&&M.push(b);const be={line:P.piece.start.line+1,column:0},ye=P.piece.length-1,Me=this.getLineFeedCnt(P.piece.bufferIndex,be,P.piece.end);P.piece=new fi(P.piece.bufferIndex,be,P.piece.end,Me,ye),ni(this,P,-1,-1),P.piece.length===0&&M.push(P);const He=this.createNewPieces(`\r `);this.rbInsertRight(b,He[0]);for(let $e=0;$e<M.length;$e++)bn(this,M[$e])}adjustCarriageReturnFromNext(b,P){if(this.shouldCheckCRLF()&&this.endWithCR(b)){const M=P.next();if(this.startWithLF(M)){if(b+=` `,M.piece.length===1)bn(this,M);else{const q=M.piece,p={line:q.start.line+1,column:0},F=q.length-1,de=this.getLineFeedCnt(q.bufferIndex,p,q.end);M.piece=new fi(q.bufferIndex,p,q.end,de,F),ni(this,M,-1,-1)}return!0}}return!1}iterate(b,P){if(b===nt)return P(nt);const M=this.iterate(b.left,P);return M&&P(b)&&this.iterate(b.right,P)}getNodeContent(b){if(b===nt)return"";const P=this._buffers[b.piece.bufferIndex],M=b.piece,q=this.offsetInBuffer(M.bufferIndex,M.start),p=this.offsetInBuffer(M.bufferIndex,M.end);return P.buffer.substring(q,p)}getPieceContent(b){const P=this._buffers[b.bufferIndex],M=this.offsetInBuffer(b.bufferIndex,b.start),q=this.offsetInBuffer(b.bufferIndex,b.end);return P.buffer.substring(M,q)}rbInsertRight(b,P){const M=new Ln(P,1);if(M.left=nt,M.right=nt,M.parent=nt,M.size_left=0,M.lf_left=0,this.root===nt)this.root=M,M.color=0;else if(b.right===nt)b.right=M,M.parent=b;else{const p=Ct(b.right);p.left=M,M.parent=p}return sn(this,M),M}rbInsertLeft(b,P){const M=new Ln(P,1);if(M.left=nt,M.right=nt,M.parent=nt,M.size_left=0,M.lf_left=0,this.root===nt)this.root=M,M.color=0;else if(b.left===nt)b.left=M,M.parent=b;else{const q=Qt(b.left);q.right=M,M.parent=q}return sn(this,M),M}}var wi=f(6949);class Ai extends x.jG{constructor(b,P,M,q,p,F,de){super(),this._onDidChangeContent=this._register(new $.vl),this._BOM=P,this._mightContainNonBasicASCII=!F,this._mightContainRTL=q,this._mightContainUnusualLineTerminators=p,this._pieceTree=new Ei(b,M,de)}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(b){return this._pieceTree.createSnapshot(b?this._BOM:"")}getOffsetAt(b,P){return this._pieceTree.getOffsetAt(b,P)}getPositionAt(b){return this._pieceTree.getPositionAt(b)}getRangeAt(b,P){const M=b+P,q=this.getPositionAt(b),p=this.getPositionAt(M);return new _.Q(q.lineNumber,q.column,p.lineNumber,p.column)}getValueInRange(b,P=0){if(b.isEmpty())return"";const M=this._getEndOfLine(P);return this._pieceTree.getValueInRange(b,M)}getValueLengthInRange(b,P=0){if(b.isEmpty())return 0;if(b.startLineNumber===b.endLineNumber)return b.endColumn-b.startColumn;const M=this.getOffsetAt(b.startLineNumber,b.startColumn);return this.getOffsetAt(b.endLineNumber,b.endColumn)-M}getCharacterCountInRange(b,P=0){if(this._mightContainNonBasicASCII){let M=0;const q=b.startLineNumber,p=b.endLineNumber;for(let F=q;F<=p;F++){const de=this.getLineContent(F),be=F===q?b.startColumn-1:0,ye=F===p?b.endColumn-1:de.length;for(let Me=be;Me<ye;Me++)ie.pc(de.charCodeAt(Me))?(M=M+1,Me=Me+1):M=M+1}return M+=this._getEndOfLine(P).length*(p-q),M}return this.getValueLengthInRange(b,P)}getLength(){return this._pieceTree.getLength()}getLineCount(){return this._pieceTree.getLineCount()}getLinesContent(){return this._pieceTree.getLinesContent()}getLineContent(b){return this._pieceTree.getLineContent(b)}getLineCharCode(b,P){return this._pieceTree.getLineCharCode(b,P)}getLineLength(b){return this._pieceTree.getLineLength(b)}getLineFirstNonWhitespaceColumn(b){const P=ie.HG(this.getLineContent(b));return P===-1?0:P+1}getLineLastNonWhitespaceColumn(b){const P=ie.lT(this.getLineContent(b));return P===-1?0:P+2}_getEndOfLine(b){switch(b){case 1:return` `;case 2:return`\r `;case 0:return this.getEOL();default:throw new Error("Unknown EOL preference")}}setEOL(b){this._pieceTree.setEOL(b)}applyEdits(b,P,M){let q=this._mightContainRTL,p=this._mightContainUnusualLineTerminators,F=this._mightContainNonBasicASCII,de=!0,be=[];for(let It=0;It<b.length;It++){const Pt=b[It];de&&Pt._isTracked&&(de=!1);const Wt=Pt.range;if(Pt.text){let In=!0;F||(In=!ie.aC(Pt.text),F=In),!q&&In&&(q=ie.E_(Pt.text)),!p&&In&&(p=ie.$X(Pt.text))}let Xt="",mi=0,Ii=0,Ji=0;if(Pt.text){let In;[mi,Ii,Ji,In]=(0,J.W)(Pt.text);const Mi=this.getEOL();In===0||In===(Mi===`\r `?2:1)?Xt=Pt.text:Xt=Pt.text.replace(/\r\n|\r|\n/g,Mi)}be[It]={sortIndex:It,identifier:Pt.identifier||null,range:Wt,rangeOffset:this.getOffsetAt(Wt.startLineNumber,Wt.startColumn),rangeLength:this.getValueLengthInRange(Wt),text:Xt,eolCount:mi,firstLineLength:Ii,lastLineLength:Ji,forceMoveMarkers:!!Pt.forceMoveMarkers,isAutoWhitespaceEdit:Pt.isAutoWhitespaceEdit||!1}}be.sort(Ai._sortOpsAscending);let ye=!1;for(let It=0,Pt=be.length-1;It<Pt;It++){const Wt=be[It].range.getEndPosition(),Xt=be[It+1].range.getStartPosition();if(Xt.isBeforeOrEqual(Wt)){if(Xt.isBefore(Wt))throw new Error("Overlapping ranges are not allowed!");ye=!0}}de&&(be=this._reduceOperations(be));const Me=M||P?Ai._getInverseEditRanges(be):[],He=[];if(P)for(let It=0;It<be.length;It++){const Pt=be[It],Wt=Me[It];if(Pt.isAutoWhitespaceEdit&&Pt.range.isEmpty())for(let Xt=Wt.startLineNumber;Xt<=Wt.endLineNumber;Xt++){let mi="";Xt===Wt.startLineNumber&&(mi=this.getLineContent(Pt.range.startLineNumber),ie.HG(mi)!==-1)||He.push({lineNumber:Xt,oldContent:mi})}}let $e=null;if(M){let It=0;$e=[];for(let Pt=0;Pt<be.length;Pt++){const Wt=be[Pt],Xt=Me[Pt],mi=this.getValueInRange(Wt.range),Ii=Wt.rangeOffset+It;It+=Wt.text.length-mi.length,$e[Pt]={sortIndex:Wt.sortIndex,identifier:Wt.identifier,range:Xt,text:mi,textChange:new wi.k(Wt.rangeOffset,mi,Ii,Wt.text)}}ye||$e.sort((Pt,Wt)=>Pt.sortIndex-Wt.sortIndex)}this._mightContainRTL=q,this._mightContainUnusualLineTerminators=p,this._mightContainNonBasicASCII=F;const gt=this._doApplyEdits(be);let wt=null;if(P&&He.length>0){He.sort((It,Pt)=>Pt.lineNumber-It.lineNumber),wt=[];for(let It=0,Pt=He.length;It<Pt;It++){const Wt=He[It].lineNumber;if(It>0&&He[It-1].lineNumber===Wt)continue;const Xt=He[It].oldContent,mi=this.getLineContent(Wt);mi.length===0||mi===Xt||ie.HG(mi)!==-1||wt.push(Wt)}}return this._onDidChangeContent.fire(),new D.F4($e,gt,wt)}_reduceOperations(b){return b.length<1e3?b:[this._toSingleEditOperation(b)]}_toSingleEditOperation(b){let P=!1;const M=b[0].range,q=b[b.length-1].range,p=new _.Q(M.startLineNumber,M.startColumn,q.endLineNumber,q.endColumn);let F=M.startLineNumber,de=M.startColumn;const be=[];for(let gt=0,wt=b.length;gt<wt;gt++){const It=b[gt],Pt=It.range;P=P||It.forceMoveMarkers,be.push(this.getValueInRange(new _.Q(F,de,Pt.startLineNumber,Pt.startColumn))),It.text.length>0&&be.push(It.text),F=Pt.endLineNumber,de=Pt.endColumn}const ye=be.join(""),[Me,He,$e]=(0,J.W)(ye);return{sortIndex:0,identifier:b[0].identifier,range:p,rangeOffset:this.getOffsetAt(p.startLineNumber,p.startColumn),rangeLength:this.getValueLengthInRange(p,0),text:ye,eolCount:Me,firstLineLength:He,lastLineLength:$e,forceMoveMarkers:P,isAutoWhitespaceEdit:!1}}_doApplyEdits(b){b.sort(Ai._sortOpsDescending);const P=[];for(let M=0;M<b.length;M++){const q=b[M],p=q.range.startLineNumber,F=q.range.startColumn,de=q.range.endLineNumber,be=q.range.endColumn;if(p===de&&F===be&&q.text.length===0)continue;q.text?(this._pieceTree.delete(q.rangeOffset,q.rangeLength),this._pieceTree.insert(q.rangeOffset,q.text,!0)):this._pieceTree.delete(q.rangeOffset,q.rangeLength);const ye=new _.Q(p,F,de,be);P.push({range:ye,rangeLength:q.rangeLength,text:q.text,rangeOffset:q.rangeOffset,forceMoveMarkers:q.forceMoveMarkers})}return P}findMatchesLineByLine(b,P,M,q){return this._pieceTree.findMatchesLineByLine(b,P,M,q)}static _getInverseEditRanges(b){const P=[];let M=0,q=0,p=null;for(let F=0,de=b.length;F<de;F++){const be=b[F];let ye,Me;p?p.range.endLineNumber===be.range.startLineNumber?(ye=M,Me=q+(be.range.startColumn-p.range.endColumn)):(ye=M+(be.range.startLineNumber-p.range.endLineNumber),Me=be.range.startColumn):(ye=be.range.startLineNumber,Me=be.range.startColumn);let He;if(be.text.length>0){const $e=be.eolCount+1;$e===1?He=new _.Q(ye,Me,ye,Me+be.firstLineLength):He=new _.Q(ye,Me,ye+$e-1,be.lastLineLength+1)}else He=new _.Q(ye,Me,ye,Me);M=He.endLineNumber,q=He.endColumn,P.push(He),p=be}return P}static _sortOpsAscending(b,P){const M=_.Q.compareRangesUsingEnds(b.range,P.range);return M===0?b.sortIndex-P.sortIndex:M}static _sortOpsDescending(b,P){const M=_.Q.compareRangesUsingEnds(b.range,P.range);return M===0?P.sortIndex-b.sortIndex:-M}}class Ni{constructor(b,P,M,q,p,F,de,be,ye){this._chunks=b,this._bom=P,this._cr=M,this._lf=q,this._crlf=p,this._containsRTL=F,this._containsUnusualLineTerminators=de,this._isBasicASCII=be,this._normalizeEOL=ye}_getEOL(b){const P=this._cr+this._lf+this._crlf,M=this._cr+this._crlf;return P===0?b===1?` `:`\r `:M>P/2?`\r `:` `}create(b){const P=this._getEOL(b),M=this._chunks;if(this._normalizeEOL&&(P===`\r `&&(this._cr>0||this._lf>0)||P===` `&&(this._cr>0||this._crlf>0)))for(let p=0,F=M.length;p<F;p++){const de=M[p].buffer.replace(/\r\n|\r|\n/g,P),be=Gt(de);M[p]=new di(de,be)}const q=new Ai(M,this._bom,P,this._containsRTL,this._containsUnusualLineTerminators,this._isBasicASCII,this._normalizeEOL);return{textBuffer:q,disposable:q}}}class qi{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(b){if(b.length===0)return;this.chunks.length===0&&ie.LU(b)&&(this.BOM=ie.r_,b=b.substr(1));const P=b.charCodeAt(b.length-1);P===13||P>=55296&&P<=56319?(this._acceptChunk1(b.substr(0,b.length-1),!1),this._hasPreviousChar=!0,this._previousChar=P):(this._acceptChunk1(b,!1),this._hasPreviousChar=!1,this._previousChar=P)}_acceptChunk1(b,P){!P&&b.length===0||(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+b):this._acceptChunk2(b))}_acceptChunk2(b){const P=ri(this._tmpLineStarts,b);this.chunks.push(new di(b,P.lineStarts)),this.cr+=P.cr,this.lf+=P.lf,this.crlf+=P.crlf,this.isBasicASCII&&(this.isBasicASCII=P.isBasicASCII),!this.isBasicASCII&&!this.containsRTL&&(this.containsRTL=ie.E_(b)),!this.isBasicASCII&&!this.containsUnusualLineTerminators&&(this.containsUnusualLineTerminators=ie.$X(b))}finish(b=!0){return this._finish(),new Ni(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.containsUnusualLineTerminators,this.isBasicASCII,b)}_finish(){if(this.chunks.length===0&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;const b=this.chunks[this.chunks.length-1];b.buffer+=String.fromCharCode(this._previousChar);const P=Gt(b.buffer);b.lineStarts=P,this._previousChar===13&&this.cr++}}}var Pi=f(18782),gn=f(32177),Gi=f(57445),Oi=f(44364),Fi=f(97036),Bi=f(23013);class rn{constructor(b,P){this._startLineNumber=b,this._tokens=P}get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._startLineNumber+this._tokens.length-1}getLineTokens(b){return this._tokens[b-this._startLineNumber]}appendLineTokens(b){this._tokens.push(b)}}class _i{constructor(){this._tokens=[]}add(b,P){if(this._tokens.length>0){const M=this._tokens[this._tokens.length-1];if(M.endLineNumber+1===b){M.appendLineTokens(P);return}}this._tokens.push(new rn(b,[P]))}finalize(){return this._tokens}}var jn=f(65958),Wn=f(63339);class xn{constructor(b){this._default=b,this._store=[]}get(b){return b<this._store.length?this._store[b]:this._default}set(b,P){for(;b>=this._store.length;)this._store[this._store.length]=this._default;this._store[b]=P}delete(b,P){P===0||b>=this._store.length||this._store.splice(b,P)}insert(b,P){if(P===0||b>=this._store.length)return;const M=[];for(let q=0;q<P;q++)M[q]=this._default;this._store=I.nK(this._store,b,M)}}class Rn{constructor(b,P){this.tokenizationSupport=b,this.initialState=P,this._lineBeginState=new xn(null),this._lineNeedsTokenization=new xn(!0),this._firstLineNeedsTokenization=0,this._lineBeginState.set(0,this.initialState)}get invalidLineStartIndex(){return this._firstLineNeedsTokenization}markMustBeTokenized(b){this._lineNeedsTokenization.set(b,!0),this._firstLineNeedsTokenization=Math.min(this._firstLineNeedsTokenization,b)}getBeginState(b){return this._lineBeginState.get(b)}setEndState(b,P,M){if(this._lineNeedsTokenization.set(P,!1),this._firstLineNeedsTokenization=P+1,P===b-1)return;const q=this._lineBeginState.get(P+1);if(q===null||!M.equals(q)){this._lineBeginState.set(P+1,M),this.markMustBeTokenized(P+1);return}let p=P+1;for(;p<b&&!this._lineNeedsTokenization.get(p);)p++;this._firstLineNeedsTokenization=p}applyEdits(b,P){this.markMustBeTokenized(b.startLineNumber-1),this._lineBeginState.delete(b.startLineNumber,b.endLineNumber-b.startLineNumber),this._lineNeedsTokenization.delete(b.startLineNumber,b.endLineNumber-b.startLineNumber),this._lineBeginState.insert(b.startLineNumber,P),this._lineNeedsTokenization.insert(b.startLineNumber,P)}}class $i extends x.jG{constructor(b,P,M){super(),this._textModel=b,this._tokenizationPart=P,this._languageIdCodec=M,this._isScheduled=!1,this._isDisposed=!1,this._tokenizationStateStore=null,this._register(Oi.dG.onDidChange(q=>{const p=this._textModel.getLanguageId();q.changedLanguages.indexOf(p)!==-1&&(this._resetTokenizationState(),this._tokenizationPart.clearTokens())})),this._resetTokenizationState()}dispose(){this._isDisposed=!0,super.dispose()}handleDidChangeContent(b){if(b.isFlush){this._resetTokenizationState();return}if(this._tokenizationStateStore)for(let P=0,M=b.changes.length;P<M;P++){const q=b.changes[P],[p]=(0,J.W)(q.text);this._tokenizationStateStore.applyEdits(q.range,p)}this._beginBackgroundTokenization()}handleDidChangeAttached(){this._beginBackgroundTokenization()}handleDidChangeLanguage(b){this._resetTokenizationState(),this._tokenizationPart.clearTokens()}_resetTokenizationState(){const[b,P]=Nn(this._textModel,this._tokenizationPart);b&&P?this._tokenizationStateStore=new Rn(b,P):this._tokenizationStateStore=null,this._beginBackgroundTokenization()}_beginBackgroundTokenization(){this._isScheduled||!this._textModel.isAttachedToEditor()||!this._hasLinesToTokenize()||(this._isScheduled=!0,(0,jn.cx)(b=>{this._isScheduled=!1,this._backgroundTokenizeWithDeadline(b)}))}_backgroundTokenizeWithDeadline(b){const P=Date.now()+b.timeRemaining(),M=()=>{this._isDisposed||!this._textModel.isAttachedToEditor()||!this._hasLinesToTokenize()||(this._backgroundTokenizeForAtLeast1ms(),Date.now()<P?(0,Wn._p)(M):this._beginBackgroundTokenization())};M()}_backgroundTokenizeForAtLeast1ms(){const b=this._textModel.getLineCount(),P=new _i,M=Bi.W.create(!1);do if(M.elapsed()>1||this._tokenizeOneInvalidLine(P)>=b)break;while(this._hasLinesToTokenize());this._tokenizationPart.setTokens(P.finalize(),this._isTokenizationComplete())}tokenizeViewport(b,P){const M=new _i;this._tokenizeViewport(M,b,P),this._tokenizationPart.setTokens(M.finalize(),this._isTokenizationComplete())}reset(){this._resetTokenizationState(),this._tokenizationPart.clearTokens()}forceTokenization(b){const P=new _i;this._updateTokensUntilLine(P,b),this._tokenizationPart.setTokens(P.finalize(),this._isTokenizationComplete())}getTokenTypeIfInsertingCharacter(b,P){if(!this._tokenizationStateStore)return 0;this.forceTokenization(b.lineNumber);const M=this._tokenizationStateStore.getBeginState(b.lineNumber-1);if(!M)return 0;const q=this._textModel.getLanguageId(),p=this._textModel.getLineContent(b.lineNumber),F=p.substring(0,b.column-1)+P+p.substring(b.column-1),de=Jn(this._languageIdCodec,q,this._tokenizationStateStore.tokenizationSupport,F,!0,M),be=new Gi.f(de.tokens,F,this._languageIdCodec);if(be.getCount()===0)return 0;const ye=be.findTokenIndexAtOffset(b.column-1);return be.getStandardTokenType(ye)}tokenizeLineWithEdit(b,P,M){const q=b.lineNumber,p=b.column;if(!this._tokenizationStateStore)return null;this.forceTokenization(q);const F=this._tokenizationStateStore.getBeginState(q-1);if(!F)return null;const de=this._textModel.getLineContent(q),be=de.substring(0,p-1)+M+de.substring(p-1+P),ye=this._textModel.getLanguageIdAtPosition(q,0),Me=Jn(this._languageIdCodec,ye,this._tokenizationStateStore.tokenizationSupport,be,!0,F);return new Gi.f(Me.tokens,be,this._languageIdCodec)}isCheapToTokenize(b){if(!this._tokenizationStateStore)return!0;const P=this._tokenizationStateStore.invalidLineStartIndex+1;return b>P?!1:b<P||this._textModel.getLineLength(b)<2048}_hasLinesToTokenize(){return this._tokenizationStateStore?this._tokenizationStateStore.invalidLineStartIndex<this._textModel.getLineCount():!1}_isTokenizationComplete(){return this._tokenizationStateStore?this._tokenizationStateStore.invalidLineStartIndex>=this._textModel.getLineCount():!1}_tokenizeOneInvalidLine(b){if(!this._tokenizationStateStore||!this._hasLinesToTokenize())return this._textModel.getLineCount()+1;const P=this._tokenizationStateStore.invalidLineStartIndex+1;return this._updateTokensUntilLine(b,P),P}_updateTokensUntilLine(b,P){if(!this._tokenizationStateStore)return;const M=this._textModel.getLanguageId(),q=this._textModel.getLineCount(),p=P-1;for(let F=this._tokenizationStateStore.invalidLineStartIndex;F<=p;F++){const de=this._textModel.getLineContent(F+1),be=this._tokenizationStateStore.getBeginState(F),ye=Jn(this._languageIdCodec,M,this._tokenizationStateStore.tokenizationSupport,de,!0,be);b.add(F+1,ye.tokens),this._tokenizationStateStore.setEndState(q,F,ye.endState),F=this._tokenizationStateStore.invalidLineStartIndex-1}}_tokenizeViewport(b,P,M){if(!this._tokenizationStateStore||M<=this._tokenizationStateStore.invalidLineStartIndex)return;if(P<=this._tokenizationStateStore.invalidLineStartIndex){this._updateTokensUntilLine(b,M);return}let q=this._textModel.getLineFirstNonWhitespaceColumn(P);const p=[];let F=null;for(let ye=P-1;q>1&&ye>=1;ye--){const Me=this._textModel.getLineFirstNonWhitespaceColumn(ye);if(Me!==0&&Me<q&&(p.push(this._textModel.getLineContent(ye)),q=Me,F=this._tokenizationStateStore.getBeginState(ye-1),F))break}F||(F=this._tokenizationStateStore.initialState);const de=this._textModel.getLanguageId();let be=F;for(let ye=p.length-1;ye>=0;ye--)be=Jn(this._languageIdCodec,de,this._tokenizationStateStore.tokenizationSupport,p[ye],!1,be).endState;for(let ye=P;ye<=M;ye++){const Me=this._textModel.getLineContent(ye),He=Jn(this._languageIdCodec,de,this._tokenizationStateStore.tokenizationSupport,Me,!0,be);b.add(ye,He.tokens),this._tokenizationStateStore.markMustBeTokenized(ye-1),be=He.endState}}}function Nn(qe,b){if(qe.isTooLargeForTokenization())return[null,null];const P=Oi.dG.get(b.getLanguageId());if(!P)return[null,null];let M;try{M=P.getInitialState()}catch(q){return(0,te.dz)(q),[null,null]}return[P,M]}function Jn(qe,b,P,M,q,p){let F=null;if(P)try{F=P.tokenizeEncoded(M,q,p.clone())}catch(de){(0,te.dz)(de)}return F||(F=(0,Fi.Lh)(qe.encodeLanguageId(b),p)),Gi.f.convertToEndOffset(F.tokens,M.length),F}const Ti=new Uint32Array(0).buffer;class es{static deleteBeginning(b,P){return b===null||b===Ti?b:es.delete(b,0,P)}static deleteEnding(b,P){if(b===null||b===Ti)return b;const M=xi(b),q=M[M.length-2];return es.delete(b,P,q)}static delete(b,P,M){if(b===null||b===Ti||P===M)return b;const q=xi(b),p=q.length>>>1;if(P===0&&q[q.length-2]===M)return Ti;const F=Gi.f.findIndexInTokensArray(q,P),de=F>0?q[F-1<<1]:0,be=q[F<<1];if(M<be){const gt=M-P;for(let wt=F;wt<p;wt++)q[wt<<1]-=gt;return b}let ye,Me;de!==P?(q[F<<1]=P,ye=F+1<<1,Me=P):(ye=F<<1,Me=de);const He=M-P;for(let gt=F+1;gt<p;gt++){const wt=q[gt<<1]-He;wt>Me&&(q[ye++]=wt,q[ye++]=q[(gt<<1)+1],Me=wt)}if(ye===q.length)return b;const $e=new Uint32Array(ye);return $e.set(q.subarray(0,ye),0),$e.buffer}static append(b,P){if(P===Ti)return b;if(b===Ti)return P;if(b===null)return b;if(P===null)return null;const M=xi(b),q=xi(P),p=q.length>>>1,F=new Uint32Array(M.length+q.length);F.set(M,0);let de=M.length;const be=M[M.length-2];for(let ye=0;ye<p;ye++)F[de++]=q[ye<<1]+be,F[de++]=q[(ye<<1)+1];return F.buffer}static insert(b,P,M){if(b===null||b===Ti)return b;const q=xi(b),p=q.length>>>1;let F=Gi.f.findIndexInTokensArray(q,P);F>0&&q[F-1<<1]===P&&F--;for(let de=F;de<p;de++)q[de<<1]+=M;return b}}function xi(qe){return qe instanceof Uint32Array?qe:new Uint32Array(qe)}var os=f(15910);class Zi{constructor(b){this._lineTokens=[],this._len=0,this._languageIdCodec=b}flush(){this._lineTokens=[],this._len=0}getTokens(b,P,M){let q=null;if(P<this._len&&(q=this._lineTokens[P]),q!==null&&q!==Ti)return new Gi.f(xi(q),M,this._languageIdCodec);const p=new Uint32Array(2);return p[0]=M.length,p[1]=cn(this._languageIdCodec.encodeLanguageId(b)),new Gi.f(p,M,this._languageIdCodec)}static _massageTokens(b,P,M){const q=M?xi(M):null;if(P===0){let p=!1;if(q&&q.length>1&&(p=os.x.getLanguageId(q[1])!==b),!p)return Ti}if(!q||q.length===0){const p=new Uint32Array(2);return p[0]=P,p[1]=cn(b),p.buffer}return q[q.length-2]=P,q.byteOffset===0&&q.byteLength===q.buffer.byteLength?q.buffer:q}_ensureLine(b){for(;b>=this._len;)this._lineTokens[this._len]=null,this._len++}_deleteLines(b,P){P!==0&&(b+P>this._len&&(P=this._len-b),this._lineTokens.splice(b,P),this._len-=P)}_insertLines(b,P){if(P===0)return;const M=[];for(let q=0;q<P;q++)M[q]=null;this._lineTokens=I.nK(this._lineTokens,b,M),this._len+=P}setTokens(b,P,M,q,p){const F=Zi._massageTokens(this._languageIdCodec.encodeLanguageId(b),M,q);this._ensureLine(P);const de=this._lineTokens[P];return this._lineTokens[P]=F,p?!Zi._equals(de,F):!1}static _equals(b,P){if(!b||!P)return!b&&!P;const M=xi(b),q=xi(P);if(M.length!==q.length)return!1;for(let p=0,F=M.length;p<F;p++)if(M[p]!==q[p])return!1;return!0}acceptEdit(b,P,M){this._acceptDeleteRange(b),this._acceptInsertText(new S.y(b.startLineNumber,b.startColumn),P,M)}_acceptDeleteRange(b){const P=b.startLineNumber-1;if(P>=this._len)return;if(b.startLineNumber===b.endLineNumber){if(b.startColumn===b.endColumn)return;this._lineTokens[P]=es.delete(this._lineTokens[P],b.startColumn-1,b.endColumn-1);return}this._lineTokens[P]=es.deleteEnding(this._lineTokens[P],b.startColumn-1);const M=b.endLineNumber-1;let q=null;M<this._len&&(q=es.deleteBeginning(this._lineTokens[M],b.endColumn-1)),this._lineTokens[P]=es.append(this._lineTokens[P],q),this._deleteLines(b.startLineNumber,b.endLineNumber-b.startLineNumber)}_acceptInsertText(b,P,M){if(P===0&&M===0)return;const q=b.lineNumber-1;if(!(q>=this._len)){if(P===0){this._lineTokens[q]=es.insert(this._lineTokens[q],b.column-1,M);return}this._lineTokens[q]=es.deleteEnding(this._lineTokens[q],b.column-1),this._lineTokens[q]=es.insert(this._lineTokens[q],b.column-1,M),this._insertLines(b.lineNumber,P)}}}function cn(qe){return(qe<<0|0|0|32768|2<<24|1024)>>>0}class Wi{constructor(b){this._pieces=[],this._isComplete=!1,this._languageIdCodec=b}flush(){this._pieces=[],this._isComplete=!1}isEmpty(){return this._pieces.length===0}set(b,P){this._pieces=b||[],this._isComplete=P}setPartial(b,P){let M=b;if(P.length>0){const p=P[0].getRange(),F=P[P.length-1].getRange();if(!p||!F)return b;M=b.plusRange(p).plusRange(F)}let q=null;for(let p=0,F=this._pieces.length;p<F;p++){const de=this._pieces[p];if(de.endLineNumber<M.startLineNumber)continue;if(de.startLineNumber>M.endLineNumber){q=q||{index:p};break}if(de.removeTokens(M),de.isEmpty()){this._pieces.splice(p,1),p--,F--;continue}if(de.endLineNumber<M.startLineNumber)continue;if(de.startLineNumber>M.endLineNumber){q=q||{index:p};continue}const[be,ye]=de.split(M);if(be.isEmpty()){q=q||{index:p};continue}ye.isEmpty()||(this._pieces.splice(p,1,be,ye),p++,F++,q=q||{index:p})}return q=q||{index:this._pieces.length},P.length>0&&(this._pieces=I.nK(this._pieces,q.index,P)),M}isComplete(){return this._isComplete}addSparseTokens(b,P){if(P.getLineContent().length===0)return P;const M=this._pieces;if(M.length===0)return P;const q=Wi._findFirstPieceWithLine(M,b),p=M[q].getLineTokens(b);if(!p)return P;const F=P.getCount(),de=p.getCount();let be=0;const ye=[];let Me=0,He=0;const $e=(gt,wt)=>{gt!==He&&(He=gt,ye[Me++]=gt,ye[Me++]=wt)};for(let gt=0;gt<de;gt++){const wt=p.getStartCharacter(gt),It=p.getEndCharacter(gt),Pt=p.getMetadata(gt),Wt=((Pt&1?2048:0)|(Pt&2?4096:0)|(Pt&4?8192:0)|(Pt&8?16384:0)|(Pt&16?16744448:0)|(Pt&32?4278190080:0))>>>0,Xt=~Wt>>>0;for(;be<F&&P.getEndOffset(be)<=wt;)$e(P.getEndOffset(be),P.getMetadata(be)),be++;for(be<F&&P.getStartOffset(be)<wt&&$e(wt,P.getMetadata(be));be<F&&P.getEndOffset(be)<It;)$e(P.getEndOffset(be),P.getMetadata(be)&Xt|Pt&Wt),be++;if(be<F)$e(It,P.getMetadata(be)&Xt|Pt&Wt),P.getEndOffset(be)===It&&be++;else{const mi=Math.min(Math.max(0,be-1),F-1);$e(It,P.getMetadata(mi)&Xt|Pt&Wt)}}for(;be<F;)$e(P.getEndOffset(be),P.getMetadata(be)),be++;return new Gi.f(new Uint32Array(ye),P.getLineContent(),this._languageIdCodec)}static _findFirstPieceWithLine(b,P){let M=0,q=b.length-1;for(;M<q;){let p=M+Math.floor((q-M)/2);if(b[p].endLineNumber<P)M=p+1;else if(b[p].startLineNumber>P)q=p-1;else{for(;p>M&&b[p-1].startLineNumber<=P&&P<=b[p-1].endLineNumber;)p--;return p}}return M}acceptEdit(b,P,M,q,p){for(const F of this._pieces)F.acceptEdit(b,P,M,q,p)}}class vn extends gn._{constructor(b,P,M,q,p){super(),this._languageService=b,this._languageConfigurationService=P,this._textModel=M,this.bracketPairsTextModelPart=q,this._languageId=p,this._onDidChangeLanguage=this._register(new $.vl),this.onDidChangeLanguage=this._onDidChangeLanguage.event,this._onDidChangeLanguageConfiguration=this._register(new $.vl),this.onDidChangeLanguageConfiguration=this._onDidChangeLanguageConfiguration.event,this._onDidChangeTokens=this._register(new $.vl),this.onDidChangeTokens=this._onDidChangeTokens.event,this._backgroundTokenizationState=0,this._onBackgroundTokenizationStateChanged=this._register(new $.vl),this._tokens=new Zi(this._languageService.languageIdCodec),this._semanticTokens=new Wi(this._languageService.languageIdCodec),this._tokenization=new $i(M,this,this._languageService.languageIdCodec),this._languageRegistryListener=this._languageConfigurationService.onDidChange(F=>{F.affects(this._languageId)&&this._onDidChangeLanguageConfiguration.fire({})})}acceptEdit(b,P,M,q,p){this._tokens.acceptEdit(b,M,q),this._semanticTokens.acceptEdit(b,M,q,p,P.length>0?P.charCodeAt(0):0)}handleDidChangeAttached(){this._tokenization.handleDidChangeAttached()}flush(){this._tokens.flush(),this._semanticTokens.flush()}handleDidChangeContent(b){this._tokenization.handleDidChangeContent(b)}dispose(){this._languageRegistryListener.dispose(),this._tokenization.dispose(),super.dispose()}get backgroundTokenizationState(){return this._backgroundTokenizationState}handleTokenizationProgress(b){if(this._backgroundTokenizationState===2)return;const P=b?2:1;this._backgroundTokenizationState!==P&&(this._backgroundTokenizationState=P,this.bracketPairsTextModelPart.handleDidChangeBackgroundTokenizationState(),this._onBackgroundTokenizationStateChanged.fire())}setTokens(b,P=!1){if(b.length!==0){const M=[];for(let q=0,p=b.length;q<p;q++){const F=b[q];let de=0,be=0,ye=!1;for(let Me=F.startLineNumber;Me<=F.endLineNumber;Me++)ye?(this._tokens.setTokens(this._languageId,Me-1,this._textModel.getLineLength(Me),F.getLineTokens(Me),!1),be=Me):this._tokens.setTokens(this._languageId,Me-1,this._textModel.getLineLength(Me),F.getLineTokens(Me),!0)&&(ye=!0,de=Me,be=Me);ye&&M.push({fromLineNumber:de,toLineNumber:be})}M.length>0&&this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:!1,ranges:M})}this.handleTokenizationProgress(P)}setSemanticTokens(b,P){this._semanticTokens.set(b,P),this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:b!==null,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]})}hasCompleteSemanticTokens(){return this._semanticTokens.isComplete()}hasSomeSemanticTokens(){return!this._semanticTokens.isEmpty()}setPartialSemanticTokens(b,P){if(this.hasCompleteSemanticTokens())return;const M=this._textModel.validateRange(this._semanticTokens.setPartial(b,P));this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:!0,ranges:[{fromLineNumber:M.startLineNumber,toLineNumber:M.endLineNumber}]})}tokenizeViewport(b,P){b=Math.max(1,b),P=Math.min(this._textModel.getLineCount(),P),this._tokenization.tokenizeViewport(b,P)}clearTokens(){this._tokens.flush(),this._emitModelTokensChangedEvent({tokenizationSupportChanged:!0,semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]})}_emitModelTokensChangedEvent(b){this._textModel._isDisposing()||(this.bracketPairsTextModelPart.handleDidChangeTokens(b),this._onDidChangeTokens.fire(b))}resetTokenization(){this._tokenization.reset()}forceTokenization(b){if(b<1||b>this._textModel.getLineCount())throw new Error("Illegal value for lineNumber");this._tokenization.forceTokenization(b)}isCheapToTokenize(b){return this._tokenization.isCheapToTokenize(b)}tokenizeIfCheap(b){this.isCheapToTokenize(b)&&this.forceTokenization(b)}getLineTokens(b){if(b<1||b>this._textModel.getLineCount())throw new Error("Illegal value for lineNumber");return this._getLineTokens(b)}_getLineTokens(b){const P=this._textModel.getLineContent(b),M=this._tokens.getTokens(this._languageId,b-1,P);return this._semanticTokens.addSparseTokens(b,M)}getTokenTypeIfInsertingCharacter(b,P,M){const q=this._textModel.validatePosition(new S.y(b,P));return this._tokenization.getTokenTypeIfInsertingCharacter(q,M)}tokenizeLineWithEdit(b,P,M){const q=this._textModel.validatePosition(b);return this._tokenization.tokenizeLineWithEdit(q,P,M)}getLanguageConfiguration(b){return this._languageConfigurationService.getLanguageConfiguration(b)}getWordAtPosition(b){this.assertNotDisposed();const P=this._textModel.validatePosition(b),M=this._textModel.getLineContent(P.lineNumber),q=this._getLineTokens(P.lineNumber),p=q.findTokenIndexAtOffset(P.column-1),[F,de]=vn._findLanguageBoundaries(q,p),be=(0,Pi.Th)(P.column,this.getLanguageConfiguration(q.getLanguageId(p)).getWordDefinition(),M.substring(F,de),F);if(be&&be.startColumn<=b.column&&b.column<=be.endColumn)return be;if(p>0&&F===P.column-1){const[ye,Me]=vn._findLanguageBoundaries(q,p-1),He=(0,Pi.Th)(P.column,this.getLanguageConfiguration(q.getLanguageId(p-1)).getWordDefinition(),M.substring(ye,Me),ye);if(He&&He.startColumn<=b.column&&b.column<=He.endColumn)return He}return null}static _findLanguageBoundaries(b,P){const M=b.getLanguageId(P);let q=0;for(let F=P;F>=0&&b.getLanguageId(F)===M;F--)q=b.getStartOffset(F);let p=b.getLineContent().length;for(let F=P,de=b.getCount();F<de&&b.getLanguageId(F)===M;F++)p=b.getEndOffset(F);return[q,p]}getWordUntilPosition(b){const P=this.getWordAtPosition(b);return P?{word:P.word.substr(0,b.column-P.startColumn),startColumn:P.startColumn,endColumn:b.column}:{word:"",startColumn:b.column,endColumn:b.column}}getLanguageId(){return this._languageId}getLanguageIdAtPosition(b,P){const M=this._textModel.validatePosition(new S.y(b,P)),q=this.getLineTokens(M.lineNumber);return q.getLanguageId(q.findTokenIndexAtOffset(M.column-1))}setLanguageId(b){if(this._languageId===b)return;const P={oldLanguage:this._languageId,newLanguage:b};this._languageId=b,this.bracketPairsTextModelPart.handleDidChangeLanguage(P),this._tokenization.handleDidChangeLanguage(P),this._onDidChangeLanguage.fire(P),this._onDidChangeLanguageConfiguration.fire({})}}var Gn=f(83455),ws=f(38803),fn=function(qe,b,P,M){var q=arguments.length,p=q<3?b:M===null?M=Object.getOwnPropertyDescriptor(b,P):M,F;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(qe,b,P,M);else for(var de=qe.length-1;de>=0;de--)(F=qe[de])&&(p=(q<3?F(p):q>3?F(b,P,p):F(b,P))||p);return q>3&&p&&Object.defineProperty(b,P,p),p},ks=function(qe,b){return function(P,M){b(P,M,qe)}};function wn(qe){const b=new qi;return b.acceptChunk(qe),b.finish()}function yn(qe){const b=new qi;let P;for(;typeof(P=qe.read())=="string";)b.acceptChunk(P);return b.finish()}function uo(qe,b){let P;return typeof qe=="string"?P=wn(qe):D.nk(qe)?P=yn(qe):P=qe,P.create(b)}let Ms=0;const Ts=999,Et=1e4;class ls{constructor(b){this._source=b,this._eos=!1}read(){if(this._eos)return null;const b=[];let P=0,M=0;do{const q=this._source.read();if(q===null)return this._eos=!0,P===0?null:b.join("");if(q.length>0&&(b[P++]=q,M+=q.length),M>=64*1024)return b.join("")}while(!0)}}const Ss=()=>{throw new Error("Invalid change accessor")};let ts=class eg extends x.jG{constructor(b,P,M,q=null,p,F,de){super(),this._undoRedoService=p,this._languageService=F,this._languageConfigurationService=de,this._onWillDispose=this._register(new $.vl),this.onWillDispose=this._onWillDispose.event,this._onDidChangeDecorations=this._register(new fs($e=>this.handleBeforeFireDecorationsChangedEvent($e))),this.onDidChangeDecorations=this._onDidChangeDecorations.event,this._onDidChangeOptions=this._register(new $.vl),this.onDidChangeOptions=this._onDidChangeOptions.event,this._onDidChangeAttached=this._register(new $.vl),this.onDidChangeAttached=this._onDidChangeAttached.event,this._onDidChangeInjectedText=this._register(new $.vl),this._eventEmitter=this._register(new is),this._deltaDecorationCallCnt=0,Ms++,this.id="$model"+Ms,this.isForSimpleWidget=M.isForSimpleWidget,typeof q>"u"||q===null?this._associatedResource=Q.r.parse("inmemory://model/"+Ms):this._associatedResource=q,this._attachedEditorCount=0;const{textBuffer:be,disposable:ye}=uo(b,M.defaultEOL);this._buffer=be,this._bufferDisposable=ye,this._options=eg.resolveOptions(this._buffer,M),this._bracketPairs=this._register(new X(this,this._languageConfigurationService)),this._guidesTextModelPart=this._register(new De.P(this,this._languageConfigurationService)),this._decorationProvider=this._register(new lt(this)),this._tokenizationTextModelPart=new vn(this._languageService,this._languageConfigurationService,this,this._bracketPairs,P);const Me=this._buffer.getLineCount(),He=this._buffer.getValueLengthInRange(new _.Q(1,1,Me,this._buffer.getLineLength(Me)+1),0);M.largeFileOptimizations?this._isTooLargeForTokenization=He>eg.LARGE_FILE_SIZE_THRESHOLD||Me>eg.LARGE_FILE_LINE_COUNT_THRESHOLD:this._isTooLargeForTokenization=!1,this._isTooLargeForSyncing=He>eg.MODEL_SYNC_LIMIT,this._versionId=1,this._alternativeVersionId=1,this._initialUndoRedoSnapshot=null,this._isDisposed=!1,this.__isDisposing=!1,this._instanceId=ie.tk(Ms),this._lastDecorationId=0,this._decorations=Object.create(null),this._decorationsTree=new $s,this._commandManager=new Ke.z8(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()}))}static resolveOptions(b,P){if(P.detectIndentation){const M=Re(b,P.tabSize,P.insertSpaces);return new D.X2({tabSize:M.tabSize,indentSize:M.tabSize,insertSpaces:M.insertSpaces,trimAutoWhitespace:P.trimAutoWhitespace,defaultEOL:P.defaultEOL,bracketPairColorizationOptions:P.bracketPairColorizationOptions})}return new D.X2({tabSize:P.tabSize,indentSize:P.indentSize,insertSpaces:P.insertSpaces,trimAutoWhitespace:P.trimAutoWhitespace,defaultEOL:P.defaultEOL,bracketPairColorizationOptions:P.bracketPairColorizationOptions})}get onDidChangeLanguage(){return this._tokenizationTextModelPart.onDidChangeLanguage}get onDidChangeLanguageConfiguration(){return this._tokenizationTextModelPart.onDidChangeLanguageConfiguration}get onDidChangeTokens(){return this._tokenizationTextModelPart.onDidChangeTokens}onDidChangeContent(b){return this._eventEmitter.slowEvent(P=>b(P.contentChangedEvent))}onDidChangeContentOrInjectedText(b){return(0,x.qE)(this._eventEmitter.fastEvent(P=>b(P)),this._onDidChangeInjectedText.event(P=>b(P)))}_isDisposing(){return this.__isDisposing}get tokenization(){return this._tokenizationTextModelPart}get bracketPairs(){return this._bracketPairs}get guides(){return this._guidesTextModelPart}dispose(){this.__isDisposing=!0,this._onWillDispose.fire(),this._tokenizationTextModelPart.dispose(),this._isDisposed=!0,super.dispose(),this._bufferDisposable.dispose(),this.__isDisposing=!1;const b=new Ai([],"",` `,!1,!1,!0,!0);b.dispose(),this._buffer=b,this._bufferDisposable=x.jG.None}_assertNotDisposed(){if(this._isDisposed)throw new Error("Model is disposed!")}_emitContentChangedEvent(b,P){this.__isDisposing||(this._tokenizationTextModelPart.handleDidChangeContent(P),this._bracketPairs.handleDidChangeContent(P),this._eventEmitter.fire(new Gn.Ic(b,P)))}setValue(b){if(this._assertNotDisposed(),b===null)return;const{textBuffer:P,disposable:M}=uo(b,this._options.defaultEOL);this._setValueFromTextBuffer(P,M)}_createContentChanged2(b,P,M,q,p,F,de){return{changes:[{range:b,rangeOffset:P,rangeLength:M,text:q}],eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:p,isRedoing:F,isFlush:de}}_setValueFromTextBuffer(b,P){this._assertNotDisposed();const M=this.getFullModelRange(),q=this.getValueLengthInRange(M),p=this.getLineCount(),F=this.getLineMaxColumn(p);this._buffer=b,this._bufferDisposable.dispose(),this._bufferDisposable=P,this._increaseVersionId(),this._tokenizationTextModelPart.flush(),this._decorations=Object.create(null),this._decorationsTree=new $s,this._commandManager.clear(),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new Gn.HP([new Gn.Wn],this._versionId,!1,!1),this._createContentChanged2(new _.Q(1,1,p,F),0,q,this.getValue(),!1,!1,!0))}setEOL(b){this._assertNotDisposed();const P=b===1?`\r `:` `;if(this._buffer.getEOL()===P)return;const M=this.getFullModelRange(),q=this.getValueLengthInRange(M),p=this.getLineCount(),F=this.getLineMaxColumn(p);this._onBeforeEOLChange(),this._buffer.setEOL(P),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new Gn.HP([new Gn.mS],this._versionId,!1,!1),this._createContentChanged2(new _.Q(1,1,p,F),0,q,this.getValue(),!1,!1,!1))}_onBeforeEOLChange(){this._decorationsTree.ensureAllNodesHaveRanges(this)}_onAfterEOLChange(){const b=this.getVersionId(),P=this._decorationsTree.collectNodesPostOrder();for(let M=0,q=P.length;M<q;M++){const p=P[M],F=p.range,de=p.cachedAbsoluteStart-p.start,be=this._buffer.getOffsetAt(F.startLineNumber,F.startColumn),ye=this._buffer.getOffsetAt(F.endLineNumber,F.endColumn);p.cachedAbsoluteStart=be,p.cachedAbsoluteEnd=ye,p.cachedVersionId=b,p.start=be-de,p.end=ye-de,Zt(p)}}onBeforeAttached(){this._attachedEditorCount++,this._attachedEditorCount===1&&(this._tokenizationTextModelPart.handleDidChangeAttached(),this._onDidChangeAttached.fire(void 0))}onBeforeDetached(){this._attachedEditorCount--,this._attachedEditorCount===0&&(this._tokenizationTextModelPart.handleDidChangeAttached(),this._onDidChangeAttached.fire(void 0))}isAttachedToEditor(){return this._attachedEditorCount>0}getAttachedEditorCount(){return this._attachedEditorCount}isTooLargeForSyncing(){return this._isTooLargeForSyncing}isTooLargeForTokenization(){return this._isTooLargeForTokenization}isDisposed(){return this._isDisposed}isDominatedByLongLines(){if(this._assertNotDisposed(),this.isTooLargeForTokenization())return!1;let b=0,P=0;const M=this._buffer.getLineCount();for(let q=1;q<=M;q++){const p=this._buffer.getLineLength(q);p>=Et?P+=p:b+=p}return P>b}get uri(){return this._associatedResource}getOptions(){return this._assertNotDisposed(),this._options}getFormattingOptions(){return{tabSize:this._options.indentSize,insertSpaces:this._options.insertSpaces}}updateOptions(b){this._assertNotDisposed();const P=typeof b.tabSize<"u"?b.tabSize:this._options.tabSize,M=typeof b.indentSize<"u"?b.indentSize:this._options.indentSize,q=typeof b.insertSpaces<"u"?b.insertSpaces:this._options.insertSpaces,p=typeof b.trimAutoWhitespace<"u"?b.trimAutoWhitespace:this._options.trimAutoWhitespace,F=typeof b.bracketColorizationOptions<"u"?b.bracketColorizationOptions:this._options.bracketPairColorizationOptions,de=new D.X2({tabSize:P,indentSize:M,insertSpaces:q,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:p,bracketPairColorizationOptions:F});if(this._options.equals(de))return;const be=this._options.createChangeEvent(de);this._options=de,this._bracketPairs.handleDidChangeOptions(be),this._decorationProvider.handleDidChangeOptions(be),this._onDidChangeOptions.fire(be)}detectIndentation(b,P){this._assertNotDisposed();const M=Re(this._buffer,P,b);this.updateOptions({insertSpaces:M.insertSpaces,tabSize:M.tabSize,indentSize:M.tabSize})}normalizeIndentation(b){return this._assertNotDisposed(),(0,z.P)(b,this._options.indentSize,this._options.insertSpaces)}getVersionId(){return this._assertNotDisposed(),this._versionId}mightContainRTL(){return this._buffer.mightContainRTL()}mightContainUnusualLineTerminators(){return this._buffer.mightContainUnusualLineTerminators()}removeUnusualLineTerminators(b=null){const P=this.findMatches(ie._J.source,!1,!0,!1,null,!1,1073741824);this._buffer.resetMightContainUnusualLineTerminators(),this.pushEditOperations(b,P.map(M=>({range:M.range,text:null})),()=>null)}mightContainNonBasicASCII(){return this._buffer.mightContainNonBasicASCII()}getAlternativeVersionId(){return this._assertNotDisposed(),this._alternativeVersionId}getInitialUndoRedoSnapshot(){return this._assertNotDisposed(),this._initialUndoRedoSnapshot}getOffsetAt(b){this._assertNotDisposed();const P=this._validatePosition(b.lineNumber,b.column,0);return this._buffer.getOffsetAt(P.lineNumber,P.column)}getPositionAt(b){this._assertNotDisposed();const P=Math.min(this._buffer.getLength(),Math.max(0,b));return this._buffer.getPositionAt(P)}_increaseVersionId(){this._versionId=this._versionId+1,this._alternativeVersionId=this._versionId}_overwriteVersionId(b){this._versionId=b}_overwriteAlternativeVersionId(b){this._alternativeVersionId=b}_overwriteInitialUndoRedoSnapshot(b){this._initialUndoRedoSnapshot=b}getValue(b,P=!1){this._assertNotDisposed();const M=this.getFullModelRange(),q=this.getValueInRange(M,b);return P?this._buffer.getBOM()+q:q}createSnapshot(b=!1){return new ls(this._buffer.createSnapshot(b))}getValueLength(b,P=!1){this._assertNotDisposed();const M=this.getFullModelRange(),q=this.getValueLengthInRange(M,b);return P?this._buffer.getBOM().length+q:q}getValueInRange(b,P=0){return this._assertNotDisposed(),this._buffer.getValueInRange(this.validateRange(b),P)}getValueLengthInRange(b,P=0){return this._assertNotDisposed(),this._buffer.getValueLengthInRange(this.validateRange(b),P)}getCharacterCountInRange(b,P=0){return this._assertNotDisposed(),this._buffer.getCharacterCountInRange(this.validateRange(b),P)}getLineCount(){return this._assertNotDisposed(),this._buffer.getLineCount()}getLineContent(b){if(this._assertNotDisposed(),b<1||b>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineContent(b)}getLineLength(b){if(this._assertNotDisposed(),b<1||b>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(b)}getLinesContent(){return this._assertNotDisposed(),this._buffer.getLinesContent()}getEOL(){return this._assertNotDisposed(),this._buffer.getEOL()}getEndOfLineSequence(){return this._assertNotDisposed(),this._buffer.getEOL()===` `?0:1}getLineMinColumn(b){return this._assertNotDisposed(),1}getLineMaxColumn(b){if(this._assertNotDisposed(),b<1||b>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(b)+1}getLineFirstNonWhitespaceColumn(b){if(this._assertNotDisposed(),b<1||b>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(b)}getLineLastNonWhitespaceColumn(b){if(this._assertNotDisposed(),b<1||b>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(b)}_validateRangeRelaxedNoAllocations(b){const P=this._buffer.getLineCount(),M=b.startLineNumber,q=b.startColumn;let p=Math.floor(typeof M=="number"&&!isNaN(M)?M:1),F=Math.floor(typeof q=="number"&&!isNaN(q)?q:1);if(p<1)p=1,F=1;else if(p>P)p=P,F=this.getLineMaxColumn(p);else if(F<=1)F=1;else{const He=this.getLineMaxColumn(p);F>=He&&(F=He)}const de=b.endLineNumber,be=b.endColumn;let ye=Math.floor(typeof de=="number"&&!isNaN(de)?de:1),Me=Math.floor(typeof be=="number"&&!isNaN(be)?be:1);if(ye<1)ye=1,Me=1;else if(ye>P)ye=P,Me=this.getLineMaxColumn(ye);else if(Me<=1)Me=1;else{const He=this.getLineMaxColumn(ye);Me>=He&&(Me=He)}return M===p&&q===F&&de===ye&&be===Me&&b instanceof _.Q&&!(b instanceof y.L)?b:new _.Q(p,F,ye,Me)}_isValidPosition(b,P,M){if(typeof b!="number"||typeof P!="number"||isNaN(b)||isNaN(P)||b<1||P<1||(b|0)!==b||(P|0)!==P)return!1;const q=this._buffer.getLineCount();if(b>q)return!1;if(P===1)return!0;const p=this.getLineMaxColumn(b);if(P>p)return!1;if(M===1){const F=this._buffer.getLineCharCode(b,P-2);if(ie.pc(F))return!1}return!0}_validatePosition(b,P,M){const q=Math.floor(typeof b=="number"&&!isNaN(b)?b:1),p=Math.floor(typeof P=="number"&&!isNaN(P)?P:1),F=this._buffer.getLineCount();if(q<1)return new S.y(1,1);if(q>F)return new S.y(F,this.getLineMaxColumn(F));if(p<=1)return new S.y(q,1);const de=this.getLineMaxColumn(q);if(p>=de)return new S.y(q,de);if(M===1){const be=this._buffer.getLineCharCode(q,p-2);if(ie.pc(be))return new S.y(q,p-1)}return new S.y(q,p)}validatePosition(b){return this._assertNotDisposed(),b instanceof S.y&&this._isValidPosition(b.lineNumber,b.column,1)?b:this._validatePosition(b.lineNumber,b.column,1)}_isValidRange(b,P){const M=b.startLineNumber,q=b.startColumn,p=b.endLineNumber,F=b.endColumn;if(!this._isValidPosition(M,q,0)||!this._isValidPosition(p,F,0))return!1;if(P===1){const de=q>1?this._buffer.getLineCharCode(M,q-2):0,be=F>1&&F<=this._buffer.getLineLength(p)?this._buffer.getLineCharCode(p,F-2):0,ye=ie.pc(de),Me=ie.pc(be);return!ye&&!Me}return!0}validateRange(b){if(this._assertNotDisposed(),b instanceof _.Q&&!(b instanceof y.L)&&this._isValidRange(b,1))return b;const M=this._validatePosition(b.startLineNumber,b.startColumn,0),q=this._validatePosition(b.endLineNumber,b.endColumn,0),p=M.lineNumber,F=M.column,de=q.lineNumber,be=q.column;{const ye=F>1?this._buffer.getLineCharCode(p,F-2):0,Me=be>1&&be<=this._buffer.getLineLength(de)?this._buffer.getLineCharCode(de,be-2):0,He=ie.pc(ye),$e=ie.pc(Me);return!He&&!$e?new _.Q(p,F,de,be):p===de&&F===be?new _.Q(p,F-1,de,be-1):He&&$e?new _.Q(p,F-1,de,be+1):He?new _.Q(p,F-1,de,be):new _.Q(p,F,de,be+1)}return new _.Q(p,F,de,be)}modifyPosition(b,P){this._assertNotDisposed();const M=this.getOffsetAt(b)+P;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,M)))}getFullModelRange(){this._assertNotDisposed();const b=this.getLineCount();return new _.Q(1,1,b,this.getLineMaxColumn(b))}findMatchesLineByLine(b,P,M,q){return this._buffer.findMatchesLineByLine(b,P,M,q)}findMatches(b,P,M,q,p,F,de=Ts){this._assertNotDisposed();let be=null;P!==null&&(Array.isArray(P)||(P=[P]),P.every(He=>_.Q.isIRange(He))&&(be=P.map(He=>this.validateRange(He)))),be===null&&(be=[this.getFullModelRange()]),be=be.sort((He,$e)=>He.startLineNumber-$e.startLineNumber||He.startColumn-$e.startColumn);const ye=[];ye.push(be.reduce((He,$e)=>_.Q.areIntersecting(He,$e)?He.plusRange($e):(ye.push(He),$e)));let Me;if(!M&&b.indexOf(` `)<0){const $e=new Ce.lt(b,M,q,p).parseSearchRequest();if(!$e)return[];Me=gt=>this.findMatchesLineByLine(gt,$e,F,de)}else Me=He=>Ce.hB.findMatches(this,new Ce.lt(b,M,q,p),He,F,de);return ye.map(Me).reduce((He,$e)=>He.concat($e),[])}findNextMatch(b,P,M,q,p,F){this._assertNotDisposed();const de=this.validatePosition(P);if(!M&&b.indexOf(` `)<0){const ye=new Ce.lt(b,M,q,p).parseSearchRequest();if(!ye)return null;const Me=this.getLineCount();let He=new _.Q(de.lineNumber,de.column,Me,this.getLineMaxColumn(Me)),$e=this.findMatchesLineByLine(He,ye,F,1);return Ce.hB.findNextMatch(this,new Ce.lt(b,M,q,p),de,F),$e.length>0||(He=new _.Q(1,1,de.lineNumber,this.getLineMaxColumn(de.lineNumber)),$e=this.findMatchesLineByLine(He,ye,F,1),$e.length>0)?$e[0]:null}return Ce.hB.findNextMatch(this,new Ce.lt(b,M,q,p),de,F)}findPreviousMatch(b,P,M,q,p,F){this._assertNotDisposed();const de=this.validatePosition(P);return Ce.hB.findPreviousMatch(this,new Ce.lt(b,M,q,p),de,F)}pushStackElement(){this._commandManager.pushStackElement()}popStackElement(){this._commandManager.popStackElement()}pushEOL(b){if((this.getEOL()===` `?0:1)!==b)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._initialUndoRedoSnapshot===null&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEOL(b)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_validateEditOperation(b){return b instanceof D.Wo?b:new D.Wo(b.identifier||null,this.validateRange(b.range),b.text,b.forceMoveMarkers||!1,b.isAutoWhitespaceEdit||!1,b._isTracked||!1)}_validateEditOperations(b){const P=[];for(let M=0,q=b.length;M<q;M++)P[M]=this._validateEditOperation(b[M]);return P}pushEditOperations(b,P,M){try{return this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._pushEditOperations(b,this._validateEditOperations(P),M)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_pushEditOperations(b,P,M){if(this._options.trimAutoWhitespace&&this._trimAutoWhitespaceLines){const q=P.map(F=>({range:this.validateRange(F.range),text:F.text}));let p=!0;if(b)for(let F=0,de=b.length;F<de;F++){const be=b[F];let ye=!1;for(let Me=0,He=q.length;Me<He;Me++){const $e=q[Me].range,gt=$e.startLineNumber>be.endLineNumber,wt=be.startLineNumber>$e.endLineNumber;if(!gt&&!wt){ye=!0;break}}if(!ye){p=!1;break}}if(p)for(let F=0,de=this._trimAutoWhitespaceLines.length;F<de;F++){const be=this._trimAutoWhitespaceLines[F],ye=this.getLineMaxColumn(be);let Me=!0;for(let He=0,$e=q.length;He<$e;He++){const gt=q[He].range,wt=q[He].text;if(!(be<gt.startLineNumber||be>gt.endLineNumber)&&!(be===gt.startLineNumber&>.startColumn===ye&>.isEmpty()&&wt&&wt.length>0&&wt.charAt(0)===` `)&&!(be===gt.startLineNumber&>.startColumn===1&>.isEmpty()&&wt&&wt.length>0&&wt.charAt(wt.length-1)===` `)){Me=!1;break}}if(Me){const He=new _.Q(be,1,be,ye);P.push(new D.Wo(null,He,null,!1,!1,!1))}}this._trimAutoWhitespaceLines=null}return this._initialUndoRedoSnapshot===null&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEditOperation(b,P,M)}_applyUndo(b,P,M,q){const p=b.map(F=>{const de=this.getPositionAt(F.newPosition),be=this.getPositionAt(F.newEnd);return{range:new _.Q(de.lineNumber,de.column,be.lineNumber,be.column),text:F.oldText}});this._applyUndoRedoEdits(p,P,!0,!1,M,q)}_applyRedo(b,P,M,q){const p=b.map(F=>{const de=this.getPositionAt(F.oldPosition),be=this.getPositionAt(F.oldEnd);return{range:new _.Q(de.lineNumber,de.column,be.lineNumber,be.column),text:F.newText}});this._applyUndoRedoEdits(p,P,!1,!0,M,q)}_applyUndoRedoEdits(b,P,M,q,p,F){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._isUndoing=M,this._isRedoing=q,this.applyEdits(b,!1),this.setEOL(P),this._overwriteAlternativeVersionId(p)}finally{this._isUndoing=!1,this._isRedoing=!1,this._eventEmitter.endDeferredEmit(F),this._onDidChangeDecorations.endDeferredEmit()}}applyEdits(b,P=!1){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit();const M=this._validateEditOperations(b);return this._doApplyEdits(M,P)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_doApplyEdits(b,P){const M=this._buffer.getLineCount(),q=this._buffer.applyEdits(b,this._options.trimAutoWhitespace,P),p=this._buffer.getLineCount(),F=q.changes;if(this._trimAutoWhitespaceLines=q.trimAutoWhitespaceLineNumbers,F.length!==0){for(let ye=0,Me=F.length;ye<Me;ye++){const He=F[ye],[$e,gt,wt]=(0,J.W)(He.text);this._tokenizationTextModelPart.acceptEdit(He.range,He.text,$e,gt,wt),this._decorationsTree.acceptReplace(He.rangeOffset,He.rangeLength,He.text.length,He.forceMoveMarkers)}const de=[];this._increaseVersionId();let be=M;for(let ye=0,Me=F.length;ye<Me;ye++){const He=F[ye],[$e]=(0,J.W)(He.text);this._onDidChangeDecorations.fire();const gt=He.range.startLineNumber,wt=He.range.endLineNumber,It=wt-gt,Pt=$e,Wt=Math.min(It,Pt),Xt=Pt-It,mi=p-be-Xt+gt,Ii=mi,Ji=mi+Pt,In=this._decorationsTree.getInjectedTextInInterval(this,this.getOffsetAt(new S.y(Ii,1)),this.getOffsetAt(new S.y(Ji,this.getLineMaxColumn(Ji))),0),Mi=Gn.uK.fromDecorations(In),Vi=new I.j3(Mi);for(let Os=Wt;Os>=0;Os--){const bo=gt+Os,ns=mi+Os;Vi.takeFromEndWhile(go=>go.lineNumber>ns);const oo=Vi.takeFromEndWhile(go=>go.lineNumber===ns);de.push(new Gn.U0(bo,this.getLineContent(ns),oo))}if(Wt<It){const Os=gt+Wt;de.push(new Gn.E$(Os+1,wt))}if(Wt<Pt){const Os=new I.j3(Mi),bo=gt+Wt,ns=Pt-Wt,oo=p-be-ns+bo+1,go=[],Ps=[];for(let Us=0;Us<ns;Us++){const Js=oo+Us;Ps[Us]=this.getLineContent(Js),Os.takeWhile(Vs=>Vs.lineNumber<Js),go[Us]=Os.takeWhile(Vs=>Vs.lineNumber===Js)}de.push(new Gn.bg(bo+1,gt+Pt,Ps,go))}be+=Xt}this._emitContentChangedEvent(new Gn.HP(de,this.getVersionId(),this._isUndoing,this._isRedoing),{changes:F,eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:this._isUndoing,isRedoing:this._isRedoing,isFlush:!1})}return q.reverseEdits===null?void 0:q.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(b){if(b===null||b.size===0)return;const M=Array.from(b).map(q=>new Gn.U0(q,this.getLineContent(q),this._getInjectedTextInLine(q)));this._onDidChangeInjectedText.fire(new Gn.vn(M))}changeDecorations(b,P=0){this._assertNotDisposed();try{return this._onDidChangeDecorations.beginDeferredEmit(),this._changeDecorations(P,b)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_changeDecorations(b,P){const M={addDecoration:(p,F)=>this._deltaDecorationsImpl(b,[],[{range:p,options:F}])[0],changeDecoration:(p,F)=>{this._changeDecorationImpl(p,F)},changeDecorationOptions:(p,F)=>{this._changeDecorationOptionsImpl(p,Mn(F))},removeDecoration:p=>{this._deltaDecorationsImpl(b,[p],[])},deltaDecorations:(p,F)=>p.length===0&&F.length===0?[]:this._deltaDecorationsImpl(b,p,F)};let q=null;try{q=P(M)}catch(p){(0,te.dz)(p)}return M.addDecoration=Ss,M.changeDecoration=Ss,M.changeDecorationOptions=Ss,M.removeDecoration=Ss,M.deltaDecorations=Ss,q}deltaDecorations(b,P,M=0){if(this._assertNotDisposed(),b||(b=[]),b.length===0&&P.length===0)return[];try{return this._deltaDecorationCallCnt++,this._deltaDecorationCallCnt>1&&(console.warn("Invoking deltaDecorations recursively could lead to leaking decorations."),(0,te.dz)(new Error("Invoking deltaDecorations recursively could lead to leaking decorations."))),this._onDidChangeDecorations.beginDeferredEmit(),this._deltaDecorationsImpl(M,b,P)}finally{this._onDidChangeDecorations.endDeferredEmit(),this._deltaDecorationCallCnt--}}_getTrackedRange(b){return this.getDecorationRange(b)}_setTrackedRange(b,P,M){const q=b?this._decorations[b]:null;if(!q)return P?this._deltaDecorationsImpl(0,[],[{range:P,options:nn[M]}])[0]:null;if(!P)return this._decorationsTree.delete(q),delete this._decorations[q.id],null;const p=this._validateRangeRelaxedNoAllocations(P),F=this._buffer.getOffsetAt(p.startLineNumber,p.startColumn),de=this._buffer.getOffsetAt(p.endLineNumber,p.endColumn);return this._decorationsTree.delete(q),q.reset(this.getVersionId(),F,de,p),q.setOptions(nn[M]),this._decorationsTree.insert(q),q.id}removeAllDecorationsWithOwnerId(b){if(this._isDisposed)return;const P=this._decorationsTree.collectNodesFromOwner(b);for(let M=0,q=P.length;M<q;M++){const p=P[M];this._decorationsTree.delete(p),delete this._decorations[p.id]}}getDecorationOptions(b){const P=this._decorations[b];return P?P.options:null}getDecorationRange(b){const P=this._decorations[b];return P?this._decorationsTree.getNodeRange(this,P):null}getLineDecorations(b,P=0,M=!1){return b<1||b>this.getLineCount()?[]:this.getLinesDecorations(b,b,P,M)}getLinesDecorations(b,P,M=0,q=!1){const p=this.getLineCount(),F=Math.min(p,Math.max(1,b)),de=Math.min(p,Math.max(1,P)),be=this.getLineMaxColumn(de),ye=new _.Q(F,1,de,be),Me=this._getDecorationsInRange(ye,M,q);return(0,I.E4)(Me,this._decorationProvider.getDecorationsInRange(ye,M,q)),Me}getDecorationsInRange(b,P=0,M=!1){const q=this.validateRange(b),p=this._getDecorationsInRange(q,P,M);return(0,I.E4)(p,this._decorationProvider.getDecorationsInRange(q,P,M)),p}getOverviewRulerDecorations(b=0,P=!1){return this._decorationsTree.getAll(this,b,P,!0)}getInjectedTextDecorations(b=0){return this._decorationsTree.getAllInjectedText(this,b)}_getInjectedTextInLine(b){const P=this._buffer.getOffsetAt(b,1),M=P+this._buffer.getLineLength(b),q=this._decorationsTree.getInjectedTextInInterval(this,P,M,0);return Gn.uK.fromDecorations(q).filter(p=>p.lineNumber===b)}getAllDecorations(b=0,P=!1){let M=this._decorationsTree.getAll(this,b,P,!1);return M=M.concat(this._decorationProvider.getAllDecorations(b,P)),M}_getDecorationsInRange(b,P,M){const q=this._buffer.getOffsetAt(b.startLineNumber,b.startColumn),p=this._buffer.getOffsetAt(b.endLineNumber,b.endColumn);return this._decorationsTree.getAllInInterval(this,q,p,P,M)}getRangeAt(b,P){return this._buffer.getRangeAt(b,P-b)}_changeDecorationImpl(b,P){const M=this._decorations[b];if(!M)return;if(M.options.after){const de=this.getDecorationRange(b);this._onDidChangeDecorations.recordLineAffectedByInjectedText(de.endLineNumber)}if(M.options.before){const de=this.getDecorationRange(b);this._onDidChangeDecorations.recordLineAffectedByInjectedText(de.startLineNumber)}const q=this._validateRangeRelaxedNoAllocations(P),p=this._buffer.getOffsetAt(q.startLineNumber,q.startColumn),F=this._buffer.getOffsetAt(q.endLineNumber,q.endColumn);this._decorationsTree.delete(M),M.reset(this.getVersionId(),p,F,q),this._decorationsTree.insert(M),this._onDidChangeDecorations.checkAffectedAndFire(M.options),M.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(q.endLineNumber),M.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(q.startLineNumber)}_changeDecorationOptionsImpl(b,P){const M=this._decorations[b];if(!M)return;const q=!!(M.options.overviewRuler&&M.options.overviewRuler.color),p=!!(P.overviewRuler&&P.overviewRuler.color);if(this._onDidChangeDecorations.checkAffectedAndFire(M.options),this._onDidChangeDecorations.checkAffectedAndFire(P),M.options.after||P.after){const F=this._decorationsTree.getNodeRange(this,M);this._onDidChangeDecorations.recordLineAffectedByInjectedText(F.endLineNumber)}if(M.options.before||P.before){const F=this._decorationsTree.getNodeRange(this,M);this._onDidChangeDecorations.recordLineAffectedByInjectedText(F.startLineNumber)}q!==p?(this._decorationsTree.delete(M),M.setOptions(P),this._decorationsTree.insert(M)):M.setOptions(P)}_deltaDecorationsImpl(b,P,M){const q=this.getVersionId(),p=P.length;let F=0;const de=M.length;let be=0;const ye=new Array(de);for(;F<p||be<de;){let Me=null;if(F<p){do Me=this._decorations[P[F++]];while(!Me&&F<p);if(Me){if(Me.options.after){const He=this._decorationsTree.getNodeRange(this,Me);this._onDidChangeDecorations.recordLineAffectedByInjectedText(He.endLineNumber)}if(Me.options.before){const He=this._decorationsTree.getNodeRange(this,Me);this._onDidChangeDecorations.recordLineAffectedByInjectedText(He.startLineNumber)}this._decorationsTree.delete(Me),this._onDidChangeDecorations.checkAffectedAndFire(Me.options)}}if(be<de){if(!Me){const Pt=++this._lastDecorationId,Wt=`${this._instanceId};${Pt}`;Me=new pt(Wt,0,0),this._decorations[Wt]=Me}const He=M[be],$e=this._validateRangeRelaxedNoAllocations(He.range),gt=Mn(He.options),wt=this._buffer.getOffsetAt($e.startLineNumber,$e.startColumn),It=this._buffer.getOffsetAt($e.endLineNumber,$e.endColumn);Me.ownerId=b,Me.reset(q,wt,It,$e),Me.setOptions(gt),Me.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText($e.endLineNumber),Me.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText($e.startLineNumber),this._onDidChangeDecorations.checkAffectedAndFire(gt),this._decorationsTree.insert(Me),ye[be]=Me.id,be++}else Me&&delete this._decorations[Me.id]}return ye}getLanguageId(){return this.tokenization.getLanguageId()}setMode(b){this.tokenization.setLanguageId(b)}getLanguageIdAtPosition(b,P){return this.tokenization.getLanguageIdAtPosition(b,P)}getWordAtPosition(b){return this._tokenizationTextModelPart.getWordAtPosition(b)}getWordUntilPosition(b){return this._tokenizationTextModelPart.getWordUntilPosition(b)}normalizePosition(b,P){return b}getLineIndentColumn(b){return zs(this.getLineContent(b))+1}};ts.MODEL_SYNC_LIMIT=50*1024*1024,ts.LARGE_FILE_SIZE_THRESHOLD=20*1024*1024,ts.LARGE_FILE_LINE_COUNT_THRESHOLD=300*1e3,ts.DEFAULT_CREATION_OPTIONS={isForSimpleWidget:!1,tabSize:C.R.tabSize,indentSize:C.R.indentSize,insertSpaces:C.R.insertSpaces,detectIndentation:!1,defaultEOL:1,trimAutoWhitespace:C.R.trimAutoWhitespace,largeFileOptimizations:C.R.largeFileOptimizations,bracketPairColorizationOptions:C.R.bracketPairColorizationOptions},ts=fn([ks(4,ws.$D),ks(5,d.L),ks(6,w.JZ)],ts);function zs(qe){let b=0;for(const P of qe)if(P===" "||P===" ")b++;else break;return b}function vs(qe){return!!(qe.options.overviewRuler&&qe.options.overviewRuler.color)}function As(qe){return!!qe.options.after||!!qe.options.before}class $s{constructor(){this._decorationsTree0=new zt,this._decorationsTree1=new zt,this._injectedTextDecorationsTree=new zt}ensureAllNodesHaveRanges(b){this.getAll(b,0,!1,!1)}_ensureNodesHaveRanges(b,P){for(const M of P)M.range===null&&(M.range=b.getRangeAt(M.cachedAbsoluteStart,M.cachedAbsoluteEnd));return P}getAllInInterval(b,P,M,q,p){const F=b.getVersionId(),de=this._intervalSearch(P,M,q,p,F);return this._ensureNodesHaveRanges(b,de)}_intervalSearch(b,P,M,q,p){const F=this._decorationsTree0.intervalSearch(b,P,M,q,p),de=this._decorationsTree1.intervalSearch(b,P,M,q,p),be=this._injectedTextDecorationsTree.intervalSearch(b,P,M,q,p);return F.concat(de).concat(be)}getInjectedTextInInterval(b,P,M,q){const p=b.getVersionId(),F=this._injectedTextDecorationsTree.intervalSearch(P,M,q,!1,p);return this._ensureNodesHaveRanges(b,F).filter(de=>de.options.showIfCollapsed||!de.range.isEmpty())}getAllInjectedText(b,P){const M=b.getVersionId(),q=this._injectedTextDecorationsTree.search(P,!1,M);return this._ensureNodesHaveRanges(b,q).filter(p=>p.options.showIfCollapsed||!p.range.isEmpty())}getAll(b,P,M,q){const p=b.getVersionId(),F=this._search(P,M,q,p);return this._ensureNodesHaveRanges(b,F)}_search(b,P,M,q){if(M)return this._decorationsTree1.search(b,P,q);{const p=this._decorationsTree0.search(b,P,q),F=this._decorationsTree1.search(b,P,q),de=this._injectedTextDecorationsTree.search(b,P,q);return p.concat(F).concat(de)}}collectNodesFromOwner(b){const P=this._decorationsTree0.collectNodesFromOwner(b),M=this._decorationsTree1.collectNodesFromOwner(b),q=this._injectedTextDecorationsTree.collectNodesFromOwner(b);return P.concat(M).concat(q)}collectNodesPostOrder(){const b=this._decorationsTree0.collectNodesPostOrder(),P=this._decorationsTree1.collectNodesPostOrder(),M=this._injectedTextDecorationsTree.collectNodesPostOrder();return b.concat(P).concat(M)}insert(b){As(b)?this._injectedTextDecorationsTree.insert(b):vs(b)?this._decorationsTree1.insert(b):this._decorationsTree0.insert(b)}delete(b){As(b)?this._injectedTextDecorationsTree.delete(b):vs(b)?this._decorationsTree1.delete(b):this._decorationsTree0.delete(b)}getNodeRange(b,P){const M=b.getVersionId();return P.cachedVersionId!==M&&this._resolveNode(P,M),P.range===null&&(P.range=b.getRangeAt(P.cachedAbsoluteStart,P.cachedAbsoluteEnd)),P.range}_resolveNode(b,P){As(b)?this._injectedTextDecorationsTree.resolveNode(b,P):vs(b)?this._decorationsTree1.resolveNode(b,P):this._decorationsTree0.resolveNode(b,P)}acceptReplace(b,P,M,q){this._decorationsTree0.acceptReplace(b,P,M,q),this._decorationsTree1.acceptReplace(b,P,M,q),this._injectedTextDecorationsTree.acceptReplace(b,P,M,q)}}function Gs(qe){return qe.replace(/[^a-z0-9\-_]/gi," ")}class rs{constructor(b){this.color=b.color||"",this.darkColor=b.darkColor||""}}class Bn extends rs{constructor(b){super(b),this._resolvedColor=null,this.position=typeof b.position=="number"?b.position:D.A5.Center}getColor(b){return this._resolvedColor||(b.type!=="light"&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,b):this._resolvedColor=this._resolveColor(this.color,b)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=null}_resolveColor(b,P){if(typeof b=="string")return b;const M=b?P.getColor(b.id):null;return M?M.toString():""}}class mn extends rs{constructor(b){super(b),this.position=b.position}getColor(b){return this._resolvedColor||(b.type!=="light"&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,b):this._resolvedColor=this._resolveColor(this.color,b)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=void 0}_resolveColor(b,P){return typeof b=="string"?h.Q1.fromHex(b):P.getColor(b.id)}}class Kt{constructor(b){this.content=b.content||"",this.inlineClassName=b.inlineClassName||null,this.inlineClassNameAffectsLetterSpacing=b.inlineClassNameAffectsLetterSpacing||!1,this.attachedData=b.attachedData||null,this.cursorStops=b.cursorStops||null}static from(b){return b instanceof Kt?b:new Kt(b)}}class Ri{constructor(b){var P,M;this.description=b.description,this.blockClassName=b.blockClassName?Gs(b.blockClassName):null,this.stickiness=b.stickiness||0,this.zIndex=b.zIndex||0,this.className=b.className?Gs(b.className):null,this.hoverMessage=b.hoverMessage||null,this.glyphMarginHoverMessage=b.glyphMarginHoverMessage||null,this.isWholeLine=b.isWholeLine||!1,this.showIfCollapsed=b.showIfCollapsed||!1,this.collapseOnReplaceEdit=b.collapseOnReplaceEdit||!1,this.overviewRuler=b.overviewRuler?new Bn(b.overviewRuler):null,this.minimap=b.minimap?new mn(b.minimap):null,this.glyphMarginClassName=b.glyphMarginClassName?Gs(b.glyphMarginClassName):null,this.linesDecorationsClassName=b.linesDecorationsClassName?Gs(b.linesDecorationsClassName):null,this.firstLineDecorationClassName=b.firstLineDecorationClassName?Gs(b.firstLineDecorationClassName):null,this.marginClassName=b.marginClassName?Gs(b.marginClassName):null,this.inlineClassName=b.inlineClassName?Gs(b.inlineClassName):null,this.inlineClassNameAffectsLetterSpacing=b.inlineClassNameAffectsLetterSpacing||!1,this.beforeContentClassName=b.beforeContentClassName?Gs(b.beforeContentClassName):null,this.afterContentClassName=b.afterContentClassName?Gs(b.afterContentClassName):null,this.after=b.after?Kt.from(b.after):null,this.before=b.before?Kt.from(b.before):null,this.hideInCommentTokens=(P=b.hideInCommentTokens)!==null&&P!==void 0?P:!1,this.hideInStringTokens=(M=b.hideInStringTokens)!==null&&M!==void 0?M:!1}static register(b){return new Ri(b)}static createDynamic(b){return new Ri(b)}}Ri.EMPTY=Ri.register({description:"empty"});const nn=[Ri.register({description:"tracked-range-always-grows-when-typing-at-edges",stickiness:0}),Ri.register({description:"tracked-range-never-grows-when-typing-at-edges",stickiness:1}),Ri.register({description:"tracked-range-grows-only-when-typing-before",stickiness:2}),Ri.register({description:"tracked-range-grows-only-when-typing-after",stickiness:3})];function Mn(qe){return qe instanceof Ri?qe:Ri.createDynamic(qe)}class fs extends x.jG{constructor(b){super(),this.handleBeforeFire=b,this._actual=this._register(new $.vl),this.event=this._actual.event,this._affectedInjectedTextLines=null,this._deferredCnt=0,this._shouldFire=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(){var b;if(this._deferredCnt--,this._deferredCnt===0){if(this._shouldFire){this.handleBeforeFire(this._affectedInjectedTextLines);const P={affectsMinimap:this._affectsMinimap,affectsOverviewRuler:this._affectsOverviewRuler};this._shouldFire=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._actual.fire(P)}(b=this._affectedInjectedTextLines)===null||b===void 0||b.clear(),this._affectedInjectedTextLines=null}}recordLineAffectedByInjectedText(b){this._affectedInjectedTextLines||(this._affectedInjectedTextLines=new Set),this._affectedInjectedTextLines.add(b)}checkAffectedAndFire(b){this._affectsMinimap||(this._affectsMinimap=!!(b.minimap&&b.minimap.position)),this._affectsOverviewRuler||(this._affectsOverviewRuler=!!(b.overviewRuler&&b.overviewRuler.color)),this._shouldFire=!0}fire(){this._affectsMinimap=!0,this._affectsOverviewRuler=!0,this._shouldFire=!0}}class is extends x.jG{constructor(){super(),this._fastEmitter=this._register(new $.vl),this.fastEvent=this._fastEmitter.event,this._slowEmitter=this._register(new $.vl),this.slowEvent=this._slowEmitter.event,this._deferredCnt=0,this._deferredEvent=null}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(b=null){if(this._deferredCnt--,this._deferredCnt===0&&this._deferredEvent!==null){this._deferredEvent.rawContentChangedEvent.resultingSelection=b;const P=this._deferredEvent;this._deferredEvent=null,this._fastEmitter.fire(P),this._slowEmitter.fire(P)}}fire(b){if(this._deferredCnt>0){this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(b):this._deferredEvent=b;return}this._fastEmitter.fire(b),this._slowEmitter.fire(b)}}},32177:(Tt,Fe,f)=>{f.d(Fe,{_:()=>h});var I=f(10998);class h extends I.jG{constructor(){super(...arguments),this._isDisposed=!1}dispose(){super.dispose(),this._isDisposed=!0}assertNotDisposed(){if(this._isDisposed)throw new Error("TextModelPart is disposed!")}}},104:(Tt,Fe,f)=>{f.d(Fe,{W5:()=>w,dr:()=>z,hB:()=>_,lt:()=>Q,wC:()=>d});var I=f(16844),h=f(82862),te=f(15365),$=f(28061),x=f(66055);const ie=999;class Q{constructor(L,k,j,N){this.searchString=L,this.isRegex=k,this.matchCase=j,this.wordSeparators=N}parseSearchRequest(){if(this.searchString==="")return null;let L;this.isRegex?L=J(this.searchString):L=this.searchString.indexOf(` `)>=0;let k=null;try{k=I.OS(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:L,global:!0,unicode:!0})}catch{return null}if(!k)return null;let j=!this.isRegex&&!L;return j&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(j=this.matchCase),new x.L5(k,this.wordSeparators?(0,h.i)(this.wordSeparators):null,j?this.searchString:null)}}function J(D){if(!D||D.length===0)return!1;for(let L=0,k=D.length;L<k;L++){const j=D.charCodeAt(L);if(j===10)return!0;if(j===92){if(L++,L>=k)break;const N=D.charCodeAt(L);if(N===110||N===114||N===87)return!0}}return!1}function z(D,L,k){if(!k)return new x.Dg(D,null);const j=[];for(let N=0,B=L.length;N<B;N++)j[N]=L[N];return new x.Dg(D,j)}class S{constructor(L){const k=[];let j=0;for(let N=0,B=L.length;N<B;N++)L.charCodeAt(N)===10&&(k[j++]=N);this._lineFeedsOffsets=k}findLineFeedCountBeforeOffset(L){const k=this._lineFeedsOffsets;let j=0,N=k.length-1;if(N===-1||L<=k[0])return 0;for(;j<N;){const B=j+((N-j)/2>>0);k[B]>=L?N=B-1:k[B+1]>=L?(j=B,N=B):j=B+1}return j+1}}class _{static findMatches(L,k,j,N,B){const T=k.parseSearchRequest();return T?T.regex.multiline?this._doFindMatchesMultiline(L,j,new w(T.wordSeparators,T.regex),N,B):this._doFindMatchesLineByLine(L,j,T,N,B):[]}static _getMultilineMatchRange(L,k,j,N,B,T){let H,Y=0;N?(Y=N.findLineFeedCountBeforeOffset(B),H=k+B+Y):H=k+B;let ee;if(N){const fe=N.findLineFeedCountBeforeOffset(B+T.length)-Y;ee=H+T.length+fe}else ee=H+T.length;const ce=L.getPositionAt(H),pe=L.getPositionAt(ee);return new $.Q(ce.lineNumber,ce.column,pe.lineNumber,pe.column)}static _doFindMatchesMultiline(L,k,j,N,B){const T=L.getOffsetAt(k.getStartPosition()),H=L.getValueInRange(k,1),Y=L.getEOL()===`\r `?new S(H):null,ee=[];let ce=0,pe;for(j.reset(0);pe=j.next(H);)if(ee[ce++]=z(this._getMultilineMatchRange(L,T,H,Y,pe.index,pe[0]),pe,N),ce>=B)return ee;return ee}static _doFindMatchesLineByLine(L,k,j,N,B){const T=[];let H=0;if(k.startLineNumber===k.endLineNumber){const ee=L.getLineContent(k.startLineNumber).substring(k.startColumn-1,k.endColumn-1);return H=this._findMatchesInLine(j,ee,k.startLineNumber,k.startColumn-1,H,T,N,B),T}const Y=L.getLineContent(k.startLineNumber).substring(k.startColumn-1);H=this._findMatchesInLine(j,Y,k.startLineNumber,k.startColumn-1,H,T,N,B);for(let ee=k.startLineNumber+1;ee<k.endLineNumber&&H<B;ee++)H=this._findMatchesInLine(j,L.getLineContent(ee),ee,0,H,T,N,B);if(H<B){const ee=L.getLineContent(k.endLineNumber).substring(0,k.endColumn-1);H=this._findMatchesInLine(j,ee,k.endLineNumber,0,H,T,N,B)}return T}static _findMatchesInLine(L,k,j,N,B,T,H,Y){const ee=L.wordSeparators;if(!H&&L.simpleSearch){const ge=L.simpleSearch,fe=ge.length,oe=k.length;let Z=-fe;for(;(Z=k.indexOf(ge,Z+fe))!==-1;)if((!ee||d(ee,k,oe,Z,fe))&&(T[B++]=new x.Dg(new $.Q(j,Z+1+N,j,Z+1+fe+N),null),B>=Y))return B;return B}const ce=new w(L.wordSeparators,L.regex);let pe;ce.reset(0);do if(pe=ce.next(k),pe&&(T[B++]=z(new $.Q(j,pe.index+1+N,j,pe.index+1+pe[0].length+N),pe,H),B>=Y))return B;while(pe);return B}static findNextMatch(L,k,j,N){const B=k.parseSearchRequest();if(!B)return null;const T=new w(B.wordSeparators,B.regex);return B.regex.multiline?this._doFindNextMatchMultiline(L,j,T,N):this._doFindNextMatchLineByLine(L,j,T,N)}static _doFindNextMatchMultiline(L,k,j,N){const B=new te.y(k.lineNumber,1),T=L.getOffsetAt(B),H=L.getLineCount(),Y=L.getValueInRange(new $.Q(B.lineNumber,B.column,H,L.getLineMaxColumn(H)),1),ee=L.getEOL()===`\r `?new S(Y):null;j.reset(k.column-1);const ce=j.next(Y);return ce?z(this._getMultilineMatchRange(L,T,Y,ee,ce.index,ce[0]),ce,N):k.lineNumber!==1||k.column!==1?this._doFindNextMatchMultiline(L,new te.y(1,1),j,N):null}static _doFindNextMatchLineByLine(L,k,j,N){const B=L.getLineCount(),T=k.lineNumber,H=L.getLineContent(T),Y=this._findFirstMatchInLine(j,H,T,k.column,N);if(Y)return Y;for(let ee=1;ee<=B;ee++){const ce=(T+ee-1)%B,pe=L.getLineContent(ce+1),ge=this._findFirstMatchInLine(j,pe,ce+1,1,N);if(ge)return ge}return null}static _findFirstMatchInLine(L,k,j,N,B){L.reset(N-1);const T=L.next(k);return T?z(new $.Q(j,T.index+1,j,T.index+1+T[0].length),T,B):null}static findPreviousMatch(L,k,j,N){const B=k.parseSearchRequest();if(!B)return null;const T=new w(B.wordSeparators,B.regex);return B.regex.multiline?this._doFindPreviousMatchMultiline(L,j,T,N):this._doFindPreviousMatchLineByLine(L,j,T,N)}static _doFindPreviousMatchMultiline(L,k,j,N){const B=this._doFindMatchesMultiline(L,new $.Q(1,1,k.lineNumber,k.column),j,N,10*ie);if(B.length>0)return B[B.length-1];const T=L.getLineCount();return k.lineNumber!==T||k.column!==L.getLineMaxColumn(T)?this._doFindPreviousMatchMultiline(L,new te.y(T,L.getLineMaxColumn(T)),j,N):null}static _doFindPreviousMatchLineByLine(L,k,j,N){const B=L.getLineCount(),T=k.lineNumber,H=L.getLineContent(T).substring(0,k.column-1),Y=this._findLastMatchInLine(j,H,T,N);if(Y)return Y;for(let ee=1;ee<=B;ee++){const ce=(B+T-ee-1)%B,pe=L.getLineContent(ce+1),ge=this._findLastMatchInLine(j,pe,ce+1,N);if(ge)return ge}return null}static _findLastMatchInLine(L,k,j,N){let B=null,T;for(L.reset(0);T=L.next(k);)B=z(new $.Q(j,T.index+1,j,T.index+1+T[0].length),T,N);return B}}function y(D,L,k,j,N){if(j===0)return!0;const B=L.charCodeAt(j-1);if(D.get(B)!==0||B===13||B===10)return!0;if(N>0){const T=L.charCodeAt(j);if(D.get(T)!==0)return!0}return!1}function C(D,L,k,j,N){if(j+N===k)return!0;const B=L.charCodeAt(j+N);if(D.get(B)!==0||B===13||B===10)return!0;if(N>0){const T=L.charCodeAt(j+N-1);if(D.get(T)!==0)return!0}return!1}function d(D,L,k,j,N){return y(D,L,k,j,N)&&C(D,L,k,j,N)}class w{constructor(L,k){this._wordSeparators=L,this._searchRegex=k,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(L){this._searchRegex.lastIndex=L,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(L){const k=L.length;let j;do{if(this._prevMatchStartIndex+this._prevMatchLength===k||(j=this._searchRegex.exec(L),!j))return null;const N=j.index,B=j[0].length;if(N===this._prevMatchStartIndex&&B===this._prevMatchLength){if(B===0){I.Z5(L,k,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=N,this._prevMatchLength=B,!this._wordSeparators||d(this._wordSeparators,L,k,N,B))return j}while(j);return null}}},50969:(Tt,Fe,f)=>{f.d(Fe,{G:()=>I});function I(h,te){let $=0,x=0;const ie=h.length;for(;x<ie;){const Q=h.charCodeAt(x);if(Q===32)$++;else if(Q===9)$=$-$%te+te;else break;x++}return x===ie?-1:$}},90304:(Tt,Fe,f)=>{f.d(Fe,{w:()=>te});var I=f(82399);const h="editorWorkerService",te=(0,I.u1)(h)},52677:(Tt,Fe,f)=>{f.d(Fe,{nZ:()=>ce,aw:()=>B,WG:()=>Y,br:()=>j,BB:()=>D,yS:()=>L});var I=f(78903),h=f(94327),te=f(37264),$=f(64830),x=f(59715),ie=f(79359),Q=f(42802),J=f(63339);function z(pe){for(let ge=0,fe=pe.length;ge<fe;ge+=4){const oe=pe[ge+0],Z=pe[ge+1],le=pe[ge+2],se=pe[ge+3];pe[ge+0]=se,pe[ge+1]=le,pe[ge+2]=Z,pe[ge+3]=oe}}function S(pe){const ge=new Uint8Array(pe.buffer,pe.byteOffset,pe.length*4);return J.cm()||z(ge),Q.MB.wrap(ge)}function _(pe){const ge=new Uint32Array(y(pe));let fe=0;if(ge[fe++]=pe.id,pe.type==="full")ge[fe++]=1,ge[fe++]=pe.data.length,ge.set(pe.data,fe),fe+=pe.data.length;else{ge[fe++]=2,ge[fe++]=pe.deltas.length;for(const oe of pe.deltas)ge[fe++]=oe.start,ge[fe++]=oe.deleteCount,oe.data?(ge[fe++]=oe.data.length,ge.set(oe.data,fe),fe+=oe.data.length):ge[fe++]=0}return S(ge)}function y(pe){let ge=0;if(ge+=1+1,pe.type==="full")ge+=1+pe.data.length;else{ge+=1,ge+=(1+1+1)*pe.deltas.length;for(const fe of pe.deltas)fe.data&&(ge+=fe.data.length)}return ge}var C=f(28061),d=f(52230),w=function(pe,ge,fe,oe){function Z(le){return le instanceof fe?le:new fe(function(se){se(le)})}return new(fe||(fe=Promise))(function(le,se){function X(ve){try{he(oe.next(ve))}catch(Ee){se(Ee)}}function K(ve){try{he(oe.throw(ve))}catch(Ee){se(Ee)}}function he(ve){ve.done?le(ve.value):Z(ve.value).then(X,K)}he((oe=oe.apply(pe,ge||[])).next())})};function D(pe){return pe&&!!pe.data}function L(pe){return pe&&Array.isArray(pe.edits)}class k{constructor(ge,fe,oe){this.provider=ge,this.tokens=fe,this.error=oe}}function j(pe,ge){return pe.has(ge)}function N(pe,ge){const fe=pe.orderedGroups(ge);return fe.length>0?fe[0]:[]}function B(pe,ge,fe,oe,Z){return w(this,void 0,void 0,function*(){const le=N(pe,ge),se=yield Promise.all(le.map(X=>w(this,void 0,void 0,function*(){let K,he=null;try{K=yield X.provideDocumentSemanticTokens(ge,X===fe?oe:null,Z)}catch(ve){he=ve,K=null}return(!K||!D(K)&&!L(K))&&(K=null),new k(X,K,he)})));for(const X of se){if(X.error)throw X.error;if(X.tokens)return X}return se.length>0?se[0]:null})}function T(pe,ge){const fe=pe.orderedGroups(ge);return fe.length>0?fe[0]:null}class H{constructor(ge,fe){this.provider=ge,this.tokens=fe}}function Y(pe,ge){return pe.has(ge)}function ee(pe,ge){const fe=pe.orderedGroups(ge);return fe.length>0?fe[0]:[]}function ce(pe,ge,fe,oe){return w(this,void 0,void 0,function*(){const Z=ee(pe,ge),le=yield Promise.all(Z.map(se=>w(this,void 0,void 0,function*(){let X;try{X=yield se.provideDocumentRangeSemanticTokens(ge,fe,oe)}catch(K){(0,h.M_)(K),X=null}return(!X||!D(X))&&(X=null),new H(se,X)})));for(const se of le)if(se.tokens)return se;return le.length>0?le[0]:null})}x.wb.registerCommand("_provideDocumentSemanticTokensLegend",(pe,...ge)=>w(void 0,void 0,void 0,function*(){const[fe]=ge;(0,ie.j)(fe instanceof te.r);const oe=pe.get($.S).getModel(fe);if(!oe)return;const{documentSemanticTokensProvider:Z}=pe.get(d.u),le=T(Z,oe);return le?le[0].getLegend():pe.get(x.wT).executeCommand("_provideDocumentRangeSemanticTokensLegend",fe)})),x.wb.registerCommand("_provideDocumentSemanticTokens",(pe,...ge)=>w(void 0,void 0,void 0,function*(){const[fe]=ge;(0,ie.j)(fe instanceof te.r);const oe=pe.get($.S).getModel(fe);if(!oe)return;const{documentSemanticTokensProvider:Z}=pe.get(d.u);if(!j(Z,oe))return pe.get(x.wT).executeCommand("_provideDocumentRangeSemanticTokens",fe,oe.getFullModelRange());const le=yield B(Z,oe,null,null,I.X.None);if(!le)return;const{provider:se,tokens:X}=le;if(!X||!D(X))return;const K=_({id:0,type:"full",data:X.data});return X.resultId&&se.releaseDocumentSemanticTokens(X.resultId),K})),x.wb.registerCommand("_provideDocumentRangeSemanticTokensLegend",(pe,...ge)=>w(void 0,void 0,void 0,function*(){const[fe,oe]=ge;(0,ie.j)(fe instanceof te.r);const Z=pe.get($.S).getModel(fe);if(!Z)return;const{documentRangeSemanticTokensProvider:le}=pe.get(d.u),se=ee(le,Z);if(se.length===0)return;if(se.length===1)return se[0].getLegend();if(!oe||!C.Q.isIRange(oe))return console.warn("provideDocumentRangeSemanticTokensLegend might be out-of-sync with provideDocumentRangeSemanticTokens unless a range argument is passed in"),se[0].getLegend();const X=yield ce(le,Z,C.Q.lift(oe),I.X.None);if(X)return X.provider.getLegend()})),x.wb.registerCommand("_provideDocumentRangeSemanticTokens",(pe,...ge)=>w(void 0,void 0,void 0,function*(){const[fe,oe]=ge;(0,ie.j)(fe instanceof te.r),(0,ie.j)(C.Q.isIRange(oe));const Z=pe.get($.S).getModel(fe);if(!Z)return;const{documentRangeSemanticTokensProvider:le}=pe.get(d.u),se=yield ce(le,Z,C.Q.lift(oe),I.X.None);if(!(!se||!se.tokens))return _({id:0,type:"full",data:se.tokens.data})}))},12060:(Tt,Fe,f)=>{f.d(Fe,{U:()=>S});var I=f(22344),h=f(27992),te=f(62992),$=f(66726),x=f(82399),ie=f(46441),Q=f(54435),J=function(d,w,D,L){var k=arguments.length,j=k<3?w:L===null?L=Object.getOwnPropertyDescriptor(w,D):L,N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(d,w,D,L);else for(var B=d.length-1;B>=0;B--)(N=d[B])&&(j=(k<3?N(j):k>3?N(w,D,j):N(w,D))||j);return k>3&&j&&Object.defineProperty(w,D,j),j},z=function(d,w){return function(D,L){w(D,L,d)}};const S=(0,x.u1)("ILanguageFeatureDebounceService");var _;(function(d){const w=new WeakMap;let D=0;function L(k){let j=w.get(k);return j===void 0&&(j=++D,w.set(k,j)),j}d.of=L})(_||(_={}));class y{constructor(w,D,L,k,j,N){this._logService=w,this._name=D,this._registry=L,this._default=k,this._min=j,this._max=N,this._cache=new h.qK(50,.7)}_key(w){return w.id+this._registry.all(w).reduce((D,L)=>(0,I.sN)(_.of(L),D),0)}get(w){const D=this._key(w),L=this._cache.get(D);return L?(0,te.qE)(L.value,this._min,this._max):this.default()}update(w,D){const L=this._key(w);let k=this._cache.get(L);k||(k=new te.mu(6),this._cache.set(L,k));const j=(0,te.qE)(k.update(D),this._min,this._max);return(0,Q.v$)(w.uri,"output")||this._logService.trace(`[DEBOUNCE: ${this._name}] for ${w.uri.toString()} is ${j}ms`),j}_overall(){const w=new te.Uq;for(const[,D]of this._cache)w.update(D.value);return w.value}default(){const w=this._overall()|0||this._default;return(0,te.qE)(w,this._min,this._max)}}let C=class{constructor(w){this._logService=w,this._data=new Map}for(w,D,L){var k,j,N;const B=(k=L?.min)!==null&&k!==void 0?k:50,T=(j=L?.max)!==null&&j!==void 0?j:Math.pow(B,2),H=(N=L?.key)!==null&&N!==void 0?N:void 0,Y=`${_.of(w)},${B}${H?","+H:""}`;let ee=this._data.get(Y);return ee||(ee=new y(this._logService,D,w,this._overallAverage()|0||B*1.5,B,T),this._data.set(Y,ee)),ee}_overallAverage(){const w=new te.Uq;for(const D of this._data.values())w.update(D.default());return w.value}};C=J([z(0,ie.rr)],C),(0,$.v)(S,C,!0)},52230:(Tt,Fe,f)=>{f.d(Fe,{u:()=>h});var I=f(82399);const h=(0,I.u1)("ILanguageFeaturesService")},80886:(Tt,Fe,f)=>{f.d(Fe,{A:()=>h});var I=f(82399);const h=(0,I.u1)("markerDecorationsService")},64830:(Tt,Fe,f)=>{f.d(Fe,{S:()=>h});var I=f(82399);const h=(0,I.u1)("modelService")},40931:(Tt,Fe,f)=>{f.d(Fe,{JW:()=>X,r8:()=>K,rT:()=>he});var I=f(2106),h=f(10998),te=f(63339),$=f(94327),x=f(59922),ie=f(12590),Q=f(54957),J=f(77922),z=f(64830),S=f(41504),_=f(85753),y=f(65958),C=f(78903),d=f(89044),w=f(46441),D=f(38803),L=f(22344),k=f(54296),j=f(13072),N=f(9520),B=f(52677),T=f(71386),H=f(52394),Y=f(12060),ee=f(23013),ce=f(52230),pe=function(lt,We,Ke,De){var Pe=arguments.length,Ue=Pe<3?We:De===null?De=Object.getOwnPropertyDescriptor(We,Ke):De,Re;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Ue=Reflect.decorate(lt,We,Ke,De);else for(var et=lt.length-1;et>=0;et--)(Re=lt[et])&&(Ue=(Pe<3?Re(Ue):Pe>3?Re(We,Ke,Ue):Re(We,Ke))||Ue);return Pe>3&&Ue&&Object.defineProperty(We,Ke,Ue),Ue},ge=function(lt,We){return function(Ke,De){We(Ke,De,lt)}};function fe(lt){return lt.toString()}function oe(lt){const We=new L.v7,Ke=lt.createSnapshot();let De;for(;De=Ke.read();)We.update(De);return We.digest()}class Z{constructor(We,Ke,De){this._modelEventListeners=new h.Cm,this.model=We,this._languageSelection=null,this._languageSelectionListener=null,this._modelEventListeners.add(We.onWillDispose(()=>Ke(We))),this._modelEventListeners.add(We.onDidChangeLanguage(Pe=>De(We,Pe)))}_disposeLanguageSelection(){this._languageSelectionListener&&(this._languageSelectionListener.dispose(),this._languageSelectionListener=null)}dispose(){this._modelEventListeners.dispose(),this._disposeLanguageSelection()}setLanguage(We){this._disposeLanguageSelection(),this._languageSelection=We,this._languageSelectionListener=this._languageSelection.onDidChange(()=>this.model.setMode(We.languageId)),this.model.setMode(We.languageId)}}const le=te.j9||te.zx?1:2;class se{constructor(We,Ke,De,Pe,Ue,Re,et,rt){this.uri=We,this.initialUndoRedoSnapshot=Ke,this.time=De,this.sharesUndoRedoStack=Pe,this.heapSize=Ue,this.sha1=Re,this.versionId=et,this.alternativeVersionId=rt}}let X=class tg extends h.jG{constructor(We,Ke,De,Pe,Ue,Re,et,rt,Lt){super(),this._configurationService=We,this._resourcePropertiesService=Ke,this._themeService=De,this._logService=Pe,this._undoRedoService=Ue,this._languageService=Re,this._languageConfigurationService=et,this._languageFeatureDebounceService=rt,this._onModelAdded=this._register(new I.vl),this.onModelAdded=this._onModelAdded.event,this._onModelRemoved=this._register(new I.vl),this.onModelRemoved=this._onModelRemoved.event,this._onModelModeChanged=this._register(new I.vl),this.onModelLanguageChanged=this._onModelModeChanged.event,this._modelCreationOptionsByLanguageAndResource=Object.create(null),this._models={},this._disposedModels=new Map,this._disposedModelsHeapSize=0,this._semanticStyling=this._register(new Ee(this._themeService,this._languageService,this._logService)),this._register(this._configurationService.onDidChangeConfiguration(()=>this._updateModelOptions())),this._updateModelOptions(),this._register(new ve(this._semanticStyling,this,this._themeService,this._configurationService,this._languageFeatureDebounceService,Lt))}static _readModelOptions(We,Ke){var De;let Pe=ie.R.tabSize;if(We.editor&&typeof We.editor.tabSize<"u"){const dt=parseInt(We.editor.tabSize,10);isNaN(dt)||(Pe=dt),Pe<1&&(Pe=1)}let Ue=Pe;if(We.editor&&typeof We.editor.indentSize<"u"&&We.editor.indentSize!=="tabSize"){const dt=parseInt(We.editor.indentSize,10);isNaN(dt)||(Ue=dt),Ue<1&&(Ue=1)}let Re=ie.R.insertSpaces;We.editor&&typeof We.editor.insertSpaces<"u"&&(Re=We.editor.insertSpaces==="false"?!1:!!We.editor.insertSpaces);let et=le;const rt=We.eol;rt===`\r `?et=2:rt===` `&&(et=1);let Lt=ie.R.trimAutoWhitespace;We.editor&&typeof We.editor.trimAutoWhitespace<"u"&&(Lt=We.editor.trimAutoWhitespace==="false"?!1:!!We.editor.trimAutoWhitespace);let Dt=ie.R.detectIndentation;We.editor&&typeof We.editor.detectIndentation<"u"&&(Dt=We.editor.detectIndentation==="false"?!1:!!We.editor.detectIndentation);let xt=ie.R.largeFileOptimizations;We.editor&&typeof We.editor.largeFileOptimizations<"u"&&(xt=We.editor.largeFileOptimizations==="false"?!1:!!We.editor.largeFileOptimizations);let Ie=ie.R.bracketPairColorizationOptions;return!((De=We.editor)===null||De===void 0)&&De.bracketPairColorization&&typeof We.editor.bracketPairColorization=="object"&&(Ie={enabled:!!We.editor.bracketPairColorization.enabled,independentColorPoolPerBracketType:!!We.editor.bracketPairColorization.independentColorPoolPerBracketType}),{isForSimpleWidget:Ke,tabSize:Pe,indentSize:Ue,insertSpaces:Re,detectIndentation:Dt,defaultEOL:et,trimAutoWhitespace:Lt,largeFileOptimizations:xt,bracketPairColorizationOptions:Ie}}_getEOL(We,Ke){if(We)return this._resourcePropertiesService.getEOL(We,Ke);const De=this._configurationService.getValue("files.eol",{overrideIdentifier:Ke});return De&&typeof De=="string"&&De!=="auto"?De:te.OS===3||te.OS===2?` `:`\r `}_shouldRestoreUndoStack(){const We=this._configurationService.getValue("files.restoreUndoStack");return typeof We=="boolean"?We:!0}getCreationOptions(We,Ke,De){let Pe=this._modelCreationOptionsByLanguageAndResource[We+Ke];if(!Pe){const Ue=this._configurationService.getValue("editor",{overrideIdentifier:We,resource:Ke}),Re=this._getEOL(Ke,We);Pe=tg._readModelOptions({editor:Ue,eol:Re},De),this._modelCreationOptionsByLanguageAndResource[We+Ke]=Pe}return Pe}_updateModelOptions(){const We=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);const Ke=Object.keys(this._models);for(let De=0,Pe=Ke.length;De<Pe;De++){const Ue=Ke[De],Re=this._models[Ue],et=Re.model.getLanguageId(),rt=Re.model.uri,Lt=We[et+rt],Dt=this.getCreationOptions(et,rt,Re.model.isForSimpleWidget);tg._setModelOptionsForModel(Re.model,Dt,Lt)}}static _setModelOptionsForModel(We,Ke,De){De&&De.defaultEOL!==Ke.defaultEOL&&We.getLineCount()===1&&We.setEOL(Ke.defaultEOL===1?0:1),!(De&&De.detectIndentation===Ke.detectIndentation&&De.insertSpaces===Ke.insertSpaces&&De.tabSize===Ke.tabSize&&De.indentSize===Ke.indentSize&&De.trimAutoWhitespace===Ke.trimAutoWhitespace&&(0,T.aI)(De.bracketPairColorizationOptions,Ke.bracketPairColorizationOptions))&&(Ke.detectIndentation?(We.detectIndentation(Ke.insertSpaces,Ke.tabSize),We.updateOptions({trimAutoWhitespace:Ke.trimAutoWhitespace,bracketColorizationOptions:Ke.bracketPairColorizationOptions})):We.updateOptions({insertSpaces:Ke.insertSpaces,tabSize:Ke.tabSize,indentSize:Ke.indentSize,trimAutoWhitespace:Ke.trimAutoWhitespace,bracketColorizationOptions:Ke.bracketPairColorizationOptions}))}_insertDisposedModel(We){this._disposedModels.set(fe(We.uri),We),this._disposedModelsHeapSize+=We.heapSize}_removeDisposedModel(We){const Ke=this._disposedModels.get(fe(We));return Ke&&(this._disposedModelsHeapSize-=Ke.heapSize),this._disposedModels.delete(fe(We)),Ke}_ensureDisposedModelsHeapSize(We){if(this._disposedModelsHeapSize>We){const Ke=[];for(this._disposedModels.forEach(De=>{De.sharesUndoRedoStack||Ke.push(De)}),Ke.sort((De,Pe)=>De.time-Pe.time);Ke.length>0&&this._disposedModelsHeapSize>We;){const De=Ke.shift();this._removeDisposedModel(De.uri),De.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(De.initialUndoRedoSnapshot)}}}_createModelData(We,Ke,De,Pe){const Ue=this.getCreationOptions(Ke,De,Pe),Re=new x.Bz(We,Ke,Ue,De,this._undoRedoService,this._languageService,this._languageConfigurationService);if(De&&this._disposedModels.has(fe(De))){const Lt=this._removeDisposedModel(De),Dt=this._undoRedoService.getElements(De),xt=oe(Re)===Lt.sha1;if(xt||Lt.sharesUndoRedoStack){for(const Ie of Dt.past)(0,k.Th)(Ie)&&Ie.matchesResource(De)&&Ie.setModel(Re);for(const Ie of Dt.future)(0,k.Th)(Ie)&&Ie.matchesResource(De)&&Ie.setModel(Re);this._undoRedoService.setElementsValidFlag(De,!0,Ie=>(0,k.Th)(Ie)&&Ie.matchesResource(De)),xt&&(Re._overwriteVersionId(Lt.versionId),Re._overwriteAlternativeVersionId(Lt.alternativeVersionId),Re._overwriteInitialUndoRedoSnapshot(Lt.initialUndoRedoSnapshot))}else Lt.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(Lt.initialUndoRedoSnapshot)}const et=fe(Re.uri);if(this._models[et])throw new Error("ModelService: Cannot add model because it already exists!");const rt=new Z(Re,Lt=>this._onWillDispose(Lt),(Lt,Dt)=>this._onDidChangeLanguage(Lt,Dt));return this._models[et]=rt,rt}createModel(We,Ke,De,Pe=!1){let Ue;return Ke?(Ue=this._createModelData(We,Ke.languageId,De,Pe),this.setMode(Ue.model,Ke)):Ue=this._createModelData(We,Q.vH,De,Pe),this._onModelAdded.fire(Ue.model),Ue.model}setMode(We,Ke){if(!Ke)return;const De=this._models[fe(We.uri)];De&&De.setLanguage(Ke)}getModels(){const We=[],Ke=Object.keys(this._models);for(let De=0,Pe=Ke.length;De<Pe;De++){const Ue=Ke[De];We.push(this._models[Ue].model)}return We}getModel(We){const Ke=fe(We),De=this._models[Ke];return De?De.model:null}getSemanticTokensProviderStyling(We){return this._semanticStyling.get(We)}_schemaShouldMaintainUndoRedoElements(We){return We.scheme===j.ny.file||We.scheme===j.ny.vscodeRemote||We.scheme===j.ny.vscodeUserData||We.scheme===j.ny.vscodeNotebookCell||We.scheme==="fake-fs"}_onWillDispose(We){const Ke=fe(We.uri),De=this._models[Ke],Pe=this._undoRedoService.getUriComparisonKey(We.uri)!==We.uri.toString();let Ue=!1,Re=0;if(Pe||this._shouldRestoreUndoStack()&&this._schemaShouldMaintainUndoRedoElements(We.uri)){const rt=this._undoRedoService.getElements(We.uri);if(rt.past.length>0||rt.future.length>0){for(const Lt of rt.past)(0,k.Th)(Lt)&&Lt.matchesResource(We.uri)&&(Ue=!0,Re+=Lt.heapSize(We.uri),Lt.setModel(We.uri));for(const Lt of rt.future)(0,k.Th)(Lt)&&Lt.matchesResource(We.uri)&&(Ue=!0,Re+=Lt.heapSize(We.uri),Lt.setModel(We.uri))}}const et=tg.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK;if(Ue)if(!Pe&&Re>et){const rt=De.model.getInitialUndoRedoSnapshot();rt!==null&&this._undoRedoService.restoreSnapshot(rt)}else this._ensureDisposedModelsHeapSize(et-Re),this._undoRedoService.setElementsValidFlag(We.uri,!1,rt=>(0,k.Th)(rt)&&rt.matchesResource(We.uri)),this._insertDisposedModel(new se(We.uri,De.model.getInitialUndoRedoSnapshot(),Date.now(),Pe,Re,oe(We),We.getVersionId(),We.getAlternativeVersionId()));else if(!Pe){const rt=De.model.getInitialUndoRedoSnapshot();rt!==null&&this._undoRedoService.restoreSnapshot(rt)}delete this._models[Ke],De.dispose(),delete this._modelCreationOptionsByLanguageAndResource[We.getLanguageId()+We.uri],this._onModelRemoved.fire(We)}_onDidChangeLanguage(We,Ke){const De=Ke.oldLanguage,Pe=We.getLanguageId(),Ue=this.getCreationOptions(De,We.uri,We.isForSimpleWidget),Re=this.getCreationOptions(Pe,We.uri,We.isForSimpleWidget);tg._setModelOptionsForModel(We,Re,Ue),this._onModelModeChanged.fire({model:We,oldLanguageId:De})}};X.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK=20*1024*1024,X=pe([ge(0,_.pG),ge(1,S.J),ge(2,d.Gy),ge(3,w.rr),ge(4,D.$D),ge(5,J.L),ge(6,H.JZ),ge(7,Y.U),ge(8,ce.u)],X);const K="editor.semanticHighlighting";function he(lt,We,Ke){var De;const Pe=(De=Ke.getValue(K,{overrideIdentifier:lt.getLanguageId(),resource:lt.uri}))===null||De===void 0?void 0:De.enabled;return typeof Pe=="boolean"?Pe:We.getColorTheme().semanticHighlighting}let ve=class extends h.jG{constructor(We,Ke,De,Pe,Ue,Re){super(),this._watchers=Object.create(null),this._semanticStyling=We;const et=Dt=>{this._watchers[Dt.uri.toString()]=new ot(Dt,this._semanticStyling,De,Ue,Re)},rt=(Dt,xt)=>{xt.dispose(),delete this._watchers[Dt.uri.toString()]},Lt=()=>{for(const Dt of Ke.getModels()){const xt=this._watchers[Dt.uri.toString()];he(Dt,De,Pe)?xt||et(Dt):xt&&rt(Dt,xt)}};this._register(Ke.onModelAdded(Dt=>{he(Dt,De,Pe)&&et(Dt)})),this._register(Ke.onModelRemoved(Dt=>{const xt=this._watchers[Dt.uri.toString()];xt&&rt(Dt,xt)})),this._register(Pe.onDidChangeConfiguration(Dt=>{Dt.affectsConfiguration(K)&&Lt()})),this._register(De.onDidColorThemeChange(Lt))}dispose(){for(const We of Object.values(this._watchers))We.dispose();super.dispose()}};ve=pe([ge(1,z.S),ge(2,d.Gy),ge(3,_.pG),ge(4,Y.U),ge(5,ce.u)],ve);class Ee extends h.jG{constructor(We,Ke,De){super(),this._themeService=We,this._languageService=Ke,this._logService=De,this._caches=new WeakMap,this._register(this._themeService.onDidColorThemeChange(()=>{this._caches=new WeakMap}))}get(We){return this._caches.has(We)||this._caches.set(We,new N.i(We.getLegend(),this._themeService,this._languageService,this._logService)),this._caches.get(We)}}class O{constructor(We,Ke,De){this.provider=We,this.resultId=Ke,this.data=De}dispose(){this.provider.releaseDocumentSemanticTokens(this.resultId)}}let ot=class cc extends h.jG{constructor(We,Ke,De,Pe,Ue){super(),this._isDisposed=!1,this._model=We,this._semanticStyling=Ke,this._provider=Ue.documentSemanticTokensProvider,this._debounceInformation=Pe.for(this._provider,"DocumentSemanticTokens",{min:cc.REQUEST_MIN_DELAY,max:cc.REQUEST_MAX_DELAY}),this._fetchDocumentSemanticTokens=this._register(new y.uC(()=>this._fetchDocumentSemanticTokensNow(),cc.REQUEST_MIN_DELAY)),this._currentDocumentResponse=null,this._currentDocumentRequestCancellationTokenSource=null,this._documentProvidersChangeListeners=[],this._register(this._model.onDidChangeContent(()=>{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 Re=()=>{(0,h.AS)(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[];for(const et of this._provider.all(We))typeof et.onDidChange=="function"&&this._documentProvidersChangeListeners.push(et.onDidChange(()=>this._fetchDocumentSemanticTokens.schedule(0)))};Re(),this._register(this._provider.onDidChange(()=>{Re(),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(De.onDidColorThemeChange(et=>{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),this._setDocumentSemanticTokens(null,null,null,[]),this._isDisposed=!0,super.dispose()}_fetchDocumentSemanticTokensNow(){if(this._currentDocumentRequestCancellationTokenSource)return;if(!(0,B.br)(this._provider,this._model)){this._currentDocumentResponse&&this._model.tokenization.setSemanticTokens(null,!1);return}const We=new C.Q,Ke=this._currentDocumentResponse?this._currentDocumentResponse.provider:null,De=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,Pe=(0,B.aw)(this._provider,this._model,Ke,De,We.token);this._currentDocumentRequestCancellationTokenSource=We;const Ue=[],Re=this._model.onDidChangeContent(rt=>{Ue.push(rt)}),et=new ee.W(!1);Pe.then(rt=>{if(this._debounceInformation.update(this._model,et.elapsed()),this._currentDocumentRequestCancellationTokenSource=null,Re.dispose(),!rt)this._setDocumentSemanticTokens(null,null,null,Ue);else{const{provider:Lt,tokens:Dt}=rt,xt=this._semanticStyling.get(Lt);this._setDocumentSemanticTokens(Lt,Dt||null,xt,Ue)}},rt=>{rt&&($.MB(rt)||typeof rt.message=="string"&&rt.message.indexOf("busy")!==-1)||$.dz(rt),this._currentDocumentRequestCancellationTokenSource=null,Re.dispose(),Ue.length>0&&(this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model)))})}static _copy(We,Ke,De,Pe,Ue){Ue=Math.min(Ue,De.length-Pe,We.length-Ke);for(let Re=0;Re<Ue;Re++)De[Pe+Re]=We[Ke+Re]}_setDocumentSemanticTokens(We,Ke,De,Pe){const Ue=this._currentDocumentResponse,Re=()=>{Pe.length>0&&!this._fetchDocumentSemanticTokens.isScheduled()&&this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))};if(this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._isDisposed){We&&Ke&&We.releaseDocumentSemanticTokens(Ke.resultId);return}if(!We||!De){this._model.tokenization.setSemanticTokens(null,!1);return}if(!Ke){this._model.tokenization.setSemanticTokens(null,!0),Re();return}if((0,B.yS)(Ke)){if(!Ue){this._model.tokenization.setSemanticTokens(null,!0);return}if(Ke.edits.length===0)Ke={resultId:Ke.resultId,data:Ue.data};else{let et=0;for(const Ie of Ke.edits)et+=(Ie.data?Ie.data.length:0)-Ie.deleteCount;const rt=Ue.data,Lt=new Uint32Array(rt.length+et);let Dt=rt.length,xt=Lt.length;for(let Ie=Ke.edits.length-1;Ie>=0;Ie--){const dt=Ke.edits[Ie];if(dt.start>rt.length){De.warnInvalidEditStart(Ue.resultId,Ke.resultId,Ie,dt.start,rt.length),this._model.tokenization.setSemanticTokens(null,!0);return}const ft=Dt-(dt.start+dt.deleteCount);ft>0&&(cc._copy(rt,Dt-ft,Lt,xt-ft,ft),xt-=ft),dt.data&&(cc._copy(dt.data,0,Lt,xt-dt.data.length,dt.data.length),xt-=dt.data.length),Dt=dt.start}Dt>0&&cc._copy(rt,0,Lt,0,Dt),Ke={resultId:Ke.resultId,data:Lt}}}if((0,B.BB)(Ke)){this._currentDocumentResponse=new O(We,Ke.resultId,Ke.data);const et=(0,N.b)(Ke,De,this._model.getLanguageId());if(Pe.length>0)for(const rt of Pe)for(const Lt of et)for(const Dt of rt.changes)Lt.applyEdit(Dt.range,Dt.text);this._model.tokenization.setSemanticTokens(et,!0)}else this._model.tokenization.setSemanticTokens(null,!0);Re()}};ot.REQUEST_MIN_DELAY=300,ot.REQUEST_MAX_DELAY=2e3,ot=pe([ge(2,d.Gy),ge(3,Y.U),ge(4,ce.u)],ot)},37042:(Tt,Fe,f)=>{f.d(Fe,{b:()=>h});var I=f(82399);const h=(0,I.u1)("textModelService")},9520:(Tt,Fe,f)=>{f.d(Fe,{i:()=>C,b:()=>d});var I=f(15910),h=f(89044),te=f(46441),$=f(15365),x=f(28061),ie=f(3902);class Q{constructor(k,j){this._startLineNumber=k,this._tokens=j,this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}static create(k,j){return new Q(k,new J(j))}get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._endLineNumber}toString(){return this._tokens.toString(this._startLineNumber)}_updateEndLineNumber(){this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}isEmpty(){return this._tokens.isEmpty()}getLineTokens(k){return this._startLineNumber<=k&&k<=this._endLineNumber?this._tokens.getLineTokens(k-this._startLineNumber):null}getRange(){const k=this._tokens.getRange();return k&&new x.Q(this._startLineNumber+k.startLineNumber,k.startColumn,this._startLineNumber+k.endLineNumber,k.endColumn)}removeTokens(k){const j=k.startLineNumber-this._startLineNumber,N=k.endLineNumber-this._startLineNumber;this._startLineNumber+=this._tokens.removeTokens(j,k.startColumn-1,N,k.endColumn-1),this._updateEndLineNumber()}split(k){const j=k.startLineNumber-this._startLineNumber,N=k.endLineNumber-this._startLineNumber,[B,T,H]=this._tokens.split(j,k.startColumn-1,N,k.endColumn-1);return[new Q(this._startLineNumber,B),new Q(this._startLineNumber+H,T)]}applyEdit(k,j){const[N,B,T]=(0,ie.W)(j);this.acceptEdit(k,N,B,T,j.length>0?j.charCodeAt(0):0)}acceptEdit(k,j,N,B,T){this._acceptDeleteRange(k),this._acceptInsertText(new $.y(k.startLineNumber,k.startColumn),j,N,B,T),this._updateEndLineNumber()}_acceptDeleteRange(k){if(k.startLineNumber===k.endLineNumber&&k.startColumn===k.endColumn)return;const j=k.startLineNumber-this._startLineNumber,N=k.endLineNumber-this._startLineNumber;if(N<0){const T=N-j;this._startLineNumber-=T;return}const B=this._tokens.getMaxDeltaLine();if(!(j>=B+1)){if(j<0&&N>=B+1){this._startLineNumber=0,this._tokens.clear();return}if(j<0){const T=-j;this._startLineNumber-=T,this._tokens.acceptDeleteRange(k.startColumn-1,0,0,N,k.endColumn-1)}else this._tokens.acceptDeleteRange(0,j,k.startColumn-1,N,k.endColumn-1)}}_acceptInsertText(k,j,N,B,T){if(j===0&&N===0)return;const H=k.lineNumber-this._startLineNumber;if(H<0){this._startLineNumber+=j;return}const Y=this._tokens.getMaxDeltaLine();H>=Y+1||this._tokens.acceptInsertText(H,k.column-1,j,N,B,T)}}class J{constructor(k){this._tokens=k,this._tokenCount=k.length/4}toString(k){const j=[];for(let N=0;N<this._tokenCount;N++)j.push(`(${this._getDeltaLine(N)+k},${this._getStartCharacter(N)}-${this._getEndCharacter(N)})`);return`[${j.join(",")}]`}getMaxDeltaLine(){const k=this._getTokenCount();return k===0?-1:this._getDeltaLine(k-1)}getRange(){const k=this._getTokenCount();if(k===0)return null;const j=this._getStartCharacter(0),N=this._getDeltaLine(k-1),B=this._getEndCharacter(k-1);return new x.Q(0,j+1,N,B+1)}_getTokenCount(){return this._tokenCount}_getDeltaLine(k){return this._tokens[4*k]}_getStartCharacter(k){return this._tokens[4*k+1]}_getEndCharacter(k){return this._tokens[4*k+2]}isEmpty(){return this._getTokenCount()===0}getLineTokens(k){let j=0,N=this._getTokenCount()-1;for(;j<N;){const B=j+Math.floor((N-j)/2),T=this._getDeltaLine(B);if(T<k)j=B+1;else if(T>k)N=B-1;else{let H=B;for(;H>j&&this._getDeltaLine(H-1)===k;)H--;let Y=B;for(;Y<N&&this._getDeltaLine(Y+1)===k;)Y++;return new z(this._tokens.subarray(4*H,4*Y+4))}}return this._getDeltaLine(j)===k?new z(this._tokens.subarray(4*j,4*j+4)):null}clear(){this._tokenCount=0}removeTokens(k,j,N,B){const T=this._tokens,H=this._tokenCount;let Y=0,ee=!1,ce=0;for(let pe=0;pe<H;pe++){const ge=4*pe,fe=T[ge],oe=T[ge+1],Z=T[ge+2],le=T[ge+3];if((fe>k||fe===k&&Z>=j)&&(fe<N||fe===N&&oe<=B))ee=!0;else{if(Y===0&&(ce=fe),ee){const se=4*Y;T[se]=fe-ce,T[se+1]=oe,T[se+2]=Z,T[se+3]=le}Y++}}return this._tokenCount=Y,ce}split(k,j,N,B){const T=this._tokens,H=this._tokenCount,Y=[],ee=[];let ce=Y,pe=0,ge=0;for(let fe=0;fe<H;fe++){const oe=4*fe,Z=T[oe],le=T[oe+1],se=T[oe+2],X=T[oe+3];if(Z>k||Z===k&&se>=j){if(Z<N||Z===N&&le<=B)continue;ce!==ee&&(ce=ee,pe=0,ge=Z)}ce[pe++]=Z-ge,ce[pe++]=le,ce[pe++]=se,ce[pe++]=X}return[new J(new Uint32Array(Y)),new J(new Uint32Array(ee)),ge]}acceptDeleteRange(k,j,N,B,T){const H=this._tokens,Y=this._tokenCount,ee=B-j;let ce=0,pe=!1;for(let ge=0;ge<Y;ge++){const fe=4*ge;let oe=H[fe],Z=H[fe+1],le=H[fe+2];const se=H[fe+3];if(oe<j||oe===j&&le<=N){ce++;continue}else if(oe===j&&Z<N)oe===B&&le>T?le-=T-N:le=N;else if(oe===j&&Z===N)if(oe===B&&le>T)le-=T-N;else{pe=!0;continue}else if(oe<B||oe===B&&Z<T)if(oe===B&&le>T)oe===j?(Z=N,le=Z+(le-T)):(Z=0,le=Z+(le-T));else{pe=!0;continue}else if(oe>B){if(ee===0&&!pe){ce=Y;break}oe-=ee}else if(oe===B&&Z>=T)k&&oe===0&&(Z+=k,le+=k),oe-=ee,Z-=T-N,le-=T-N;else throw new Error("Not possible!");const X=4*ce;H[X]=oe,H[X+1]=Z,H[X+2]=le,H[X+3]=se,ce++}this._tokenCount=ce}acceptInsertText(k,j,N,B,T,H){const Y=N===0&&B===1&&(H>=48&&H<=57||H>=65&&H<=90||H>=97&&H<=122),ee=this._tokens,ce=this._tokenCount;for(let pe=0;pe<ce;pe++){const ge=4*pe;let fe=ee[ge],oe=ee[ge+1],Z=ee[ge+2];if(!(fe<k||fe===k&&Z<j)){if(fe===k&&Z===j)if(Y)Z+=1;else continue;else if(fe===k&&oe<j&&j<Z)N===0?Z+=B:Z=j;else{if(fe===k&&oe===j&&Y)continue;if(fe===k)if(fe+=N,N===0)oe+=B,Z+=B;else{const le=Z-oe;oe=T+(oe-j),Z=oe+le}else fe+=N}ee[ge]=fe,ee[ge+1]=oe,ee[ge+2]=Z}}}}class z{constructor(k){this._tokens=k}getCount(){return this._tokens.length/4}getStartCharacter(k){return this._tokens[4*k+1]}getEndCharacter(k){return this._tokens[4*k+2]}getMetadata(k){return this._tokens[4*k+3]}}var S=f(77922),_=function(L,k,j,N){var B=arguments.length,T=B<3?k:N===null?N=Object.getOwnPropertyDescriptor(k,j):N,H;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(L,k,j,N);else for(var Y=L.length-1;Y>=0;Y--)(H=L[Y])&&(T=(B<3?H(T):B>3?H(k,j,T):H(k,j))||T);return B>3&&T&&Object.defineProperty(k,j,T),T},y=function(L,k){return function(j,N){k(j,N,L)}};let C=class{constructor(k,j,N,B){this._legend=k,this._themeService=j,this._languageService=N,this._logService=B,this._hasWarnedOverlappingTokens=!1,this._hasWarnedInvalidLengthTokens=!1,this._hasWarnedInvalidEditStart=!1,this._hashTable=new D}getMetadata(k,j,N){const B=this._languageService.languageIdCodec.encodeLanguageId(N),T=this._hashTable.get(k,j,B);let H;if(T)H=T.metadata,this._logService.getLevel()===te.$b.Trace&&this._logService.trace(`SemanticTokensProviderStyling [CACHED] ${k} / ${j}: foreground ${I.x.getForeground(H)}, fontStyle ${I.x.getFontStyle(H).toString(2)}`);else{let Y=this._legend.tokenTypes[k];const ee=[];if(Y){let ce=j;for(let ge=0;ce>0&&ge<this._legend.tokenModifiers.length;ge++)ce&1&&ee.push(this._legend.tokenModifiers[ge]),ce=ce>>1;ce>0&&this._logService.getLevel()===te.$b.Trace&&(this._logService.trace(`SemanticTokensProviderStyling: unknown token modifier index: ${j.toString(2)} for legend: ${JSON.stringify(this._legend.tokenModifiers)}`),ee.push("not-in-legend"));const pe=this._themeService.getColorTheme().getTokenStyleMetadata(Y,ee,N);if(typeof pe>"u")H=2147483647;else{if(H=0,typeof pe.italic<"u"){const ge=(pe.italic?1:0)<<11;H|=ge|1}if(typeof pe.bold<"u"){const ge=(pe.bold?2:0)<<11;H|=ge|2}if(typeof pe.underline<"u"){const ge=(pe.underline?4:0)<<11;H|=ge|4}if(typeof pe.strikethrough<"u"){const ge=(pe.strikethrough?8:0)<<11;H|=ge|8}if(pe.foreground){const ge=pe.foreground<<15;H|=ge|16}H===0&&(H=2147483647)}}else this._logService.getLevel()===te.$b.Trace&&this._logService.trace(`SemanticTokensProviderStyling: unknown token type index: ${k} for legend: ${JSON.stringify(this._legend.tokenTypes)}`),H=2147483647,Y="not-in-legend";this._hashTable.add(k,j,B,H),this._logService.getLevel()===te.$b.Trace&&this._logService.trace(`SemanticTokensProviderStyling ${k} (${Y}) / ${j} (${ee.join(" ")}): foreground ${I.x.getForeground(H)}, fontStyle ${I.x.getFontStyle(H).toString(2)}`)}return H}warnOverlappingSemanticTokens(k,j){this._hasWarnedOverlappingTokens||(this._hasWarnedOverlappingTokens=!0,console.warn(`Overlapping semantic tokens detected at lineNumber ${k}, column ${j}`))}warnInvalidLengthSemanticTokens(k,j){this._hasWarnedInvalidLengthTokens||(this._hasWarnedInvalidLengthTokens=!0,console.warn(`Semantic token with invalid length detected at lineNumber ${k}, column ${j}`))}warnInvalidEditStart(k,j,N,B,T){this._hasWarnedInvalidEditStart||(this._hasWarnedInvalidEditStart=!0,console.warn(`Invalid semantic tokens edit detected (previousResultId: ${k}, resultId: ${j}) at edit #${N}: The provided start offset ${B} is outside the previous data (length ${T}).`))}};C=_([y(1,h.Gy),y(2,S.L),y(3,te.rr)],C);function d(L,k,j){const N=L.data,B=L.data.length/5|0,T=Math.max(Math.ceil(B/1024),400),H=[];let Y=0,ee=1,ce=0;for(;Y<B;){const pe=Y;let ge=Math.min(pe+T,B);if(ge<B){let K=ge;for(;K-1>pe&&N[5*K]===0;)K--;if(K-1===pe){let he=ge;for(;he+1<B&&N[5*he]===0;)he++;ge=he}else ge=K}let fe=new Uint32Array((ge-pe)*4),oe=0,Z=0,le=0,se=0;for(;Y<ge;){const K=5*Y,he=N[K],ve=N[K+1],Ee=ee+he|0,O=he===0?ce+ve|0:ve,ot=N[K+2],lt=O+ot|0,We=N[K+3],Ke=N[K+4];if(lt<=O)k.warnInvalidLengthSemanticTokens(Ee,O+1);else if(le===Ee&&se>O)k.warnOverlappingSemanticTokens(Ee,O+1);else{const De=k.getMetadata(We,Ke,j);De!==2147483647&&(Z===0&&(Z=Ee),fe[oe]=Ee-Z,fe[oe+1]=O,fe[oe+2]=lt,fe[oe+3]=De,oe+=4,le=Ee,se=lt)}ee=Ee,ce=O,Y++}oe!==fe.length&&(fe=fe.subarray(0,oe));const X=Q.create(Z,fe);H.push(X)}return H}class w{constructor(k,j,N,B){this.tokenTypeIndex=k,this.tokenModifierSet=j,this.languageId=N,this.metadata=B,this.next=null}}class D{constructor(){this._elementsCount=0,this._currentLengthIndex=0,this._currentLength=D._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1<D._SIZES.length?2/3*this._currentLength:0),this._elements=[],D._nullOutEntries(this._elements,this._currentLength)}static _nullOutEntries(k,j){for(let N=0;N<j;N++)k[N]=null}_hash2(k,j){return(k<<5)-k+j|0}_hashFunc(k,j,N){return this._hash2(this._hash2(k,j),N)%this._currentLength}get(k,j,N){const B=this._hashFunc(k,j,N);let T=this._elements[B];for(;T;){if(T.tokenTypeIndex===k&&T.tokenModifierSet===j&&T.languageId===N)return T;T=T.next}return null}add(k,j,N,B){if(this._elementsCount++,this._growCount!==0&&this._elementsCount>=this._growCount){const T=this._elements;this._currentLengthIndex++,this._currentLength=D._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1<D._SIZES.length?2/3*this._currentLength:0),this._elements=[],D._nullOutEntries(this._elements,this._currentLength);for(const H of T){let Y=H;for(;Y;){const ee=Y.next;Y.next=null,this._add(Y),Y=ee}}}this._add(new w(k,j,N,B))}_add(k){const j=this._hashFunc(k.tokenTypeIndex,k.tokenModifierSet,k.languageId);k.next=this._elements[j],this._elements[j]=k}}D._SIZES=[3,7,13,31,61,127,251,509,1021,2039,4093,8191,16381,32749,65521,131071,262139,524287,1048573,2097143]},41504:(Tt,Fe,f)=>{f.d(Fe,{J:()=>te,U:()=>h});var I=f(82399);const h=(0,I.u1)("textResourceConfigurationService"),te=(0,I.u1)("textResourcePropertiesService")},49887:(Tt,Fe,f)=>{f.d(Fe,{P:()=>ie});var I=f(28061),h=f(104),te=f(16844),$=f(79359),x=f(18782);class ie{static computeUnicodeHighlights(_,y,C){const d=C?C.startLineNumber:1,w=C?C.endLineNumber:_.getLineCount(),D=new J(y),L=D.getCandidateCodePoints();let k;L==="allNonBasicAscii"?k=new RegExp("[^\\t\\n\\r\\x20-\\x7E]","g"):k=new RegExp(`${Q(Array.from(L))}`,"g");const j=new h.W5(null,k),N=[];let B=!1,T,H=0,Y=0,ee=0;e:for(let ce=d,pe=w;ce<=pe;ce++){const ge=_.getLineContent(ce),fe=ge.length;j.reset(0);do if(T=j.next(ge),T){let oe=T.index,Z=T.index+T[0].length;if(oe>0){const K=ge.charCodeAt(oe-1);te.pc(K)&&oe--}if(Z+1<fe){const K=ge.charCodeAt(Z-1);te.pc(K)&&Z++}const le=ge.substring(oe,Z),se=(0,x.Th)(oe+1,x.Ld,ge,0),X=D.shouldHighlightNonBasicASCII(le,se?se.word:null);if(X!==0){X===3?H++:X===2?Y++:X===1?ee++:(0,$.xb)(X);const K=1e3;if(N.length>=K){B=!0;break e}N.push(new I.Q(ce,oe+1,ce,Z+1))}}while(T)}return{ranges:N,hasMore:B,ambiguousCharacterCount:H,invisibleCharacterCount:Y,nonBasicAsciiCharacterCount:ee}}static computeUnicodeHighlightReason(_,y){const C=new J(y);switch(C.shouldHighlightNonBasicASCII(_,null)){case 0:return null;case 2:return{kind:1};case 3:{const w=_.codePointAt(0),D=C.ambiguousCharacters.getPrimaryConfusable(w),L=te.tl.getLocales().filter(k=>!te.tl.getInstance(new Set([...y.allowedLocales,k])).isAmbiguous(w));return{kind:0,confusableWith:String.fromCodePoint(D),notAmbiguousInLocales:L}}case 1:return{kind:2}}}}function Q(S,_){return`[${te.bm(S.map(C=>String.fromCodePoint(C)).join(""))}]`}class J{constructor(_){this.options=_,this.allowedCodePoints=new Set(_.allowedCodePoints),this.ambiguousCharacters=te.tl.getInstance(new Set(_.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";const _=new Set;if(this.options.invisibleCharacters)for(const y of te.y_.codePoints)z(String.fromCodePoint(y))||_.add(y);if(this.options.ambiguousCharacters)for(const y of this.ambiguousCharacters.getConfusableCodePoints())_.add(y);for(const y of this.allowedCodePoints)_.delete(y);return _}shouldHighlightNonBasicASCII(_,y){const C=_.codePointAt(0);if(this.allowedCodePoints.has(C))return 0;if(this.options.nonBasicASCII)return 1;let d=!1,w=!1;if(y)for(const D of y){const L=D.codePointAt(0),k=te.aC(D);d=d||k,!k&&!this.ambiguousCharacters.isAmbiguous(L)&&!te.y_.isInvisibleCharacter(L)&&(w=!0)}return!d&&w?0:this.options.invisibleCharacters&&!z(_)&&te.y_.isInvisibleCharacter(C)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(C)?3:0}}function z(S){return S===" "||S===` `||S===" "}},42783:(Tt,Fe,f)=>{f.d(Fe,{A5:()=>ee,Ah:()=>ge,DD:()=>j,DO:()=>pe,Gn:()=>I,H_:()=>X,Ic:()=>ce,Io:()=>$,Kb:()=>S,QP:()=>x,Qj:()=>Q,R3:()=>T,SB:()=>Z,U7:()=>K,VW:()=>D,WA:()=>le,WU:()=>d,XR:()=>oe,_E:()=>te,cj:()=>N,dE:()=>Y,d_:()=>B,e0:()=>_,h5:()=>J,hS:()=>H,kK:()=>ve,kf:()=>C,l:()=>w,m9:()=>he,of:()=>z,ok:()=>h,ov:()=>fe,p2:()=>y,qw:()=>k,r4:()=>L,t7:()=>ie,tJ:()=>Ee,v0:()=>se});var I;(function(O){O[O.Unknown=0]="Unknown",O[O.Disabled=1]="Disabled",O[O.Enabled=2]="Enabled"})(I||(I={}));var h;(function(O){O[O.Invoke=1]="Invoke",O[O.Auto=2]="Auto"})(h||(h={}));var te;(function(O){O[O.KeepWhitespace=1]="KeepWhitespace",O[O.InsertAsSnippet=4]="InsertAsSnippet"})(te||(te={}));var $;(function(O){O[O.Method=0]="Method",O[O.Function=1]="Function",O[O.Constructor=2]="Constructor",O[O.Field=3]="Field",O[O.Variable=4]="Variable",O[O.Class=5]="Class",O[O.Struct=6]="Struct",O[O.Interface=7]="Interface",O[O.Module=8]="Module",O[O.Property=9]="Property",O[O.Event=10]="Event",O[O.Operator=11]="Operator",O[O.Unit=12]="Unit",O[O.Value=13]="Value",O[O.Constant=14]="Constant",O[O.Enum=15]="Enum",O[O.EnumMember=16]="EnumMember",O[O.Keyword=17]="Keyword",O[O.Text=18]="Text",O[O.Color=19]="Color",O[O.File=20]="File",O[O.Reference=21]="Reference",O[O.Customcolor=22]="Customcolor",O[O.Folder=23]="Folder",O[O.TypeParameter=24]="TypeParameter",O[O.User=25]="User",O[O.Issue=26]="Issue",O[O.Snippet=27]="Snippet"})($||($={}));var x;(function(O){O[O.Deprecated=1]="Deprecated"})(x||(x={}));var ie;(function(O){O[O.Invoke=0]="Invoke",O[O.TriggerCharacter=1]="TriggerCharacter",O[O.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"})(ie||(ie={}));var Q;(function(O){O[O.EXACT=0]="EXACT",O[O.ABOVE=1]="ABOVE",O[O.BELOW=2]="BELOW"})(Q||(Q={}));var J;(function(O){O[O.NotSet=0]="NotSet",O[O.ContentFlush=1]="ContentFlush",O[O.RecoverFromMarkers=2]="RecoverFromMarkers",O[O.Explicit=3]="Explicit",O[O.Paste=4]="Paste",O[O.Undo=5]="Undo",O[O.Redo=6]="Redo"})(J||(J={}));var z;(function(O){O[O.LF=1]="LF",O[O.CRLF=2]="CRLF"})(z||(z={}));var S;(function(O){O[O.Text=0]="Text",O[O.Read=1]="Read",O[O.Write=2]="Write"})(S||(S={}));var _;(function(O){O[O.None=0]="None",O[O.Keep=1]="Keep",O[O.Brackets=2]="Brackets",O[O.Advanced=3]="Advanced",O[O.Full=4]="Full"})(_||(_={}));var y;(function(O){O[O.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",O[O.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",O[O.accessibilitySupport=2]="accessibilitySupport",O[O.accessibilityPageSize=3]="accessibilityPageSize",O[O.ariaLabel=4]="ariaLabel",O[O.autoClosingBrackets=5]="autoClosingBrackets",O[O.autoClosingDelete=6]="autoClosingDelete",O[O.autoClosingOvertype=7]="autoClosingOvertype",O[O.autoClosingQuotes=8]="autoClosingQuotes",O[O.autoIndent=9]="autoIndent",O[O.automaticLayout=10]="automaticLayout",O[O.autoSurround=11]="autoSurround",O[O.bracketPairColorization=12]="bracketPairColorization",O[O.guides=13]="guides",O[O.codeLens=14]="codeLens",O[O.codeLensFontFamily=15]="codeLensFontFamily",O[O.codeLensFontSize=16]="codeLensFontSize",O[O.colorDecorators=17]="colorDecorators",O[O.columnSelection=18]="columnSelection",O[O.comments=19]="comments",O[O.contextmenu=20]="contextmenu",O[O.copyWithSyntaxHighlighting=21]="copyWithSyntaxHighlighting",O[O.cursorBlinking=22]="cursorBlinking",O[O.cursorSmoothCaretAnimation=23]="cursorSmoothCaretAnimation",O[O.cursorStyle=24]="cursorStyle",O[O.cursorSurroundingLines=25]="cursorSurroundingLines",O[O.cursorSurroundingLinesStyle=26]="cursorSurroundingLinesStyle",O[O.cursorWidth=27]="cursorWidth",O[O.disableLayerHinting=28]="disableLayerHinting",O[O.disableMonospaceOptimizations=29]="disableMonospaceOptimizations",O[O.domReadOnly=30]="domReadOnly",O[O.dragAndDrop=31]="dragAndDrop",O[O.dropIntoEditor=32]="dropIntoEditor",O[O.emptySelectionClipboard=33]="emptySelectionClipboard",O[O.experimental=34]="experimental",O[O.extraEditorClassName=35]="extraEditorClassName",O[O.fastScrollSensitivity=36]="fastScrollSensitivity",O[O.find=37]="find",O[O.fixedOverflowWidgets=38]="fixedOverflowWidgets",O[O.folding=39]="folding",O[O.foldingStrategy=40]="foldingStrategy",O[O.foldingHighlight=41]="foldingHighlight",O[O.foldingImportsByDefault=42]="foldingImportsByDefault",O[O.foldingMaximumRegions=43]="foldingMaximumRegions",O[O.unfoldOnClickAfterEndOfLine=44]="unfoldOnClickAfterEndOfLine",O[O.fontFamily=45]="fontFamily",O[O.fontInfo=46]="fontInfo",O[O.fontLigatures=47]="fontLigatures",O[O.fontSize=48]="fontSize",O[O.fontWeight=49]="fontWeight",O[O.formatOnPaste=50]="formatOnPaste",O[O.formatOnType=51]="formatOnType",O[O.glyphMargin=52]="glyphMargin",O[O.gotoLocation=53]="gotoLocation",O[O.hideCursorInOverviewRuler=54]="hideCursorInOverviewRuler",O[O.hover=55]="hover",O[O.inDiffEditor=56]="inDiffEditor",O[O.inlineSuggest=57]="inlineSuggest",O[O.letterSpacing=58]="letterSpacing",O[O.lightbulb=59]="lightbulb",O[O.lineDecorationsWidth=60]="lineDecorationsWidth",O[O.lineHeight=61]="lineHeight",O[O.lineNumbers=62]="lineNumbers",O[O.lineNumbersMinChars=63]="lineNumbersMinChars",O[O.linkedEditing=64]="linkedEditing",O[O.links=65]="links",O[O.matchBrackets=66]="matchBrackets",O[O.minimap=67]="minimap",O[O.mouseStyle=68]="mouseStyle",O[O.mouseWheelScrollSensitivity=69]="mouseWheelScrollSensitivity",O[O.mouseWheelZoom=70]="mouseWheelZoom",O[O.multiCursorMergeOverlapping=71]="multiCursorMergeOverlapping",O[O.multiCursorModifier=72]="multiCursorModifier",O[O.multiCursorPaste=73]="multiCursorPaste",O[O.occurrencesHighlight=74]="occurrencesHighlight",O[O.overviewRulerBorder=75]="overviewRulerBorder",O[O.overviewRulerLanes=76]="overviewRulerLanes",O[O.padding=77]="padding",O[O.parameterHints=78]="parameterHints",O[O.peekWidgetDefaultFocus=79]="peekWidgetDefaultFocus",O[O.definitionLinkOpensInPeek=80]="definitionLinkOpensInPeek",O[O.quickSuggestions=81]="quickSuggestions",O[O.quickSuggestionsDelay=82]="quickSuggestionsDelay",O[O.readOnly=83]="readOnly",O[O.renameOnType=84]="renameOnType",O[O.renderControlCharacters=85]="renderControlCharacters",O[O.renderFinalNewline=86]="renderFinalNewline",O[O.renderLineHighlight=87]="renderLineHighlight",O[O.renderLineHighlightOnlyWhenFocus=88]="renderLineHighlightOnlyWhenFocus",O[O.renderValidationDecorations=89]="renderValidationDecorations",O[O.renderWhitespace=90]="renderWhitespace",O[O.revealHorizontalRightPadding=91]="revealHorizontalRightPadding",O[O.roundedSelection=92]="roundedSelection",O[O.rulers=93]="rulers",O[O.scrollbar=94]="scrollbar",O[O.scrollBeyondLastColumn=95]="scrollBeyondLastColumn",O[O.scrollBeyondLastLine=96]="scrollBeyondLastLine",O[O.scrollPredominantAxis=97]="scrollPredominantAxis",O[O.selectionClipboard=98]="selectionClipboard",O[O.selectionHighlight=99]="selectionHighlight",O[O.selectOnLineNumbers=100]="selectOnLineNumbers",O[O.showFoldingControls=101]="showFoldingControls",O[O.showUnused=102]="showUnused",O[O.snippetSuggestions=103]="snippetSuggestions",O[O.smartSelect=104]="smartSelect",O[O.smoothScrolling=105]="smoothScrolling",O[O.stickyTabStops=106]="stickyTabStops",O[O.stopRenderingLineAfter=107]="stopRenderingLineAfter",O[O.suggest=108]="suggest",O[O.suggestFontSize=109]="suggestFontSize",O[O.suggestLineHeight=110]="suggestLineHeight",O[O.suggestOnTriggerCharacters=111]="suggestOnTriggerCharacters",O[O.suggestSelection=112]="suggestSelection",O[O.tabCompletion=113]="tabCompletion",O[O.tabIndex=114]="tabIndex",O[O.unicodeHighlighting=115]="unicodeHighlighting",O[O.unusualLineTerminators=116]="unusualLineTerminators",O[O.useShadowDOM=117]="useShadowDOM",O[O.useTabStops=118]="useTabStops",O[O.wordSeparators=119]="wordSeparators",O[O.wordWrap=120]="wordWrap",O[O.wordWrapBreakAfterCharacters=121]="wordWrapBreakAfterCharacters",O[O.wordWrapBreakBeforeCharacters=122]="wordWrapBreakBeforeCharacters",O[O.wordWrapColumn=123]="wordWrapColumn",O[O.wordWrapOverride1=124]="wordWrapOverride1",O[O.wordWrapOverride2=125]="wordWrapOverride2",O[O.wrappingIndent=126]="wrappingIndent",O[O.wrappingStrategy=127]="wrappingStrategy",O[O.showDeprecated=128]="showDeprecated",O[O.inlayHints=129]="inlayHints",O[O.editorClassName=130]="editorClassName",O[O.pixelRatio=131]="pixelRatio",O[O.tabFocusMode=132]="tabFocusMode",O[O.layoutInfo=133]="layoutInfo",O[O.wrappingInfo=134]="wrappingInfo"})(y||(y={}));var C;(function(O){O[O.TextDefined=0]="TextDefined",O[O.LF=1]="LF",O[O.CRLF=2]="CRLF"})(C||(C={}));var d;(function(O){O[O.LF=0]="LF",O[O.CRLF=1]="CRLF"})(d||(d={}));var w;(function(O){O[O.None=0]="None",O[O.Indent=1]="Indent",O[O.IndentOutdent=2]="IndentOutdent",O[O.Outdent=3]="Outdent"})(w||(w={}));var D;(function(O){O[O.Both=0]="Both",O[O.Right=1]="Right",O[O.Left=2]="Left",O[O.None=3]="None"})(D||(D={}));var L;(function(O){O[O.Type=1]="Type",O[O.Parameter=2]="Parameter"})(L||(L={}));var k;(function(O){O[O.Automatic=0]="Automatic",O[O.Explicit=1]="Explicit"})(k||(k={}));var j;(function(O){O[O.DependsOnKbLayout=-1]="DependsOnKbLayout",O[O.Unknown=0]="Unknown",O[O.Backspace=1]="Backspace",O[O.Tab=2]="Tab",O[O.Enter=3]="Enter",O[O.Shift=4]="Shift",O[O.Ctrl=5]="Ctrl",O[O.Alt=6]="Alt",O[O.PauseBreak=7]="PauseBreak",O[O.CapsLock=8]="CapsLock",O[O.Escape=9]="Escape",O[O.Space=10]="Space",O[O.PageUp=11]="PageUp",O[O.PageDown=12]="PageDown",O[O.End=13]="End",O[O.Home=14]="Home",O[O.LeftArrow=15]="LeftArrow",O[O.UpArrow=16]="UpArrow",O[O.RightArrow=17]="RightArrow",O[O.DownArrow=18]="DownArrow",O[O.Insert=19]="Insert",O[O.Delete=20]="Delete",O[O.Digit0=21]="Digit0",O[O.Digit1=22]="Digit1",O[O.Digit2=23]="Digit2",O[O.Digit3=24]="Digit3",O[O.Digit4=25]="Digit4",O[O.Digit5=26]="Digit5",O[O.Digit6=27]="Digit6",O[O.Digit7=28]="Digit7",O[O.Digit8=29]="Digit8",O[O.Digit9=30]="Digit9",O[O.KeyA=31]="KeyA",O[O.KeyB=32]="KeyB",O[O.KeyC=33]="KeyC",O[O.KeyD=34]="KeyD",O[O.KeyE=35]="KeyE",O[O.KeyF=36]="KeyF",O[O.KeyG=37]="KeyG",O[O.KeyH=38]="KeyH",O[O.KeyI=39]="KeyI",O[O.KeyJ=40]="KeyJ",O[O.KeyK=41]="KeyK",O[O.KeyL=42]="KeyL",O[O.KeyM=43]="KeyM",O[O.KeyN=44]="KeyN",O[O.KeyO=45]="KeyO",O[O.KeyP=46]="KeyP",O[O.KeyQ=47]="KeyQ",O[O.KeyR=48]="KeyR",O[O.KeyS=49]="KeyS",O[O.KeyT=50]="KeyT",O[O.KeyU=51]="KeyU",O[O.KeyV=52]="KeyV",O[O.KeyW=53]="KeyW",O[O.KeyX=54]="KeyX",O[O.KeyY=55]="KeyY",O[O.KeyZ=56]="KeyZ",O[O.Meta=57]="Meta",O[O.ContextMenu=58]="ContextMenu",O[O.F1=59]="F1",O[O.F2=60]="F2",O[O.F3=61]="F3",O[O.F4=62]="F4",O[O.F5=63]="F5",O[O.F6=64]="F6",O[O.F7=65]="F7",O[O.F8=66]="F8",O[O.F9=67]="F9",O[O.F10=68]="F10",O[O.F11=69]="F11",O[O.F12=70]="F12",O[O.F13=71]="F13",O[O.F14=72]="F14",O[O.F15=73]="F15",O[O.F16=74]="F16",O[O.F17=75]="F17",O[O.F18=76]="F18",O[O.F19=77]="F19",O[O.NumLock=78]="NumLock",O[O.ScrollLock=79]="ScrollLock",O[O.Semicolon=80]="Semicolon",O[O.Equal=81]="Equal",O[O.Comma=82]="Comma",O[O.Minus=83]="Minus",O[O.Period=84]="Period",O[O.Slash=85]="Slash",O[O.Backquote=86]="Backquote",O[O.BracketLeft=87]="BracketLeft",O[O.Backslash=88]="Backslash",O[O.BracketRight=89]="BracketRight",O[O.Quote=90]="Quote",O[O.OEM_8=91]="OEM_8",O[O.IntlBackslash=92]="IntlBackslash",O[O.Numpad0=93]="Numpad0",O[O.Numpad1=94]="Numpad1",O[O.Numpad2=95]="Numpad2",O[O.Numpad3=96]="Numpad3",O[O.Numpad4=97]="Numpad4",O[O.Numpad5=98]="Numpad5",O[O.Numpad6=99]="Numpad6",O[O.Numpad7=100]="Numpad7",O[O.Numpad8=101]="Numpad8",O[O.Numpad9=102]="Numpad9",O[O.NumpadMultiply=103]="NumpadMultiply",O[O.NumpadAdd=104]="NumpadAdd",O[O.NUMPAD_SEPARATOR=105]="NUMPAD_SEPARATOR",O[O.NumpadSubtract=106]="NumpadSubtract",O[O.NumpadDecimal=107]="NumpadDecimal",O[O.NumpadDivide=108]="NumpadDivide",O[O.KEY_IN_COMPOSITION=109]="KEY_IN_COMPOSITION",O[O.ABNT_C1=110]="ABNT_C1",O[O.ABNT_C2=111]="ABNT_C2",O[O.AudioVolumeMute=112]="AudioVolumeMute",O[O.AudioVolumeUp=113]="AudioVolumeUp",O[O.AudioVolumeDown=114]="AudioVolumeDown",O[O.BrowserSearch=115]="BrowserSearch",O[O.BrowserHome=116]="BrowserHome",O[O.BrowserBack=117]="BrowserBack",O[O.BrowserForward=118]="BrowserForward",O[O.MediaTrackNext=119]="MediaTrackNext",O[O.MediaTrackPrevious=120]="MediaTrackPrevious",O[O.MediaStop=121]="MediaStop",O[O.MediaPlayPause=122]="MediaPlayPause",O[O.LaunchMediaPlayer=123]="LaunchMediaPlayer",O[O.LaunchMail=124]="LaunchMail",O[O.LaunchApp2=125]="LaunchApp2",O[O.Clear=126]="Clear",O[O.MAX_VALUE=127]="MAX_VALUE"})(j||(j={}));var N;(function(O){O[O.Hint=1]="Hint",O[O.Info=2]="Info",O[O.Warning=4]="Warning",O[O.Error=8]="Error"})(N||(N={}));var B;(function(O){O[O.Unnecessary=1]="Unnecessary",O[O.Deprecated=2]="Deprecated"})(B||(B={}));var T;(function(O){O[O.Inline=1]="Inline",O[O.Gutter=2]="Gutter"})(T||(T={}));var H;(function(O){O[O.UNKNOWN=0]="UNKNOWN",O[O.TEXTAREA=1]="TEXTAREA",O[O.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",O[O.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",O[O.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",O[O.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",O[O.CONTENT_TEXT=6]="CONTENT_TEXT",O[O.CONTENT_EMPTY=7]="CONTENT_EMPTY",O[O.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",O[O.CONTENT_WIDGET=9]="CONTENT_WIDGET",O[O.OVERVIEW_RULER=10]="OVERVIEW_RULER",O[O.SCROLLBAR=11]="SCROLLBAR",O[O.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",O[O.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"})(H||(H={}));var Y;(function(O){O[O.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",O[O.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",O[O.TOP_CENTER=2]="TOP_CENTER"})(Y||(Y={}));var ee;(function(O){O[O.Left=1]="Left",O[O.Center=2]="Center",O[O.Right=4]="Right",O[O.Full=7]="Full"})(ee||(ee={}));var ce;(function(O){O[O.Left=0]="Left",O[O.Right=1]="Right",O[O.None=2]="None",O[O.LeftOfInjectedText=3]="LeftOfInjectedText",O[O.RightOfInjectedText=4]="RightOfInjectedText"})(ce||(ce={}));var pe;(function(O){O[O.Off=0]="Off",O[O.On=1]="On",O[O.Relative=2]="Relative",O[O.Interval=3]="Interval",O[O.Custom=4]="Custom"})(pe||(pe={}));var ge;(function(O){O[O.None=0]="None",O[O.Text=1]="Text",O[O.Blocks=2]="Blocks"})(ge||(ge={}));var fe;(function(O){O[O.Smooth=0]="Smooth",O[O.Immediate=1]="Immediate"})(fe||(fe={}));var oe;(function(O){O[O.Auto=1]="Auto",O[O.Hidden=2]="Hidden",O[O.Visible=3]="Visible"})(oe||(oe={}));var Z;(function(O){O[O.LTR=0]="LTR",O[O.RTL=1]="RTL"})(Z||(Z={}));var le;(function(O){O[O.Invoke=1]="Invoke",O[O.TriggerCharacter=2]="TriggerCharacter",O[O.ContentChange=3]="ContentChange"})(le||(le={}));var se;(function(O){O[O.File=0]="File",O[O.Module=1]="Module",O[O.Namespace=2]="Namespace",O[O.Package=3]="Package",O[O.Class=4]="Class",O[O.Method=5]="Method",O[O.Property=6]="Property",O[O.Field=7]="Field",O[O.Constructor=8]="Constructor",O[O.Enum=9]="Enum",O[O.Interface=10]="Interface",O[O.Function=11]="Function",O[O.Variable=12]="Variable",O[O.Constant=13]="Constant",O[O.String=14]="String",O[O.Number=15]="Number",O[O.Boolean=16]="Boolean",O[O.Array=17]="Array",O[O.Object=18]="Object",O[O.Key=19]="Key",O[O.Null=20]="Null",O[O.EnumMember=21]="EnumMember",O[O.Struct=22]="Struct",O[O.Event=23]="Event",O[O.Operator=24]="Operator",O[O.TypeParameter=25]="TypeParameter"})(se||(se={}));var X;(function(O){O[O.Deprecated=1]="Deprecated"})(X||(X={}));var K;(function(O){O[O.Hidden=0]="Hidden",O[O.Blink=1]="Blink",O[O.Smooth=2]="Smooth",O[O.Phase=3]="Phase",O[O.Expand=4]="Expand",O[O.Solid=5]="Solid"})(K||(K={}));var he;(function(O){O[O.Line=1]="Line",O[O.Block=2]="Block",O[O.Underline=3]="Underline",O[O.LineThin=4]="LineThin",O[O.BlockOutline=5]="BlockOutline",O[O.UnderlineThin=6]="UnderlineThin"})(he||(he={}));var ve;(function(O){O[O.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",O[O.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",O[O.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",O[O.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"})(ve||(ve={}));var Ee;(function(O){O[O.None=0]="None",O[O.Same=1]="Same",O[O.Indent=2]="Indent",O[O.DeepIndent=3]="DeepIndent"})(Ee||(Ee={}))},45933:(Tt,Fe,f)=>{f.d(Fe,{E6:()=>z,Hw:()=>$,YN:()=>te,b2:()=>h,gf:()=>ie,n9:()=>Q,oq:()=>x,tu:()=>S,vp:()=>J});var I=f(3765),h;(function(_){_.noSelection=I.kg("noSelection","No selection"),_.singleSelectionRange=I.kg("singleSelectionRange","Line {0}, Column {1} ({2} selected)"),_.singleSelection=I.kg("singleSelection","Line {0}, Column {1}"),_.multiSelectionRange=I.kg("multiSelectionRange","{0} selections ({1} characters selected)"),_.multiSelection=I.kg("multiSelection","{0} selections"),_.emergencyConfOn=I.kg("emergencyConfOn","Now changing the setting `accessibilitySupport` to 'on'."),_.openingDocs=I.kg("openingDocs","Now opening the Editor Accessibility documentation page."),_.readonlyDiffEditor=I.kg("readonlyDiffEditor"," in a read-only pane of a diff editor."),_.editableDiffEditor=I.kg("editableDiffEditor"," in a pane of a diff editor."),_.readonlyEditor=I.kg("readonlyEditor"," in a read-only code editor"),_.editableEditor=I.kg("editableEditor"," in a code editor"),_.changeConfigToOnMac=I.kg("changeConfigToOnMac","To configure the editor to be optimized for usage with a Screen Reader press Command+E now."),_.changeConfigToOnWinLinux=I.kg("changeConfigToOnWinLinux","To configure the editor to be optimized for usage with a Screen Reader press Control+E now."),_.auto_on=I.kg("auto_on","The editor is configured to be optimized for usage with a Screen Reader."),_.auto_off=I.kg("auto_off","The editor is configured to never be optimized for usage with a Screen Reader, which is not the case at this time."),_.tabFocusModeOnMsg=I.kg("tabFocusModeOnMsg","Pressing Tab in the current editor will move focus to the next focusable element. Toggle this behavior by pressing {0}."),_.tabFocusModeOnMsgNoKb=I.kg("tabFocusModeOnMsgNoKb","Pressing Tab in the current editor will move focus to the next focusable element. The command {0} is currently not triggerable by a keybinding."),_.tabFocusModeOffMsg=I.kg("tabFocusModeOffMsg","Pressing Tab in the current editor will insert the tab character. Toggle this behavior by pressing {0}."),_.tabFocusModeOffMsgNoKb=I.kg("tabFocusModeOffMsgNoKb","Pressing Tab in the current editor will insert the tab character. The command {0} is currently not triggerable by a keybinding."),_.openDocMac=I.kg("openDocMac","Press Command+H now to open a browser window with more information related to editor accessibility."),_.openDocWinLinux=I.kg("openDocWinLinux","Press Control+H now to open a browser window with more information related to editor accessibility."),_.outroMsg=I.kg("outroMsg","You can dismiss this tooltip and return to the editor by pressing Escape or Shift+Escape."),_.showAccessibilityHelpAction=I.kg("showAccessibilityHelpAction","Show Accessibility Help")})(h||(h={}));var te;(function(_){_.inspectTokensAction=I.kg("inspectTokens","Developer: Inspect Tokens")})(te||(te={}));var $;(function(_){_.gotoLineActionLabel=I.kg("gotoLineActionLabel","Go to Line/Column...")})($||($={}));var x;(function(_){_.helpQuickAccessActionLabel=I.kg("helpQuickAccess","Show all Quick Access Providers")})(x||(x={}));var ie;(function(_){_.quickCommandActionLabel=I.kg("quickCommandActionLabel","Command Palette"),_.quickCommandHelp=I.kg("quickCommandActionHelp","Show And Run Commands")})(ie||(ie={}));var Q;(function(_){_.quickOutlineActionLabel=I.kg("quickOutlineActionLabel","Go to Symbol..."),_.quickOutlineByCategoryActionLabel=I.kg("quickOutlineByCategoryActionLabel","Go to Symbol by Category...")})(Q||(Q={}));var J;(function(_){_.editorViewAccessibleLabel=I.kg("editorViewAccessibleLabel","Editor content"),_.accessibilityHelpMessage=I.kg("accessibilityHelpMessage","Press Alt+F1 for Accessibility Options.")})(J||(J={}));var z;(function(_){_.toggleHighContrast=I.kg("toggleHighContrast","Toggle High Contrast Theme")})(z||(z={}));var S;(function(_){_.bulkEditServiceSummary=I.kg("bulkEditServiceSummary","Made {0} edits in {1} files")})(S||(S={}))},83455:(Tt,Fe,f)=>{f.d(Fe,{E$:()=>$,HP:()=>Q,Ic:()=>z,U0:()=>te,Wn:()=>I,bg:()=>x,mS:()=>ie,uK:()=>h,vn:()=>J});class I{constructor(){this.changeType=1}}class h{constructor(_,y,C,d,w){this.ownerId=_,this.lineNumber=y,this.column=C,this.options=d,this.order=w}static applyInjectedText(_,y){if(!y||y.length===0)return _;let C="",d=0;for(const w of y)C+=_.substring(d,w.column-1),d=w.column-1,C+=w.options.content;return C+=_.substring(d),C}static fromDecorations(_){const y=[];for(const C of _)C.options.before&&C.options.before.content.length>0&&y.push(new h(C.ownerId,C.range.startLineNumber,C.range.startColumn,C.options.before,0)),C.options.after&&C.options.after.content.length>0&&y.push(new h(C.ownerId,C.range.endLineNumber,C.range.endColumn,C.options.after,1));return y.sort((C,d)=>C.lineNumber===d.lineNumber?C.column===d.column?C.order-d.order:C.column-d.column:C.lineNumber-d.lineNumber),y}}class te{constructor(_,y,C){this.changeType=2,this.lineNumber=_,this.detail=y,this.injectedText=C}}class ${constructor(_,y){this.changeType=3,this.fromLineNumber=_,this.toLineNumber=y}}class x{constructor(_,y,C,d){this.changeType=4,this.injectedTexts=d,this.fromLineNumber=_,this.toLineNumber=y,this.detail=C}}class ie{constructor(){this.changeType=5}}class Q{constructor(_,y,C,d){this.changes=_,this.versionId=y,this.isUndoing=C,this.isRedoing=d,this.resultingSelection=null}containsEvent(_){for(let y=0,C=this.changes.length;y<C;y++)if(this.changes[y].changeType===_)return!0;return!1}static merge(_,y){const C=[].concat(_.changes).concat(y.changes),d=y.versionId,w=_.isUndoing||y.isUndoing,D=_.isRedoing||y.isRedoing;return new Q(C,d,w,D)}}class J{constructor(_){this.changes=_}}class z{constructor(_,y){this.rawContentChangedEvent=_,this.contentChangedEvent=y}merge(_){const y=Q.merge(this.rawContentChangedEvent,_.rawContentChangedEvent),C=z._mergeChangeEvents(this.contentChangedEvent,_.contentChangedEvent);return new z(y,C)}static _mergeChangeEvents(_,y){const C=[].concat(_.changes).concat(y.changes),d=y.eol,w=y.versionId,D=_.isUndoing||y.isUndoing,L=_.isRedoing||y.isRedoing,k=_.isFlush||y.isFlush;return{changes:C,eol:d,versionId:w,isUndoing:D,isRedoing:L,isFlush:k}}}},60779:(Tt,Fe,f)=>{f.d(Fe,{N6:()=>I,TH:()=>h,pv:()=>te});var I;(function($){$[$.Disabled=0]="Disabled",$[$.EnabledForActive=1]="EnabledForActive",$[$.Enabled=2]="Enabled"})(I||(I={}));class h{constructor(x,ie,Q,J,z,S){if(this.visibleColumn=x,this.column=ie,this.className=Q,this.horizontalLine=J,this.forWrappedLinesAfterColumn=z,this.forWrappedLinesBeforeOrAtColumn=S,x!==-1==(ie!==-1))throw new Error}}class te{constructor(x,ie){this.top=x,this.endColumn=ie}}},57445:(Tt,Fe,f)=>{f.d(Fe,{f:()=>h});var I=f(15910);class h{constructor(x,ie,Q){this._lineTokensBrand=void 0,this._tokens=x,this._tokensCount=this._tokens.length>>>1,this._text=ie,this._languageIdCodec=Q}static createEmpty(x,ie){const Q=h.defaultTokenMetadata,J=new Uint32Array(2);return J[0]=x.length,J[1]=Q,new h(J,x,ie)}equals(x){return x instanceof h?this.slicedEquals(x,0,this._tokensCount):!1}slicedEquals(x,ie,Q){if(this._text!==x._text||this._tokensCount!==x._tokensCount)return!1;const J=ie<<1,z=J+(Q<<1);for(let S=J;S<z;S++)if(this._tokens[S]!==x._tokens[S])return!1;return!0}getLineContent(){return this._text}getCount(){return this._tokensCount}getStartOffset(x){return x>0?this._tokens[x-1<<1]:0}getMetadata(x){return this._tokens[(x<<1)+1]}getLanguageId(x){const ie=this._tokens[(x<<1)+1],Q=I.x.getLanguageId(ie);return this._languageIdCodec.decodeLanguageId(Q)}getStandardTokenType(x){const ie=this._tokens[(x<<1)+1];return I.x.getTokenType(ie)}getForeground(x){const ie=this._tokens[(x<<1)+1];return I.x.getForeground(ie)}getClassName(x){const ie=this._tokens[(x<<1)+1];return I.x.getClassNameFromMetadata(ie)}getInlineStyle(x,ie){const Q=this._tokens[(x<<1)+1];return I.x.getInlineStyleFromMetadata(Q,ie)}getPresentation(x){const ie=this._tokens[(x<<1)+1];return I.x.getPresentationFromMetadata(ie)}getEndOffset(x){return this._tokens[x<<1]}findTokenIndexAtOffset(x){return h.findIndexInTokensArray(this._tokens,x)}inflate(){return this}sliceAndInflate(x,ie,Q){return new te(this,x,ie,Q)}static convertToEndOffset(x,ie){const J=(x.length>>>1)-1;for(let z=0;z<J;z++)x[z<<1]=x[z+1<<1];x[J<<1]=ie}static findIndexInTokensArray(x,ie){if(x.length<=2)return 0;let Q=0,J=(x.length>>>1)-1;for(;Q<J;){const z=Q+Math.floor((J-Q)/2),S=x[z<<1];if(S===ie)return z+1;S<ie?Q=z+1:S>ie&&(J=z)}return Q}withInserted(x){if(x.length===0)return this;let ie=0,Q=0,J="";const z=new Array;let S=0;for(;;){const _=ie<this._tokensCount?this._tokens[ie<<1]:-1,y=Q<x.length?x[Q]:null;if(_!==-1&&(y===null||_<=y.offset)){J+=this._text.substring(S,_);const C=this._tokens[(ie<<1)+1];z.push(J.length,C),ie++,S=_}else if(y){if(y.offset>S){J+=this._text.substring(S,y.offset);const C=this._tokens[(ie<<1)+1];z.push(J.length,C),S=y.offset}J+=y.text,z.push(J.length,y.tokenMetadata),Q++}else break}return new h(new Uint32Array(z),J,this._languageIdCodec)}}h.defaultTokenMetadata=(32768|2<<24)>>>0;class te{constructor(x,ie,Q,J){this._source=x,this._startOffset=ie,this._endOffset=Q,this._deltaOffset=J,this._firstTokenIndex=x.findTokenIndexAtOffset(ie),this._tokensCount=0;for(let z=this._firstTokenIndex,S=x.getCount();z<S&&!(x.getStartOffset(z)>=Q);z++)this._tokensCount++}getMetadata(x){return this._source.getMetadata(this._firstTokenIndex+x)}getLanguageId(x){return this._source.getLanguageId(this._firstTokenIndex+x)}getLineContent(){return this._source.getLineContent().substring(this._startOffset,this._endOffset)}equals(x){return x instanceof te?this._startOffset===x._startOffset&&this._endOffset===x._endOffset&&this._deltaOffset===x._deltaOffset&&this._source.slicedEquals(x._source,this._firstTokenIndex,this._tokensCount):!1}getCount(){return this._tokensCount}getForeground(x){return this._source.getForeground(this._firstTokenIndex+x)}getEndOffset(x){const ie=this._source.getEndOffset(this._firstTokenIndex+x);return Math.min(this._endOffset,ie)-this._startOffset+this._deltaOffset}getClassName(x){return this._source.getClassName(this._firstTokenIndex+x)}getInlineStyle(x,ie){return this._source.getInlineStyle(this._firstTokenIndex+x,ie)}getPresentation(x){return this._source.getPresentation(this._firstTokenIndex+x)}findTokenIndexAtOffset(x){return this._source.findTokenIndexAtOffset(x+this._startOffset-this._deltaOffset)-this._firstTokenIndex}}},45561:(Tt,Fe,f)=>{f.d(Fe,{Bs:()=>x,d:()=>h});var I=f(16844);class h{constructor(Q,J,z,S){this.startColumn=Q,this.endColumn=J,this.className=z,this.type=S,this._lineDecorationBrand=void 0}static _equals(Q,J){return Q.startColumn===J.startColumn&&Q.endColumn===J.endColumn&&Q.className===J.className&&Q.type===J.type}static equalsArr(Q,J){const z=Q.length,S=J.length;if(z!==S)return!1;for(let _=0;_<z;_++)if(!h._equals(Q[_],J[_]))return!1;return!0}static extractWrapped(Q,J,z){if(Q.length===0)return Q;const S=J+1,_=z+1,y=z-J,C=[];let d=0;for(const w of Q)w.endColumn<=S||w.startColumn>=_||(C[d++]=new h(Math.max(1,w.startColumn-S+1),Math.min(y+1,w.endColumn-S+1),w.className,w.type));return C}static filter(Q,J,z,S){if(Q.length===0)return[];const _=[];let y=0;for(let C=0,d=Q.length;C<d;C++){const w=Q[C],D=w.range;if(D.endLineNumber<J||D.startLineNumber>J||D.isEmpty()&&(w.type===0||w.type===3))continue;const L=D.startLineNumber===J?D.startColumn:z,k=D.endLineNumber===J?D.endColumn:S;_[y++]=new h(L,k,w.inlineClassName,w.type)}return _}static _typeCompare(Q,J){const z=[2,0,1,3];return z[Q]-z[J]}static compare(Q,J){if(Q.startColumn!==J.startColumn)return Q.startColumn-J.startColumn;if(Q.endColumn!==J.endColumn)return Q.endColumn-J.endColumn;const z=h._typeCompare(Q.type,J.type);return z!==0?z:Q.className!==J.className?Q.className<J.className?-1:1:0}}class te{constructor(Q,J,z,S){this.startOffset=Q,this.endOffset=J,this.className=z,this.metadata=S}}class ${constructor(){this.stopOffsets=[],this.classNames=[],this.metadata=[],this.count=0}static _metadata(Q){let J=0;for(let z=0,S=Q.length;z<S;z++)J|=Q[z];return J}consumeLowerThan(Q,J,z){for(;this.count>0&&this.stopOffsets[0]<Q;){let S=0;for(;S+1<this.count&&this.stopOffsets[S]===this.stopOffsets[S+1];)S++;z.push(new te(J,this.stopOffsets[S],this.classNames.join(" "),$._metadata(this.metadata))),J=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&&J<Q&&(z.push(new te(J,Q-1,this.classNames.join(" "),$._metadata(this.metadata))),J=Q),J}insert(Q,J,z){if(this.count===0||this.stopOffsets[this.count-1]<=Q)this.stopOffsets.push(Q),this.classNames.push(J),this.metadata.push(z);else for(let S=0;S<this.count;S++)if(this.stopOffsets[S]>=Q){this.stopOffsets.splice(S,0,Q),this.classNames.splice(S,0,J),this.metadata.splice(S,0,z);break}this.count++}}class x{static normalize(Q,J){if(J.length===0)return[];const z=[],S=new $;let _=0;for(let y=0,C=J.length;y<C;y++){const d=J[y];let w=d.startColumn,D=d.endColumn;const L=d.className,k=d.type===1?2:d.type===2?4:0;if(w>1){const B=Q.charCodeAt(w-2);I.pc(B)&&w--}if(D>1){const B=Q.charCodeAt(D-2);I.pc(B)&&D--}const j=w-1,N=D-2;_=S.consumeLowerThan(j,_,z),S.count===0&&(_=j),S.insert(N,L,k)}return S.consumeLowerThan(1073741824,_,z),z}}},39723:(Tt,Fe,f)=>{f.d(Fe,{wZ:()=>Q,MT:()=>x,zL:()=>ie,UW:()=>S,Md:()=>y});var I=f(16844),h=f(54324),te=f(45561);class ${constructor(Y,ee,ce,pe){this.endIndex=Y,this.type=ee,this.metadata=ce,this.containsRTL=pe,this._linePartBrand=void 0}isWhitespace(){return!!(this.metadata&1)}isPseudoAfter(){return!!(this.metadata&4)}}class x{constructor(Y,ee){this.startOffset=Y,this.endOffset=ee}equals(Y){return this.startOffset===Y.startOffset&&this.endOffset===Y.endOffset}}class ie{constructor(Y,ee,ce,pe,ge,fe,oe,Z,le,se,X,K,he,ve,Ee,O,ot,lt,We){this.useMonospaceOptimizations=Y,this.canUseHalfwidthRightwardsArrow=ee,this.lineContent=ce,this.continuesWithWrappedLine=pe,this.isBasicASCII=ge,this.containsRTL=fe,this.fauxIndentLength=oe,this.lineTokens=Z,this.lineDecorations=le.sort(te.d.compare),this.tabSize=se,this.startVisibleColumn=X,this.spaceWidth=K,this.stopRenderingLineAfter=Ee,this.renderWhitespace=O==="all"?4:O==="boundary"?1:O==="selection"?2:O==="trailing"?3:0,this.renderControlCharacters=ot,this.fontLigatures=lt,this.selectionsOnLine=We&&We.sort((Pe,Ue)=>Pe.startOffset<Ue.startOffset?-1:1);const Ke=Math.abs(ve-K),De=Math.abs(he-K);Ke<De?(this.renderSpaceWidth=ve,this.renderSpaceCharCode=11825):(this.renderSpaceWidth=he,this.renderSpaceCharCode=183)}sameSelection(Y){if(this.selectionsOnLine===null)return Y===null;if(Y===null||Y.length!==this.selectionsOnLine.length)return!1;for(let ee=0;ee<this.selectionsOnLine.length;ee++)if(!this.selectionsOnLine[ee].equals(Y[ee]))return!1;return!0}equals(Y){return this.useMonospaceOptimizations===Y.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===Y.canUseHalfwidthRightwardsArrow&&this.lineContent===Y.lineContent&&this.continuesWithWrappedLine===Y.continuesWithWrappedLine&&this.isBasicASCII===Y.isBasicASCII&&this.containsRTL===Y.containsRTL&&this.fauxIndentLength===Y.fauxIndentLength&&this.tabSize===Y.tabSize&&this.startVisibleColumn===Y.startVisibleColumn&&this.spaceWidth===Y.spaceWidth&&this.renderSpaceWidth===Y.renderSpaceWidth&&this.renderSpaceCharCode===Y.renderSpaceCharCode&&this.stopRenderingLineAfter===Y.stopRenderingLineAfter&&this.renderWhitespace===Y.renderWhitespace&&this.renderControlCharacters===Y.renderControlCharacters&&this.fontLigatures===Y.fontLigatures&&te.d.equalsArr(this.lineDecorations,Y.lineDecorations)&&this.lineTokens.equals(Y.lineTokens)&&this.sameSelection(Y.selectionsOnLine)}}class Q{constructor(Y,ee){this.partIndex=Y,this.charIndex=ee}}class J{constructor(Y,ee){this.length=Y,this._data=new Uint32Array(this.length),this._horizontalOffset=new Uint32Array(this.length)}static getPartIndex(Y){return(Y&4294901760)>>>16}static getCharIndex(Y){return(Y&65535)>>>0}setColumnInfo(Y,ee,ce,pe){const ge=(ee<<16|ce<<0)>>>0;this._data[Y-1]=ge,this._horizontalOffset[Y-1]=pe}getHorizontalOffset(Y){return this._horizontalOffset.length===0?0:this._horizontalOffset[Y-1]}charOffsetToPartData(Y){return this.length===0?0:Y<0?this._data[0]:Y>=this.length?this._data[this.length-1]:this._data[Y]}getDomPosition(Y){const ee=this.charOffsetToPartData(Y-1),ce=J.getPartIndex(ee),pe=J.getCharIndex(ee);return new Q(ce,pe)}getColumn(Y,ee){return this.partDataToCharOffset(Y.partIndex,ee,Y.charIndex)+1}partDataToCharOffset(Y,ee,ce){if(this.length===0)return 0;const pe=(Y<<16|ce<<0)>>>0;let ge=0,fe=this.length-1;for(;ge+1<fe;){const Ee=ge+fe>>>1,O=this._data[Ee];if(O===pe)return Ee;O>pe?fe=Ee:ge=Ee}if(ge===fe)return ge;const oe=this._data[ge],Z=this._data[fe];if(oe===pe)return ge;if(Z===pe)return fe;const le=J.getPartIndex(oe),se=J.getCharIndex(oe),X=J.getPartIndex(Z);let K;le!==X?K=ee:K=J.getCharIndex(Z);const he=ce-se,ve=K-ce;return he<=ve?ge:fe}}class z{constructor(Y,ee,ce){this._renderLineOutputBrand=void 0,this.characterMapping=Y,this.containsRTL=ee,this.containsForeignElements=ce}}function S(H,Y){if(H.lineContent.length===0){if(H.lineDecorations.length>0){Y.appendASCIIString("<span>");let ee=0,ce=0,pe=0;for(const fe of H.lineDecorations)(fe.type===1||fe.type===2)&&(Y.appendASCIIString('<span class="'),Y.appendASCIIString(fe.className),Y.appendASCIIString('"></span>'),fe.type===1&&(pe|=1,ee++),fe.type===2&&(pe|=2,ce++));Y.appendASCIIString("</span>");const ge=new J(1,ee+ce);return ge.setColumnInfo(1,ee,0,0),new z(ge,!1,pe)}return Y.appendASCIIString("<span><span></span></span>"),new z(new J(0,0),!1,0)}return B(d(H),Y)}class _{constructor(Y,ee,ce,pe){this.characterMapping=Y,this.html=ee,this.containsRTL=ce,this.containsForeignElements=pe}}function y(H){const Y=(0,h.Du)(1e4),ee=S(H,Y);return new _(ee.characterMapping,Y.build(),ee.containsRTL,ee.containsForeignElements)}class C{constructor(Y,ee,ce,pe,ge,fe,oe,Z,le,se,X,K,he,ve,Ee){this.fontIsMonospace=Y,this.canUseHalfwidthRightwardsArrow=ee,this.lineContent=ce,this.len=pe,this.isOverflowing=ge,this.parts=fe,this.containsForeignElements=oe,this.fauxIndentLength=Z,this.tabSize=le,this.startVisibleColumn=se,this.containsRTL=X,this.spaceWidth=K,this.renderSpaceCharCode=he,this.renderWhitespace=ve,this.renderControlCharacters=Ee}}function d(H){const Y=H.lineContent;let ee,ce;H.stopRenderingLineAfter!==-1&&H.stopRenderingLineAfter<Y.length?(ee=!0,ce=H.stopRenderingLineAfter):(ee=!1,ce=Y.length);let pe=w(Y,H.containsRTL,H.lineTokens,H.fauxIndentLength,ce);H.renderControlCharacters&&!H.isBasicASCII&&(pe=k(Y,pe)),(H.renderWhitespace===4||H.renderWhitespace===1||H.renderWhitespace===2&&H.selectionsOnLine||H.renderWhitespace===3)&&(pe=j(H,Y,ce,pe));let ge=0;if(H.lineDecorations.length>0){for(let fe=0,oe=H.lineDecorations.length;fe<oe;fe++){const Z=H.lineDecorations[fe];Z.type===3||Z.type===1?ge|=1:Z.type===2&&(ge|=2)}pe=N(Y,ce,pe,H.lineDecorations)}return H.containsRTL||(pe=D(Y,pe,!H.isBasicASCII||H.fontLigatures)),new C(H.useMonospaceOptimizations,H.canUseHalfwidthRightwardsArrow,Y,ce,ee,pe,ge,H.fauxIndentLength,H.tabSize,H.startVisibleColumn,H.containsRTL,H.spaceWidth,H.renderSpaceCharCode,H.renderWhitespace,H.renderControlCharacters)}function w(H,Y,ee,ce,pe){const ge=[];let fe=0;ce>0&&(ge[fe++]=new $(ce,"",0,!1));let oe=ce;for(let Z=0,le=ee.getCount();Z<le;Z++){const se=ee.getEndOffset(Z);if(se<=ce)continue;const X=ee.getClassName(Z);if(se>=pe){const he=Y?I.E_(H.substring(oe,pe)):!1;ge[fe++]=new $(pe,X,0,he);break}const K=Y?I.E_(H.substring(oe,se)):!1;ge[fe++]=new $(se,X,0,K),oe=se}return ge}function D(H,Y,ee){let ce=0;const pe=[];let ge=0;if(ee)for(let fe=0,oe=Y.length;fe<oe;fe++){const Z=Y[fe],le=Z.endIndex;if(ce+50<le){const se=Z.type,X=Z.metadata,K=Z.containsRTL;let he=-1,ve=ce;for(let Ee=ce;Ee<le;Ee++)H.charCodeAt(Ee)===32&&(he=Ee),he!==-1&&Ee-ve>=50&&(pe[ge++]=new $(he+1,se,X,K),ve=he+1,he=-1);ve!==le&&(pe[ge++]=new $(le,se,X,K))}else pe[ge++]=Z;ce=le}else for(let fe=0,oe=Y.length;fe<oe;fe++){const Z=Y[fe],le=Z.endIndex,se=le-ce;if(se>50){const X=Z.type,K=Z.metadata,he=Z.containsRTL,ve=Math.ceil(se/50);for(let Ee=1;Ee<ve;Ee++){const O=ce+Ee*50;pe[ge++]=new $(O,X,K,he)}pe[ge++]=new $(le,X,K,he)}else pe[ge++]=Z;ce=le}return pe}function L(H){return H<32?H!==9:H===127||H>=8234&&H<=8238||H>=8294&&H<=8297||H>=8206&&H<=8207||H===1564}function k(H,Y){const ee=[];let ce=new $(0,"",0,!1),pe=0;for(const ge of Y){const fe=ge.endIndex;for(;pe<fe;pe++){const oe=H.charCodeAt(pe);L(oe)&&(pe>ce.endIndex&&(ce=new $(pe,ge.type,ge.metadata,ge.containsRTL),ee.push(ce)),ce=new $(pe+1,"mtkcontrol",ge.metadata,!1),ee.push(ce))}pe>ce.endIndex&&(ce=new $(fe,ge.type,ge.metadata,ge.containsRTL),ee.push(ce))}return ee}function j(H,Y,ee,ce){const pe=H.continuesWithWrappedLine,ge=H.fauxIndentLength,fe=H.tabSize,oe=H.startVisibleColumn,Z=H.useMonospaceOptimizations,le=H.selectionsOnLine,se=H.renderWhitespace===1,X=H.renderWhitespace===3,K=H.renderSpaceWidth!==H.spaceWidth,he=[];let ve=0,Ee=0,O=ce[Ee].type,ot=ce[Ee].containsRTL,lt=ce[Ee].endIndex;const We=ce.length;let Ke=!1,De=I.HG(Y),Pe;De===-1?(Ke=!0,De=ee,Pe=ee):Pe=I.lT(Y);let Ue=!1,Re=0,et=le&&le[Re],rt=oe%fe;for(let Dt=ge;Dt<ee;Dt++){const xt=Y.charCodeAt(Dt);et&&Dt>=et.endOffset&&(Re++,et=le&&le[Re]);let Ie;if(Dt<De||Dt>Pe)Ie=!0;else if(xt===9)Ie=!0;else if(xt===32)if(se)if(Ue)Ie=!0;else{const dt=Dt+1<ee?Y.charCodeAt(Dt+1):0;Ie=dt===32||dt===9}else Ie=!0;else Ie=!1;if(Ie&&le&&(Ie=!!et&&et.startOffset<=Dt&&et.endOffset>Dt),Ie&&X&&(Ie=Ke||Dt>Pe),Ie&&ot&&Dt>=De&&Dt<=Pe&&(Ie=!1),Ue){if(!Ie||!Z&&rt>=fe){if(K){const dt=ve>0?he[ve-1].endIndex:ge;for(let ft=dt+1;ft<=Dt;ft++)he[ve++]=new $(ft,"mtkw",1,!1)}else he[ve++]=new $(Dt,"mtkw",1,!1);rt=rt%fe}}else(Dt===lt||Ie&&Dt>ge)&&(he[ve++]=new $(Dt,O,0,ot),rt=rt%fe);for(xt===9?rt=fe:I.ne(xt)?rt+=2:rt++,Ue=Ie;Dt===lt&&(Ee++,Ee<We);)O=ce[Ee].type,ot=ce[Ee].containsRTL,lt=ce[Ee].endIndex}let Lt=!1;if(Ue)if(pe&&se){const Dt=ee>0?Y.charCodeAt(ee-1):0,xt=ee>1?Y.charCodeAt(ee-2):0;Dt===32&&xt!==32&&xt!==9||(Lt=!0)}else Lt=!0;if(Lt)if(K){const Dt=ve>0?he[ve-1].endIndex:ge;for(let xt=Dt+1;xt<=ee;xt++)he[ve++]=new $(xt,"mtkw",1,!1)}else he[ve++]=new $(ee,"mtkw",1,!1);else he[ve++]=new $(ee,O,0,ot);return he}function N(H,Y,ee,ce){ce.sort(te.d.compare);const pe=te.Bs.normalize(H,ce),ge=pe.length;let fe=0;const oe=[];let Z=0,le=0;for(let X=0,K=ee.length;X<K;X++){const he=ee[X],ve=he.endIndex,Ee=he.type,O=he.metadata,ot=he.containsRTL;for(;fe<ge&&pe[fe].startOffset<ve;){const lt=pe[fe];if(lt.startOffset>le&&(le=lt.startOffset,oe[Z++]=new $(le,Ee,O,ot)),lt.endOffset+1<=ve)le=lt.endOffset+1,oe[Z++]=new $(le,Ee+" "+lt.className,O|lt.metadata,ot),fe++;else{le=ve,oe[Z++]=new $(le,Ee+" "+lt.className,O|lt.metadata,ot);break}}ve>le&&(le=ve,oe[Z++]=new $(le,Ee,O,ot))}const se=ee[ee.length-1].endIndex;if(fe<ge&&pe[fe].startOffset===se)for(;fe<ge&&pe[fe].startOffset===se;){const X=pe[fe];oe[Z++]=new $(le,X.className,X.metadata,!1),fe++}return oe}function B(H,Y){const ee=H.fontIsMonospace,ce=H.canUseHalfwidthRightwardsArrow,pe=H.containsForeignElements,ge=H.lineContent,fe=H.len,oe=H.isOverflowing,Z=H.parts,le=H.fauxIndentLength,se=H.tabSize,X=H.startVisibleColumn,K=H.containsRTL,he=H.spaceWidth,ve=H.renderSpaceCharCode,Ee=H.renderWhitespace,O=H.renderControlCharacters,ot=new J(fe+1,Z.length);let lt=!1,We=0,Ke=X,De=0,Pe=0,Ue=0;K?Y.appendASCIIString('<span dir="ltr">'):Y.appendASCIIString("<span>");for(let Re=0,et=Z.length;Re<et;Re++){const rt=Z[Re],Lt=rt.endIndex,Dt=rt.type,xt=rt.containsRTL,Ie=Ee!==0&&rt.isWhitespace(),dt=Ie&&!ee&&(Dt==="mtkw"||!pe),ft=We===Lt&&rt.isPseudoAfter();if(De=0,Y.appendASCIIString("<span "),xt&&Y.appendASCIIString('style="unicode-bidi:isolate" '),Y.appendASCIIString('class="'),Y.appendASCIIString(dt?"mtkz":Dt),Y.appendASCII(34),Ie){let Bt=0;{let jt=We,pt=Ke;for(;jt<Lt;jt++){const zt=(ge.charCodeAt(jt)===9?se-pt%se:1)|0;Bt+=zt,jt>=le&&(pt+=zt)}}for(dt&&(Y.appendASCIIString(' style="width:'),Y.appendASCIIString(String(he*Bt)),Y.appendASCIIString('px"')),Y.appendASCII(62);We<Lt;We++){ot.setColumnInfo(We+1,Re-Ue,De,Pe),Ue=0;const jt=ge.charCodeAt(We);let pt,bt;if(jt===9){pt=se-Ke%se|0,bt=pt,!ce||bt>1?Y.write1(8594):Y.write1(65515);for(let zt=2;zt<=bt;zt++)Y.write1(160)}else pt=2,bt=1,Y.write1(ve),Y.write1(8204);De+=pt,Pe+=bt,We>=le&&(Ke+=bt)}}else for(Y.appendASCII(62);We<Lt;We++){ot.setColumnInfo(We+1,Re-Ue,De,Pe),Ue=0;const Bt=ge.charCodeAt(We);let jt=1,pt=1;switch(Bt){case 9:jt=se-Ke%se,pt=jt;for(let bt=1;bt<=jt;bt++)Y.write1(160);break;case 32:Y.write1(160);break;case 60:Y.appendASCIIString("<");break;case 62:Y.appendASCIIString(">");break;case 38:Y.appendASCIIString("&");break;case 0:O?Y.write1(9216):Y.appendASCIIString("�");break;case 65279:case 8232:case 8233:case 133:Y.write1(65533);break;default:I.ne(Bt)&&pt++,O&&Bt<32?Y.write1(9216+Bt):O&&Bt===127?Y.write1(9249):O&&L(Bt)?(Y.appendASCIIString("[U+"),Y.appendASCIIString(T(Bt)),Y.appendASCIIString("]"),jt=8,pt=jt):Y.write1(Bt)}De+=jt,Pe+=pt,We>=le&&(Ke+=pt)}ft?Ue++:Ue=0,We>=fe&&!lt&&rt.isPseudoAfter()&&(lt=!0,ot.setColumnInfo(We+1,Re,De,Pe)),Y.appendASCIIString("</span>")}return lt||ot.setColumnInfo(fe+1,Z.length-1,De,Pe),oe&&Y.appendASCIIString("<span>…</span>"),Y.appendASCIIString("</span>"),new z(ot,K,pe)}function T(H){return H.toString(16).toUpperCase().padStart(4,"0")}},11608:(Tt,Fe,f)=>{f.d(Fe,{GP:()=>x,LM:()=>te,Uv:()=>S,kI:()=>Q,nt:()=>$,or:()=>J,qL:()=>ie,vo:()=>z});var I=f(16844),h=f(28061);class te{constructor(y,C,d,w){this._viewportBrand=void 0,this.top=y|0,this.left=C|0,this.width=d|0,this.height=w|0}}class ${constructor(y,C){this.tabSize=y,this.data=C}}class x{constructor(y,C,d,w,D,L,k){this._viewLineDataBrand=void 0,this.content=y,this.continuesWithWrappedLine=C,this.minColumn=d,this.maxColumn=w,this.startVisibleColumn=D,this.tokens=L,this.inlineDecorations=k}}class ie{constructor(y,C,d,w,D,L,k,j,N,B){this.minColumn=y,this.maxColumn=C,this.content=d,this.continuesWithWrappedLine=w,this.isBasicASCII=ie.isBasicASCII(d,L),this.containsRTL=ie.containsRTL(d,this.isBasicASCII,D),this.tokens=k,this.inlineDecorations=j,this.tabSize=N,this.startVisibleColumn=B}static isBasicASCII(y,C){return C?I.aC(y):!0}static containsRTL(y,C,d){return!C&&d?I.E_(y):!1}}class Q{constructor(y,C,d){this.range=y,this.inlineClassName=C,this.type=d}}class J{constructor(y,C,d,w){this.startOffset=y,this.endOffset=C,this.inlineClassName=d,this.inlineClassNameAffectsLetterSpacing=w}toInlineDecoration(y){return new Q(new h.Q(y,this.startOffset+1,y,this.endOffset+1),this.inlineClassName,this.inlineClassNameAffectsLetterSpacing?3:0)}}class z{constructor(y,C){this._viewModelDecorationBrand=void 0,this.range=y,this.options=C}}class S{constructor(y,C,d){this.color=y,this.zIndex=C,this.data=d}static cmp(y,C){return y.zIndex===C.zIndex?y.color<C.color?-1:y.color>C.color?1:0:y.zIndex-C.zIndex}}},96803:(Tt,Fe,f)=>{f.d(Fe,{iE:()=>h,rW:()=>te});class I{constructor(x,ie,Q){this._colorZoneBrand=void 0,this.from=x|0,this.to=ie|0,this.colorId=Q|0}static compare(x,ie){return x.colorId===ie.colorId?x.from===ie.from?x.to-ie.to:x.from-ie.from:x.colorId-ie.colorId}}class h{constructor(x,ie,Q,J){this._overviewRulerZoneBrand=void 0,this.startLineNumber=x,this.endLineNumber=ie,this.heightInLines=Q,this.color=J,this._colorZone=null}static compare(x,ie){return x.color===ie.color?x.startLineNumber===ie.startLineNumber?x.heightInLines===ie.heightInLines?x.endLineNumber-ie.endLineNumber:x.heightInLines-ie.heightInLines:x.startLineNumber-ie.startLineNumber:x.color<ie.color?-1:1}setColorZone(x){this._colorZone=x}getColorZones(){return this._colorZone}}class te{constructor(x){this._getVerticalOffsetForLine=x,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(x){this._zones=x,this._zones.sort(h.compare)}setLineHeight(x){return this._lineHeight===x?!1:(this._lineHeight=x,this._colorZonesInvalid=!0,!0)}setPixelRatio(x){this._pixelRatio=x,this._colorZonesInvalid=!0}getDOMWidth(){return this._domWidth}getCanvasWidth(){return this._domWidth*this._pixelRatio}setDOMWidth(x){return this._domWidth===x?!1:(this._domWidth=x,this._colorZonesInvalid=!0,!0)}getDOMHeight(){return this._domHeight}getCanvasHeight(){return this._domHeight*this._pixelRatio}setDOMHeight(x){return this._domHeight===x?!1:(this._domHeight=x,this._colorZonesInvalid=!0,!0)}getOuterHeight(){return this._outerHeight}setOuterHeight(x){return this._outerHeight===x?!1:(this._outerHeight=x,this._colorZonesInvalid=!0,!0)}resolveColorZones(){const x=this._colorZonesInvalid,ie=Math.floor(this._lineHeight),Q=Math.floor(this.getCanvasHeight()),J=Math.floor(this._outerHeight),z=Q/J,S=Math.floor(4*this._pixelRatio/2),_=[];for(let y=0,C=this._zones.length;y<C;y++){const d=this._zones[y];if(!x){const Y=d.getColorZones();if(Y){_.push(Y);continue}}const w=this._getVerticalOffsetForLine(d.startLineNumber),D=d.heightInLines===0?this._getVerticalOffsetForLine(d.endLineNumber)+ie:w+d.heightInLines*ie,L=Math.floor(z*w),k=Math.floor(z*D);let j=Math.floor((L+k)/2),N=k-j;N<S&&(N=S),j-N<0&&(j=N),j+N>Q&&(j=Q-N);const B=d.color;let T=this._color2Id[B];T||(T=++this._lastAssignedId,this._color2Id[B]=T,this._id2Color[T]=B);const H=new I(j-N,j+N,T);d.setColorZone(H),_.push(H)}return this._colorZonesInvalid=!1,_.sort(I.compare),_}}},31430:(Tt,Fe,f)=>{f.d(Fe,{GN:()=>ie,UB:()=>x,a6:()=>Q,wc:()=>J});var I=f(15365),h=f(28061),te=f(11608),$=f(66476);class x{constructor(_,y,C,d,w){this.editorId=_,this.model=y,this.configuration=C,this._linesCollection=d,this._coordinatesConverter=w,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(_){const y=_.id;let C=this._decorationsCache[y];if(!C){const d=_.range,w=_.options;let D;if(w.isWholeLine){const L=this._coordinatesConverter.convertModelPositionToViewPosition(new I.y(d.startLineNumber,1),0),k=this._coordinatesConverter.convertModelPositionToViewPosition(new I.y(d.endLineNumber,this.model.getLineMaxColumn(d.endLineNumber)),1);D=new h.Q(L.lineNumber,L.column,k.lineNumber,k.column)}else D=this._coordinatesConverter.convertModelRangeToViewRange(d,1);C=new te.vo(D,w),this._decorationsCache[y]=C}return C}getDecorationsViewportData(_){let y=this._cachedModelDecorationsResolver!==null;return y=y&&_.equalsRange(this._cachedModelDecorationsResolverViewRange),y||(this._cachedModelDecorationsResolver=this._getDecorationsInRange(_),this._cachedModelDecorationsResolverViewRange=_),this._cachedModelDecorationsResolver}getInlineDecorationsOnLine(_){const y=new h.Q(_,this._linesCollection.getViewLineMinColumn(_),_,this._linesCollection.getViewLineMaxColumn(_));return this._getDecorationsInRange(y).inlineDecorations[0]}_getDecorationsInRange(_){const y=this._linesCollection.getDecorationsInRange(_,this.editorId,(0,$.$C)(this.configuration.options)),C=_.startLineNumber,d=_.endLineNumber,w=[];let D=0;const L=[];for(let k=C;k<=d;k++)L[k-C]=[];for(let k=0,j=y.length;k<j;k++){const N=y[k],B=N.options;if(!ie(this.model,N))continue;const T=this._getOrCreateViewModelDecoration(N),H=T.range;if(w[D++]=T,B.inlineClassName){const Y=new te.kI(H,B.inlineClassName,B.inlineClassNameAffectsLetterSpacing?3:0),ee=Math.max(C,H.startLineNumber),ce=Math.min(d,H.endLineNumber);for(let pe=ee;pe<=ce;pe++)L[pe-C].push(Y)}if(B.beforeContentClassName&&C<=H.startLineNumber&&H.startLineNumber<=d){const Y=new te.kI(new h.Q(H.startLineNumber,H.startColumn,H.startLineNumber,H.startColumn),B.beforeContentClassName,1);L[H.startLineNumber-C].push(Y)}if(B.afterContentClassName&&C<=H.endLineNumber&&H.endLineNumber<=d){const Y=new te.kI(new h.Q(H.endLineNumber,H.endColumn,H.endLineNumber,H.endColumn),B.afterContentClassName,2);L[H.endLineNumber-C].push(Y)}}return{decorations:w,inlineDecorations:L}}}function ie(S,_){return!(_.options.hideInCommentTokens&&Q(S,_)||_.options.hideInStringTokens&&J(S,_))}function Q(S,_){return z(S,_.range,y=>y===1)}function J(S,_){return z(S,_.range,y=>y===2)}function z(S,_,y){for(let C=_.startLineNumber;C<=_.endLineNumber;C++){const d=S.tokenization.getLineTokens(C),w=C===_.startLineNumber,D=C===_.endLineNumber;let L=w?d.findTokenIndexAtOffset(_.startColumn-1):0;for(;L<d.getCount()&&!(D&&d.getStartOffset(L)>_.endColumn-1);){if(!y(d.getStandardTokenType(L)))return!1;L++}}return!0}},62105:(Tt,Fe,f)=>{f.d(Fe,{$t:()=>d,gI:()=>w,ER:()=>D});var I=f(16844),h=f(28061),te=f(78903),$=f(10998),x=f(50946),ie=f(96655),Q=f(85525),J=f(82399),z=f(66726),S=f(3765);const _=(0,J.u1)("IEditorCancelService"),y=new ie.N1("cancellableOperation",!1,(0,S.kg)("cancellableOperation","Whether the editor runs a cancellable operation, e.g. like 'Peek References'"));(0,z.v)(_,class{constructor(){this._tokens=new WeakMap}add(L,k){let j=this._tokens.get(L);j||(j=L.invokeWithinContext(B=>{const T=y.bindTo(B.get(ie.fN)),H=new Q.w;return{key:T,tokens:H}}),this._tokens.set(L,j));let N;return j.key.set(!0),N=j.tokens.push(k),()=>{N&&(N(),j.key.set(!j.tokens.isEmpty()),N=void 0)}}cancel(L){const k=this._tokens.get(L);if(!k)return;const j=k.tokens.pop();j&&(j.cancel(),k.key.set(!k.tokens.isEmpty()))}},!0);class C extends te.Q{constructor(k,j){super(j),this.editor=k,this._unregister=k.invokeWithinContext(N=>N.get(_).add(k,this))}dispose(){this._unregister(),super.dispose()}}(0,x.E_)(new class extends x.DX{constructor(){super({id:"editor.cancelOperation",kbOpts:{weight:100,primary:9},precondition:y})}runEditorCommand(L,k){L.get(_).cancel(k)}});class d{constructor(k,j){if(this.flags=j,this.flags&1){const N=k.getModel();this.modelVersionId=N?I.GP("{0}#{1}",N.uri.toString(),N.getVersionId()):null}else this.modelVersionId=null;this.flags&4?this.position=k.getPosition():this.position=null,this.flags&2?this.selection=k.getSelection():this.selection=null,this.flags&8?(this.scrollLeft=k.getScrollLeft(),this.scrollTop=k.getScrollTop()):(this.scrollLeft=-1,this.scrollTop=-1)}_equals(k){if(!(k instanceof d))return!1;const j=k;return!(this.modelVersionId!==j.modelVersionId||this.scrollLeft!==j.scrollLeft||this.scrollTop!==j.scrollTop||!this.position&&j.position||this.position&&!j.position||this.position&&j.position&&!this.position.equals(j.position)||!this.selection&&j.selection||this.selection&&!j.selection||this.selection&&j.selection&&!this.selection.equalsRange(j.selection))}validate(k){return this._equals(new d(k,this.flags))}}class w extends C{constructor(k,j,N,B){super(k,B),this._listener=new $.Cm,j&4&&this._listener.add(k.onDidChangeCursorPosition(T=>{(!N||!h.Q.containsPosition(N,T.position))&&this.cancel()})),j&2&&this._listener.add(k.onDidChangeCursorSelection(T=>{(!N||!h.Q.containsRange(N,T.selection))&&this.cancel()})),j&8&&this._listener.add(k.onDidScrollChange(T=>this.cancel())),j&1&&(this._listener.add(k.onDidChangeModel(T=>this.cancel())),this._listener.add(k.onDidChangeModelContent(T=>this.cancel())))}dispose(){this._listener.dispose(),super.dispose()}}class D extends te.Q{constructor(k,j){super(j),this._listener=k.onDidChangeContent(()=>this.cancel())}dispose(){this._listener.dispose(),super.dispose()}}},38801:(Tt,Fe,f)=>{f.d(Fe,{Pj:()=>ee,pD:()=>H,jX:()=>ce,vg:()=>ge,_V:()=>le});var I=f(59407),h=f(13338),te=f(78903),$=f(94327),x=f(17954),ie=f(85525),Q=f(79359),J=f(37264),z=f(62105),S=f(66638),_=f(15365),y=f(28061),C=f(93702),d=f(90304),w=f(37042),D=f(55406),L=f(3765),k=f(59715);class j{constructor(X){this.value=X,this._lower=X.toLowerCase()}static toKey(X){return typeof X=="string"?X.toLowerCase():X._lower}}var N=f(82399),B=f(52230),T=function(se,X,K,he){function ve(Ee){return Ee instanceof K?Ee:new K(function(O){O(Ee)})}return new(K||(K=Promise))(function(Ee,O){function ot(Ke){try{We(he.next(Ke))}catch(De){O(De)}}function lt(Ke){try{We(he.throw(Ke))}catch(De){O(De)}}function We(Ke){Ke.done?Ee(Ke.value):ve(Ke.value).then(ot,lt)}We((he=he.apply(se,X||[])).next())})};function H(se){if(se=se.filter(ve=>ve.range),!se.length)return;let{range:X}=se[0];for(let ve=1;ve<se.length;ve++)X=y.Q.plusRange(X,se[ve].range);const{startLineNumber:K,endLineNumber:he}=X;K===he?se.length===1?(0,I.xE)(L.kg("hint11","Made 1 formatting edit on line {0}",K)):(0,I.xE)(L.kg("hintn1","Made {0} formatting edits on line {1}",se.length,K)):se.length===1?(0,I.xE)(L.kg("hint1n","Made 1 formatting edit between lines {0} and {1}",K,he)):(0,I.xE)(L.kg("hintnn","Made {0} formatting edits between lines {1} and {2}",se.length,K,he))}function Y(se,X,K){const he=[],ve=new Set,Ee=se.ordered(K);for(const ot of Ee)he.push(ot),ot.extensionId&&ve.add(j.toKey(ot.extensionId));const O=X.ordered(K);for(const ot of O){if(ot.extensionId){if(ve.has(j.toKey(ot.extensionId)))continue;ve.add(j.toKey(ot.extensionId))}he.push({displayName:ot.displayName,extensionId:ot.extensionId,provideDocumentFormattingEdits(lt,We,Ke){return ot.provideDocumentRangeFormattingEdits(lt,lt.getFullModelRange(),We,Ke)}})}return he}class ee{static setFormatterSelector(X){return{dispose:ee._selectors.unshift(X)}}static select(X,K,he){return T(this,void 0,void 0,function*(){if(X.length===0)return;const ve=x.f.first(ee._selectors);if(ve)return yield ve(X,K,he)})}}ee._selectors=new ie.w;function ce(se,X,K,he,ve,Ee){return T(this,void 0,void 0,function*(){const O=se.get(N._Y),{documentRangeFormattingEditProvider:ot}=se.get(B.u),lt=(0,S.z9)(X)?X.getModel():X,We=ot.ordered(lt),Ke=yield ee.select(We,lt,he);Ke&&(ve.report(Ke),yield O.invokeFunction(pe,Ke,X,K,Ee))})}function pe(se,X,K,he,ve){return T(this,void 0,void 0,function*(){const Ee=se.get(d.w);let O,ot;(0,S.z9)(K)?(O=K.getModel(),ot=new z.gI(K,5,void 0,ve)):(O=K,ot=new z.ER(K,ve));const lt=[];let We=0;for(const Re of(0,h._j)(he).sort(y.Q.compareRangesUsingStarts))We>0&&y.Q.areIntersectingOrTouching(lt[We-1],Re)?lt[We-1]=y.Q.fromPositions(lt[We-1].getStartPosition(),Re.getEndPosition()):We=lt.push(Re);const Ke=Re=>T(this,void 0,void 0,function*(){return(yield X.provideDocumentRangeFormattingEdits(O,Re,O.getFormattingOptions(),ot.token))||[]}),De=(Re,et)=>{if(!Re.length||!et.length)return!1;const rt=Re.reduce((Lt,Dt)=>y.Q.plusRange(Lt,Dt.range),Re[0].range);if(!et.some(Lt=>y.Q.intersectRanges(rt,Lt.range)))return!1;for(const Lt of Re)for(const Dt of et)if(y.Q.intersectRanges(Lt.range,Dt.range))return!0;return!1},Pe=[],Ue=[];try{for(const Re of lt){if(ot.token.isCancellationRequested)return!0;Ue.push(yield Ke(Re))}for(let Re=0;Re<lt.length;++Re)for(let et=Re+1;et<lt.length;++et){if(ot.token.isCancellationRequested)return!0;if(De(Ue[Re],Ue[et])){const rt=y.Q.plusRange(lt[Re],lt[et]),Lt=yield Ke(rt);lt.splice(et,1),lt.splice(Re,1),lt.push(rt),Ue.splice(et,1),Ue.splice(Re,1),Ue.push(Lt),Re=0,et=0}}for(const Re of Ue){if(ot.token.isCancellationRequested)return!0;const et=yield Ee.computeMoreMinimalEdits(O.uri,Re);et&&Pe.push(...et)}}finally{ot.dispose()}if(Pe.length===0)return!1;if((0,S.z9)(K))D.c.execute(K,Pe,!0),H(Pe),K.revealPositionInCenterIfOutsideViewport(K.getPosition(),1);else{const[{range:Re}]=Pe,et=new C.L(Re.startLineNumber,Re.startColumn,Re.endLineNumber,Re.endColumn);O.pushEditOperations([et],Pe.map(rt=>({text:rt.text,range:y.Q.lift(rt.range),forceMoveMarkers:!0})),rt=>{for(const{range:Lt}of rt)if(y.Q.areIntersectingOrTouching(Lt,et))return[new C.L(Lt.startLineNumber,Lt.startColumn,Lt.endLineNumber,Lt.endColumn)];return null})}return!0})}function ge(se,X,K,he,ve){return T(this,void 0,void 0,function*(){const Ee=se.get(N._Y),O=se.get(B.u),ot=(0,S.z9)(X)?X.getModel():X,lt=Y(O.documentFormattingEditProvider,O.documentRangeFormattingEditProvider,ot),We=yield ee.select(lt,ot,K);We&&(he.report(We),yield Ee.invokeFunction(fe,We,X,K,ve))})}function fe(se,X,K,he,ve){return T(this,void 0,void 0,function*(){const Ee=se.get(d.w);let O,ot;(0,S.z9)(K)?(O=K.getModel(),ot=new z.gI(K,5,void 0,ve)):(O=K,ot=new z.ER(K,ve));let lt;try{const We=yield X.provideDocumentFormattingEdits(O,O.getFormattingOptions(),ot.token);if(lt=yield Ee.computeMoreMinimalEdits(O.uri,We),ot.token.isCancellationRequested)return!0}finally{ot.dispose()}if(!lt||lt.length===0)return!1;if((0,S.z9)(K))D.c.execute(K,lt,he!==2),he!==2&&(H(lt),K.revealPositionInCenterIfOutsideViewport(K.getPosition(),1));else{const[{range:We}]=lt,Ke=new C.L(We.startLineNumber,We.startColumn,We.endLineNumber,We.endColumn);O.pushEditOperations([Ke],lt.map(De=>({text:De.text,range:y.Q.lift(De.range),forceMoveMarkers:!0})),De=>{for(const{range:Pe}of De)if(y.Q.areIntersectingOrTouching(Pe,Ke))return[new C.L(Pe.startLineNumber,Pe.startColumn,Pe.endLineNumber,Pe.endColumn)];return null})}return!0})}function oe(se,X,K,he,ve,Ee){return T(this,void 0,void 0,function*(){const O=X.documentRangeFormattingEditProvider.ordered(K);for(const ot of O){const lt=yield Promise.resolve(ot.provideDocumentRangeFormattingEdits(K,he,ve,Ee)).catch($.M_);if((0,h.EI)(lt))return yield se.computeMoreMinimalEdits(K.uri,lt)}})}function Z(se,X,K,he,ve){return T(this,void 0,void 0,function*(){const Ee=Y(X.documentFormattingEditProvider,X.documentRangeFormattingEditProvider,K);for(const O of Ee){const ot=yield Promise.resolve(O.provideDocumentFormattingEdits(K,he,ve)).catch($.M_);if((0,h.EI)(ot))return yield se.computeMoreMinimalEdits(K.uri,ot)}})}function le(se,X,K,he,ve,Ee,O){const ot=X.onTypeFormattingEditProvider.ordered(K);return ot.length===0||ot[0].autoFormatTriggerCharacters.indexOf(ve)<0?Promise.resolve(void 0):Promise.resolve(ot[0].provideOnTypeFormattingEdits(K,he,ve,Ee,O)).catch($.M_).then(lt=>se.computeMoreMinimalEdits(K.uri,lt))}k.wb.registerCommand("_executeFormatRangeProvider",function(se,...X){return T(this,void 0,void 0,function*(){const[K,he,ve]=X;(0,Q.j)(J.r.isUri(K)),(0,Q.j)(y.Q.isIRange(he));const Ee=se.get(w.b),O=se.get(d.w),ot=se.get(B.u),lt=yield Ee.createModelReference(K);try{return oe(O,ot,lt.object.textEditorModel,y.Q.lift(he),ve,te.X.None)}finally{lt.dispose()}})}),k.wb.registerCommand("_executeFormatDocumentProvider",function(se,...X){return T(this,void 0,void 0,function*(){const[K,he]=X;(0,Q.j)(J.r.isUri(K));const ve=se.get(w.b),Ee=se.get(d.w),O=se.get(B.u),ot=yield ve.createModelReference(K);try{return Z(Ee,O,ot.object.textEditorModel,he,te.X.None)}finally{ot.dispose()}})}),k.wb.registerCommand("_executeFormatOnTypeProvider",function(se,...X){return T(this,void 0,void 0,function*(){const[K,he,ve,Ee]=X;(0,Q.j)(J.r.isUri(K)),(0,Q.j)(_.y.isIPosition(he)),(0,Q.j)(typeof ve=="string");const O=se.get(w.b),ot=se.get(d.w),lt=se.get(B.u),We=yield O.createModelReference(K);try{return le(ot,lt,We.object.textEditorModel,_.y.lift(he),ve,Ee,te.X.None)}finally{We.dispose()}})})},55406:(Tt,Fe,f)=>{f.d(Fe,{c:()=>te});var I=f(23877),h=f(28061);class te{static _handleEolEdits(x,ie){let Q;const J=[];for(const z of ie)typeof z.eol=="number"&&(Q=z.eol),z.range&&typeof z.text=="string"&&J.push(z);return typeof Q=="number"&&x.hasModel()&&x.getModel().pushEOL(Q),J}static _isFullModelReplaceEdit(x,ie){if(!x.hasModel())return!1;const Q=x.getModel(),J=Q.validateRange(ie.range);return Q.getFullModelRange().equalsRange(J)}static execute(x,ie,Q){Q&&x.pushUndoStop();const J=te._handleEolEdits(x,ie);J.length===1&&te._isFullModelReplaceEdit(x,J[0])?x.executeEdits("formatEditsCommand",J.map(z=>I.k.replace(h.Q.lift(z.range),z.text))):x.executeEdits("formatEditsCommand",J.map(z=>I.k.replaceMove(h.Q.lift(z.range),z.text))),Q&&x.pushUndoStop()}}},94828:(Tt,Fe,f)=>{f.r(Fe),f.d(Fe,{CancellationTokenSource:()=>Uc,Emitter:()=>ya,KeyCode:()=>el,KeyMod:()=>zm,MarkerSeverity:()=>au,MarkerTag:()=>hr,Position:()=>Um,Range:()=>jg,Selection:()=>jm,SelectionDirection:()=>Km,Token:()=>Kg,Uri:()=>$m,editor:()=>lu,languages:()=>Gm});var I=f(66476),h=f(78903),te=f(2106),$=f(68387),x=f(37264),ie=f(15365),Q=f(28061),J=f(93702),z=f(44364),S=f(42783);class _{static chord(r,l){return(0,$.m5)(r,l)}}_.CtrlCmd=2048,_.Shift=1024,_.Alt=512,_.WinCtrl=256;function y(){return{editor:void 0,languages:void 0,CancellationTokenSource:h.Q,Emitter:te.vl,KeyCode:S.DD,KeyMod:_,Position:ie.y,Range:Q.Q,Selection:J.L,SelectionDirection:S.SB,MarkerSeverity:S.cj,MarkerTag:S.d_,Uri:x.r,Token:z.ou}}var C=f(38561),d=f(16844),w=f(41106),D=f(87301),L=f(16878),k=f(28060),j=f(12596),N=f(66055),B=f(52394),T=f(97036),H=f(77922),Y=f(64830),ee=f(65958),ce=f(10998),pe=f(94327),ge=f(63339),fe=f(79359);const oe="$initialize";let Z=!1;function le(ue){ge.HZ&&(Z||(Z=!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(ue.message))}class se{constructor(r,l,v,V){this.vsWorker=r,this.req=l,this.method=v,this.args=V,this.type=0}}class X{constructor(r,l,v,V){this.vsWorker=r,this.seq=l,this.res=v,this.err=V,this.type=1}}class K{constructor(r,l,v,V){this.vsWorker=r,this.req=l,this.eventName=v,this.arg=V,this.type=2}}class he{constructor(r,l,v){this.vsWorker=r,this.req=l,this.event=v,this.type=3}}class ve{constructor(r,l){this.vsWorker=r,this.req=l,this.type=4}}class Ee{constructor(r){this._workerId=-1,this._handler=r,this._lastSentReq=0,this._pendingReplies=Object.create(null),this._pendingEmitters=new Map,this._pendingEvents=new Map}setWorkerId(r){this._workerId=r}sendMessage(r,l){const v=String(++this._lastSentReq);return new Promise((V,G)=>{this._pendingReplies[v]={resolve:V,reject:G},this._send(new se(this._workerId,v,r,l))})}listen(r,l){let v=null;const V=new te.vl({onFirstListenerAdd:()=>{v=String(++this._lastSentReq),this._pendingEmitters.set(v,V),this._send(new K(this._workerId,v,r,l))},onLastListenerRemove:()=>{this._pendingEmitters.delete(v),this._send(new ve(this._workerId,v)),v=null}});return V.event}handleMessage(r){!r||!r.vsWorker||this._workerId!==-1&&r.vsWorker!==this._workerId||this._handleMessage(r)}_handleMessage(r){switch(r.type){case 1:return this._handleReplyMessage(r);case 0:return this._handleRequestMessage(r);case 2:return this._handleSubscribeEventMessage(r);case 3:return this._handleEventMessage(r);case 4:return this._handleUnsubscribeEventMessage(r)}}_handleReplyMessage(r){if(!this._pendingReplies[r.seq]){console.warn("Got reply to unknown seq");return}const l=this._pendingReplies[r.seq];if(delete this._pendingReplies[r.seq],r.err){let v=r.err;r.err.$isError&&(v=new Error,v.name=r.err.name,v.message=r.err.message,v.stack=r.err.stack),l.reject(v);return}l.resolve(r.res)}_handleRequestMessage(r){const l=r.req;this._handler.handleMessage(r.method,r.args).then(V=>{this._send(new X(this._workerId,l,V,void 0))},V=>{V.detail instanceof Error&&(V.detail=(0,pe.cU)(V.detail)),this._send(new X(this._workerId,l,void 0,(0,pe.cU)(V)))})}_handleSubscribeEventMessage(r){const l=r.req,v=this._handler.handleEvent(r.eventName,r.arg)(V=>{this._send(new he(this._workerId,l,V))});this._pendingEvents.set(l,v)}_handleEventMessage(r){if(!this._pendingEmitters.has(r.req)){console.warn("Got event for unknown req");return}this._pendingEmitters.get(r.req).fire(r.event)}_handleUnsubscribeEventMessage(r){if(!this._pendingEvents.has(r.req)){console.warn("Got unsubscribe for unknown req");return}this._pendingEvents.get(r.req).dispose(),this._pendingEvents.delete(r.req)}_send(r){const l=[];if(r.type===0)for(let v=0;v<r.args.length;v++)r.args[v]instanceof ArrayBuffer&&l.push(r.args[v]);else r.type===1&&r.res instanceof ArrayBuffer&&l.push(r.res);this._handler.sendMessage(r,l)}}class O extends ce.jG{constructor(r,l,v){super();let V=null;this._worker=this._register(r.create("vs/base/common/worker/simpleWorker",Ve=>{this._protocol.handleMessage(Ve)},Ve=>{V?.(Ve)})),this._protocol=new Ee({sendMessage:(Ve,Ge)=>{this._worker.postMessage(Ve,Ge)},handleMessage:(Ve,Ge)=>{if(typeof v[Ve]!="function")return Promise.reject(new Error("Missing method "+Ve+" on main thread host."));try{return Promise.resolve(v[Ve].apply(v,Ge))}catch(mt){return Promise.reject(mt)}},handleEvent:(Ve,Ge)=>{if(lt(Ve)){const mt=v[Ve].call(v,Ge);if(typeof mt!="function")throw new Error(`Missing dynamic event ${Ve} on main thread host.`);return mt}if(ot(Ve)){const mt=v[Ve];if(typeof mt!="function")throw new Error(`Missing event ${Ve} on main thread host.`);return mt}throw new Error(`Malformed event name ${Ve}`)}}),this._protocol.setWorkerId(this._worker.getId());let G=null;typeof ge.zQ.require<"u"&&typeof ge.zQ.require.getConfig=="function"?G=ge.zQ.require.getConfig():typeof ge.zQ.requirejs<"u"&&(G=ge.zQ.requirejs.s.contexts._.config);const ae=fe.V0(v);this._onModuleLoaded=this._protocol.sendMessage(oe,[this._worker.getId(),JSON.parse(JSON.stringify(G)),l,ae]);const me=(Ve,Ge)=>this._request(Ve,Ge),Ne=(Ve,Ge)=>this._protocol.listen(Ve,Ge);this._lazyProxy=new Promise((Ve,Ge)=>{V=Ge,this._onModuleLoaded.then(mt=>{Ve(We(mt,me,Ne))},mt=>{Ge(mt),this._onError("Worker failed to load "+l,mt)})})}getProxyObject(){return this._lazyProxy}_request(r,l){return new Promise((v,V)=>{this._onModuleLoaded.then(()=>{this._protocol.sendMessage(r,l).then(v,V)},V)})}_onError(r,l){console.error(r),console.info(l)}}function ot(ue){return ue[0]==="o"&&ue[1]==="n"&&d.Wv(ue.charCodeAt(2))}function lt(ue){return/^onDynamic/.test(ue)&&d.Wv(ue.charCodeAt(9))}function We(ue,r,l){const v=ae=>function(){const me=Array.prototype.slice.call(arguments,0);return r(ae,me)},V=ae=>function(me){return l(ae,me)},G={};for(const ae of ue){if(lt(ae)){G[ae]=V(ae);continue}if(ot(ae)){G[ae]=l(ae,void 0);continue}G[ae]=v(ae)}return G}class Ke{constructor(r,l){this._requestHandlerFactory=l,this._requestHandler=null,this._protocol=new Ee({sendMessage:(v,V)=>{r(v,V)},handleMessage:(v,V)=>this._handleMessage(v,V),handleEvent:(v,V)=>this._handleEvent(v,V)})}onmessage(r){this._protocol.handleMessage(r)}_handleMessage(r,l){if(r===oe)return this.initialize(l[0],l[1],l[2],l[3]);if(!this._requestHandler||typeof this._requestHandler[r]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+r));try{return Promise.resolve(this._requestHandler[r].apply(this._requestHandler,l))}catch(v){return Promise.reject(v)}}_handleEvent(r,l){if(!this._requestHandler)throw new Error("Missing requestHandler");if(lt(r)){const v=this._requestHandler[r].call(this._requestHandler,l);if(typeof v!="function")throw new Error(`Missing dynamic event ${r} on request handler.`);return v}if(ot(r)){const v=this._requestHandler[r];if(typeof v!="function")throw new Error(`Missing event ${r} on request handler.`);return v}throw new Error(`Malformed event name ${r}`)}initialize(r,l,v,V){this._protocol.setWorkerId(r);const me=We(V,(Ne,Ve)=>this._protocol.sendMessage(Ne,Ve),(Ne,Ve)=>this._protocol.listen(Ne,Ve));return this._requestHandlerFactory?(this._requestHandler=this._requestHandlerFactory(me),Promise.resolve(types.getAllMethodNames(this._requestHandler))):(l&&(typeof l.baseUrl<"u"&&delete l.baseUrl,typeof l.paths<"u"&&typeof l.paths.vs<"u"&&delete l.paths.vs,typeof l.trustedTypesPolicy!==void 0&&delete l.trustedTypesPolicy,l.catchError=!0,globals.require.config(l)),new Promise((Ne,Ve)=>{const Ge=globals.require;Ge([v],mt=>{if(this._requestHandler=mt.create(me),!this._requestHandler){Ve(new Error("No RequestHandler!"));return}Ne(types.getAllMethodNames(this._requestHandler))},Ve)}))}}function De(ue){return new Ke(ue,null)}var Pe;const Ue=(Pe=window.trustedTypes)===null||Pe===void 0?void 0:Pe.createPolicy("defaultWorkerFactory",{createScriptURL:ue=>ue});function Re(ue){if(ge.zQ.MonacoEnvironment){if(typeof ge.zQ.MonacoEnvironment.getWorker=="function")return ge.zQ.MonacoEnvironment.getWorker("workerMain.js",ue);if(typeof ge.zQ.MonacoEnvironment.getWorkerUrl=="function"){const r=ge.zQ.MonacoEnvironment.getWorkerUrl("workerMain.js",ue);return new Worker(Ue?Ue.createScriptURL(r):r,{name:ue})}}throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}function et(ue){return typeof ue.then=="function"}class rt{constructor(r,l,v,V,G){this.id=l;const ae=Re(v);et(ae)?this.worker=ae:this.worker=Promise.resolve(ae),this.postMessage(r,[]),this.worker.then(me=>{me.onmessage=function(Ne){V(Ne.data)},me.onmessageerror=G,typeof me.addEventListener=="function"&&me.addEventListener("error",G)})}getId(){return this.id}postMessage(r,l){var v;(v=this.worker)===null||v===void 0||v.then(V=>V.postMessage(r,l))}dispose(){var r;(r=this.worker)===null||r===void 0||r.then(l=>l.terminate()),this.worker=null}}class Lt{constructor(r){this._label=r,this._webWorkerFailedBeforeError=!1}create(r,l,v){const V=++Lt.LAST_WORKER_ID;if(this._webWorkerFailedBeforeError)throw this._webWorkerFailedBeforeError;return new rt(r,V,this._label||"anonymous"+V,l,G=>{le(G),this._webWorkerFailedBeforeError=G,v(G)})}}Lt.LAST_WORKER_ID=0;var Dt=f(2111);const xt=3;function Ie(ue,r,l,v){return new Dt.uP(ue,r,l).ComputeDiff(v)}class dt{constructor(r){const l=[],v=[];for(let V=0,G=r.length;V<G;V++)l[V]=zt(r[V],1),v[V]=ii(r[V],1);this.lines=r,this._startColumns=l,this._endColumns=v}getElements(){const r=[];for(let l=0,v=this.lines.length;l<v;l++)r[l]=this.lines[l].substring(this._startColumns[l]-1,this._endColumns[l]-1);return r}getStrictElement(r){return this.lines[r]}getStartLineNumber(r){return r+1}getEndLineNumber(r){return r+1}createCharSequence(r,l,v){const V=[],G=[],ae=[];let me=0;for(let Ne=l;Ne<=v;Ne++){const Ve=this.lines[Ne],Ge=r?this._startColumns[Ne]:1,mt=r?this._endColumns[Ne]:Ve.length+1;for(let ti=Ge;ti<mt;ti++)V[me]=Ve.charCodeAt(ti-1),G[me]=Ne+1,ae[me]=ti,me++;!r&&Ne<v&&(V[me]=10,G[me]=Ne+1,ae[me]=Ve.length+1,me++)}return new ft(V,G,ae)}}class ft{constructor(r,l,v){this._charCodes=r,this._lineNumbers=l,this._columns=v}toString(){return"["+this._charCodes.map((r,l)=>(r===10?"\\n":String.fromCharCode(r))+`-(${this._lineNumbers[l]},${this._columns[l]})`).join(", ")+"]"}_assertIndex(r,l){if(r<0||r>=l.length)throw new Error("Illegal index")}getElements(){return this._charCodes}getStartLineNumber(r){return r>0&&r===this._lineNumbers.length?this.getEndLineNumber(r-1):(this._assertIndex(r,this._lineNumbers),this._lineNumbers[r])}getEndLineNumber(r){return r===-1?this.getStartLineNumber(r+1):(this._assertIndex(r,this._lineNumbers),this._charCodes[r]===10?this._lineNumbers[r]+1:this._lineNumbers[r])}getStartColumn(r){return r>0&&r===this._columns.length?this.getEndColumn(r-1):(this._assertIndex(r,this._columns),this._columns[r])}getEndColumn(r){return r===-1?this.getStartColumn(r+1):(this._assertIndex(r,this._columns),this._charCodes[r]===10?1:this._columns[r]+1)}}class Bt{constructor(r,l,v,V,G,ae,me,Ne){this.originalStartLineNumber=r,this.originalStartColumn=l,this.originalEndLineNumber=v,this.originalEndColumn=V,this.modifiedStartLineNumber=G,this.modifiedStartColumn=ae,this.modifiedEndLineNumber=me,this.modifiedEndColumn=Ne}static createFromDiffChange(r,l,v){const V=l.getStartLineNumber(r.originalStart),G=l.getStartColumn(r.originalStart),ae=l.getEndLineNumber(r.originalStart+r.originalLength-1),me=l.getEndColumn(r.originalStart+r.originalLength-1),Ne=v.getStartLineNumber(r.modifiedStart),Ve=v.getStartColumn(r.modifiedStart),Ge=v.getEndLineNumber(r.modifiedStart+r.modifiedLength-1),mt=v.getEndColumn(r.modifiedStart+r.modifiedLength-1);return new Bt(V,G,ae,me,Ne,Ve,Ge,mt)}}function jt(ue){if(ue.length<=1)return ue;const r=[ue[0]];let l=r[0];for(let v=1,V=ue.length;v<V;v++){const G=ue[v],ae=G.originalStart-(l.originalStart+l.originalLength),me=G.modifiedStart-(l.modifiedStart+l.modifiedLength);Math.min(ae,me)<xt?(l.originalLength=G.originalStart+G.originalLength-l.originalStart,l.modifiedLength=G.modifiedStart+G.modifiedLength-l.modifiedStart):(r.push(G),l=G)}return r}class pt{constructor(r,l,v,V,G){this.originalStartLineNumber=r,this.originalEndLineNumber=l,this.modifiedStartLineNumber=v,this.modifiedEndLineNumber=V,this.charChanges=G}static createFromDiffResult(r,l,v,V,G,ae,me){let Ne,Ve,Ge,mt,ti;if(l.originalLength===0?(Ne=v.getStartLineNumber(l.originalStart)-1,Ve=0):(Ne=v.getStartLineNumber(l.originalStart),Ve=v.getEndLineNumber(l.originalStart+l.originalLength-1)),l.modifiedLength===0?(Ge=V.getStartLineNumber(l.modifiedStart)-1,mt=0):(Ge=V.getStartLineNumber(l.modifiedStart),mt=V.getEndLineNumber(l.modifiedStart+l.modifiedLength-1)),ae&&l.originalLength>0&&l.originalLength<20&&l.modifiedLength>0&&l.modifiedLength<20&&G()){const Si=v.createCharSequence(r,l.originalStart,l.originalStart+l.originalLength-1),tn=V.createCharSequence(r,l.modifiedStart,l.modifiedStart+l.modifiedLength-1);if(Si.getElements().length>0&&tn.getElements().length>0){let kn=Ie(Si,tn,G,!0).changes;me&&(kn=jt(kn)),ti=[];for(let On=0,as=kn.length;On<as;On++)ti.push(Bt.createFromDiffChange(kn[On],Si,tn))}}return new pt(Ne,Ve,Ge,mt,ti)}}class bt{constructor(r,l,v){this.shouldComputeCharChanges=v.shouldComputeCharChanges,this.shouldPostProcessCharChanges=v.shouldPostProcessCharChanges,this.shouldIgnoreTrimWhitespace=v.shouldIgnoreTrimWhitespace,this.shouldMakePrettyDiff=v.shouldMakePrettyDiff,this.originalLines=r,this.modifiedLines=l,this.original=new dt(r),this.modified=new dt(l),this.continueLineDiff=vi(v.maxComputationTime),this.continueCharDiff=vi(v.maxComputationTime===0?0:Math.min(v.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:[{modifiedEndColumn:0,modifiedEndLineNumber:0,modifiedStartColumn:0,modifiedStartLineNumber:0,originalEndColumn:0,originalEndLineNumber:0,originalStartColumn:0,originalStartLineNumber: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:[{modifiedEndColumn:0,modifiedEndLineNumber:0,modifiedStartColumn:0,modifiedStartLineNumber:0,originalEndColumn:0,originalEndLineNumber:0,originalStartColumn:0,originalStartLineNumber:0}]}]};const r=Ie(this.original,this.modified,this.continueLineDiff,this.shouldMakePrettyDiff),l=r.changes,v=r.quitEarly;if(this.shouldIgnoreTrimWhitespace){const me=[];for(let Ne=0,Ve=l.length;Ne<Ve;Ne++)me.push(pt.createFromDiffResult(this.shouldIgnoreTrimWhitespace,l[Ne],this.original,this.modified,this.continueCharDiff,this.shouldComputeCharChanges,this.shouldPostProcessCharChanges));return{quitEarly:v,changes:me}}const V=[];let G=0,ae=0;for(let me=-1,Ne=l.length;me<Ne;me++){const Ve=me+1<Ne?l[me+1]:null,Ge=Ve?Ve.originalStart:this.originalLines.length,mt=Ve?Ve.modifiedStart:this.modifiedLines.length;for(;G<Ge&&ae<mt;){const ti=this.originalLines[G],Si=this.modifiedLines[ae];if(ti!==Si){{let tn=zt(ti,1),kn=zt(Si,1);for(;tn>1&&kn>1;){const On=ti.charCodeAt(tn-2),as=Si.charCodeAt(kn-2);if(On!==as)break;tn--,kn--}(tn>1||kn>1)&&this._pushTrimWhitespaceCharChange(V,G+1,1,tn,ae+1,1,kn)}{let tn=ii(ti,1),kn=ii(Si,1);const On=ti.length+1,as=Si.length+1;for(;tn<On&&kn<as;){const qn=ti.charCodeAt(tn-1),Pn=ti.charCodeAt(kn-1);if(qn!==Pn)break;tn++,kn++}(tn<On||kn<as)&&this._pushTrimWhitespaceCharChange(V,G+1,tn,On,ae+1,kn,as)}}G++,ae++}Ve&&(V.push(pt.createFromDiffResult(this.shouldIgnoreTrimWhitespace,Ve,this.original,this.modified,this.continueCharDiff,this.shouldComputeCharChanges,this.shouldPostProcessCharChanges)),G+=Ve.originalLength,ae+=Ve.modifiedLength)}return{quitEarly:v,changes:V}}_pushTrimWhitespaceCharChange(r,l,v,V,G,ae,me){if(this._mergeTrimWhitespaceCharChange(r,l,v,V,G,ae,me))return;let Ne;this.shouldComputeCharChanges&&(Ne=[new Bt(l,v,l,V,G,ae,G,me)]),r.push(new pt(l,l,G,G,Ne))}_mergeTrimWhitespaceCharChange(r,l,v,V,G,ae,me){const Ne=r.length;if(Ne===0)return!1;const Ve=r[Ne-1];return Ve.originalEndLineNumber===0||Ve.modifiedEndLineNumber===0?!1:Ve.originalEndLineNumber+1===l&&Ve.modifiedEndLineNumber+1===G?(Ve.originalEndLineNumber=l,Ve.modifiedEndLineNumber=G,this.shouldComputeCharChanges&&Ve.charChanges&&Ve.charChanges.push(new Bt(l,v,l,V,G,ae,G,me)),!0):!1}}function zt(ue,r){const l=d.HG(ue);return l===-1?r:l+1}function ii(ue,r){const l=d.lT(ue);return l===-1?r:l+2}function vi(ue){if(ue===0)return()=>!0;const r=Date.now();return()=>Date.now()-r<ue}var Ze=f(56158);class _t{constructor(r,l,v,V){this._uri=r,this._lines=l,this._eol=v,this._versionId=V,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(r){r.eol&&r.eol!==this._eol&&(this._eol=r.eol,this._lineStarts=null);const l=r.changes;for(const v of l)this._acceptDeleteRange(v.range),this._acceptInsertText(new ie.y(v.range.startLineNumber,v.range.startColumn),v.text);this._versionId=r.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const r=this._eol.length,l=this._lines.length,v=new Uint32Array(l);for(let V=0;V<l;V++)v[V]=this._lines[V].length+r;this._lineStarts=new Ze.N(v)}}_setLineText(r,l){this._lines[r]=l,this._lineStarts&&this._lineStarts.setValue(r,this._lines[r].length+this._eol.length)}_acceptDeleteRange(r){if(r.startLineNumber===r.endLineNumber){if(r.startColumn===r.endColumn)return;this._setLineText(r.startLineNumber-1,this._lines[r.startLineNumber-1].substring(0,r.startColumn-1)+this._lines[r.startLineNumber-1].substring(r.endColumn-1));return}this._setLineText(r.startLineNumber-1,this._lines[r.startLineNumber-1].substring(0,r.startColumn-1)+this._lines[r.endLineNumber-1].substring(r.endColumn-1)),this._lines.splice(r.startLineNumber,r.endLineNumber-r.startLineNumber),this._lineStarts&&this._lineStarts.removeValues(r.startLineNumber,r.endLineNumber-r.startLineNumber)}_acceptInsertText(r,l){if(l.length===0)return;const v=(0,d.uz)(l);if(v.length===1){this._setLineText(r.lineNumber-1,this._lines[r.lineNumber-1].substring(0,r.column-1)+v[0]+this._lines[r.lineNumber-1].substring(r.column-1));return}v[v.length-1]+=this._lines[r.lineNumber-1].substring(r.column-1),this._setLineText(r.lineNumber-1,this._lines[r.lineNumber-1].substring(0,r.column-1)+v[0]);const V=new Uint32Array(v.length-1);for(let G=1;G<v.length;G++)this._lines.splice(r.lineNumber+G-1,0,v[G]),V[G-1]=v[G].length+this._eol.length;this._lineStarts&&this._lineStarts.insertValues(r.lineNumber,V)}}var At=f(18782),ei=f(27454);class oi{constructor(r,l,v){const V=new Uint8Array(r*l);for(let G=0,ae=r*l;G<ae;G++)V[G]=v;this._data=V,this.rows=r,this.cols=l}get(r,l){return this._data[r*this.cols+l]}set(r,l,v){this._data[r*this.cols+l]=v}}class Li{constructor(r){let l=0,v=0;for(let G=0,ae=r.length;G<ae;G++){const[me,Ne,Ve]=r[G];Ne>l&&(l=Ne),me>v&&(v=me),Ve>v&&(v=Ve)}l++,v++;const V=new oi(v,l,0);for(let G=0,ae=r.length;G<ae;G++){const[me,Ne,Ve]=r[G];V.set(me,Ne,Ve)}this._states=V,this._maxCharCode=l}nextState(r,l){return l<0||l>=this._maxCharCode?0:this._states.get(r,l)}}let zi=null;function Di(){return zi===null&&(zi=new Li([[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]])),zi}let Te=null;function ki(){if(Te===null){Te=new ei.V(0);const ue=` <>'"\u3001\u3002\uFF61\uFF64\uFF0C\uFF0E\uFF1A\uFF1B\u2018\u3008\u300C\u300E\u3014\uFF08\uFF3B\uFF5B\uFF62\uFF63\uFF5D\uFF3D\uFF09\u3015\u300F\u300D\u3009\u2019\uFF40\uFF5E\u2026`;for(let l=0;l<ue.length;l++)Te.set(ue.charCodeAt(l),1);const r=".,;:";for(let l=0;l<r.length;l++)Te.set(r.charCodeAt(l),2)}return Te}class ze{static _createLink(r,l,v,V,G){let ae=G-1;do{const me=l.charCodeAt(ae);if(r.get(me)!==2)break;ae--}while(ae>V);if(V>0){const me=l.charCodeAt(V-1),Ne=l.charCodeAt(ae);(me===40&&Ne===41||me===91&&Ne===93||me===123&&Ne===125)&&ae--}return{range:{startLineNumber:v,startColumn:V+1,endLineNumber:v,endColumn:ae+2},url:l.substring(V,ae+1)}}static computeLinks(r,l=Di()){const v=ki(),V=[];for(let G=1,ae=r.getLineCount();G<=ae;G++){const me=r.getLineContent(G),Ne=me.length;let Ve=0,Ge=0,mt=0,ti=1,Si=!1,tn=!1,kn=!1,On=!1;for(;Ve<Ne;){let as=!1;const qn=me.charCodeAt(Ve);if(ti===13){let Pn;switch(qn){case 40:Si=!0,Pn=0;break;case 41:Pn=Si?0:1;break;case 91:kn=!0,tn=!0,Pn=0;break;case 93:kn=!1,Pn=tn?0:1;break;case 123:On=!0,Pn=0;break;case 125:Pn=On?0:1;break;case 39:Pn=mt===39?1:0;break;case 34:Pn=mt===34?1:0;break;case 96:Pn=mt===96?1:0;break;case 42:Pn=mt===42?1:0;break;case 124:Pn=mt===124?1:0;break;case 32:Pn=kn?0:1;break;default:Pn=v.get(qn)}Pn===1&&(V.push(ze._createLink(v,me,G,Ge,Ve)),as=!0)}else if(ti===12){let Pn;qn===91?(tn=!0,Pn=0):Pn=v.get(qn),Pn===1?as=!0:ti=13}else ti=l.nextState(ti,qn),ti===0&&(as=!0);as&&(ti=1,Si=!1,tn=!1,On=!1,Ge=Ve+1,mt=qn),Ve++}ti===13&&V.push(ze._createLink(v,me,G,Ge,Ne))}return V}}function we(ue){return!ue||typeof ue.getLineCount!="function"||typeof ue.getLineContent!="function"?[]:ze.computeLinks(ue)}class ct{constructor(){this._defaultValueSet=[["true","false"],["True","False"],["Private","Public","Friend","ReadOnly","Partial","Protected","WriteOnly"],["public","protected","private"]]}navigateValueSet(r,l,v,V,G){if(r&&l){const ae=this.doNavigateValueSet(l,G);if(ae)return{range:r,value:ae}}if(v&&V){const ae=this.doNavigateValueSet(V,G);if(ae)return{range:v,value:ae}}return null}doNavigateValueSet(r,l){const v=this.numberReplace(r,l);return v!==null?v:this.textReplace(r,l)}numberReplace(r,l){const v=Math.pow(10,r.length-(r.lastIndexOf(".")+1));let V=Number(r);const G=parseFloat(r);return!isNaN(V)&&!isNaN(G)&&V===G?V===0&&!l?null:(V=Math.floor(V*v),V+=l?v:-v,String(V/v)):null}textReplace(r,l){return this.valueSetsReplace(this._defaultValueSet,r,l)}valueSetsReplace(r,l,v){let V=null;for(let G=0,ae=r.length;V===null&&G<ae;G++)V=this.valueSetReplace(r[G],l,v);return V}valueSetReplace(r,l,v){let V=r.indexOf(l);return V>=0?(V+=v?1:-1,V<0?V=r.length-1:V%=r.length,r[V]):null}}ct.INSTANCE=new ct;var Oe=f(23013),ut=f(49887),Zt=function(ue,r,l,v){function V(G){return G instanceof l?G:new l(function(ae){ae(G)})}return new(l||(l=Promise))(function(G,ae){function me(Ge){try{Ve(v.next(Ge))}catch(mt){ae(mt)}}function Ne(Ge){try{Ve(v.throw(Ge))}catch(mt){ae(mt)}}function Ve(Ge){Ge.done?G(Ge.value):V(Ge.value).then(me,Ne)}Ve((v=v.apply(ue,r||[])).next())})};class Ci extends _t{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}getLinesContent(){return this._lines.slice(0)}getLineCount(){return this._lines.length}getLineContent(r){return this._lines[r-1]}getWordAtPosition(r,l){const v=(0,At.Th)(r.column,(0,At.Io)(l),this._lines[r.lineNumber-1],0);return v?new Q.Q(r.lineNumber,v.startColumn,r.lineNumber,v.endColumn):null}words(r){const l=this._lines,v=this._wordenize.bind(this);let V=0,G="",ae=0,me=[];return{*[Symbol.iterator](){for(;;)if(ae<me.length){const Ne=G.substring(me[ae].start,me[ae].end);ae+=1,yield Ne}else if(V<l.length)G=l[V],me=v(G,r),ae=0,V+=1;else break}}}getLineWords(r,l){const v=this._lines[r-1],V=this._wordenize(v,l),G=[];for(const ae of V)G.push({word:v.substring(ae.start,ae.end),startColumn:ae.start+1,endColumn:ae.end+1});return G}_wordenize(r,l){const v=[];let V;for(l.lastIndex=0;(V=l.exec(r))&&V[0].length!==0;)v.push({start:V.index,end:V.index+V[0].length});return v}getValueInRange(r){if(r=this._validateRange(r),r.startLineNumber===r.endLineNumber)return this._lines[r.startLineNumber-1].substring(r.startColumn-1,r.endColumn-1);const l=this._eol,v=r.startLineNumber-1,V=r.endLineNumber-1,G=[];G.push(this._lines[v].substring(r.startColumn-1));for(let ae=v+1;ae<V;ae++)G.push(this._lines[ae]);return G.push(this._lines[V].substring(0,r.endColumn-1)),G.join(l)}offsetAt(r){return r=this._validatePosition(r),this._ensureLineStarts(),this._lineStarts.getPrefixSum(r.lineNumber-2)+(r.column-1)}positionAt(r){r=Math.floor(r),r=Math.max(0,r),this._ensureLineStarts();const l=this._lineStarts.getIndexOf(r),v=this._lines[l.index].length;return{lineNumber:1+l.index,column:1+Math.min(l.remainder,v)}}_validateRange(r){const l=this._validatePosition({lineNumber:r.startLineNumber,column:r.startColumn}),v=this._validatePosition({lineNumber:r.endLineNumber,column:r.endColumn});return l.lineNumber!==r.startLineNumber||l.column!==r.startColumn||v.lineNumber!==r.endLineNumber||v.column!==r.endColumn?{startLineNumber:l.lineNumber,startColumn:l.column,endLineNumber:v.lineNumber,endColumn:v.column}:r}_validatePosition(r){if(!ie.y.isIPosition(r))throw new Error("bad position");let{lineNumber:l,column:v}=r,V=!1;if(l<1)l=1,v=1,V=!0;else if(l>this._lines.length)l=this._lines.length,v=this._lines[l-1].length+1,V=!0;else{const G=this._lines[l-1].length+1;v<1?(v=1,V=!0):v>G&&(v=G,V=!0)}return V?{lineNumber:l,column:v}:r}}class Ki{constructor(r,l){this._host=r,this._models=Object.create(null),this._foreignModuleFactory=l,this._foreignModule=null}dispose(){this._models=Object.create(null)}_getModel(r){return this._models[r]}_getModels(){const r=[];return Object.keys(this._models).forEach(l=>r.push(this._models[l])),r}acceptNewModel(r){this._models[r.url]=new Ci(x.r.parse(r.url),r.lines,r.EOL,r.versionId)}acceptModelChanged(r,l){if(!this._models[r])return;this._models[r].onEvents(l)}acceptRemovedModel(r){this._models[r]&&delete this._models[r]}computeUnicodeHighlights(r,l,v){return Zt(this,void 0,void 0,function*(){const V=this._getModel(r);return V?ut.P.computeUnicodeHighlights(V,l,v):{ranges:[],hasMore:!1,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}})}computeDiff(r,l,v,V){return Zt(this,void 0,void 0,function*(){const G=this._getModel(r),ae=this._getModel(l);return!G||!ae?null:Ki.computeDiff(G,ae,v,V)})}static computeDiff(r,l,v,V){const G=r.getLinesContent(),ae=l.getLinesContent(),Ne=new bt(G,ae,{shouldComputeCharChanges:!0,shouldPostProcessCharChanges:!0,shouldIgnoreTrimWhitespace:v,shouldMakePrettyDiff:!0,maxComputationTime:V}).computeDiff(),Ve=Ne.changes.length>0?!1:this._modelsAreIdentical(r,l);return{quitEarly:Ne.quitEarly,identical:Ve,changes:Ne.changes}}static _modelsAreIdentical(r,l){const v=r.getLineCount(),V=l.getLineCount();if(v!==V)return!1;for(let G=1;G<=v;G++){const ae=r.getLineContent(G),me=l.getLineContent(G);if(ae!==me)return!1}return!0}computeMoreMinimalEdits(r,l){return Zt(this,void 0,void 0,function*(){const v=this._getModel(r);if(!v)return l;const V=[];let G;l=l.slice(0).sort((ae,me)=>{if(ae.range&&me.range)return Q.Q.compareRangesUsingStarts(ae.range,me.range);const Ne=ae.range?0:1,Ve=me.range?0:1;return Ne-Ve});for(let{range:ae,text:me,eol:Ne}of l){if(typeof Ne=="number"&&(G=Ne),Q.Q.isEmpty(ae)&&!me)continue;const Ve=v.getValueInRange(ae);if(me=me.replace(/\r\n|\n|\r/g,v.eol),Ve===me)continue;if(Math.max(me.length,Ve.length)>Ki._diffLimit){V.push({range:ae,text:me});continue}const Ge=(0,Dt.F1)(Ve,me,!1),mt=v.offsetAt(Q.Q.lift(ae).getStartPosition());for(const ti of Ge){const Si=v.positionAt(mt+ti.originalStart),tn=v.positionAt(mt+ti.originalStart+ti.originalLength),kn={text:me.substr(ti.modifiedStart,ti.modifiedLength),range:{startLineNumber:Si.lineNumber,startColumn:Si.column,endLineNumber:tn.lineNumber,endColumn:tn.column}};v.getValueInRange(kn.range)!==kn.text&&V.push(kn)}}return typeof G=="number"&&V.push({eol:G,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),V})}computeLinks(r){return Zt(this,void 0,void 0,function*(){const l=this._getModel(r);return l?we(l):null})}textualSuggest(r,l,v,V){return Zt(this,void 0,void 0,function*(){const G=new Oe.W(!0),ae=new RegExp(v,V),me=new Set;e:for(const Ne of r){const Ve=this._getModel(Ne);if(Ve){for(const Ge of Ve.words(ae))if(!(Ge===l||!isNaN(Number(Ge)))&&(me.add(Ge),me.size>Ki._suggestionsLimit))break e}}return{words:Array.from(me),duration:G.elapsed()}})}computeWordRanges(r,l,v,V){return Zt(this,void 0,void 0,function*(){const G=this._getModel(r);if(!G)return Object.create(null);const ae=new RegExp(v,V),me=Object.create(null);for(let Ne=l.startLineNumber;Ne<l.endLineNumber;Ne++){const Ve=G.getLineWords(Ne,ae);for(const Ge of Ve){if(!isNaN(Number(Ge.word)))continue;let mt=me[Ge.word];mt||(mt=[],me[Ge.word]=mt),mt.push({startLineNumber:Ne,startColumn:Ge.startColumn,endLineNumber:Ne,endColumn:Ge.endColumn})}}return me})}navigateValueSet(r,l,v,V,G){return Zt(this,void 0,void 0,function*(){const ae=this._getModel(r);if(!ae)return null;const me=new RegExp(V,G);l.startColumn===l.endColumn&&(l={startLineNumber:l.startLineNumber,startColumn:l.startColumn,endLineNumber:l.endLineNumber,endColumn:l.endColumn+1});const Ne=ae.getValueInRange(l),Ve=ae.getWordAtPosition({lineNumber:l.startLineNumber,column:l.startColumn},me);if(!Ve)return null;const Ge=ae.getValueInRange(Ve);return ct.INSTANCE.navigateValueSet(l,Ne,Ve,Ge,v)})}loadForeignModule(r,l,v){const V=(me,Ne)=>this._host.fhr(me,Ne),ae={host:fe.kT(v,V),getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(ae,l),Promise.resolve(fe.V0(this._foreignModule))):Promise.reject(new Error("Unexpected usage"))}fmr(r,l){if(!this._foreignModule||typeof this._foreignModule[r]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+r));try{return Promise.resolve(this._foreignModule[r].apply(this._foreignModule,l))}catch(v){return Promise.reject(v)}}}Ki._diffLimit=1e5,Ki._suggestionsLimit=1e4;function Ln(ue){return new Ki(ue,null)}typeof importScripts=="function"&&(ge.zQ.monaco=y());var nt=f(41504),Ct=f(13338),Qt=f(46441),Ot=f(52230),at=function(ue,r,l,v){var V=arguments.length,G=V<3?r:v===null?v=Object.getOwnPropertyDescriptor(r,l):v,ae;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")G=Reflect.decorate(ue,r,l,v);else for(var me=ue.length-1;me>=0;me--)(ae=ue[me])&&(G=(V<3?ae(G):V>3?ae(r,l,G):ae(r,l))||G);return V>3&&G&&Object.defineProperty(r,l,G),G},Yi=function(ue,r){return function(l,v){r(l,v,ue)}},bi=function(ue,r,l,v){function V(G){return G instanceof l?G:new l(function(ae){ae(G)})}return new(l||(l=Promise))(function(G,ae){function me(Ge){try{Ve(v.next(Ge))}catch(mt){ae(mt)}}function Ne(Ge){try{Ve(v.throw(Ge))}catch(mt){ae(mt)}}function Ve(Ge){Ge.done?G(Ge.value):V(Ge.value).then(me,Ne)}Ve((v=v.apply(ue,r||[])).next())})};const St=60*1e3,bn=5*60*1e3;function sn(ue,r){const l=ue.getModel(r);return!(!l||l.isTooLargeForSyncing())}let ni=class extends ce.jG{constructor(r,l,v,V,G){super(),this._modelService=r,this._workerManager=this._register(new Ce(this._modelService,V)),this._logService=v,this._register(G.linkProvider.register({language:"*",hasAccessToAllModels:!0},{provideLinks:(ae,me)=>sn(this._modelService,ae.uri)?this._workerManager.withWorker().then(Ne=>Ne.computeLinks(ae.uri)).then(Ne=>Ne&&{links:Ne}):Promise.resolve({links:[]})})),this._register(G.completionProvider.register("*",new xe(this._workerManager,l,this._modelService,V)))}dispose(){super.dispose()}canComputeUnicodeHighlights(r){return sn(this._modelService,r)}computedUnicodeHighlights(r,l,v){return this._workerManager.withWorker().then(V=>V.computedUnicodeHighlights(r,l,v))}computeDiff(r,l,v,V){return this._workerManager.withWorker().then(G=>G.computeDiff(r,l,v,V))}computeMoreMinimalEdits(r,l){if((0,Ct.EI)(l)){if(!sn(this._modelService,r))return Promise.resolve(l);const v=Oe.W.create(!0),V=this._workerManager.withWorker().then(G=>G.computeMoreMinimalEdits(r,l));return V.finally(()=>this._logService.trace("FORMAT#computeMoreMinimalEdits",r.toString(!0),v.elapsed())),Promise.race([V,(0,ee.wR)(1e3).then(()=>l)])}else return Promise.resolve(void 0)}canNavigateValueSet(r){return sn(this._modelService,r)}navigateValueSet(r,l,v){return this._workerManager.withWorker().then(V=>V.navigateValueSet(r,l,v))}canComputeWordRanges(r){return sn(this._modelService,r)}computeWordRanges(r,l){return this._workerManager.withWorker().then(v=>v.computeWordRanges(r,l))}};ni=at([Yi(0,Y.S),Yi(1,nt.U),Yi(2,Qt.rr),Yi(3,B.JZ),Yi(4,Ot.u)],ni);class xe{constructor(r,l,v,V){this.languageConfigurationService=V,this._debugDisplayName="wordbasedCompletions",this._workerManager=r,this._configurationService=l,this._modelService=v}provideCompletionItems(r,l){return bi(this,void 0,void 0,function*(){const v=this._configurationService.getValue(r.uri,l,"editor");if(!v.wordBasedSuggestions)return;const V=[];if(v.wordBasedSuggestionsMode==="currentDocument")sn(this._modelService,r.uri)&&V.push(r.uri);else for(const mt of this._modelService.getModels())sn(this._modelService,mt.uri)&&(mt===r?V.unshift(mt.uri):(v.wordBasedSuggestionsMode==="allDocuments"||mt.getLanguageId()===r.getLanguageId())&&V.push(mt.uri));if(V.length===0)return;const G=this.languageConfigurationService.getLanguageConfiguration(r.getLanguageId()).getWordDefinition(),ae=r.getWordAtPosition(l),me=ae?new Q.Q(l.lineNumber,ae.startColumn,l.lineNumber,ae.endColumn):Q.Q.fromPositions(l),Ne=me.setEndPosition(l.lineNumber,l.column),Ge=yield(yield this._workerManager.withWorker()).textualSuggest(V,ae?.word,G);if(Ge)return{duration:Ge.duration,suggestions:Ge.words.map(mt=>({kind:18,label:mt,insertText:mt,range:{insert:Ne,replace:me}}))}})}}class Ce extends ce.jG{constructor(r,l){super(),this.languageConfigurationService=l,this._modelService=r,this._editorWorkerClient=null,this._lastWorkerUsedTime=new Date().getTime(),this._register(new ee.vb).cancelAndSet(()=>this._checkStopIdleWorker(),Math.round(bn/2)),this._register(this._modelService.onModelRemoved(V=>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>bn&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}withWorker(){return this._lastWorkerUsedTime=new Date().getTime(),this._editorWorkerClient||(this._editorWorkerClient=new Gt(this._modelService,!1,"editorWorkerService",this.languageConfigurationService)),Promise.resolve(this._editorWorkerClient)}}class Ye extends ce.jG{constructor(r,l,v){if(super(),this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),this._proxy=r,this._modelService=l,!v){const V=new ee.vb;V.cancelAndSet(()=>this._checkStopModelSync(),Math.round(St/2)),this._register(V)}}dispose(){for(const r in this._syncedModels)(0,ce.AS)(this._syncedModels[r]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),super.dispose()}ensureSyncedResources(r,l){for(const v of r){const V=v.toString();this._syncedModels[V]||this._beginModelSync(v,l),this._syncedModels[V]&&(this._syncedModelsLastUsedTime[V]=new Date().getTime())}}_checkStopModelSync(){const r=new Date().getTime(),l=[];for(const v in this._syncedModelsLastUsedTime)r-this._syncedModelsLastUsedTime[v]>St&&l.push(v);for(const v of l)this._stopModelSync(v)}_beginModelSync(r,l){const v=this._modelService.getModel(r);if(!v||!l&&v.isTooLargeForSyncing())return;const V=r.toString();this._proxy.acceptNewModel({url:v.uri.toString(),lines:v.getLinesContent(),EOL:v.getEOL(),versionId:v.getVersionId()});const G=new ce.Cm;G.add(v.onDidChangeContent(ae=>{this._proxy.acceptModelChanged(V.toString(),ae)})),G.add(v.onWillDispose(()=>{this._stopModelSync(V)})),G.add((0,ce.s)(()=>{this._proxy.acceptRemovedModel(V)})),this._syncedModels[V]=G}_stopModelSync(r){const l=this._syncedModels[r];delete this._syncedModels[r],delete this._syncedModelsLastUsedTime[r],(0,ce.AS)(l)}}class Rt{constructor(r){this._instance=r,this._proxyObj=Promise.resolve(this._instance)}dispose(){this._instance.dispose()}getProxyObject(){return this._proxyObj}}class Vt{constructor(r){this._workerClient=r}fhr(r,l){return this._workerClient.fhr(r,l)}}class Gt extends ce.jG{constructor(r,l,v,V){super(),this.languageConfigurationService=V,this._disposed=!1,this._modelService=r,this._keepIdleModels=l,this._workerFactory=new Lt(v),this._worker=null,this._modelManager=null}fhr(r,l){throw new Error("Not implemented!")}_getOrCreateWorker(){if(!this._worker)try{this._worker=this._register(new O(this._workerFactory,"vs/editor/common/services/editorSimpleWorker",new Vt(this)))}catch(r){le(r),this._worker=new Rt(new Ki(new Vt(this),null))}return this._worker}_getProxy(){return this._getOrCreateWorker().getProxyObject().then(void 0,r=>(le(r),this._worker=new Rt(new Ki(new Vt(this),null)),this._getOrCreateWorker().getProxyObject()))}_getOrCreateModelManager(r){return this._modelManager||(this._modelManager=this._register(new Ye(r,this._modelService,this._keepIdleModels))),this._modelManager}_withSyncedResources(r,l=!1){return bi(this,void 0,void 0,function*(){return this._disposed?Promise.reject((0,pe.aD)()):this._getProxy().then(v=>(this._getOrCreateModelManager(v).ensureSyncedResources(r,l),v))})}computedUnicodeHighlights(r,l,v){return this._withSyncedResources([r]).then(V=>V.computeUnicodeHighlights(r.toString(),l,v))}computeDiff(r,l,v,V){return this._withSyncedResources([r,l],!0).then(G=>G.computeDiff(r.toString(),l.toString(),v,V))}computeMoreMinimalEdits(r,l){return this._withSyncedResources([r]).then(v=>v.computeMoreMinimalEdits(r.toString(),l))}computeLinks(r){return this._withSyncedResources([r]).then(l=>l.computeLinks(r.toString()))}textualSuggest(r,l,v){return bi(this,void 0,void 0,function*(){const V=yield this._withSyncedResources(r),G=v.source,ae=(0,d.RH)(v);return V.textualSuggest(r.map(me=>me.toString()),l,G,ae)})}computeWordRanges(r,l){return this._withSyncedResources([r]).then(v=>{const V=this._modelService.getModel(r);if(!V)return Promise.resolve(null);const G=this.languageConfigurationService.getLanguageConfiguration(V.getLanguageId()).getWordDefinition(),ae=G.source,me=(0,d.RH)(G);return v.computeWordRanges(r.toString(),l,ae,me)})}navigateValueSet(r,l,v){return this._withSyncedResources([r]).then(V=>{const G=this._modelService.getModel(r);if(!G)return null;const ae=this.languageConfigurationService.getLanguageConfiguration(G.getLanguageId()).getWordDefinition(),me=ae.source,Ne=(0,d.RH)(ae);return V.navigateValueSet(r.toString(),l,v,me,Ne)})}dispose(){super.dispose(),this._disposed=!0}}function ri(ue,r,l){return new fi(ue,r,l)}class fi extends Gt{constructor(r,l,v){super(r,v.keepIdleModels||!1,v.label,l),this._foreignModuleId=v.moduleId,this._foreignModuleCreateData=v.createData||null,this._foreignModuleHost=v.host||null,this._foreignProxy=null}fhr(r,l){if(!this._foreignModuleHost||typeof this._foreignModuleHost[r]!="function")return Promise.reject(new Error("Missing method "+r+" or missing main thread foreign host."));try{return Promise.resolve(this._foreignModuleHost[r].apply(this._foreignModuleHost,l))}catch(v){return Promise.reject(v)}}_getForeignProxy(){return this._foreignProxy||(this._foreignProxy=this._getProxy().then(r=>{const l=this._foreignModuleHost?fe.V0(this._foreignModuleHost):[];return r.loadForeignModule(this._foreignModuleId,this._foreignModuleCreateData,l).then(v=>{this._foreignModuleCreateData=null;const V=(me,Ne)=>r.fmr(me,Ne),G=(me,Ne)=>function(){const Ve=Array.prototype.slice.call(arguments,0);return Ne(me,Ve)},ae={};for(const me of v)ae[me]=G(me,V);return ae})})),this._foreignProxy}getProxy(){return this._getForeignProxy()}withSyncedResources(r){return this._withSyncedResources(r).then(l=>this.getProxy())}}var di=f(57445),Jt=f(39723),ai=f(11608);function Ei(ue){return Array.isArray(ue)}function wi(ue){return!Ei(ue)}function Ai(ue){return typeof ue=="string"}function Ni(ue){return!Ai(ue)}function qi(ue){return!ue}function Pi(ue,r){return ue.ignoreCase&&r?r.toLowerCase():r}function gn(ue){return ue.replace(/[&<>'"_]/g,"-")}function Gi(ue,r){console.log(`${ue.languageId}: ${r}`)}function Oi(ue,r){return new Error(`${ue.languageId}: ${r}`)}function Fi(ue,r,l,v,V){const G=/\$((\$)|(#)|(\d\d?)|[sS](\d\d?)|@(\w+))/g;let ae=null;return r.replace(G,function(me,Ne,Ve,Ge,mt,ti,Si,tn,kn){return qi(Ve)?qi(Ge)?!qi(mt)&&mt<v.length?Pi(ue,v[mt]):!qi(Si)&&ue&&typeof ue[Si]=="string"?ue[Si]:(ae===null&&(ae=V.split("."),ae.unshift(V)),!qi(ti)&&ti<ae.length?Pi(ue,ae[ti]):""):Pi(ue,l):"$"})}function Bi(ue,r){let l=r;for(;l&&l.length>0;){const v=ue.tokenizer[l];if(v)return v;const V=l.lastIndexOf(".");V<0?l=null:l=l.substr(0,V)}return null}function rn(ue,r){let l=r;for(;l&&l.length>0;){if(ue.stateNames[l])return!0;const V=l.lastIndexOf(".");V<0?l=null:l=l.substr(0,V)}return!1}var _i=f(85753),jn=function(ue,r,l,v){var V=arguments.length,G=V<3?r:v===null?v=Object.getOwnPropertyDescriptor(r,l):v,ae;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")G=Reflect.decorate(ue,r,l,v);else for(var me=ue.length-1;me>=0;me--)(ae=ue[me])&&(G=(V<3?ae(G):V>3?ae(r,l,G):ae(r,l))||G);return V>3&&G&&Object.defineProperty(r,l,G),G},Wn=function(ue,r){return function(l,v){r(l,v,ue)}};const xn=5;class Rn{constructor(r){this._maxCacheDepth=r,this._entries=Object.create(null)}static create(r,l){return this._INSTANCE.create(r,l)}create(r,l){if(r!==null&&r.depth>=this._maxCacheDepth)return new $i(r,l);let v=$i.getStackElementId(r);v.length>0&&(v+="|"),v+=l;let V=this._entries[v];return V||(V=new $i(r,l),this._entries[v]=V,V)}}Rn._INSTANCE=new Rn(xn);class $i{constructor(r,l){this.parent=r,this.state=l,this.depth=(this.parent?this.parent.depth:0)+1}static getStackElementId(r){let l="";for(;r!==null;)l.length>0&&(l+="|"),l+=r.state,r=r.parent;return l}static _equals(r,l){for(;r!==null&&l!==null;){if(r===l)return!0;if(r.state!==l.state)return!1;r=r.parent,l=l.parent}return r===null&&l===null}equals(r){return $i._equals(this,r)}push(r){return Rn.create(this,r)}pop(){return this.parent}popall(){let r=this;for(;r.parent;)r=r.parent;return r}switchTo(r){return Rn.create(this.parent,r)}}class Nn{constructor(r,l){this.languageId=r,this.state=l}equals(r){return this.languageId===r.languageId&&this.state.equals(r.state)}clone(){return this.state.clone()===this.state?this:new Nn(this.languageId,this.state)}}class Jn{constructor(r){this._maxCacheDepth=r,this._entries=Object.create(null)}static create(r,l){return this._INSTANCE.create(r,l)}create(r,l){if(l!==null)return new Ti(r,l);if(r!==null&&r.depth>=this._maxCacheDepth)return new Ti(r,l);const v=$i.getStackElementId(r);let V=this._entries[v];return V||(V=new Ti(r,null),this._entries[v]=V,V)}}Jn._INSTANCE=new Jn(xn);class Ti{constructor(r,l){this.stack=r,this.embeddedLanguageData=l}clone(){return(this.embeddedLanguageData?this.embeddedLanguageData.clone():null)===this.embeddedLanguageData?this:Jn.create(this.stack,this.embeddedLanguageData)}equals(r){return!(r instanceof Ti)||!this.stack.equals(r.stack)?!1:this.embeddedLanguageData===null&&r.embeddedLanguageData===null?!0:this.embeddedLanguageData===null||r.embeddedLanguageData===null?!1:this.embeddedLanguageData.equals(r.embeddedLanguageData)}}class es{constructor(){this._tokens=[],this._languageId=null,this._lastTokenType=null,this._lastTokenLanguage=null}enterLanguage(r){this._languageId=r}emit(r,l){this._lastTokenType===l&&this._lastTokenLanguage===this._languageId||(this._lastTokenType=l,this._lastTokenLanguage=this._languageId,this._tokens.push(new z.ou(r,l,this._languageId)))}nestedLanguageTokenize(r,l,v,V){const G=v.languageId,ae=v.state,me=z.dG.get(G);if(!me)return this.enterLanguage(G),this.emit(V,""),ae;const Ne=me.tokenize(r,l,ae);if(V!==0)for(const Ve of Ne.tokens)this._tokens.push(new z.ou(Ve.offset+V,Ve.type,Ve.language));else this._tokens=this._tokens.concat(Ne.tokens);return this._lastTokenType=null,this._lastTokenLanguage=null,this._languageId=null,Ne.endState}finalize(r){return new z.$M(this._tokens,r)}}class xi{constructor(r,l){this._languageService=r,this._theme=l,this._prependTokens=null,this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0}enterLanguage(r){this._currentLanguageId=this._languageService.languageIdCodec.encodeLanguageId(r)}emit(r,l){const v=this._theme.match(this._currentLanguageId,l);this._lastTokenMetadata!==v&&(this._lastTokenMetadata=v,this._tokens.push(r),this._tokens.push(v))}static _merge(r,l,v){const V=r!==null?r.length:0,G=l.length,ae=v!==null?v.length:0;if(V===0&&G===0&&ae===0)return new Uint32Array(0);if(V===0&&G===0)return v;if(G===0&&ae===0)return r;const me=new Uint32Array(V+G+ae);r!==null&&me.set(r);for(let Ne=0;Ne<G;Ne++)me[V+Ne]=l[Ne];return v!==null&&me.set(v,V+G),me}nestedLanguageTokenize(r,l,v,V){const G=v.languageId,ae=v.state,me=z.dG.get(G);if(!me)return this.enterLanguage(G),this.emit(V,""),ae;const Ne=me.tokenizeEncoded(r,l,ae);if(V!==0)for(let Ve=0,Ge=Ne.tokens.length;Ve<Ge;Ve+=2)Ne.tokens[Ve]+=V;return this._prependTokens=xi._merge(this._prependTokens,this._tokens,Ne.tokens),this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0,Ne.endState}finalize(r){return new z.rY(xi._merge(this._prependTokens,this._tokens,null),r)}}let os=class iC{constructor(r,l,v,V,G){this._configurationService=G,this._languageService=r,this._standaloneThemeService=l,this._languageId=v,this._lexer=V,this._embeddedLanguages=Object.create(null),this.embeddedLoaded=Promise.resolve(void 0);let ae=!1;this._tokenizationRegistryListener=z.dG.onDidChange(me=>{if(ae)return;let Ne=!1;for(let Ve=0,Ge=me.changedLanguages.length;Ve<Ge;Ve++){const mt=me.changedLanguages[Ve];if(this._embeddedLanguages[mt]){Ne=!0;break}}Ne&&(ae=!0,z.dG.fire([this._languageId]),ae=!1)}),this._maxTokenizationLineLength=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:this._languageId}),this._configurationService.onDidChangeConfiguration(me=>{me.affectsConfiguration("editor.maxTokenizationLineLength")&&(this._maxTokenizationLineLength=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:this._languageId}))})}dispose(){this._tokenizationRegistryListener.dispose()}getLoadStatus(){const r=[];for(const l in this._embeddedLanguages){const v=z.dG.get(l);if(v){if(v instanceof iC){const V=v.getLoadStatus();V.loaded===!1&&r.push(V.promise)}continue}z.dG.isResolved(l)||r.push(z.dG.getOrCreate(l))}return r.length===0?{loaded:!0}:{loaded:!1,promise:Promise.all(r).then(l=>{})}}getInitialState(){const r=Rn.create(null,this._lexer.start);return Jn.create(r,null)}tokenize(r,l,v){if(r.length>=this._maxTokenizationLineLength)return(0,T.$H)(this._languageId,v);const V=new es,G=this._tokenize(r,l,v,V);return V.finalize(G)}tokenizeEncoded(r,l,v){if(r.length>=this._maxTokenizationLineLength)return(0,T.Lh)(this._languageService.languageIdCodec.encodeLanguageId(this._languageId),v);const V=new xi(this._languageService,this._standaloneThemeService.getColorTheme().tokenTheme),G=this._tokenize(r,l,v,V);return V.finalize(G)}_tokenize(r,l,v,V){return v.embeddedLanguageData?this._nestedTokenize(r,l,v,0,V):this._myTokenize(r,l,v,0,V)}_findLeavingNestedLanguageOffset(r,l){let v=this._lexer.tokenizer[l.stack.state];if(!v&&(v=Bi(this._lexer,l.stack.state),!v))throw Oi(this._lexer,"tokenizer state is not defined: "+l.stack.state);let V=-1,G=!1;for(const ae of v){if(!Ni(ae.action)||ae.action.nextEmbedded!=="@pop")continue;G=!0;let me=ae.regex;const Ne=ae.regex.source;if(Ne.substr(0,4)==="^(?:"&&Ne.substr(Ne.length-1,1)===")"){const Ge=(me.ignoreCase?"i":"")+(me.unicode?"u":"");me=new RegExp(Ne.substr(4,Ne.length-5),Ge)}const Ve=r.search(me);Ve===-1||Ve!==0&&ae.matchOnlyAtLineStart||(V===-1||Ve<V)&&(V=Ve)}if(!G)throw Oi(this._lexer,'no rule containing nextEmbedded: "@pop" in tokenizer embedded state: '+l.stack.state);return V}_nestedTokenize(r,l,v,V,G){const ae=this._findLeavingNestedLanguageOffset(r,v);if(ae===-1){const Ve=G.nestedLanguageTokenize(r,l,v.embeddedLanguageData,V);return Jn.create(v.stack,new Nn(v.embeddedLanguageData.languageId,Ve))}const me=r.substring(0,ae);me.length>0&&G.nestedLanguageTokenize(me,!1,v.embeddedLanguageData,V);const Ne=r.substring(ae);return this._myTokenize(Ne,l,v,V+ae,G)}_safeRuleName(r){return r?r.name:"(unknown)"}_myTokenize(r,l,v,V,G){G.enterLanguage(this._languageId);const ae=r.length,me=l&&this._lexer.includeLF?r+` `:r,Ne=me.length;let Ve=v.embeddedLanguageData,Ge=v.stack,mt=0,ti=null,Si=!0;for(;Si||mt<Ne;){const tn=mt,kn=Ge.depth,On=ti?ti.groups.length:0,as=Ge.state;let qn=null,Pn=null,Qn=null,zo=null,na=null;if(ti){qn=ti.matches;const Sn=ti.groups.shift();Pn=Sn.matched,Qn=Sn.action,zo=ti.rule,ti.groups.length===0&&(ti=null)}else{if(!Si&&mt>=Ne)break;Si=!1;let Sn=this._lexer.tokenizer[as];if(!Sn&&(Sn=Bi(this._lexer,as),!Sn))throw Oi(this._lexer,"tokenizer state is not defined: "+as);const En=me.substr(mt);for(const to of Sn)if((mt===0||!to.matchOnlyAtLineStart)&&(qn=En.match(to.regex),qn)){Pn=qn[0],Qn=to.action;break}}if(qn||(qn=[""],Pn=""),Qn||(mt<Ne&&(qn=[me.charAt(mt)],Pn=qn[0]),Qn=this._lexer.defaultToken),Pn===null)break;for(mt+=Pn.length;wi(Qn)&&Ni(Qn)&&Qn.test;)Qn=Qn.test(Pn,qn,as,mt===Ne);let xs=null;if(typeof Qn=="string"||Array.isArray(Qn))xs=Qn;else if(Qn.group)xs=Qn.group;else if(Qn.token!==null&&Qn.token!==void 0){if(Qn.tokenSubst?xs=Fi(this._lexer,Qn.token,Pn,qn,as):xs=Qn.token,Qn.nextEmbedded)if(Qn.nextEmbedded==="@pop"){if(!Ve)throw Oi(this._lexer,"cannot pop embedded language if not inside one");Ve=null}else{if(Ve)throw Oi(this._lexer,"cannot enter embedded language from within an embedded language");na=Fi(this._lexer,Qn.nextEmbedded,Pn,qn,as)}if(Qn.goBack&&(mt=Math.max(0,mt-Qn.goBack)),Qn.switchTo&&typeof Qn.switchTo=="string"){let Sn=Fi(this._lexer,Qn.switchTo,Pn,qn,as);if(Sn[0]==="@"&&(Sn=Sn.substr(1)),Bi(this._lexer,Sn))Ge=Ge.switchTo(Sn);else throw Oi(this._lexer,"trying to switch to a state '"+Sn+"' that is undefined in rule: "+this._safeRuleName(zo))}else{if(Qn.transform&&typeof Qn.transform=="function")throw Oi(this._lexer,"action.transform not supported");if(Qn.next)if(Qn.next==="@push"){if(Ge.depth>=this._lexer.maxStack)throw Oi(this._lexer,"maximum tokenizer stack size reached: ["+Ge.state+","+Ge.parent.state+",...]");Ge=Ge.push(as)}else if(Qn.next==="@pop"){if(Ge.depth<=1)throw Oi(this._lexer,"trying to pop an empty stack in rule: "+this._safeRuleName(zo));Ge=Ge.pop()}else if(Qn.next==="@popall")Ge=Ge.popall();else{let Sn=Fi(this._lexer,Qn.next,Pn,qn,as);if(Sn[0]==="@"&&(Sn=Sn.substr(1)),Bi(this._lexer,Sn))Ge=Ge.push(Sn);else throw Oi(this._lexer,"trying to set a next state '"+Sn+"' that is undefined in rule: "+this._safeRuleName(zo))}}Qn.log&&typeof Qn.log=="string"&&Gi(this._lexer,this._lexer.languageId+": "+Fi(this._lexer,Qn.log,Pn,qn,as))}if(xs===null)throw Oi(this._lexer,"lexer rule has no well-defined action in rule: "+this._safeRuleName(zo));const jc=Sn=>{const En=this._languageService.getLanguageIdByLanguageName(Sn)||this._languageService.getLanguageIdByMimeType(Sn)||Sn,to=this._getNestedEmbeddedLanguageData(En);if(mt<Ne){const tl=r.substr(mt);return this._nestedTokenize(tl,l,Jn.create(Ge,to),V+mt,G)}else return Jn.create(Ge,to)};if(Array.isArray(xs)){if(ti&&ti.groups.length>0)throw Oi(this._lexer,"groups cannot be nested: "+this._safeRuleName(zo));if(qn.length!==xs.length+1)throw Oi(this._lexer,"matched number of groups does not match the number of actions in rule: "+this._safeRuleName(zo));let Sn=0;for(let En=1;En<qn.length;En++)Sn+=qn[En].length;if(Sn!==Pn.length)throw Oi(this._lexer,"with groups, all characters should be matched in consecutive groups in rule: "+this._safeRuleName(zo));ti={rule:zo,matches:qn,groups:[]};for(let En=0;En<xs.length;En++)ti.groups[En]={action:xs[En],matched:qn[En+1]};mt-=Pn.length;continue}else{if(xs==="@rematch"&&(mt-=Pn.length,Pn="",qn=null,xs="",na!==null))return jc(na);if(Pn.length===0){if(Ne===0||kn!==Ge.depth||as!==Ge.state||(ti?ti.groups.length:0)!==On)continue;throw Oi(this._lexer,"no progress in tokenizer in rule: "+this._safeRuleName(zo))}let Sn=null;if(Ai(xs)&&xs.indexOf("@brackets")===0){const En=xs.substr(9),to=Zi(this._lexer,Pn);if(!to)throw Oi(this._lexer,"@brackets token returned but no bracket defined as: "+Pn);Sn=gn(to.token+En)}else{const En=xs===""?"":xs+this._lexer.tokenPostfix;Sn=gn(En)}tn<ae&&G.emit(tn+V,Sn)}if(na!==null)return jc(na)}return Jn.create(Ge,Ve)}_getNestedEmbeddedLanguageData(r){if(!this._languageService.isRegisteredLanguageId(r))return new Nn(r,T.r3);r!==this._languageId&&(z.dG.getOrCreate(r),this._embeddedLanguages[r]=!0);const l=z.dG.get(r);return l?new Nn(r,l.getInitialState()):new Nn(r,T.r3)}};os=jn([Wn(4,_i.pG)],os);function Zi(ue,r){if(!r)return null;r=Pi(ue,r);const l=ue.brackets;for(const v of l){if(v.open===r)return{token:v.token,bracketType:1};if(v.close===r)return{token:v.token,bracketType:-1}}return null}var cn=function(ue,r,l,v){function V(G){return G instanceof l?G:new l(function(ae){ae(G)})}return new(l||(l=Promise))(function(G,ae){function me(Ge){try{Ve(v.next(Ge))}catch(mt){ae(mt)}}function Ne(Ge){try{Ve(v.throw(Ge))}catch(mt){ae(mt)}}function Ve(Ge){Ge.done?G(Ge.value):V(Ge.value).then(me,Ne)}Ve((v=v.apply(ue,r||[])).next())})},Wi;const vn=(Wi=window.trustedTypes)===null||Wi===void 0?void 0:Wi.createPolicy("standaloneColorizer",{createHTML:ue=>ue});class Gn{static colorizeElement(r,l,v,V){V=V||{};const G=V.theme||"vs",ae=V.mimeType||v.getAttribute("lang")||v.getAttribute("data-lang");if(!ae)return console.error("Mode not detected"),Promise.resolve();const me=l.getLanguageIdByMimeType(ae)||ae;r.setTheme(G);const Ne=v.firstChild?v.firstChild.nodeValue:"";v.className+=" "+G;const Ve=Ge=>{var mt;const ti=(mt=vn?.createHTML(Ge))!==null&&mt!==void 0?mt:Ge;v.innerHTML=ti};return this.colorize(l,Ne||"",me,V).then(Ve,Ge=>console.error(Ge))}static colorize(r,l,v,V){return cn(this,void 0,void 0,function*(){const G=r.languageIdCodec;let ae=4;V&&typeof V.tabSize=="number"&&(ae=V.tabSize),d.LU(l)&&(l=l.substr(1));const me=d.uz(l);if(!r.isRegisteredLanguageId(v))return fn(me,ae,G);const Ne=yield z.dG.getOrCreate(v);return Ne?ws(me,ae,Ne,G):fn(me,ae,G)})}static colorizeLine(r,l,v,V,G=4){const ae=ai.qL.isBasicASCII(r,l),me=ai.qL.containsRTL(r,ae,v);return(0,Jt.Md)(new Jt.zL(!1,!0,r,!1,ae,me,0,V,[],G,0,0,0,0,-1,"none",!1,!1,null)).html}static colorizeModelLine(r,l,v=4){const V=r.getLineContent(l);r.tokenization.forceTokenization(l);const ae=r.tokenization.getLineTokens(l).inflate();return this.colorizeLine(V,r.mightContainNonBasicASCII(),r.mightContainRTL(),ae,v)}}function ws(ue,r,l,v){return new Promise((V,G)=>{const ae=()=>{const me=ks(ue,r,l,v);if(l instanceof os){const Ne=l.getLoadStatus();if(Ne.loaded===!1){Ne.promise.then(ae,G);return}}V(me)};ae()})}function fn(ue,r,l){let v=[];const G=new Uint32Array(2);G[0]=0,G[1]=33587200;for(let ae=0,me=ue.length;ae<me;ae++){const Ne=ue[ae];G[0]=Ne.length;const Ve=new di.f(G,Ne,l),Ge=ai.qL.isBasicASCII(Ne,!0),mt=ai.qL.containsRTL(Ne,Ge,!0),ti=(0,Jt.Md)(new Jt.zL(!1,!0,Ne,!1,Ge,mt,0,Ve,[],r,0,0,0,0,-1,"none",!1,!1,null));v=v.concat(ti.html),v.push("<br/>")}return v.join("")}function ks(ue,r,l,v){let V=[],G=l.getInitialState();for(let ae=0,me=ue.length;ae<me;ae++){const Ne=ue[ae],Ve=l.tokenizeEncoded(Ne,!0,G);di.f.convertToEndOffset(Ve.tokens,Ne.length);const Ge=new di.f(Ve.tokens,Ne,v),mt=ai.qL.isBasicASCII(Ne,!0),ti=ai.qL.containsRTL(Ne,mt,!0),Si=(0,Jt.Md)(new Jt.zL(!1,!0,Ne,!1,mt,ti,0,Ge.inflate(),[],r,0,0,0,0,-1,"none",!1,!1,null));V=V.concat(Si.html),V.push("<br/>"),G=Ve.endState}return V.join("")}var wn=f(59407),yn=f(70651),uo=f(648),Ms=f(22595),Ts=f(90304),Et=f(59095),ls=f(13072),Ss=f(85525),ts=f(89044),zs=function(ue,r,l,v){var V=arguments.length,G=V<3?r:v===null?v=Object.getOwnPropertyDescriptor(r,l):v,ae;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")G=Reflect.decorate(ue,r,l,v);else for(var me=ue.length-1;me>=0;me--)(ae=ue[me])&&(G=(V<3?ae(G):V>3?ae(r,l,G):ae(r,l))||G);return V>3&&G&&Object.defineProperty(r,l,G),G},vs=function(ue,r){return function(l,v){r(l,v,ue)}},As=function(ue,r,l,v){function V(G){return G instanceof l?G:new l(function(ae){ae(G)})}return new(l||(l=Promise))(function(G,ae){function me(Ge){try{Ve(v.next(Ge))}catch(mt){ae(mt)}}function Ne(Ge){try{Ve(v.throw(Ge))}catch(mt){ae(mt)}}function Ve(Ge){Ge.done?G(Ge.value):V(Ge.value).then(me,Ne)}Ve((v=v.apply(ue,r||[])).next())})};let $s=class extends ce.jG{constructor(r){super(),this._themeService=r,this._onCodeEditorAdd=this._register(new te.vl),this.onCodeEditorAdd=this._onCodeEditorAdd.event,this._onCodeEditorRemove=this._register(new te.vl),this.onCodeEditorRemove=this._onCodeEditorRemove.event,this._onDiffEditorAdd=this._register(new te.vl),this.onDiffEditorAdd=this._onDiffEditorAdd.event,this._onDiffEditorRemove=this._register(new te.vl),this.onDiffEditorRemove=this._onDiffEditorRemove.event,this._decorationOptionProviders=new Map,this._codeEditorOpenHandlers=new Ss.w,this._modelProperties=new Map,this._codeEditors=Object.create(null),this._diffEditors=Object.create(null),this._globalStyleSheet=null}addCodeEditor(r){this._codeEditors[r.getId()]=r,this._onCodeEditorAdd.fire(r)}removeCodeEditor(r){delete this._codeEditors[r.getId()]&&this._onCodeEditorRemove.fire(r)}listCodeEditors(){return Object.keys(this._codeEditors).map(r=>this._codeEditors[r])}addDiffEditor(r){this._diffEditors[r.getId()]=r,this._onDiffEditorAdd.fire(r)}removeDiffEditor(r){delete this._diffEditors[r.getId()]&&this._onDiffEditorRemove.fire(r)}listDiffEditors(){return Object.keys(this._diffEditors).map(r=>this._diffEditors[r])}getFocusedCodeEditor(){let r=null;const l=this.listCodeEditors();for(const v of l){if(v.hasTextFocus())return v;v.hasWidgetFocus()&&(r=v)}return r}removeDecorationType(r){const l=this._decorationOptionProviders.get(r);l&&(l.refCount--,l.refCount<=0&&(this._decorationOptionProviders.delete(r),l.dispose(),this.listCodeEditors().forEach(v=>v.removeDecorationsByType(r))))}setModelProperty(r,l,v){const V=r.toString();let G;this._modelProperties.has(V)?G=this._modelProperties.get(V):(G=new Map,this._modelProperties.set(V,G)),G.set(l,v)}getModelProperty(r,l){const v=r.toString();if(this._modelProperties.has(v))return this._modelProperties.get(v).get(l)}openCodeEditor(r,l,v){return As(this,void 0,void 0,function*(){for(const V of this._codeEditorOpenHandlers){const G=yield V(r,l,v);if(G!==null)return G}return null})}registerCodeEditorOpenHandler(r){const l=this._codeEditorOpenHandlers.unshift(r);return(0,ce.s)(l)}};$s=zs([vs(0,ts.Gy)],$s);class Gs{constructor(r){this._styleSheet=r}}var rs=f(96655),Bn=f(66726),mn=function(ue,r,l,v){var V=arguments.length,G=V<3?r:v===null?v=Object.getOwnPropertyDescriptor(r,l):v,ae;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")G=Reflect.decorate(ue,r,l,v);else for(var me=ue.length-1;me>=0;me--)(ae=ue[me])&&(G=(V<3?ae(G):V>3?ae(r,l,G):ae(r,l))||G);return V>3&&G&&Object.defineProperty(r,l,G),G},Kt=function(ue,r){return function(l,v){r(l,v,ue)}},Ri=function(ue,r,l,v){function V(G){return G instanceof l?G:new l(function(ae){ae(G)})}return new(l||(l=Promise))(function(G,ae){function me(Ge){try{Ve(v.next(Ge))}catch(mt){ae(mt)}}function Ne(Ge){try{Ve(v.throw(Ge))}catch(mt){ae(mt)}}function Ve(Ge){Ge.done?G(Ge.value):V(Ge.value).then(me,Ne)}Ve((v=v.apply(ue,r||[])).next())})};let nn=class extends $s{constructor(r,l){super(l),this.onCodeEditorAdd(()=>this._checkContextKey()),this.onCodeEditorRemove(()=>this._checkContextKey()),this._editorIsOpen=r.createKey("editorIsOpen",!1),this._activeCodeEditor=null,this.registerCodeEditorOpenHandler((v,V,G)=>Ri(this,void 0,void 0,function*(){return V?this.doOpenEditor(V,v):null}))}_checkContextKey(){let r=!1;for(const l of this.listCodeEditors())if(!l.isSimpleWidget){r=!0;break}this._editorIsOpen.set(r)}setActiveCodeEditor(r){this._activeCodeEditor=r}getActiveCodeEditor(){return this._activeCodeEditor}doOpenEditor(r,l){if(!this.findModel(r,l.resource)){if(l.resource){const G=l.resource.scheme;if(G===ls.ny.http||G===ls.ny.https)return(0,Et.jh)(l.resource.toString()),r}return null}const V=l.options?l.options.selection:null;if(V)if(typeof V.endLineNumber=="number"&&typeof V.endColumn=="number")r.setSelection(V),r.revealRangeInCenter(V,1);else{const G={lineNumber:V.startLineNumber,column:V.startColumn};r.setPosition(G),r.revealPositionInCenter(G,1)}return r}findModel(r,l){const v=r.getModel();return v&&v.uri.toString()!==l.toString()?null:v}};nn=mn([Kt(0,rs.fN),Kt(1,ts.Gy)],nn),(0,Bn.v)(D.T,nn);var Mn=f(82399);const fs=(0,Mn.u1)("layoutService");var is=function(ue,r,l,v){var V=arguments.length,G=V<3?r:v===null?v=Object.getOwnPropertyDescriptor(r,l):v,ae;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")G=Reflect.decorate(ue,r,l,v);else for(var me=ue.length-1;me>=0;me--)(ae=ue[me])&&(G=(V<3?ae(G):V>3?ae(r,l,G):ae(r,l))||G);return V>3&&G&&Object.defineProperty(r,l,G),G},qe=function(ue,r){return function(l,v){r(l,v,ue)}};let b=class{constructor(r){this._codeEditorService=r,this.onDidLayout=te.Jh.None,this.offset={top:0,quickPickTop:0}}get dimension(){return this._dimension||(this._dimension=Et.tG(window.document.body)),this._dimension}get hasContainer(){return!1}get container(){throw new Error("ILayoutService.container is not available in the standalone editor!")}focus(){var r;(r=this._codeEditorService.getFocusedCodeEditor())===null||r===void 0||r.focus()}};b=is([qe(0,D.T)],b);let P=class extends b{constructor(r,l){super(l),this._container=r}get hasContainer(){return!1}get container(){return this._container}};P=is([qe(1,D.T)],P),(0,Bn.v)(fs,b);var M=f(66459),q=f(3765),p=f(94535),F=f(29879),de=f(38803),be=function(ue,r,l,v){var V=arguments.length,G=V<3?r:v===null?v=Object.getOwnPropertyDescriptor(r,l):v,ae;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")G=Reflect.decorate(ue,r,l,v);else for(var me=ue.length-1;me>=0;me--)(ae=ue[me])&&(G=(V<3?ae(G):V>3?ae(r,l,G):ae(r,l))||G);return V>3&&G&&Object.defineProperty(r,l,G),G},ye=function(ue,r){return function(l,v){r(l,v,ue)}},Me=function(ue,r,l,v){function V(G){return G instanceof l?G:new l(function(ae){ae(G)})}return new(l||(l=Promise))(function(G,ae){function me(Ge){try{Ve(v.next(Ge))}catch(mt){ae(mt)}}function Ne(Ge){try{Ve(v.throw(Ge))}catch(mt){ae(mt)}}function Ve(Ge){Ge.done?G(Ge.value):V(Ge.value).then(me,Ne)}Ve((v=v.apply(ue,r||[])).next())})};const He=!1;function $e(ue){return ue.scheme===ls.ny.file?ue.fsPath:ue.path}let gt=0;class wt{constructor(r,l,v,V,G,ae,me){this.id=++gt,this.type=0,this.actual=r,this.label=r.label,this.confirmBeforeUndo=r.confirmBeforeUndo||!1,this.resourceLabel=l,this.strResource=v,this.resourceLabels=[this.resourceLabel],this.strResources=[this.strResource],this.groupId=V,this.groupOrder=G,this.sourceId=ae,this.sourceOrder=me,this.isValid=!0}setValid(r){this.isValid=r}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.isValid?" VALID":"INVALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class It{constructor(r,l){this.resourceLabel=r,this.reason=l}}class Pt{constructor(){this.elements=new Map}createMessage(){const r=[],l=[];for(const[,V]of this.elements)(V.reason===0?r:l).push(V.resourceLabel);const v=[];return r.length>0&&v.push(q.kg({key:"externalRemoval",comment:["{0} is a list of filenames"]},"The following files have been closed and modified on disk: {0}.",r.join(", "))),l.length>0&&v.push(q.kg({key:"noParallelUniverses",comment:["{0} is a list of filenames"]},"The following files have been modified in an incompatible way: {0}.",l.join(", "))),v.join(` `)}get size(){return this.elements.size}has(r){return this.elements.has(r)}set(r,l){this.elements.set(r,l)}delete(r){return this.elements.delete(r)}}class Wt{constructor(r,l,v,V,G,ae,me){this.id=++gt,this.type=1,this.actual=r,this.label=r.label,this.confirmBeforeUndo=r.confirmBeforeUndo||!1,this.resourceLabels=l,this.strResources=v,this.groupId=V,this.groupOrder=G,this.sourceId=ae,this.sourceOrder=me,this.removedResources=null,this.invalidatedResources=null}canSplit(){return typeof this.actual.split=="function"}removeResource(r,l,v){this.removedResources||(this.removedResources=new Pt),this.removedResources.has(l)||this.removedResources.set(l,new It(r,v))}setValid(r,l,v){v?this.invalidatedResources&&(this.invalidatedResources.delete(l),this.invalidatedResources.size===0&&(this.invalidatedResources=null)):(this.invalidatedResources||(this.invalidatedResources=new Pt),this.invalidatedResources.has(l)||this.invalidatedResources.set(l,new It(r,0)))}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.invalidatedResources?"INVALID":" VALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class Xt{constructor(r,l){this.resourceLabel=r,this.strResource=l,this._past=[],this._future=[],this.locked=!1,this.versionId=1}dispose(){for(const r of this._past)r.type===1&&r.removeResource(this.resourceLabel,this.strResource,0);for(const r of this._future)r.type===1&&r.removeResource(this.resourceLabel,this.strResource,0);this.versionId++}toString(){const r=[];r.push(`* ${this.strResource}:`);for(let l=0;l<this._past.length;l++)r.push(` * [UNDO] ${this._past[l]}`);for(let l=this._future.length-1;l>=0;l--)r.push(` * [REDO] ${this._future[l]}`);return r.join(` `)}flushAllElements(){this._past=[],this._future=[],this.versionId++}_setElementValidFlag(r,l){r.type===1?r.setValid(this.resourceLabel,this.strResource,l):r.setValid(l)}setElementsValidFlag(r,l){for(const v of this._past)l(v.actual)&&this._setElementValidFlag(v,r);for(const v of this._future)l(v.actual)&&this._setElementValidFlag(v,r)}pushElement(r){for(const l of this._future)l.type===1&&l.removeResource(this.resourceLabel,this.strResource,1);this._future=[],this._past.push(r),this.versionId++}createSnapshot(r){const l=[];for(let v=0,V=this._past.length;v<V;v++)l.push(this._past[v].id);for(let v=this._future.length-1;v>=0;v--)l.push(this._future[v].id);return new de.To(r,l)}restoreSnapshot(r){const l=r.elements.length;let v=!0,V=0,G=-1;for(let me=0,Ne=this._past.length;me<Ne;me++,V++){const Ve=this._past[me];v&&(V>=l||Ve.id!==r.elements[V])&&(v=!1,G=0),!v&&Ve.type===1&&Ve.removeResource(this.resourceLabel,this.strResource,0)}let ae=-1;for(let me=this._future.length-1;me>=0;me--,V++){const Ne=this._future[me];v&&(V>=l||Ne.id!==r.elements[V])&&(v=!1,ae=me),!v&&Ne.type===1&&Ne.removeResource(this.resourceLabel,this.strResource,0)}G!==-1&&(this._past=this._past.slice(0,G)),ae!==-1&&(this._future=this._future.slice(ae+1)),this.versionId++}getElements(){const r=[],l=[];for(const v of this._past)r.push(v.actual);for(const v of this._future)l.push(v.actual);return{past:r,future:l}}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(r,l){for(let v=this._past.length-1;v>=0;v--)if(this._past[v]===r){l.has(this.strResource)?this._past[v]=l.get(this.strResource):this._past.splice(v,1);break}this.versionId++}splitFutureWorkspaceElement(r,l){for(let v=this._future.length-1;v>=0;v--)if(this._future[v]===r){l.has(this.strResource)?this._future[v]=l.get(this.strResource):this._future.splice(v,1);break}this.versionId++}moveBackward(r){this._past.pop(),this._future.push(r),this.versionId++}moveForward(r){this._future.pop(),this._past.push(r),this.versionId++}}class mi{constructor(r){this.editStacks=r,this._versionIds=[];for(let l=0,v=this.editStacks.length;l<v;l++)this._versionIds[l]=this.editStacks[l].versionId}isValid(){for(let r=0,l=this.editStacks.length;r<l;r++)if(this._versionIds[r]!==this.editStacks[r].versionId)return!1;return!0}}const Ii=new Xt("","");Ii.locked=!0;let Ji=class{constructor(r,l){this._dialogService=r,this._notificationService=l,this._editStacks=new Map,this._uriComparisonKeyComputers=[]}getUriComparisonKey(r){for(const l of this._uriComparisonKeyComputers)if(l[0]===r.scheme)return l[1].getComparisonKey(r);return r.toString()}_print(r){console.log("------------------------------------"),console.log(`AFTER ${r}: `);const l=[];for(const v of this._editStacks)l.push(v[1].toString());console.log(l.join(` `))}pushElement(r,l=de.I_.None,v=de.Ym.None){if(r.type===0){const V=$e(r.resource),G=this.getUriComparisonKey(r.resource);this._pushElement(new wt(r,V,G,l.id,l.nextOrder(),v.id,v.nextOrder()))}else{const V=new Set,G=[],ae=[];for(const me of r.resources){const Ne=$e(me),Ve=this.getUriComparisonKey(me);V.has(Ve)||(V.add(Ve),G.push(Ne),ae.push(Ve))}G.length===1?this._pushElement(new wt(r,G[0],ae[0],l.id,l.nextOrder(),v.id,v.nextOrder())):this._pushElement(new Wt(r,G,ae,l.id,l.nextOrder(),v.id,v.nextOrder()))}He&&this._print("pushElement")}_pushElement(r){for(let l=0,v=r.strResources.length;l<v;l++){const V=r.resourceLabels[l],G=r.strResources[l];let ae;this._editStacks.has(G)?ae=this._editStacks.get(G):(ae=new Xt(V,G),this._editStacks.set(G,ae)),ae.pushElement(r)}}getLastElement(r){const l=this.getUriComparisonKey(r);if(this._editStacks.has(l)){const v=this._editStacks.get(l);if(v.hasFutureElements())return null;const V=v.getClosestPastElement();return V?V.actual:null}return null}_splitPastWorkspaceElement(r,l){const v=r.actual.split(),V=new Map;for(const G of v){const ae=$e(G.resource),me=this.getUriComparisonKey(G.resource),Ne=new wt(G,ae,me,0,0,0,0);V.set(Ne.strResource,Ne)}for(const G of r.strResources){if(l&&l.has(G))continue;this._editStacks.get(G).splitPastWorkspaceElement(r,V)}}_splitFutureWorkspaceElement(r,l){const v=r.actual.split(),V=new Map;for(const G of v){const ae=$e(G.resource),me=this.getUriComparisonKey(G.resource),Ne=new wt(G,ae,me,0,0,0,0);V.set(Ne.strResource,Ne)}for(const G of r.strResources){if(l&&l.has(G))continue;this._editStacks.get(G).splitFutureWorkspaceElement(r,V)}}removeElements(r){const l=typeof r=="string"?r:this.getUriComparisonKey(r);this._editStacks.has(l)&&(this._editStacks.get(l).dispose(),this._editStacks.delete(l)),He&&this._print("removeElements")}setElementsValidFlag(r,l,v){const V=this.getUriComparisonKey(r);this._editStacks.has(V)&&this._editStacks.get(V).setElementsValidFlag(l,v),He&&this._print("setElementsValidFlag")}createSnapshot(r){const l=this.getUriComparisonKey(r);return this._editStacks.has(l)?this._editStacks.get(l).createSnapshot(r):new de.To(r,[])}restoreSnapshot(r){const l=this.getUriComparisonKey(r.resource);if(this._editStacks.has(l)){const v=this._editStacks.get(l);v.restoreSnapshot(r),!v.hasPastElements()&&!v.hasFutureElements()&&(v.dispose(),this._editStacks.delete(l))}He&&this._print("restoreSnapshot")}getElements(r){const l=this.getUriComparisonKey(r);return this._editStacks.has(l)?this._editStacks.get(l).getElements():{past:[],future:[]}}_findClosestUndoElementWithSource(r){if(!r)return[null,null];let l=null,v=null;for(const[V,G]of this._editStacks){const ae=G.getClosestPastElement();ae&&ae.sourceId===r&&(!l||ae.sourceOrder>l.sourceOrder)&&(l=ae,v=V)}return[l,v]}canUndo(r){if(r instanceof de.Ym){const[,v]=this._findClosestUndoElementWithSource(r.id);return!!v}const l=this.getUriComparisonKey(r);return this._editStacks.has(l)?this._editStacks.get(l).hasPastElements():!1}_onError(r,l){(0,pe.dz)(r);for(const v of l.strResources)this.removeElements(v);this._notificationService.error(r)}_acquireLocks(r){for(const l of r.editStacks)if(l.locked)throw new Error("Cannot acquire edit stack lock");for(const l of r.editStacks)l.locked=!0;return()=>{for(const l of r.editStacks)l.locked=!1}}_safeInvokeWithLocks(r,l,v,V,G){const ae=this._acquireLocks(v);let me;try{me=l()}catch(Ne){return ae(),V.dispose(),this._onError(Ne,r)}return me?me.then(()=>(ae(),V.dispose(),G()),Ne=>(ae(),V.dispose(),this._onError(Ne,r))):(ae(),V.dispose(),G())}_invokeWorkspacePrepare(r){return Me(this,void 0,void 0,function*(){if(typeof r.actual.prepareUndoRedo>"u")return ce.jG.None;const l=r.actual.prepareUndoRedo();return typeof l>"u"?ce.jG.None:l})}_invokeResourcePrepare(r,l){if(r.actual.type!==1||typeof r.actual.prepareUndoRedo>"u")return l(ce.jG.None);const v=r.actual.prepareUndoRedo();return v?(0,ce.Xm)(v)?l(v):v.then(V=>l(V)):l(ce.jG.None)}_getAffectedEditStacks(r){const l=[];for(const v of r.strResources)l.push(this._editStacks.get(v)||Ii);return new mi(l)}_tryToSplitAndUndo(r,l,v,V){if(l.canSplit())return this._splitPastWorkspaceElement(l,v),this._notificationService.warn(V),new In(this._undo(r,0,!0));for(const G of l.strResources)this.removeElements(G);return this._notificationService.warn(V),new In}_checkWorkspaceUndo(r,l,v,V){if(l.removedResources)return this._tryToSplitAndUndo(r,l,l.removedResources,q.kg({key:"cannotWorkspaceUndo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not undo '{0}' across all files. {1}",l.label,l.removedResources.createMessage()));if(V&&l.invalidatedResources)return this._tryToSplitAndUndo(r,l,l.invalidatedResources,q.kg({key:"cannotWorkspaceUndo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not undo '{0}' across all files. {1}",l.label,l.invalidatedResources.createMessage()));const G=[];for(const me of v.editStacks)me.getClosestPastElement()!==l&&G.push(me.resourceLabel);if(G.length>0)return this._tryToSplitAndUndo(r,l,null,q.kg({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}",l.label,G.join(", ")));const ae=[];for(const me of v.editStacks)me.locked&&ae.push(me.resourceLabel);return ae.length>0?this._tryToSplitAndUndo(r,l,null,q.kg({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}",l.label,ae.join(", "))):v.isValid()?null:this._tryToSplitAndUndo(r,l,null,q.kg({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",l.label))}_workspaceUndo(r,l,v){const V=this._getAffectedEditStacks(l),G=this._checkWorkspaceUndo(r,l,V,!1);return G?G.returnValue:this._confirmAndExecuteWorkspaceUndo(r,l,V,v)}_isPartOfUndoGroup(r){if(!r.groupId)return!1;for(const[,l]of this._editStacks){const v=l.getClosestPastElement();if(v){if(v===r){const V=l.getSecondClosestPastElement();if(V&&V.groupId===r.groupId)return!0}if(v.groupId===r.groupId)return!0}}return!1}_confirmAndExecuteWorkspaceUndo(r,l,v,V){return Me(this,void 0,void 0,function*(){if(l.canSplit()&&!this._isPartOfUndoGroup(l)){const me=yield this._dialogService.show(M.A.Info,q.kg("confirmWorkspace","Would you like to undo '{0}' across all files?",l.label),[q.kg({key:"ok",comment:["{0} denotes a number that is > 1"]},"Undo in {0} Files",v.editStacks.length),q.kg("nok","Undo this File"),q.kg("cancel","Cancel")],{cancelId:2});if(me.choice===2)return;if(me.choice===1)return this._splitPastWorkspaceElement(l,null),this._undo(r,0,!0);const Ne=this._checkWorkspaceUndo(r,l,v,!1);if(Ne)return Ne.returnValue;V=!0}let G;try{G=yield this._invokeWorkspacePrepare(l)}catch(me){return this._onError(me,l)}const ae=this._checkWorkspaceUndo(r,l,v,!0);if(ae)return G.dispose(),ae.returnValue;for(const me of v.editStacks)me.moveBackward(l);return this._safeInvokeWithLocks(l,()=>l.actual.undo(),v,G,()=>this._continueUndoInGroup(l.groupId,V))})}_resourceUndo(r,l,v){if(!l.isValid){r.flushAllElements();return}if(r.locked){const V=q.kg({key:"cannotResourceUndoDueToInProgressUndoRedo",comment:["{0} is a label for an operation."]},"Could not undo '{0}' because there is already an undo or redo operation running.",l.label);this._notificationService.warn(V);return}return this._invokeResourcePrepare(l,V=>(r.moveBackward(l),this._safeInvokeWithLocks(l,()=>l.actual.undo(),new mi([r]),V,()=>this._continueUndoInGroup(l.groupId,v))))}_findClosestUndoElementInGroup(r){if(!r)return[null,null];let l=null,v=null;for(const[V,G]of this._editStacks){const ae=G.getClosestPastElement();ae&&ae.groupId===r&&(!l||ae.groupOrder>l.groupOrder)&&(l=ae,v=V)}return[l,v]}_continueUndoInGroup(r,l){if(!r)return;const[,v]=this._findClosestUndoElementInGroup(r);if(v)return this._undo(v,0,l)}undo(r){if(r instanceof de.Ym){const[,l]=this._findClosestUndoElementWithSource(r.id);return l?this._undo(l,r.id,!1):void 0}return typeof r=="string"?this._undo(r,0,!1):this._undo(this.getUriComparisonKey(r),0,!1)}_undo(r,l=0,v){if(!this._editStacks.has(r))return;const V=this._editStacks.get(r),G=V.getClosestPastElement();if(!G)return;if(G.groupId){const[me,Ne]=this._findClosestUndoElementInGroup(G.groupId);if(G!==me&&Ne)return this._undo(Ne,l,v)}if((G.sourceId!==l||G.confirmBeforeUndo)&&!v)return this._confirmAndContinueUndo(r,l,G);try{return G.type===1?this._workspaceUndo(r,G,v):this._resourceUndo(V,G,v)}finally{He&&this._print("undo")}}_confirmAndContinueUndo(r,l,v){return Me(this,void 0,void 0,function*(){if((yield this._dialogService.show(M.A.Info,q.kg("confirmDifferentSource","Would you like to undo '{0}'?",v.label),[q.kg("confirmDifferentSource.yes","Yes"),q.kg("confirmDifferentSource.no","No")],{cancelId:1})).choice!==1)return this._undo(r,l,!0)})}_findClosestRedoElementWithSource(r){if(!r)return[null,null];let l=null,v=null;for(const[V,G]of this._editStacks){const ae=G.getClosestFutureElement();ae&&ae.sourceId===r&&(!l||ae.sourceOrder<l.sourceOrder)&&(l=ae,v=V)}return[l,v]}canRedo(r){if(r instanceof de.Ym){const[,v]=this._findClosestRedoElementWithSource(r.id);return!!v}const l=this.getUriComparisonKey(r);return this._editStacks.has(l)?this._editStacks.get(l).hasFutureElements():!1}_tryToSplitAndRedo(r,l,v,V){if(l.canSplit())return this._splitFutureWorkspaceElement(l,v),this._notificationService.warn(V),new In(this._redo(r));for(const G of l.strResources)this.removeElements(G);return this._notificationService.warn(V),new In}_checkWorkspaceRedo(r,l,v,V){if(l.removedResources)return this._tryToSplitAndRedo(r,l,l.removedResources,q.kg({key:"cannotWorkspaceRedo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not redo '{0}' across all files. {1}",l.label,l.removedResources.createMessage()));if(V&&l.invalidatedResources)return this._tryToSplitAndRedo(r,l,l.invalidatedResources,q.kg({key:"cannotWorkspaceRedo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not redo '{0}' across all files. {1}",l.label,l.invalidatedResources.createMessage()));const G=[];for(const me of v.editStacks)me.getClosestFutureElement()!==l&&G.push(me.resourceLabel);if(G.length>0)return this._tryToSplitAndRedo(r,l,null,q.kg({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}",l.label,G.join(", ")));const ae=[];for(const me of v.editStacks)me.locked&&ae.push(me.resourceLabel);return ae.length>0?this._tryToSplitAndRedo(r,l,null,q.kg({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}",l.label,ae.join(", "))):v.isValid()?null:this._tryToSplitAndRedo(r,l,null,q.kg({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",l.label))}_workspaceRedo(r,l){const v=this._getAffectedEditStacks(l),V=this._checkWorkspaceRedo(r,l,v,!1);return V?V.returnValue:this._executeWorkspaceRedo(r,l,v)}_executeWorkspaceRedo(r,l,v){return Me(this,void 0,void 0,function*(){let V;try{V=yield this._invokeWorkspacePrepare(l)}catch(ae){return this._onError(ae,l)}const G=this._checkWorkspaceRedo(r,l,v,!0);if(G)return V.dispose(),G.returnValue;for(const ae of v.editStacks)ae.moveForward(l);return this._safeInvokeWithLocks(l,()=>l.actual.redo(),v,V,()=>this._continueRedoInGroup(l.groupId))})}_resourceRedo(r,l){if(!l.isValid){r.flushAllElements();return}if(r.locked){const v=q.kg({key:"cannotResourceRedoDueToInProgressUndoRedo",comment:["{0} is a label for an operation."]},"Could not redo '{0}' because there is already an undo or redo operation running.",l.label);this._notificationService.warn(v);return}return this._invokeResourcePrepare(l,v=>(r.moveForward(l),this._safeInvokeWithLocks(l,()=>l.actual.redo(),new mi([r]),v,()=>this._continueRedoInGroup(l.groupId))))}_findClosestRedoElementInGroup(r){if(!r)return[null,null];let l=null,v=null;for(const[V,G]of this._editStacks){const ae=G.getClosestFutureElement();ae&&ae.groupId===r&&(!l||ae.groupOrder<l.groupOrder)&&(l=ae,v=V)}return[l,v]}_continueRedoInGroup(r){if(!r)return;const[,l]=this._findClosestRedoElementInGroup(r);if(l)return this._redo(l)}redo(r){if(r instanceof de.Ym){const[,l]=this._findClosestRedoElementWithSource(r.id);return l?this._redo(l):void 0}return typeof r=="string"?this._redo(r):this._redo(this.getUriComparisonKey(r))}_redo(r){if(!this._editStacks.has(r))return;const l=this._editStacks.get(r),v=l.getClosestFutureElement();if(v){if(v.groupId){const[V,G]=this._findClosestRedoElementInGroup(v.groupId);if(v!==V&&G)return this._redo(G)}try{return v.type===1?this._workspaceRedo(r,v):this._resourceRedo(l,v)}finally{He&&this._print("redo")}}}};Ji=be([ye(0,p.X),ye(1,F.Ot)],Ji);class In{constructor(r){this.returnValue=r}}(0,Bn.v)(de.$D,Ji);var Mi=f(12060),Vi=f(87594),Os=f(39619),bo=f(98769),ns=f(85003),oo=f(23877),go=f(37042),Ps=f(59715),Us=f(27992),Js=f(71386);class Vs{constructor(r={},l=[],v=[]){this._contents=r,this._keys=l,this._overrides=v,this.frozen=!1,this.overrideConfigurations=new Map}get contents(){return this.checkAndFreeze(this._contents)}get overrides(){return this.checkAndFreeze(this._overrides)}get keys(){return this.checkAndFreeze(this._keys)}isEmpty(){return this._keys.length===0&&Object.keys(this._contents).length===0&&this._overrides.length===0}getValue(r){return r?(0,_i.gD)(this.contents,r):this.contents}getOverrideValue(r,l){const v=this.getContentsForOverrideIdentifer(l);return v?r?(0,_i.gD)(v,r):v:void 0}override(r){let l=this.overrideConfigurations.get(r);return l||(l=this.createOverrideConfigurationModel(r),this.overrideConfigurations.set(r,l)),l}merge(...r){const l=Js.Go(this.contents),v=Js.Go(this.overrides),V=[...this.keys];for(const G of r)if(!G.isEmpty()){this.mergeContents(l,G.contents);for(const ae of G.overrides){const[me]=v.filter(Ne=>Ct.aI(Ne.identifiers,ae.identifiers));me?(this.mergeContents(me.contents,ae.contents),me.keys.push(...ae.keys),me.keys=Ct.dM(me.keys)):v.push(Js.Go(ae))}for(const ae of G.keys)V.indexOf(ae)===-1&&V.push(ae)}return new Vs(l,V,v)}freeze(){return this.frozen=!0,this}createOverrideConfigurationModel(r){const l=this.getContentsForOverrideIdentifer(r);if(!l||typeof l!="object"||!Object.keys(l).length)return this;const v={};for(const V of Ct.dM([...Object.keys(this.contents),...Object.keys(l)])){let G=this.contents[V];const ae=l[V];ae&&(typeof G=="object"&&typeof ae=="object"?(G=Js.Go(G),this.mergeContents(G,ae)):G=ae),v[V]=G}return new Vs(v,this.keys,this.overrides)}mergeContents(r,l){for(const v of Object.keys(l)){if(v in r&&fe.Gv(r[v])&&fe.Gv(l[v])){this.mergeContents(r[v],l[v]);continue}r[v]=Js.Go(l[v])}}checkAndFreeze(r){return this.frozen&&!Object.isFrozen(r)?Js.ol(r):r}getContentsForOverrideIdentifer(r){let l=null,v=null;const V=G=>{G&&(v?this.mergeContents(v,G):v=Js.Go(G))};for(const G of this.overrides)Ct.aI(G.identifiers,[r])?l=G.contents:G.identifiers.includes(r)&&V(G.contents);return V(l),v}toJSON(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}}setValue(r,l){this.addKey(r),(0,_i.kW)(this.contents,r,l,v=>{throw new Error(v)})}removeValue(r){this.removeKey(r)&&(0,_i.iB)(this.contents,r)}addKey(r){let l=this.keys.length;for(let v=0;v<l;v++)r.indexOf(this.keys[v])===0&&(l=v);this.keys.splice(l,1,r)}removeKey(r){const l=this.keys.indexOf(r);return l!==-1?(this.keys.splice(l,1),!0):!1}}class Hr{constructor(r,l,v,V,G=new Vs,ae=new Vs,me=new Us.fT,Ne=new Vs,Ve=new Us.fT,Ge=!0){this._defaultConfiguration=r,this._policyConfiguration=l,this._applicationConfiguration=v,this._localUserConfiguration=V,this._remoteUserConfiguration=G,this._workspaceConfiguration=ae,this._folderConfigurations=me,this._memoryConfiguration=Ne,this._memoryConfigurationByResource=Ve,this._freeze=Ge,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations=new Us.fT,this._userConfiguration=null}getValue(r,l,v){return this.getConsolidatedConfigurationModel(r,l,v).getValue(r)}updateValue(r,l,v={}){let V;v.resource?(V=this._memoryConfigurationByResource.get(v.resource),V||(V=new Vs,this._memoryConfigurationByResource.set(v.resource,V))):V=this._memoryConfiguration,l===void 0?V.removeValue(r):V.setValue(r,l),v.resource||(this._workspaceConsolidatedConfiguration=null)}inspect(r,l,v){const V=this.getConsolidatedConfigurationModel(r,l,v),G=this.getFolderConfigurationModelForResource(l.resource,v),ae=l.resource?this._memoryConfigurationByResource.get(l.resource)||this._memoryConfiguration:this._memoryConfiguration,me=l.overrideIdentifier?this._defaultConfiguration.freeze().override(l.overrideIdentifier).getValue(r):this._defaultConfiguration.freeze().getValue(r),Ne=this._policyConfiguration.isEmpty()?void 0:this._policyConfiguration.freeze().getValue(r),Ve=this.applicationConfiguration.isEmpty()?void 0:this.applicationConfiguration.freeze().getValue(r),Ge=l.overrideIdentifier?this.userConfiguration.freeze().override(l.overrideIdentifier).getValue(r):this.userConfiguration.freeze().getValue(r),mt=l.overrideIdentifier?this.localUserConfiguration.freeze().override(l.overrideIdentifier).getValue(r):this.localUserConfiguration.freeze().getValue(r),ti=l.overrideIdentifier?this.remoteUserConfiguration.freeze().override(l.overrideIdentifier).getValue(r):this.remoteUserConfiguration.freeze().getValue(r),Si=v?l.overrideIdentifier?this._workspaceConfiguration.freeze().override(l.overrideIdentifier).getValue(r):this._workspaceConfiguration.freeze().getValue(r):void 0,tn=G?l.overrideIdentifier?G.freeze().override(l.overrideIdentifier).getValue(r):G.freeze().getValue(r):void 0,kn=l.overrideIdentifier?ae.override(l.overrideIdentifier).getValue(r):ae.getValue(r),On=V.getValue(r),as=Ct.dM(V.overrides.map(qn=>qn.identifiers).flat()).filter(qn=>V.getOverrideValue(r,qn)!==void 0);return{defaultValue:me,policyValue:Ne,applicationValue:Ve,userValue:Ge,userLocalValue:mt,userRemoteValue:ti,workspaceValue:Si,workspaceFolderValue:tn,memoryValue:kn,value:On,default:me!==void 0?{value:this._defaultConfiguration.freeze().getValue(r),override:l.overrideIdentifier?this._defaultConfiguration.freeze().getOverrideValue(r,l.overrideIdentifier):void 0}:void 0,policy:Ne!==void 0?{value:Ne}:void 0,application:Ve!==void 0?{value:Ve,override:l.overrideIdentifier?this.applicationConfiguration.freeze().getOverrideValue(r,l.overrideIdentifier):void 0}:void 0,user:Ge!==void 0?{value:this.userConfiguration.freeze().getValue(r),override:l.overrideIdentifier?this.userConfiguration.freeze().getOverrideValue(r,l.overrideIdentifier):void 0}:void 0,userLocal:mt!==void 0?{value:this.localUserConfiguration.freeze().getValue(r),override:l.overrideIdentifier?this.localUserConfiguration.freeze().getOverrideValue(r,l.overrideIdentifier):void 0}:void 0,userRemote:ti!==void 0?{value:this.remoteUserConfiguration.freeze().getValue(r),override:l.overrideIdentifier?this.remoteUserConfiguration.freeze().getOverrideValue(r,l.overrideIdentifier):void 0}:void 0,workspace:Si!==void 0?{value:this._workspaceConfiguration.freeze().getValue(r),override:l.overrideIdentifier?this._workspaceConfiguration.freeze().getOverrideValue(r,l.overrideIdentifier):void 0}:void 0,workspaceFolder:tn!==void 0?{value:G?.freeze().getValue(r),override:l.overrideIdentifier?G?.freeze().getOverrideValue(r,l.overrideIdentifier):void 0}:void 0,memory:kn!==void 0?{value:ae.getValue(r),override:l.overrideIdentifier?ae.getOverrideValue(r,l.overrideIdentifier):void 0}:void 0,overrideIdentifiers:as.length?as:void 0}}get applicationConfiguration(){return this._applicationConfiguration}get userConfiguration(){return this._userConfiguration||(this._userConfiguration=this._remoteUserConfiguration.isEmpty()?this._localUserConfiguration:this._localUserConfiguration.merge(this._remoteUserConfiguration),this._freeze&&this._userConfiguration.freeze()),this._userConfiguration}get localUserConfiguration(){return this._localUserConfiguration}get remoteUserConfiguration(){return this._remoteUserConfiguration}getConsolidatedConfigurationModel(r,l,v){let V=this.getConsolidatedConfigurationModelForResource(l,v);return l.overrideIdentifier&&(V=V.override(l.overrideIdentifier)),!this._policyConfiguration.isEmpty()&&this._policyConfiguration.getValue(r)!==void 0&&(V=V.merge(this._policyConfiguration)),V}getConsolidatedConfigurationModelForResource({resource:r},l){let v=this.getWorkspaceConsolidatedConfiguration();if(l&&r){const V=l.getFolder(r);V&&(v=this.getFolderConsolidatedConfiguration(V.uri)||v);const G=this._memoryConfigurationByResource.get(r);G&&(v=v.merge(G))}return v}getWorkspaceConsolidatedConfiguration(){return this._workspaceConsolidatedConfiguration||(this._workspaceConsolidatedConfiguration=this._defaultConfiguration.merge(this.applicationConfiguration,this.userConfiguration,this._workspaceConfiguration,this._memoryConfiguration),this._freeze&&(this._workspaceConfiguration=this._workspaceConfiguration.freeze())),this._workspaceConsolidatedConfiguration}getFolderConsolidatedConfiguration(r){let l=this._foldersConsolidatedConfigurations.get(r);if(!l){const v=this.getWorkspaceConsolidatedConfiguration(),V=this._folderConfigurations.get(r);V?(l=v.merge(V),this._freeze&&(l=l.freeze()),this._foldersConsolidatedConfigurations.set(r,l)):l=v}return l}getFolderConfigurationModelForResource(r,l){if(l&&r){const v=l.getFolder(r);if(v)return this._folderConfigurations.get(v.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((r,l)=>{const{contents:v,overrides:V,keys:G}=this._folderConfigurations.get(l);return r.push([l,{contents:v,overrides:V,keys:G}]),r},[])}}static parse(r){const l=this.parseConfigurationModel(r.defaults),v=this.parseConfigurationModel(r.policy),V=this.parseConfigurationModel(r.application),G=this.parseConfigurationModel(r.user),ae=this.parseConfigurationModel(r.workspace),me=r.folders.reduce((Ne,Ve)=>(Ne.set(x.r.revive(Ve[0]),this.parseConfigurationModel(Ve[1])),Ne),new Us.fT);return new Hr(l,v,V,G,new Vs,ae,me,new Vs,new Us.fT,!1)}static parseConfigurationModel(r){return new Vs(r.contents,r.keys,r.overrides).freeze()}}class ad{constructor(r,l,v,V){this.change=r,this.previous=l,this.currentConfiguraiton=v,this.currentWorkspace=V,this._previousConfiguration=void 0;const G=new Set;r.keys.forEach(me=>G.add(me)),r.overrides.forEach(([,me])=>me.forEach(Ne=>G.add(Ne))),this.affectedKeys=[...G.values()];const ae=new Vs;this.affectedKeys.forEach(me=>ae.setValue(me,{})),this.affectedKeysTree=ae.contents}get previousConfiguration(){return!this._previousConfiguration&&this.previous&&(this._previousConfiguration=Hr.parse(this.previous.data)),this._previousConfiguration}affectsConfiguration(r,l){var v;if(this.doesAffectedKeysTreeContains(this.affectedKeysTree,r)){if(l){const V=this.previousConfiguration?this.previousConfiguration.getValue(r,l,(v=this.previous)===null||v===void 0?void 0:v.workspace):void 0,G=this.currentConfiguraiton.getValue(r,l,this.currentWorkspace);return!Js.aI(V,G)}return!0}return!1}doesAffectedKeysTreeContains(r,l){let v=(0,_i.ad)({[l]:!0},()=>{}),V;for(;typeof v=="object"&&(V=Object.keys(v)[0]);){if(r=r[V],!r)return!1;v=v[V]}return!0}}const zr=/^(cursor|delete)/;class la extends ce.jG{constructor(r,l,v,V,G){super(),this._contextKeyService=r,this._commandService=l,this._telemetryService=v,this._notificationService=V,this._logService=G,this._onDidUpdateKeybindings=this._register(new te.vl),this._currentChord=null,this._currentChordChecker=new ee.vb,this._currentChordStatusMessage=null,this._ignoreSingleModifiers=Yn.EMPTY,this._currentSingleModifier=null,this._currentSingleModifierClearTimeout=new ee.pc,this._logging=!1}get onDidUpdateKeybindings(){return this._onDidUpdateKeybindings?this._onDidUpdateKeybindings.event:te.Jh.None}dispose(){super.dispose()}_log(r){this._logging&&this._logService.info(`[KeybindingService]: ${r}`)}getKeybindings(){return this._getResolver().getKeybindings()}lookupKeybinding(r,l){const v=this._getResolver().lookupPrimaryKeybinding(r,l||this._contextKeyService);if(v)return v.resolvedKeybinding}dispatchEvent(r,l){return this._dispatch(r,l)}softDispatch(r,l){this._log("/ Soft dispatching keyboard event");const v=this.resolveKeyboardEvent(r);if(v.isChord())return console.warn("Unexpected keyboard event mapped to a chord"),null;const[V]=v.getDispatchParts();if(V===null)return this._log("\\ Keyboard event cannot be dispatched"),null;const G=this._contextKeyService.getContext(l),ae=this._currentChord?this._currentChord.keypress:null;return this._getResolver().resolve(G,ae,V)}_enterChordMode(r,l){this._currentChord={keypress:r,label:l},this._currentChordStatusMessage=this._notificationService.status(q.kg("first.chord","({0}) was pressed. Waiting for second key of chord...",l));const v=Date.now();this._currentChordChecker.cancelAndSet(()=>{if(!this._documentHasFocus()){this._leaveChordMode();return}Date.now()-v>5e3&&this._leaveChordMode()},500)}_leaveChordMode(){this._currentChordStatusMessage&&(this._currentChordStatusMessage.dispose(),this._currentChordStatusMessage=null),this._currentChordChecker.cancel(),this._currentChord=null}_dispatch(r,l){return this._doDispatch(this.resolveKeyboardEvent(r),l,!1)}_singleModifierDispatch(r,l){const v=this.resolveKeyboardEvent(r),[V]=v.getSingleModifierDispatchParts();if(V)return this._ignoreSingleModifiers.has(V)?(this._log(`+ Ignoring single modifier ${V} due to it being pressed together with other keys.`),this._ignoreSingleModifiers=Yn.EMPTY,this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1):(this._ignoreSingleModifiers=Yn.EMPTY,this._currentSingleModifier===null?(this._log(`+ Storing single modifier for possible chord ${V}.`),this._currentSingleModifier=V,this._currentSingleModifierClearTimeout.cancelAndSet(()=>{this._log("+ Clearing single modifier due to 300ms elapsed."),this._currentSingleModifier=null},300),!1):V===this._currentSingleModifier?(this._log(`/ Dispatching single modifier chord ${V} ${V}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,this._doDispatch(v,l,!0)):(this._log(`+ Clearing single modifier due to modifier mismatch: ${this._currentSingleModifier} ${V}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1));const[G]=v.getParts();return this._ignoreSingleModifiers=new Yn(G),this._currentSingleModifier!==null&&this._log("+ Clearing single modifier due to other key up."),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1}_doDispatch(r,l,v=!1){let V=!1;if(r.isChord())return console.warn("Unexpected keyboard event mapped to a chord"),!1;let G=null,ae=null;if(v){const[Ge]=r.getSingleModifierDispatchParts();G=Ge,ae=Ge}else[G]=r.getDispatchParts(),ae=this._currentChord?this._currentChord.keypress:null;if(G===null)return this._log("\\ Keyboard event cannot be dispatched in keydown phase."),V;const me=this._contextKeyService.getContext(l),Ne=r.getLabel(),Ve=this._getResolver().resolve(me,ae,G);return this._logService.trace("KeybindingService#dispatch",Ne,Ve?.commandId),Ve&&Ve.enterChord?(V=!0,this._enterChordMode(G,Ne),this._log("+ Entering chord mode..."),V):(this._currentChord&&(!Ve||!Ve.commandId)&&(this._log(`+ Leaving chord mode: Nothing bound to "${this._currentChord.label} ${Ne}".`),this._notificationService.status(q.kg("missing.chord","The key combination ({0}, {1}) is not a command.",this._currentChord.label,Ne),{hideAfter:10*1e3}),V=!0),this._leaveChordMode(),Ve&&Ve.commandId&&(Ve.bubble||(V=!0),this._log(`+ Invoking command ${Ve.commandId}.`),typeof Ve.commandArgs>"u"?this._commandService.executeCommand(Ve.commandId).then(void 0,Ge=>this._notificationService.warn(Ge)):this._commandService.executeCommand(Ve.commandId,Ve.commandArgs).then(void 0,Ge=>this._notificationService.warn(Ge)),zr.test(Ve.commandId)||this._telemetryService.publicLog2("workbenchActionExecuted",{id:Ve.commandId,from:"keybinding"})),V)}mightProducePrintableCharacter(r){return r.ctrlKey||r.metaKey?!1:r.keyCode>=31&&r.keyCode<=56||r.keyCode>=21&&r.keyCode<=30}}class Yn{constructor(r){this._ctrlKey=r?r.ctrlKey:!1,this._shiftKey=r?r.shiftKey:!1,this._altKey=r?r.altKey:!1,this._metaKey=r?r.metaKey:!1}has(r){switch(r){case"ctrl":return this._ctrlKey;case"shift":return this._shiftKey;case"alt":return this._altKey;case"meta":return this._metaKey}}}Yn.EMPTY=new Yn(null);var Cs=f(56071);class hn{constructor(r,l,v){this._log=v,this._defaultKeybindings=r,this._defaultBoundCommands=new Map;for(const V of r){const G=V.command;G&&G.charAt(0)!=="-"&&this._defaultBoundCommands.set(G,!0)}this._map=new Map,this._lookupMap=new Map,this._keybindings=hn.handleRemovals([].concat(r).concat(l));for(let V=0,G=this._keybindings.length;V<G;V++){const ae=this._keybindings[V];ae.keypressParts.length!==0&&(ae.when&&ae.when.type===0||this._addKeyPress(ae.keypressParts[0],ae))}}static _isTargetedForRemoval(r,l,v,V){return!(l&&r.keypressParts[0]!==l||v&&r.keypressParts[1]!==v||V&&(!r.when||!(0,rs.jQ)(V,r.when)))}static handleRemovals(r){const l=new Map;for(let V=0,G=r.length;V<G;V++){const ae=r[V];if(ae.command&&ae.command.charAt(0)==="-"){const me=ae.command.substring(1);l.has(me)?l.get(me).push(ae):l.set(me,[ae])}}if(l.size===0)return r;const v=[];for(let V=0,G=r.length;V<G;V++){const ae=r[V];if(!ae.command||ae.command.length===0){v.push(ae);continue}if(ae.command.charAt(0)==="-")continue;const me=l.get(ae.command);if(!me||!ae.isDefault){v.push(ae);continue}let Ne=!1;for(const Ve of me){const Ge=Ve.keypressParts[0],mt=Ve.keypressParts[1],ti=Ve.when;if(this._isTargetedForRemoval(ae,Ge,mt,ti)){Ne=!0;break}}if(!Ne){v.push(ae);continue}}return v}_addKeyPress(r,l){const v=this._map.get(r);if(typeof v>"u"){this._map.set(r,[l]),this._addToLookupMap(l);return}for(let V=v.length-1;V>=0;V--){const G=v[V];if(G.command===l.command)continue;const ae=G.keypressParts.length>1,me=l.keypressParts.length>1;ae&&me&&G.keypressParts[1]!==l.keypressParts[1]||hn.whenIsEntirelyIncluded(G.when,l.when)&&this._removeFromLookupMap(G)}v.push(l),this._addToLookupMap(l)}_addToLookupMap(r){if(!r.command)return;let l=this._lookupMap.get(r.command);typeof l>"u"?(l=[r],this._lookupMap.set(r.command,l)):l.push(r)}_removeFromLookupMap(r){if(!r.command)return;const l=this._lookupMap.get(r.command);if(!(typeof l>"u")){for(let v=0,V=l.length;v<V;v++)if(l[v]===r){l.splice(v,1);return}}}static whenIsEntirelyIncluded(r,l){return!l||l.type===1?!0:!r||r.type===1?!1:(0,rs.M0)(r,l)}getKeybindings(){return this._keybindings}lookupPrimaryKeybinding(r,l){const v=this._lookupMap.get(r);if(typeof v>"u"||v.length===0)return null;if(v.length===1)return v[0];for(let V=v.length-1;V>=0;V--){const G=v[V];if(l.contextMatchesRules(G.when))return G}return v[v.length-1]}resolve(r,l,v){this._log(`| Resolving ${v}${l?` chorded from ${l}`:""}`);let V=null;if(l!==null){const ae=this._map.get(l);if(typeof ae>"u")return this._log("\\ No keybinding entries."),null;V=[];for(let me=0,Ne=ae.length;me<Ne;me++){const Ve=ae[me];Ve.keypressParts[1]===v&&V.push(Ve)}}else{const ae=this._map.get(v);if(typeof ae>"u")return this._log("\\ No keybinding entries."),null;V=ae}const G=this._findCommand(r,V);return G?l===null&&G.keypressParts.length>1&&G.keypressParts[1]!==null?(this._log(`\\ From ${V.length} keybinding entries, matched chord, when: ${Ir(G.when)}, source: ${Nr(G)}.`),{enterChord:!0,leaveChord:!1,commandId:null,commandArgs:null,bubble:!1}):(this._log(`\\ From ${V.length} keybinding entries, matched ${G.command}, when: ${Ir(G.when)}, source: ${Nr(G)}.`),{enterChord:!1,leaveChord:G.keypressParts.length>1,commandId:G.command,commandArgs:G.commandArgs,bubble:G.bubble}):(this._log(`\\ From ${V.length} keybinding entries, no when clauses matched the context.`),null)}_findCommand(r,l){for(let v=l.length-1;v>=0;v--){const V=l[v];if(hn._contextMatchesRules(r,V.when))return V}return null}static _contextMatchesRules(r,l){return l?l.evaluate(r):!0}}function Ir(ue){return ue?`${ue.serialize()}`:"no when condition"}function Nr(ue){return ue.extensionId?ue.isBuiltinExtension?`built-in extension ${ue.extensionId}`:`user extension ${ue.extensionId}`:ue.isDefault?"built-in":"user"}var Mr=f(48421);class jo{constructor(r,l,v,V,G,ae,me){this._resolvedKeybindingItemBrand=void 0,this.resolvedKeybinding=r,this.keypressParts=r?Tr(r.getDispatchParts()):[],r&&this.keypressParts.length===0&&(this.keypressParts=Tr(r.getSingleModifierDispatchParts())),this.bubble=l?l.charCodeAt(0)===94:!1,this.command=this.bubble?l.substr(1):l,this.commandArgs=v,this.when=V,this.isDefault=G,this.extensionId=ae,this.isBuiltinExtension=me}}function Tr(ue){const r=[];for(let l=0,v=ue.length;l<v;l++){const V=ue[l];if(!V)return r;r.push(V)}return r}var Qs=f(98315);class hc extends Os.z5{constructor(r,l){if(super(),l.length===0)throw(0,pe.Qg)("parts");this._os=r,this._parts=l}getLabel(){return Qs.Of.toLabel(this._os,this._parts,r=>this._getLabel(r))}getAriaLabel(){return Qs.r0.toLabel(this._os,this._parts,r=>this._getAriaLabel(r))}getElectronAccelerator(){return this._parts.length>1||this._parts[0].isDuplicateModifierCase()?null:Qs.rr.toLabel(this._os,this._parts,r=>this._getElectronAccelerator(r))}isChord(){return this._parts.length>1}getParts(){return this._parts.map(r=>this._getPart(r))}_getPart(r){return new Os.QB(r.ctrlKey,r.shiftKey,r.altKey,r.metaKey,this._getLabel(r),this._getAriaLabel(r))}getDispatchParts(){return this._parts.map(r=>this._getDispatchPart(r))}getSingleModifierDispatchParts(){return this._parts.map(r=>this._getSingleModifierDispatchPart(r))}}class da extends hc{constructor(r,l){super(l,r.parts)}_keyCodeToUILabel(r){if(this._os===2)switch(r){case 15:return"\u2190";case 16:return"\u2191";case 17:return"\u2192";case 18:return"\u2193"}return $.YM.toString(r)}_getLabel(r){return r.isDuplicateModifierCase()?"":this._keyCodeToUILabel(r.keyCode)}_getAriaLabel(r){return r.isDuplicateModifierCase()?"":$.YM.toString(r.keyCode)}_getElectronAccelerator(r){return $.YM.toElectronAccelerator(r.keyCode)}_getDispatchPart(r){return da.getDispatchStr(r)}static getDispatchStr(r){if(r.isModifierKey())return null;let l="";return r.ctrlKey&&(l+="ctrl+"),r.shiftKey&&(l+="shift+"),r.altKey&&(l+="alt+"),r.metaKey&&(l+="meta+"),l+=$.YM.toString(r.keyCode),l}_getSingleModifierDispatchPart(r){return r.keyCode===5&&!r.shiftKey&&!r.altKey&&!r.metaKey?"ctrl":r.keyCode===4&&!r.ctrlKey&&!r.altKey&&!r.metaKey?"shift":r.keyCode===6&&!r.ctrlKey&&!r.shiftKey&&!r.metaKey?"alt":r.keyCode===57&&!r.ctrlKey&&!r.shiftKey&&!r.altKey?"meta":null}static _scanCodeToKeyCode(r){const l=$.Fo[r];if(l!==-1)return l;switch(r){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 83;case 52:return 81;case 53:return 87;case 54:return 89;case 55:return 88;case 56:return 0;case 57:return 80;case 58:return 90;case 59:return 86;case 60:return 82;case 61:return 84;case 62:return 85;case 106:return 92}return 0}static _resolveSimpleUserBinding(r){if(!r)return null;if(r instanceof Os.h$)return r;const l=this._scanCodeToKeyCode(r.scanCode);return l===0?null:new Os.h$(r.ctrlKey,r.shiftKey,r.altKey,r.metaKey,l)}static resolveUserBinding(r,l){const v=Tr(r.map(V=>this._resolveSimpleUserBinding(V)));return v.length>0?[new da(new Os.p(v),l)]:[]}}var uc=f(8377),pr=f(44023),Ur=f(76243),Ko=f(26851),ca=f(45933),_r=f(22467),er=f(84657),ms=f(52348),ha=f(51577),Ia=f(4580),vr=f(17713),wo;(function(ue){ue[ue.AVOID=0]="AVOID",ue[ue.ALIGN=1]="ALIGN"})(wo||(wo={}));function No(ue,r,l){const v=l.mode===wo.ALIGN?l.offset:l.offset+l.size,V=l.mode===wo.ALIGN?l.offset+l.size:l.offset;return l.position===0?r<=ue-v?v:r<=V?V-r:Math.max(ue-r,0):r<=V?V-r:r<=ue-v?v:0}class ro extends ce.jG{constructor(r,l){super(),this.container=null,this.delegate=null,this.toDisposeOnClean=ce.jG.None,this.toDisposeOnSetContainer=ce.jG.None,this.shadowRoot=null,this.shadowRootHostElement=null,this.view=Et.$(".context-view"),this.useFixedPosition=!1,this.useShadowDOM=!1,Et.jD(this.view),this.setContainer(r,l),this._register((0,ce.s)(()=>this.setContainer(null,1)))}setContainer(r,l){var v;if(this.container&&(this.toDisposeOnSetContainer.dispose(),this.shadowRoot?(this.shadowRoot.removeChild(this.view),this.shadowRoot=null,(v=this.shadowRootHostElement)===null||v===void 0||v.remove(),this.shadowRootHostElement=null):this.container.removeChild(this.view),this.container=null),r){if(this.container=r,this.useFixedPosition=l!==1,this.useShadowDOM=l===3,this.useShadowDOM){this.shadowRootHostElement=Et.$(".shadow-root-host"),this.container.appendChild(this.shadowRootHostElement),this.shadowRoot=this.shadowRootHostElement.attachShadow({mode:"open"});const G=document.createElement("style");G.textContent=ld,this.shadowRoot.appendChild(G),this.shadowRoot.appendChild(this.view),this.shadowRoot.appendChild(Et.$("slot"))}else this.container.appendChild(this.view);const V=new ce.Cm;ro.BUBBLE_UP_EVENTS.forEach(G=>{V.add(Et.b2(this.container,G,ae=>{this.onDOMEvent(ae,!1)}))}),ro.BUBBLE_DOWN_EVENTS.forEach(G=>{V.add(Et.b2(this.container,G,ae=>{this.onDOMEvent(ae,!0)},!0))}),this.toDisposeOnSetContainer=V}}show(r){var l,v;this.isVisible()&&this.hide(),Et.w_(this.view),this.view.className="context-view",this.view.style.top="0px",this.view.style.left="0px",this.view.style.zIndex="2575",this.view.style.position=this.useFixedPosition?"fixed":"absolute",Et.WU(this.view),this.toDisposeOnClean=r.render(this.view)||ce.jG.None,this.delegate=r,this.doLayout(),(v=(l=this.delegate).focus)===null||v===void 0||v.call(l)}getViewElement(){return this.view}layout(){if(this.isVisible()){if(this.delegate.canRelayout===!1&&!(ge.un&&ha.e.pointerEvents)){this.hide();return}this.delegate.layout&&this.delegate.layout(),this.doLayout()}}doLayout(){if(!this.isVisible())return;const r=this.delegate.getAnchor();let l;if(Et.sb(r)){const mt=Et.BK(r),ti=Et.mU(r);l={top:mt.top*ti,left:mt.left*ti,width:mt.width*ti,height:mt.height*ti}}else l={top:r.y,left:r.x,width:r.width||1,height:r.height||2};const v=Et.Tr(this.view),V=Et.OK(this.view),G=this.delegate.anchorPosition||0,ae=this.delegate.anchorAlignment||0,me=this.delegate.anchorAxisAlignment||0;let Ne,Ve;if(me===0){const mt={offset:l.top-window.pageYOffset,size:l.height,position:G===0?0:1},ti={offset:l.left,size:l.width,position:ae===0?0:1,mode:wo.ALIGN};Ne=No(window.innerHeight,V,mt)+window.pageYOffset,Ia.Q.intersects({start:Ne,end:Ne+V},{start:mt.offset,end:mt.offset+mt.size})&&(ti.mode=wo.AVOID),Ve=No(window.innerWidth,v,ti)}else{const mt={offset:l.left,size:l.width,position:ae===0?0:1},ti={offset:l.top,size:l.height,position:G===0?0:1,mode:wo.ALIGN};Ve=No(window.innerWidth,v,mt),Ia.Q.intersects({start:Ve,end:Ve+v},{start:mt.offset,end:mt.offset+mt.size})&&(ti.mode=wo.AVOID),Ne=No(window.innerHeight,V,ti)+window.pageYOffset}this.view.classList.remove("top","bottom","left","right"),this.view.classList.add(G===0?"bottom":"top"),this.view.classList.add(ae===0?"left":"right"),this.view.classList.toggle("fixed",this.useFixedPosition);const Ge=Et.BK(this.container);this.view.style.top=`${Ne-(this.useFixedPosition?Et.BK(this.view).top:Ge.top)}px`,this.view.style.left=`${Ve-(this.useFixedPosition?Et.BK(this.view).left:Ge.left)}px`,this.view.style.width="initial"}hide(r){const l=this.delegate;this.delegate=null,l?.onHide&&l.onHide(r),this.toDisposeOnClean.dispose(),Et.jD(this.view)}isVisible(){return!!this.delegate}onDOMEvent(r,l){this.delegate&&(this.delegate.onDOMEvent?this.delegate.onDOMEvent(r,document.activeElement):l&&!Et.QX(r.target,this.container)&&this.hide())}dispose(){this.hide(),super.dispose()}}ro.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"],ro.BUBBLE_DOWN_EVENTS=["click"];const ld=` :host { all: initial; /* 1st rule so subsequent properties are reset. */ } @font-face { font-family: "codicon"; font-display: block; src: url("./codicon.ttf?5d4d76ab2ce5108968ad644d591a16a6") format("truetype"); } .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 dd=function(ue,r,l,v){var V=arguments.length,G=V<3?r:v===null?v=Object.getOwnPropertyDescriptor(r,l):v,ae;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")G=Reflect.decorate(ue,r,l,v);else for(var me=ue.length-1;me>=0;me--)(ae=ue[me])&&(G=(V<3?ae(G):V>3?ae(r,l,G):ae(r,l))||G);return V>3&&G&&Object.defineProperty(r,l,G),G},gc=function(ue,r){return function(l,v){r(l,v,ue)}};let hl=class extends ce.jG{constructor(r){super(),this.layoutService=r,this.currentViewDisposable=ce.jG.None,this.container=r.hasContainer?r.container:null,this.contextView=this._register(new ro(this.container,1)),this.layout(),this._register(r.onDidLayout(()=>this.layout()))}setContainer(r,l){this.contextView.setContainer(r,l||1)}showContextView(r,l,v){l?(l!==this.container||this.shadowRoot!==v)&&(this.container=l,this.setContainer(l,v?3:2)):this.layoutService.hasContainer&&this.container!==this.layoutService.container&&(this.container=this.layoutService.container,this.setContainer(this.container,1)),this.shadowRoot=v,this.contextView.show(r);const V=(0,ce.s)(()=>{this.currentViewDisposable===V&&this.hideContextView()});return this.currentViewDisposable=V,V}getContextViewElement(){return this.contextView.getViewElement()}layout(){this.contextView.layout()}hideContextView(r){this.contextView.hide(r)}};hl=dd([gc(0,fs)],hl);var $o=f(78518),qs=f(64033),jr=function(ue,r,l,v){function V(G){return G instanceof l?G:new l(function(ae){ae(G)})}return new(l||(l=Promise))(function(G,ae){function me(Ge){try{Ve(v.next(Ge))}catch(mt){ae(mt)}}function Ne(Ge){try{Ve(v.throw(Ge))}catch(mt){ae(mt)}}function Ve(Ge){Ge.done?G(Ge.value):V(Ge.value).then(me,Ne)}Ve((v=v.apply(ue,r||[])).next())})};const ua="**",Rr="/",So="[/\\\\]",tr="[^/\\\\]",yo=/\//g;function ds(ue,r){switch(ue){case 0:return"";case 1:return`${tr}*?`;default:return`(?:${So}|${tr}+${So}${r?`|${So}${tr}+`:""})*?`}}function pi(ue,r){if(!ue)return[];const l=[];let v=!1,V=!1,G="";for(const ae of ue){switch(ae){case r:if(!v&&!V){l.push(G),G="";continue}break;case"{":v=!0;break;case"}":v=!1;break;case"[":V=!0;break;case"]":V=!1;break}G+=ae}return G&&l.push(G),l}function Kr(ue){if(!ue)return"";let r="";const l=pi(ue,Rr);if(l.every(v=>v===ua))r=".*";else{let v=!1;l.forEach((V,G)=>{if(V===ua){if(v)return;r+=ds(2,G===l.length-1)}else{let ae=!1,me="",Ne=!1,Ve="";for(const Ge of V){if(Ge!=="}"&&ae){me+=Ge;continue}if(Ne&&(Ge!=="]"||!Ve)){let mt;Ge==="-"?mt=Ge:(Ge==="^"||Ge==="!")&&!Ve?mt="^":Ge===Rr?mt="":mt=(0,d.bm)(Ge),Ve+=mt;continue}switch(Ge){case"{":ae=!0;continue;case"[":Ne=!0;continue;case"}":{const ti=`(?:${pi(me,",").map(Si=>Kr(Si)).join("|")})`;r+=ti,ae=!1,me="";break}case"]":{r+="["+Ve+"]",Ne=!1,Ve="";break}case"?":r+=tr;continue;case"*":r+=ds(1);continue;default:r+=(0,d.bm)(Ge)}}G<l.length-1&&(l[G+1]!==ua||G+2<l.length)&&(r+=So)}v=V===ua})}return r}const Na=/^\*\*\/\*\.[\w\.-]+$/,Ma=/^\*\*\/([\w\.-]+)\/?$/,Vo=/^{\*\*\/\*?[\w\.-]+\/?(,\*\*\/\*?[\w\.-]+\/?)*}$/,ir=/^{\*\*\/\*?[\w\.-]+(\/(\*\*)?)?(,\*\*\/\*?[\w\.-]+(\/(\*\*)?)?)*}$/,nr=/^\*\*((\/[\w\.-]+)+)\/?$/,fo=/^([\w\.-]+(\/[\w\.-]+)*)\/?$/,un=new Us.qK(1e4),Xn=function(){return!1},us=function(){return null};function Rs(ue,r){if(!ue)return us;let l;typeof ue!="string"?l=ue.pattern:l=ue,l=l.trim();const v=`${l}_${!!r.trimForExclusions}`;let V=un.get(v);if(V)return js(V,ue);let G;return Na.test(l)?V=sr(l.substr(4),l):(G=Ma.exec(Zs(l,r)))?V=ul(G[1],l):(r.trimForExclusions?ir:Vo).test(l)?V=gl(l,r):(G=nr.exec(Zs(l,r)))?V=fl(G[1].substr(1),l,!0):(G=fo.exec(Zs(l,r)))?V=fl(G[1],l,!1):V=fc(l),un.set(v,V),js(V,ue)}function js(ue,r){if(typeof r=="string")return ue;const l=function(v,V){return(0,$o._1)(v,r.base,!ge.j9)?ue(v.substr(r.base.length+1),V):null};return l.allBasenames=ue.allBasenames,l.allPaths=ue.allPaths,l.basenames=ue.basenames,l.patterns=ue.patterns,l}function Zs(ue,r){return r.trimForExclusions&&ue.endsWith("/**")?ue.substr(0,ue.length-2):ue}function sr(ue,r){return function(l,v){return typeof l=="string"&&l.endsWith(ue)?r:null}}function ul(ue,r){const l=`/${ue}`,v=`\\${ue}`,V=function(ae,me){return typeof ae!="string"?null:me?me===ue?r:null:ae===ue||ae.endsWith(l)||ae.endsWith(v)?r:null},G=[ue];return V.basenames=G,V.patterns=[r],V.allBasenames=G,V}function gl(ue,r){const l=Gr(ue.slice(1,-1).split(",").map(me=>Rs(me,r)).filter(me=>me!==us),ue),v=l.length;if(!v)return us;if(v===1)return l[0];const V=function(me,Ne){for(let Ve=0,Ge=l.length;Ve<Ge;Ve++)if(l[Ve](me,Ne))return ue;return null},G=l.find(me=>!!me.allBasenames);G&&(V.allBasenames=G.allBasenames);const ae=l.reduce((me,Ne)=>Ne.allPaths?me.concat(Ne.allPaths):me,[]);return ae.length&&(V.allPaths=ae),V}function fl(ue,r,l){const v=qs.Vn===qs.SA.sep,V=v?ue:ue.replace(yo,qs.Vn),G=qs.Vn+V,ae=qs.SA.sep+ue;let me;return l?me=function(Ne,Ve){return typeof Ne=="string"&&(Ne===V||Ne.endsWith(G)||!v&&(Ne===ue||Ne.endsWith(ae)))?r:null}:me=function(Ne,Ve){return typeof Ne=="string"&&(Ne===V||!v&&Ne===ue)?r:null},me.allPaths=[(l?"*/":"./")+ue],me}function fc(ue){try{const r=new RegExp(`^${Kr(ue)}$`);return function(l){return r.lastIndex=0,typeof l=="string"&&r.test(l)?ue:null}}catch{return us}}function $r(ue,r,l){return!ue||typeof r!="string"?!1:Lo(ue)(r,void 0,l)}function Lo(ue,r={}){if(!ue)return Xn;if(typeof ue=="string"||Ta(ue)){const l=Rs(ue,r);if(l===us)return Xn;const v=function(V,G){return!!l(V,G)};return l.allBasenames&&(v.allBasenames=l.allBasenames),l.allPaths&&(v.allPaths=l.allPaths),v}return ga(ue,r)}function Ta(ue){const r=ue;return r?typeof r.base=="string"&&typeof r.pattern=="string":!1}function ga(ue,r){const l=Gr(Object.getOwnPropertyNames(ue).map(me=>Nh(me,ue[me],r)).filter(me=>me!==us)),v=l.length;if(!v)return us;if(!l.some(me=>!!me.requiresSiblings)){if(v===1)return l[0];const me=function(Ge,mt){let ti;for(let Si=0,tn=l.length;Si<tn;Si++){const kn=l[Si](Ge,mt);if(typeof kn=="string")return kn;(0,ee.Qg)(kn)&&(ti||(ti=[]),ti.push(kn))}return ti?(()=>jr(this,void 0,void 0,function*(){for(const Si of ti){const tn=yield Si;if(typeof tn=="string")return tn}return null}))():null},Ne=l.find(Ge=>!!Ge.allBasenames);Ne&&(me.allBasenames=Ne.allBasenames);const Ve=l.reduce((Ge,mt)=>mt.allPaths?Ge.concat(mt.allPaths):Ge,[]);return Ve.length&&(me.allPaths=Ve),me}const V=function(me,Ne,Ve){let Ge,mt;for(let ti=0,Si=l.length;ti<Si;ti++){const tn=l[ti];tn.requiresSiblings&&Ve&&(Ne||(Ne=(0,qs.P8)(me)),Ge||(Ge=Ne.substr(0,Ne.length-(0,qs.LC)(me).length)));const kn=tn(me,Ne,Ge,Ve);if(typeof kn=="string")return kn;(0,ee.Qg)(kn)&&(mt||(mt=[]),mt.push(kn))}return mt?(()=>jr(this,void 0,void 0,function*(){for(const ti of mt){const Si=yield ti;if(typeof Si=="string")return Si}return null}))():null},G=l.find(me=>!!me.allBasenames);G&&(V.allBasenames=G.allBasenames);const ae=l.reduce((me,Ne)=>Ne.allPaths?me.concat(Ne.allPaths):me,[]);return ae.length&&(V.allPaths=ae),V}function Nh(ue,r,l){if(r===!1)return us;const v=Rs(ue,l);if(v===us)return us;if(typeof r=="boolean")return v;if(r){const V=r.when;if(typeof V=="string"){const G=(ae,me,Ne,Ve)=>{if(!Ve||!v(ae,me))return null;const Ge=V.replace("$(basename)",Ne),mt=Ve(Ge);return(0,ee.Qg)(mt)?mt.then(ti=>ti?ue:null):mt?ue:null};return G.requiresSiblings=!0,G}}return v}function Gr(ue,r){const l=ue.filter(me=>!!me.basenames);if(l.length<2)return ue;const v=l.reduce((me,Ne)=>{const Ve=Ne.basenames;return Ve?me.concat(Ve):me},[]);let V;if(r){V=[];for(let me=0,Ne=v.length;me<Ne;me++)V.push(r)}else V=l.reduce((me,Ne)=>{const Ve=Ne.patterns;return Ve?me.concat(Ve):me},[]);const G=function(me,Ne){if(typeof me!="string")return null;if(!Ne){let Ge;for(Ge=me.length;Ge>0;Ge--){const mt=me.charCodeAt(Ge-1);if(mt===47||mt===92)break}Ne=me.substr(Ge)}const Ve=v.indexOf(Ne);return Ve!==-1?V[Ve]:null};G.basenames=v,G.patterns=V,G.allBasenames=v;const ae=ue.filter(me=>!me.basenames);return ae.push(G),ae}var Dn=f(53720),Ys=f(54957);let Qr=[],cs=[],ml=[];function pl(ue,r=!1){cd(ue,!1,r)}function cd(ue,r,l){const v=Mh(ue,r);Qr.push(v),v.userConfigured?ml.push(v):cs.push(v),l&&!v.userConfigured&&Qr.forEach(V=>{V.mime===v.mime||V.userConfigured||(v.extension&&V.extension===v.extension&&console.warn(`Overwriting extension <<${v.extension}>> to now point to mime <<${v.mime}>>`),v.filename&&V.filename===v.filename&&console.warn(`Overwriting filename <<${v.filename}>> to now point to mime <<${v.mime}>>`),v.filepattern&&V.filepattern===v.filepattern&&console.warn(`Overwriting filepattern <<${v.filepattern}>> to now point to mime <<${v.mime}>>`),v.firstline&&V.firstline===v.firstline&&console.warn(`Overwriting firstline <<${v.firstline}>> to now point to mime <<${v.mime}>>`))})}function Mh(ue,r){return{id:ue.id,mime:ue.mime,filename:ue.filename,extension:ue.extension,filepattern:ue.filepattern,firstline:ue.firstline,userConfigured:r,filenameLowercase:ue.filename?ue.filename.toLowerCase():void 0,extensionLowercase:ue.extension?ue.extension.toLowerCase():void 0,filepatternLowercase:ue.filepattern?Lo(ue.filepattern.toLowerCase()):void 0,filepatternOnPath:ue.filepattern?ue.filepattern.indexOf(qs.SA.sep)>=0:!1}}function mc(){Qr=Qr.filter(ue=>ue.userConfigured),cs=[]}function Th(ue,r){return Go(ue,r).map(l=>l.id)}function Go(ue,r){let l;if(ue)switch(ue.scheme){case ls.ny.file:l=ue.fsPath;break;case ls.ny.data:{l=_r.B6.parseMetaData(ue).get(_r.B6.META_DATA_LABEL);break}case ls.ny.vscodeNotebookCell:l=void 0;break;default:l=ue.path}if(!l)return[{id:"unknown",mime:Dn.K.unknown}];l=l.toLowerCase();const v=(0,qs.P8)(l),V=pc(l,v,ml);if(V)return[V,{id:Ys.vH,mime:Dn.K.text}];const G=pc(l,v,cs);if(G)return[G,{id:Ys.vH,mime:Dn.K.text}];if(r){const ae=fa(r);if(ae)return[ae,{id:Ys.vH,mime:Dn.K.text}]}return[{id:"unknown",mime:Dn.K.unknown}]}function pc(ue,r,l){var v;let V,G,ae;for(let me=l.length-1;me>=0;me--){const Ne=l[me];if(r===Ne.filenameLowercase){V=Ne;break}if(Ne.filepattern&&(!G||Ne.filepattern.length>G.filepattern.length)){const Ve=Ne.filepatternOnPath?ue:r;!((v=Ne.filepatternLowercase)===null||v===void 0)&&v.call(Ne,Ve)&&(G=Ne)}Ne.extension&&(!ae||Ne.extension.length>ae.extension.length)&&r.endsWith(Ne.extensionLowercase)&&(ae=Ne)}if(V)return V;if(G)return G;if(ae)return ae}function fa(ue){if((0,d.LU)(ue)&&(ue=ue.substr(1)),ue.length>0)for(let r=Qr.length-1;r>=0;r--){const l=Qr[r];if(!l.firstline)continue;const v=ue.match(l.firstline);if(v&&v.length>0)return l}}var Cr=f(27142),_c=f(67167);const Mo=Object.prototype.hasOwnProperty,vc="vs.editor.nullLanguage";class hd{constructor(){this._languageIdToLanguage=[],this._languageToLanguageId=new Map,this._register(vc,0),this._register(Ys.vH,1),this._nextLanguageId=2}_register(r,l){this._languageIdToLanguage[l]=r,this._languageToLanguageId.set(r,l)}register(r){if(this._languageToLanguageId.has(r))return;const l=this._nextLanguageId++;this._register(r,l)}encodeLanguageId(r){return this._languageToLanguageId.get(r)||0}decodeLanguageId(r){return this._languageIdToLanguage[r]||vc}}class Ra extends ce.jG{constructor(r=!0,l=!1){super(),this._onDidChange=this._register(new te.vl),this.onDidChange=this._onDidChange.event,Ra.instanceCount++,this._warnOnOverwrite=l,this.languageIdCodec=new hd,this._dynamicLanguages=[],this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},r&&(this._initializeFromRegistry(),this._register(Ys.W6.onDidChangeLanguages(v=>{this._initializeFromRegistry()})))}dispose(){Ra.instanceCount--,super.dispose()}_initializeFromRegistry(){this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},mc();const r=[].concat(Ys.W6.getLanguages()).concat(this._dynamicLanguages);this._registerLanguages(r)}_registerLanguages(r){for(const l of r)this._registerLanguage(l);this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Object.keys(this._languages).forEach(l=>{const v=this._languages[l];v.name&&(this._nameMap[v.name]=v.identifier),v.aliases.forEach(V=>{this._lowercaseNameMap[V.toLowerCase()]=v.identifier}),v.mimetypes.forEach(V=>{this._mimeTypesMap[V]=v.identifier})}),_c.O.as(Cr.Fd.Configuration).registerOverrideIdentifiers(this.getRegisteredLanguageIds()),this._onDidChange.fire()}_registerLanguage(r){const l=r.id;let v;Mo.call(this._languages,l)?v=this._languages[l]:(this.languageIdCodec.register(l),v={identifier:l,name:null,mimetypes:[],aliases:[],extensions:[],filenames:[],configurationFiles:[],icons:[]},this._languages[l]=v),this._mergeLanguage(v,r)}_mergeLanguage(r,l){const v=l.id;let V=null;if(Array.isArray(l.mimetypes)&&l.mimetypes.length>0&&(r.mimetypes.push(...l.mimetypes),V=l.mimetypes[0]),V||(V=`text/x-${v}`,r.mimetypes.push(V)),Array.isArray(l.extensions)){l.configuration?r.extensions=l.extensions.concat(r.extensions):r.extensions=r.extensions.concat(l.extensions);for(const me of l.extensions)pl({id:v,mime:V,extension:me},this._warnOnOverwrite)}if(Array.isArray(l.filenames))for(const me of l.filenames)pl({id:v,mime:V,filename:me},this._warnOnOverwrite),r.filenames.push(me);if(Array.isArray(l.filenamePatterns))for(const me of l.filenamePatterns)pl({id:v,mime:V,filepattern:me},this._warnOnOverwrite);if(typeof l.firstLine=="string"&&l.firstLine.length>0){let me=l.firstLine;me.charAt(0)!=="^"&&(me="^"+me);try{const Ne=new RegExp(me);(0,d.eY)(Ne)||pl({id:v,mime:V,firstline:Ne},this._warnOnOverwrite)}catch(Ne){(0,pe.dz)(Ne)}}r.aliases.push(v);let G=null;if(typeof l.aliases<"u"&&Array.isArray(l.aliases)&&(l.aliases.length===0?G=[null]:G=l.aliases),G!==null)for(const me of G)!me||me.length===0||r.aliases.push(me);const ae=G!==null&&G.length>0;if(!(ae&&G[0]===null)){const me=(ae?G[0]:null)||v;(ae||!r.name)&&(r.name=me)}l.configuration&&r.configurationFiles.push(l.configuration),l.icon&&r.icons.push(l.icon)}isRegisteredLanguageId(r){return r?Mo.call(this._languages,r):!1}getRegisteredLanguageIds(){return Object.keys(this._languages)}getLanguageIdByLanguageName(r){const l=r.toLowerCase();return Mo.call(this._lowercaseNameMap,l)?this._lowercaseNameMap[l]:null}getLanguageIdByMimeType(r){return r&&Mo.call(this._mimeTypesMap,r)?this._mimeTypesMap[r]:null}guessLanguageIdByFilepathOrFirstLine(r,l){return!r&&!l?[]:Th(r,l)}}Ra.instanceCount=0;class br extends ce.jG{constructor(r=!1){super(),this._onDidEncounterLanguage=this._register(new te.vl),this.onDidEncounterLanguage=this._onDidEncounterLanguage.event,this._onDidChange=this._register(new te.vl({leakWarningThreshold:200})),this.onDidChange=this._onDidChange.event,br.instanceCount++,this._encounteredLanguages=new Set,this._registry=this._register(new Ra(!0,r)),this.languageIdCodec=this._registry.languageIdCodec,this._register(this._registry.onDidChange(()=>this._onDidChange.fire()))}dispose(){br.instanceCount--,super.dispose()}isRegisteredLanguageId(r){return this._registry.isRegisteredLanguageId(r)}getLanguageIdByLanguageName(r){return this._registry.getLanguageIdByLanguageName(r)}getLanguageIdByMimeType(r){return this._registry.getLanguageIdByMimeType(r)}guessLanguageIdByFilepathOrFirstLine(r,l){const v=this._registry.guessLanguageIdByFilepathOrFirstLine(r,l);return(0,Ct.Fy)(v,null)}createById(r){return new Aa(this.onDidChange,()=>this._createAndGetLanguageIdentifier(r))}createByFilepathOrFirstLine(r,l){return new Aa(this.onDidChange,()=>{const v=this.guessLanguageIdByFilepathOrFirstLine(r,l);return this._createAndGetLanguageIdentifier(v)})}_createAndGetLanguageIdentifier(r){return(!r||!this.isRegisteredLanguageId(r))&&(r=Ys.vH),this._encounteredLanguages.has(r)||(this._encounteredLanguages.add(r),z.dG.getOrCreate(r),this._onDidEncounterLanguage.fire(r)),r}}br.instanceCount=0;class Aa{constructor(r,l){this._onDidChangeLanguages=r,this._selector=l,this._listener=null,this._emitter=null,this.languageId=this._selector()}_dispose(){this._listener&&(this._listener.dispose(),this._listener=null),this._emitter&&(this._emitter.dispose(),this._emitter=null)}get onDidChange(){return this._listener||(this._listener=this._onDidChangeLanguages(()=>this._evaluate())),this._emitter||(this._emitter=new te.vl({onLastListenerRemove:()=>{this._dispose()}})),this._emitter.event}_evaluate(){var r;const l=this._selector();l!==this.languageId&&(this.languageId=l,(r=this._emitter)===null||r===void 0||r.fire(this.languageId))}}var Oa=f(9715),_l=f(55893),ma=f(30474),vl=f(77439),ud=f(45854),Cc=f(96852),Cl=f(63781),Fs=f(27969),Pa=f(26048),Hs=f(24594);const Fa=/\(&([^\s&])\)|(^|[^&])&([^\s&])/,Ba=/(&)?(&)([^\s&])/g;var Wa;(function(ue){ue[ue.Right=0]="Right",ue[ue.Left=1]="Left"})(Wa||(Wa={}));class Qo extends vl.E{constructor(r,l,v={}){r.classList.add("monaco-menu-container"),r.setAttribute("role","presentation");const V=document.createElement("div");V.classList.add("monaco-menu"),V.setAttribute("role","presentation"),super(V,{orientation:1,actionViewItemProvider:me=>this.doGetActionViewItem(me,v,G),context:v.context,actionRunner:v.actionRunner,ariaLabel:v.ariaLabel,ariaRole:"menu",focusOnlyEnabledItems:!0,triggerKeys:{keys:[3,...ge.zx||ge.j9?[10]:[]],keyDown:!0}}),this.menuElement=V,this.actionsList.tabIndex=0,this.menuDisposables=this._register(new ce.Cm),this.initializeOrUpdateStyleSheet(r,{}),this._register(ma.q.addTarget(V)),(0,Et.ko)(V,Et.Bx.KEY_DOWN,me=>{new Vi.Z(me).equals(2)&&me.preventDefault()}),v.enableMnemonics&&this.menuDisposables.add((0,Et.ko)(V,Et.Bx.KEY_DOWN,me=>{const Ne=me.key.toLocaleLowerCase();if(this.mnemonics.has(Ne)){Et.fs.stop(me,!0);const Ve=this.mnemonics.get(Ne);if(Ve.length===1&&(Ve[0]instanceof wl&&Ve[0].container&&this.focusItemByElement(Ve[0].container),Ve[0].onClick(me)),Ve.length>1){const Ge=Ve.shift();Ge&&Ge.container&&(this.focusItemByElement(Ge.container),Ve.push(Ge)),this.mnemonics.set(Ne,Ve)}}})),ge.j9&&this._register((0,Et.ko)(V,Et.Bx.KEY_DOWN,me=>{const Ne=new Vi.Z(me);Ne.equals(14)||Ne.equals(11)?(this.focusedItem=this.viewItems.length-1,this.focusNext(),Et.fs.stop(me,!0)):(Ne.equals(13)||Ne.equals(12))&&(this.focusedItem=0,this.focusPrevious(),Et.fs.stop(me,!0))})),this._register((0,Et.ko)(this.domNode,Et.Bx.MOUSE_OUT,me=>{const Ne=me.relatedTarget;(0,Et.QX)(Ne,this.domNode)||(this.focusedItem=void 0,this.updateFocus(),me.stopPropagation())})),this._register((0,Et.ko)(this.actionsList,Et.Bx.MOUSE_OVER,me=>{let Ne=me.target;if(!(!Ne||!(0,Et.QX)(Ne,this.actionsList)||Ne===this.actionsList)){for(;Ne.parentElement!==this.actionsList&&Ne.parentElement!==null;)Ne=Ne.parentElement;if(Ne.classList.contains("action-item")){const Ve=this.focusedItem;this.setFocusedItem(Ne),Ve!==this.focusedItem&&this.updateFocus()}}})),this._register(ma.q.addTarget(this.actionsList)),this._register((0,Et.ko)(this.actionsList,ma.B.Tap,me=>{let Ne=me.initialTarget;if(!(!Ne||!(0,Et.QX)(Ne,this.actionsList)||Ne===this.actionsList)){for(;Ne.parentElement!==this.actionsList&&Ne.parentElement!==null;)Ne=Ne.parentElement;if(Ne.classList.contains("action-item")){const Ve=this.focusedItem;this.setFocusedItem(Ne),Ve!==this.focusedItem&&this.updateFocus()}}}));const G={parent:this};this.mnemonics=new Map,this.scrollableElement=this._register(new Cl.MU(V,{alwaysConsumeMouseWheel:!0,horizontal:2,vertical:3,verticalScrollbarSize:7,handleMouseWheel:!0,useShadows:!0}));const ae=this.scrollableElement.getDomNode();ae.style.position="",this._register((0,Et.ko)(V,ma.B.Change,me=>{Et.fs.stop(me,!0);const Ne=this.scrollableElement.getScrollPosition().scrollTop;this.scrollableElement.setScrollPosition({scrollTop:Ne-me.translationY})})),this._register((0,Et.ko)(ae,Et.Bx.MOUSE_UP,me=>{me.preventDefault()})),V.style.maxHeight=`${Math.max(10,window.innerHeight-r.getBoundingClientRect().top-35)}px`,l=l.filter(me=>{var Ne;return!((Ne=v.submenuIds)===null||Ne===void 0)&&Ne.has(me.id)?(console.warn(`Found submenu cycle: ${me.id}`),!1):!0}),this.push(l,{icon:!0,label:!0,isMenu:!0}),r.appendChild(this.scrollableElement.getDomNode()),this.scrollableElement.scanDomNode(),this.viewItems.filter(me=>!(me instanceof Zr)).forEach((me,Ne,Ve)=>{me.updatePositionInSet(Ne+1,Ve.length)})}initializeOrUpdateStyleSheet(r,l){this.styleSheet||((0,Et.Cl)(r)?this.styleSheet=(0,Et.li)(r):(Qo.globalStyleSheet||(Qo.globalStyleSheet=(0,Et.li)()),this.styleSheet=Qo.globalStyleSheet)),this.styleSheet.textContent=sg(l,(0,Et.Cl)(r))}style(r){const l=this.getContainer();this.initializeOrUpdateStyleSheet(l,r);const v=r.foregroundColor?`${r.foregroundColor}`:"",V=r.backgroundColor?`${r.backgroundColor}`:"",G=r.borderColor?`1px solid ${r.borderColor}`:"",ae="5px",me=r.shadowColor?`0 2px 8px ${r.shadowColor}`:"";l.style.outline=G,l.style.borderRadius=ae,l.style.color=v,l.style.backgroundColor=V,l.style.boxShadow=me,this.viewItems&&this.viewItems.forEach(Ne=>{(Ne instanceof bl||Ne instanceof Zr)&&Ne.style(r)})}getContainer(){return this.scrollableElement.getDomNode()}get onScroll(){return this.scrollableElement.onScroll}focusItemByElement(r){const l=this.focusedItem;this.setFocusedItem(r),l!==this.focusedItem&&this.updateFocus()}setFocusedItem(r){for(let l=0;l<this.actionsList.children.length;l++){const v=this.actionsList.children[l];if(r===v){this.focusedItem=l;break}}}updateFocus(r){super.updateFocus(r,!0,!0),typeof this.focusedItem<"u"&&this.scrollableElement.setScrollPosition({scrollTop:Math.round(this.menuElement.scrollTop)})}doGetActionViewItem(r,l,v){if(r instanceof Fs.wv)return new Zr(l.context,r,{icon:!0});if(r instanceof Fs.YH){const V=new wl(r,r.actions,v,Object.assign(Object.assign({},l),{submenuIds:new Set([...l.submenuIds||[],r.id])}));if(l.enableMnemonics){const G=V.getMnemonic();if(G&&V.isEnabled()){let ae=[];this.mnemonics.has(G)&&(ae=this.mnemonics.get(G)),ae.push(V),this.mnemonics.set(G,ae)}}return V}else{const V={enableMnemonics:l.enableMnemonics,useEventAsContext:l.useEventAsContext};if(l.getKeyBinding){const ae=l.getKeyBinding(r);if(ae){const me=ae.getLabel();me&&(V.keybinding=me)}}const G=new bl(l.context,r,V);if(l.enableMnemonics){const ae=G.getMnemonic();if(ae&&G.isEnabled()){let me=[];this.mnemonics.has(ae)&&(me=this.mnemonics.get(ae)),me.push(G),this.mnemonics.set(ae,me)}}return G}}}class bl extends ud.E{constructor(r,l,v={}){if(v.isMenu=!0,super(l,l,v),this.options=v,this.options.icon=v.icon!==void 0?v.icon:!1,this.options.label=v.label!==void 0?v.label:!0,this.cssClass="",this.options.label&&v.enableMnemonics){const V=this.getAction().label;if(V){const G=Fa.exec(V);G&&(this.mnemonic=(G[1]?G[1]:G[3]).toLocaleLowerCase())}}this.runOnceToEnableMouseUp=new ee.uC(()=>{this.element&&(this._register((0,Et.ko)(this.element,Et.Bx.MOUSE_UP,V=>{if(Et.fs.stop(V,!0),_l.isFirefox){if(new Oa.P(V).rightButton)return;this.onClick(V)}else setTimeout(()=>{this.onClick(V)},0)})),this._register((0,Et.ko)(this.element,Et.Bx.CONTEXT_MENU,V=>{Et.fs.stop(V,!0)})))},100),this._register(this.runOnceToEnableMouseUp)}render(r){super.render(r),this.element&&(this.container=r,this.item=(0,Et.BC)(this.element,(0,Et.$)("a.action-menu-item")),this._action.id===Fs.wv.ID?this.item.setAttribute("role","presentation"):(this.item.setAttribute("role","menuitem"),this.mnemonic&&this.item.setAttribute("aria-keyshortcuts",`${this.mnemonic}`)),this.check=(0,Et.BC)(this.item,(0,Et.$)("span.menu-item-check"+Pa.W6.menuSelection.cssSelector)),this.check.setAttribute("role","none"),this.label=(0,Et.BC)(this.item,(0,Et.$)("span.action-label")),this.options.label&&this.options.keybinding&&((0,Et.BC)(this.item,(0,Et.$)("span.keybinding")).textContent=this.options.keybinding),this.runOnceToEnableMouseUp.schedule(),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked())}blur(){super.blur(),this.applyStyle()}focus(){super.focus(),this.item&&this.item.focus(),this.applyStyle()}updatePositionInSet(r,l){this.item&&(this.item.setAttribute("aria-posinset",`${r}`),this.item.setAttribute("aria-setsize",`${l}`))}updateLabel(){var r;if(this.label&&this.options.label){(0,Et.w_)(this.label);let l=(0,Hs.pS)(this.getAction().label);if(l){const v=Va(l);this.options.enableMnemonics||(l=v),this.label.setAttribute("aria-label",v.replace(/&&/g,"&"));const V=Fa.exec(l);if(V){l=d.ih(l),Ba.lastIndex=0;let G=Ba.exec(l);for(;G&&G[1];)G=Ba.exec(l);const ae=me=>me.replace(/&&/g,"&");G?this.label.append(d.NB(ae(l.substr(0,G.index))," "),(0,Et.$)("u",{"aria-hidden":"true"},G[3]),d.BO(ae(l.substr(G.index+G[0].length))," ")):this.label.innerText=ae(l).trim(),(r=this.item)===null||r===void 0||r.setAttribute("aria-keyshortcuts",(V[1]?V[1]:V[3]).toLocaleLowerCase())}else this.label.innerText=l.replace(/&&/g,"&").trim()}}}updateTooltip(){}updateClass(){this.cssClass&&this.item&&this.item.classList.remove(...this.cssClass.split(" ")),this.options.icon&&this.label?(this.cssClass=this.getAction().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.getAction().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 r=this.getAction().checked;this.item.classList.toggle("checked",!!r),r!==void 0?(this.item.setAttribute("role","menuitemcheckbox"),this.item.setAttribute("aria-checked",r?"true":"false")):(this.item.setAttribute("role","menuitem"),this.item.setAttribute("aria-checked",""))}getMnemonic(){return this.mnemonic}applyStyle(){if(!this.menuStyle)return;const r=this.element&&this.element.classList.contains("focused"),l=r&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor,v=r&&this.menuStyle.selectionBackgroundColor?this.menuStyle.selectionBackgroundColor:void 0,V=r&&this.menuStyle.selectionBorderColor?`1px solid ${this.menuStyle.selectionBorderColor}`:"",G=r&&this.menuStyle.selectionBorderColor?"-1px":"";this.item&&(this.item.style.color=l?l.toString():"",this.item.style.backgroundColor=v?v.toString():"",this.item.style.outline=V,this.item.style.outlineOffset=G),this.check&&(this.check.style.color=l?l.toString():"")}style(r){this.menuStyle=r,this.applyStyle()}}class wl extends bl{constructor(r,l,v,V){super(r,r,V),this.submenuActions=l,this.parentData=v,this.submenuOptions=V,this.mysubmenu=null,this.submenuDisposables=this._register(new ce.Cm),this.mouseOver=!1,this.expandDirection=V&&V.expandDirection!==void 0?V.expandDirection:Wa.Right,this.showScheduler=new ee.uC(()=>{this.mouseOver&&(this.cleanupExistingSubmenu(!1),this.createSubmenu(!1))},250),this.hideScheduler=new ee.uC(()=>{this.element&&!(0,Et.QX)((0,Et.bq)(),this.element)&&this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))},750)}render(r){super.render(r),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=(0,Et.BC)(this.item,(0,Et.$)("span.submenu-indicator"+Pa.W6.menuSubmenu.cssSelector)),this.submenuIndicator.setAttribute("aria-hidden","true")),this._register((0,Et.ko)(this.element,Et.Bx.KEY_UP,l=>{const v=new Vi.Z(l);(v.equals(17)||v.equals(3))&&(Et.fs.stop(l,!0),this.createSubmenu(!0))})),this._register((0,Et.ko)(this.element,Et.Bx.KEY_DOWN,l=>{const v=new Vi.Z(l);(0,Et.bq)()===this.item&&(v.equals(17)||v.equals(3))&&Et.fs.stop(l,!0)})),this._register((0,Et.ko)(this.element,Et.Bx.MOUSE_OVER,l=>{this.mouseOver||(this.mouseOver=!0,this.showScheduler.schedule())})),this._register((0,Et.ko)(this.element,Et.Bx.MOUSE_LEAVE,l=>{this.mouseOver=!1})),this._register((0,Et.ko)(this.element,Et.Bx.FOCUS_OUT,l=>{this.element&&!(0,Et.QX)((0,Et.bq)(),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(r){Et.fs.stop(r,!0),this.cleanupExistingSubmenu(!1),this.createSubmenu(!0)}cleanupExistingSubmenu(r){if(this.parentData.submenu&&(r||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(r,l,v,V){const G={top:0,left:0};return G.left=No(r.width,l.width,{position:V===Wa.Right?0:1,offset:v.left,size:v.width}),G.left>=v.left&&G.left<v.left+v.width&&(v.left+10+l.width<=r.width&&(G.left=v.left+10),v.top+=10,v.height=0),G.top=No(r.height,l.height,{position:0,offset:v.top,size:0}),G.top+l.height===v.top&&G.top+v.height+l.height<=r.height&&(G.top+=v.height),G}createSubmenu(r=!0){if(this.element)if(this.parentData.submenu)this.parentData.submenu.focus(!1);else{this.updateAriaExpanded("true"),this.submenuContainer=(0,Et.BC)(this.element,(0,Et.$)("div.monaco-submenu")),this.submenuContainer.classList.add("menubar-menu-items-holder","context-view");const l=getComputedStyle(this.parentData.parent.domNode),v=parseFloat(l.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 Qo(this.submenuContainer,this.submenuActions.length?this.submenuActions:[new Fs.HJ],this.submenuOptions),this.menuStyle&&this.parentData.submenu.style(this.menuStyle);const V=this.element.getBoundingClientRect(),G={top:V.top-v,left:V.left,height:V.height+2*v,width:V.width},ae=this.submenuContainer.getBoundingClientRect(),{top:me,left:Ne}=this.calculateSubmenuMenuLayout(new Et.fg(window.innerWidth,window.innerHeight),Et.fg.lift(ae),G,this.expandDirection);this.submenuContainer.style.left=`${Ne-ae.left}px`,this.submenuContainer.style.top=`${me-ae.top}px`,this.submenuDisposables.add((0,Et.ko)(this.submenuContainer,Et.Bx.KEY_UP,Ve=>{new Vi.Z(Ve).equals(15)&&(Et.fs.stop(Ve,!0),this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0))})),this.submenuDisposables.add((0,Et.ko)(this.submenuContainer,Et.Bx.KEY_DOWN,Ve=>{new Vi.Z(Ve).equals(15)&&Et.fs.stop(Ve,!0)})),this.submenuDisposables.add(this.parentData.submenu.onDidCancel(()=>{this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0)})),this.parentData.submenu.focus(r),this.mysubmenu=this.parentData.submenu}}updateAriaExpanded(r){var l;this.item&&((l=this.item)===null||l===void 0||l.setAttribute("aria-expanded",r))}applyStyle(){var r;if(super.applyStyle(),!this.menuStyle)return;const v=this.element&&this.element.classList.contains("focused")&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor;this.submenuIndicator&&(this.submenuIndicator.style.color=v?`${v}`:""),(r=this.parentData.submenu)===null||r===void 0||r.style(this.menuStyle)}dispose(){super.dispose(),this.hideScheduler.dispose(),this.mysubmenu&&(this.mysubmenu.dispose(),this.mysubmenu=null),this.submenuContainer&&(this.submenuContainer=void 0)}}class Zr extends ud.Z{style(r){this.label&&(this.label.style.borderBottomColor=r.separatorColor?`${r.separatorColor}`:"")}}function Va(ue){const r=Fa,l=r.exec(ue);if(!l)return ue;const v=!l[1];return ue.replace(r,v?"$2$3":"").trim()}function sg(ue,r){let l=` .monaco-menu { font-size: 13px; border-radius: 5px; min-width: 160px; } ${(0,Cc.U)(Pa.W6.menuSelection)} ${(0,Cc.U)(Pa.W6.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.animated .action-item.active { transform: scale(1.272019649, 1.272019649); /* 1.272019649 = \u221A\u03C6 */ } .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; } .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: .6em 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; } .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(r){l+=` /* 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 v=ue.scrollbarShadow;v&&(l+=` .monaco-scrollable-element > .shadow.top { box-shadow: ${v} 0 6px 6px -6px inset; } .monaco-scrollable-element > .shadow.left { box-shadow: ${v} 6px 0 6px -6px inset; } .monaco-scrollable-element > .shadow.top.left { box-shadow: ${v} 6px 6px 6px -6px inset; } `);const V=ue.scrollbarSliderBackground;V&&(l+=` .monaco-scrollable-element > .scrollbar > .slider { background: ${V}; } `);const G=ue.scrollbarSliderHoverBackground;G&&(l+=` .monaco-scrollable-element > .scrollbar > .slider:hover { background: ${G}; } `);const ae=ue.scrollbarSliderActiveBackground;ae&&(l+=` .monaco-scrollable-element > .scrollbar > .slider.active { background: ${ae}; } `)}return l}var Fo=f(1597);class ao{constructor(r,l,v,V,G){this.contextViewService=r,this.telemetryService=l,this.notificationService=v,this.keybindingService=V,this.themeService=G,this.focusToReturn=null,this.block=null,this.options={blockMouse:!0}}configure(r){this.options=r}showContextMenu(r){const l=r.getActions();if(!l.length)return;this.focusToReturn=document.activeElement;let v;const V=(0,Et.sb)(r.domForShadowRoot)?r.domForShadowRoot:void 0;this.contextViewService.showContextView({getAnchor:()=>r.getAnchor(),canRelayout:!1,anchorAlignment:r.anchorAlignment,anchorAxisAlignment:r.anchorAxisAlignment,render:G=>{const ae=r.getMenuClassName?r.getMenuClassName():"";ae&&(G.className+=" "+ae),this.options.blockMouse&&(this.block=G.appendChild((0,Et.$)(".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",(0,Et.ko)(this.block,Et.Bx.MOUSE_DOWN,Ve=>Ve.stopPropagation()));const me=new ce.Cm,Ne=r.actionRunner||new Fs.LN;return Ne.onBeforeRun(this.onActionRun,this,me),Ne.onDidRun(this.onDidActionRun,this,me),v=new Qo(G,l,{actionViewItemProvider:r.getActionViewItem,context:r.getActionsContext?r.getActionsContext():null,actionRunner:Ne,getKeyBinding:r.getKeyBinding?r.getKeyBinding:Ve=>this.keybindingService.lookupKeybinding(Ve.id)}),me.add((0,Fo.kg)(v,this.themeService)),v.onDidCancel(()=>this.contextViewService.hideContextView(!0),null,me),v.onDidBlur(()=>this.contextViewService.hideContextView(!0),null,me),me.add((0,Et.ko)(window,Et.Bx.BLUR,()=>this.contextViewService.hideContextView(!0))),me.add((0,Et.ko)(window,Et.Bx.MOUSE_DOWN,Ve=>{if(Ve.defaultPrevented)return;const Ge=new Oa.P(Ve);let mt=Ge.target;if(!Ge.rightButton){for(;mt;){if(mt===G)return;mt=mt.parentElement}this.contextViewService.hideContextView(!0)}})),(0,ce.qE)(me,v)},focus:()=>{v?.focus(!!r.autoSelectFirstItem)},onHide:G=>{var ae;(ae=r.onHide)===null||ae===void 0||ae.call(r,!!G),this.block&&(this.block.remove(),this.block=null),this.focusToReturn&&this.focusToReturn.focus()}},V,!!V)}onActionRun(r){this.telemetryService.publicLog2("workbenchActionExecuted",{id:r.action.id,from:"contextMenu"}),this.contextViewService.hideContextView(!1),this.focusToReturn&&this.focusToReturn.focus()}onDidActionRun(r){r.error&&!(0,pe.MB)(r.error)&&this.notificationService.error(r.error)}}var Ha=function(ue,r,l,v){var V=arguments.length,G=V<3?r:v===null?v=Object.getOwnPropertyDescriptor(r,l):v,ae;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")G=Reflect.decorate(ue,r,l,v);else for(var me=ue.length-1;me>=0;me--)(ae=ue[me])&&(G=(V<3?ae(G):V>3?ae(r,l,G):ae(r,l))||G);return V>3&&G&&Object.defineProperty(r,l,G),G},To=function(ue,r){return function(l,v){r(l,v,ue)}};let or=class extends ce.jG{constructor(r,l,v,V,G){super(),this._onDidShowContextMenu=new te.vl,this._onDidHideContextMenu=new te.vl,this.contextMenuHandler=new ao(v,r,l,V,G)}configure(r){this.contextMenuHandler.configure(r)}showContextMenu(r){this.contextMenuHandler.showContextMenu(Object.assign(Object.assign({},r),{onHide:l=>{var v;(v=r.onHide)===null||v===void 0||v.call(r,l),this._onDidHideContextMenu.fire()}})),Et.Di.getInstance().resetKeyStatus(),this._onDidShowContextMenu.fire()}};or=Ha([To(0,Ur.k),To(1,F.Ot),To(2,ms.l),To(3,Cs.b),To(4,ts.Gy)],or);var Ar=f(50180),wr;(function(ue){ue[ue.API=0]="API",ue[ue.USER=1]="USER"})(wr||(wr={}));var pa=f(54435),Sl=function(ue,r,l,v){var V=arguments.length,G=V<3?r:v===null?v=Object.getOwnPropertyDescriptor(r,l):v,ae;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")G=Reflect.decorate(ue,r,l,v);else for(var me=ue.length-1;me>=0;me--)(ae=ue[me])&&(G=(V<3?ae(G):V>3?ae(r,l,G):ae(r,l))||G);return V>3&&G&&Object.defineProperty(r,l,G),G},_a=function(ue,r){return function(l,v){r(l,v,ue)}},Sr=function(ue,r,l,v){function V(G){return G instanceof l?G:new l(function(ae){ae(G)})}return new(l||(l=Promise))(function(G,ae){function me(Ge){try{Ve(v.next(Ge))}catch(mt){ae(mt)}}function Ne(Ge){try{Ve(v.throw(Ge))}catch(mt){ae(mt)}}function Ve(Ge){Ge.done?G(Ge.value):V(Ge.value).then(me,Ne)}Ve((v=v.apply(ue,r||[])).next())})};let gd=class{constructor(r){this._commandService=r}open(r,l){return Sr(this,void 0,void 0,function*(){if(!(0,pa.v$)(r,ls.ny.command))return!1;if(!l?.allowCommands)return!0;typeof r=="string"&&(r=x.r.parse(r));let v=[];try{v=(0,Ar.q)(decodeURIComponent(r.query))}catch{try{v=(0,Ar.q)(r.query)}catch{}}return Array.isArray(v)||(v=[v]),yield this._commandService.executeCommand(r.path,...v),!0})}};gd=Sl([_a(0,Ps.wT)],gd);let fd=class{constructor(r){this._editorService=r}open(r,l){return Sr(this,void 0,void 0,function*(){typeof r=="string"&&(r=x.r.parse(r));const{selection:v,uri:V}=(0,pa.ew)(r);return r=V,r.scheme===ls.ny.file&&(r=(0,_r.Fd)(r)),yield this._editorService.openCodeEditor({resource:r,options:Object.assign({selection:v,source:l?.fromUserGesture?wr.USER:wr.API},l?.editorOptions)},this._editorService.getFocusedCodeEditor(),l?.openToSide),!0})}};fd=Sl([_a(0,D.T)],fd);let rr=class{constructor(r,l){this._openers=new Ss.w,this._validators=new Ss.w,this._resolvers=new Ss.w,this._resolvedUriTargets=new Us.fT(v=>v.with({path:null,fragment:null,query:null}).toString()),this._externalOpeners=new Ss.w,this._defaultExternalOpener={openExternal:v=>Sr(this,void 0,void 0,function*(){return(0,pa.fV)(v,ls.ny.http,ls.ny.https)?Et.jh(v):window.location.href=v,!0})},this._openers.push({open:(v,V)=>Sr(this,void 0,void 0,function*(){return V?.openExternal||(0,pa.fV)(v,ls.ny.mailto,ls.ny.http,ls.ny.https,ls.ny.vsls)?(yield this._doOpenExternal(v,V),!0):!1})}),this._openers.push(new gd(l)),this._openers.push(new fd(r))}registerOpener(r){return{dispose:this._openers.unshift(r)}}registerValidator(r){return{dispose:this._validators.push(r)}}registerExternalUriResolver(r){return{dispose:this._resolvers.push(r)}}setDefaultExternalOpener(r){this._defaultExternalOpener=r}registerExternalOpener(r){return{dispose:this._externalOpeners.push(r)}}open(r,l){var v;return Sr(this,void 0,void 0,function*(){const V=typeof r=="string"?x.r.parse(r):r,G=(v=this._resolvedUriTargets.get(V))!==null&&v!==void 0?v:r;for(const ae of this._validators)if(!(yield ae.shouldOpen(G,l)))return!1;for(const ae of this._openers)if(yield ae.open(r,l))return!0;return!1})}resolveExternalUri(r,l){return Sr(this,void 0,void 0,function*(){for(const v of this._resolvers)try{const V=yield v.resolveExternalUri(r,l);if(V)return this._resolvedUriTargets.has(V.resolved)||this._resolvedUriTargets.set(V.resolved,r),V}catch{}throw new Error("Could not resolve external URI: "+r.toString())})}_doOpenExternal(r,l){return Sr(this,void 0,void 0,function*(){const v=typeof r=="string"?x.r.parse(r):r;let V;try{V=(yield this.resolveExternalUri(v,l)).resolved}catch{V=v}let G;if(typeof r=="string"&&v.toString()===V.toString()?G=r:G=encodeURI(V.toString(!0)),l?.allowContributedOpeners){const ae=typeof l?.allowContributedOpeners=="string"?l?.allowContributedOpeners:void 0;for(const me of this._externalOpeners)if(yield me.openExternal(G,{sourceUri:v,preferredOpenerId:ae},h.X.None))return!0}return this._defaultExternalOpener.openExternal(G,{sourceUri:v},h.X.None)})}dispose(){this._validators.clear()}};rr=Sl([_a(0,D.T),_a(1,Ps.wT)],rr);var mo=f(27619),yr=f(48295),Un=f(4874),bc=function(ue,r,l,v){var V=arguments.length,G=V<3?r:v===null?v=Object.getOwnPropertyDescriptor(r,l):v,ae;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")G=Reflect.decorate(ue,r,l,v);else for(var me=ue.length-1;me>=0;me--)(ae=ue[me])&&(G=(V<3?ae(G):V>3?ae(r,l,G):ae(r,l))||G);return V>3&&G&&Object.defineProperty(r,l,G),G},yl=function(ue,r){return function(l,v){r(l,v,ue)}};class md extends ce.jG{constructor(r){super(),this.model=r,this._markersData=new Map,this._register((0,ce.s)(()=>{this.model.deltaDecorations([...this._markersData.keys()],[]),this._markersData.clear()}))}update(r,l){const v=[...this._markersData.keys()];this._markersData.clear();const V=this.model.deltaDecorations(v,l);for(let G=0;G<V.length;G++)this._markersData.set(V[G],r[G]);return v.length!==0||V.length!==0}getMarker(r){return this._markersData.get(r.id)}}let Ll=class extends ce.jG{constructor(r,l){super(),this._markerService=l,this._onDidChangeMarker=this._register(new te.vl),this._markerDecorations=new Us.fT,r.getModels().forEach(v=>this._onModelAdded(v)),this._register(r.onModelAdded(this._onModelAdded,this)),this._register(r.onModelRemoved(this._onModelRemoved,this)),this._register(this._markerService.onMarkerChanged(this._handleMarkerChange,this))}dispose(){super.dispose(),this._markerDecorations.forEach(r=>r.dispose()),this._markerDecorations.clear()}getMarker(r,l){const v=this._markerDecorations.get(r);return v&&v.getMarker(l)||null}_handleMarkerChange(r){r.forEach(l=>{const v=this._markerDecorations.get(l);v&&this._updateDecorations(v)})}_onModelAdded(r){const l=new md(r);this._markerDecorations.set(r.uri,l),this._updateDecorations(l)}_onModelRemoved(r){var l;const v=this._markerDecorations.get(r.uri);v&&(v.dispose(),this._markerDecorations.delete(r.uri)),(r.uri.scheme===ls.ny.inMemory||r.uri.scheme===ls.ny.internal||r.uri.scheme===ls.ny.vscode)&&((l=this._markerService)===null||l===void 0||l.read({resource:r.uri}).map(V=>V.owner).forEach(V=>this._markerService.remove(V,[r.uri])))}_updateDecorations(r){const l=this._markerService.read({resource:r.model.uri,take:500}),v=l.map(V=>({range:this._createDecorationRange(r.model,V),options:this._createDecorationOption(V)}));r.update(l,v)&&this._onDidChangeMarker.fire(r.model)}_createDecorationRange(r,l){let v=Q.Q.lift(l);if(l.severity===mo.cj.Hint&&!this._hasMarkerTag(l,1)&&!this._hasMarkerTag(l,2)&&(v=v.setEndPosition(v.startLineNumber,v.startColumn+2)),v=r.validateRange(v),v.isEmpty()){const V=r.getLineLastNonWhitespaceColumn(v.startLineNumber)||r.getLineMaxColumn(v.startLineNumber);if(V===1||v.endColumn>=V)return v;const G=r.getWordAtPosition(v.getStartPosition());G&&(v=new Q.Q(v.startLineNumber,G.startColumn,v.endLineNumber,G.endColumn))}else if(l.endColumn===Number.MAX_VALUE&&l.startColumn===1&&v.startLineNumber===v.endLineNumber){const V=r.getLineFirstNonWhitespaceColumn(l.startLineNumber);V<v.endColumn&&(v=new Q.Q(v.startLineNumber,V,v.endLineNumber,v.endColumn),l.startColumn=V)}return v}_createDecorationOption(r){let l,v,V,G,ae;switch(r.severity){case mo.cj.Hint:this._hasMarkerTag(r,2)?l=void 0:this._hasMarkerTag(r,1)?l="squiggly-unnecessary":l="squiggly-hint",V=0;break;case mo.cj.Warning:l="squiggly-warning",v=(0,ts.Yf)(yr.aZ),V=20,ae={color:(0,ts.Yf)(Un.uMG),position:N.R3.Inline};break;case mo.cj.Info:l="squiggly-info",v=(0,ts.Yf)(yr.AQ),V=10;break;case mo.cj.Error:default:l="squiggly-error",v=(0,ts.Yf)(yr.yI),V=30,ae={color:(0,ts.Yf)(Un.yLC),position:N.R3.Inline};break}return r.tags&&(r.tags.indexOf(1)!==-1&&(G="squiggly-inline-unnecessary"),r.tags.indexOf(2)!==-1&&(G="squiggly-inline-deprecated")),{description:"marker-decoration",stickiness:1,className:l,showIfCollapsed:!0,overviewRuler:{color:v,position:N.A5.Right},minimap:ae,zIndex:V,inlineClassName:G}}_hasMarkerTag(r,l){return r.tags?r.tags.indexOf(l)>=0:!1}};Ll=bc([yl(0,Y.S),yl(1,mo.DR)],Ll);var Rh=f(80886),og=f(40931),Ro=f(20917),za=f(50946),eo=f(53909),pd=f(91818),va=f(94901),rg=f(88723);const Lr={buttonBackground:va.Q1.fromHex("#0E639C"),buttonHoverBackground:va.Q1.fromHex("#006BB3"),buttonSeparator:va.Q1.white,buttonForeground:va.Q1.white};class Yr extends ce.jG{constructor(r,l){super(),this._onDidClick=this._register(new te.vl),this.options=l||Object.create(null),(0,Js.co)(this.options,Lr,!1),this.buttonForeground=this.options.buttonForeground,this.buttonBackground=this.options.buttonBackground,this.buttonHoverBackground=this.options.buttonHoverBackground,this.buttonSecondaryForeground=this.options.buttonSecondaryForeground,this.buttonSecondaryBackground=this.options.buttonSecondaryBackground,this.buttonSecondaryHoverBackground=this.options.buttonSecondaryHoverBackground,this.buttonBorder=this.options.buttonBorder,this._element=document.createElement("a"),this._element.classList.add("monaco-button"),this._element.tabIndex=0,this._element.setAttribute("role","button"),r.appendChild(this._element),this._register(ma.q.addTarget(this._element)),[Et.Bx.CLICK,ma.B.Tap].forEach(v=>{this._register((0,Et.ko)(this._element,v,V=>{if(!this.enabled){Et.fs.stop(V);return}this._onDidClick.fire(V)}))}),this._register((0,Et.ko)(this._element,Et.Bx.KEY_DOWN,v=>{const V=new Vi.Z(v);let G=!1;this.enabled&&(V.equals(3)||V.equals(10))?(this._onDidClick.fire(v),G=!0):V.equals(9)&&(this._element.blur(),G=!0),G&&Et.fs.stop(V,!0)})),this._register((0,Et.ko)(this._element,Et.Bx.MOUSE_OVER,v=>{this._element.classList.contains("disabled")||this.setHoverBackground()})),this._register((0,Et.ko)(this._element,Et.Bx.MOUSE_OUT,v=>{this.applyStyles()})),this.focusTracker=this._register((0,Et.w5)(this._element)),this._register(this.focusTracker.onDidFocus(()=>{this.enabled&&this.setHoverBackground()})),this._register(this.focusTracker.onDidBlur(()=>{this.enabled&&this.applyStyles()})),this.applyStyles()}get onDidClick(){return this._onDidClick.event}setHoverBackground(){let r;this.options.secondary?r=this.buttonSecondaryHoverBackground?this.buttonSecondaryHoverBackground.toString():null:r=this.buttonHoverBackground?this.buttonHoverBackground.toString():null,r&&(this._element.style.backgroundColor=r)}style(r){this.buttonForeground=r.buttonForeground,this.buttonBackground=r.buttonBackground,this.buttonHoverBackground=r.buttonHoverBackground,this.buttonSecondaryForeground=r.buttonSecondaryForeground,this.buttonSecondaryBackground=r.buttonSecondaryBackground,this.buttonSecondaryHoverBackground=r.buttonSecondaryHoverBackground,this.buttonBorder=r.buttonBorder,this.applyStyles()}applyStyles(){if(this._element){let r,l;this.options.secondary?(l=this.buttonSecondaryForeground?this.buttonSecondaryForeground.toString():"",r=this.buttonSecondaryBackground?this.buttonSecondaryBackground.toString():""):(l=this.buttonForeground?this.buttonForeground.toString():"",r=this.buttonBackground?this.buttonBackground.toString():"");const v=this.buttonBorder?this.buttonBorder.toString():"";this._element.style.color=l,this._element.style.backgroundColor=r,this._element.style.borderWidth=v?"1px":"",this._element.style.borderStyle=v?"solid":"",this._element.style.borderColor=v}}get element(){return this._element}set label(r){this._element.classList.add("monaco-text-button"),this.options.supportIcons?(0,Et.Ln)(this._element,...(0,pd.n)(r)):this._element.textContent=r,typeof this.options.title=="string"?this._element.title=this.options.title:this.options.title&&(this._element.title=r)}set enabled(r){r?(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")}}var Dl=f(49233),wc=f(86529);const Ua="done",kl="active",El="infinite",xl="infinite-long-running",lo="discrete",ja={progressBarBackground:va.Q1.fromHex("#0E70C0")};class Il extends ce.jG{constructor(r,l){super(),this.options=l||Object.create(null),(0,Js.co)(this.options,ja,!1),this.workedVal=0,this.progressBarBackground=this.options.progressBarBackground,this.showDelayedScheduler=this._register(new ee.uC(()=>(0,Et.WU)(this.element),0)),this.longRunningScheduler=this._register(new ee.uC(()=>this.infiniteLongRunning(),Il.LONG_RUNNING_INFINITE_THRESHOLD)),this.create(r)}create(r){this.element=document.createElement("div"),this.element.classList.add("monaco-progress-container"),this.element.setAttribute("role","progressbar"),this.element.setAttribute("aria-valuemin","0"),r.appendChild(this.element),this.bit=document.createElement("div"),this.bit.classList.add("progress-bit"),this.element.appendChild(this.bit),this.applyStyles()}off(){this.bit.style.width="inherit",this.bit.style.opacity="1",this.element.classList.remove(kl,El,xl,lo),this.workedVal=0,this.totalWork=void 0,this.longRunningScheduler.cancel()}stop(){return this.doDone(!1)}doDone(r){return this.element.classList.add(Ua),this.element.classList.contains(El)?(this.bit.style.opacity="0",r?setTimeout(()=>this.off(),200):this.off()):(this.bit.style.width="inherit",r?setTimeout(()=>this.off(),200):this.off()),this}infinite(){return this.bit.style.width="2%",this.bit.style.opacity="1",this.element.classList.remove(lo,Ua,xl),this.element.classList.add(kl,El),this.longRunningScheduler.schedule(),this}infiniteLongRunning(){this.element.classList.add(xl)}getContainer(){return this.element}style(r){this.progressBarBackground=r.progressBarBackground,this.applyStyles()}applyStyles(){if(this.bit){const r=this.progressBarBackground?this.progressBarBackground.toString():"";this.bit.style.backgroundColor=r}}}Il.LONG_RUNNING_INFINITE_THRESHOLD=1e4;var Ah=f(94664),Ka=f(1620);const _d={},Sc=new Ah.n("quick-input-button-icon-");function Nl(ue){if(!ue)return;let r;const l=ue.dark.toString();return _d[l]?r=_d[l]:(r=Sc.nextId(),Et.Wt(`.${r}, .hc-light .${r}`,`background-image: ${Et.Tf(ue.light||ue.dark)}`),Et.Wt(`.vs-dark .${r}, .hc-black .${r}`,`background-image: ${Et.Tf(ue.dark)}`),_d[l]=r),r}var Je=f(32802),n=f(29004);const a=Et.$;class g extends ce.jG{constructor(r){super(),this.parent=r,this.onKeyDown=l=>Et.ko(this.inputBox.inputElement,Et.Bx.KEY_DOWN,v=>{l(new Vi.Z(v))}),this.onMouseDown=l=>Et.ko(this.inputBox.inputElement,Et.Bx.MOUSE_DOWN,v=>{l(new Oa.P(v))}),this.onDidChange=l=>this.inputBox.onDidChange(l),this.container=Et.BC(this.parent,a(".quick-input-box")),this.inputBox=this._register(new n.c(this.container,void 0))}get value(){return this.inputBox.value}set value(r){this.inputBox.value=r}select(r=null){this.inputBox.select(r)}isSelectionAtEnd(){return this.inputBox.isSelectionAtEnd()}get placeholder(){return this.inputBox.inputElement.getAttribute("placeholder")||""}set placeholder(r){this.inputBox.setPlaceHolder(r)}get ariaLabel(){return this.inputBox.getAriaLabel()}set ariaLabel(r){this.inputBox.setAriaLabel(r)}get password(){return this.inputBox.inputElement.type==="password"}set password(r){this.inputBox.inputElement.type=r?"password":"text"}setAttribute(r,l){this.inputBox.inputElement.setAttribute(r,l)}removeAttribute(r){this.inputBox.inputElement.removeAttribute(r)}showDecoration(r){r===M.A.Ignore?this.inputBox.hideMessage():this.inputBox.showMessage({type:r===M.A.Info?1:r===M.A.Warning?2:3,content:""})}stylesForType(r){return this.inputBox.stylesForType(r===M.A.Info?1:r===M.A.Warning?2:3)}setFocus(){this.inputBox.focus()}layout(){this.inputBox.layout()}style(r){this.inputBox.style(r)}}var E=f(84431),R=f(83005);const ne=Et.$;class _e{constructor(r,l,v){this.os=l,this.keyElements=new Set,this.options=v||Object.create(null),this.labelBackground=this.options.keybindingLabelBackground,this.labelForeground=this.options.keybindingLabelForeground,this.labelBorder=this.options.keybindingLabelBorder,this.labelBottomBorder=this.options.keybindingLabelBottomBorder,this.labelShadow=this.options.keybindingLabelShadow,this.domNode=Et.BC(r,ne(".monaco-keybinding")),this.didEverRender=!1,r.appendChild(this.domNode)}get element(){return this.domNode}set(r,l){this.didEverRender&&this.keybinding===r&&_e.areSame(this.matches,l)||(this.keybinding=r,this.matches=l,this.render())}render(){if(this.clear(),this.keybinding){const[r,l]=this.keybinding.getParts();r&&this.renderPart(this.domNode,r,this.matches?this.matches.firstPart:null),l&&(Et.BC(this.domNode,ne("span.monaco-keybinding-key-chord-separator",void 0," ")),this.renderPart(this.domNode,l,this.matches?this.matches.chordPart:null)),this.domNode.title=this.keybinding.getAriaLabel()||""}else this.options&&this.options.renderUnboundKeybindings&&this.renderUnbound(this.domNode);this.applyStyles(),this.didEverRender=!0}clear(){Et.w_(this.domNode),this.keyElements.clear()}renderPart(r,l,v){const V=Qs.Of.modifierLabels[this.os];l.ctrlKey&&this.renderKey(r,V.ctrlKey,!!v?.ctrlKey,V.separator),l.shiftKey&&this.renderKey(r,V.shiftKey,!!v?.shiftKey,V.separator),l.altKey&&this.renderKey(r,V.altKey,!!v?.altKey,V.separator),l.metaKey&&this.renderKey(r,V.metaKey,!!v?.metaKey,V.separator);const G=l.keyLabel;G&&this.renderKey(r,G,!!v?.keyCode,"")}renderKey(r,l,v,V){Et.BC(r,this.createKeyElement(l,v?".highlight":"")),V&&Et.BC(r,ne("span.monaco-keybinding-key-separator",void 0,V))}renderUnbound(r){Et.BC(r,this.createKeyElement((0,q.kg)("unbound","Unbound")))}createKeyElement(r,l=""){const v=ne("span.monaco-keybinding-key"+l,void 0,r);return this.keyElements.add(v),v}style(r){this.labelBackground=r.keybindingLabelBackground,this.labelForeground=r.keybindingLabelForeground,this.labelBorder=r.keybindingLabelBorder,this.labelBottomBorder=r.keybindingLabelBottomBorder,this.labelShadow=r.keybindingLabelShadow,this.applyStyles()}applyStyles(){var r;if(this.element){for(const l of this.keyElements)this.labelBackground&&(l.style.backgroundColor=(r=this.labelBackground)===null||r===void 0?void 0:r.toString()),this.labelBorder&&(l.style.borderColor=this.labelBorder.toString()),this.labelBottomBorder&&(l.style.borderBottomColor=this.labelBottomBorder.toString()),this.labelShadow&&(l.style.boxShadow=`inset 0 -1px 0 ${this.labelShadow}`);this.labelForeground&&(this.element.style.color=this.labelForeground.toString())}}static areSame(r,l){return r===l||!r&&!l?!0:!!r&&!!l&&(0,Js.aI)(r.firstPart,l.firstPart)&&(0,Js.aI)(r.chordPart,l.chordPart)}}const Le=new ee.kb(()=>{const ue=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});return{collator:ue,collatorIsNumeric:ue.resolvedOptions().numeric}}),ke=new ee.kb(()=>({collator:new Intl.Collator(void 0,{numeric:!0})})),Ae=new ee.kb(()=>({collator:new Intl.Collator(void 0,{numeric:!0,sensitivity:"accent"})}));function je(ue,r,l=!1){const v=ue||"",V=r||"",G=Le.value.collator.compare(v,V);return Le.value.collatorIsNumeric&&G===0&&v!==V?v<V?-1:1:G}function Xe(ue,r,l){const v=ue.toLowerCase(),V=r.toLowerCase(),G=it(ue,r,l);if(G)return G;const ae=v.endsWith(l),me=V.endsWith(l);if(ae!==me)return ae?-1:1;const Ne=je(v,V);return Ne!==0?Ne:v.localeCompare(V)}function it(ue,r,l){const v=ue.toLowerCase(),V=r.toLowerCase(),G=v.startsWith(l),ae=V.startsWith(l);if(G!==ae)return G?-1:1;if(G&&ae){if(v.length<V.length)return-1;if(v.length>V.length)return 1}return 0}var yt=f(88846),Nt=function(ue,r,l,v){var V=arguments.length,G=V<3?r:v===null?v=Object.getOwnPropertyDescriptor(r,l):v,ae;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")G=Reflect.decorate(ue,r,l,v);else for(var me=ue.length-1;me>=0;me--)(ae=ue[me])&&(G=(V<3?ae(G):V>3?ae(r,l,G):ae(r,l))||G);return V>3&&G&&Object.defineProperty(r,l,G),G},Ft=function(ue,r,l,v){function V(G){return G instanceof l?G:new l(function(ae){ae(G)})}return new(l||(l=Promise))(function(G,ae){function me(Ge){try{Ve(v.next(Ge))}catch(mt){ae(mt)}}function Ne(Ge){try{Ve(v.throw(Ge))}catch(mt){ae(mt)}}function Ve(Ge){Ge.done?G(Ge.value):V(Ge.value).then(me,Ne)}Ve((v=v.apply(ue,r||[])).next())})};const Ut=Et.$;class ui{constructor(r){this.hidden=!1,this._onChecked=new te.vl,this.onChecked=this._onChecked.event,Object.assign(this,r)}get checked(){return!!this._checked}set checked(r){r!==this._checked&&(this._checked=r,this._onChecked.fire(r))}dispose(){this._onChecked.dispose()}}class qt{get templateId(){return qt.ID}renderTemplate(r){const l=Object.create(null);l.toDisposeElement=[],l.toDisposeTemplate=[],l.entry=Et.BC(r,Ut(".quick-input-list-entry"));const v=Et.BC(l.entry,Ut("label.quick-input-list-label"));l.toDisposeTemplate.push(Et.b2(v,Et.Bx.CLICK,Ve=>{l.checkbox.offsetParent||Ve.preventDefault()})),l.checkbox=Et.BC(v,Ut("input.quick-input-list-checkbox")),l.checkbox.type="checkbox",l.toDisposeTemplate.push(Et.b2(l.checkbox,Et.Bx.CHANGE,Ve=>{l.element.checked=l.checkbox.checked}));const V=Et.BC(v,Ut(".quick-input-list-rows")),G=Et.BC(V,Ut(".quick-input-list-row")),ae=Et.BC(V,Ut(".quick-input-list-row"));l.label=new E.s(G,{supportHighlights:!0,supportDescriptionHighlights:!0,supportIcons:!0});const me=Et.BC(G,Ut(".quick-input-list-entry-keybinding"));l.keybinding=new _e(me,ge.OS);const Ne=Et.BC(ae,Ut(".quick-input-list-label-meta"));return l.detail=new E.s(Ne,{supportHighlights:!0,supportIcons:!0}),l.separator=Et.BC(l.entry,Ut(".quick-input-list-separator")),l.actionBar=new vl.E(l.entry),l.actionBar.domNode.classList.add("quick-input-list-entry-action-bar"),l.toDisposeTemplate.push(l.actionBar),l}renderElement(r,l,v){v.toDisposeElement=(0,ce.AS)(v.toDisposeElement),v.element=r,v.checkbox.checked=r.checked,v.toDisposeElement.push(r.onChecked(Ve=>v.checkbox.checked=Ve));const{labelHighlights:V,descriptionHighlights:G,detailHighlights:ae}=r,me=Object.create(null);me.matches=V||[],me.descriptionTitle=r.saneDescription,me.descriptionMatches=G||[],me.extraClasses=r.item.iconClasses,me.italic=r.item.italic,me.strikethrough=r.item.strikethrough,v.label.setLabel(r.saneLabel,r.saneDescription,me),v.keybinding.set(r.item.keybinding),r.saneDetail&&v.detail.setLabel(r.saneDetail,void 0,{matches:ae,title:r.saneDetail}),r.separator&&r.separator.label?(v.separator.textContent=r.separator.label,v.separator.style.display=""):v.separator.style.display="none",v.entry.classList.toggle("quick-input-list-separator-border",!!r.separator),v.actionBar.clear();const Ne=r.item.buttons;Ne&&Ne.length?(v.actionBar.push(Ne.map((Ve,Ge)=>{let mt=Ve.iconClass||(Ve.iconPath?Nl(Ve.iconPath):void 0);Ve.alwaysVisible&&(mt=mt?`${mt} always-visible`:"always-visible");const ti=new Fs.rc(`id-${Ge}`,"",mt,!0,()=>Ft(this,void 0,void 0,function*(){r.fireButtonTriggered({button:Ve,item:r.item})}));return ti.tooltip=Ve.tooltip||"",ti}),{icon:!0,label:!1}),v.entry.classList.add("has-actions")):v.entry.classList.remove("has-actions")}disposeElement(r,l,v){v.toDisposeElement=(0,ce.AS)(v.toDisposeElement)}disposeTemplate(r){r.toDisposeElement=(0,ce.AS)(r.toDisposeElement),r.toDisposeTemplate=(0,ce.AS)(r.toDisposeTemplate)}}qt.ID="listelement";class ji{getHeight(r){return r.saneDetail?44:22}getTemplateId(r){return qt.ID}}var li;(function(ue){ue[ue.First=1]="First",ue[ue.Second=2]="Second",ue[ue.Last=3]="Last",ue[ue.Next=4]="Next",ue[ue.Previous=5]="Previous",ue[ue.NextPage=6]="NextPage",ue[ue.PreviousPage=7]="PreviousPage"})(li||(li={}));class en{constructor(r,l,v){this.parent=r,this.inputElements=[],this.elements=[],this.elementsToIndexes=new Map,this.matchOnDescription=!1,this.matchOnDetail=!1,this.matchOnLabel=!0,this.matchOnLabelMode="fuzzy",this.matchOnMeta=!0,this.sortByLabel=!0,this._onChangedAllVisibleChecked=new te.vl,this.onChangedAllVisibleChecked=this._onChangedAllVisibleChecked.event,this._onChangedCheckedCount=new te.vl,this.onChangedCheckedCount=this._onChangedCheckedCount.event,this._onChangedVisibleCount=new te.vl,this.onChangedVisibleCount=this._onChangedVisibleCount.event,this._onChangedCheckedElements=new te.vl,this.onChangedCheckedElements=this._onChangedCheckedElements.event,this._onButtonTriggered=new te.vl,this.onButtonTriggered=this._onButtonTriggered.event,this._onKeyDown=new te.vl,this.onKeyDown=this._onKeyDown.event,this._onLeave=new te.vl,this.onLeave=this._onLeave.event,this._fireCheckedEvents=!0,this.elementDisposables=[],this.disposables=[],this.id=l,this.container=Et.BC(this.parent,Ut(".quick-input-list"));const V=new ji,G=new Kn;this.list=v.createList("QuickInput",this.container,V,[new qt],{identityProvider:{getId:ae=>ae.saneLabel},setRowLineHeight:!1,multipleSelectionSupport:!1,horizontalScrolling:!1,accessibilityProvider:G}),this.list.getHTMLElement().id=l,this.disposables.push(this.list),this.disposables.push(this.list.onKeyDown(ae=>{const me=new Vi.Z(ae);switch(me.keyCode){case 10:this.toggleCheckbox();break;case 31:(ge.zx?ae.metaKey:ae.ctrlKey)&&this.list.setFocus((0,Ct.y1)(this.list.length));break;case 16:{const Ne=this.list.getFocus();Ne.length===1&&Ne[0]===0&&this._onLeave.fire();break}case 18:{const Ne=this.list.getFocus();Ne.length===1&&Ne[0]===this.list.length-1&&this._onLeave.fire();break}}this._onKeyDown.fire(me)})),this.disposables.push(this.list.onMouseDown(ae=>{ae.browserEvent.button!==2&&ae.browserEvent.preventDefault()})),this.disposables.push(Et.ko(this.container,Et.Bx.CLICK,ae=>{(ae.x||ae.y)&&this._onLeave.fire()})),this.disposables.push(this.list.onMouseMiddleClick(ae=>{this._onLeave.fire()})),this.disposables.push(this.list.onContextMenu(ae=>{typeof ae.index=="number"&&(ae.browserEvent.preventDefault(),this.list.setSelection([ae.index]))})),this.disposables.push(this._onChangedAllVisibleChecked,this._onChangedCheckedCount,this._onChangedVisibleCount,this._onChangedCheckedElements,this._onButtonTriggered,this._onLeave,this._onKeyDown)}get onDidChangeFocus(){return te.Jh.map(this.list.onDidChangeFocus,r=>r.elements.map(l=>l.item))}get onDidChangeSelection(){return te.Jh.map(this.list.onDidChangeSelection,r=>({items:r.elements.map(l=>l.item),event:r.browserEvent}))}get scrollTop(){return this.list.scrollTop}set scrollTop(r){this.list.scrollTop=r}getAllVisibleChecked(){return this.allVisibleChecked(this.elements,!1)}allVisibleChecked(r,l=!0){for(let v=0,V=r.length;v<V;v++){const G=r[v];if(!G.hidden)if(G.checked)l=!0;else return!1}return l}getCheckedCount(){let r=0;const l=this.elements;for(let v=0,V=l.length;v<V;v++)l[v].checked&&r++;return r}getVisibleCount(){let r=0;const l=this.elements;for(let v=0,V=l.length;v<V;v++)l[v].hidden||r++;return r}setAllVisibleChecked(r){try{this._fireCheckedEvents=!1,this.elements.forEach(l=>{l.hidden||(l.checked=r)})}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}setElements(r){this.elementDisposables=(0,ce.AS)(this.elementDisposables);const l=v=>this.fireButtonTriggered(v);this.inputElements=r,this.elements=r.reduce((v,V,G)=>{var ae,me,Ne;if(V.type!=="separator"){const Ve=G&&r[G-1],Ge=V.label&&V.label.replace(/\r?\n/g," "),mt=(0,Hs._k)(Ge).text.trim(),ti=V.meta&&V.meta.replace(/\r?\n/g," "),Si=V.description&&V.description.replace(/\r?\n/g," "),tn=V.detail&&V.detail.replace(/\r?\n/g," "),kn=V.ariaLabel||[Ge,Si,tn].map(as=>(0,Pa.R$)(as)).filter(as=>!!as).join(", "),On=this.parent.classList.contains("show-checkboxes");v.push(new ui({hasCheckbox:On,index:G,item:V,saneLabel:Ge,saneSortLabel:mt,saneMeta:ti,saneAriaLabel:kn,saneDescription:Si,saneDetail:tn,labelHighlights:(ae=V.highlights)===null||ae===void 0?void 0:ae.label,descriptionHighlights:(me=V.highlights)===null||me===void 0?void 0:me.description,detailHighlights:(Ne=V.highlights)===null||Ne===void 0?void 0:Ne.detail,checked:!1,separator:Ve&&Ve.type==="separator"?Ve:void 0,fireButtonTriggered:l}))}return v},[]),this.elementDisposables.push(...this.elements),this.elementDisposables.push(...this.elements.map(v=>v.onChecked(()=>this.fireCheckedEvents()))),this.elementsToIndexes=this.elements.reduce((v,V,G)=>(v.set(V.item,G),v),new Map),this.list.splice(0,this.list.length),this.list.splice(0,this.list.length,this.elements),this._onChangedVisibleCount.fire(this.elements.length)}getFocusedElements(){return this.list.getFocusedElements().map(r=>r.item)}setFocusedElements(r){if(this.list.setFocus(r.filter(l=>this.elementsToIndexes.has(l)).map(l=>this.elementsToIndexes.get(l))),r.length>0){const l=this.list.getFocus()[0];typeof l=="number"&&this.list.reveal(l)}}getActiveDescendant(){return this.list.getHTMLElement().getAttribute("aria-activedescendant")}setSelectedElements(r){this.list.setSelection(r.filter(l=>this.elementsToIndexes.has(l)).map(l=>this.elementsToIndexes.get(l)))}getCheckedElements(){return this.elements.filter(r=>r.checked).map(r=>r.item)}setCheckedElements(r){try{this._fireCheckedEvents=!1;const l=new Set;for(const v of r)l.add(v);for(const v of this.elements)v.checked=l.has(v.item)}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}set enabled(r){this.list.getHTMLElement().style.pointerEvents=r?"":"none"}focus(r){if(!this.list.length)return;switch(r===li.Next&&this.list.getFocus()[0]===this.list.length-1&&(r=li.First),r===li.Previous&&this.list.getFocus()[0]===0&&(r=li.Last),r===li.Second&&this.list.length<2&&(r=li.First),r){case li.First:this.list.focusFirst();break;case li.Second:this.list.focusNth(1);break;case li.Last:this.list.focusLast();break;case li.Next:this.list.focusNext();break;case li.Previous:this.list.focusPrevious();break;case li.NextPage:this.list.focusNextPage();break;case li.PreviousPage:this.list.focusPreviousPage();break}const l=this.list.getFocus()[0];typeof l=="number"&&this.list.reveal(l)}clearFocus(){this.list.setFocus([])}domFocus(){this.list.domFocus()}layout(r){this.list.getHTMLElement().style.maxHeight=r?`calc(${Math.floor(r/44)*44}px)`:"",this.list.layout()}filter(r){if(!(this.sortByLabel||this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))return this.list.layout(),!1;const l=r;if(r=r.trim(),!r||!(this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))this.elements.forEach(V=>{V.labelHighlights=void 0,V.descriptionHighlights=void 0,V.detailHighlights=void 0,V.hidden=!1;const G=V.index&&this.inputElements[V.index-1];V.separator=G&&G.type==="separator"?G:void 0});else{let V;this.elements.forEach(G=>{let ae;this.matchOnLabelMode==="fuzzy"?ae=this.matchOnLabel?(0,fe.UH)((0,Hs.pz)(r,(0,Hs._k)(G.saneLabel))):void 0:ae=this.matchOnLabel?(0,fe.UH)(Xi(l,(0,Hs._k)(G.saneLabel))):void 0;const me=this.matchOnDescription?(0,fe.UH)((0,Hs.pz)(r,(0,Hs._k)(G.saneDescription||""))):void 0,Ne=this.matchOnDetail?(0,fe.UH)((0,Hs.pz)(r,(0,Hs._k)(G.saneDetail||""))):void 0,Ve=this.matchOnMeta?(0,fe.UH)((0,Hs.pz)(r,(0,Hs._k)(G.saneMeta||""))):void 0;if(ae||me||Ne||Ve?(G.labelHighlights=ae,G.descriptionHighlights=me,G.detailHighlights=Ne,G.hidden=!1):(G.labelHighlights=void 0,G.descriptionHighlights=void 0,G.detailHighlights=void 0,G.hidden=!G.item.alwaysShow),G.separator=void 0,!this.sortByLabel){const Ge=G.index&&this.inputElements[G.index-1];V=Ge&&Ge.type==="separator"?Ge:V,V&&!G.hidden&&(G.separator=V,V=void 0)}})}const v=this.elements.filter(V=>!V.hidden);if(this.sortByLabel&&r){const V=r.toLowerCase();v.sort((G,ae)=>on(G,ae,V))}return this.elementsToIndexes=v.reduce((V,G,ae)=>(V.set(G.item,ae),V),new Map),this.list.splice(0,this.list.length,v),this.list.setFocus([]),this.list.layout(),this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedVisibleCount.fire(v.length),!0}toggleCheckbox(){try{this._fireCheckedEvents=!1;const r=this.list.getFocusedElements(),l=this.allVisibleChecked(r);for(const v of r)v.checked=!l}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}display(r){this.container.style.display=r?"":"none"}isDisplayed(){return this.container.style.display!=="none"}dispose(){this.elementDisposables=(0,ce.AS)(this.elementDisposables),this.disposables=(0,ce.AS)(this.disposables)}fireCheckedEvents(){this._fireCheckedEvents&&(this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedCheckedCount.fire(this.getCheckedCount()),this._onChangedCheckedElements.fire(this.getCheckedElements()))}fireButtonTriggered(r){this._onButtonTriggered.fire(r)}style(r){this.list.style(r)}}Nt([yt.B],en.prototype,"onDidChangeFocus",null),Nt([yt.B],en.prototype,"onDidChangeSelection",null);function Xi(ue,r){const{text:l,iconOffsets:v}=r;if(!v||v.length===0)return Hi(ue,l);const V=(0,d.NB)(l," "),G=l.length-V.length,ae=Hi(ue,V);if(ae)for(const me of ae){const Ne=v[me.start+G]+G;me.start+=Ne,me.end+=Ne}return ae}function Hi(ue,r){const l=r.toLowerCase().indexOf(ue.toLowerCase());return l!==-1?[{start:l,end:l+ue.length}]:null}function on(ue,r,l){const v=ue.labelHighlights||[],V=r.labelHighlights||[];return v.length&&!V.length?-1:!v.length&&V.length?1:v.length===0&&V.length===0?0:Xe(ue.saneSortLabel,r.saneSortLabel,l)}class Kn{getWidgetAriaLabel(){return(0,q.kg)("quickInput","Quick Input")}getAriaLabel(r){var l;return!((l=r.separator)===null||l===void 0)&&l.label?`${r.saneAriaLabel}, ${r.separator.label}`:r.saneAriaLabel}getWidgetRole(){return"listbox"}getRole(r){return r.hasCheckbox?"checkbox":"option"}isChecked(r){if(r.hasCheckbox)return{value:r.checked,onDidChange:r.onChecked}}}var Qi=function(ue,r,l,v){function V(G){return G instanceof l?G:new l(function(ae){ae(G)})}return new(l||(l=Promise))(function(G,ae){function me(Ge){try{Ve(v.next(Ge))}catch(mt){ae(mt)}}function Ne(Ge){try{Ve(v.throw(Ge))}catch(mt){ae(mt)}}function Ve(Ge){Ge.done?G(Ge.value):V(Ge.value).then(me,Ne)}Ve((v=v.apply(ue,r||[])).next())})};const Vn=Et.$,gs={iconClass:Pa.W6.quickInputBack.classNames,tooltip:(0,q.kg)("quickInput.back","Back"),handle:-1};class ys extends ce.jG{constructor(r){super(),this.ui=r,this.visible=!1,this._enabled=!0,this._busy=!1,this._ignoreFocusOut=!1,this._buttons=[],this.noValidationMessage=ys.noPromptMessage,this._severity=M.A.Ignore,this.buttonsUpdated=!1,this.onDidTriggerButtonEmitter=this._register(new te.vl),this.onDidHideEmitter=this._register(new te.vl),this.onDisposeEmitter=this._register(new te.vl),this.visibleDisposables=this._register(new ce.Cm),this.onDidHide=this.onDidHideEmitter.event}get title(){return this._title}set title(r){this._title=r,this.update()}get description(){return this._description}set description(r){this._description=r,this.update()}get step(){return this._steps}set step(r){this._steps=r,this.update()}get totalSteps(){return this._totalSteps}set totalSteps(r){this._totalSteps=r,this.update()}get enabled(){return this._enabled}set enabled(r){this._enabled=r,this.update()}get contextKey(){return this._contextKey}set contextKey(r){this._contextKey=r,this.update()}get busy(){return this._busy}set busy(r){this._busy=r,this.update()}get ignoreFocusOut(){return this._ignoreFocusOut}set ignoreFocusOut(r){const l=this._ignoreFocusOut!==r&&!ge.un;this._ignoreFocusOut=r&&!ge.un,l&&this.update()}get buttons(){return this._buttons}set buttons(r){this._buttons=r,this.buttonsUpdated=!0,this.update()}get validationMessage(){return this._validationMessage}set validationMessage(r){this._validationMessage=r,this.update()}get severity(){return this._severity}set severity(r){this._severity=r,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.onDidTriggerButton(r=>{this.buttons.indexOf(r)!==-1&&this.onDidTriggerButtonEmitter.fire(r)})),this.ui.show(this),this.visible=!0,this._lastValidationMessage=void 0,this._lastSeverity=void 0,this.buttons.length&&(this.buttonsUpdated=!0),this.update())}hide(){this.visible&&this.ui.hide()}didHide(r=Je.kF.Other){this.visible=!1,this.visibleDisposables.clear(),this.onDidHideEmitter.fire({reason:r})}update(){if(!this.visible)return;const r=this.getTitle();r&&this.ui.title.textContent!==r?this.ui.title.textContent=r:!r&&this.ui.title.innerHTML!==" "&&(this.ui.title.innerText="\xA0");const l=this.getDescription();if(this.ui.description1.textContent!==l&&(this.ui.description1.textContent=l),this.ui.description2.textContent!==l&&(this.ui.description2.textContent=l),this.busy&&!this.busyDelay&&(this.busyDelay=new ee.pc,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 V=this.buttons.filter(ae=>ae===gs);this.ui.leftActionBar.push(V.map((ae,me)=>{const Ne=new Fs.rc(`id-${me}`,"",ae.iconClass||Nl(ae.iconPath),!0,()=>Qi(this,void 0,void 0,function*(){this.onDidTriggerButtonEmitter.fire(ae)}));return Ne.tooltip=ae.tooltip||"",Ne}),{icon:!0,label:!1}),this.ui.rightActionBar.clear();const G=this.buttons.filter(ae=>ae!==gs);this.ui.rightActionBar.push(G.map((ae,me)=>{const Ne=new Fs.rc(`id-${me}`,"",ae.iconClass||Nl(ae.iconPath),!0,()=>Qi(this,void 0,void 0,function*(){this.onDidTriggerButtonEmitter.fire(ae)}));return Ne.tooltip=ae.tooltip||"",Ne}),{icon:!0,label:!1})}this.ui.ignoreFocusOut=this.ignoreFocusOut,this.ui.setEnabled(this.enabled),this.ui.setContextKey(this.contextKey);const v=this.validationMessage||this.noValidationMessage;this._lastValidationMessage!==v&&(this._lastValidationMessage=v,Et.Ln(this.ui.message,...(0,pd.n)(v))),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?(0,q.kg)("quickInput.steps","{0}/{1}",this.step,this.totalSteps):this.step?String(this.step):""}showMessageDecoration(r){if(this.ui.inputBox.showDecoration(r),r!==M.A.Ignore){const l=this.ui.inputBox.stylesForType(r);this.ui.message.style.color=l.foreground?`${l.foreground}`:"",this.ui.message.style.backgroundColor=l.background?`${l.background}`:"",this.ui.message.style.border=l.border?`1px solid ${l.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()}}ys.noPromptMessage=(0,q.kg)("inputModeEntry","Press 'Enter' to confirm your input or 'Escape' to cancel");class Hn extends ys{constructor(){super(...arguments),this._value="",this.onDidChangeValueEmitter=this._register(new te.vl),this.onWillAcceptEmitter=this._register(new te.vl),this.onDidAcceptEmitter=this._register(new te.vl),this.onDidCustomEmitter=this._register(new te.vl),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._autoFocusOnList=!0,this._keepScrollPosition=!1,this._itemActivation=this.ui.isScreenReaderOptimized()?Je.C1.NONE:Je.C1.FIRST,this._activeItems=[],this.activeItemsUpdated=!1,this.activeItemsToConfirm=[],this.onDidChangeActiveEmitter=this._register(new te.vl),this._selectedItems=[],this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=[],this.onDidChangeSelectionEmitter=this._register(new te.vl),this.onDidTriggerItemButtonEmitter=this._register(new te.vl),this.valueSelectionUpdated=!0,this._ok="default",this._customButton=!1,this.filterValue=r=>r,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}get quickNavigate(){return this._quickNavigate}set quickNavigate(r){this._quickNavigate=r,this.update()}get value(){return this._value}set value(r){this.doSetValue(r)}doSetValue(r,l){this._value!==r&&(this._value=r,l||this.update(),this.visible&&this.ui.list.filter(this.filterValue(this._value))&&this.trySelectFirst(),this.onDidChangeValueEmitter.fire(this._value))}set ariaLabel(r){this._ariaLabel=r,this.update()}get ariaLabel(){return this._ariaLabel}get placeholder(){return this._placeholder}set placeholder(r){this._placeholder=r,this.update()}get items(){return this._items}get scrollTop(){return this.ui.list.scrollTop}set scrollTop(r){this.ui.list.scrollTop=r}set items(r){this._items=r,this.itemsUpdated=!0,this.update()}get canSelectMany(){return this._canSelectMany}set canSelectMany(r){this._canSelectMany=r,this.update()}get canAcceptInBackground(){return this._canAcceptInBackground}set canAcceptInBackground(r){this._canAcceptInBackground=r}get matchOnDescription(){return this._matchOnDescription}set matchOnDescription(r){this._matchOnDescription=r,this.update()}get matchOnDetail(){return this._matchOnDetail}set matchOnDetail(r){this._matchOnDetail=r,this.update()}get matchOnLabel(){return this._matchOnLabel}set matchOnLabel(r){this._matchOnLabel=r,this.update()}get matchOnLabelMode(){return this._matchOnLabelMode}set matchOnLabelMode(r){this._matchOnLabelMode=r,this.update()}get sortByLabel(){return this._sortByLabel}set sortByLabel(r){this._sortByLabel=r,this.update()}get autoFocusOnList(){return this._autoFocusOnList}set autoFocusOnList(r){this._autoFocusOnList=r,this.update()}get keepScrollPosition(){return this._keepScrollPosition}set keepScrollPosition(r){this._keepScrollPosition=r}get itemActivation(){return this._itemActivation}set itemActivation(r){this._itemActivation=r}get activeItems(){return this._activeItems}set activeItems(r){this._activeItems=r,this.activeItemsUpdated=!0,this.update()}get selectedItems(){return this._selectedItems}set selectedItems(r){this._selectedItems=r,this.selectedItemsUpdated=!0,this.update()}get keyMods(){return this._quickNavigate?Je.Ym:this.ui.keyMods}set valueSelection(r){this._valueSelection=r,this.valueSelectionUpdated=!0,this.update()}get customButton(){return this._customButton}set customButton(r){this._customButton=r,this.update()}get customLabel(){return this._customButtonLabel}set customLabel(r){this._customButtonLabel=r,this.update()}get customHover(){return this._customButtonHover}set customHover(r){this._customButtonHover=r,this.update()}get ok(){return this._ok}set ok(r){this._ok=r,this.update()}get hideInput(){return!!this._hideInput}set hideInput(r){this._hideInput=r,this.update()}trySelectFirst(){this.autoFocusOnList&&(this.canSelectMany||this.ui.list.focus(li.First))}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange(r=>{this.doSetValue(r,!0)})),this.visibleDisposables.add(this.ui.inputBox.onMouseDown(r=>{this.autoFocusOnList||this.ui.list.clearFocus()})),this.visibleDisposables.add((this._hideInput?this.ui.list:this.ui.inputBox).onKeyDown(r=>{switch(r.keyCode){case 18:this.ui.list.focus(li.Next),this.canSelectMany&&this.ui.list.domFocus(),Et.fs.stop(r,!0);break;case 16:this.ui.list.getFocusedElements().length?this.ui.list.focus(li.Previous):this.ui.list.focus(li.Last),this.canSelectMany&&this.ui.list.domFocus(),Et.fs.stop(r,!0);break;case 12:this.ui.list.focus(li.NextPage),this.canSelectMany&&this.ui.list.domFocus(),Et.fs.stop(r,!0);break;case 11:this.ui.list.focus(li.PreviousPage),this.canSelectMany&&this.ui.list.domFocus(),Et.fs.stop(r,!0);break;case 17:if(!this._canAcceptInBackground||!this.ui.inputBox.isSelectionAtEnd())return;this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(!0));break;case 14:(r.ctrlKey||r.metaKey)&&!r.shiftKey&&!r.altKey&&(this.ui.list.focus(li.First),Et.fs.stop(r,!0));break;case 13:(r.ctrlKey||r.metaKey)&&!r.shiftKey&&!r.altKey&&(this.ui.list.focus(li.Last),Et.fs.stop(r,!0));break}})),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.ui.list.onDidChangeFocus(r=>{this.activeItemsUpdated||this.activeItemsToConfirm!==this._activeItems&&(0,Ct.aI)(r,this._activeItems,(l,v)=>l===v)||(this._activeItems=r,this.onDidChangeActiveEmitter.fire(r))})),this.visibleDisposables.add(this.ui.list.onDidChangeSelection(({items:r,event:l})=>{if(this.canSelectMany){r.length&&this.ui.list.setSelectedElements([]);return}this.selectedItemsToConfirm!==this._selectedItems&&(0,Ct.aI)(r,this._selectedItems,(v,V)=>v===V)||(this._selectedItems=r,this.onDidChangeSelectionEmitter.fire(r),r.length&&this.handleAccept(l instanceof MouseEvent&&l.button===1))})),this.visibleDisposables.add(this.ui.list.onChangedCheckedElements(r=>{this.canSelectMany&&(this.selectedItemsToConfirm!==this._selectedItems&&(0,Ct.aI)(r,this._selectedItems,(l,v)=>l===v)||(this._selectedItems=r,this.onDidChangeSelectionEmitter.fire(r)))})),this.visibleDisposables.add(this.ui.list.onButtonTriggered(r=>this.onDidTriggerItemButtonEmitter.fire(r))),this.visibleDisposables.add(this.registerQuickNavigation()),this.valueSelectionUpdated=!0),super.show()}handleAccept(r){let l=!1;this.onWillAcceptEmitter.fire({veto:()=>l=!0}),l||this.onDidAcceptEmitter.fire({inBackground:r})}registerQuickNavigation(){return Et.ko(this.ui.container,Et.Bx.KEY_UP,r=>{if(this.canSelectMany||!this._quickNavigate)return;const l=new Vi.Z(r),v=l.keyCode;this._quickNavigate.keybindings.some(ae=>{const[me,Ne]=ae.getParts();return Ne?!1:me.shiftKey&&v===4?!(l.ctrlKey||l.altKey||l.metaKey):!!(me.altKey&&v===6||me.ctrlKey&&v===5||me.metaKey&&v===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 r=this.keepScrollPosition?this.scrollTop:0,l=!!this._hideInput&&this._items.length>0;this.ui.container.classList.toggle("hidden-input",l&&!this.description);const v={title:!!this.title||!!this.step||!!this.buttons.length,description:!!this.description,checkAll:this.canSelectMany&&!this._hideCheckAll,checkBox:this.canSelectMany,inputBox:!l,progressBar:!l,visibleCount:!0,count:this.canSelectMany,ok:this.ok==="default"?this.canSelectMany:this.ok,list:!0,message:!!this.validationMessage,customButton:this.customButton};this.ui.setVisibilities(v),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 V=this.ariaLabel;if(V||(V=this.placeholder||Hn.DEFAULT_ARIA_LABEL,this.title&&(V+=` - ${this.title}`)),this.ui.inputBox.ariaLabel!==V&&(this.ui.inputBox.ariaLabel=V),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)switch(this.itemsUpdated=!1,this.ui.list.setElements(this.items),this.ui.list.filter(this.filterValue(this.ui.inputBox.value)),this.ui.checkAll.checked=this.ui.list.getAllVisibleChecked(),this.ui.visibleCount.setCount(this.ui.list.getVisibleCount()),this.ui.count.setCount(this.ui.list.getCheckedCount()),this._itemActivation){case Je.C1.NONE:this._itemActivation=Je.C1.FIRST;break;case Je.C1.SECOND:this.ui.list.focus(li.Second),this._itemActivation=Je.C1.FIRST;break;case Je.C1.LAST:this.ui.list.focus(li.Last),this._itemActivation=Je.C1.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||"",this.ui.setComboboxAccessibility(!0),v.inputBox||(this.ui.list.domFocus(),this.canSelectMany&&this.ui.list.focus(li.First)),this.keepScrollPosition&&(this.scrollTop=r)}}Hn.DEFAULT_ARIA_LABEL=(0,q.kg)("quickInputBox.ariaLabel","Type to narrow down results.");class Is extends ce.jG{constructor(r){super(),this.options=r,this.comboboxAccessibility=!1,this.enabled=!0,this.onDidAcceptEmitter=this._register(new te.vl),this.onDidCustomEmitter=this._register(new te.vl),this.onDidTriggerButtonEmitter=this._register(new te.vl),this.keyMods={ctrlCmd:!1,alt:!1},this.controller=null,this.onShowEmitter=this._register(new te.vl),this.onShow=this.onShowEmitter.event,this.onHideEmitter=this._register(new te.vl),this.onHide=this.onHideEmitter.event,this.idPrefix=r.idPrefix,this.parentElement=r.container,this.styles=r.styles,this.registerKeyModsListeners()}registerKeyModsListeners(){const r=l=>{this.keyMods.ctrlCmd=l.ctrlKey||l.metaKey,this.keyMods.alt=l.altKey};this._register(Et.ko(window,Et.Bx.KEY_DOWN,r,!0)),this._register(Et.ko(window,Et.Bx.KEY_UP,r,!0)),this._register(Et.ko(window,Et.Bx.MOUSE_DOWN,r,!0))}getUI(){if(this.ui)return this.ui;const r=Et.BC(this.parentElement,Vn(".quick-input-widget.show-file-icons"));r.tabIndex=-1,r.style.display="none";const l=Et.li(r),v=Et.BC(r,Vn(".quick-input-titlebar")),V=this._register(new vl.E(v));V.domNode.classList.add("quick-input-left-action-bar");const G=Et.BC(v,Vn(".quick-input-title")),ae=this._register(new vl.E(v));ae.domNode.classList.add("quick-input-right-action-bar");const me=Et.BC(r,Vn(".quick-input-description")),Ne=Et.BC(r,Vn(".quick-input-header")),Ve=Et.BC(Ne,Vn("input.quick-input-check-all"));Ve.type="checkbox",Ve.setAttribute("aria-label",(0,q.kg)("quickInput.checkAll","Toggle all checkboxes")),this._register(Et.b2(Ve,Et.Bx.CHANGE,En=>{const to=Ve.checked;xs.setAllVisibleChecked(to)})),this._register(Et.ko(Ve,Et.Bx.CLICK,En=>{(En.x||En.y)&&Si.setFocus()}));const Ge=Et.BC(Ne,Vn(".quick-input-description")),mt=Et.BC(Ne,Vn(".quick-input-and-message")),ti=Et.BC(mt,Vn(".quick-input-filter")),Si=this._register(new g(ti));Si.setAttribute("aria-describedby",`${this.idPrefix}message`);const tn=Et.BC(ti,Vn(".quick-input-visible-count"));tn.setAttribute("aria-live","polite"),tn.setAttribute("aria-atomic","true");const kn=new Dl.x(tn,{countFormat:(0,q.kg)({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")}),On=Et.BC(ti,Vn(".quick-input-count"));On.setAttribute("aria-live","polite");const as=new Dl.x(On,{countFormat:(0,q.kg)({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")}),qn=Et.BC(Ne,Vn(".quick-input-action")),Pn=new Yr(qn);Pn.label=(0,q.kg)("ok","OK"),this._register(Pn.onDidClick(En=>{this.onDidAcceptEmitter.fire()}));const Qn=Et.BC(Ne,Vn(".quick-input-action")),zo=new Yr(Qn);zo.label=(0,q.kg)("custom","Custom"),this._register(zo.onDidClick(En=>{this.onDidCustomEmitter.fire()}));const na=Et.BC(mt,Vn(`#${this.idPrefix}message.quick-input-message`)),xs=this._register(new en(r,this.idPrefix+"list",this.options));this._register(xs.onChangedAllVisibleChecked(En=>{Ve.checked=En})),this._register(xs.onChangedVisibleCount(En=>{kn.setCount(En)})),this._register(xs.onChangedCheckedCount(En=>{as.setCount(En)})),this._register(xs.onLeave(()=>{setTimeout(()=>{Si.setFocus(),this.controller instanceof Hn&&this.controller.canSelectMany&&xs.clearFocus()},0)})),this._register(xs.onDidChangeFocus(()=>{this.comboboxAccessibility&&this.getUI().inputBox.setAttribute("aria-activedescendant",this.getUI().list.getActiveDescendant()||"")}));const jc=new Il(r);jc.getContainer().classList.add("quick-input-progress");const Sn=Et.w5(r);return this._register(Sn),this._register(Et.ko(r,Et.Bx.FOCUS,En=>{this.previousFocusElement=En.relatedTarget instanceof HTMLElement?En.relatedTarget:void 0},!0)),this._register(Sn.onDidBlur(()=>{!this.getUI().ignoreFocusOut&&!this.options.ignoreFocusOut()&&this.hide(Je.kF.Blur),this.previousFocusElement=void 0})),this._register(Et.ko(r,Et.Bx.FOCUS,En=>{Si.setFocus()})),this._register(Et.ko(r,Et.Bx.KEY_DOWN,En=>{const to=new Vi.Z(En);switch(to.keyCode){case 3:Et.fs.stop(En,!0),this.onDidAcceptEmitter.fire();break;case 9:Et.fs.stop(En,!0),this.hide(Je.kF.Gesture);break;case 2:if(!to.altKey&&!to.ctrlKey&&!to.metaKey){const tl=[".action-label.codicon"];r.classList.contains("show-checkboxes")?tl.push("input"):tl.push("input[type=text]"),this.getUI().list.isDisplayed()&&tl.push(".monaco-list");const Pd=r.querySelectorAll(tl.join(", "));to.shiftKey&&to.target===Pd[0]?(Et.fs.stop(En,!0),Pd[Pd.length-1].focus()):!to.shiftKey&&to.target===Pd[Pd.length-1]&&(Et.fs.stop(En,!0),Pd[0].focus())}break}})),this.ui={container:r,styleSheet:l,leftActionBar:V,titleBar:v,title:G,description1:me,description2:Ge,rightActionBar:ae,checkAll:Ve,filterContainer:ti,inputBox:Si,visibleCountContainer:tn,visibleCount:kn,countContainer:On,count:as,okContainer:qn,ok:Pn,message:na,customButtonContainer:Qn,customButton:zo,list:xs,progressBar:jc,onDidAccept:this.onDidAcceptEmitter.event,onDidCustom:this.onDidCustomEmitter.event,onDidTriggerButton:this.onDidTriggerButtonEmitter.event,ignoreFocusOut:!1,keyMods:this.keyMods,isScreenReaderOptimized:()=>this.options.isScreenReaderOptimized(),show:En=>this.show(En),hide:()=>this.hide(),setVisibilities:En=>this.setVisibilities(En),setComboboxAccessibility:En=>this.setComboboxAccessibility(En),setEnabled:En=>this.setEnabled(En),setContextKey:En=>this.options.setContextKey(En)},this.updateStyles(),this.ui}pick(r,l={},v=h.X.None){return new Promise((V,G)=>{let ae=Ge=>{var mt;ae=V,(mt=l.onKeyMods)===null||mt===void 0||mt.call(l,me.keyMods),V(Ge)};if(v.isCancellationRequested){ae(void 0);return}const me=this.createQuickPick();let Ne;const Ve=[me,me.onDidAccept(()=>{if(me.canSelectMany)ae(me.selectedItems.slice()),me.hide();else{const Ge=me.activeItems[0];Ge&&(ae(Ge),me.hide())}}),me.onDidChangeActive(Ge=>{const mt=Ge[0];mt&&l.onDidFocus&&l.onDidFocus(mt)}),me.onDidChangeSelection(Ge=>{if(!me.canSelectMany){const mt=Ge[0];mt&&(ae(mt),me.hide())}}),me.onDidTriggerItemButton(Ge=>l.onDidTriggerItemButton&&l.onDidTriggerItemButton(Object.assign(Object.assign({},Ge),{removeItem:()=>{const mt=me.items.indexOf(Ge.item);if(mt!==-1){const ti=me.items.slice(),Si=ti.splice(mt,1),tn=me.activeItems.filter(On=>On!==Si[0]),kn=me.keepScrollPosition;me.keepScrollPosition=!0,me.items=ti,tn&&(me.activeItems=tn),me.keepScrollPosition=kn}}}))),me.onDidChangeValue(Ge=>{Ne&&!Ge&&(me.activeItems.length!==1||me.activeItems[0]!==Ne)&&(me.activeItems=[Ne])}),v.onCancellationRequested(()=>{me.hide()}),me.onDidHide(()=>{(0,ce.AS)(Ve),ae(void 0)})];me.title=l.title,me.canSelectMany=!!l.canPickMany,me.placeholder=l.placeHolder,me.ignoreFocusOut=!!l.ignoreFocusLost,me.matchOnDescription=!!l.matchOnDescription,me.matchOnDetail=!!l.matchOnDetail,me.matchOnLabel=l.matchOnLabel===void 0||l.matchOnLabel,me.autoFocusOnList=l.autoFocusOnList===void 0||l.autoFocusOnList,me.quickNavigate=l.quickNavigate,me.hideInput=!!l.hideInput,me.contextKey=l.contextKey,me.busy=!0,Promise.all([r,l.activeItem]).then(([Ge,mt])=>{Ne=mt,me.busy=!1,me.items=Ge,me.canSelectMany&&(me.selectedItems=Ge.filter(ti=>ti.type!=="separator"&&ti.picked)),Ne&&(me.activeItems=[Ne])}),me.show(),Promise.resolve(r).then(void 0,Ge=>{G(Ge),me.hide()})})}createQuickPick(){const r=this.getUI();return new Hn(r)}show(r){const l=this.getUI();this.onShowEmitter.fire();const v=this.controller;this.controller=r,v&&v.didHide(),this.setEnabled(!0),l.leftActionBar.clear(),l.title.textContent="",l.description1.textContent="",l.description2.textContent="",l.rightActionBar.clear(),l.checkAll.checked=!1,l.inputBox.placeholder="",l.inputBox.password=!1,l.inputBox.showDecoration(M.A.Ignore),l.visibleCount.setCount(0),l.count.setCount(0),Et.Ln(l.message),l.progressBar.stop(),l.list.setElements([]),l.list.matchOnDescription=!1,l.list.matchOnDetail=!1,l.list.matchOnLabel=!0,l.list.sortByLabel=!0,l.ignoreFocusOut=!1,this.setComboboxAccessibility(!1),l.inputBox.ariaLabel="";const V=this.options.backKeybindingLabel();gs.tooltip=V?(0,q.kg)("quickInput.backWithKeybinding","Back ({0})",V):(0,q.kg)("quickInput.back","Back"),l.container.style.display="",this.updateLayout(),l.inputBox.setFocus()}setVisibilities(r){const l=this.getUI();l.title.style.display=r.title?"":"none",l.description1.style.display=r.description&&(r.inputBox||r.checkAll)?"":"none",l.description2.style.display=r.description&&!(r.inputBox||r.checkAll)?"":"none",l.checkAll.style.display=r.checkAll?"":"none",l.filterContainer.style.display=r.inputBox?"":"none",l.visibleCountContainer.style.display=r.visibleCount?"":"none",l.countContainer.style.display=r.count?"":"none",l.okContainer.style.display=r.ok?"":"none",l.customButtonContainer.style.display=r.customButton?"":"none",l.message.style.display=r.message?"":"none",l.progressBar.getContainer().style.display=r.progressBar?"":"none",l.list.display(!!r.list),l.container.classList[r.checkBox?"add":"remove"]("show-checkboxes"),this.updateLayout()}setComboboxAccessibility(r){if(r!==this.comboboxAccessibility){const l=this.getUI();this.comboboxAccessibility=r,this.comboboxAccessibility?(l.inputBox.setAttribute("role","combobox"),l.inputBox.setAttribute("aria-haspopup","true"),l.inputBox.setAttribute("aria-autocomplete","list"),l.inputBox.setAttribute("aria-activedescendant",l.list.getActiveDescendant()||"")):(l.inputBox.removeAttribute("role"),l.inputBox.removeAttribute("aria-haspopup"),l.inputBox.removeAttribute("aria-autocomplete"),l.inputBox.removeAttribute("aria-activedescendant"))}}setEnabled(r){if(r!==this.enabled){this.enabled=r;for(const l of this.getUI().leftActionBar.viewItems)l.getAction().enabled=r;for(const l of this.getUI().rightActionBar.viewItems)l.getAction().enabled=r;this.getUI().checkAll.disabled=!r,this.getUI().ok.enabled=r,this.getUI().list.enabled=r}}hide(r){var l;const v=this.controller;if(v){const V=!(!((l=this.ui)===null||l===void 0)&&l.container.contains(document.activeElement));if(this.controller=null,this.onHideEmitter.fire(),this.getUI().container.style.display="none",!V){let G=this.previousFocusElement;for(;G&&!G.offsetParent;)G=(0,fe.UH)(G.parentElement);G?.offsetParent?(G.focus(),this.previousFocusElement=void 0):this.options.returnFocus()}v.didHide(r)}}layout(r,l){this.dimension=r,this.titleBarOffset=l,this.updateLayout()}updateLayout(){if(this.ui){this.ui.container.style.top=`${this.titleBarOffset}px`;const r=this.ui.container.style,l=Math.min(this.dimension.width*.62,Is.MAX_WIDTH);r.width=l+"px",r.marginLeft="-"+l/2+"px",this.ui.inputBox.layout(),this.ui.list.layout(this.dimension&&this.dimension.height*.4)}}applyStyles(r){this.styles=r,this.updateStyles()}updateStyles(){if(this.ui){const{quickInputTitleBackground:r,quickInputBackground:l,quickInputForeground:v,contrastBorder:V,widgetShadow:G}=this.styles.widget;this.ui.titleBar.style.backgroundColor=r?r.toString():"",this.ui.container.style.backgroundColor=l?l.toString():"",this.ui.container.style.color=v?v.toString():"",this.ui.container.style.border=V?`1px solid ${V}`:"",this.ui.container.style.boxShadow=G?`0 0 8px 2px ${G}`:"",this.ui.inputBox.style(this.styles.inputBox),this.ui.count.style(this.styles.countBadge),this.ui.ok.style(this.styles.button),this.ui.customButton.style(this.styles.button),this.ui.progressBar.style(this.styles.progressBar),this.ui.list.style(this.styles.list);const ae=[];this.styles.list.pickerGroupBorder&&ae.push(`.quick-input-list .quick-input-list-entry { border-top-color: ${this.styles.list.pickerGroupBorder}; }`),this.styles.list.pickerGroupForeground&&ae.push(`.quick-input-list .quick-input-list-separator { color: ${this.styles.list.pickerGroupForeground}; }`),(this.styles.keybindingLabel.keybindingLabelBackground||this.styles.keybindingLabel.keybindingLabelBorder||this.styles.keybindingLabel.keybindingLabelBottomBorder||this.styles.keybindingLabel.keybindingLabelShadow||this.styles.keybindingLabel.keybindingLabelForeground)&&(ae.push(".quick-input-list .monaco-keybinding > .monaco-keybinding-key {"),this.styles.keybindingLabel.keybindingLabelBackground&&ae.push(`background-color: ${this.styles.keybindingLabel.keybindingLabelBackground};`),this.styles.keybindingLabel.keybindingLabelBorder&&ae.push(`border-color: ${this.styles.keybindingLabel.keybindingLabelBorder};`),this.styles.keybindingLabel.keybindingLabelBottomBorder&&ae.push(`border-bottom-color: ${this.styles.keybindingLabel.keybindingLabelBottomBorder};`),this.styles.keybindingLabel.keybindingLabelShadow&&ae.push(`box-shadow: inset 0 -1px 0 ${this.styles.keybindingLabel.keybindingLabelShadow};`),this.styles.keybindingLabel.keybindingLabelForeground&&ae.push(`color: ${this.styles.keybindingLabel.keybindingLabelForeground};`),ae.push("}"));const me=ae.join(` `);me!==this.ui.styleSheet.textContent&&(this.ui.styleSheet.textContent=me)}}}Is.MAX_WIDTH=600;var Ns=f(4169),Es=f(48289),Bo=f(19381),vd=f(73027),Cd=function(ue,r,l,v){var V=arguments.length,G=V<3?r:v===null?v=Object.getOwnPropertyDescriptor(r,l):v,ae;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")G=Reflect.decorate(ue,r,l,v);else for(var me=ue.length-1;me>=0;me--)(ae=ue[me])&&(G=(V<3?ae(G):V>3?ae(r,l,G):ae(r,l))||G);return V>3&&G&&Object.defineProperty(r,l,G),G},ag=function(ue,r){return function(l,v){r(l,v,ue)}};let $a=class extends ce.jG{constructor(r,l){super(),this.quickInputService=r,this.instantiationService=l,this.registry=_c.O.as(Bo.Fd.Quickaccess),this.mapProviderToDescriptor=new Map,this.lastAcceptedPickerValues=new Map,this.visibleQuickAccess=void 0}show(r="",l){this.doShowOrPick(r,!1,l)}doShowOrPick(r,l,v){var V;const[G,ae]=this.getOrInstantiateProvider(r),me=this.visibleQuickAccess,Ne=me?.descriptor;if(me&&ae&&Ne===ae){r!==ae.prefix&&!v?.preserveValue&&(me.picker.value=r),this.adjustValueSelection(me.picker,ae,v);return}if(ae&&!v?.preserveValue){let Si;if(me&&Ne&&Ne!==ae){const tn=me.value.substr(Ne.prefix.length);tn&&(Si=`${ae.prefix}${tn}`)}if(!Si){const tn=G?.defaultFilterValue;tn===Bo.aJ.LAST?Si=this.lastAcceptedPickerValues.get(ae):typeof tn=="string"&&(Si=`${ae.prefix}${tn}`)}typeof Si=="string"&&(r=Si)}const Ve=new ce.Cm,Ge=Ve.add(this.quickInputService.createQuickPick());Ge.value=r,this.adjustValueSelection(Ge,ae,v),Ge.placeholder=ae?.placeholder,Ge.quickNavigate=v?.quickNavigateConfiguration,Ge.hideInput=!!Ge.quickNavigate&&!me,(typeof v?.itemActivation=="number"||v?.quickNavigateConfiguration)&&(Ge.itemActivation=(V=v?.itemActivation)!==null&&V!==void 0?V:vd.C1.SECOND),Ge.contextKey=ae?.contextKey,Ge.filterValue=Si=>Si.substring(ae?ae.prefix.length:0),ae?.placeholder&&(Ge.ariaLabel=ae?.placeholder);let mt;l&&(mt=new ee.Zv,Ve.add((0,Es.O)(Ge.onWillAccept)(Si=>{Si.veto(),Ge.hide()}))),Ve.add(this.registerPickerListeners(Ge,G,ae,r));const ti=Ve.add(new h.Q);if(G&&Ve.add(G.provide(Ge,ti.token)),(0,Es.O)(Ge.onDidHide)(()=>{Ge.selectedItems.length===0&&ti.cancel(),Ve.dispose(),mt?.complete(Ge.selectedItems.slice(0))}),Ge.show(),l)return mt?.p}adjustValueSelection(r,l,v){var V;let G;v?.preserveValue?G=[r.value.length,r.value.length]:G=[(V=l?.prefix.length)!==null&&V!==void 0?V:0,r.value.length],r.valueSelection=G}registerPickerListeners(r,l,v,V){const G=new ce.Cm,ae=this.visibleQuickAccess={picker:r,descriptor:v,value:V};return G.add((0,ce.s)(()=>{ae===this.visibleQuickAccess&&(this.visibleQuickAccess=void 0)})),G.add(r.onDidChangeValue(me=>{const[Ne]=this.getOrInstantiateProvider(me);Ne!==l?this.show(me,{preserveValue:!0}):ae.value=me})),v&&G.add(r.onDidAccept(()=>{this.lastAcceptedPickerValues.set(v,r.value)})),G}getOrInstantiateProvider(r){const l=this.registry.getQuickAccessProvider(r);if(!l)return[void 0,void 0];let v=this.mapProviderToDescriptor.get(l);return v||(v=this.instantiationService.createInstance(l.ctor),this.mapProviderToDescriptor.set(l,v)),[v,l]}};$a=Cd([ag(0,vd.GK),ag(1,Mn._Y)],$a);var mm=function(ue,r,l,v){var V=arguments.length,G=V<3?r:v===null?v=Object.getOwnPropertyDescriptor(r,l):v,ae;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")G=Reflect.decorate(ue,r,l,v);else for(var me=ue.length-1;me>=0;me--)(ae=ue[me])&&(G=(V<3?ae(G):V>3?ae(r,l,G):ae(r,l))||G);return V>3&&G&&Object.defineProperty(r,l,G),G},bd=function(ue,r){return function(l,v){r(l,v,ue)}};let Oh=class extends ts.lR{constructor(r,l,v,V,G){super(v),this.instantiationService=r,this.contextKeyService=l,this.accessibilityService=V,this.layoutService=G,this.contexts=new Map}get controller(){return this._controller||(this._controller=this._register(this.createController())),this._controller}get quickAccess(){return this._quickAccess||(this._quickAccess=this._register(this.instantiationService.createInstance($a))),this._quickAccess}createController(r=this.layoutService,l){const v={idPrefix:"quickInput_",container:r.container,ignoreFocusOut:()=>!1,isScreenReaderOptimized:()=>this.accessibilityService.isScreenReaderOptimized(),backKeybindingLabel:()=>{},setContextKey:G=>this.setContextKey(G),returnFocus:()=>r.focus(),createList:(G,ae,me,Ne,Ve)=>this.instantiationService.createInstance(Ns.Ei,G,ae,me,Ne,Ve),styles:this.computeStyles()},V=this._register(new Is(Object.assign(Object.assign({},v),l)));return V.layout(r.dimension,r.offset.quickPickTop),this._register(r.onDidLayout(G=>V.layout(G,r.offset.quickPickTop))),this._register(V.onShow(()=>this.resetContextKeys())),this._register(V.onHide(()=>this.resetContextKeys())),V}setContextKey(r){let l;r&&(l=this.contexts.get(r),l||(l=new rs.N1(r,!1).bindTo(this.contextKeyService),this.contexts.set(r,l))),!(l&&l.get())&&(this.resetContextKeys(),l?.set(!0))}resetContextKeys(){this.contexts.forEach(r=>{r.get()&&r.reset()})}pick(r,l={},v=h.X.None){return this.controller.pick(r,l,v)}createQuickPick(){return this.controller.createQuickPick()}updateStyles(){this.controller.applyStyles(this.computeStyles())}computeStyles(){return{widget:Object.assign({},(0,Fo.KC)(this.theme,{quickInputBackground:Un.ELA,quickInputForeground:Un.HJZ,quickInputTitleBackground:Un.er1,contrastBorder:Un.b1q,widgetShadow:Un.f9l})),inputBox:(0,Fo.KC)(this.theme,{inputForeground:Un.cws,inputBackground:Un.L4c,inputBorder:Un.Zgs,inputValidationInfoBackground:Un.I$A,inputValidationInfoForeground:Un.L9Z,inputValidationInfoBorder:Un.YSW,inputValidationWarningBackground:Un.ULt,inputValidationWarningForeground:Un.T5N,inputValidationWarningBorder:Un.C1n,inputValidationErrorBackground:Un._$n,inputValidationErrorForeground:Un.h9z,inputValidationErrorBorder:Un.eYZ}),countBadge:(0,Fo.KC)(this.theme,{badgeBackground:Un.WMx,badgeForeground:Un.zRE,badgeBorder:Un.b1q}),button:(0,Fo.KC)(this.theme,{buttonForeground:Un.G_h,buttonBackground:Un.XJc,buttonHoverBackground:Un.T9h,buttonBorder:Un.b1q}),progressBar:(0,Fo.KC)(this.theme,{progressBarBackground:Un.BTi}),keybindingLabel:(0,Fo.KC)(this.theme,{keybindingLabelBackground:Un.HDX,keybindingLabelForeground:Un.eUu,keybindingLabelBorder:Un.zUX,keybindingLabelBottomBorder:Un.Qfh,keybindingLabelShadow:Un.f9l}),list:(0,Fo.KC)(this.theme,{listBackground:Un.ELA,listInactiveFocusForeground:Un.nH,listInactiveSelectionIconForeground:Un.c7i,listInactiveFocusBackground:Un.AlL,listFocusOutline:Un.buw,listInactiveFocusOutline:Un.buw,pickerGroupBorder:Un.iwL,pickerGroupForeground:Un.NBf})}}};Oh=mm([bd(0,Mn._Y),bd(1,rs.fN),bd(2,ts.Gy),bd(3,eo.j),bd(4,fs)],Oh);var Or=function(ue,r,l,v){var V=arguments.length,G=V<3?r:v===null?v=Object.getOwnPropertyDescriptor(r,l):v,ae;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")G=Reflect.decorate(ue,r,l,v);else for(var me=ue.length-1;me>=0;me--)(ae=ue[me])&&(G=(V<3?ae(G):V>3?ae(r,l,G):ae(r,l))||G);return V>3&&G&&Object.defineProperty(r,l,G),G},Ca=function(ue,r){return function(l,v){r(l,v,ue)}};let Ml=class extends Oh{constructor(r,l,v,V,G,ae){super(l,v,V,G,new P(r.getContainerDomNode(),ae)),this.host=void 0;const me=Tl.get(r);if(me){const Ne=me.widget;this.host={_serviceBrand:void 0,get hasContainer(){return!0},get container(){return Ne.getDomNode()},get dimension(){return r.getLayoutInfo()},get onDidLayout(){return r.onDidLayoutChange},focus:()=>r.focus(),offset:{top:0,quickPickTop:0}}}else this.host=void 0}createController(){return super.createController(this.host)}};Ml=Or([Ca(1,Mn._Y),Ca(2,rs.fN),Ca(3,ts.Gy),Ca(4,eo.j),Ca(5,D.T)],Ml);let Ph=class{constructor(r,l){this.instantiationService=r,this.codeEditorService=l,this.mapEditorToService=new Map}get activeService(){const r=this.codeEditorService.getFocusedCodeEditor();if(!r)throw new Error("Quick input service needs a focused editor to work.");let l=this.mapEditorToService.get(r);if(!l){const v=l=this.instantiationService.createInstance(Ml,r);this.mapEditorToService.set(r,l),(0,Es.O)(r.onDidDispose)(()=>{v.dispose(),this.mapEditorToService.delete(r)})}return l}get quickAccess(){return this.activeService.quickAccess}pick(r,l={},v=h.X.None){return this.activeService.pick(r,l,v)}createQuickPick(){return this.activeService.createQuickPick()}};Ph=Or([Ca(0,Mn._Y),Ca(1,D.T)],Ph);class Tl{constructor(r){this.editor=r,this.widget=new Rl(this.editor)}static get(r){return r.getContribution(Tl.ID)}dispose(){this.widget.dispose()}}Tl.ID="editor.controller.quickInput";class Rl{constructor(r){this.codeEditor=r,this.domNode=document.createElement("div"),this.codeEditor.addOverlayWidget(this)}getId(){return Rl.ID}getDomNode(){return this.domNode}getPosition(){return{preference:2}}dispose(){this.codeEditor.removeOverlayWidget(this)}}Rl.ID="editor.contrib.quickInputWidget",(0,za.HW)(Tl.ID,Tl);var pm=f(93582),Do=f(83616),lg=function(ue,r,l,v){var V=arguments.length,G=V<3?r:v===null?v=Object.getOwnPropertyDescriptor(r,l):v,ae;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")G=Reflect.decorate(ue,r,l,v);else for(var me=ue.length-1;me>=0;me--)(ae=ue[me])&&(G=(V<3?ae(G):V>3?ae(r,l,G):ae(r,l))||G);return V>3&&G&&Object.defineProperty(r,l,G),G},Xr=function(ue,r){return function(l,v){r(l,v,ue)}};let Pr=class extends ce.jG{constructor(r,l,v){super(),this._contextKeyService=r,this._layoutService=l,this._configurationService=v,this._accessibilitySupport=0,this._onDidChangeScreenReaderOptimized=new te.vl,this._onDidChangeReducedMotion=new te.vl,this._accessibilityModeEnabledContext=eo.f.bindTo(this._contextKeyService);const V=()=>this._accessibilityModeEnabledContext.set(this.isScreenReaderOptimized());this._register(this._configurationService.onDidChangeConfiguration(ae=>{ae.affectsConfiguration("editor.accessibilitySupport")&&(V(),this._onDidChangeScreenReaderOptimized.fire()),ae.affectsConfiguration("workbench.reduceMotion")&&(this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this._onDidChangeReducedMotion.fire())})),V(),this._register(this.onDidChangeScreenReaderOptimized(()=>V()));const G=window.matchMedia("(prefers-reduced-motion: reduce)");this._systemMotionReduced=G.matches,this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this.initReducedMotionListeners(G)}initReducedMotionListeners(r){if(!this._layoutService.hasContainer)return;this._register((0,Et.ko)(r,"change",()=>{this._systemMotionReduced=r.matches,this._configMotionReduced==="auto"&&this._onDidChangeReducedMotion.fire()}));const l=()=>{const v=this.isMotionReduced();this._layoutService.container.classList.toggle("reduce-motion",v),this._layoutService.container.classList.toggle("enable-motion",!v)};l(),this._register(this.onDidChangeReducedMotion(()=>l()))}get onDidChangeScreenReaderOptimized(){return this._onDidChangeScreenReaderOptimized.event}isScreenReaderOptimized(){const r=this._configurationService.getValue("editor.accessibilitySupport");return r==="on"||r==="auto"&&this._accessibilitySupport===2}get onDidChangeReducedMotion(){return this._onDidChangeReducedMotion.event}isMotionReduced(){const r=this._configMotionReduced;return r==="on"||r==="auto"&&this._systemMotionReduced}getAccessibilitySupport(){return this._accessibilitySupport}};Pr=lg([Xr(0,rs.fN),Xr(1,fs),Xr(2,_i.pG)],Pr);var co=f(58067),wd=f(90840),Ga=function(ue,r,l,v){var V=arguments.length,G=V<3?r:v===null?v=Object.getOwnPropertyDescriptor(r,l):v,ae;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")G=Reflect.decorate(ue,r,l,v);else for(var me=ue.length-1;me>=0;me--)(ae=ue[me])&&(G=(V<3?ae(G):V>3?ae(r,l,G):ae(r,l))||G);return V>3&&G&&Object.defineProperty(r,l,G),G},ba=function(ue,r){return function(l,v){r(l,v,ue)}};let Al=class{constructor(r,l){this._commandService=r,this._hiddenStates=new Ol(l)}createMenu(r,l,v){return new Sd(r,this._hiddenStates,Object.assign({emitEventsForSubmenuChanges:!1,eventDebounceDelay:50},v),this._commandService,l,this)}};Al=Ga([ba(0,Ps.wT),ba(1,wd.CS)],Al);let Ol=class ig{constructor(r){this._storageService=r,this._disposables=new ce.Cm,this._onDidChange=new te.vl,this.onDidChange=this._onDidChange.event,this._ignoreChangeEvent=!1;try{const l=r.get(ig._key,0,"{}");this._data=JSON.parse(l)}catch{this._data=Object.create(null)}this._disposables.add(r.onDidChangeValue(l=>{if(l.key===ig._key){if(!this._ignoreChangeEvent)try{const v=r.get(ig._key,0,"{}");this._data=JSON.parse(v)}catch(v){console.log("FAILED to read storage after UPDATE",v)}this._onDidChange.fire()}}))}dispose(){this._onDidChange.dispose(),this._disposables.dispose()}isHidden(r,l){var v,V;return(V=(v=this._data[r.id])===null||v===void 0?void 0:v.includes(l))!==null&&V!==void 0?V:!1}updateHidden(r,l,v){const V=this._data[r.id];if(v)V?V.indexOf(l)<0&&V.push(l):this._data[r.id]=[l];else if(V){const G=V.indexOf(l);G>=0&&(0,Ct.UH)(V,G),V.length===0&&delete this._data[r.id]}this._persist()}_persist(){try{this._ignoreChangeEvent=!0;const r=JSON.stringify(this._data);this._storageService.store(ig._key,r,0,0)}finally{this._ignoreChangeEvent=!1}}};Ol._key="menu.hiddenCommands",Ol=Ga([ba(0,wd.CS)],Ol);let Sd=class xh{constructor(r,l,v,V,G,ae){this._id=r,this._hiddenStates=l,this._options=v,this._commandService=V,this._contextKeyService=G,this._menuService=ae,this._disposables=new ce.Cm,this._menuGroups=[],this._contextKeys=new Set,this._build();const me=new ee.uC(()=>{this._build(),this._onDidChange.fire(this)},v.eventDebounceDelay);this._disposables.add(me),this._disposables.add(co.ZG.onDidChangeMenu(Ge=>{Ge.has(r)&&me.schedule()}));const Ne=this._disposables.add(new ce.Cm),Ve=()=>{const Ge=new ee.uC(()=>this._onDidChange.fire(this),v.eventDebounceDelay);Ne.add(Ge),Ne.add(G.onDidChangeContext(mt=>{mt.affectsSome(this._contextKeys)&&Ge.schedule()})),Ne.add(l.onDidChange(()=>{Ge.schedule()}))};this._onDidChange=new te.vl({onFirstListenerAdd:Ve,onLastListenerRemove:Ne.clear.bind(Ne)}),this.onDidChange=this._onDidChange.event}dispose(){this._disposables.dispose(),this._onDidChange.dispose()}_build(){this._menuGroups.length=0,this._contextKeys.clear();const r=co.ZG.getMenuItems(this._id);let l;r.sort(xh._compareMenuItems);for(const v of r){const V=v.group||"";(!l||l[0]!==V)&&(l=[V,[]],this._menuGroups.push(l)),l[1].push(v),this._collectContextKeys(v)}}_collectContextKeys(r){if(xh._fillInKbExprKeys(r.when,this._contextKeys),(0,co.is)(r)){if(r.command.precondition&&xh._fillInKbExprKeys(r.command.precondition,this._contextKeys),r.command.toggled){const l=r.command.toggled.condition||r.command.toggled;xh._fillInKbExprKeys(l,this._contextKeys)}}else this._options.emitEventsForSubmenuChanges&&co.ZG.getMenuItems(r.submenu).forEach(this._collectContextKeys,this)}getActions(r){const l=[],v=[];for(const V of this._menuGroups){const[G,ae]=V,me=[],Ne=[];for(const Ve of ae)if(this._contextKeyService.contextMatchesRules(Ve.when)){let Ge;if((0,co.is)(Ve)){const ti=dg(this._id,Ve.command,this._hiddenStates);Ge=new co.Xe(Ve.command,Ve.alt,r,ti,this._contextKeyService,this._commandService)}else Ge=new co.nI(Ve,this._menuService,this._contextKeyService,r),Ge.actions.length===0&&(Ge.dispose(),Ge=void 0);Ge&&Ne.push(Ge)}Ne.length>0&&l.push([G,Ne]),me.length>0&&v.push(me)}return l}static _fillInKbExprKeys(r,l){if(r)for(const v of r.keys())l.add(v)}static _compareMenuItems(r,l){const v=r.group,V=l.group;if(v!==V){if(v){if(!V)return-1}else return 1;if(v==="navigation")return-1;if(V==="navigation")return 1;const me=v.localeCompare(V);if(me!==0)return me}const G=r.order||0,ae=l.order||0;return G<ae?-1:G>ae?1:xh._compareTitles((0,co.is)(r)?r.command.title:r.title,(0,co.is)(l)?l.command.title:l.title)}static _compareTitles(r,l){const v=typeof r=="string"?r:r.original,V=typeof l=="string"?l:l.original;return v.localeCompare(V)}};Sd=Ga([ba(3,Ps.wT),ba(4,rs.fN),ba(5,co.ez)],Sd);function dg(ue,r,l){const v=`${ue.id}/${r.id}`,V=typeof r.title=="string"?r.title:r.title.value,G=(0,Fs.ih)({id:v,label:(0,q.kg)("hide.label","Hide '{0}'",V),run(){l.updateHidden(ue,r.id,!0)}}),ae=(0,Fs.ih)({id:v,label:V,get checked(){return!l.isHidden(ue,r.id)},run(){const me=!l.isHidden(ue,r.id);l.updateHidden(ue,r.id,me)}});return{hide:G,toggle:ae,get isHidden(){return!ae.checked}}}var yd=function(ue,r,l,v){var V=arguments.length,G=V<3?r:v===null?v=Object.getOwnPropertyDescriptor(r,l):v,ae;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")G=Reflect.decorate(ue,r,l,v);else for(var me=ue.length-1;me>=0;me--)(ae=ue[me])&&(G=(V<3?ae(G):V>3?ae(r,l,G):ae(r,l))||G);return V>3&&G&&Object.defineProperty(r,l,G),G},yc=function(ue,r){return function(l,v){r(l,v,ue)}},Qa=function(ue,r,l,v){function V(G){return G instanceof l?G:new l(function(ae){ae(G)})}return new(l||(l=Promise))(function(G,ae){function me(Ge){try{Ve(v.next(Ge))}catch(mt){ae(mt)}}function Ne(Ge){try{Ve(v.throw(Ge))}catch(mt){ae(mt)}}function Ve(Ge){Ge.done?G(Ge.value):V(Ge.value).then(me,Ne)}Ve((v=v.apply(ue,r||[])).next())})};let Lc=class extends ce.jG{constructor(r,l){super(),this.layoutService=r,this.logService=l,this.mapTextToType=new Map,this.findText="",this.resources=[],(_l.isSafari||_l.isWebkitWebView)&&this.installWebKitWriteTextWorkaround()}installWebKitWriteTextWorkaround(){const r=()=>{const l=new ee.Zv;this.webKitPendingClipboardWritePromise&&!this.webKitPendingClipboardWritePromise.isSettled&&this.webKitPendingClipboardWritePromise.cancel(),this.webKitPendingClipboardWritePromise=l,navigator.clipboard.write([new ClipboardItem({"text/plain":l.p})]).catch(v=>Qa(this,void 0,void 0,function*(){(!(v instanceof Error)||v.name!=="NotAllowedError"||!l.isRejected)&&this.logService.error(v)}))};this.layoutService.hasContainer&&(this._register((0,Et.ko)(this.layoutService.container,"click",r)),this._register((0,Et.ko)(this.layoutService.container,"keydown",r)))}writeText(r,l){return Qa(this,void 0,void 0,function*(){if(l){this.mapTextToType.set(l,r);return}if(this.webKitPendingClipboardWritePromise)return this.webKitPendingClipboardWritePromise.complete(r);try{return yield navigator.clipboard.writeText(r)}catch(G){console.error(G)}const v=document.activeElement,V=document.body.appendChild((0,Et.$)("textarea",{"aria-hidden":!0}));V.style.height="1px",V.style.width="1px",V.style.position="absolute",V.value=r,V.focus(),V.select(),document.execCommand("copy"),v instanceof HTMLElement&&v.focus(),document.body.removeChild(V)})}readText(r){return Qa(this,void 0,void 0,function*(){if(r)return this.mapTextToType.get(r)||"";try{return yield navigator.clipboard.readText()}catch(l){return console.error(l),""}})}readFindText(){return Qa(this,void 0,void 0,function*(){return this.findText})}writeFindText(r){return Qa(this,void 0,void 0,function*(){this.findText=r})}readResources(){return Qa(this,void 0,void 0,function*(){return this.resources})}};Lc=yd([yc(0,fs),yc(1,Qt.rr)],Lc);var Fh=f(3338),Fr=f(17954),Ld=function(ue,r,l,v){var V=arguments.length,G=V<3?r:v===null?v=Object.getOwnPropertyDescriptor(r,l):v,ae;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")G=Reflect.decorate(ue,r,l,v);else for(var me=ue.length-1;me>=0;me--)(ae=ue[me])&&(G=(V<3?ae(G):V>3?ae(r,l,G):ae(r,l))||G);return V>3&&G&&Object.defineProperty(r,l,G),G},ar=function(ue,r){return function(l,v){r(l,v,ue)}};const Za="data-keybinding-context";class Dd{constructor(r,l){this._id=r,this._parent=l,this._value=Object.create(null),this._value._contextId=r}get value(){return Object.assign({},this._value)}setValue(r,l){return this._value[r]!==l?(this._value[r]=l,!0):!1}removeValue(r){return r in this._value?(delete this._value[r],!0):!1}getValue(r){const l=this._value[r];return typeof l>"u"&&this._parent?this._parent.getValue(r):l}}class wa extends Dd{constructor(){super(-1,null)}setValue(r,l){return!1}removeValue(r){return!1}getValue(r){}}wa.INSTANCE=new wa;class Ya extends Dd{constructor(r,l,v){super(r,null),this._configurationService=l,this._values=Us.cB.forConfigKeys(),this._listener=this._configurationService.onDidChangeConfiguration(V=>{if(V.source===7){const G=Array.from(Fr.f.map(this._values,([ae])=>ae));this._values.clear(),v.fire(new kc(G))}else{const G=[];for(const ae of V.affectedKeys){const me=`config.${ae}`,Ne=this._values.findSuperstr(me);Ne!==void 0&&(G.push(...Fr.f.map(Ne,([Ve])=>Ve)),this._values.deleteSuperstr(me)),this._values.has(me)&&(G.push(me),this._values.delete(me))}v.fire(new kc(G))}})}dispose(){this._listener.dispose()}getValue(r){if(r.indexOf(Ya._keyPrefix)!==0)return super.getValue(r);if(this._values.has(r))return this._values.get(r);const l=r.substr(Ya._keyPrefix.length),v=this._configurationService.getValue(l);let V;switch(typeof v){case"number":case"boolean":case"string":V=v;break;default:Array.isArray(v)?V=JSON.stringify(v):V=v}return this._values.set(r,V),V}setValue(r,l){return super.setValue(r,l)}removeValue(r){return super.removeValue(r)}}Ya._keyPrefix="config.";class Bh{constructor(r,l,v){this._service=r,this._key=l,this._defaultValue=v,this.reset()}set(r){this._service.setContext(this._key,r)}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 Dc{constructor(r){this.key=r}affectsSome(r){return r.has(this.key)}allKeysContainedIn(r){return this.affectsSome(r)}}class kc{constructor(r){this.keys=r}affectsSome(r){for(const l of this.keys)if(r.has(l))return!0;return!1}allKeysContainedIn(r){return this.keys.every(l=>r.has(l))}}class Wh{constructor(r){this.events=r}affectsSome(r){for(const l of this.events)if(l.affectsSome(r))return!0;return!1}allKeysContainedIn(r){return this.events.every(l=>l.allKeysContainedIn(r))}}function cg(ue,r){return ue.allKeysContainedIn(new Set(Object.keys(r)))}class lr{constructor(r){this._onDidChangeContext=new te.fV({merge:l=>new Wh(l)}),this.onDidChangeContext=this._onDidChangeContext.event,this._isDisposed=!1,this._myContextId=r}createKey(r,l){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new Bh(this,r,l)}bufferChangeEvents(r){this._onDidChangeContext.pause();try{r()}finally{this._onDidChangeContext.resume()}}createScoped(r){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new dr(this,r)}contextMatchesRules(r){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");const l=this.getContextValuesContainer(this._myContextId);return r?r.evaluate(l):!0}getContextKeyValue(r){if(!this._isDisposed)return this.getContextValuesContainer(this._myContextId).getValue(r)}setContext(r,l){if(this._isDisposed)return;const v=this.getContextValuesContainer(this._myContextId);v&&v.setValue(r,l)&&this._onDidChangeContext.fire(new Dc(r))}removeContext(r){this._isDisposed||this.getContextValuesContainer(this._myContextId).removeValue(r)&&this._onDidChangeContext.fire(new Dc(r))}getContext(r){return this._isDisposed?wa.INSTANCE:this.getContextValuesContainer(kd(r))}}let Xa=class extends lr{constructor(r){super(0),this._contexts=new Map,this._toDispose=new ce.Cm,this._lastContextId=0;const l=new Ya(this._myContextId,r,this._onDidChangeContext);this._contexts.set(this._myContextId,l),this._toDispose.add(l)}dispose(){this._onDidChangeContext.dispose(),this._isDisposed=!0,this._toDispose.dispose()}getContextValuesContainer(r){return this._isDisposed?wa.INSTANCE:this._contexts.get(r)||wa.INSTANCE}createChildContext(r=this._myContextId){if(this._isDisposed)throw new Error("ContextKeyService has been disposed");const l=++this._lastContextId;return this._contexts.set(l,new Dd(l,this.getContextValuesContainer(r))),l}disposeContext(r){this._isDisposed||this._contexts.delete(r)}};Xa=Ld([ar(0,_i.pG)],Xa);class dr extends lr{constructor(r,l){if(super(r.createChildContext()),this._parentChangeListener=new ce.HE,this._parent=r,this._updateParentChangeListener(),this._domNode=l,this._domNode.hasAttribute(Za)){let v="";this._domNode.classList&&(v=Array.from(this._domNode.classList.values()).join(", ")),console.error(`Element already has context attribute${v?": "+v:""}`)}this._domNode.setAttribute(Za,String(this._myContextId))}_updateParentChangeListener(){this._parentChangeListener.value=this._parent.onDidChangeContext(r=>{const v=this._parent.getContextValuesContainer(this._myContextId).value;cg(r,v)||this._onDidChangeContext.fire(r)})}dispose(){this._isDisposed||(this._onDidChangeContext.dispose(),this._parent.disposeContext(this._myContextId),this._parentChangeListener.dispose(),this._domNode.removeAttribute(Za),this._isDisposed=!0)}getContextValuesContainer(r){return this._isDisposed?wa.INSTANCE:this._parent.getContextValuesContainer(r)}createChildContext(r=this._myContextId){if(this._isDisposed)throw new Error("ScopedContextKeyService has been disposed");return this._parent.createChildContext(r)}disposeContext(r){this._isDisposed||this._parent.disposeContext(r)}}function kd(ue){for(;ue;){if(ue.hasAttribute(Za)){const r=ue.getAttribute(Za);return r?parseInt(r,10):NaN}ue=ue.parentElement}return 0}function hg(ue,r,l){ue.get(rs.fN).createKey(String(r),ug(l))}function ug(ue){return(0,Js.PI)(ue,r=>{if(typeof r=="object"&&r.$mid===1)return x.r.revive(r).toString();if(r instanceof x.r)return r.toString()})}Ps.wb.registerCommand(rs.Ho,hg),Ps.wb.registerCommand({id:"getContextKeyInfo",handler(){return[...rs.N1.all()].sort((ue,r)=>ue.key.localeCompare(r.key))},description:{description:(0,q.kg)("getContextKeyInfo","A command that returns information about context keys"),args:[]}}),Ps.wb.registerCommand("_generateContextKeyInfo",function(){const ue=[],r=new Set;for(const l of rs.N1.all())r.has(l.key)||(r.add(l.key),ue.push(l));ue.sort((l,v)=>l.key.localeCompare(v.key)),console.log(JSON.stringify(ue,void 0,2))});var Jr=f(83312);class gg{constructor(r){this.incoming=new Map,this.outgoing=new Map,this.data=r}}class fg{constructor(r){this._hashFn=r,this._nodes=new Map}roots(){const r=[];for(const l of this._nodes.values())l.outgoing.size===0&&r.push(l);return r}insertEdge(r,l){const v=this.lookupOrInsertNode(r),V=this.lookupOrInsertNode(l);v.outgoing.set(this._hashFn(l),V),V.incoming.set(this._hashFn(r),v)}removeNode(r){const l=this._hashFn(r);this._nodes.delete(l);for(const v of this._nodes.values())v.outgoing.delete(l),v.incoming.delete(l)}lookupOrInsertNode(r){const l=this._hashFn(r);let v=this._nodes.get(l);return v||(v=new gg(r),this._nodes.set(l,v)),v}isEmpty(){return this._nodes.size===0}toString(){const r=[];for(const[l,v]of this._nodes)r.push(`${l}, (incoming)[${[...v.incoming.keys()].join(", ")}], (outgoing)[${[...v.outgoing.keys()].join(",")}]`);return r.join(` `)}findCycleSlow(){for(const[r,l]of this._nodes){const v=new Set([r]),V=this._findCycle(l,v);if(V)return V}}_findCycle(r,l){for(const[v,V]of r.outgoing){if(l.has(v))return[...l,v].join(" -> ");l.add(v);const G=this._findCycle(V,l);if(G)return G;l.delete(v)}}}var mg=f(30657);const pg=!1;class Ec extends Error{constructor(r){var l;super("cyclic dependency between services"),this.message=(l=r.findCycleSlow())!==null&&l!==void 0?l:`UNABLE to detect cycle, dumping graph: ${r.toString()}`}}class qr{constructor(r=new mg.a,l=!1,v){this._activeInstantiations=new Set,this._services=r,this._strict=l,this._parent=v,this._services.set(Mn._Y,this)}createChild(r){return new qr(r,this._strict,this)}invokeFunction(r,...l){const v=ko.traceInvocation(r);let V=!1;try{return r({get:ae=>{if(V)throw(0,pe.iH)("service accessor is only valid during the invocation of its target method");const me=this._getOrCreateServiceInstance(ae,v);if(!me)throw new Error(`[invokeFunction] unknown service '${ae}'`);return me}},...l)}finally{V=!0,v.stop()}}createInstance(r,...l){let v,V;return r instanceof Jr.d?(v=ko.traceCreation(r.ctor),V=this._createInstance(r.ctor,r.staticArguments.concat(l),v)):(v=ko.traceCreation(r),V=this._createInstance(r,l,v)),v.stop(),V}_createInstance(r,l=[],v){const V=Mn._$.getServiceDependencies(r).sort((me,Ne)=>me.index-Ne.index),G=[];for(const me of V){const Ne=this._getOrCreateServiceInstance(me.id,v);Ne||this._throwIfStrict(`[createInstance] ${r.name} depends on UNKNOWN service ${me.id}.`,!1),G.push(Ne)}const ae=V.length>0?V[0].index:l.length;if(l.length!==ae){console.trace(`[createInstance] First service dependency of ${r.name} at position ${ae+1} conflicts with ${l.length} static arguments`);const me=ae-l.length;me>0?l=l.concat(new Array(me)):l=l.slice(0,ae)}return new r(...l,...G)}_setServiceInstance(r,l){if(this._services.get(r)instanceof Jr.d)this._services.set(r,l);else if(this._parent)this._parent._setServiceInstance(r,l);else throw new Error("illegalState - setting UNKNOWN service instance")}_getServiceInstanceOrDescriptor(r){const l=this._services.get(r);return!l&&this._parent?this._parent._getServiceInstanceOrDescriptor(r):l}_getOrCreateServiceInstance(r,l){const v=this._getServiceInstanceOrDescriptor(r);return v instanceof Jr.d?this._safeCreateAndCacheServiceInstance(r,v,l.branch(r,!0)):(l.branch(r,!1),v)}_safeCreateAndCacheServiceInstance(r,l,v){if(this._activeInstantiations.has(r))throw new Error(`illegal state - RECURSIVELY instantiating service '${r}'`);this._activeInstantiations.add(r);try{return this._createAndCacheServiceInstance(r,l,v)}finally{this._activeInstantiations.delete(r)}}_createAndCacheServiceInstance(r,l,v){const V=new fg(me=>me.id.toString());let G=0;const ae=[{id:r,desc:l,_trace:v}];for(;ae.length;){const me=ae.pop();if(V.lookupOrInsertNode(me),G++>1e3)throw new Ec(V);for(const Ne of Mn._$.getServiceDependencies(me.desc.ctor)){const Ve=this._getServiceInstanceOrDescriptor(Ne.id);if(Ve||this._throwIfStrict(`[createInstance] ${r} depends on ${Ne.id} which is NOT registered.`,!0),Ve instanceof Jr.d){const Ge={id:Ne.id,desc:Ve,_trace:me._trace.branch(Ne.id,!0)};V.insertEdge(me,Ge),ae.push(Ge)}}}for(;;){const me=V.roots();if(me.length===0){if(!V.isEmpty())throw new Ec(V);break}for(const{data:Ne}of me){if(this._getServiceInstanceOrDescriptor(Ne.id)instanceof Jr.d){const Ge=this._createServiceInstanceWithOwner(Ne.id,Ne.desc.ctor,Ne.desc.staticArguments,Ne.desc.supportsDelayedInstantiation,Ne._trace);this._setServiceInstance(Ne.id,Ge)}V.removeNode(Ne)}}return this._getServiceInstanceOrDescriptor(r)}_createServiceInstanceWithOwner(r,l,v=[],V,G){if(this._services.get(r)instanceof Jr.d)return this._createServiceInstance(l,v,V,G);if(this._parent)return this._parent._createServiceInstanceWithOwner(r,l,v,V,G);throw new Error(`illegalState - creating UNKNOWN service instance ${l.name}`)}_createServiceInstance(r,l=[],v,V){if(v){const G=new ee.kb(()=>this._createInstance(r,l,V));return new Proxy(Object.create(null),{get(ae,me){if(me in ae)return ae[me];const Ne=G.value;let Ve=Ne[me];return typeof Ve!="function"||(Ve=Ve.bind(Ne),ae[me]=Ve),Ve},set(ae,me,Ne){return G.value[me]=Ne,!0}})}else return this._createInstance(r,l,V)}_throwIfStrict(r,l){if(l&&console.warn(r),this._strict)throw new Error(r)}}class ko{constructor(r,l){this.type=r,this.name=l,this._start=Date.now(),this._dep=[]}static traceInvocation(r){return pg?new ko(1,r.name||r.toString().substring(0,42).replace(/\n/g,"")):ko._None}static traceCreation(r){return pg?new ko(0,r.name):ko._None}branch(r,l){const v=new ko(2,r.toString());return this._dep.push([r,l,v]),v}stop(){const r=Date.now()-this._start;ko._totals+=r;let l=!1;function v(G,ae){const me=[],Ne=new Array(G+1).join(" ");for(const[Ve,Ge,mt]of ae._dep)if(Ge&&mt){l=!0,me.push(`${Ne}CREATES -> ${Ve}`);const ti=v(G+1,mt);ti&&me.push(ti)}else me.push(`${Ne}uses -> ${Ve}`);return me.join(` `)}const V=[`${this.type===0?"CREATE":"CALL"} ${this.name}`,`${v(1,this)}`,`DONE, took ${r.toFixed(2)}ms (grand total ${ko._totals.toFixed(2)}ms)`];(r>2||l)&&console.log(V.join(` `))}}ko._None=new class extends ko{constructor(){super(-1,null)}stop(){}branch(){return this}},ko._totals=0;class O_{constructor(){this._byResource=new Us.fT,this._byOwner=new Map}set(r,l,v){let V=this._byResource.get(r);V||(V=new Map,this._byResource.set(r,V)),V.set(l,v);let G=this._byOwner.get(l);G||(G=new Us.fT,this._byOwner.set(l,G)),G.set(r,v)}get(r,l){const v=this._byResource.get(r);return v?.get(l)}delete(r,l){let v=!1,V=!1;const G=this._byResource.get(r);G&&(v=G.delete(l));const ae=this._byOwner.get(l);if(ae&&(V=ae.delete(r)),v!==V)throw new Error("illegal state");return v&&V}values(r){var l,v,V,G;return typeof r=="string"?(v=(l=this._byOwner.get(r))===null||l===void 0?void 0:l.values())!==null&&v!==void 0?v:Fr.f.empty():x.r.isUri(r)?(G=(V=this._byResource.get(r))===null||V===void 0?void 0:V.values())!==null&&G!==void 0?G:Fr.f.empty():Fr.f.map(Fr.f.concat(...this._byOwner.values()),ae=>ae[1])}}class xc{constructor(r){this.errors=0,this.infos=0,this.warnings=0,this.unknowns=0,this._data=new Us.fT,this._service=r,this._subscription=r.onMarkerChanged(this._update,this)}dispose(){this._subscription.dispose()}_update(r){for(const l of r){const v=this._data.get(l);v&&this._substract(v);const V=this._resourceStats(l);this._add(V),this._data.set(l,V)}}_resourceStats(r){const l={errors:0,warnings:0,infos:0,unknowns:0};if(r.scheme===ls.ny.inMemory||r.scheme===ls.ny.walkThrough||r.scheme===ls.ny.walkThroughSnippet||r.scheme===ls.ny.vscodeSourceControl)return l;for(const{severity:v}of this._service.read({resource:r}))v===mo.cj.Error?l.errors+=1:v===mo.cj.Warning?l.warnings+=1:v===mo.cj.Info?l.infos+=1:l.unknowns+=1;return l}_substract(r){this.errors-=r.errors,this.warnings-=r.warnings,this.infos-=r.infos,this.unknowns-=r.unknowns}_add(r){this.errors+=r.errors,this.warnings+=r.warnings,this.infos+=r.infos,this.unknowns+=r.unknowns}}class ea{constructor(){this._onMarkerChanged=new te.uI({delay:0,merge:ea._merge}),this.onMarkerChanged=this._onMarkerChanged.event,this._data=new O_,this._stats=new xc(this)}dispose(){this._stats.dispose(),this._onMarkerChanged.dispose()}remove(r,l){for(const v of l||[])this.changeOne(r,v,[])}changeOne(r,l,v){if((0,Ct.Ct)(v))this._data.delete(l,r)&&this._onMarkerChanged.fire([l]);else{const V=[];for(const G of v){const ae=ea._toMarker(r,l,G);ae&&V.push(ae)}this._data.set(l,r,V),this._onMarkerChanged.fire([l])}}static _toMarker(r,l,v){let{code:V,severity:G,message:ae,source:me,startLineNumber:Ne,startColumn:Ve,endLineNumber:Ge,endColumn:mt,relatedInformation:ti,tags:Si}=v;if(ae)return Ne=Ne>0?Ne:1,Ve=Ve>0?Ve:1,Ge=Ge>=Ne?Ge:Ne,mt=mt>0?mt:Ve,{resource:l,owner:r,code:V,severity:G,message:ae,source:me,startLineNumber:Ne,startColumn:Ve,endLineNumber:Ge,endColumn:mt,relatedInformation:ti,tags:Si}}changeAll(r,l){const v=[],V=this._data.values(r);if(V)for(const G of V){const ae=Fr.f.first(G);ae&&(v.push(ae.resource),this._data.delete(ae.resource,r))}if((0,Ct.EI)(l)){const G=new Us.fT;for(const{resource:ae,marker:me}of l){const Ne=ea._toMarker(r,ae,me);if(!Ne)continue;const Ve=G.get(ae);Ve?Ve.push(Ne):(G.set(ae,[Ne]),v.push(ae))}for(const[ae,me]of G)this._data.set(ae,r,me)}v.length>0&&this._onMarkerChanged.fire(v)}read(r=Object.create(null)){let{owner:l,resource:v,severities:V,take:G}=r;if((!G||G<0)&&(G=-1),l&&v){const ae=this._data.get(v,l);if(ae){const me=[];for(const Ne of ae)if(ea._accept(Ne,V)){const Ve=me.push(Ne);if(G>0&&Ve===G)break}return me}else return[]}else if(!l&&!v){const ae=[];for(const me of this._data.values())for(const Ne of me)if(ea._accept(Ne,V)){const Ve=ae.push(Ne);if(G>0&&Ve===G)return ae}return ae}else{const ae=this._data.values(v??l),me=[];for(const Ne of ae)for(const Ve of Ne)if(ea._accept(Ve,V)){const Ge=me.push(Ve);if(G>0&&Ge===G)return me}return me}}static _accept(r,l){return l===void 0||(l&r.severity)===r.severity}static _merge(r){const l=new Us.fT;for(const v of r)for(const V of v)l.set(V,!0);return Array.from(l.keys())}}function Ic(ue,r,l,v,V,G){if(Array.isArray(ue)){let ae=0;for(const me of ue){const Ne=Ic(me,r,l,v,V,G);if(Ne===10)return Ne;Ne>ae&&(ae=Ne)}return ae}else{if(typeof ue=="string")return v?ue==="*"?5:ue===l?10:0:0;if(ue){const{language:ae,pattern:me,scheme:Ne,hasAccessToAllModels:Ve,notebookType:Ge}=ue;if(!v&&!Ve)return 0;Ge&&V&&(r=V);let mt=0;if(Ne)if(Ne===r.scheme)mt=10;else if(Ne==="*")mt=5;else return 0;if(ae)if(ae===l)mt=10;else if(ae==="*")mt=Math.max(mt,5);else return 0;if(Ge)if(Ge===G)mt=10;else if(Ge==="*"&&G!==void 0)mt=Math.max(mt,5);else return 0;if(me){let ti;if(typeof me=="string"?ti=me:ti=Object.assign(Object.assign({},me),{base:(0,qs.S8)(me.base)}),ti===r.fsPath||$r(ti,r.fsPath))mt=10;else return 0}return mt}else return 0}}function _g(ue){return typeof ue=="string"?!1:Array.isArray(ue)?ue.every(_g):!!ue.exclusive}class vg{constructor(r,l,v,V){this.uri=r,this.languageId=l,this.notebookUri=v,this.notebookType=V}equals(r){var l,v;return this.notebookType===r.notebookType&&this.languageId===r.languageId&&this.uri.toString()===r.uri.toString()&&((l=this.notebookUri)===null||l===void 0?void 0:l.toString())===((v=r.notebookUri)===null||v===void 0?void 0:v.toString())}}class Ls{constructor(r){this._notebookInfoResolver=r,this._clock=0,this._entries=[],this._onDidChange=new te.vl,this.onDidChange=this._onDidChange.event}register(r,l){let v={selector:r,provider:l,_score:-1,_time:this._clock++};return this._entries.push(v),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),(0,ce.s)(()=>{if(v){const V=this._entries.indexOf(v);V>=0&&(this._entries.splice(V,1),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),v=void 0)}})}has(r){return this.all(r).length>0}all(r){if(!r)return[];this._updateScores(r);const l=[];for(const v of this._entries)v._score>0&&l.push(v.provider);return l}ordered(r){const l=[];return this._orderedForEach(r,v=>l.push(v.provider)),l}orderedGroups(r){const l=[];let v,V;return this._orderedForEach(r,G=>{v&&V===G._score?v.push(G.provider):(V=G._score,v=[G.provider],l.push(v))}),l}_orderedForEach(r,l){this._updateScores(r);for(const v of this._entries)v._score>0&&l(v)}_updateScores(r){var l,v;const V=(l=this._notebookInfoResolver)===null||l===void 0?void 0:l.call(this,r.uri),G=V?new vg(r.uri,r.getLanguageId(),V.uri,V.type):new vg(r.uri,r.getLanguageId(),void 0,void 0);if(!(!((v=this._lastCandidate)===null||v===void 0)&&v.equals(G))){this._lastCandidate=G;for(const ae of this._entries)if(ae._score=Ic(ae.selector,G.uri,G.languageId,(0,N.vd)(r),G.notebookUri,G.notebookType),_g(ae.selector)&&ae._score>0){for(const me of this._entries)me._score=0;ae._score=1e3;break}this._entries.sort(Ls._compareByScoreAndTime)}}static _compareByScoreAndTime(r,l){return r._score<l._score?1:r._score>l._score?-1:r._time<l._time?1:r._time>l._time?-1:0}}class Cg{constructor(){this.referenceProvider=new Ls(this._score.bind(this)),this.renameProvider=new Ls(this._score.bind(this)),this.codeActionProvider=new Ls(this._score.bind(this)),this.definitionProvider=new Ls(this._score.bind(this)),this.typeDefinitionProvider=new Ls(this._score.bind(this)),this.declarationProvider=new Ls(this._score.bind(this)),this.implementationProvider=new Ls(this._score.bind(this)),this.documentSymbolProvider=new Ls(this._score.bind(this)),this.inlayHintsProvider=new Ls(this._score.bind(this)),this.colorProvider=new Ls(this._score.bind(this)),this.codeLensProvider=new Ls(this._score.bind(this)),this.documentFormattingEditProvider=new Ls(this._score.bind(this)),this.documentRangeFormattingEditProvider=new Ls(this._score.bind(this)),this.onTypeFormattingEditProvider=new Ls(this._score.bind(this)),this.signatureHelpProvider=new Ls(this._score.bind(this)),this.hoverProvider=new Ls(this._score.bind(this)),this.documentHighlightProvider=new Ls(this._score.bind(this)),this.selectionRangeProvider=new Ls(this._score.bind(this)),this.foldingRangeProvider=new Ls(this._score.bind(this)),this.linkProvider=new Ls(this._score.bind(this)),this.inlineCompletionsProvider=new Ls(this._score.bind(this)),this.completionProvider=new Ls(this._score.bind(this)),this.linkedEditingRangeProvider=new Ls(this._score.bind(this)),this.documentRangeSemanticTokensProvider=new Ls(this._score.bind(this)),this.documentSemanticTokensProvider=new Ls(this._score.bind(this)),this.documentOnDropEditProvider=new Ls(this._score.bind(this)),this.documentPasteEditProvider=new Ls(this._score.bind(this))}_score(r){var l;return(l=this._notebookTypeResolver)===null||l===void 0?void 0:l.call(this,r)}}(0,Bn.v)(Ot.u,Cg,!0);class Vh extends Vs{constructor(r={}){const l=_c.O.as(Cr.Fd.Configuration).getConfigurationProperties(),v=Object.keys(l),V=Object.create(null),G=[];for(const ae in l){const me=r[ae],Ne=me!==void 0?me:l[ae].default;(0,_i.kW)(V,ae,Ne,Ve=>console.error(`Conflict in default settings: ${Ve}`))}for(const ae of Object.keys(V))Cr.rC.test(ae)&&G.push({identifiers:(0,Cr.Gv)(ae),keys:Object.keys(V[ae]),contents:(0,_i.ad)(V[ae],me=>console.error(`Conflict in default settings file: ${me}`))});super(V,v,G)}}var Dr=function(ue,r,l,v){var V=arguments.length,G=V<3?r:v===null?v=Object.getOwnPropertyDescriptor(r,l):v,ae;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")G=Reflect.decorate(ue,r,l,v);else for(var me=ue.length-1;me>=0;me--)(ae=ue[me])&&(G=(V<3?ae(G):V>3?ae(r,l,G):ae(r,l))||G);return V>3&&G&&Object.defineProperty(r,l,G),G},Bs=function(ue,r){return function(l,v){r(l,v,ue)}},Zo=function(ue,r,l,v){function V(G){return G instanceof l?G:new l(function(ae){ae(G)})}return new(l||(l=Promise))(function(G,ae){function me(Ge){try{Ve(v.next(Ge))}catch(mt){ae(mt)}}function Ne(Ge){try{Ve(v.throw(Ge))}catch(mt){ae(mt)}}function Ve(Ge){Ge.done?G(Ge.value):V(Ge.value).then(me,Ne)}Ve((v=v.apply(ue,r||[])).next())})};class Pl{constructor(r){this.disposed=!1,this.model=r,this._onWillDispose=new te.vl}get textEditorModel(){return this.model}dispose(){this.disposed=!0,this._onWillDispose.fire()}}let po=class{constructor(r){this.modelService=r}createModelReference(r){const l=this.modelService.getModel(r);return l?Promise.resolve(new ce.BO(new Pl(l))):Promise.reject(new Error("Model not found"))}};po=Dr([Bs(0,Y.S)],po);class Ed{show(){return Ed.NULL_PROGRESS_RUNNER}showWhile(r,l){return Zo(this,void 0,void 0,function*(){yield r})}}Ed.NULL_PROGRESS_RUNNER={done:()=>{},total:()=>{},worked:()=>{}};class cr{withProgress(r,l,v){return l({report:()=>{}})}}class Fl{confirm(r){return this.doConfirm(r).then(l=>({confirmed:l,checkboxChecked:!1}))}doConfirm(r){let l=r.message;return r.detail&&(l=l+` `+r.detail),Promise.resolve(window.confirm(l))}show(r,l,v,V){return Promise.resolve({choice:0})}}class Bl{info(r){return this.notify({severity:M.A.Info,message:r})}warn(r){return this.notify({severity:M.A.Warning,message:r})}error(r){return this.notify({severity:M.A.Error,message:r})}notify(r){switch(r.severity){case M.A.Error:console.error(r.message);break;case M.A.Warning:console.warn(r.message);break;default:console.log(r.message);break}return Bl.NO_OP}status(r,l){return ce.jG.None}}Bl.NO_OP=new F.Kz;let Yo=class{constructor(r){this._onWillExecuteCommand=new te.vl,this._onDidExecuteCommand=new te.vl,this.onWillExecuteCommand=this._onWillExecuteCommand.event,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this._instantiationService=r}executeCommand(r,...l){const v=Ps.wb.getCommand(r);if(!v)return Promise.reject(new Error(`command '${r}' not found`));try{this._onWillExecuteCommand.fire({commandId:r,args:l});const V=this._instantiationService.invokeFunction.apply(this._instantiationService,[v.handler,...l]);return this._onDidExecuteCommand.fire({commandId:r,args:l}),Promise.resolve(V)}catch(V){return Promise.reject(V)}}};Yo=Dr([Bs(0,Mn._Y)],Yo);let Sa=class extends la{constructor(r,l,v,V,G,ae){super(r,l,v,V,G),this._cachedResolver=null,this._dynamicKeybindings=[],this._domNodeListeners=[];const me=Si=>{const tn=new ce.Cm;tn.add(Et.ko(Si,Et.Bx.KEY_DOWN,kn=>{const On=new Vi.Z(kn);this._dispatch(On,On.target)&&(On.preventDefault(),On.stopPropagation())})),tn.add(Et.ko(Si,Et.Bx.KEY_UP,kn=>{const On=new Vi.Z(kn);this._singleModifierDispatch(On,On.target)&&On.preventDefault()})),this._domNodeListeners.push(new bg(Si,tn))},Ne=Si=>{for(let tn=0;tn<this._domNodeListeners.length;tn++){const kn=this._domNodeListeners[tn];kn.domNode===Si&&(this._domNodeListeners.splice(tn,1),kn.dispose())}},Ve=Si=>{Si.getOption(56)||me(Si.getContainerDomNode())},Ge=Si=>{Si.getOption(56)||Ne(Si.getContainerDomNode())};this._register(ae.onCodeEditorAdd(Ve)),this._register(ae.onCodeEditorRemove(Ge)),ae.listCodeEditors().forEach(Ve);const mt=Si=>{me(Si.getContainerDomNode())},ti=Si=>{Ne(Si.getContainerDomNode())};this._register(ae.onDiffEditorAdd(mt)),this._register(ae.onDiffEditorRemove(ti)),ae.listDiffEditors().forEach(mt)}addDynamicKeybinding(r,l,v,V){const G=(0,Os.ZU)(l,ge.OS),ae=new ce.Cm;return G&&(this._dynamicKeybindings.push({keybinding:G.parts,command:r,when:V,weight1:1e3,weight2:0,extensionId:null,isBuiltinExtension:!1}),ae.add((0,ce.s)(()=>{for(let me=0;me<this._dynamicKeybindings.length;me++)if(this._dynamicKeybindings[me].command===r){this._dynamicKeybindings.splice(me,1),this.updateResolver();return}}))),ae.add(Ps.wb.registerCommand(r,v)),this.updateResolver(),ae}updateResolver(){this._cachedResolver=null,this._onDidUpdateKeybindings.fire()}_getResolver(){if(!this._cachedResolver){const r=this._toNormalizedKeybindingItems(Mr.f.getDefaultKeybindings(),!0),l=this._toNormalizedKeybindingItems(this._dynamicKeybindings,!1);this._cachedResolver=new hn(r,l,v=>this._log(v))}return this._cachedResolver}_documentHasFocus(){return document.hasFocus()}_toNormalizedKeybindingItems(r,l){const v=[];let V=0;for(const G of r){const ae=G.when||void 0,me=G.keybinding;if(!me)v[V++]=new jo(void 0,G.command,G.commandArgs,ae,l,null,!1);else{const Ne=da.resolveUserBinding(me,ge.OS);for(const Ve of Ne)v[V++]=new jo(Ve,G.command,G.commandArgs,ae,l,null,!1)}}return v}resolveKeyboardEvent(r){const l=new Os.h$(r.ctrlKey,r.shiftKey,r.altKey,r.metaKey,r.keyCode).toChord();return new da(l,ge.OS)}};Sa=Dr([Bs(0,rs.fN),Bs(1,Ps.wT),Bs(2,Ur.k),Bs(3,F.Ot),Bs(4,Qt.rr),Bs(5,D.T)],Sa);class bg extends ce.jG{constructor(r,l){super(),this.domNode=r,this._register(l)}}function Wl(ue){return ue&&typeof ue=="object"&&(!ue.overrideIdentifier||typeof ue.overrideIdentifier=="string")&&(!ue.resource||ue.resource instanceof x.r)}class ta{constructor(){this._onDidChangeConfiguration=new te.vl,this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._configuration=new Hr(new Vh,new Vs,new Vs,new Vs)}getValue(r,l){const v=typeof r=="string"?r:void 0,V=Wl(r)?r:Wl(l)?l:{};return this._configuration.getValue(v,V,void 0)}updateValues(r){const l={data:this._configuration.toData()},v=[];for(const V of r){const[G,ae]=V;this.getValue(G)!==ae&&(this._configuration.updateValue(G,ae),v.push(G))}if(v.length>0){const V=new ad({keys:v,overrides:[]},l,this._configuration);V.source=8,V.sourceConfig=null,this._onDidChangeConfiguration.fire(V)}return Promise.resolve()}updateValue(r,l,v,V){return this.updateValues([[r,l]])}inspect(r,l={}){return this._configuration.inspect(r,l,void 0)}}let Hh=class{constructor(r){this.configurationService=r,this._onDidChangeConfiguration=new te.vl,this.configurationService.onDidChangeConfiguration(l=>{this._onDidChangeConfiguration.fire({affectedKeys:l.affectedKeys,affectsConfiguration:(v,V)=>l.affectsConfiguration(V)})})}getValue(r,l,v){const G=(ie.y.isIPosition(l)?l:null)?typeof v=="string"?v:void 0:typeof l=="string"?l:void 0;return typeof G>"u"?this.configurationService.getValue():this.configurationService.getValue(G)}};Hh=Dr([Bs(0,_i.pG)],Hh);let Nc=class{constructor(r){this.configurationService=r}getEOL(r,l){const v=this.configurationService.getValue("files.eol",{overrideIdentifier:l,resource:r});return v&&typeof v=="string"&&v!=="auto"?v:ge.j9||ge.zx?` `:`\r `}};Nc=Dr([Bs(0,_i.pG)],Nc);class _m{publicLog(r,l){return Promise.resolve(void 0)}publicLog2(r,l){return this.publicLog(r,l)}}class Mc{constructor(){const r=x.r.from({scheme:Mc.SCHEME,authority:"model",path:"/"});this.workspace={id:"4064f6ec-cb38-4ad0-af64-ee6467e63c82",folders:[new Ko.mX({uri:r,name:"",index:0})]}}getWorkspace(){return this.workspace}getWorkspaceFolder(r){return r&&r.scheme===Mc.SCHEME?this.workspace.folders[0]:null}}Mc.SCHEME="inmemory";function Tc(ue,r,l){if(!r||!(ue instanceof ta))return;const v=[];Object.keys(r).forEach(V=>{(0,ns.vf)(V)&&v.push([`editor.${V}`,r[V]]),l&&(0,ns.Gn)(V)&&v.push([`diffEditor.${V}`,r[V]])}),v.length>0&&ue.updateValues(v)}let zh=class{constructor(r){this._modelService=r}hasPreviewHandler(){return!1}apply(r,l){return Zo(this,void 0,void 0,function*(){const v=new Map;for(const ae of r){if(!(ae instanceof bo.cw))throw new Error("bad edit - only text edits are supported");const me=this._modelService.getModel(ae.resource);if(!me)throw new Error("bad edit - model not found");if(typeof ae.versionId=="number"&&me.getVersionId()!==ae.versionId)throw new Error("bad state - model changed in the meantime");let Ne=v.get(me);Ne||(Ne=[],v.set(me,Ne)),Ne.push(oo.k.replaceMove(Q.Q.lift(ae.textEdit.range),ae.textEdit.text))}let V=0,G=0;for(const[ae,me]of v)ae.pushStackElement(),ae.pushEditOperations([],me,()=>[]),ae.pushStackElement(),G+=1,V+=me.length;return{ariaSummary:d.GP(ca.tu.bulkEditServiceSummary,V,G)}})}};zh=Dr([Bs(0,Y.S)],zh);class vm{getUriLabel(r,l){return r.scheme==="file"?r.fsPath:r.path}getUriBasenameLabel(r){return(0,_r.P8)(r)}}let Uh=class extends hl{constructor(r,l){super(r),this._codeEditorService=l}showContextView(r,l,v){if(!l){const V=this._codeEditorService.getFocusedCodeEditor()||this._codeEditorService.getActiveCodeEditor();V&&(l=V.getContainerDomNode())}return super.showContextView(r,l,v)}};Uh=Dr([Bs(0,fs),Bs(1,D.T)],Uh);class wg{constructor(){this._neverEmitter=new te.vl,this.onDidChangeTrust=this._neverEmitter.event}isWorkspaceTrusted(){return!0}}class Sg extends br{constructor(){super()}}class jh extends Qt.Kc{constructor(){super(new Qt.Cr)}}let xd=class extends or{constructor(r,l,v,V,G){super(r,l,v,V,G),this.configure({blockMouse:!1})}};xd=Dr([Bs(0,Ur.k),Bs(1,F.Ot),Bs(2,ms.l),Bs(3,Cs.b),Bs(4,ts.Gy)],xd),(0,Bn.v)(_i.pG,ta),(0,Bn.v)(nt.U,Hh),(0,Bn.v)(nt.J,Nc),(0,Bn.v)(Ko.VR,Mc),(0,Bn.v)(uc.L,vm),(0,Bn.v)(Ur.k,_m),(0,Bn.v)(p.X,Fl),(0,Bn.v)(F.Ot,Bl),(0,Bn.v)(mo.DR,ea),(0,Bn.v)(H.L,Sg),(0,Bn.v)(Do.L,pm.Sx),(0,Bn.v)(Qt.rr,jh),(0,Bn.v)(Y.S,og.JW),(0,Bn.v)(Rh.A,Ll),(0,Bn.v)(rs.fN,Xa),(0,Bn.v)(pr.G5,cr),(0,Bn.v)(pr.N8,Ed),(0,Bn.v)(wd.CS,wd.pc),(0,Bn.v)(Ts.w,ni),(0,Bn.v)(bo.nu,zh),(0,Bn.v)(er.L,wg),(0,Bn.v)(go.b,po),(0,Bn.v)(eo.j,Pr),(0,Bn.v)(Ns.PE,Ns.aG),(0,Bn.v)(Ps.wT,Yo),(0,Bn.v)(Cs.b,Sa),(0,Bn.v)(vd.GK,Ph),(0,Bn.v)(ms.l,Uh),(0,Bn.v)(pa.Cr,rr),(0,Bn.v)(Fh.h,Lc),(0,Bn.v)(ms.Z,xd),(0,Bn.v)(co.ez,Al);var an;(function(ue){const r=new mg.a;for(const[ae,me]of(0,Bn.N)())r.set(ae,me);const l=new qr(r,!0);r.set(Mn._Y,l);function v(ae){const me=r.get(ae);if(!me)throw new Error("Missing service "+ae);return me instanceof Jr.d?l.invokeFunction(Ne=>Ne.get(ae)):me}ue.get=v;let V=!1;function G(ae){if(V)return l;V=!0;for(const[me,Ne]of(0,Bn.N)())r.get(me)||r.set(me,Ne);for(const me in ae)if(ae.hasOwnProperty(me)){const Ne=(0,Mn.u1)(me);r.get(Ne)instanceof Jr.d&&r.set(Ne,ae[me])}return l}ue.initialize=G})(an||(an={}));var Rc=function(ue,r,l,v){var V=arguments.length,G=V<3?r:v===null?v=Object.getOwnPropertyDescriptor(r,l):v,ae;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")G=Reflect.decorate(ue,r,l,v);else for(var me=ue.length-1;me>=0;me--)(ae=ue[me])&&(G=(V<3?ae(G):V>3?ae(r,l,G):ae(r,l))||G);return V>3&&G&&Object.defineProperty(r,l,G),G},ss=function(ue,r){return function(l,v){r(l,v,ue)}};let Ac=0,Kh=!1;function $h(ue){if(!ue){if(Kh)return;Kh=!0}wn.vr(ue||document.body)}let Vl=class extends yn.x{constructor(r,l,v,V,G,ae,me,Ne,Ve,Ge,mt,ti){const Si=Object.assign({},l);Si.ariaLabel=Si.ariaLabel||ca.vp.editorViewAccessibleLabel,Si.ariaLabel=Si.ariaLabel+";"+ca.vp.accessibilityHelpMessage,super(r,Si,{},v,V,G,ae,Ne,Ve,Ge,mt,ti),me instanceof Sa?this._standaloneKeybindingService=me:this._standaloneKeybindingService=null,$h(Si.ariaContainerElement)}addCommand(r,l,v){if(!this._standaloneKeybindingService)return console.warn("Cannot add command because the editor is configured with an unrecognized KeybindingService"),null;const V="DYNAMIC_"+ ++Ac,G=rs.M$.deserialize(v);return this._standaloneKeybindingService.addDynamicKeybinding(V,r,l,G),V}createContextKey(r,l){return this._contextKeyService.createKey(r,l)}addAction(r){if(typeof r.id!="string"||typeof r.label!="string"||typeof r.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"),ce.jG.None;const l=r.id,v=r.label,V=rs.M$.and(rs.M$.equals("editorId",this.getId()),rs.M$.deserialize(r.precondition)),G=r.keybindings,ae=rs.M$.and(V,rs.M$.deserialize(r.keybindingContext)),me=r.contextMenuGroupId||null,Ne=r.contextMenuOrder||0,Ve=(Si,...tn)=>Promise.resolve(r.run(this,...tn)),Ge=new ce.Cm,mt=this.getId()+":"+l;if(Ge.add(Ps.wb.registerCommand(mt,Ve)),me){const Si={command:{id:mt,title:v},when:V,group:me,order:Ne};Ge.add(co.ZG.appendMenuItem(co.D8.EditorContext,Si))}if(Array.isArray(G))for(const Si of G)Ge.add(this._standaloneKeybindingService.addDynamicKeybinding(mt,Si,Ve,ae));const ti=new Ms.f(mt,v,v,V,Ve,this._contextKeyService);return this._actions[l]=ti,Ge.add((0,ce.s)(()=>{delete this._actions[l]})),Ge}_triggerCommand(r,l){if(this._codeEditorService instanceof nn)try{this._codeEditorService.setActiveCodeEditor(this),super._triggerCommand(r,l)}finally{this._codeEditorService.setActiveCodeEditor(null)}else super._triggerCommand(r,l)}};Vl=Rc([ss(2,Mn._Y),ss(3,D.T),ss(4,Ps.wT),ss(5,rs.fN),ss(6,Cs.b),ss(7,ts.Gy),ss(8,F.Ot),ss(9,eo.j),ss(10,B.JZ),ss(11,Ot.u)],Vl);let Ja=class extends Vl{constructor(r,l,v,V,G,ae,me,Ne,Ve,Ge,mt,ti,Si,tn,kn){const On=Object.assign({},l);Tc(Ge,On,!1);const as=Ne.registerEditorContainer(r);typeof On.theme=="string"&&Ne.setTheme(On.theme),typeof On.autoDetectHighContrast<"u"&&Ne.setAutoDetectHighContrast(!!On.autoDetectHighContrast);const qn=On.model;delete On.model,super(r,On,v,V,G,ae,me,Ne,Ve,mt,tn,kn),this._configurationService=Ge,this._standaloneThemeService=Ne,this._register(as);let Pn;if(typeof qn>"u"){const Qn=Si.getLanguageIdByMimeType(On.language)||On.language||Ys.vH;Pn=ia(ti,Si,On.value||"",Qn,void 0),this._ownsModel=!0}else Pn=qn,this._ownsModel=!1;if(this._attachModel(Pn),Pn){const Qn={oldModelUrl:null,newModelUrl:Pn.uri};this._onDidChangeModel.fire(Qn)}}dispose(){super.dispose()}updateOptions(r){Tc(this._configurationService,r,!1),typeof r.theme=="string"&&this._standaloneThemeService.setTheme(r.theme),typeof r.autoDetectHighContrast<"u"&&this._standaloneThemeService.setAutoDetectHighContrast(!!r.autoDetectHighContrast),super.updateOptions(r)}_postDetachModelCleanup(r){super._postDetachModelCleanup(r),r&&this._ownsModel&&(r.dispose(),this._ownsModel=!1)}};Ja=Rc([ss(2,Mn._Y),ss(3,D.T),ss(4,Ps.wT),ss(5,rs.fN),ss(6,Cs.b),ss(7,Do.L),ss(8,F.Ot),ss(9,_i.pG),ss(10,eo.j),ss(11,Y.S),ss(12,H.L),ss(13,B.JZ),ss(14,Ot.u)],Ja);let Tn=class extends uo.T{constructor(r,l,v,V,G,ae,me,Ne,Ve,Ge,mt,ti){const Si=Object.assign({},l);Tc(Ve,Si,!0);const tn=me.registerEditorContainer(r);typeof Si.theme=="string"&&me.setTheme(Si.theme),typeof Si.autoDetectHighContrast<"u"&&me.setAutoDetectHighContrast(!!Si.autoDetectHighContrast),super(r,Si,{},ti,G,V,v,ae,me,Ne,Ge,mt),this._configurationService=Ve,this._standaloneThemeService=me,this._register(tn)}dispose(){super.dispose()}updateOptions(r){Tc(this._configurationService,r,!0),typeof r.theme=="string"&&this._standaloneThemeService.setTheme(r.theme),typeof r.autoDetectHighContrast<"u"&&this._standaloneThemeService.setAutoDetectHighContrast(!!r.autoDetectHighContrast),super.updateOptions(r)}_createInnerEditor(r,l,v){return r.createInstance(Vl,l,v)}getOriginalEditor(){return super.getOriginalEditor()}getModifiedEditor(){return super.getModifiedEditor()}addCommand(r,l,v){return this.getModifiedEditor().addCommand(r,l,v)}createContextKey(r,l){return this.getModifiedEditor().createContextKey(r,l)}addAction(r){return this.getModifiedEditor().addAction(r)}};Tn=Rc([ss(2,Mn._Y),ss(3,rs.fN),ss(4,Ts.w),ss(5,D.T),ss(6,Do.L),ss(7,F.Ot),ss(8,_i.pG),ss(9,ms.Z),ss(10,pr.N8),ss(11,Fh.h)],Tn);function ia(ue,r,l,v,V){if(l=l||"",!v){const G=l.indexOf(` `);let ae=l;return G!==-1&&(ae=l.substring(0,G)),yg(ue,l,r.createByFilepathOrFirstLine(V||null,ae),V)}return yg(ue,l,r.createById(v),V)}function yg(ue,r,l,v){return ue.createModel(r,l,v)}function Id(ue,r,l){return an.initialize(l||{}).createInstance(Ja,ue,r)}function Nd(ue){return an.get(D.T).onCodeEditorAdd(l=>{ue(l)})}function Cm(ue){return an.get(D.T).onDiffEditorAdd(l=>{ue(l)})}function bm(){return an.get(D.T).listCodeEditors()}function Gh(){return an.get(D.T).listDiffEditors()}function Qh(ue,r,l){return an.initialize(l||{}).createInstance(Tn,ue,r)}function wm(ue,r){return new L.b(ue,r)}function Sm(ue,r,l){const v=an.get(H.L),V=v.getLanguageIdByMimeType(r)||r;return ia(an.get(Y.S),v,ue,V,l)}function Oc(ue,r){const l=an.get(H.L);an.get(Y.S).setMode(ue,l.createById(r))}function Lg(ue,r,l){ue&&an.get(mo.DR).changeOne(r,ue.uri,l)}function ym(ue){an.get(mo.DR).changeAll(ue,[])}function Hl(ue){return an.get(mo.DR).read(ue)}function Zh(ue){return an.get(mo.DR).onMarkerChanged(ue)}function Pc(ue){return an.get(Y.S).getModel(ue)}function Dg(){return an.get(Y.S).getModels()}function Fc(ue){return an.get(Y.S).onModelAdded(ue)}function Lm(ue){return an.get(Y.S).onModelRemoved(ue)}function qa(ue){return an.get(Y.S).onModelLanguageChanged(l=>{ue({model:l.model,oldLanguage:l.oldLanguageId})})}function Yh(ue){return ri(an.get(Y.S),an.get(B.JZ),ue)}function Bc(ue,r){const l=an.get(H.L),v=an.get(Do.L);return v.registerEditorContainer(ue),Gn.colorizeElement(v,l,ue,r)}function Xh(ue,r,l){const v=an.get(H.L);return an.get(Do.L).registerEditorContainer(document.body),Gn.colorize(v,ue,r,l)}function Md(ue,r,l=4){return an.get(Do.L).registerEditorContainer(document.body),Gn.colorizeModelLine(ue,r,l)}function kg(ue){const r=z.dG.get(ue);return r||{getInitialState:()=>T.r3,tokenize:(l,v,V)=>(0,T.$H)(ue,V)}}function Dm(ue,r){z.dG.getOrCreate(r);const l=kg(r),v=(0,d.uz)(ue),V=[];let G=l.getInitialState();for(let ae=0,me=v.length;ae<me;ae++){const Ne=v[ae],Ve=l.tokenize(Ne,!0,G);V[ae]=Ve.tokens,G=Ve.endState}return V}function Eg(ue,r){an.get(Do.L).defineTheme(ue,r)}function xg(ue){an.get(Do.L).setTheme(ue)}function Ig(){w.T.clearAllFontInfos()}function Ng(ue,r){return Ps.wb.registerCommand({id:ue,handler:r})}function km(){return{create:Id,getEditors:bm,getDiffEditors:Gh,onDidCreateEditor:Nd,onDidCreateDiffEditor:Cm,createDiffEditor:Qh,createDiffNavigator:wm,createModel:Sm,setModelLanguage:Oc,setModelMarkers:Lg,getModelMarkers:Hl,removeAllMarkers:ym,onDidChangeMarkers:Zh,getModels:Dg,getModel:Pc,onDidCreateModel:Fc,onWillDisposeModel:Lm,onDidChangeModelLanguage:qa,createWebWorker:Yh,colorizeElement:Bc,colorize:Xh,colorizeModelLine:Md,tokenize:Dm,defineTheme:Eg,setTheme:xg,remeasureFonts:Ig,registerCommand:Ng,AccessibilitySupport:S.Gn,ContentWidgetPositionPreference:S.Qj,CursorChangeReason:S.h5,DefaultEndOfLine:S.of,EditorAutoIndentStrategy:S.e0,EditorOption:S.p2,EndOfLinePreference:S.kf,EndOfLineSequence:S.WU,MinimapPosition:S.R3,MouseTargetType:S.hS,OverlayWidgetPositionPreference:S.dE,OverviewRulerLane:S.A5,RenderLineNumbersType:S.DO,RenderMinimap:S.Ah,ScrollbarVisibility:S.XR,ScrollType:S.ov,TextEditorCursorBlinkingStyle:S.U7,TextEditorCursorStyle:S.m9,TrackedRangeStickiness:S.kK,WrappingIndent:S.tJ,InjectedTextCursorStops:S.VW,PositionAffinity:S.Ic,ConfigurationChangedEvent:I.lw,BareFontInfo:k._8,FontInfo:k.YJ,TextModelResolvedOptions:N.X2,FindMatch:N.Dg,ApplyUpdateResult:I.hZ,EditorType:j._,EditorOptions:I.qB}}function Jh(ue,r){if(!r||!Array.isArray(r))return!1;for(const l of r)if(!ue(l))return!1;return!0}function Td(ue,r){return typeof ue=="boolean"?ue:r}function Mg(ue,r){return typeof ue=="string"?ue:r}function Ho(ue){const r={};for(const l of ue)r[l]=!0;return r}function Tg(ue,r=!1){r&&(ue=ue.map(function(v){return v.toLowerCase()}));const l=Ho(ue);return r?function(v){return l[v.toLowerCase()]!==void 0&&l.hasOwnProperty(v.toLowerCase())}:function(v){return l[v]!==void 0&&l.hasOwnProperty(v)}}function Rd(ue,r){r=r.replace(/@@/g,"");let l=0,v;do v=!1,r=r.replace(/@(\w+)/g,function(G,ae){v=!0;let me="";if(typeof ue[ae]=="string")me=ue[ae];else if(ue[ae]&&ue[ae]instanceof RegExp)me=ue[ae].source;else throw ue[ae]===void 0?Oi(ue,"language definition does not contain attribute '"+ae+"', used at: "+r):Oi(ue,"attribute reference '"+ae+"' must be a string, used at: "+r);return qi(me)?"":"(?:"+me+")"}),l++;while(v&&l<5);r=r.replace(/\x01/g,"@");const V=(ue.ignoreCase?"i":"")+(ue.unicode?"u":"");return new RegExp(r,V)}function Em(ue,r,l,v){if(v<0)return ue;if(v<r.length)return r[v];if(v>=100){v=v-100;const V=l.split(".");if(V.unshift(l),v<V.length)return V[v]}return null}function Rg(ue,r,l,v){let V=-1,G=l,ae=l.match(/^\$(([sS]?)(\d\d?)|#)(.*)$/);ae&&(ae[3]&&(V=parseInt(ae[3]),ae[2]&&(V=V+100)),G=ae[4]);let me="~",Ne=G;!G||G.length===0?(me="!=",Ne=""):/^\w*$/.test(Ne)?me="==":(ae=G.match(/^(@|!@|~|!~|==|!=)(.*)$/),ae&&(me=ae[1],Ne=ae[2]));let Ve;if((me==="~"||me==="!~")&&/^(\w|\|)*$/.test(Ne)){const Ge=Tg(Ne.split("|"),ue.ignoreCase);Ve=function(mt){return me==="~"?Ge(mt):!Ge(mt)}}else if(me==="@"||me==="!@"){const Ge=ue[Ne];if(!Ge)throw Oi(ue,"the @ match target '"+Ne+"' is not defined, in rule: "+r);if(!Jh(function(ti){return typeof ti=="string"},Ge))throw Oi(ue,"the @ match target '"+Ne+"' must be an array of strings, in rule: "+r);const mt=Tg(Ge,ue.ignoreCase);Ve=function(ti){return me==="@"?mt(ti):!mt(ti)}}else if(me==="~"||me==="!~")if(Ne.indexOf("$")<0){const Ge=Rd(ue,"^"+Ne+"$");Ve=function(mt){return me==="~"?Ge.test(mt):!Ge.test(mt)}}else Ve=function(Ge,mt,ti,Si){return Rd(ue,"^"+Fi(ue,Ne,mt,ti,Si)+"$").test(Ge)};else if(Ne.indexOf("$")<0){const Ge=Pi(ue,Ne);Ve=function(mt){return me==="=="?mt===Ge:mt!==Ge}}else{const Ge=Pi(ue,Ne);Ve=function(mt,ti,Si,tn,kn){const On=Fi(ue,Ge,ti,Si,tn);return me==="=="?mt===On:mt!==On}}return V===-1?{name:l,value:v,test:function(Ge,mt,ti,Si){return Ve(Ge,Ge,mt,ti,Si)}}:{name:l,value:v,test:function(Ge,mt,ti,Si){const tn=Em(Ge,mt,ti,V);return Ve(tn||"",Ge,mt,ti,Si)}}}function qh(ue,r,l){if(l){if(typeof l=="string")return l;if(l.token||l.token===""){if(typeof l.token!="string")throw Oi(ue,"a 'token' attribute must be of type string, in rule: "+r);{const v={token:l.token};if(l.token.indexOf("$")>=0&&(v.tokenSubst=!0),typeof l.bracket=="string")if(l.bracket==="@open")v.bracket=1;else if(l.bracket==="@close")v.bracket=-1;else throw Oi(ue,"a 'bracket' attribute must be either '@open' or '@close', in rule: "+r);if(l.next){if(typeof l.next!="string")throw Oi(ue,"the next state must be a string value in rule: "+r);{let V=l.next;if(!/^(@pop|@push|@popall)$/.test(V)&&(V[0]==="@"&&(V=V.substr(1)),V.indexOf("$")<0&&!rn(ue,Fi(ue,V,"",[],""))))throw Oi(ue,"the next state '"+l.next+"' is not defined in rule: "+r);v.next=V}}return typeof l.goBack=="number"&&(v.goBack=l.goBack),typeof l.switchTo=="string"&&(v.switchTo=l.switchTo),typeof l.log=="string"&&(v.log=l.log),typeof l.nextEmbedded=="string"&&(v.nextEmbedded=l.nextEmbedded,ue.usesEmbedded=!0),v}}else if(Array.isArray(l)){const v=[];for(let V=0,G=l.length;V<G;V++)v[V]=qh(ue,r,l[V]);return{group:v}}else if(l.cases){const v=[];for(const G in l.cases)if(l.cases.hasOwnProperty(G)){const ae=qh(ue,r,l.cases[G]);G==="@default"||G==="@"||G===""?v.push({test:void 0,value:ae,name:G}):G==="@eos"?v.push({test:function(me,Ne,Ve,Ge){return Ge},value:ae,name:G}):v.push(Rg(ue,r,G,ae))}const V=ue.defaultToken;return{test:function(G,ae,me,Ne){for(const Ve of v)if(!Ve.test||Ve.test(G,ae,me,Ne))return Ve.value;return V}}}else throw Oi(ue,"an action must be a string, an object with a 'token' or 'cases' attribute, or an array of actions; in rule: "+r)}else return{token:""}}class eu{constructor(r){this.regex=new RegExp(""),this.action={token:""},this.matchOnlyAtLineStart=!1,this.name="",this.name=r}setRegex(r,l){let v;if(typeof l=="string")v=l;else if(l instanceof RegExp)v=l.source;else throw Oi(r,"rules must start with a match string or regular expression: "+this.name);this.matchOnlyAtLineStart=v.length>0&&v[0]==="^",this.name=this.name+": "+v,this.regex=Rd(r,"^(?:"+(this.matchOnlyAtLineStart?v.substr(1):v)+")")}setAction(r,l){this.action=qh(r,this.name,l)}}function Br(ue,r){if(!r||typeof r!="object")throw new Error("Monarch: expecting a language definition object");const l={};l.languageId=ue,l.includeLF=Td(r.includeLF,!1),l.noThrow=!1,l.maxStack=100,l.start=typeof r.start=="string"?r.start:null,l.ignoreCase=Td(r.ignoreCase,!1),l.unicode=Td(r.unicode,!1),l.tokenPostfix=Mg(r.tokenPostfix,"."+l.languageId),l.defaultToken=Mg(r.defaultToken,"source"),l.usesEmbedded=!1;const v=r;v.languageId=ue,v.includeLF=l.includeLF,v.ignoreCase=l.ignoreCase,v.unicode=l.unicode,v.noThrow=l.noThrow,v.usesEmbedded=l.usesEmbedded,v.stateNames=r.tokenizer,v.defaultToken=l.defaultToken;function V(ae,me,Ne){for(const Ve of Ne){let Ge=Ve.include;if(Ge){if(typeof Ge!="string")throw Oi(l,"an 'include' attribute must be a string at: "+ae);if(Ge[0]==="@"&&(Ge=Ge.substr(1)),!r.tokenizer[Ge])throw Oi(l,"include target '"+Ge+"' is not defined at: "+ae);V(ae+"."+Ge,me,r.tokenizer[Ge])}else{const mt=new eu(ae);if(Array.isArray(Ve)&&Ve.length>=1&&Ve.length<=3)if(mt.setRegex(v,Ve[0]),Ve.length>=3)if(typeof Ve[1]=="string")mt.setAction(v,{token:Ve[1],next:Ve[2]});else if(typeof Ve[1]=="object"){const ti=Ve[1];ti.next=Ve[2],mt.setAction(v,ti)}else throw Oi(l,"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: "+ae);else mt.setAction(v,Ve[1]);else{if(!Ve.regex)throw Oi(l,"a rule must either be an array, or an object with a 'regex' or 'include' field at: "+ae);Ve.name&&typeof Ve.name=="string"&&(mt.name=Ve.name),Ve.matchOnlyAtStart&&(mt.matchOnlyAtLineStart=Td(Ve.matchOnlyAtLineStart,!1)),mt.setRegex(v,Ve.regex),mt.setAction(v,Ve.action)}me.push(mt)}}}if(!r.tokenizer||typeof r.tokenizer!="object")throw Oi(l,"a language definition must define the 'tokenizer' attribute as an object");l.tokenizer=[];for(const ae in r.tokenizer)if(r.tokenizer.hasOwnProperty(ae)){l.start||(l.start=ae);const me=r.tokenizer[ae];l.tokenizer[ae]=new Array,V("tokenizer."+ae,l.tokenizer[ae],me)}if(l.usesEmbedded=v.usesEmbedded,r.brackets){if(!Array.isArray(r.brackets))throw Oi(l,"the 'brackets' attribute must be defined as an array")}else r.brackets=[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}];const G=[];for(const ae of r.brackets){let me=ae;if(me&&Array.isArray(me)&&me.length===3&&(me={token:me[2],open:me[0],close:me[1]}),me.open===me.close)throw Oi(l,"open and close brackets in a 'brackets' attribute must be different: "+me.open+` hint: use the 'bracket' attribute if matching on equal brackets is required.`);if(typeof me.open=="string"&&typeof me.token=="string"&&typeof me.close=="string")G.push({token:me.token+l.tokenPostfix,open:Pi(l,me.open),close:Pi(l,me.close)});else throw Oi(l,"every element in the 'brackets' array must be a '{open,close,token}' object or array")}return l.brackets=G,l.noThrow=!0,l}var Ag=function(ue,r,l,v){function V(G){return G instanceof l?G:new l(function(ae){ae(G)})}return new(l||(l=Promise))(function(G,ae){function me(Ge){try{Ve(v.next(Ge))}catch(mt){ae(mt)}}function Ne(Ge){try{Ve(v.throw(Ge))}catch(mt){ae(mt)}}function Ve(Ge){Ge.done?G(Ge.value):V(Ge.value).then(me,Ne)}Ve((v=v.apply(ue,r||[])).next())})};function zl(ue){Ys.W6.registerLanguage(ue)}function xm(){let ue=[];return ue=ue.concat(Ys.W6.getLanguages()),ue}function Im(ue){return an.get(H.L).languageIdCodec.encodeLanguageId(ue)}function Nm(ue,r){const v=an.get(H.L).onDidEncounterLanguage(V=>{V===ue&&(v.dispose(),r())});return v}function Mm(ue,r){if(!an.get(H.L).isRegisteredLanguageId(ue))throw new Error(`Cannot set configuration for unknown language ${ue}`);return an.get(B.JZ).register(ue,r,100)}class tu{constructor(r,l){this._languageId=r,this._actual=l}getInitialState(){return this._actual.getInitialState()}tokenize(r,l,v){if(typeof this._actual.tokenize=="function")return Ad.adaptTokenize(this._languageId,this._actual,r,v);throw new Error("Not supported!")}tokenizeEncoded(r,l,v){const V=this._actual.tokenizeEncoded(r,v);return new z.rY(V.tokens,V.endState)}}class Ad{constructor(r,l,v,V){this._languageId=r,this._actual=l,this._languageService=v,this._standaloneThemeService=V}getInitialState(){return this._actual.getInitialState()}static _toClassicTokens(r,l){const v=[];let V=0;for(let G=0,ae=r.length;G<ae;G++){const me=r[G];let Ne=me.startIndex;G===0?Ne=0:Ne<V&&(Ne=V),v[G]=new z.ou(Ne,me.scopes,l),V=Ne}return v}static adaptTokenize(r,l,v,V){const G=l.tokenize(v,V),ae=Ad._toClassicTokens(G.tokens,r);let me;return G.endState.equals(V)?me=V:me=G.endState,new z.$M(ae,me)}tokenize(r,l,v){return Ad.adaptTokenize(this._languageId,this._actual,r,v)}_toBinaryTokens(r,l){const v=r.encodeLanguageId(this._languageId),V=this._standaloneThemeService.getColorTheme().tokenTheme,G=[];let ae=0,me=0;for(let Ve=0,Ge=l.length;Ve<Ge;Ve++){const mt=l[Ve],ti=V.match(v,mt.scopes);if(ae>0&&G[ae-1]===ti)continue;let Si=mt.startIndex;Ve===0?Si=0:Si<me&&(Si=me),G[ae++]=Si,G[ae++]=ti,me=Si}const Ne=new Uint32Array(ae);for(let Ve=0;Ve<ae;Ve++)Ne[Ve]=G[Ve];return Ne}tokenizeEncoded(r,l,v){const V=this._actual.tokenize(r,v),G=this._toBinaryTokens(this._languageService.languageIdCodec,V.tokens);let ae;return V.endState.equals(v)?ae=v:ae=V.endState,new z.rY(G,ae)}}function Tm(ue){return typeof ue.getInitialState=="function"}function Rm(ue){return"tokenizeEncoded"in ue}function Od(ue){return ue&&typeof ue.then=="function"}function Og(ue){const r=an.get(Do.L);if(ue){const l=[null];for(let v=1,V=ue.length;v<V;v++)l[v]=va.Q1.fromHex(ue[v]);r.setColorMapOverride(l)}else r.setColorMapOverride(null)}function kr(ue,r){return Rm(r)?new tu(ue,r):new Ad(ue,r,an.get(H.L),an.get(Do.L))}function Ul(ue,r){const l={createTokenizationSupport:()=>Ag(this,void 0,void 0,function*(){const v=yield Promise.resolve(r.create());return v?Tm(v)?kr(ue,v):new os(an.get(H.L),an.get(Do.L),ue,Br(ue,v),an.get(_i.pG)):null})};return z.dG.registerFactory(ue,l)}function Pg(ue,r){if(!an.get(H.L).isRegisteredLanguageId(ue))throw new Error(`Cannot set tokens provider for unknown language ${ue}`);return Od(r)?Ul(ue,{create:()=>r}):z.dG.register(ue,kr(ue,r))}function Am(ue,r){const l=v=>new os(an.get(H.L),an.get(Do.L),ue,Br(ue,v),an.get(_i.pG));return Od(r)?Ul(ue,{create:()=>r}):z.dG.register(ue,l(r))}function Fg(ue,r){return an.get(Ot.u).referenceProvider.register(ue,r)}function Bg(ue,r){return an.get(Ot.u).renameProvider.register(ue,r)}function Wc(ue,r){return an.get(Ot.u).signatureHelpProvider.register(ue,r)}function Wg(ue,r){return an.get(Ot.u).hoverProvider.register(ue,{provideHover:(v,V,G)=>{const ae=v.getWordAtPosition(V);return Promise.resolve(r.provideHover(v,V,G)).then(me=>{if(me)return!me.range&&ae&&(me.range=new Q.Q(V.lineNumber,ae.startColumn,V.lineNumber,ae.endColumn)),me.range||(me.range=new Q.Q(V.lineNumber,V.column,V.lineNumber,V.column)),me})}})}function iu(ue,r){return an.get(Ot.u).documentSymbolProvider.register(ue,r)}function Vg(ue,r){return an.get(Ot.u).documentHighlightProvider.register(ue,r)}function nu(ue,r){return an.get(Ot.u).linkedEditingRangeProvider.register(ue,r)}function ho(ue,r){return an.get(Ot.u).definitionProvider.register(ue,r)}function P_(ue,r){return an.get(Ot.u).implementationProvider.register(ue,r)}function jl(ue,r){return an.get(Ot.u).typeDefinitionProvider.register(ue,r)}function su(ue,r){return an.get(Ot.u).codeLensProvider.register(ue,r)}function Om(ue,r,l){return an.get(Ot.u).codeActionProvider.register(ue,{providedCodeActionKinds:l?.providedCodeActionKinds,documentation:l?.documentation,provideCodeActions:(V,G,ae,me)=>{const Ve=an.get(mo.DR).read({resource:V.uri}).filter(Ge=>Q.Q.areIntersectingOrTouching(Ge,G));return r.provideCodeActions(V,G,{markers:Ve,only:ae.only,trigger:ae.trigger},me)},resolveCodeAction:r.resolveCodeAction})}function Kl(ue,r){return an.get(Ot.u).documentFormattingEditProvider.register(ue,r)}function Pm(ue,r){return an.get(Ot.u).documentRangeFormattingEditProvider.register(ue,r)}function $l(ue,r){return an.get(Ot.u).onTypeFormattingEditProvider.register(ue,r)}function Hg(ue,r){return an.get(Ot.u).linkProvider.register(ue,r)}function zg(ue,r){return an.get(Ot.u).completionProvider.register(ue,r)}function Ug(ue,r){return an.get(Ot.u).colorProvider.register(ue,r)}function ou(ue,r){return an.get(Ot.u).foldingRangeProvider.register(ue,r)}function Fm(ue,r){return an.get(Ot.u).declarationProvider.register(ue,r)}function Vc(ue,r){return an.get(Ot.u).selectionRangeProvider.register(ue,r)}function Bm(ue,r){return an.get(Ot.u).documentSemanticTokensProvider.register(ue,r)}function ru(ue,r){return an.get(Ot.u).documentRangeSemanticTokensProvider.register(ue,r)}function Wm(ue,r){return an.get(Ot.u).inlineCompletionsProvider.register(ue,r)}function Vm(ue,r){return an.get(Ot.u).inlayHintsProvider.register(ue,r)}function Hm(){return{register:zl,getLanguages:xm,onLanguage:Nm,getEncodedLanguageId:Im,setLanguageConfiguration:Mm,setColorMap:Og,registerTokensProviderFactory:Ul,setTokensProvider:Pg,setMonarchTokensProvider:Am,registerReferenceProvider:Fg,registerRenameProvider:Bg,registerCompletionItemProvider:zg,registerSignatureHelpProvider:Wc,registerHoverProvider:Wg,registerDocumentSymbolProvider:iu,registerDocumentHighlightProvider:Vg,registerLinkedEditingRangeProvider:nu,registerDefinitionProvider:ho,registerImplementationProvider:P_,registerTypeDefinitionProvider:jl,registerCodeLensProvider:su,registerCodeActionProvider:Om,registerDocumentFormattingEditProvider:Kl,registerDocumentRangeFormattingEditProvider:Pm,registerOnTypeFormattingEditProvider:$l,registerLinkProvider:Hg,registerColorProvider:Ug,registerFoldingRangeProvider:ou,registerDeclarationProvider:Fm,registerSelectionRangeProvider:Vc,registerDocumentSemanticTokensProvider:Bm,registerDocumentRangeSemanticTokensProvider:ru,registerInlineCompletionsProvider:Wm,registerInlayHintsProvider:Vm,DocumentHighlightKind:S.Kb,CompletionItemKind:S.Io,CompletionItemTag:S.QP,CompletionItemInsertTextRule:S._E,SymbolKind:S.v0,SymbolTag:S.H_,IndentAction:S.l,CompletionTriggerKind:S.t7,SignatureHelpTriggerKind:S.WA,InlayHintKind:S.r4,InlineCompletionTriggerKind:S.qw,CodeActionTriggerType:S.ok,FoldingRangeKind:z.lO}}var Hc=f(38801),zc;I.qB.wrappingIndent.defaultValue=0,I.qB.glyphMargin.defaultValue=!1,I.qB.autoIndent.defaultValue=3,I.qB.overviewRulerLanes.defaultValue=2,Hc.Pj.setFormatterSelector((ue,r,l)=>Promise.resolve(ue[0]));const Ws=y();Ws.editor=km(),Ws.languages=Hm();const Uc=Ws.CancellationTokenSource,ya=Ws.Emitter,el=Ws.KeyCode,zm=Ws.KeyMod,Um=Ws.Position,jg=Ws.Range,jm=Ws.Selection,Km=Ws.SelectionDirection,au=Ws.MarkerSeverity,hr=Ws.MarkerTag,$m=Ws.Uri,Kg=Ws.Token,lu=Ws.editor,Gm=Ws.languages;(!((zc=ge.zQ.MonacoEnvironment)===null||zc===void 0)&&zc.globalAPI||typeof define=="function"&&f.amdO)&&(self.monaco=Ws),typeof self.require<"u"&&typeof self.require.config=="function"&&self.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"]})},93582:(Tt,Fe,f)=>{f.d(Fe,{aQ:()=>X,nr:()=>K,Sx:()=>We,po:()=>se,tj:()=>le});var I=f(59095),h=f(55893),te=f(94901),$=f(2106),x=f(44364),ie=f(15910);class Q{constructor(De,Pe,Ue,Re,et){this._parsedThemeRuleBrand=void 0,this.token=De,this.index=Pe,this.fontStyle=Ue,this.foreground=Re,this.background=et}}function J(Ke){if(!Ke||!Array.isArray(Ke))return[];const De=[];let Pe=0;for(let Ue=0,Re=Ke.length;Ue<Re;Ue++){const et=Ke[Ue];let rt=-1;if(typeof et.fontStyle=="string"){rt=0;const xt=et.fontStyle.split(" ");for(let Ie=0,dt=xt.length;Ie<dt;Ie++)switch(xt[Ie]){case"italic":rt=rt|1;break;case"bold":rt=rt|2;break;case"underline":rt=rt|4;break;case"strikethrough":rt=rt|8;break}}let Lt=null;typeof et.foreground=="string"&&(Lt=et.foreground);let Dt=null;typeof et.background=="string"&&(Dt=et.background),De[Pe++]=new Q(et.token||"",Ue,rt,Lt,Dt)}return De}function z(Ke,De){Ke.sort((Ie,dt)=>{const ft=w(Ie.token,dt.token);return ft!==0?ft:Ie.index-dt.index});let Pe=0,Ue="000000",Re="ffffff";for(;Ke.length>=1&&Ke[0].token==="";){const Ie=Ke.shift();Ie.fontStyle!==-1&&(Pe=Ie.fontStyle),Ie.foreground!==null&&(Ue=Ie.foreground),Ie.background!==null&&(Re=Ie.background)}const et=new _;for(const Ie of De)et.getId(Ie);const rt=et.getId(Ue),Lt=et.getId(Re),Dt=new D(Pe,rt,Lt),xt=new L(Dt);for(let Ie=0,dt=Ke.length;Ie<dt;Ie++){const ft=Ke[Ie];xt.insert(ft.token,ft.fontStyle,et.getId(ft.foreground),et.getId(ft.background))}return new y(et,xt)}const S=/^#?([0-9A-Fa-f]{6})([0-9A-Fa-f]{2})?$/;class _{constructor(){this._lastColorId=0,this._id2color=[],this._color2id=new Map}getId(De){if(De===null)return 0;const Pe=De.match(S);if(!Pe)throw new Error("Illegal value for token color: "+De);De=Pe[1].toUpperCase();let Ue=this._color2id.get(De);return Ue||(Ue=++this._lastColorId,this._color2id.set(De,Ue),this._id2color[Ue]=te.Q1.fromHex("#"+De),Ue)}getColorMap(){return this._id2color.slice(0)}}class y{constructor(De,Pe){this._colorMap=De,this._root=Pe,this._cache=new Map}static createFromRawTokenTheme(De,Pe){return this.createFromParsedTokenTheme(J(De),Pe)}static createFromParsedTokenTheme(De,Pe){return z(De,Pe)}getColorMap(){return this._colorMap.getColorMap()}_match(De){return this._root.match(De)}match(De,Pe){let Ue=this._cache.get(Pe);if(typeof Ue>"u"){const Re=this._match(Pe),et=d(Pe);Ue=(Re.metadata|et<<8)>>>0,this._cache.set(Pe,Ue)}return(Ue|De<<0)>>>0}}const C=/\b(comment|string|regex|regexp)\b/;function d(Ke){const De=Ke.match(C);if(!De)return 0;switch(De[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 w(Ke,De){return Ke<De?-1:Ke>De?1:0}class D{constructor(De,Pe,Ue){this._themeTrieElementRuleBrand=void 0,this._fontStyle=De,this._foreground=Pe,this._background=Ue,this.metadata=(this._fontStyle<<11|this._foreground<<15|this._background<<24)>>>0}clone(){return new D(this._fontStyle,this._foreground,this._background)}acceptOverwrite(De,Pe,Ue){De!==-1&&(this._fontStyle=De),Pe!==0&&(this._foreground=Pe),Ue!==0&&(this._background=Ue),this.metadata=(this._fontStyle<<11|this._foreground<<15|this._background<<24)>>>0}}class L{constructor(De){this._themeTrieElementBrand=void 0,this._mainRule=De,this._children=new Map}match(De){if(De==="")return this._mainRule;const Pe=De.indexOf(".");let Ue,Re;Pe===-1?(Ue=De,Re=""):(Ue=De.substring(0,Pe),Re=De.substring(Pe+1));const et=this._children.get(Ue);return typeof et<"u"?et.match(Re):this._mainRule}insert(De,Pe,Ue,Re){if(De===""){this._mainRule.acceptOverwrite(Pe,Ue,Re);return}const et=De.indexOf(".");let rt,Lt;et===-1?(rt=De,Lt=""):(rt=De.substring(0,et),Lt=De.substring(et+1));let Dt=this._children.get(rt);typeof Dt>"u"&&(Dt=new L(this._mainRule.clone()),this._children.set(rt,Dt)),Dt.insert(Lt,Pe,Ue,Re)}}function k(Ke){const De=[];for(let Pe=1,Ue=Ke.length;Pe<Ue;Pe++){const Re=Ke[Pe];De[Pe]=`.mtk${Pe} { color: ${Re}; }`}return De.push(".mtki { font-style: italic; }"),De.push(".mtkb { font-weight: bold; }"),De.push(".mtku { text-decoration: underline; text-underline-position: under; }"),De.push(".mtks { text-decoration: line-through; }"),De.push(".mtks.mtku { text-decoration: underline line-through; text-underline-position: under; }"),De.join(` `)}var j=f(48295),N=f(4874);const B={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:{[N.YtV]:"#FFFFFE",[N.By2]:"#000000",[N.tan]:"#E5EBF1",[j.v0]:"#D3D3D3",[j.fj]:"#939393",[N.QwA]:"#ADD6FF4D"}},T={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:{[N.YtV]:"#1E1E1E",[N.By2]:"#D4D4D4",[N.tan]:"#3A3D41",[j.v0]:"#404040",[j.fj]:"#707070",[N.QwA]:"#ADD6FF26"}},H={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:{[N.YtV]:"#000000",[N.By2]:"#FFFFFF",[j.v0]:"#FFFFFF",[j.fj]:"#FFFFFF"}},Y={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:{[N.YtV]:"#FFFFFF",[N.By2]:"#292929",[j.v0]:"#292929",[j.fj]:"#292929"}};var ee=f(67167),ce=f(89044),pe=f(10998),ge=f(89563),fe=f(11210);function oe(Ke){const De=new $.vl,Pe=(0,fe.HT)();return Pe.onDidChange(()=>De.fire()),Ke?.onDidProductIconThemeChange(()=>De.fire()),{onDidChange:De.event,getCSS(){const Ue=Ke?Ke.getProductIconTheme():new Z,Re={},et=Lt=>{const Dt=Ue.getIcon(Lt);if(!Dt)return;const xt=Dt.font;return xt?(Re[xt.id]=xt.definition,`.codicon-${Lt.id}:before { content: '${Dt.fontCharacter}'; font-family: ${(0,I.yt)(xt.id)}; }`):`.codicon-${Lt.id}:before { content: '${Dt.fontCharacter}'; }`},rt=[];for(const Lt of Pe.getIcons()){const Dt=et(Lt);Dt&&rt.push(Dt)}for(const Lt in Re){const Dt=Re[Lt],xt=Dt.weight?`font-weight: ${Dt.weight};`:"",Ie=Dt.style?`font-style: ${Dt.style};`:"",dt=Dt.src.map(ft=>`${(0,I.Tf)(ft.location)} format('${ft.format}')`).join(", ");rt.push(`@font-face { src: ${dt}; font-family: ${(0,I.yt)(Lt)};${xt}${Ie} font-display: block; }`)}return rt.join(` `)}}}class Z{getIcon(De){const Pe=(0,fe.HT)();let Ue=De.defaults;for(;ce.L0.isThemeIcon(Ue);){const Re=Pe.getIcon(Ue.id);if(!Re)return;Ue=Re.defaults}return Ue}}const le="vs",se="vs-dark",X="hc-black",K="hc-light",he=ee.O.as(N.FdG.ColorContribution),ve=ee.O.as(ce.Fd.ThemingContribution);class Ee{constructor(De,Pe){this.semanticHighlighting=!1,this.themeData=Pe;const Ue=Pe.base;De.length>0?(O(De)?this.id=De:this.id=Ue+" "+De,this.themeName=De):(this.id=Ue,this.themeName=Ue),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 De=new Map;for(const Pe in this.themeData.colors)De.set(Pe,te.Q1.fromHex(this.themeData.colors[Pe]));if(this.themeData.inherit){const Pe=ot(this.themeData.base);for(const Ue in Pe.colors)De.has(Ue)||De.set(Ue,te.Q1.fromHex(Pe.colors[Ue]))}this.colors=De}return this.colors}getColor(De,Pe){const Ue=this.getColors().get(De);if(Ue)return Ue;if(Pe!==!1)return this.getDefault(De)}getDefault(De){let Pe=this.defaultColors[De];return Pe||(Pe=he.resolveDefaultColor(De,this),this.defaultColors[De]=Pe,Pe)}defines(De){return Object.prototype.hasOwnProperty.call(this.getColors(),De)}get type(){switch(this.base){case le:return ge.zM.LIGHT;case X:return ge.zM.HIGH_CONTRAST_DARK;case K:return ge.zM.HIGH_CONTRAST_LIGHT;default:return ge.zM.DARK}}get tokenTheme(){if(!this._tokenTheme){let De=[],Pe=[];if(this.themeData.inherit){const et=ot(this.themeData.base);De=et.rules,et.encodedTokensColors&&(Pe=et.encodedTokensColors)}const Ue=this.themeData.colors["editor.foreground"],Re=this.themeData.colors["editor.background"];if(Ue||Re){const et={token:""};Ue&&(et.foreground=Ue),Re&&(et.background=Re),De.push(et)}De=De.concat(this.themeData.rules),this.themeData.encodedTokensColors&&(Pe=this.themeData.encodedTokensColors),this._tokenTheme=y.createFromRawTokenTheme(De,Pe)}return this._tokenTheme}getTokenStyleMetadata(De,Pe,Ue){const et=this.tokenTheme._match([De].concat(Pe).join(".")).metadata,rt=ie.x.getForeground(et),Lt=ie.x.getFontStyle(et);return{foreground:rt,italic:!!(Lt&1),bold:!!(Lt&2),underline:!!(Lt&4),strikethrough:!!(Lt&8)}}}function O(Ke){return Ke===le||Ke===se||Ke===X||Ke===K}function ot(Ke){switch(Ke){case le:return B;case se:return T;case X:return H;case K:return Y}}function lt(Ke){const De=ot(Ke);return new Ee(Ke,De)}class We extends pe.jG{constructor(){super(),this._onColorThemeChange=this._register(new $.vl),this.onDidColorThemeChange=this._onColorThemeChange.event,this._onProductIconThemeChange=this._register(new $.vl),this.onDidProductIconThemeChange=this._onProductIconThemeChange.event,this._environment=Object.create(null),this._builtInProductIconTheme=new Z,this._autoDetectHighContrast=!0,this._knownThemes=new Map,this._knownThemes.set(le,lt(le)),this._knownThemes.set(se,lt(se)),this._knownThemes.set(X,lt(X)),this._knownThemes.set(K,lt(K));const De=oe(this);this._codiconCSS=De.getCSS(),this._themeCSS="",this._allCSS=`${this._codiconCSS} ${this._themeCSS}`,this._globalStyleElement=null,this._styleElements=[],this._colorMapOverride=null,this.setTheme(le),this._onOSSchemeChanged(),De.onDidChange(()=>{this._codiconCSS=De.getCSS(),this._updateCSS()}),(0,h.addMatchMediaChangeListener)("(forced-colors: active)",()=>{this._onOSSchemeChanged()})}registerEditorContainer(De){return I.Cl(De)?this._registerShadowDomContainer(De):this._registerRegularEditorContainer()}_registerRegularEditorContainer(){return this._globalStyleElement||(this._globalStyleElement=I.li(),this._globalStyleElement.className="monaco-colors",this._globalStyleElement.textContent=this._allCSS,this._styleElements.push(this._globalStyleElement)),pe.jG.None}_registerShadowDomContainer(De){const Pe=I.li(De);return Pe.className="monaco-colors",Pe.textContent=this._allCSS,this._styleElements.push(Pe),{dispose:()=>{for(let Ue=0;Ue<this._styleElements.length;Ue++)if(this._styleElements[Ue]===Pe){this._styleElements.splice(Ue,1);return}}}}defineTheme(De,Pe){if(!/^[a-z0-9\-]+$/i.test(De))throw new Error("Illegal theme name!");if(!O(Pe.base)&&!O(De))throw new Error("Illegal theme base!");this._knownThemes.set(De,new Ee(De,Pe)),O(De)&&this._knownThemes.forEach(Ue=>{Ue.base===De&&Ue.notifyBaseUpdated()}),this._theme.themeName===De&&this.setTheme(De)}getColorTheme(){return this._theme}setColorMapOverride(De){this._colorMapOverride=De,this._updateThemeOrColorMap()}setTheme(De){let Pe;this._knownThemes.has(De)?Pe=this._knownThemes.get(De):Pe=this._knownThemes.get(le),this._updateActualTheme(Pe)}_updateActualTheme(De){!De||this._theme===De||(this._theme=De,this._updateThemeOrColorMap())}_onOSSchemeChanged(){if(this._autoDetectHighContrast){const De=window.matchMedia("(forced-colors: active)").matches;if(De!==(0,ge.Bb)(this._theme.type)){let Pe;(0,ge.HD)(this._theme.type)?Pe=De?X:se:Pe=De?K:le,this._updateActualTheme(this._knownThemes.get(Pe))}}}setAutoDetectHighContrast(De){this._autoDetectHighContrast=De,this._onOSSchemeChanged()}_updateThemeOrColorMap(){const De=[],Pe={},Ue={addRule:rt=>{Pe[rt]||(De.push(rt),Pe[rt]=!0)}};ve.getThemingParticipants().forEach(rt=>rt(this._theme,Ue,this._environment));const Re=[];for(const rt of he.getColors()){const Lt=this._theme.getColor(rt.id,!0);Lt&&Re.push(`${(0,N.Bbc)(rt.id)}: ${Lt.toString()};`)}Ue.addRule(`.monaco-editor { ${Re.join(` `)} }`);const et=this._colorMapOverride||this._theme.tokenTheme.getColorMap();Ue.addRule(k(et)),this._themeCSS=De.join(` `),this._updateCSS(),x.dG.setColorMap(et),this._onColorThemeChange.fire(this._theme)}_updateCSS(){this._allCSS=`${this._codiconCSS} ${this._themeCSS}`,this._styleElements.forEach(De=>De.textContent=this._allCSS)}getFileIconTheme(){return{hasFileIcons:!1,hasFolderIcons:!1,hidesExplorerArrows:!1}}getProductIconTheme(){return this._builtInProductIconTheme}}},83616:(Tt,Fe,f)=>{f.d(Fe,{L:()=>h});var I=f(82399);const h=(0,I.u1)("themeService")},19664:(Tt,Fe,f)=>{f.d(Fe,{IF:()=>L});var I=f(94828);/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/var h=Object.defineProperty,te=Object.getOwnPropertyDescriptor,$=Object.getOwnPropertyNames,x=Object.prototype.hasOwnProperty,ie=(T,H,Y,ee)=>{if(H&&typeof H=="object"||typeof H=="function")for(let ce of $(H))!x.call(T,ce)&&ce!==Y&&h(T,ce,{get:()=>H[ce],enumerable:!(ee=te(H,ce))||ee.enumerable});return T},Q=(T,H,Y)=>(ie(T,H,"default"),Y&&ie(Y,H,"default")),J="4.5.5",z={};Q(z,I);var S=(T=>(T[T.None=0]="None",T[T.CommonJS=1]="CommonJS",T[T.AMD=2]="AMD",T[T.UMD=3]="UMD",T[T.System=4]="System",T[T.ES2015=5]="ES2015",T[T.ESNext=99]="ESNext",T))(S||{}),_=(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))(_||{}),y=(T=>(T[T.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",T[T.LineFeed=1]="LineFeed",T))(y||{}),C=(T=>(T[T.ES3=0]="ES3",T[T.ES5=1]="ES5",T[T.ES2015=2]="ES2015",T[T.ES2016=3]="ES2016",T[T.ES2017=4]="ES2017",T[T.ES2018=5]="ES2018",T[T.ES2019=6]="ES2019",T[T.ES2020=7]="ES2020",T[T.ESNext=99]="ESNext",T[T.JSON=100]="JSON",T[T.Latest=99]="Latest",T))(C||{}),d=(T=>(T[T.Classic=1]="Classic",T[T.NodeJs=2]="NodeJs",T))(d||{}),w=class{_onDidChange=new z.Emitter;_onDidExtraLibsChange=new z.Emitter;_extraLibs;_removedExtraLibs;_eagerModelSync;_compilerOptions;_diagnosticsOptions;_workerOptions;_onDidExtraLibsChangeTimeout;_inlayHintsOptions;constructor(T,H,Y,ee){this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(T),this.setDiagnosticsOptions(H),this.setWorkerOptions(Y),this.setInlayHintsOptions(ee),this._onDidExtraLibsChangeTimeout=-1}get onDidChange(){return this._onDidChange.event}get onDidExtraLibsChange(){return this._onDidExtraLibsChange.event}get workerOptions(){return this._workerOptions}get inlayHintsOptions(){return this._inlayHintsOptions}getExtraLibs(){return this._extraLibs}addExtraLib(T,H){let Y;if(typeof H>"u"?Y=`ts:extralib-${Math.random().toString(36).substring(2,15)}`:Y=H,this._extraLibs[Y]&&this._extraLibs[Y].content===T)return{dispose:()=>{}};let ee=1;return this._removedExtraLibs[Y]&&(ee=this._removedExtraLibs[Y]+1),this._extraLibs[Y]&&(ee=this._extraLibs[Y].version+1),this._extraLibs[Y]={content:T,version:ee},this._fireOnDidExtraLibsChangeSoon(),{dispose:()=>{let ce=this._extraLibs[Y];ce&&ce.version===ee&&(delete this._extraLibs[Y],this._removedExtraLibs[Y]=ee,this._fireOnDidExtraLibsChangeSoon())}}}setExtraLibs(T){for(const H in this._extraLibs)this._removedExtraLibs[H]=this._extraLibs[H].version;if(this._extraLibs=Object.create(null),T&&T.length>0)for(const H of T){const Y=H.filePath||`ts:extralib-${Math.random().toString(36).substring(2,15)}`,ee=H.content;let ce=1;this._removedExtraLibs[Y]&&(ce=this._removedExtraLibs[Y]+1),this._extraLibs[Y]={content:ee,version:ce}}this._fireOnDidExtraLibsChangeSoon()}_fireOnDidExtraLibsChangeSoon(){this._onDidExtraLibsChangeTimeout===-1&&(this._onDidExtraLibsChangeTimeout=window.setTimeout(()=>{this._onDidExtraLibsChangeTimeout=-1,this._onDidExtraLibsChange.fire(void 0)},0))}getCompilerOptions(){return this._compilerOptions}setCompilerOptions(T){this._compilerOptions=T||Object.create(null),this._onDidChange.fire(void 0)}getDiagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(T){this._diagnosticsOptions=T||Object.create(null),this._onDidChange.fire(void 0)}setWorkerOptions(T){this._workerOptions=T||Object.create(null),this._onDidChange.fire(void 0)}setInlayHintsOptions(T){this._inlayHintsOptions=T||Object.create(null),this._onDidChange.fire(void 0)}setMaximumWorkerIdleTime(T){}setEagerModelSync(T){this._eagerModelSync=T}getEagerModelSync(){return this._eagerModelSync}},D=J,L=new w({allowNonTsExtensions:!0,target:99},{noSemanticValidation:!1,noSyntaxValidation:!1,onlyVisible:!1},{},{}),k=new w({allowNonTsExtensions:!0,allowJs:!0,target:99},{noSemanticValidation:!0,noSyntaxValidation:!1,onlyVisible:!1},{},{}),j=()=>B().then(T=>T.getTypeScriptWorker()),N=()=>B().then(T=>T.getJavaScriptWorker());z.languages.typescript={ModuleKind:S,JsxEmit:_,NewLineKind:y,ScriptTarget:C,ModuleResolutionKind:d,typescriptVersion:D,typescriptDefaults:L,javascriptDefaults:k,getTypeScriptWorker:j,getJavaScriptWorker:N};function B(){return f.e(9355).then(f.bind(f,59355))}z.languages.onLanguage("typescript",()=>B().then(T=>T.setupTypeScript(L))),z.languages.onLanguage("javascript",()=>B().then(T=>T.setupJavaScript(k)))},3765:(Tt,Fe,f)=>{f.d(Fe,{AM:()=>S,kg:()=>z});var I=function(d,w,D,L){function k(j){return j instanceof D?j:new D(function(N){N(j)})}return new(D||(D=Promise))(function(j,N){function B(Y){try{H(L.next(Y))}catch(ee){N(ee)}}function T(Y){try{H(L.throw(Y))}catch(ee){N(ee)}}function H(Y){Y.done?j(Y.value):k(Y.value).then(B,T)}H((L=L.apply(d,w||[])).next())})};let h=typeof document<"u"&&document.location&&document.location.hash.indexOf("pseudo=true")>=0;const te="i-default";function $(d,w){let D;return w.length===0?D=d:D=d.replace(/\{(\d+)\}/g,(L,k)=>{const j=k[0],N=w[j];let B=L;return typeof N=="string"?B=N:(typeof N=="number"||typeof N=="boolean"||N===void 0||N===null)&&(B=String(N)),B}),h&&(D="\uFF3B"+D.replace(/[aouei]/g,"$&$&")+"\uFF3D"),D}function x(d,w){let D=d[w];return D||(D=d["*"],D)?D:null}function ie(d){return d.charAt(d.length-1)==="/"?d:d+"/"}function Q(d,w,D){return I(this,void 0,void 0,function*(){const L=ie(d)+ie(w)+"vscode/"+ie(D),k=yield fetch(L);if(k.ok)return yield k.json();throw new Error(`${k.status} - ${k.statusText}`)})}function J(d){return function(w,D){const L=Array.prototype.slice.call(arguments,2);return $(d[w],L)}}function z(d,w,...D){return $(w,D)}function S(d){}function _(d){h=d}function y(d,w){var D;return{localize:J(w[d]),getConfiguredDefaultLocale:(D=w.getConfiguredDefaultLocale)!==null&&D!==void 0?D:L=>{}}}function C(d,w,D,L){var k;const j=(k=L["vs/nls"])!==null&&k!==void 0?k:{};if(!d||d.length===0)return D({localize:z,getConfiguredDefaultLocale:()=>{var Y;return(Y=j.availableLanguages)===null||Y===void 0?void 0:Y["*"]}});const N=j.availableLanguages?x(j.availableLanguages,d):null,B=N===null||N===te;let T=".nls";B||(T=T+"."+N);const H=Y=>{Array.isArray(Y)?Y.localize=J(Y):Y.localize=J(Y[d]),Y.getConfiguredDefaultLocale=()=>{var ee;return(ee=j.availableLanguages)===null||ee===void 0?void 0:ee["*"]},D(Y)};typeof j.loadBundle=="function"?j.loadBundle(d,N,(Y,ee)=>{Y?w([d+".nls"],H):H(ee)}):j.translationServiceUrl&&!B?I(this,void 0,void 0,function*(){var Y;try{const ee=yield Q(j.translationServiceUrl,N,d);return H(ee)}catch(ee){if(!N.includes("-"))return console.error(ee),w([d+".nls"],H);try{const ce=N.split("-")[0],pe=yield Q(j.translationServiceUrl,ce,d);return(Y=j.availableLanguages)!==null&&Y!==void 0||(j.availableLanguages={}),j.availableLanguages["*"]=ce,H(pe)}catch(ce){return console.error(ce),w([d+".nls"],H)}}}):w([d+T],H,Y=>{if(T===".nls"){console.error("Failed trying to load default language strings",Y);return}console.error(`Failed to load message bundle for language ${N}. Falling back to the default language:`,Y),w([d+".nls"],H)})}},53909:(Tt,Fe,f)=>{f.d(Fe,{f:()=>$,j:()=>te});var I=f(96655),h=f(82399);const te=(0,h.u1)("accessibilityService"),$=new I.N1("accessibilityModeEnabled",!1)},58067:(Tt,Fe,f)=>{f.d(Fe,{D8:()=>d,Xe:()=>k,ZG:()=>D,ez:()=>w,is:()=>C,nI:()=>L});var I=f(27969),h=f(26048),te=f(2106),$=f(17954),x=f(10998),ie=f(85525),Q=f(59715),J=f(96655),z=f(82399),S=f(89044),_=function(j,N,B,T){var H=arguments.length,Y=H<3?N:T===null?T=Object.getOwnPropertyDescriptor(N,B):T,ee;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Y=Reflect.decorate(j,N,B,T);else for(var ce=j.length-1;ce>=0;ce--)(ee=j[ce])&&(Y=(H<3?ee(Y):H>3?ee(N,B,Y):ee(N,B))||Y);return H>3&&Y&&Object.defineProperty(N,B,Y),Y},y=function(j,N){return function(B,T){N(B,T,j)}};function C(j){return j.command!==void 0}class d{constructor(N){if(d._instances.has(N))throw new TypeError(`MenuId with identifier '${N}' already exists. Use MenuId.for(ident) or a unique identifier`);d._instances.set(N,this),this.id=N}}d._instances=new Map,d.CommandPalette=new d("CommandPalette"),d.DebugBreakpointsContext=new d("DebugBreakpointsContext"),d.DebugCallStackContext=new d("DebugCallStackContext"),d.DebugConsoleContext=new d("DebugConsoleContext"),d.DebugVariablesContext=new d("DebugVariablesContext"),d.DebugWatchContext=new d("DebugWatchContext"),d.DebugToolBar=new d("DebugToolBar"),d.DebugToolBarStop=new d("DebugToolBarStop"),d.EditorContext=new d("EditorContext"),d.SimpleEditorContext=new d("SimpleEditorContext"),d.EditorContextCopy=new d("EditorContextCopy"),d.EditorContextPeek=new d("EditorContextPeek"),d.EditorContextShare=new d("EditorContextShare"),d.EditorTitle=new d("EditorTitle"),d.EditorTitleRun=new d("EditorTitleRun"),d.EditorTitleContext=new d("EditorTitleContext"),d.EmptyEditorGroup=new d("EmptyEditorGroup"),d.EmptyEditorGroupContext=new d("EmptyEditorGroupContext"),d.ExplorerContext=new d("ExplorerContext"),d.ExtensionContext=new d("ExtensionContext"),d.GlobalActivity=new d("GlobalActivity"),d.CommandCenter=new d("CommandCenter"),d.LayoutControlMenuSubmenu=new d("LayoutControlMenuSubmenu"),d.LayoutControlMenu=new d("LayoutControlMenu"),d.MenubarMainMenu=new d("MenubarMainMenu"),d.MenubarAppearanceMenu=new d("MenubarAppearanceMenu"),d.MenubarDebugMenu=new d("MenubarDebugMenu"),d.MenubarEditMenu=new d("MenubarEditMenu"),d.MenubarCopy=new d("MenubarCopy"),d.MenubarFileMenu=new d("MenubarFileMenu"),d.MenubarGoMenu=new d("MenubarGoMenu"),d.MenubarHelpMenu=new d("MenubarHelpMenu"),d.MenubarLayoutMenu=new d("MenubarLayoutMenu"),d.MenubarNewBreakpointMenu=new d("MenubarNewBreakpointMenu"),d.MenubarPanelAlignmentMenu=new d("MenubarPanelAlignmentMenu"),d.MenubarPanelPositionMenu=new d("MenubarPanelPositionMenu"),d.MenubarPreferencesMenu=new d("MenubarPreferencesMenu"),d.MenubarRecentMenu=new d("MenubarRecentMenu"),d.MenubarSelectionMenu=new d("MenubarSelectionMenu"),d.MenubarShare=new d("MenubarShare"),d.MenubarSwitchEditorMenu=new d("MenubarSwitchEditorMenu"),d.MenubarSwitchGroupMenu=new d("MenubarSwitchGroupMenu"),d.MenubarTerminalMenu=new d("MenubarTerminalMenu"),d.MenubarViewMenu=new d("MenubarViewMenu"),d.MenubarHomeMenu=new d("MenubarHomeMenu"),d.OpenEditorsContext=new d("OpenEditorsContext"),d.ProblemsPanelContext=new d("ProblemsPanelContext"),d.SCMChangeContext=new d("SCMChangeContext"),d.SCMResourceContext=new d("SCMResourceContext"),d.SCMResourceFolderContext=new d("SCMResourceFolderContext"),d.SCMResourceGroupContext=new d("SCMResourceGroupContext"),d.SCMSourceControl=new d("SCMSourceControl"),d.SCMTitle=new d("SCMTitle"),d.SearchContext=new d("SearchContext"),d.StatusBarWindowIndicatorMenu=new d("StatusBarWindowIndicatorMenu"),d.StatusBarRemoteIndicatorMenu=new d("StatusBarRemoteIndicatorMenu"),d.TestItem=new d("TestItem"),d.TestItemGutter=new d("TestItemGutter"),d.TestPeekElement=new d("TestPeekElement"),d.TestPeekTitle=new d("TestPeekTitle"),d.TouchBarContext=new d("TouchBarContext"),d.TitleBarContext=new d("TitleBarContext"),d.TitleBarTitleContext=new d("TitleBarTitleContext"),d.TunnelContext=new d("TunnelContext"),d.TunnelPrivacy=new d("TunnelPrivacy"),d.TunnelProtocol=new d("TunnelProtocol"),d.TunnelPortInline=new d("TunnelInline"),d.TunnelTitle=new d("TunnelTitle"),d.TunnelLocalAddressInline=new d("TunnelLocalAddressInline"),d.TunnelOriginInline=new d("TunnelOriginInline"),d.ViewItemContext=new d("ViewItemContext"),d.ViewContainerTitle=new d("ViewContainerTitle"),d.ViewContainerTitleContext=new d("ViewContainerTitleContext"),d.ViewTitle=new d("ViewTitle"),d.ViewTitleContext=new d("ViewTitleContext"),d.CommentThreadTitle=new d("CommentThreadTitle"),d.CommentThreadActions=new d("CommentThreadActions"),d.CommentTitle=new d("CommentTitle"),d.CommentActions=new d("CommentActions"),d.InteractiveToolbar=new d("InteractiveToolbar"),d.InteractiveCellTitle=new d("InteractiveCellTitle"),d.InteractiveCellDelete=new d("InteractiveCellDelete"),d.InteractiveCellExecute=new d("InteractiveCellExecute"),d.InteractiveInputExecute=new d("InteractiveInputExecute"),d.NotebookToolbar=new d("NotebookToolbar"),d.NotebookCellTitle=new d("NotebookCellTitle"),d.NotebookCellDelete=new d("NotebookCellDelete"),d.NotebookCellInsert=new d("NotebookCellInsert"),d.NotebookCellBetween=new d("NotebookCellBetween"),d.NotebookCellListTop=new d("NotebookCellTop"),d.NotebookCellExecute=new d("NotebookCellExecute"),d.NotebookCellExecutePrimary=new d("NotebookCellExecutePrimary"),d.NotebookDiffCellInputTitle=new d("NotebookDiffCellInputTitle"),d.NotebookDiffCellMetadataTitle=new d("NotebookDiffCellMetadataTitle"),d.NotebookDiffCellOutputsTitle=new d("NotebookDiffCellOutputsTitle"),d.NotebookOutputToolbar=new d("NotebookOutputToolbar"),d.NotebookEditorLayoutConfigure=new d("NotebookEditorLayoutConfigure"),d.NotebookKernelSource=new d("NotebookKernelSource"),d.BulkEditTitle=new d("BulkEditTitle"),d.BulkEditContext=new d("BulkEditContext"),d.TimelineItemContext=new d("TimelineItemContext"),d.TimelineTitle=new d("TimelineTitle"),d.TimelineTitleContext=new d("TimelineTitleContext"),d.TimelineFilterSubMenu=new d("TimelineFilterSubMenu"),d.AccountsContext=new d("AccountsContext"),d.PanelTitle=new d("PanelTitle"),d.AuxiliaryBarTitle=new d("AuxiliaryBarTitle"),d.TerminalInstanceContext=new d("TerminalInstanceContext"),d.TerminalEditorInstanceContext=new d("TerminalEditorInstanceContext"),d.TerminalNewDropdownContext=new d("TerminalNewDropdownContext"),d.TerminalTabContext=new d("TerminalTabContext"),d.TerminalTabEmptyAreaContext=new d("TerminalTabEmptyAreaContext"),d.TerminalInlineTabContext=new d("TerminalInlineTabContext"),d.WebviewContext=new d("WebviewContext"),d.InlineCompletionsActions=new d("InlineCompletionsActions"),d.NewFile=new d("NewFile"),d.MergeToolbar=new d("MergeToolbar"),d.MergeInput1Toolbar=new d("MergeToolbar1Toolbar"),d.MergeInput2Toolbar=new d("MergeToolbar2Toolbar");const w=(0,z.u1)("menuService"),D=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new te.vl,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:j=>j===d.CommandPalette}}addCommand(j){return this.addCommands($.f.single(j))}addCommands(j){for(const N of j)this._commands.set(N.id,N);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),(0,x.s)(()=>{let N=!1;for(const B of j)N=this._commands.delete(B.id)||N;N&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(j){return this._commands.get(j)}getCommands(){const j=new Map;return this._commands.forEach((N,B)=>j.set(B,N)),j}appendMenuItem(j,N){return this.appendMenuItems($.f.single({id:j,item:N}))}appendMenuItems(j){const N=new Set,B=new ie.w;for(const{id:T,item:H}of j){let Y=this._menuItems.get(T);Y||(Y=new ie.w,this._menuItems.set(T,Y)),B.push(Y.push(H)),N.add(T)}return this._onDidChangeMenu.fire(N),(0,x.s)(()=>{if(B.size>0){for(const T of B)T();this._onDidChangeMenu.fire(N),B.clear()}})}getMenuItems(j){let N;return this._menuItems.has(j)?N=[...this._menuItems.get(j)]:N=[],j===d.CommandPalette&&this._appendImplicitItems(N),N}_appendImplicitItems(j){const N=new Set;for(const B of j)C(B)&&(N.add(B.command.id),B.alt&&N.add(B.alt.id));this._commands.forEach((B,T)=>{N.has(T)||j.push({command:B})})}};class L extends I.YH{constructor(N,B,T,H){super(`submenuitem.${N.submenu.id}`,typeof N.title=="string"?N.title:N.title.value,[],"submenu"),this.item=N,this._menuService=B,this._contextKeyService=T,this._options=H}get actions(){const N=[],B=this._menuService.createMenu(this.item.submenu,this._contextKeyService),T=B.getActions(this._options);B.dispose();for(const[,H]of T)H.length>0&&(N.push(...H),N.push(new I.wv));return N.length&&N.pop(),N}}let k=class nC{constructor(N,B,T,H,Y,ee){var ce,pe;if(this.hideActions=H,this._commandService=ee,this.id=N.id,this.label=T?.renderShortTitle&&N.shortTitle?typeof N.shortTitle=="string"?N.shortTitle:N.shortTitle.value:typeof N.title=="string"?N.title:N.title.value,this.tooltip=(pe=typeof N.tooltip=="string"?N.tooltip:(ce=N.tooltip)===null||ce===void 0?void 0:ce.value)!==null&&pe!==void 0?pe:"",this.enabled=!N.precondition||Y.contextMatchesRules(N.precondition),this.checked=void 0,N.toggled){const ge=N.toggled.condition?N.toggled:{condition:N.toggled};this.checked=Y.contextMatchesRules(ge.condition),this.checked&&ge.tooltip&&(this.tooltip=typeof ge.tooltip=="string"?ge.tooltip:ge.tooltip.value),ge.title&&(this.label=typeof ge.title=="string"?ge.title:ge.title.value)}this.item=N,this.alt=B?new nC(B,void 0,T,H,Y,ee):void 0,this._options=T,S.L0.isThemeIcon(N.icon)&&(this.class=h.j3.asClassName(N.icon))}dispose(){}run(...N){var B,T;let H=[];return!((B=this._options)===null||B===void 0)&&B.arg&&(H=[...H,this._options.arg]),!((T=this._options)===null||T===void 0)&&T.shouldForwardArgs&&(H=[...H,...N]),this._commandService.executeCommand(this.id,...H)}};k=_([y(4,J.fN),y(5,Q.wT)],k)},3338:(Tt,Fe,f)=>{f.d(Fe,{h:()=>h});var I=f(82399);const h=(0,I.u1)("clipboardService")},59715:(Tt,Fe,f)=>{f.d(Fe,{wT:()=>Q,wb:()=>J});var I=f(2106),h=f(17954),te=f(10998),$=f(85525),x=f(79359),ie=f(82399);const Q=(0,ie.u1)("commandService"),J=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new I.vl,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(S,_){if(!S)throw new Error("invalid command");if(typeof S=="string"){if(!_)throw new Error("invalid command");return this.registerCommand({id:S,handler:_})}if(S.description){const D=[];for(const k of S.description.args)D.push(k.constraint);const L=S.handler;S.handler=function(k,...j){return(0,x.jx)(j,D),L(k,...j)}}const{id:y}=S;let C=this._commands.get(y);C||(C=new $.w,this._commands.set(y,C));const d=C.unshift(S),w=(0,te.s)(()=>{d();const D=this._commands.get(y);D?.isEmpty()&&this._commands.delete(y)});return this._onDidRegisterCommand.fire(y),w}registerCommandAlias(S,_){return J.registerCommand(S,(y,...C)=>y.get(Q).executeCommand(_,...C))}getCommand(S){const _=this._commands.get(S);if(!(!_||_.isEmpty()))return h.f.first(_)}getCommands(){const S=new Map;for(const _ of this._commands.keys()){const y=this.getCommand(_);y&&S.set(_,y)}return S}},z={_serviceBrand:void 0,onWillExecuteCommand:()=>te.jG.None,onDidExecuteCommand:()=>te.jG.None,executeCommand(){return Promise.resolve(void 0)}};J.registerCommand("noop",()=>{})},85753:(Tt,Fe,f)=>{f.d(Fe,{Mo:()=>J,ad:()=>te,gD:()=>Q,iB:()=>x,kW:()=>$,pG:()=>h});var I=f(82399);const h=(0,I.u1)("configurationService");function te(z,S){const _=Object.create(null);for(const y in z)$(_,y,z[y],S);return _}function $(z,S,_,y){const C=S.split("."),d=C.pop();let w=z;for(let D=0;D<C.length;D++){const L=C[D];let k=w[L];switch(typeof k){case"undefined":k=w[L]=Object.create(null);break;case"object":break;default:y(`Ignoring ${S} as ${C.slice(0,D+1).join(".")} is ${JSON.stringify(k)}`);return}w=k}if(typeof w=="object"&&w!==null)try{w[d]=_}catch{y(`Ignoring ${S} as ${C.join(".")} is ${JSON.stringify(w)}`)}else y(`Ignoring ${S} as ${C.join(".")} is ${JSON.stringify(w)}`)}function x(z,S){const _=S.split(".");ie(z,_)}function ie(z,S){const _=S.shift();if(S.length===0){delete z[_];return}if(Object.keys(z).indexOf(_)!==-1){const y=z[_];typeof y=="object"&&!Array.isArray(y)&&(ie(y,S),Object.keys(y).length===0&&delete z[_])}}function Q(z,S,_){function y(w,D){let L=w;for(const k of D){if(typeof L!="object"||L===null)return;L=L[k]}return L}const C=S.split("."),d=y(z,C);return typeof d>"u"?_:d}function J(z){return z.replace(/[\[\]]/g,"")}},27142:(Tt,Fe,f)=>{f.d(Fe,{Fd:()=>J,Gv:()=>T,rC:()=>B});var I=f(13338),h=f(2106),te=f(79359),$=f(3765),x=f(85753),ie=f(51460),Q=f(67167);const J={Configuration:"base.contributions.configuration"},z={properties:{},patternProperties:{}},S={properties:{},patternProperties:{}},_={properties:{},patternProperties:{}},y={properties:{},patternProperties:{}},C={properties:{},patternProperties:{}},d={properties:{},patternProperties:{}},w="vscode://schemas/settings/resourceLanguage",D=Q.O.as(ie.F.JSONContribution);class L{constructor(){this.overrideIdentifiers=new Set,this._onDidSchemaChange=new h.vl,this._onDidUpdateConfiguration=new h.vl,this.configurationDefaultsOverrides=new Map,this.defaultLanguageConfigurationOverridesNode={id:"defaultOverrides",title:$.kg("defaultLanguageConfigurationOverrides.title","Default Language Configuration Overrides"),properties:{}},this.configurationContributors=[this.defaultLanguageConfigurationOverridesNode],this.resourceLanguageSettingsSchema={properties:{},patternProperties:{},additionalProperties:!1,errorMessage:"Unknown editor configuration setting",allowTrailingCommas:!0,allowComments:!0},this.configurationProperties={},this.policyConfigurations=new Map,this.excludedConfigurationProperties={},D.registerSchema(w,this.resourceLanguageSettingsSchema),this.registerOverridePropertyPatternKey()}registerConfiguration(pe,ge=!0){this.registerConfigurations([pe],ge)}registerConfigurations(pe,ge=!0){const fe=this.doRegisterConfigurations(pe,ge);D.registerSchema(w,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:fe})}registerDefaultConfigurations(pe){var ge;const fe=[],oe=[];for(const{overrides:Z,source:le}of pe)for(const se in Z)if(fe.push(se),B.test(se)){const X=this.configurationDefaultsOverrides.get(se),K=(ge=X?.valuesSources)!==null&&ge!==void 0?ge:new Map;if(le)for(const O of Object.keys(Z[se]))K.set(O,le);const he=Object.assign(Object.assign({},X?.value||{}),Z[se]);this.configurationDefaultsOverrides.set(se,{source:le,value:he,valuesSources:K});const ve=(0,x.Mo)(se),Ee={type:"object",default:he,description:$.kg("defaultLanguageConfiguration.description","Configure settings to be overridden for the {0} language.",ve),$ref:w,defaultDefaultValue:he,source:te.Kg(le)?void 0:le,defaultValueSource:le};oe.push(...T(se)),this.configurationProperties[se]=Ee,this.defaultLanguageConfigurationOverridesNode.properties[se]=Ee}else{this.configurationDefaultsOverrides.set(se,{value:Z[se],source:le});const X=this.configurationProperties[se];X&&(this.updatePropertyDefaultValue(se,X),this.updateSchema(se,X))}this.registerOverrideIdentifiers(oe),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:fe,defaultsOverrides:!0})}registerOverrideIdentifiers(pe){for(const ge of pe)this.overrideIdentifiers.add(ge);this.updateOverridePropertyPatternKey()}doRegisterConfigurations(pe,ge){const fe=[];return pe.forEach(oe=>{fe.push(...this.validateAndRegisterProperties(oe,ge,oe.extensionInfo,oe.restrictedProperties)),this.configurationContributors.push(oe),this.registerJSONConfiguration(oe)}),fe}validateAndRegisterProperties(pe,ge=!0,fe,oe,Z=3){var le;Z=te.z(pe.scope)?Z:pe.scope;const se=[],X=pe.properties;if(X)for(const he in X){const ve=X[he];if(ge&&ee(he,ve)){delete X[he];continue}if(ve.source=fe,ve.defaultDefaultValue=X[he].default,this.updatePropertyDefaultValue(he,ve),B.test(he)?ve.scope=void 0:(ve.scope=te.z(ve.scope)?Z:ve.scope,ve.restricted=te.z(ve.restricted)?!!oe?.includes(he):ve.restricted),X[he].hasOwnProperty("included")&&!X[he].included){this.excludedConfigurationProperties[he]=X[he],delete X[he];continue}else this.configurationProperties[he]=X[he],!((le=X[he].policy)===null||le===void 0)&&le.name&&this.policyConfigurations.set(X[he].policy.name,he);!X[he].deprecationMessage&&X[he].markdownDeprecationMessage&&(X[he].deprecationMessage=X[he].markdownDeprecationMessage),se.push(he)}const K=pe.allOf;if(K)for(const he of K)se.push(...this.validateAndRegisterProperties(he,ge,fe,oe,Z));return se}getConfigurationProperties(){return this.configurationProperties}getPolicyConfigurations(){return this.policyConfigurations}registerJSONConfiguration(pe){const ge=fe=>{const oe=fe.properties;if(oe)for(const le in oe)this.updateSchema(le,oe[le]);const Z=fe.allOf;Z?.forEach(ge)};ge(pe)}updateSchema(pe,ge){switch(z.properties[pe]=ge,ge.scope){case 1:S.properties[pe]=ge;break;case 2:_.properties[pe]=ge;break;case 6:y.properties[pe]=ge;break;case 3:C.properties[pe]=ge;break;case 4:d.properties[pe]=ge;break;case 5:d.properties[pe]=ge,this.resourceLanguageSettingsSchema.properties[pe]=ge;break}}updateOverridePropertyPatternKey(){for(const pe of this.overrideIdentifiers.values()){const ge=`[${pe}]`,fe={type:"object",description:$.kg("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),errorMessage:$.kg("overrideSettings.errorMessage","This setting does not support per-language configuration."),$ref:w};this.updatePropertyDefaultValue(ge,fe),z.properties[ge]=fe,S.properties[ge]=fe,_.properties[ge]=fe,y.properties[ge]=fe,C.properties[ge]=fe,d.properties[ge]=fe}this._onDidSchemaChange.fire()}registerOverridePropertyPatternKey(){const pe={type:"object",description:$.kg("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),errorMessage:$.kg("overrideSettings.errorMessage","This setting does not support per-language configuration."),$ref:w};z.patternProperties[N]=pe,S.patternProperties[N]=pe,_.patternProperties[N]=pe,y.patternProperties[N]=pe,C.patternProperties[N]=pe,d.patternProperties[N]=pe,this._onDidSchemaChange.fire()}updatePropertyDefaultValue(pe,ge){const fe=this.configurationDefaultsOverrides.get(pe);let oe=fe?.value,Z=fe?.source;te.b0(oe)&&(oe=ge.defaultDefaultValue,Z=void 0),te.b0(oe)&&(oe=H(ge.type)),ge.default=oe,ge.defaultValueSource=Z}}const k="\\[([^\\]]+)\\]",j=new RegExp(k,"g"),N=`^(${k})+$`,B=new RegExp(N);function T(ce){const pe=[];if(B.test(ce)){let ge=j.exec(ce);for(;ge?.length;){const fe=ge[1].trim();fe&&pe.push(fe),ge=j.exec(ce)}}return(0,I.dM)(pe)}function H(ce){switch(Array.isArray(ce)?ce[0]:ce){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}const Y=new L;Q.O.add(J.Configuration,Y);function ee(ce,pe){var ge,fe,oe,Z;return ce.trim()?B.test(ce)?$.kg("config.property.languageDefault","Cannot register '{0}'. This matches property pattern '\\\\[.*\\\\]$' for describing language specific editor settings. Use 'configurationDefaults' contribution.",ce):Y.getConfigurationProperties()[ce]!==void 0?$.kg("config.property.duplicate","Cannot register '{0}'. This property is already registered.",ce):!((ge=pe.policy)===null||ge===void 0)&&ge.name&&Y.getPolicyConfigurations().get((fe=pe.policy)===null||fe===void 0?void 0:fe.name)!==void 0?$.kg("config.policy.duplicate","Cannot register '{0}'. The associated policy {1} is already registered with {2}.",ce,(oe=pe.policy)===null||oe===void 0?void 0:oe.name,Y.getPolicyConfigurations().get((Z=pe.policy)===null||Z===void 0?void 0:Z.name)):null:$.kg("config.property.empty","Cannot register an empty property")}},96655:(Tt,Fe,f)=>{f.d(Fe,{Ho:()=>fe,M$:()=>ie,M0:()=>le,N1:()=>pe,fN:()=>ge,jQ:()=>Q});var I=f(63339),h=f(16844),te=f(82399);const $=new Map;$.set("false",!1),$.set("true",!0),$.set("isMac",I.zx),$.set("isLinux",I.j9),$.set("isWindows",I.uF),$.set("isWeb",I.HZ),$.set("isMacNative",I.zx&&!I.HZ),$.set("isEdge",I.UP),$.set("isFirefox",I.gm),$.set("isChrome",I.H8),$.set("isSafari",I.nr);const x=Object.prototype.hasOwnProperty;class ie{static has(K){return _.create(K)}static equals(K,he){return y.create(K,he)}static regex(K,he){return T.create(K,he)}static not(K){return D.create(K)}static and(...K){return ee.create(K,null)}static or(...K){return ce.create(K,null,!0)}static deserialize(K,he=!1){if(K)return this._deserializeOrExpression(K,he)}static _deserializeOrExpression(K,he){const ve=K.split("||");return ce.create(ve.map(Ee=>this._deserializeAndExpression(Ee,he)),null,!0)}static _deserializeAndExpression(K,he){const ve=K.split("&&");return ee.create(ve.map(Ee=>this._deserializeOne(Ee,he)),null)}static _deserializeOne(K,he){if(K=K.trim(),K.indexOf("!=")>=0){const ve=K.split("!=");return w.create(ve[0].trim(),this._deserializeValue(ve[1],he))}if(K.indexOf("==")>=0){const ve=K.split("==");return y.create(ve[0].trim(),this._deserializeValue(ve[1],he))}if(K.indexOf("=~")>=0){const ve=K.split("=~");return T.create(ve[0].trim(),this._deserializeRegexValue(ve[1],he))}if(K.indexOf(" not in ")>=0){const ve=K.split(" not in ");return d.create(ve[0].trim(),ve[1].trim())}if(K.indexOf(" in ")>=0){const ve=K.split(" in ");return C.create(ve[0].trim(),ve[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(K)){const ve=K.split(">=");return j.create(ve[0].trim(),ve[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(K)){const ve=K.split(">");return k.create(ve[0].trim(),ve[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(K)){const ve=K.split("<=");return B.create(ve[0].trim(),ve[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(K)){const ve=K.split("<");return N.create(ve[0].trim(),ve[1].trim())}return/^\!\s*/.test(K)?D.create(K.substr(1).trim()):_.create(K)}static _deserializeValue(K,he){if(K=K.trim(),K==="true")return!0;if(K==="false")return!1;const ve=/^'([^']*)'$/.exec(K);return ve?ve[1].trim():K}static _deserializeRegexValue(K,he){if((0,h.AV)(K)){if(he)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}const ve=K.indexOf("/"),Ee=K.lastIndexOf("/");if(ve===Ee||ve<0){if(he)throw new Error(`bad regexp-value '${K}', missing /-enclosure`);return console.warn(`bad regexp-value '${K}', missing /-enclosure`),null}const O=K.slice(ve+1,Ee),ot=K[Ee+1]==="i"?"i":"";try{return new RegExp(O,ot)}catch(lt){if(he)throw new Error(`bad regexp-value '${K}', parse error: ${lt}`);return console.warn(`bad regexp-value '${K}', parse error: ${lt}`),null}}}function Q(X,K){const he=X?X.substituteConstants():void 0,ve=K?K.substituteConstants():void 0;return!he&&!ve?!0:!he||!ve?!1:he.equals(ve)}function J(X,K){return X.cmp(K)}class z{constructor(){this.type=0}cmp(K){return this.type-K.type}equals(K){return K.type===this.type}substituteConstants(){return this}evaluate(K){return!1}serialize(){return"false"}keys(){return[]}negate(){return S.INSTANCE}}z.INSTANCE=new z;class S{constructor(){this.type=1}cmp(K){return this.type-K.type}equals(K){return K.type===this.type}substituteConstants(){return this}evaluate(K){return!0}serialize(){return"true"}keys(){return[]}negate(){return z.INSTANCE}}S.INSTANCE=new S;class _{constructor(K,he){this.key=K,this.negated=he,this.type=2}static create(K,he=null){const ve=$.get(K);return typeof ve=="boolean"?ve?S.INSTANCE:z.INSTANCE:new _(K,he)}cmp(K){return K.type!==this.type?this.type-K.type:oe(this.key,K.key)}equals(K){return K.type===this.type?this.key===K.key:!1}substituteConstants(){const K=$.get(this.key);return typeof K=="boolean"?K?S.INSTANCE:z.INSTANCE:this}evaluate(K){return!!K.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=D.create(this.key,this)),this.negated}}class y{constructor(K,he,ve){this.key=K,this.value=he,this.negated=ve,this.type=4}static create(K,he,ve=null){if(typeof he=="boolean")return he?_.create(K,ve):D.create(K,ve);const Ee=$.get(K);return typeof Ee=="boolean"?he===(Ee?"true":"false")?S.INSTANCE:z.INSTANCE:new y(K,he,ve)}cmp(K){return K.type!==this.type?this.type-K.type:Z(this.key,this.value,K.key,K.value)}equals(K){return K.type===this.type?this.key===K.key&&this.value===K.value:!1}substituteConstants(){const K=$.get(this.key);if(typeof K=="boolean"){const he=K?"true":"false";return this.value===he?S.INSTANCE:z.INSTANCE}return this}evaluate(K){return K.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=w.create(this.key,this.value,this)),this.negated}}class C{constructor(K,he){this.key=K,this.valueKey=he,this.type=10,this.negated=null}static create(K,he){return new C(K,he)}cmp(K){return K.type!==this.type?this.type-K.type:Z(this.key,this.valueKey,K.key,K.valueKey)}equals(K){return K.type===this.type?this.key===K.key&&this.valueKey===K.valueKey:!1}substituteConstants(){return this}evaluate(K){const he=K.getValue(this.valueKey),ve=K.getValue(this.key);return Array.isArray(he)?he.includes(ve):typeof ve=="string"&&typeof he=="object"&&he!==null?x.call(he,ve):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=d.create(this.key,this.valueKey)),this.negated}}class d{constructor(K,he){this.key=K,this.valueKey=he,this.type=11,this._negated=C.create(K,he)}static create(K,he){return new d(K,he)}cmp(K){return K.type!==this.type?this.type-K.type:this._negated.cmp(K._negated)}equals(K){return K.type===this.type?this._negated.equals(K._negated):!1}substituteConstants(){return this}evaluate(K){return!this._negated.evaluate(K)}serialize(){return`${this.key} not in '${this.valueKey}'`}keys(){return this._negated.keys()}negate(){return this._negated}}class w{constructor(K,he,ve){this.key=K,this.value=he,this.negated=ve,this.type=5}static create(K,he,ve=null){if(typeof he=="boolean")return he?D.create(K,ve):_.create(K,ve);const Ee=$.get(K);return typeof Ee=="boolean"?he===(Ee?"true":"false")?z.INSTANCE:S.INSTANCE:new w(K,he,ve)}cmp(K){return K.type!==this.type?this.type-K.type:Z(this.key,this.value,K.key,K.value)}equals(K){return K.type===this.type?this.key===K.key&&this.value===K.value:!1}substituteConstants(){const K=$.get(this.key);if(typeof K=="boolean"){const he=K?"true":"false";return this.value===he?z.INSTANCE:S.INSTANCE}return this}evaluate(K){return K.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=y.create(this.key,this.value,this)),this.negated}}class D{constructor(K,he){this.key=K,this.negated=he,this.type=3}static create(K,he=null){const ve=$.get(K);return typeof ve=="boolean"?ve?z.INSTANCE:S.INSTANCE:new D(K,he)}cmp(K){return K.type!==this.type?this.type-K.type:oe(this.key,K.key)}equals(K){return K.type===this.type?this.key===K.key:!1}substituteConstants(){const K=$.get(this.key);return typeof K=="boolean"?K?z.INSTANCE:S.INSTANCE:this}evaluate(K){return!K.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=_.create(this.key,this)),this.negated}}function L(X,K){if(typeof X=="string"){const he=parseFloat(X);isNaN(he)||(X=he)}return typeof X=="string"||typeof X=="number"?K(X):z.INSTANCE}class k{constructor(K,he,ve){this.key=K,this.value=he,this.negated=ve,this.type=12}static create(K,he,ve=null){return L(he,Ee=>new k(K,Ee,ve))}cmp(K){return K.type!==this.type?this.type-K.type:Z(this.key,this.value,K.key,K.value)}equals(K){return K.type===this.type?this.key===K.key&&this.value===K.value:!1}substituteConstants(){return this}evaluate(K){return typeof this.value=="string"?!1:parseFloat(K.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=B.create(this.key,this.value,this)),this.negated}}class j{constructor(K,he,ve){this.key=K,this.value=he,this.negated=ve,this.type=13}static create(K,he,ve=null){return L(he,Ee=>new j(K,Ee,ve))}cmp(K){return K.type!==this.type?this.type-K.type:Z(this.key,this.value,K.key,K.value)}equals(K){return K.type===this.type?this.key===K.key&&this.value===K.value:!1}substituteConstants(){return this}evaluate(K){return typeof this.value=="string"?!1:parseFloat(K.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=N.create(this.key,this.value,this)),this.negated}}class N{constructor(K,he,ve){this.key=K,this.value=he,this.negated=ve,this.type=14}static create(K,he,ve=null){return L(he,Ee=>new N(K,Ee,ve))}cmp(K){return K.type!==this.type?this.type-K.type:Z(this.key,this.value,K.key,K.value)}equals(K){return K.type===this.type?this.key===K.key&&this.value===K.value:!1}substituteConstants(){return this}evaluate(K){return typeof this.value=="string"?!1:parseFloat(K.getValue(this.key))<this.value}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=j.create(this.key,this.value,this)),this.negated}}class B{constructor(K,he,ve){this.key=K,this.value=he,this.negated=ve,this.type=15}static create(K,he,ve=null){return L(he,Ee=>new B(K,Ee,ve))}cmp(K){return K.type!==this.type?this.type-K.type:Z(this.key,this.value,K.key,K.value)}equals(K){return K.type===this.type?this.key===K.key&&this.value===K.value:!1}substituteConstants(){return this}evaluate(K){return typeof this.value=="string"?!1:parseFloat(K.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=k.create(this.key,this.value,this)),this.negated}}class T{constructor(K,he){this.key=K,this.regexp=he,this.type=7,this.negated=null}static create(K,he){return new T(K,he)}cmp(K){if(K.type!==this.type)return this.type-K.type;if(this.key<K.key)return-1;if(this.key>K.key)return 1;const he=this.regexp?this.regexp.source:"",ve=K.regexp?K.regexp.source:"";return he<ve?-1:he>ve?1:0}equals(K){if(K.type===this.type){const he=this.regexp?this.regexp.source:"",ve=K.regexp?K.regexp.source:"";return this.key===K.key&&he===ve}return!1}substituteConstants(){return this}evaluate(K){const he=K.getValue(this.key);return this.regexp?this.regexp.test(he):!1}serialize(){const K=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${K}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=H.create(this)),this.negated}}class H{constructor(K){this._actual=K,this.type=8}static create(K){return new H(K)}cmp(K){return K.type!==this.type?this.type-K.type:this._actual.cmp(K._actual)}equals(K){return K.type===this.type?this._actual.equals(K._actual):!1}substituteConstants(){return this}evaluate(K){return!this._actual.evaluate(K)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function Y(X){let K=null;for(let he=0,ve=X.length;he<ve;he++){const Ee=X[he].substituteConstants();if(X[he]!==Ee&&K===null){K=[];for(let O=0;O<he;O++)K[O]=X[O]}K!==null&&(K[he]=Ee)}return K===null?X:K}class ee{constructor(K,he){this.expr=K,this.negated=he,this.type=6}static create(K,he){return ee._normalizeArr(K,he)}cmp(K){if(K.type!==this.type)return this.type-K.type;if(this.expr.length<K.expr.length)return-1;if(this.expr.length>K.expr.length)return 1;for(let he=0,ve=this.expr.length;he<ve;he++){const Ee=J(this.expr[he],K.expr[he]);if(Ee!==0)return Ee}return 0}equals(K){if(K.type===this.type){if(this.expr.length!==K.expr.length)return!1;for(let he=0,ve=this.expr.length;he<ve;he++)if(!this.expr[he].equals(K.expr[he]))return!1;return!0}return!1}substituteConstants(){const K=Y(this.expr);return K===this.expr?this:ee.create(K,this.negated)}evaluate(K){for(let he=0,ve=this.expr.length;he<ve;he++)if(!this.expr[he].evaluate(K))return!1;return!0}static _normalizeArr(K,he){const ve=[];let Ee=!1;for(const O of K)if(O){if(O.type===1){Ee=!0;continue}if(O.type===0)return z.INSTANCE;if(O.type===6){ve.push(...O.expr);continue}ve.push(O)}if(ve.length===0&&Ee)return S.INSTANCE;if(ve.length!==0){if(ve.length===1)return ve[0];ve.sort(J);for(let O=1;O<ve.length;O++)ve[O-1].equals(ve[O])&&(ve.splice(O,1),O--);if(ve.length===1)return ve[0];for(;ve.length>1;){const O=ve[ve.length-1];if(O.type!==9)break;ve.pop();const ot=ve.pop(),lt=ve.length===0,We=ce.create(O.expr.map(Ke=>ee.create([Ke,ot],null)),null,lt);We&&(ve.push(We),ve.sort(J))}return ve.length===1?ve[0]:new ee(ve,he)}}serialize(){return this.expr.map(K=>K.serialize()).join(" && ")}keys(){const K=[];for(const he of this.expr)K.push(...he.keys());return K}negate(){if(!this.negated){const K=[];for(const he of this.expr)K.push(he.negate());this.negated=ce.create(K,this,!0)}return this.negated}}class ce{constructor(K,he){this.expr=K,this.negated=he,this.type=9}static create(K,he,ve){return ce._normalizeArr(K,he,ve)}cmp(K){if(K.type!==this.type)return this.type-K.type;if(this.expr.length<K.expr.length)return-1;if(this.expr.length>K.expr.length)return 1;for(let he=0,ve=this.expr.length;he<ve;he++){const Ee=J(this.expr[he],K.expr[he]);if(Ee!==0)return Ee}return 0}equals(K){if(K.type===this.type){if(this.expr.length!==K.expr.length)return!1;for(let he=0,ve=this.expr.length;he<ve;he++)if(!this.expr[he].equals(K.expr[he]))return!1;return!0}return!1}substituteConstants(){const K=Y(this.expr);return K===this.expr?this:ce.create(K,this.negated,!1)}evaluate(K){for(let he=0,ve=this.expr.length;he<ve;he++)if(this.expr[he].evaluate(K))return!0;return!1}static _normalizeArr(K,he,ve){let Ee=[],O=!1;if(K){for(let ot=0,lt=K.length;ot<lt;ot++){const We=K[ot];if(We){if(We.type===0){O=!0;continue}if(We.type===1)return S.INSTANCE;if(We.type===9){Ee=Ee.concat(We.expr);continue}Ee.push(We)}}if(Ee.length===0&&O)return z.INSTANCE;Ee.sort(J)}if(Ee.length!==0){if(Ee.length===1)return Ee[0];for(let ot=1;ot<Ee.length;ot++)Ee[ot-1].equals(Ee[ot])&&(Ee.splice(ot,1),ot--);if(Ee.length===1)return Ee[0];if(ve){for(let ot=0;ot<Ee.length;ot++)for(let lt=ot+1;lt<Ee.length;lt++)le(Ee[ot],Ee[lt])&&(Ee.splice(lt,1),lt--);if(Ee.length===1)return Ee[0]}return new ce(Ee,he)}}serialize(){return this.expr.map(K=>K.serialize()).join(" || ")}keys(){const K=[];for(const he of this.expr)K.push(...he.keys());return K}negate(){if(!this.negated){const K=[];for(const he of this.expr)K.push(he.negate());for(;K.length>1;){const he=K.shift(),ve=K.shift(),Ee=[];for(const ot of se(he))for(const lt of se(ve))Ee.push(ee.create([ot,lt],null));const O=K.length===0;K.unshift(ce.create(Ee,null,O))}this.negated=K[0]}return this.negated}}class pe extends _{constructor(K,he,ve){super(K,null),this._defaultValue=he,typeof ve=="object"?pe._info.push(Object.assign(Object.assign({},ve),{key:K})):ve!==!0&&pe._info.push({key:K,description:ve,type:he!=null?typeof he:void 0})}static all(){return pe._info.values()}bindTo(K){return K.createKey(this.key,this._defaultValue)}getValue(K){return K.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(K){return y.create(this.key,K)}}pe._info=[];const ge=(0,te.u1)("contextKeyService"),fe="setContext";function oe(X,K){return X<K?-1:X>K?1:0}function Z(X,K,he,ve){return X<he?-1:X>he?1:K<ve?-1:K>ve?1:0}function le(X,K){if(K.type===6&&X.type!==9&&X.type!==6){for(const Ee of K.expr)if(X.equals(Ee))return!0}const he=X.negate(),ve=se(he).concat(se(K));ve.sort(J);for(let Ee=0;Ee<ve.length;Ee++){const ot=ve[Ee].negate();for(let lt=Ee+1;lt<ve.length;lt++){const We=ve[lt];if(ot.equals(We))return!0}}return!1}function se(X){return X.type===9?X.expr:[X]}},13034:(Tt,Fe,f)=>{f.d(Fe,{aV:()=>y,nd:()=>ie});var I=f(63339),h=f(3765),te=f(96655);const $=new te.N1("isMac",I.zx,(0,h.kg)("isMac","Whether the operating system is macOS")),x=new te.N1("isLinux",I.j9,(0,h.kg)("isLinux","Whether the operating system is Linux")),ie=new te.N1("isWindows",I.uF,(0,h.kg)("isWindows","Whether the operating system is Windows")),Q=new te.N1("isWeb",I.HZ,(0,h.kg)("isWeb","Whether the platform is a web browser")),J=new te.N1("isMacNative",I.zx&&!I.HZ,(0,h.kg)("isMacNative","Whether the operating system is macOS on a non-browser platform")),z=new te.N1("isIOS",I.un,(0,h.kg)("isIOS","Whether the operating system is iOS")),S=new te.N1("isDevelopment",!1,!0),_=new te.N1("productQualityType","",(0,h.kg)("productQualityType","Quality type of VS Code")),y="inputFocus",C=new te.N1(y,!1,(0,h.kg)("inputFocus","Whether keyboard focus is inside an input box"))},52348:(Tt,Fe,f)=>{f.d(Fe,{Z:()=>te,l:()=>h});var I=f(82399);const h=(0,I.u1)("contextViewService"),te=(0,I.u1)("contextMenuService")},94535:(Tt,Fe,f)=>{f.d(Fe,{X:()=>h});var I=f(82399);const h=(0,I.u1)("dialogService")},83312:(Tt,Fe,f)=>{f.d(Fe,{d:()=>I});class I{constructor(te,$=[],x=!1){this.ctor=te,this.staticArguments=$,this.supportsDelayedInstantiation=x}}},66726:(Tt,Fe,f)=>{f.d(Fe,{N:()=>$,v:()=>te});var I=f(83312);const h=[];function te(x,ie,Q){ie instanceof I.d||(ie=new I.d(ie,[],Q)),h.push([x,ie])}function $(){return h}},82399:(Tt,Fe,f)=>{f.d(Fe,{_$:()=>I,_Y:()=>h,u1:()=>$});var I;(function(x){x.serviceIds=new Map,x.DI_TARGET="$di$target",x.DI_DEPENDENCIES="$di$dependencies";function ie(Q){return Q[x.DI_DEPENDENCIES]||[]}x.getServiceDependencies=ie})(I||(I={}));const h=$("instantiationService");function te(x,ie,Q){ie[I.DI_TARGET]===ie?ie[I.DI_DEPENDENCIES].push({id:x,index:Q}):(ie[I.DI_DEPENDENCIES]=[{id:x,index:Q}],ie[I.DI_TARGET]=ie)}function $(x){if(I.serviceIds.has(x))return I.serviceIds.get(x);const ie=function(Q,J,z){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");te(ie,Q,z)};return ie.toString=()=>x,I.serviceIds.set(x,ie),ie}},30657:(Tt,Fe,f)=>{f.d(Fe,{a:()=>I});class I{constructor(...te){this._entries=new Map;for(const[$,x]of te)this.set($,x)}set(te,$){const x=this._entries.get(te);return this._entries.set(te,$),x}get(te){return this._entries.get(te)}}},51460:(Tt,Fe,f)=>{f.d(Fe,{F:()=>te});var I=f(2106),h=f(67167);const te={JSONContribution:"base.contributions.json"};function $(Q){return Q.length>0&&Q.charAt(Q.length-1)==="#"?Q.substring(0,Q.length-1):Q}class x{constructor(){this._onDidChangeSchema=new I.vl,this.schemasById={}}registerSchema(J,z){this.schemasById[$(J)]=z,this._onDidChangeSchema.fire(J)}notifySchemaChanged(J){this._onDidChangeSchema.fire(J)}}const ie=new x;h.O.add(te.JSONContribution,ie)},56071:(Tt,Fe,f)=>{f.d(Fe,{b:()=>h});var I=f(82399);const h=(0,I.u1)("keybindingService")},48421:(Tt,Fe,f)=>{f.d(Fe,{f:()=>ie});var I=f(39619),h=f(63339),te=f(59715),$=f(67167);class x{constructor(){this._coreKeybindings=[],this._extensionKeybindings=[],this._cachedMergedKeybindings=null}static bindToCurrentPlatform(S){if(h.OS===1){if(S&&S.win)return S.win}else if(h.OS===2){if(S&&S.mac)return S.mac}else if(S&&S.linux)return S.linux;return S}registerKeybindingRule(S){const _=x.bindToCurrentPlatform(S);if(_&&_.primary){const y=(0,I.ZU)(_.primary,h.OS);y&&this._registerDefaultKeybinding(y,S.id,S.args,S.weight,0,S.when)}if(_&&Array.isArray(_.secondary))for(let y=0,C=_.secondary.length;y<C;y++){const d=_.secondary[y],w=(0,I.ZU)(d,h.OS);w&&this._registerDefaultKeybinding(w,S.id,S.args,S.weight,-y-1,S.when)}}registerCommandAndKeybindingRule(S){this.registerKeybindingRule(S),te.wb.registerCommand(S)}static _mightProduceChar(S){return S>=21&&S<=30||S>=31&&S<=56?!0:S===80||S===81||S===82||S===83||S===84||S===85||S===86||S===110||S===111||S===87||S===88||S===89||S===90||S===91||S===92}_assertNoCtrlAlt(S,_){S.ctrlKey&&S.altKey&&!S.metaKey&&x._mightProduceChar(S.keyCode)&&console.warn("Ctrl+Alt+ keybindings should not be used by default under Windows. Offender: ",S," for ",_)}_registerDefaultKeybinding(S,_,y,C,d,w){h.OS===1&&this._assertNoCtrlAlt(S.parts[0],_),this._coreKeybindings.push({keybinding:S.parts,command:_,commandArgs:y,when:w,weight1:C,weight2:d,extensionId:null,isBuiltinExtension:!1}),this._cachedMergedKeybindings=null}getDefaultKeybindings(){return this._cachedMergedKeybindings||(this._cachedMergedKeybindings=[].concat(this._coreKeybindings).concat(this._extensionKeybindings),this._cachedMergedKeybindings.sort(J)),this._cachedMergedKeybindings.slice(0)}}const ie=new x,Q={EditorModes:"platform.keybindingsRegistry"};$.O.add(Q.EditorModes,ie);function J(z,S){return z.weight1!==S.weight1?z.weight1-S.weight1:z.command<S.command?-1:z.command>S.command?1:z.weight2-S.weight2}},8377:(Tt,Fe,f)=>{f.d(Fe,{L:()=>h});var I=f(82399);const h=(0,I.u1)("labelService")},4169:(Tt,Fe,f)=>{f.d(Fe,{PE:()=>Bi,aG:()=>rn,er:()=>fs,Ei:()=>vs,YD:()=>Wn,Nf:()=>Ti,cH:()=>xi});var I=f(59095),h=f(13338),te=f(78903),$=f(2106),x=f(10998),ie=f(67119),Q=f(67954);class J{constructor(p,F){this.renderer=p,this.modelProvider=F}get templateId(){return this.renderer.templateId}renderTemplate(p){return{data:this.renderer.renderTemplate(p),disposable:x.jG.None}}renderElement(p,F,de,be){if(de.disposable&&de.disposable.dispose(),!de.data)return;const ye=this.modelProvider();if(ye.isResolved(p))return this.renderer.renderElement(ye.get(p),p,de.data,be);const Me=new te.Q,He=ye.resolve(p,Me.token);de.disposable={dispose:()=>Me.cancel()},this.renderer.renderPlaceholder(p,de.data),He.then($e=>this.renderer.renderElement($e,p,de.data,be))}disposeTemplate(p){p.disposable&&(p.disposable.dispose(),p.disposable=void 0),p.data&&(this.renderer.disposeTemplate(p.data),p.data=void 0)}}class z{constructor(p,F){this.modelProvider=p,this.accessibilityProvider=F}getWidgetAriaLabel(){return this.accessibilityProvider.getWidgetAriaLabel()}getAriaLabel(p){const F=this.modelProvider();return F.isResolved(p)?this.accessibilityProvider.getAriaLabel(F.get(p)):null}}function S(q,p){return Object.assign(Object.assign({},p),{accessibilityProvider:p.accessibilityProvider&&new z(q,p.accessibilityProvider)})}class _{constructor(p,F,de,be,ye={}){const Me=()=>this.model,He=be.map($e=>new J($e,Me));this.list=new Q.B8(p,F,de,He,S(Me,ye))}updateOptions(p){this.list.updateOptions(p)}getHTMLElement(){return this.list.getHTMLElement()}get onDidFocus(){return this.list.onDidFocus}get onDidDispose(){return this.list.onDidDispose}get onMouseDblClick(){return $.Jh.map(this.list.onMouseDblClick,({element:p,index:F,browserEvent:de})=>({element:p===void 0?void 0:this._model.get(p),index:F,browserEvent:de}))}get onPointer(){return $.Jh.map(this.list.onPointer,({element:p,index:F,browserEvent:de})=>({element:p===void 0?void 0:this._model.get(p),index:F,browserEvent:de}))}get onDidChangeSelection(){return $.Jh.map(this.list.onDidChangeSelection,({elements:p,indexes:F,browserEvent:de})=>({elements:p.map(be=>this._model.get(be)),indexes:F,browserEvent:de}))}get model(){return this._model}set model(p){this._model=p,this.list.splice(0,this.list.length,(0,h.y1)(p.length))}getFocus(){return this.list.getFocus()}getSelection(){return this.list.getSelection()}getSelectedElements(){return this.getSelection().map(p=>this.model.get(p))}style(p){this.list.style(p)}dispose(){this.list.dispose()}}var y=f(67003),C=f(98977);class d{constructor(p,F,de){this.columns=p,this.getColumnSize=de,this.templateId=d.TemplateId,this.renderedTemplates=new Set;const be=new Map(F.map(ye=>[ye.templateId,ye]));this.renderers=[];for(const ye of p){const Me=be.get(ye.templateId);if(!Me)throw new Error(`Table cell renderer for template id ${ye.templateId} not found.`);this.renderers.push(Me)}}renderTemplate(p){const F=(0,I.BC)(p,(0,I.$)(".monaco-table-tr")),de=[],be=[];for(let Me=0;Me<this.columns.length;Me++){const He=this.renderers[Me],$e=(0,I.BC)(F,(0,I.$)(".monaco-table-td",{"data-col-index":Me}));$e.style.width=`${this.getColumnSize(Me)}px`,de.push($e),be.push(He.renderTemplate($e))}const ye={container:p,cellContainers:de,cellTemplateData:be};return this.renderedTemplates.add(ye),ye}renderElement(p,F,de,be){for(let ye=0;ye<this.columns.length;ye++){const He=this.columns[ye].project(p);this.renderers[ye].renderElement(He,F,de.cellTemplateData[ye],be)}}disposeElement(p,F,de,be){for(let ye=0;ye<this.columns.length;ye++){const Me=this.renderers[ye];if(Me.disposeElement){const $e=this.columns[ye].project(p);Me.disposeElement($e,F,de.cellTemplateData[ye],be)}}}disposeTemplate(p){for(let F=0;F<this.columns.length;F++)this.renderers[F].disposeTemplate(p.cellTemplateData[F]);(0,I.w_)(p.container),this.renderedTemplates.delete(p)}layoutColumn(p,F){for(const{cellContainers:de}of this.renderedTemplates)de[p].style.width=`${F}px`}}d.TemplateId="row";function w(q){return{getHeight(p){return q.getHeight(p)},getTemplateId(){return d.TemplateId}}}class D{constructor(p,F){this.column=p,this.index=F,this._onDidLayout=new $.vl,this.onDidLayout=this._onDidLayout.event,this.element=(0,I.$)(".monaco-table-th",{"data-col-index":F,title:p.tooltip},p.label)}get minimumSize(){var p;return(p=this.column.minimumWidth)!==null&&p!==void 0?p:120}get maximumSize(){var p;return(p=this.column.maximumWidth)!==null&&p!==void 0?p:Number.POSITIVE_INFINITY}get onDidChange(){var p;return(p=this.column.onDidChangeWidthConstraints)!==null&&p!==void 0?p:$.Jh.None}layout(p){this._onDidLayout.fire([this.index,p])}}class L{constructor(p,F,de,be,ye,Me){this.virtualDelegate=de,this.domId=`table_id_${++L.InstanceCount}`,this.disposables=new x.Cm,this.cachedWidth=0,this.cachedHeight=0,this.domNode=(0,I.BC)(F,(0,I.$)(`.monaco-table.${this.domId}`));const He=be.map((wt,It)=>new D(wt,It)),$e={size:He.reduce((wt,It)=>wt+It.column.weight,0),views:He.map(wt=>({size:wt.column.weight,view:wt}))};this.splitview=this.disposables.add(new y.U(this.domNode,{orientation:1,scrollbarVisibility:2,getSashOrthogonalSize:()=>this.cachedHeight,descriptor:$e})),this.splitview.el.style.height=`${de.headerRowHeight}px`,this.splitview.el.style.lineHeight=`${de.headerRowHeight}px`;const gt=new d(be,ye,wt=>this.splitview.getViewSize(wt));this.list=this.disposables.add(new Q.B8(p,this.domNode,w(de),[gt],Me)),$.Jh.any(...He.map(wt=>wt.onDidLayout))(([wt,It])=>gt.layoutColumn(wt,It),null,this.disposables),this.splitview.onDidSashReset(wt=>{const It=be.reduce((Wt,Xt)=>Wt+Xt.weight,0),Pt=be[wt].weight/It*this.cachedWidth;this.splitview.resizeView(wt,Pt)},null,this.disposables),this.styleElement=(0,I.li)(this.domNode),this.style({})}get onDidChangeFocus(){return this.list.onDidChangeFocus}get onDidChangeSelection(){return this.list.onDidChangeSelection}get onMouseDblClick(){return this.list.onMouseDblClick}get onPointer(){return this.list.onPointer}get onDidFocus(){return this.list.onDidFocus}get onDidDispose(){return this.list.onDidDispose}updateOptions(p){this.list.updateOptions(p)}splice(p,F,de=[]){this.list.splice(p,F,de)}getHTMLElement(){return this.domNode}style(p){const F=[];F.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=F.join(` `),this.list.style(p)}getSelectedElements(){return this.list.getSelectedElements()}getSelection(){return this.list.getSelection()}getFocus(){return this.list.getFocus()}dispose(){this.disposables.dispose()}}L.InstanceCount=0;var k=f(34061),j=f(87594),N=f(77439),B=f(6595),T=f(83022),H=f(50585),Y;(function(q){q[q.Unknown=0]="Unknown",q[q.Twistie=1]="Twistie",q[q.Element=2]="Element",q[q.Filter=3]="Filter"})(Y||(Y={}));class ee extends Error{constructor(p,F){super(`TreeError [${p}] ${F}`)}}class ce{constructor(p){this.fn=p,this._map=new WeakMap}map(p){let F=this._map.get(p);return F||(F=this.fn(p),this._map.set(p,F)),F}}var pe=f(65958),ge=f(2111),fe=f(17954);function oe(q){return typeof q=="object"&&"visibility"in q&&"data"in q}function Z(q){switch(q){case!0:return 1;case!1:return 0;default:return q}}function le(q){return typeof q.collapsible=="boolean"}class se{constructor(p,F,de,be={}){this.user=p,this.list=F,this.rootRef=[],this.eventBufferer=new $.at,this._onDidChangeCollapseState=new $.vl,this.onDidChangeCollapseState=this.eventBufferer.wrapEvent(this._onDidChangeCollapseState.event),this._onDidChangeRenderNodeCount=new $.vl,this.onDidChangeRenderNodeCount=this.eventBufferer.wrapEvent(this._onDidChangeRenderNodeCount.event),this._onDidSplice=new $.vl,this.onDidSplice=this._onDidSplice.event,this.refilterDelayer=new pe.ve(pe.hW),this.collapseByDefault=typeof be.collapseByDefault>"u"?!1:be.collapseByDefault,this.filter=be.filter,this.autoExpandSingleChildren=typeof be.autoExpandSingleChildren>"u"?!1:be.autoExpandSingleChildren,this.root={parent:void 0,element:de,children:[],depth:0,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:!1,collapsed:!1,renderNodeCount:0,visibility:1,visible:!0,filterData:void 0}}splice(p,F,de=fe.f.empty(),be={}){if(p.length===0)throw new ee(this.user,"Invalid tree location");be.diffIdentityProvider?this.spliceSmart(be.diffIdentityProvider,p,F,de,be):this.spliceSimple(p,F,de,be)}spliceSmart(p,F,de,be,ye,Me){var He;be===void 0&&(be=fe.f.empty()),Me===void 0&&(Me=(He=ye.diffDepth)!==null&&He!==void 0?He:0);const{parentNode:$e}=this.getParentNodeWithListIndex(F);if(!$e.lastDiffIds)return this.spliceSimple(F,de,be,ye);const gt=[...be],wt=F[F.length-1],It=new ge.uP({getElements:()=>$e.lastDiffIds},{getElements:()=>[...$e.children.slice(0,wt),...gt,...$e.children.slice(wt+de)].map(Ii=>p.getId(Ii.element).toString())}).ComputeDiff(!1);if(It.quitEarly)return $e.lastDiffIds=void 0,this.spliceSimple(F,de,gt,ye);const Pt=F.slice(0,-1),Wt=(Ii,Ji,In)=>{if(Me>0)for(let Mi=0;Mi<In;Mi++)Ii--,Ji--,this.spliceSmart(p,[...Pt,Ii,0],Number.MAX_SAFE_INTEGER,gt[Ji].children,ye,Me-1)};let Xt=Math.min($e.children.length,wt+de),mi=gt.length;for(const Ii of It.changes.sort((Ji,In)=>In.originalStart-Ji.originalStart))Wt(Xt,mi,Xt-(Ii.originalStart+Ii.originalLength)),Xt=Ii.originalStart,mi=Ii.modifiedStart-wt,this.spliceSimple([...Pt,Xt],Ii.originalLength,fe.f.slice(gt,mi,mi+Ii.modifiedLength),ye);Wt(Xt,mi,Xt)}spliceSimple(p,F,de=fe.f.empty(),{onDidCreateNode:be,onDidDeleteNode:ye,diffIdentityProvider:Me}){const{parentNode:He,listIndex:$e,revealed:gt,visible:wt}=this.getParentNodeWithListIndex(p),It=[],Pt=fe.f.map(de,ns=>this.createTreeNode(ns,He,He.visible?1:0,gt,It,be)),Wt=p[p.length-1],Xt=He.children.length>0;let mi=0;for(let ns=Wt;ns>=0&&ns<He.children.length;ns--){const oo=He.children[ns];if(oo.visible){mi=oo.visibleChildIndex;break}}const Ii=[];let Ji=0,In=0;for(const ns of Pt)Ii.push(ns),In+=ns.renderNodeCount,ns.visible&&(ns.visibleChildIndex=mi+Ji++);const Mi=(0,h.V4)(He.children,Wt,F,Ii);Me?He.lastDiffIds?(0,h.V4)(He.lastDiffIds,Wt,F,Ii.map(ns=>Me.getId(ns.element).toString())):He.lastDiffIds=He.children.map(ns=>Me.getId(ns.element).toString()):He.lastDiffIds=void 0;let Vi=0;for(const ns of Mi)ns.visible&&Vi++;if(Vi!==0)for(let ns=Wt+Ii.length;ns<He.children.length;ns++){const oo=He.children[ns];oo.visible&&(oo.visibleChildIndex-=Vi)}if(He.visibleChildrenCount+=Ji-Vi,gt&&wt){const ns=Mi.reduce((oo,go)=>oo+(go.visible?go.renderNodeCount:0),0);this._updateAncestorsRenderNodeCount(He,In-ns),this.list.splice($e,ns,It)}if(Mi.length>0&&ye){const ns=oo=>{ye(oo),oo.children.forEach(ns)};Mi.forEach(ns)}this._onDidSplice.fire({insertedNodes:Ii,deletedNodes:Mi});const Os=He.children.length>0;Xt!==Os&&this.setCollapsible(p.slice(0,-1),Os);let bo=He;for(;bo;){if(bo.visibility===2){this.refilterDelayer.trigger(()=>this.refilter());break}bo=bo.parent}}rerender(p){if(p.length===0)throw new ee(this.user,"Invalid tree location");const{node:F,listIndex:de,revealed:be}=this.getTreeNodeWithListIndex(p);F.visible&&be&&this.list.splice(de,1,[F])}has(p){return this.hasTreeNode(p)}getListIndex(p){const{listIndex:F,visible:de,revealed:be}=this.getTreeNodeWithListIndex(p);return de&&be?F:-1}getListRenderCount(p){return this.getTreeNode(p).renderNodeCount}isCollapsible(p){return this.getTreeNode(p).collapsible}setCollapsible(p,F){const de=this.getTreeNode(p);typeof F>"u"&&(F=!de.collapsible);const be={collapsible:F};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(p,be))}isCollapsed(p){return this.getTreeNode(p).collapsed}setCollapsed(p,F,de){const be=this.getTreeNode(p);typeof F>"u"&&(F=!be.collapsed);const ye={collapsed:F,recursive:de||!1};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(p,ye))}_setCollapseState(p,F){const{node:de,listIndex:be,revealed:ye}=this.getTreeNodeWithListIndex(p),Me=this._setListNodeCollapseState(de,be,ye,F);if(de!==this.root&&this.autoExpandSingleChildren&&Me&&!le(F)&&de.collapsible&&!de.collapsed&&!F.recursive){let He=-1;for(let $e=0;$e<de.children.length;$e++)if(de.children[$e].visible)if(He>-1){He=-1;break}else He=$e;He>-1&&this._setCollapseState([...p,He],F)}return Me}_setListNodeCollapseState(p,F,de,be){const ye=this._setNodeCollapseState(p,be,!1);if(!de||!p.visible||!ye)return ye;const Me=p.renderNodeCount,He=this.updateNodeAfterCollapseChange(p),$e=Me-(F===-1?0:1);return this.list.splice(F+1,$e,He.slice(1)),ye}_setNodeCollapseState(p,F,de){let be;if(p===this.root?be=!1:(le(F)?(be=p.collapsible!==F.collapsible,p.collapsible=F.collapsible):p.collapsible?(be=p.collapsed!==F.collapsed,p.collapsed=F.collapsed):be=!1,be&&this._onDidChangeCollapseState.fire({node:p,deep:de})),!le(F)&&F.recursive)for(const ye of p.children)be=this._setNodeCollapseState(ye,F,!0)||be;return be}expandTo(p){this.eventBufferer.bufferEvents(()=>{let F=this.getTreeNode(p);for(;F.parent;)F=F.parent,p=p.slice(0,p.length-1),F.collapsed&&this._setCollapseState(p,{collapsed:!1,recursive:!1})})}refilter(){const p=this.root.renderNodeCount,F=this.updateNodeAfterFilterChange(this.root);this.list.splice(0,p,F),this.refilterDelayer.cancel()}createTreeNode(p,F,de,be,ye,Me){const He={parent:F,element:p.element,children:[],depth:F.depth+1,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:typeof p.collapsible=="boolean"?p.collapsible:typeof p.collapsed<"u",collapsed:typeof p.collapsed>"u"?this.collapseByDefault:p.collapsed,renderNodeCount:1,visibility:1,visible:!0,filterData:void 0},$e=this._filterNode(He,de);He.visibility=$e,be&&ye.push(He);const gt=p.children||fe.f.empty(),wt=be&&$e!==0&&!He.collapsed,It=fe.f.map(gt,Xt=>this.createTreeNode(Xt,He,$e,wt,ye,Me));let Pt=0,Wt=1;for(const Xt of It)He.children.push(Xt),Wt+=Xt.renderNodeCount,Xt.visible&&(Xt.visibleChildIndex=Pt++);return He.collapsible=He.collapsible||He.children.length>0,He.visibleChildrenCount=Pt,He.visible=$e===2?Pt>0:$e===1,He.visible?He.collapsed||(He.renderNodeCount=Wt):(He.renderNodeCount=0,be&&ye.pop()),Me?.(He),He}updateNodeAfterCollapseChange(p){const F=p.renderNodeCount,de=[];return this._updateNodeAfterCollapseChange(p,de),this._updateAncestorsRenderNodeCount(p.parent,de.length-F),de}_updateNodeAfterCollapseChange(p,F){if(p.visible===!1)return 0;if(F.push(p),p.renderNodeCount=1,!p.collapsed)for(const de of p.children)p.renderNodeCount+=this._updateNodeAfterCollapseChange(de,F);return this._onDidChangeRenderNodeCount.fire(p),p.renderNodeCount}updateNodeAfterFilterChange(p){const F=p.renderNodeCount,de=[];return this._updateNodeAfterFilterChange(p,p.visible?1:0,de),this._updateAncestorsRenderNodeCount(p.parent,de.length-F),de}_updateNodeAfterFilterChange(p,F,de,be=!0){let ye;if(p!==this.root){if(ye=this._filterNode(p,F),ye===0)return p.visible=!1,p.renderNodeCount=0,!1;be&&de.push(p)}const Me=de.length;p.renderNodeCount=p===this.root?0:1;let He=!1;if(!p.collapsed||ye!==0){let $e=0;for(const gt of p.children)He=this._updateNodeAfterFilterChange(gt,ye,de,be&&!p.collapsed)||He,gt.visible&&(gt.visibleChildIndex=$e++);p.visibleChildrenCount=$e}else p.visibleChildrenCount=0;return p!==this.root&&(p.visible=ye===2?He:ye===1,p.visibility=ye),p.visible?p.collapsed||(p.renderNodeCount+=de.length-Me):(p.renderNodeCount=0,be&&de.pop()),this._onDidChangeRenderNodeCount.fire(p),p.visible}_updateAncestorsRenderNodeCount(p,F){if(F!==0)for(;p;)p.renderNodeCount+=F,this._onDidChangeRenderNodeCount.fire(p),p=p.parent}_filterNode(p,F){const de=this.filter?this.filter.filter(p.element,F):1;return typeof de=="boolean"?(p.filterData=void 0,de?1:0):oe(de)?(p.filterData=de.data,Z(de.visibility)):(p.filterData=void 0,Z(de))}hasTreeNode(p,F=this.root){if(!p||p.length===0)return!0;const[de,...be]=p;return de<0||de>F.children.length?!1:this.hasTreeNode(be,F.children[de])}getTreeNode(p,F=this.root){if(!p||p.length===0)return F;const[de,...be]=p;if(de<0||de>F.children.length)throw new ee(this.user,"Invalid tree location");return this.getTreeNode(be,F.children[de])}getTreeNodeWithListIndex(p){if(p.length===0)return{node:this.root,listIndex:-1,revealed:!0,visible:!1};const{parentNode:F,listIndex:de,revealed:be,visible:ye}=this.getParentNodeWithListIndex(p),Me=p[p.length-1];if(Me<0||Me>F.children.length)throw new ee(this.user,"Invalid tree location");const He=F.children[Me];return{node:He,listIndex:de,revealed:be,visible:ye&&He.visible}}getParentNodeWithListIndex(p,F=this.root,de=0,be=!0,ye=!0){const[Me,...He]=p;if(Me<0||Me>F.children.length)throw new ee(this.user,"Invalid tree location");for(let $e=0;$e<Me;$e++)de+=F.children[$e].renderNodeCount;return be=be&&!F.collapsed,ye=ye&&F.visible,He.length===0?{parentNode:F,listIndex:de,revealed:be,visible:ye}:this.getParentNodeWithListIndex(He,F.children[Me],de+1,be,ye)}getNode(p=[]){return this.getTreeNode(p)}getNodeLocation(p){const F=[];let de=p;for(;de.parent;)F.push(de.parent.children.indexOf(de)),de=de.parent;return F.reverse()}getParentNodeLocation(p){if(p.length!==0)return p.length===1?[]:(0,h.bS)(p)[0]}getFirstElementChild(p){const F=this.getTreeNode(p);if(F.children.length!==0)return F.children[0].element}}var X=f(27969),K=f(26048);class he{constructor(){this.map=new Map}add(p,F){let de=this.map.get(p);de||(de=new Set,this.map.set(p,de)),de.add(F)}delete(p,F){const de=this.map.get(p);de&&(de.delete(F),de.size===0&&this.map.delete(p))}forEach(p,F){const de=this.map.get(p);de&&de.forEach(F)}}var ve=f(97669),Ee=f(62992),O=f(79359),ot=f(66136),lt=f(3765),We=function(q,p,F,de){function be(ye){return ye instanceof F?ye:new F(function(Me){Me(ye)})}return new(F||(F=Promise))(function(ye,Me){function He(wt){try{gt(de.next(wt))}catch(It){Me(It)}}function $e(wt){try{gt(de.throw(wt))}catch(It){Me(It)}}function gt(wt){wt.done?ye(wt.value):be(wt.value).then(He,$e)}gt((de=de.apply(q,p||[])).next())})};class Ke extends T.ur{constructor(p){super(p.elements.map(F=>F.element)),this.data=p}}function De(q){return q instanceof T.ur?new Ke(q):q}class Pe{constructor(p,F){this.modelProvider=p,this.dnd=F,this.autoExpandDisposable=x.jG.None}getDragURI(p){return this.dnd.getDragURI(p.element)}getDragLabel(p,F){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(p.map(de=>de.element),F)}onDragStart(p,F){var de,be;(be=(de=this.dnd).onDragStart)===null||be===void 0||be.call(de,De(p),F)}onDragOver(p,F,de,be,ye=!0){const Me=this.dnd.onDragOver(De(p),F&&F.element,de,be),He=this.autoExpandNode!==F;if(He&&(this.autoExpandDisposable.dispose(),this.autoExpandNode=F),typeof F>"u")return Me;if(He&&typeof Me!="boolean"&&Me.autoExpand&&(this.autoExpandDisposable=(0,pe.EQ)(()=>{const Pt=this.modelProvider(),Wt=Pt.getNodeLocation(F);Pt.isCollapsed(Wt)&&Pt.setCollapsed(Wt,!1),this.autoExpandNode=void 0},500)),typeof Me=="boolean"||!Me.accept||typeof Me.bubble>"u"||Me.feedback){if(!ye){const Pt=typeof Me=="boolean"?Me:Me.accept,Wt=typeof Me=="boolean"?void 0:Me.effect;return{accept:Pt,effect:Wt,feedback:[de]}}return Me}if(Me.bubble===1){const Pt=this.modelProvider(),Wt=Pt.getNodeLocation(F),Xt=Pt.getParentNodeLocation(Wt),mi=Pt.getNode(Xt),Ii=Xt&&Pt.getListIndex(Xt);return this.onDragOver(p,mi,Ii,be,!1)}const $e=this.modelProvider(),gt=$e.getNodeLocation(F),wt=$e.getListIndex(gt),It=$e.getListRenderCount(gt);return Object.assign(Object.assign({},Me),{feedback:(0,h.y1)(wt,wt+It)})}drop(p,F,de,be){this.autoExpandDisposable.dispose(),this.autoExpandNode=void 0,this.dnd.drop(De(p),F&&F.element,de,be)}onDragEnd(p){var F,de;(de=(F=this.dnd).onDragEnd)===null||de===void 0||de.call(F,p)}}function Ue(q,p){return p&&Object.assign(Object.assign({},p),{identityProvider:p.identityProvider&&{getId(F){return p.identityProvider.getId(F.element)}},dnd:p.dnd&&new Pe(q,p.dnd),multipleSelectionController:p.multipleSelectionController&&{isSelectionSingleChangeEvent(F){return p.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},F),{element:F.element}))},isSelectionRangeChangeEvent(F){return p.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},F),{element:F.element}))}},accessibilityProvider:p.accessibilityProvider&&Object.assign(Object.assign({},p.accessibilityProvider),{getSetSize(F){const de=q(),be=de.getNodeLocation(F),ye=de.getParentNodeLocation(be);return de.getNode(ye).visibleChildrenCount},getPosInSet(F){return F.visibleChildIndex+1},isChecked:p.accessibilityProvider&&p.accessibilityProvider.isChecked?F=>p.accessibilityProvider.isChecked(F.element):void 0,getRole:p.accessibilityProvider&&p.accessibilityProvider.getRole?F=>p.accessibilityProvider.getRole(F.element):()=>"treeitem",getAriaLabel(F){return p.accessibilityProvider.getAriaLabel(F.element)},getWidgetAriaLabel(){return p.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:p.accessibilityProvider&&p.accessibilityProvider.getWidgetRole?()=>p.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:p.accessibilityProvider&&p.accessibilityProvider.getAriaLevel?F=>p.accessibilityProvider.getAriaLevel(F.element):F=>F.depth,getActiveDescendantId:p.accessibilityProvider.getActiveDescendantId&&(F=>p.accessibilityProvider.getActiveDescendantId(F.element))}),keyboardNavigationLabelProvider:p.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},p.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel(F){return p.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(F.element)}})})}class Re{constructor(p){this.delegate=p}getHeight(p){return this.delegate.getHeight(p.element)}getTemplateId(p){return this.delegate.getTemplateId(p.element)}hasDynamicHeight(p){return!!this.delegate.hasDynamicHeight&&this.delegate.hasDynamicHeight(p.element)}setDynamicHeight(p,F){var de,be;(be=(de=this.delegate).setDynamicHeight)===null||be===void 0||be.call(de,p.element,F)}}var et;(function(q){q.None="none",q.OnHover="onHover",q.Always="always"})(et||(et={}));class rt{constructor(p,F=[]){this._elements=F,this.disposables=new x.Cm,this.onDidChange=$.Jh.forEach(p,de=>this._elements=de,this.disposables)}get elements(){return this._elements}dispose(){this.disposables.dispose()}}class Lt{constructor(p,F,de,be,ye={}){var Me;this.renderer=p,this.modelProvider=F,this.activeNodes=be,this.renderedElements=new Map,this.renderedNodes=new Map,this.indent=Lt.DefaultIndent,this.hideTwistiesOfChildlessElements=!1,this.shouldRenderIndentGuides=!1,this.renderedIndentGuides=new he,this.activeIndentNodes=new Set,this.indentGuidesDisposable=x.jG.None,this.disposables=new x.Cm,this.templateId=p.templateId,this.updateOptions(ye),$.Jh.map(de,He=>He.node)(this.onDidChangeNodeTwistieState,this,this.disposables),(Me=p.onDidChangeTwistieState)===null||Me===void 0||Me.call(p,this.onDidChangeTwistieState,this,this.disposables)}updateOptions(p={}){if(typeof p.indent<"u"&&(this.indent=(0,Ee.qE)(p.indent,0,40)),typeof p.renderIndentGuides<"u"){const F=p.renderIndentGuides!==et.None;if(F!==this.shouldRenderIndentGuides&&(this.shouldRenderIndentGuides=F,this.indentGuidesDisposable.dispose(),F)){const de=new x.Cm;this.activeNodes.onDidChange(this._onDidChangeActiveNodes,this,de),this.indentGuidesDisposable=de,this._onDidChangeActiveNodes(this.activeNodes.elements)}}typeof p.hideTwistiesOfChildlessElements<"u"&&(this.hideTwistiesOfChildlessElements=p.hideTwistiesOfChildlessElements)}renderTemplate(p){const F=(0,I.BC)(p,(0,I.$)(".monaco-tl-row")),de=(0,I.BC)(F,(0,I.$)(".monaco-tl-indent")),be=(0,I.BC)(F,(0,I.$)(".monaco-tl-twistie")),ye=(0,I.BC)(F,(0,I.$)(".monaco-tl-contents")),Me=this.renderer.renderTemplate(ye);return{container:p,indent:de,twistie:be,indentGuidesDisposable:x.jG.None,templateData:Me}}renderElement(p,F,de,be){typeof be=="number"&&(this.renderedNodes.set(p,{templateData:de,height:be}),this.renderedElements.set(p.element,p));const ye=Lt.DefaultIndent+(p.depth-1)*this.indent;de.twistie.style.paddingLeft=`${ye}px`,de.indent.style.width=`${ye+this.indent-16}px`,this.renderTwistie(p,de),typeof be=="number"&&this.renderIndentGuides(p,de),this.renderer.renderElement(p,F,de.templateData,be)}disposeElement(p,F,de,be){var ye,Me;de.indentGuidesDisposable.dispose(),(Me=(ye=this.renderer).disposeElement)===null||Me===void 0||Me.call(ye,p,F,de.templateData,be),typeof be=="number"&&(this.renderedNodes.delete(p),this.renderedElements.delete(p.element))}disposeTemplate(p){this.renderer.disposeTemplate(p.templateData)}onDidChangeTwistieState(p){const F=this.renderedElements.get(p);F&&this.onDidChangeNodeTwistieState(F)}onDidChangeNodeTwistieState(p){const F=this.renderedNodes.get(p);F&&(this.renderTwistie(p,F.templateData),this._onDidChangeActiveNodes(this.activeNodes.elements),this.renderIndentGuides(p,F.templateData))}renderTwistie(p,F){F.twistie.classList.remove(...K.W6.treeItemExpanded.classNamesArray);let de=!1;this.renderer.renderTwistie&&(de=this.renderer.renderTwistie(p.element,F.twistie)),p.collapsible&&(!this.hideTwistiesOfChildlessElements||p.visibleChildrenCount>0)?(de||F.twistie.classList.add(...K.W6.treeItemExpanded.classNamesArray),F.twistie.classList.add("collapsible"),F.twistie.classList.toggle("collapsed",p.collapsed)):F.twistie.classList.remove("collapsible","collapsed"),p.collapsible?F.container.setAttribute("aria-expanded",String(!p.collapsed)):F.container.removeAttribute("aria-expanded")}renderIndentGuides(p,F){if((0,I.w_)(F.indent),F.indentGuidesDisposable.dispose(),!this.shouldRenderIndentGuides)return;const de=new x.Cm,be=this.modelProvider();let ye=p;for(;;){const Me=be.getNodeLocation(ye),He=be.getParentNodeLocation(Me);if(!He)break;const $e=be.getNode(He),gt=(0,I.$)(".indent-guide",{style:`width: ${this.indent}px`});this.activeIndentNodes.has($e)&>.classList.add("active"),F.indent.childElementCount===0?F.indent.appendChild(gt):F.indent.insertBefore(gt,F.indent.firstElementChild),this.renderedIndentGuides.add($e,gt),de.add((0,x.s)(()=>this.renderedIndentGuides.delete($e,gt))),ye=$e}F.indentGuidesDisposable=de}_onDidChangeActiveNodes(p){if(!this.shouldRenderIndentGuides)return;const F=new Set,de=this.modelProvider();p.forEach(be=>{const ye=de.getNodeLocation(be);try{const Me=de.getParentNodeLocation(ye);be.collapsible&&be.children.length>0&&!be.collapsed?F.add(be):Me&&F.add(de.getNode(Me))}catch{}}),this.activeIndentNodes.forEach(be=>{F.has(be)||this.renderedIndentGuides.forEach(be,ye=>ye.classList.remove("active"))}),F.forEach(be=>{this.activeIndentNodes.has(be)||this.renderedIndentGuides.forEach(be,ye=>ye.classList.add("active"))}),this.activeIndentNodes=F}dispose(){this.renderedNodes.clear(),this.renderedElements.clear(),this.indentGuidesDisposable.dispose(),(0,x.AS)(this.disposables)}}Lt.DefaultIndent=8;class Dt{constructor(p,F,de){this.tree=p,this.keyboardNavigationLabelProvider=F,this._filter=de,this._totalCount=0,this._matchCount=0,this._pattern="",this._lowercasePattern="",this.disposables=new x.Cm,p.onWillRefilter(this.reset,this,this.disposables)}get totalCount(){return this._totalCount}get matchCount(){return this._matchCount}filter(p,F){let de=1;if(this._filter){const Me=this._filter.filter(p,F);if(typeof Me=="boolean"?de=Me?1:0:oe(Me)?de=Z(Me.visibility):de=Me,de===0)return!1}if(this._totalCount++,!this._pattern)return this._matchCount++,{data:ve.ne.Default,visibility:de};const be=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(p),ye=Array.isArray(be)?be:[be];for(const Me of ye){const He=Me&&Me.toString();if(typeof He>"u")return{data:ve.ne.Default,visibility:de};const $e=(0,ve.dt)(this._pattern,this._lowercasePattern,0,He,He.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});if($e)return this._matchCount++,ye.length===1?{data:$e,visibility:de}:{data:{label:He,score:$e},visibility:de}}return this.tree.findMode===Ie.Filter?2:{data:ve.ne.Default,visibility:de}}reset(){this._totalCount=0,this._matchCount=0}dispose(){(0,x.AS)(this.disposables)}}class xt extends H.l{constructor(p){var F;super({icon:K.W6.filter,title:(0,lt.kg)("filter","Filter"),isChecked:(F=p?.isChecked)!==null&&F!==void 0?F:!1,inputActiveOptionBorder:p?.inputActiveOptionBorder,inputActiveOptionForeground:p?.inputActiveOptionForeground,inputActiveOptionBackground:p?.inputActiveOptionBackground})}}var Ie;(function(q){q[q.Highlight=0]="Highlight",q[q.Filter=1]="Filter"})(Ie||(Ie={}));class dt extends x.jG{constructor(p,F,de,be,ye){super(),this.tree=F,this.elements=(0,I.h)(".monaco-tree-type-filter",[(0,I.h)(".monaco-tree-type-filter-grab.codicon.codicon-debug-gripper@grab",{tabIndex:0}),(0,I.h)(".monaco-tree-type-filter-input@findInput"),(0,I.h)(".monaco-tree-type-filter-actionbar@actionbar")]),this.width=0,this.right=0,this._onDidDisable=new $.vl,p.appendChild(this.elements.root),this._register((0,x.s)(()=>p.removeChild(this.elements.root))),this.modeToggle=this._register(new xt(Object.assign(Object.assign({},ye),{isChecked:be===Ie.Filter}))),this.onDidChangeMode=$.Jh.map(this.modeToggle.onChange,()=>this.modeToggle.checked?Ie.Filter:Ie.Highlight,this._store),this.findInput=this._register(new B.c(this.elements.findInput,de,!1,{label:(0,lt.kg)("type to search","Type to search"),additionalToggles:[this.modeToggle]})),this.actionbar=this._register(new N.E(this.elements.actionbar)),this.mode=be;const Me=this._register(new k.f(this.findInput.inputBox.inputElement,"keydown")),He=this._register($.Jh.chain(Me.event)).map(It=>new j.Z(It)).event;this._register(He(It=>{switch(It.keyCode){case 18:It.preventDefault(),It.stopPropagation(),this.tree.domFocus();return}}));const $e=this._register(new X.rc("close",(0,lt.kg)("close","Close"),"codicon codicon-close",!0,()=>this.dispose()));this.actionbar.push($e,{icon:!0,label:!1});const gt=this._register(new k.f(this.elements.grab,"mousedown"));this._register(gt.event(It=>{const Pt=new x.Cm,Wt=Pt.add(new k.f(window,"mousemove")),Xt=Pt.add(new k.f(window,"mouseup")),mi=this.right,Ii=It.pageX;this.elements.grab.classList.add("grabbing");const Ji=In=>{const Mi=In.pageX-Ii;this.right=mi-Mi,this.layout()};Pt.add(Wt.event(Ji)),Pt.add(Xt.event(In=>{Ji(In),this.elements.grab.classList.remove("grabbing"),Pt.dispose()}))}));const wt=this._register($.Jh.chain(this._register(new k.f(this.elements.grab,"keydown")).event)).map(It=>new j.Z(It)).event;this._register(wt(It=>{let Pt;It.keyCode===15?Pt=Number.POSITIVE_INFINITY:It.keyCode===17?Pt=0:It.keyCode===10&&(Pt=this.right===0?Number.POSITIVE_INFINITY:0),Pt!==void 0&&(It.preventDefault(),It.stopPropagation(),this.right=Pt,this.layout())})),this.onDidChangeValue=this.findInput.onDidChange,this.style(ye??{})}set mode(p){this.modeToggle.checked=p===Ie.Filter,this.findInput.inputBox.setPlaceHolder(p===Ie.Filter?(0,lt.kg)("type to filter","Type to filter"):(0,lt.kg)("type to search","Type to search"))}style(p){this.findInput.style(p),p.listFilterWidgetBackground&&(this.elements.root.style.backgroundColor=p.listFilterWidgetBackground.toString()),p.listFilterWidgetShadow&&(this.elements.root.style.boxShadow=`0 0 8px 2px ${p.listFilterWidgetShadow}`)}layout(p=this.width){this.width=p,this.right=(0,Ee.qE)(this.right,0,Math.max(0,p-212)),this.elements.root.style.right=`${this.right}px`}showMessage(p){this.findInput.showMessage(p)}clearMessage(){this.findInput.clearMessage()}dispose(){const p=Object.create(null,{dispose:{get:()=>super.dispose}});return We(this,void 0,void 0,function*(){this._onDidDisable.fire(),this.elements.root.classList.add("disabled"),yield(0,pe.wR)(300),p.dispose.call(this)})}}class ft{constructor(p,F,de,be,ye){var Me;this.tree=p,this.view=de,this.filter=be,this.contextViewProvider=ye,this._pattern="",this.width=0,this._onDidChangeMode=new $.vl,this.onDidChangeMode=this._onDidChangeMode.event,this._onDidChangePattern=new $.vl,this._onDidChangeOpenState=new $.vl,this.onDidChangeOpenState=this._onDidChangeOpenState.event,this.enabledDisposables=new x.Cm,this.disposables=new x.Cm,this._mode=(Me=p.options.defaultFindMode)!==null&&Me!==void 0?Me:Ie.Highlight,F.onDidSplice(this.onDidSpliceModel,this,this.disposables)}get pattern(){return this._pattern}get mode(){return this._mode}set mode(p){p!==this._mode&&(this._mode=p,this.widget&&(this.widget.mode=this._mode),this.tree.refilter(),this.render(),this._onDidChangeMode.fire(p))}onDidSpliceModel(){!this.widget||this.pattern.length===0||(this.tree.refilter(),this.render())}render(){var p,F;const de=this.filter.totalCount>0&&this.filter.matchCount===0;this.pattern&&de?(p=this.widget)===null||p===void 0||p.showMessage({type:2,content:(0,lt.kg)("not found","No elements found.")}):(F=this.widget)===null||F===void 0||F.clearMessage()}shouldAllowFocus(p){return!this.widget||!this.pattern||this._mode===Ie.Filter||this.filter.totalCount>0&&this.filter.matchCount<=1?!0:!ve.ne.isDefault(p.filterData)}style(p){var F;this.styles=p,(F=this.widget)===null||F===void 0||F.style(p)}layout(p){var F;this.width=p,(F=this.widget)===null||F===void 0||F.layout(p)}dispose(){this._onDidChangePattern.dispose(),this.enabledDisposables.dispose(),this.disposables.dispose()}}function Bt(q){let p=Y.Unknown;return(0,I.XD)(q.browserEvent.target,"monaco-tl-twistie","monaco-tl-row")?p=Y.Twistie:(0,I.XD)(q.browserEvent.target,"monaco-tl-contents","monaco-tl-row")?p=Y.Element:(0,I.XD)(q.browserEvent.target,"monaco-tree-type-filter","monaco-list")&&(p=Y.Filter),{browserEvent:q.browserEvent,element:q.element?q.element.element:null,target:p}}function jt(q,p){p(q),q.children.forEach(F=>jt(F,p))}class pt{constructor(p,F){this.getFirstViewElementWithTrait=p,this.identityProvider=F,this.nodes=[],this._onDidChange=new $.vl,this.onDidChange=this._onDidChange.event}get nodeSet(){return this._nodeSet||(this._nodeSet=this.createNodeSet()),this._nodeSet}set(p,F){!F?.__forceEvent&&(0,h.aI)(this.nodes,p)||this._set(p,!1,F)}_set(p,F,de){if(this.nodes=[...p],this.elements=void 0,this._nodeSet=void 0,!F){const be=this;this._onDidChange.fire({get elements(){return be.get()},browserEvent:de})}}get(){return this.elements||(this.elements=this.nodes.map(p=>p.element)),[...this.elements]}getNodes(){return this.nodes}has(p){return this.nodeSet.has(p)}onDidModelSplice({insertedNodes:p,deletedNodes:F}){if(!this.identityProvider){const $e=this.createNodeSet(),gt=wt=>$e.delete(wt);F.forEach(wt=>jt(wt,gt)),this.set([...$e.values()]);return}const de=new Set,be=$e=>de.add(this.identityProvider.getId($e.element).toString());F.forEach($e=>jt($e,be));const ye=new Map,Me=$e=>ye.set(this.identityProvider.getId($e.element).toString(),$e);p.forEach($e=>jt($e,Me));const He=[];for(const $e of this.nodes){const gt=this.identityProvider.getId($e.element).toString();if(!de.has(gt))He.push($e);else{const It=ye.get(gt);It&&He.push(It)}}if(this.nodes.length>0&&He.length===0){const $e=this.getFirstViewElementWithTrait();$e&&He.push($e)}this._set(He,!0)}createNodeSet(){const p=new Set;for(const F of this.nodes)p.add(F);return p}}class bt extends Q.MH{constructor(p,F){super(p),this.tree=F}onViewPointer(p){if((0,Q.Bm)(p.browserEvent.target)||(0,Q.B6)(p.browserEvent.target)||(0,Q.bm)(p.browserEvent.target))return;const F=p.element;if(!F)return super.onViewPointer(p);if(this.isSelectionRangeChangeEvent(p)||this.isSelectionSingleChangeEvent(p))return super.onViewPointer(p);const de=p.browserEvent.target,be=de.classList.contains("monaco-tl-twistie")||de.classList.contains("monaco-icon-label")&&de.classList.contains("folder-icon")&&p.browserEvent.offsetX<16;let ye=!1;if(typeof this.tree.expandOnlyOnTwistieClick=="function"?ye=this.tree.expandOnlyOnTwistieClick(F.element):ye=!!this.tree.expandOnlyOnTwistieClick,ye&&!be&&p.browserEvent.detail!==2)return super.onViewPointer(p);if(!this.tree.expandOnDoubleClick&&p.browserEvent.detail===2)return super.onViewPointer(p);if(F.collapsible){const Me=this.tree.model,He=Me.getNodeLocation(F),$e=p.browserEvent.altKey;if(this.tree.setFocus([He]),Me.setCollapsed(He,void 0,$e),ye&&be)return}super.onViewPointer(p)}onDoubleClick(p){p.browserEvent.target.classList.contains("monaco-tl-twistie")||!this.tree.expandOnDoubleClick||super.onDoubleClick(p)}}class zt extends Q.B8{constructor(p,F,de,be,ye,Me,He,$e){super(p,F,de,be,$e),this.focusTrait=ye,this.selectionTrait=Me,this.anchorTrait=He}createMouseController(p){return new bt(this,p.tree)}splice(p,F,de=[]){if(super.splice(p,F,de),de.length===0)return;const be=[],ye=[];let Me;de.forEach((He,$e)=>{this.focusTrait.has(He)&&be.push(p+$e),this.selectionTrait.has(He)&&ye.push(p+$e),this.anchorTrait.has(He)&&(Me=p+$e)}),be.length>0&&super.setFocus((0,h.dM)([...super.getFocus(),...be])),ye.length>0&&super.setSelection((0,h.dM)([...super.getSelection(),...ye])),typeof Me=="number"&&super.setAnchor(Me)}setFocus(p,F,de=!1){super.setFocus(p,F),de||this.focusTrait.set(p.map(be=>this.element(be)),F)}setSelection(p,F,de=!1){super.setSelection(p,F),de||this.selectionTrait.set(p.map(be=>this.element(be)),F)}setAnchor(p,F=!1){super.setAnchor(p),F||(typeof p>"u"?this.anchorTrait.set([]):this.anchorTrait.set([this.element(p)]))}}class ii{constructor(p,F,de,be,ye={}){var Me;this._user=p,this._options=ye,this.eventBufferer=new $.at,this.onDidChangeFindOpenState=$.Jh.None,this.disposables=new x.Cm,this._onWillRefilter=new $.vl,this.onWillRefilter=this._onWillRefilter.event,this._onDidUpdateOptions=new $.vl;const He=new Re(de),$e=new $.Wj,gt=new $.Wj,wt=this.disposables.add(new rt(gt.event));this.renderers=be.map(Wt=>new Lt(Wt,()=>this.model,$e.event,wt,ye));for(const Wt of this.renderers)this.disposables.add(Wt);let It;ye.keyboardNavigationLabelProvider&&(It=new Dt(this,ye.keyboardNavigationLabelProvider,ye.filter),ye=Object.assign(Object.assign({},ye),{filter:It}),this.disposables.add(It)),this.focus=new pt(()=>this.view.getFocusedElements()[0],ye.identityProvider),this.selection=new pt(()=>this.view.getSelectedElements()[0],ye.identityProvider),this.anchor=new pt(()=>this.view.getAnchorElement(),ye.identityProvider),this.view=new zt(p,F,He,this.renderers,this.focus,this.selection,this.anchor,Object.assign(Object.assign({},Ue(()=>this.model,ye)),{tree:this})),this.model=this.createModel(p,this.view,ye),$e.input=this.model.onDidChangeCollapseState;const Pt=$.Jh.forEach(this.model.onDidSplice,Wt=>{this.eventBufferer.bufferEvents(()=>{this.focus.onDidModelSplice(Wt),this.selection.onDidModelSplice(Wt)})},this.disposables);if(Pt(()=>null,null,this.disposables),gt.input=$.Jh.chain($.Jh.any(Pt,this.focus.onDidChange,this.selection.onDidChange)).debounce(()=>null,0).map(()=>{const Wt=new Set;for(const Xt of this.focus.getNodes())Wt.add(Xt);for(const Xt of this.selection.getNodes())Wt.add(Xt);return[...Wt.values()]}).event,ye.keyboardSupport!==!1){const Wt=$.Jh.chain(this.view.onKeyDown).filter(Xt=>!(0,Q.B6)(Xt.target)).map(Xt=>new j.Z(Xt));Wt.filter(Xt=>Xt.keyCode===15).on(this.onLeftArrow,this,this.disposables),Wt.filter(Xt=>Xt.keyCode===17).on(this.onRightArrow,this,this.disposables),Wt.filter(Xt=>Xt.keyCode===10).on(this.onSpace,this,this.disposables)}(!((Me=ye.findWidgetEnabled)!==null&&Me!==void 0)||Me)&&ye.keyboardNavigationLabelProvider&&ye.contextViewProvider?(this.findController=new ft(this,this.model,this.view,It,ye.contextViewProvider),this.focusNavigationFilter=Wt=>this.findController.shouldAllowFocus(Wt),this.onDidChangeFindOpenState=this.findController.onDidChangeOpenState,this.disposables.add(this.findController),this.onDidChangeFindMode=this.findController.onDidChangeMode):this.onDidChangeFindMode=$.Jh.None,this.styleElement=(0,I.li)(this.view.getHTMLElement()),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===et.Always)}get onDidChangeFocus(){return this.eventBufferer.wrapEvent(this.focus.onDidChange)}get onDidChangeSelection(){return this.eventBufferer.wrapEvent(this.selection.onDidChange)}get onMouseDblClick(){return $.Jh.filter($.Jh.map(this.view.onMouseDblClick,Bt),p=>p.target!==Y.Filter)}get onPointer(){return $.Jh.map(this.view.onPointer,Bt)}get onDidFocus(){return this.view.onDidFocus}get onDidChangeModel(){return $.Jh.signal(this.model.onDidSplice)}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get findMode(){var p,F;return(F=(p=this.findController)===null||p===void 0?void 0:p.mode)!==null&&F!==void 0?F:Ie.Highlight}set findMode(p){this.findController&&(this.findController.mode=p)}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}updateOptions(p={}){this._options=Object.assign(Object.assign({},this._options),p);for(const F of this.renderers)F.updateOptions(p);this.view.updateOptions(this._options),this._onDidUpdateOptions.fire(this._options),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===et.Always)}get options(){return this._options}getHTMLElement(){return this.view.getHTMLElement()}get scrollTop(){return this.view.scrollTop}set scrollTop(p){this.view.scrollTop=p}domFocus(){this.view.domFocus()}layout(p,F){var de;this.view.layout(p,F),(0,O.Et)(F)&&((de=this.findController)===null||de===void 0||de.layout(F))}style(p){var F;const de=`.${this.view.domId}`,be=[];p.treeIndentGuidesStroke&&(be.push(`.monaco-list${de}:hover .monaco-tl-indent > .indent-guide, .monaco-list${de}.always .monaco-tl-indent > .indent-guide { border-color: ${p.treeIndentGuidesStroke.transparent(.4)}; }`),be.push(`.monaco-list${de} .monaco-tl-indent > .indent-guide.active { border-color: ${p.treeIndentGuidesStroke}; }`)),this.styleElement.textContent=be.join(` `),(F=this.findController)===null||F===void 0||F.style(p),this.view.style(p)}getParentElement(p){const F=this.model.getParentNodeLocation(p);return this.model.getNode(F).element}getFirstElementChild(p){return this.model.getFirstElementChild(p)}getNode(p){return this.model.getNode(p)}collapse(p,F=!1){return this.model.setCollapsed(p,!0,F)}expand(p,F=!1){return this.model.setCollapsed(p,!1,F)}isCollapsible(p){return this.model.isCollapsible(p)}setCollapsible(p,F){return this.model.setCollapsible(p,F)}isCollapsed(p){return this.model.isCollapsed(p)}refilter(){this._onWillRefilter.fire(void 0),this.model.refilter()}setSelection(p,F){const de=p.map(ye=>this.model.getNode(ye));this.selection.set(de,F);const be=p.map(ye=>this.model.getListIndex(ye)).filter(ye=>ye>-1);this.view.setSelection(be,F,!0)}getSelection(){return this.selection.get()}setFocus(p,F){const de=p.map(ye=>this.model.getNode(ye));this.focus.set(de,F);const be=p.map(ye=>this.model.getListIndex(ye)).filter(ye=>ye>-1);this.view.setFocus(be,F,!0)}getFocus(){return this.focus.get()}reveal(p,F){this.model.expandTo(p);const de=this.model.getListIndex(p);de!==-1&&this.view.reveal(de,F)}onLeftArrow(p){p.preventDefault(),p.stopPropagation();const F=this.view.getFocusedElements();if(F.length===0)return;const de=F[0],be=this.model.getNodeLocation(de);if(!this.model.setCollapsed(be,!0)){const Me=this.model.getParentNodeLocation(be);if(!Me)return;const He=this.model.getListIndex(Me);this.view.reveal(He),this.view.setFocus([He])}}onRightArrow(p){p.preventDefault(),p.stopPropagation();const F=this.view.getFocusedElements();if(F.length===0)return;const de=F[0],be=this.model.getNodeLocation(de);if(!this.model.setCollapsed(be,!1)){if(!de.children.some($e=>$e.visible))return;const[Me]=this.view.getFocus(),He=Me+1;this.view.reveal(He),this.view.setFocus([He])}}onSpace(p){p.preventDefault(),p.stopPropagation();const F=this.view.getFocusedElements();if(F.length===0)return;const de=F[0],be=this.model.getNodeLocation(de),ye=p.browserEvent.altKey;this.model.setCollapsed(be,void 0,ye)}dispose(){(0,x.AS)(this.disposables),this.view.dispose()}}class vi{constructor(p,F,de={}){this.user=p,this.rootRef=null,this.nodes=new Map,this.nodesByIdentity=new Map,this.model=new se(p,F,null,de),this.onDidSplice=this.model.onDidSplice,this.onDidChangeCollapseState=this.model.onDidChangeCollapseState,this.onDidChangeRenderNodeCount=this.model.onDidChangeRenderNodeCount,de.sorter&&(this.sorter={compare(be,ye){return de.sorter.compare(be.element,ye.element)}}),this.identityProvider=de.identityProvider}setChildren(p,F=fe.f.empty(),de={}){const be=this.getElementLocation(p);this._setChildren(be,this.preserveCollapseState(F),de)}_setChildren(p,F=fe.f.empty(),de){const be=new Set,ye=new Set,Me=$e=>{var gt;if($e.element===null)return;const wt=$e;if(be.add(wt.element),this.nodes.set(wt.element,wt),this.identityProvider){const It=this.identityProvider.getId(wt.element).toString();ye.add(It),this.nodesByIdentity.set(It,wt)}(gt=de.onDidCreateNode)===null||gt===void 0||gt.call(de,wt)},He=$e=>{var gt;if($e.element===null)return;const wt=$e;if(be.has(wt.element)||this.nodes.delete(wt.element),this.identityProvider){const It=this.identityProvider.getId(wt.element).toString();ye.has(It)||this.nodesByIdentity.delete(It)}(gt=de.onDidDeleteNode)===null||gt===void 0||gt.call(de,wt)};this.model.splice([...p,0],Number.MAX_VALUE,F,Object.assign(Object.assign({},de),{onDidCreateNode:Me,onDidDeleteNode:He}))}preserveCollapseState(p=fe.f.empty()){return this.sorter&&(p=[...p].sort(this.sorter.compare.bind(this.sorter))),fe.f.map(p,F=>{let de=this.nodes.get(F.element);if(!de&&this.identityProvider){const Me=this.identityProvider.getId(F.element).toString();de=this.nodesByIdentity.get(Me)}if(!de)return Object.assign(Object.assign({},F),{children:this.preserveCollapseState(F.children)});const be=typeof F.collapsible=="boolean"?F.collapsible:de.collapsible,ye=typeof F.collapsed<"u"?F.collapsed:de.collapsed;return Object.assign(Object.assign({},F),{collapsible:be,collapsed:ye,children:this.preserveCollapseState(F.children)})})}rerender(p){const F=this.getElementLocation(p);this.model.rerender(F)}getFirstElementChild(p=null){const F=this.getElementLocation(p);return this.model.getFirstElementChild(F)}has(p){return this.nodes.has(p)}getListIndex(p){const F=this.getElementLocation(p);return this.model.getListIndex(F)}getListRenderCount(p){const F=this.getElementLocation(p);return this.model.getListRenderCount(F)}isCollapsible(p){const F=this.getElementLocation(p);return this.model.isCollapsible(F)}setCollapsible(p,F){const de=this.getElementLocation(p);return this.model.setCollapsible(de,F)}isCollapsed(p){const F=this.getElementLocation(p);return this.model.isCollapsed(F)}setCollapsed(p,F,de){const be=this.getElementLocation(p);return this.model.setCollapsed(be,F,de)}expandTo(p){const F=this.getElementLocation(p);this.model.expandTo(F)}refilter(){this.model.refilter()}getNode(p=null){if(p===null)return this.model.getNode(this.model.rootRef);const F=this.nodes.get(p);if(!F)throw new ee(this.user,`Tree element not found: ${p}`);return F}getNodeLocation(p){return p.element}getParentNodeLocation(p){if(p===null)throw new ee(this.user,"Invalid getParentNodeLocation call");const F=this.nodes.get(p);if(!F)throw new ee(this.user,`Tree element not found: ${p}`);const de=this.model.getNodeLocation(F),be=this.model.getParentNodeLocation(de);return this.model.getNode(be).element}getElementLocation(p){if(p===null)return[];const F=this.nodes.get(p);if(!F)throw new ee(this.user,`Tree element not found: ${p}`);return this.model.getNodeLocation(F)}}function Ze(q){const p=[q.element],F=q.incompressible||!1;return{element:{elements:p,incompressible:F},children:fe.f.map(fe.f.from(q.children),Ze),collapsible:q.collapsible,collapsed:q.collapsed}}function _t(q){const p=[q.element],F=q.incompressible||!1;let de,be;for(;[be,de]=fe.f.consume(fe.f.from(q.children),2),!(be.length!==1||be[0].incompressible);)q=be[0],p.push(q.element);return{element:{elements:p,incompressible:F},children:fe.f.map(fe.f.concat(be,de),_t),collapsible:q.collapsible,collapsed:q.collapsed}}function At(q,p=0){let F;return p<q.element.elements.length-1?F=[At(q,p+1)]:F=fe.f.map(fe.f.from(q.children),de=>At(de,0)),p===0&&q.element.incompressible?{element:q.element.elements[p],children:F,incompressible:!0,collapsible:q.collapsible,collapsed:q.collapsed}:{element:q.element.elements[p],children:F,collapsible:q.collapsible,collapsed:q.collapsed}}function ei(q){return At(q,0)}function oi(q,p,F){return q.element===p?Object.assign(Object.assign({},q),{children:F}):Object.assign(Object.assign({},q),{children:fe.f.map(fe.f.from(q.children),de=>oi(de,p,F))})}const Li=q=>({getId(p){return p.elements.map(F=>q.getId(F).toString()).join("\0")}});class zi{constructor(p,F,de={}){this.user=p,this.rootRef=null,this.nodes=new Map,this.model=new vi(p,F,de),this.enabled=typeof de.compressionEnabled>"u"?!0:de.compressionEnabled,this.identityProvider=de.identityProvider}get onDidSplice(){return this.model.onDidSplice}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get onDidChangeRenderNodeCount(){return this.model.onDidChangeRenderNodeCount}setChildren(p,F=fe.f.empty(),de){const be=de.diffIdentityProvider&&Li(de.diffIdentityProvider);if(p===null){const Wt=fe.f.map(F,this.enabled?_t:Ze);this._setChildren(null,Wt,{diffIdentityProvider:be,diffDepth:1/0});return}const ye=this.nodes.get(p);if(!ye)throw new Error("Unknown compressed tree node");const Me=this.model.getNode(ye),He=this.model.getParentNodeLocation(ye),$e=this.model.getNode(He),gt=ei(Me),wt=oi(gt,p,F),It=(this.enabled?_t:Ze)(wt),Pt=$e.children.map(Wt=>Wt===Me?It:Wt);this._setChildren($e.element,Pt,{diffIdentityProvider:be,diffDepth:Me.depth-$e.depth})}setCompressionEnabled(p){if(p===this.enabled)return;this.enabled=p;const de=this.model.getNode().children,be=fe.f.map(de,ei),ye=fe.f.map(be,p?_t:Ze);this._setChildren(null,ye,{diffIdentityProvider:this.identityProvider,diffDepth:1/0})}_setChildren(p,F,de){const be=new Set,ye=He=>{for(const $e of He.element.elements)be.add($e),this.nodes.set($e,He.element)},Me=He=>{for(const $e of He.element.elements)be.has($e)||this.nodes.delete($e)};this.model.setChildren(p,F,Object.assign(Object.assign({},de),{onDidCreateNode:ye,onDidDeleteNode:Me}))}has(p){return this.nodes.has(p)}getListIndex(p){const F=this.getCompressedNode(p);return this.model.getListIndex(F)}getListRenderCount(p){const F=this.getCompressedNode(p);return this.model.getListRenderCount(F)}getNode(p){if(typeof p>"u")return this.model.getNode();const F=this.getCompressedNode(p);return this.model.getNode(F)}getNodeLocation(p){const F=this.model.getNodeLocation(p);return F===null?null:F.elements[F.elements.length-1]}getParentNodeLocation(p){const F=this.getCompressedNode(p),de=this.model.getParentNodeLocation(F);return de===null?null:de.elements[de.elements.length-1]}getFirstElementChild(p){const F=this.getCompressedNode(p);return this.model.getFirstElementChild(F)}isCollapsible(p){const F=this.getCompressedNode(p);return this.model.isCollapsible(F)}setCollapsible(p,F){const de=this.getCompressedNode(p);return this.model.setCollapsible(de,F)}isCollapsed(p){const F=this.getCompressedNode(p);return this.model.isCollapsed(F)}setCollapsed(p,F,de){const be=this.getCompressedNode(p);return this.model.setCollapsed(be,F,de)}expandTo(p){const F=this.getCompressedNode(p);this.model.expandTo(F)}rerender(p){const F=this.getCompressedNode(p);this.model.rerender(F)}refilter(){this.model.refilter()}getCompressedNode(p){if(p===null)return null;const F=this.nodes.get(p);if(!F)throw new ee(this.user,`Tree element not found: ${p}`);return F}}const Di=q=>q[q.length-1];class Te{constructor(p,F){this.unwrapper=p,this.node=F}get element(){return this.node.element===null?null:this.unwrapper(this.node.element)}get children(){return this.node.children.map(p=>new Te(this.unwrapper,p))}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}}function ki(q,p){return{splice(F,de,be){p.splice(F,de,be.map(ye=>q.map(ye)))},updateElementHeight(F,de){p.updateElementHeight(F,de)}}}function ze(q,p){return Object.assign(Object.assign({},p),{identityProvider:p.identityProvider&&{getId(F){return p.identityProvider.getId(q(F))}},sorter:p.sorter&&{compare(F,de){return p.sorter.compare(F.elements[0],de.elements[0])}},filter:p.filter&&{filter(F,de){return p.filter.filter(q(F),de)}}})}class we{constructor(p,F,de={}){this.rootRef=null,this.elementMapper=de.elementMapper||Di;const be=ye=>this.elementMapper(ye.elements);this.nodeMapper=new ce(ye=>new Te(be,ye)),this.model=new zi(p,ki(this.nodeMapper,F),ze(be,de))}get onDidSplice(){return $.Jh.map(this.model.onDidSplice,({insertedNodes:p,deletedNodes:F})=>({insertedNodes:p.map(de=>this.nodeMapper.map(de)),deletedNodes:F.map(de=>this.nodeMapper.map(de))}))}get onDidChangeCollapseState(){return $.Jh.map(this.model.onDidChangeCollapseState,({node:p,deep:F})=>({node:this.nodeMapper.map(p),deep:F}))}get onDidChangeRenderNodeCount(){return $.Jh.map(this.model.onDidChangeRenderNodeCount,p=>this.nodeMapper.map(p))}setChildren(p,F=fe.f.empty(),de={}){this.model.setChildren(p,F,de)}setCompressionEnabled(p){this.model.setCompressionEnabled(p)}has(p){return this.model.has(p)}getListIndex(p){return this.model.getListIndex(p)}getListRenderCount(p){return this.model.getListRenderCount(p)}getNode(p){return this.nodeMapper.map(this.model.getNode(p))}getNodeLocation(p){return p.element}getParentNodeLocation(p){return this.model.getParentNodeLocation(p)}getFirstElementChild(p){const F=this.model.getFirstElementChild(p);return F===null||typeof F>"u"?F:this.elementMapper(F.elements)}isCollapsible(p){return this.model.isCollapsible(p)}setCollapsible(p,F){return this.model.setCollapsible(p,F)}isCollapsed(p){return this.model.isCollapsed(p)}setCollapsed(p,F,de){return this.model.setCollapsed(p,F,de)}expandTo(p){return this.model.expandTo(p)}rerender(p){return this.model.rerender(p)}refilter(){return this.model.refilter()}getCompressedTreeNode(p=null){return this.model.getNode(p)}}var ct=f(88846),Oe=function(q,p,F,de){var be=arguments.length,ye=be<3?p:de===null?de=Object.getOwnPropertyDescriptor(p,F):de,Me;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ye=Reflect.decorate(q,p,F,de);else for(var He=q.length-1;He>=0;He--)(Me=q[He])&&(ye=(be<3?Me(ye):be>3?Me(p,F,ye):Me(p,F))||ye);return be>3&&ye&&Object.defineProperty(p,F,ye),ye};class ut extends ii{constructor(p,F,de,be,ye={}){super(p,F,de,be,ye),this.user=p}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}setChildren(p,F=fe.f.empty(),de){this.model.setChildren(p,F,de)}rerender(p){if(p===void 0){this.view.rerender();return}this.model.rerender(p)}hasElement(p){return this.model.has(p)}createModel(p,F,de){return new vi(p,F,de)}}class Zt{constructor(p,F){this._compressedTreeNodeProvider=p,this.renderer=F,this.templateId=F.templateId,F.onDidChangeTwistieState&&(this.onDidChangeTwistieState=F.onDidChangeTwistieState)}get compressedTreeNodeProvider(){return this._compressedTreeNodeProvider()}renderTemplate(p){return{compressedTreeNode:void 0,data:this.renderer.renderTemplate(p)}}renderElement(p,F,de,be){const ye=this.compressedTreeNodeProvider.getCompressedTreeNode(p.element);ye.element.elements.length===1?(de.compressedTreeNode=void 0,this.renderer.renderElement(p,F,de.data,be)):(de.compressedTreeNode=ye,this.renderer.renderCompressedElements(ye,F,de.data,be))}disposeElement(p,F,de,be){var ye,Me,He,$e;de.compressedTreeNode?(Me=(ye=this.renderer).disposeCompressedElements)===null||Me===void 0||Me.call(ye,de.compressedTreeNode,F,de.data,be):($e=(He=this.renderer).disposeElement)===null||$e===void 0||$e.call(He,p,F,de.data,be)}disposeTemplate(p){this.renderer.disposeTemplate(p.data)}renderTwistie(p,F){return this.renderer.renderTwistie?this.renderer.renderTwistie(p,F):!1}}Oe([ct.B],Zt.prototype,"compressedTreeNodeProvider",null);function Ci(q,p){return p&&Object.assign(Object.assign({},p),{keyboardNavigationLabelProvider:p.keyboardNavigationLabelProvider&&{getKeyboardNavigationLabel(F){let de;try{de=q().getCompressedTreeNode(F)}catch{return p.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(F)}return de.element.elements.length===1?p.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(F):p.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(de.element.elements)}}})}class Ki extends ut{constructor(p,F,de,be,ye={}){const Me=()=>this,He=be.map($e=>new Zt(Me,$e));super(p,F,de,He,Ci(Me,ye))}setChildren(p,F=fe.f.empty(),de){this.model.setChildren(p,F,de)}createModel(p,F,de){return new we(p,F,de)}updateOptions(p={}){super.updateOptions(p),typeof p.compressionEnabled<"u"&&this.model.setCompressionEnabled(p.compressionEnabled)}getCompressedTreeNode(p=null){return this.model.getCompressedTreeNode(p)}}var Ln=f(94327),nt=function(q,p,F,de){function be(ye){return ye instanceof F?ye:new F(function(Me){Me(ye)})}return new(F||(F=Promise))(function(ye,Me){function He(wt){try{gt(de.next(wt))}catch(It){Me(It)}}function $e(wt){try{gt(de.throw(wt))}catch(It){Me(It)}}function gt(wt){wt.done?ye(wt.value):be(wt.value).then(He,$e)}gt((de=de.apply(q,p||[])).next())})};function Ct(q){return Object.assign(Object.assign({},q),{children:[],refreshPromise:void 0,stale:!0,slow:!1,collapsedByDefault:void 0})}function Qt(q,p){return p.parent?p.parent===q?!0:Qt(q,p.parent):!1}function Ot(q,p){return q===p||Qt(q,p)||Qt(p,q)}class at{constructor(p){this.node=p}get element(){return this.node.element.element}get children(){return this.node.children.map(p=>new at(p))}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}}class Yi{constructor(p,F,de){this.renderer=p,this.nodeMapper=F,this.onDidChangeTwistieState=de,this.renderedNodes=new Map,this.templateId=p.templateId}renderTemplate(p){return{templateData:this.renderer.renderTemplate(p)}}renderElement(p,F,de,be){this.renderer.renderElement(this.nodeMapper.map(p),F,de.templateData,be)}renderTwistie(p,F){return p.slow?(F.classList.add(...K.W6.treeItemLoading.classNamesArray),!0):(F.classList.remove(...K.W6.treeItemLoading.classNamesArray),!1)}disposeElement(p,F,de,be){var ye,Me;(Me=(ye=this.renderer).disposeElement)===null||Me===void 0||Me.call(ye,this.nodeMapper.map(p),F,de.templateData,be)}disposeTemplate(p){this.renderer.disposeTemplate(p.templateData)}dispose(){this.renderedNodes.clear()}}function bi(q){return{browserEvent:q.browserEvent,elements:q.elements.map(p=>p.element)}}function St(q){return{browserEvent:q.browserEvent,element:q.element&&q.element.element,target:q.target}}class bn extends T.ur{constructor(p){super(p.elements.map(F=>F.element)),this.data=p}}function sn(q){return q instanceof T.ur?new bn(q):q}class ni{constructor(p){this.dnd=p}getDragURI(p){return this.dnd.getDragURI(p.element)}getDragLabel(p,F){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(p.map(de=>de.element),F)}onDragStart(p,F){var de,be;(be=(de=this.dnd).onDragStart)===null||be===void 0||be.call(de,sn(p),F)}onDragOver(p,F,de,be,ye=!0){return this.dnd.onDragOver(sn(p),F&&F.element,de,be)}drop(p,F,de,be){this.dnd.drop(sn(p),F&&F.element,de,be)}onDragEnd(p){var F,de;(de=(F=this.dnd).onDragEnd)===null||de===void 0||de.call(F,p)}}function xe(q){return q&&Object.assign(Object.assign({},q),{collapseByDefault:!0,identityProvider:q.identityProvider&&{getId(p){return q.identityProvider.getId(p.element)}},dnd:q.dnd&&new ni(q.dnd),multipleSelectionController:q.multipleSelectionController&&{isSelectionSingleChangeEvent(p){return q.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},p),{element:p.element}))},isSelectionRangeChangeEvent(p){return q.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},p),{element:p.element}))}},accessibilityProvider:q.accessibilityProvider&&Object.assign(Object.assign({},q.accessibilityProvider),{getPosInSet:void 0,getSetSize:void 0,getRole:q.accessibilityProvider.getRole?p=>q.accessibilityProvider.getRole(p.element):()=>"treeitem",isChecked:q.accessibilityProvider.isChecked?p=>{var F;return!!(!((F=q.accessibilityProvider)===null||F===void 0)&&F.isChecked(p.element))}:void 0,getAriaLabel(p){return q.accessibilityProvider.getAriaLabel(p.element)},getWidgetAriaLabel(){return q.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:q.accessibilityProvider.getWidgetRole?()=>q.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:q.accessibilityProvider.getAriaLevel&&(p=>q.accessibilityProvider.getAriaLevel(p.element)),getActiveDescendantId:q.accessibilityProvider.getActiveDescendantId&&(p=>q.accessibilityProvider.getActiveDescendantId(p.element))}),filter:q.filter&&{filter(p,F){return q.filter.filter(p.element,F)}},keyboardNavigationLabelProvider:q.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},q.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel(p){return q.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(p.element)}}),sorter:void 0,expandOnlyOnTwistieClick:typeof q.expandOnlyOnTwistieClick>"u"?void 0:typeof q.expandOnlyOnTwistieClick!="function"?q.expandOnlyOnTwistieClick:p=>q.expandOnlyOnTwistieClick(p.element),additionalScrollHeight:q.additionalScrollHeight})}function Ce(q,p){p(q),q.children.forEach(F=>Ce(F,p))}class Ye{constructor(p,F,de,be,ye,Me={}){this.user=p,this.dataSource=ye,this.nodes=new Map,this.subTreeRefreshPromises=new Map,this.refreshPromises=new Map,this._onDidRender=new $.vl,this._onDidChangeNodeSlowState=new $.vl,this.nodeMapper=new ce(He=>new at(He)),this.disposables=new x.Cm,this.identityProvider=Me.identityProvider,this.autoExpandSingleChildren=typeof Me.autoExpandSingleChildren>"u"?!1:Me.autoExpandSingleChildren,this.sorter=Me.sorter,this.collapseByDefault=Me.collapseByDefault,this.tree=this.createTree(p,F,de,be,Me),this.onDidChangeFindMode=this.tree.onDidChangeFindMode,this.root=Ct({element:void 0,parent:null,hasChildren:!0}),this.identityProvider&&(this.root=Object.assign(Object.assign({},this.root),{id:null})),this.nodes.set(null,this.root),this.tree.onDidChangeCollapseState(this._onDidChangeCollapseState,this,this.disposables)}get onDidChangeFocus(){return $.Jh.map(this.tree.onDidChangeFocus,bi)}get onDidChangeSelection(){return $.Jh.map(this.tree.onDidChangeSelection,bi)}get onMouseDblClick(){return $.Jh.map(this.tree.onMouseDblClick,St)}get onPointer(){return $.Jh.map(this.tree.onPointer,St)}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 onDidDispose(){return this.tree.onDidDispose}createTree(p,F,de,be,ye){const Me=new Re(de),He=be.map(gt=>new Yi(gt,this.nodeMapper,this._onDidChangeNodeSlowState.event)),$e=xe(ye)||{};return new ut(p,F,Me,He,$e)}updateOptions(p={}){this.tree.updateOptions(p)}getHTMLElement(){return this.tree.getHTMLElement()}get scrollTop(){return this.tree.scrollTop}set scrollTop(p){this.tree.scrollTop=p}domFocus(){this.tree.domFocus()}layout(p,F){this.tree.layout(p,F)}style(p){this.tree.style(p)}getInput(){return this.root.element}setInput(p,F){return nt(this,void 0,void 0,function*(){this.refreshPromises.forEach(be=>be.cancel()),this.refreshPromises.clear(),this.root.element=p;const de=F&&{viewState:F,focus:[],selection:[]};yield this._updateChildren(p,!0,!1,de),de&&(this.tree.setFocus(de.focus),this.tree.setSelection(de.selection)),F&&typeof F.scrollTop=="number"&&(this.scrollTop=F.scrollTop)})}_updateChildren(p=this.root.element,F=!0,de=!1,be,ye){return nt(this,void 0,void 0,function*(){if(typeof this.root.element>"u")throw new ee(this.user,"Tree input not set");this.root.refreshPromise&&(yield this.root.refreshPromise,yield $.Jh.toPromise(this._onDidRender.event));const Me=this.getDataNode(p);if(yield this.refreshAndRenderNode(Me,F,be,ye),de)try{this.tree.rerender(Me)}catch{}})}rerender(p){if(p===void 0||p===this.root.element){this.tree.rerender();return}const F=this.getDataNode(p);this.tree.rerender(F)}getNode(p=this.root.element){const F=this.getDataNode(p),de=this.tree.getNode(F===this.root?null:F);return this.nodeMapper.map(de)}collapse(p,F=!1){const de=this.getDataNode(p);return this.tree.collapse(de===this.root?null:de,F)}expand(p,F=!1){return nt(this,void 0,void 0,function*(){if(typeof this.root.element>"u")throw new ee(this.user,"Tree input not set");this.root.refreshPromise&&(yield this.root.refreshPromise,yield $.Jh.toPromise(this._onDidRender.event));const de=this.getDataNode(p);if(this.tree.hasElement(de)&&!this.tree.isCollapsible(de)||(de.refreshPromise&&(yield this.root.refreshPromise,yield $.Jh.toPromise(this._onDidRender.event)),de!==this.root&&!de.refreshPromise&&!this.tree.isCollapsed(de)))return!1;const be=this.tree.expand(de===this.root?null:de,F);return de.refreshPromise&&(yield this.root.refreshPromise,yield $.Jh.toPromise(this._onDidRender.event)),be})}setSelection(p,F){const de=p.map(be=>this.getDataNode(be));this.tree.setSelection(de,F)}getSelection(){return this.tree.getSelection().map(F=>F.element)}setFocus(p,F){const de=p.map(be=>this.getDataNode(be));this.tree.setFocus(de,F)}getFocus(){return this.tree.getFocus().map(F=>F.element)}reveal(p,F){this.tree.reveal(this.getDataNode(p),F)}getParentElement(p){const F=this.tree.getParentElement(this.getDataNode(p));return F&&F.element}getFirstElementChild(p=this.root.element){const F=this.getDataNode(p),de=this.tree.getFirstElementChild(F===this.root?null:F);return de&&de.element}getDataNode(p){const F=this.nodes.get(p===this.root.element?null:p);if(!F)throw new ee(this.user,`Data tree node not found: ${p}`);return F}refreshAndRenderNode(p,F,de,be){return nt(this,void 0,void 0,function*(){yield this.refreshNode(p,F,de),this.render(p,de,be)})}refreshNode(p,F,de){return nt(this,void 0,void 0,function*(){let be;if(this.subTreeRefreshPromises.forEach((ye,Me)=>{!be&&Ot(Me,p)&&(be=ye.then(()=>this.refreshNode(p,F,de)))}),be)return be;if(p!==this.root&&this.tree.getNode(p).collapsed){p.hasChildren=!!this.dataSource.hasChildren(p.element),p.stale=!0;return}return this.doRefreshSubTree(p,F,de)})}doRefreshSubTree(p,F,de){return nt(this,void 0,void 0,function*(){let be;p.refreshPromise=new Promise(ye=>be=ye),this.subTreeRefreshPromises.set(p,p.refreshPromise),p.refreshPromise.finally(()=>{p.refreshPromise=void 0,this.subTreeRefreshPromises.delete(p)});try{const ye=yield this.doRefreshNode(p,F,de);p.stale=!1,yield pe.HC.settled(ye.map(Me=>this.doRefreshSubTree(Me,F,de)))}finally{be()}})}doRefreshNode(p,F,de){return nt(this,void 0,void 0,function*(){p.hasChildren=!!this.dataSource.hasChildren(p.element);let be;if(!p.hasChildren)be=Promise.resolve(fe.f.empty());else{const ye=this.doGetChildren(p);if((0,O.xZ)(ye))be=Promise.resolve(ye);else{const Me=(0,pe.wR)(800);Me.then(()=>{p.slow=!0,this._onDidChangeNodeSlowState.fire(p)},He=>null),be=ye.finally(()=>Me.cancel())}}try{const ye=yield be;return this.setChildren(p,ye,F,de)}catch(ye){if(p!==this.root&&this.tree.hasElement(p)&&this.tree.collapse(p),(0,Ln.MB)(ye))return[];throw ye}finally{p.slow&&(p.slow=!1,this._onDidChangeNodeSlowState.fire(p))}})}doGetChildren(p){let F=this.refreshPromises.get(p);if(F)return F;const de=this.dataSource.getChildren(p.element);return(0,O.xZ)(de)?this.processChildren(de):(F=(0,pe.SS)(()=>nt(this,void 0,void 0,function*(){return this.processChildren(yield de)})),this.refreshPromises.set(p,F),F.finally(()=>{this.refreshPromises.delete(p)}))}_onDidChangeCollapseState({node:p,deep:F}){p.element!==null&&!p.collapsed&&p.element.stale&&(F?this.collapse(p.element.element):this.refreshAndRenderNode(p.element,!1).catch(Ln.dz))}setChildren(p,F,de,be){const ye=[...F];if(p.children.length===0&&ye.length===0)return[];const Me=new Map,He=new Map;for(const wt of p.children)if(Me.set(wt.element,wt),this.identityProvider){const It=this.tree.isCollapsed(wt);He.set(wt.id,{node:wt,collapsed:It})}const $e=[],gt=ye.map(wt=>{const It=!!this.dataSource.hasChildren(wt);if(!this.identityProvider){const mi=Ct({element:wt,parent:p,hasChildren:It});return It&&this.collapseByDefault&&!this.collapseByDefault(wt)&&(mi.collapsedByDefault=!1,$e.push(mi)),mi}const Pt=this.identityProvider.getId(wt).toString(),Wt=He.get(Pt);if(Wt){const mi=Wt.node;return Me.delete(mi.element),this.nodes.delete(mi.element),this.nodes.set(wt,mi),mi.element=wt,mi.hasChildren=It,de?Wt.collapsed?(mi.children.forEach(Ii=>Ce(Ii,Ji=>this.nodes.delete(Ji.element))),mi.children.splice(0,mi.children.length),mi.stale=!0):$e.push(mi):It&&this.collapseByDefault&&!this.collapseByDefault(wt)&&(mi.collapsedByDefault=!1,$e.push(mi)),mi}const Xt=Ct({element:wt,parent:p,id:Pt,hasChildren:It});return be&&be.viewState.focus&&be.viewState.focus.indexOf(Pt)>-1&&be.focus.push(Xt),be&&be.viewState.selection&&be.viewState.selection.indexOf(Pt)>-1&&be.selection.push(Xt),be&&be.viewState.expanded&&be.viewState.expanded.indexOf(Pt)>-1?$e.push(Xt):It&&this.collapseByDefault&&!this.collapseByDefault(wt)&&(Xt.collapsedByDefault=!1,$e.push(Xt)),Xt});for(const wt of Me.values())Ce(wt,It=>this.nodes.delete(It.element));for(const wt of gt)this.nodes.set(wt.element,wt);return p.children.splice(0,p.children.length,...gt),p!==this.root&&this.autoExpandSingleChildren&>.length===1&&$e.length===0&&(gt[0].collapsedByDefault=!1,$e.push(gt[0])),$e}render(p,F,de){const be=p.children.map(Me=>this.asTreeElement(Me,F)),ye=de&&Object.assign(Object.assign({},de),{diffIdentityProvider:de.diffIdentityProvider&&{getId(Me){return de.diffIdentityProvider.getId(Me.element)}}});this.tree.setChildren(p===this.root?null:p,be,ye),p!==this.root&&this.tree.setCollapsible(p,p.hasChildren),this._onDidRender.fire()}asTreeElement(p,F){if(p.stale)return{element:p,collapsible:p.hasChildren,collapsed:!0};let de;return F&&F.viewState.expanded&&p.id&&F.viewState.expanded.indexOf(p.id)>-1?de=!1:de=p.collapsedByDefault,p.collapsedByDefault=void 0,{element:p,children:p.hasChildren?fe.f.map(p.children,be=>this.asTreeElement(be,F)):[],collapsible:p.hasChildren,collapsed:de}}processChildren(p){return this.sorter&&(p=[...p].sort(this.sorter.compare.bind(this.sorter))),p}dispose(){this.disposables.dispose()}}class Rt{constructor(p){this.node=p}get element(){return{elements:this.node.element.elements.map(p=>p.element),incompressible:this.node.element.incompressible}}get children(){return this.node.children.map(p=>new Rt(p))}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}}class Vt{constructor(p,F,de,be){this.renderer=p,this.nodeMapper=F,this.compressibleNodeMapperProvider=de,this.onDidChangeTwistieState=be,this.renderedNodes=new Map,this.disposables=[],this.templateId=p.templateId}renderTemplate(p){return{templateData:this.renderer.renderTemplate(p)}}renderElement(p,F,de,be){this.renderer.renderElement(this.nodeMapper.map(p),F,de.templateData,be)}renderCompressedElements(p,F,de,be){this.renderer.renderCompressedElements(this.compressibleNodeMapperProvider().map(p),F,de.templateData,be)}renderTwistie(p,F){return p.slow?(F.classList.add(...K.W6.treeItemLoading.classNamesArray),!0):(F.classList.remove(...K.W6.treeItemLoading.classNamesArray),!1)}disposeElement(p,F,de,be){var ye,Me;(Me=(ye=this.renderer).disposeElement)===null||Me===void 0||Me.call(ye,this.nodeMapper.map(p),F,de.templateData,be)}disposeCompressedElements(p,F,de,be){var ye,Me;(Me=(ye=this.renderer).disposeCompressedElements)===null||Me===void 0||Me.call(ye,this.compressibleNodeMapperProvider().map(p),F,de.templateData,be)}disposeTemplate(p){this.renderer.disposeTemplate(p.templateData)}dispose(){this.renderedNodes.clear(),this.disposables=(0,x.AS)(this.disposables)}}function Gt(q){const p=q&&xe(q);return p&&Object.assign(Object.assign({},p),{keyboardNavigationLabelProvider:p.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},p.keyboardNavigationLabelProvider),{getCompressedNodeKeyboardNavigationLabel(F){return q.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(F.map(de=>de.element))}})})}class ri extends Ye{constructor(p,F,de,be,ye,Me,He={}){super(p,F,de,ye,Me,He),this.compressionDelegate=be,this.compressibleNodeMapper=new ce($e=>new Rt($e)),this.filter=He.filter}createTree(p,F,de,be,ye){const Me=new Re(de),He=be.map(gt=>new Vt(gt,this.nodeMapper,()=>this.compressibleNodeMapper,this._onDidChangeNodeSlowState.event)),$e=Gt(ye)||{};return new Ki(p,F,Me,He,$e)}asTreeElement(p,F){return Object.assign({incompressible:this.compressionDelegate.isIncompressible(p.element)},super.asTreeElement(p,F))}updateOptions(p={}){this.tree.updateOptions(p)}render(p,F){if(!this.identityProvider)return super.render(p,F);const de=Pt=>this.identityProvider.getId(Pt).toString(),be=Pt=>{const Wt=new Set;for(const Xt of Pt){const mi=this.tree.getCompressedTreeNode(Xt===this.root?null:Xt);if(mi.element)for(const Ii of mi.element.elements)Wt.add(de(Ii.element))}return Wt},ye=be(this.tree.getSelection()),Me=be(this.tree.getFocus());super.render(p,F);const He=this.getSelection();let $e=!1;const gt=this.getFocus();let wt=!1;const It=Pt=>{const Wt=Pt.element;if(Wt)for(let Xt=0;Xt<Wt.elements.length;Xt++){const mi=de(Wt.elements[Xt].element),Ii=Wt.elements[Wt.elements.length-1].element;ye.has(mi)&&He.indexOf(Ii)===-1&&(He.push(Ii),$e=!0),Me.has(mi)&>.indexOf(Ii)===-1&&(gt.push(Ii),wt=!0)}Pt.children.forEach(It)};It(this.tree.getCompressedTreeNode(p===this.root?null:p)),$e&&this.setSelection(He),wt&&this.setFocus(gt)}processChildren(p){return this.filter&&(p=fe.f.filter(p,F=>{const de=this.filter.filter(F,1),be=fi(de);if(be===2)throw new Error("Recursive tree visibility not supported in async data compressed trees");return be===1})),super.processChildren(p)}}function fi(q){return typeof q=="boolean"?q?1:0:oe(q)?Z(q.visibility):Z(q)}class di extends ii{constructor(p,F,de,be,ye,Me={}){super(p,F,de,be,Me),this.user=p,this.dataSource=ye,this.identityProvider=Me.identityProvider}createModel(p,F,de){return new vi(p,F,de)}}var Jt=f(85753),ai=f(27142),Ei=f(96655),wi=f(13034),Ai=f(52348),Ni=f(82399),qi=f(56071),Pi=f(67167),gn=f(1597),Gi=f(89044),Oi=function(q,p,F,de){var be=arguments.length,ye=be<3?p:de===null?de=Object.getOwnPropertyDescriptor(p,F):de,Me;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ye=Reflect.decorate(q,p,F,de);else for(var He=q.length-1;He>=0;He--)(Me=q[He])&&(ye=(be<3?Me(ye):be>3?Me(p,F,ye):Me(p,F))||ye);return be>3&&ye&&Object.defineProperty(p,F,ye),ye},Fi=function(q,p){return function(F,de){p(F,de,q)}};const Bi=(0,Ni.u1)("listService");let rn=class{constructor(p){this._themeService=p,this.disposables=new x.Cm,this.lists=[],this._lastFocusedWidget=void 0,this._hasCreatedStyleController=!1}get lastFocusedList(){return this._lastFocusedWidget}setLastFocusedList(p){var F,de;p!==this._lastFocusedWidget&&((F=this._lastFocusedWidget)===null||F===void 0||F.getHTMLElement().classList.remove("last-focused"),this._lastFocusedWidget=p,(de=this._lastFocusedWidget)===null||de===void 0||de.getHTMLElement().classList.add("last-focused"))}register(p,F){if(!this._hasCreatedStyleController){this._hasCreatedStyleController=!0;const be=new Q.hb((0,I.li)(),"");this.disposables.add((0,gn.DD)(be,this._themeService))}if(this.lists.some(be=>be.widget===p))throw new Error("Cannot register the same widget multiple times");const de={widget:p,extraContextKeys:F};return this.lists.push(de),p.getHTMLElement()===document.activeElement&&this.setLastFocusedList(p),(0,x.qE)(p.onDidFocus(()=>this.setLastFocusedList(p)),(0,x.s)(()=>this.lists.splice(this.lists.indexOf(de),1)),p.onDidDispose(()=>{this.lists=this.lists.filter(be=>be!==de),this._lastFocusedWidget===p&&this.setLastFocusedList(void 0)}))}dispose(){this.disposables.dispose()}};rn=Oi([Fi(0,Gi.Gy)],rn);const _i=new Ei.N1("listFocus",!0),jn=new Ei.N1("listSupportsMultiselect",!0),Wn=Ei.M$.and(_i,Ei.M$.not(wi.aV)),xn=new Ei.N1("listHasSelectionOrFocus",!1),Rn=new Ei.N1("listDoubleSelection",!1),$i=new Ei.N1("listMultiSelection",!1),Nn=new Ei.N1("listSelectionNavigation",!1),Jn=new Ei.N1("listSupportsFind",!0),Ti=new Ei.N1("treeElementCanCollapse",!1),es=new Ei.N1("treeElementHasParent",!1),xi=new Ei.N1("treeElementCanExpand",!1),os=new Ei.N1("treeElementHasChild",!1),Zi=new Ei.N1("treeFindOpen",!1),cn="listTypeNavigationMode",Wi="listAutomaticKeyboardNavigation";function vn(q,p){const F=q.createScoped(p.getHTMLElement());return _i.bindTo(F),F}const Gn="workbench.list.multiSelectModifier",ws="workbench.list.openMode",fn="workbench.list.horizontalScrolling",ks="workbench.list.defaultFindMode",wn="workbench.list.keyboardNavigation",yn="workbench.tree.indent",uo="workbench.tree.renderIndentGuides",Ms="workbench.list.smoothScrolling",Ts="workbench.list.mouseWheelScrollSensitivity",Et="workbench.list.fastScrollSensitivity",ls="workbench.tree.expandMode";function Ss(q){return q.getValue(Gn)==="alt"}class ts extends x.jG{constructor(p){super(),this.configurationService=p,this.useAltAsMultipleSelectionModifier=Ss(p),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(p=>{p.affectsConfiguration(Gn)&&(this.useAltAsMultipleSelectionModifier=Ss(this.configurationService))}))}isSelectionSingleChangeEvent(p){return this.useAltAsMultipleSelectionModifier?p.browserEvent.altKey:(0,Q.tX)(p)}isSelectionRangeChangeEvent(p){return(0,Q.mh)(p)}}function zs(q,p){var F;const de=q.get(Jt.pG),be=q.get(qi.b),ye=new x.Cm;return[Object.assign(Object.assign({},p),{keyboardNavigationDelegate:{mightProducePrintableCharacter(He){return be.mightProducePrintableCharacter(He)}},smoothScrolling:!!de.getValue(Ms),mouseWheelScrollSensitivity:de.getValue(Ts),fastScrollSensitivity:de.getValue(Et),multipleSelectionController:(F=p.multipleSelectionController)!==null&&F!==void 0?F:ye.add(new ts(de)),keyboardNavigationEventFilter:Kt(be)}),ye]}let vs=class extends Q.B8{constructor(p,F,de,be,ye,Me,He,$e,gt,wt){const It=typeof ye.horizontalScrolling<"u"?ye.horizontalScrolling:!!gt.getValue(fn),[Pt,Wt]=wt.invokeFunction(zs,ye);super(p,F,de,be,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},(0,gn.KC)($e.getColorTheme(),gn.IN)),Pt),{horizontalScrolling:It})),this.disposables.add(Wt),this.contextKeyService=vn(Me,this),this.themeService=$e,this.listSupportsMultiSelect=jn.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(ye.multipleSelectionSupport!==!1),Nn.bindTo(this.contextKeyService).set(!!ye.selectionNavigation),this.listHasSelectionOrFocus=xn.bindTo(this.contextKeyService),this.listDoubleSelection=Rn.bindTo(this.contextKeyService),this.listMultiSelection=$i.bindTo(this.contextKeyService),this.horizontalScrolling=ye.horizontalScrolling,this._useAltAsMultipleSelectionModifier=Ss(gt),this.disposables.add(this.contextKeyService),this.disposables.add(He.register(this)),ye.overrideStyles&&this.updateStyles(ye.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{const mi=this.getSelection(),Ii=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(mi.length>0||Ii.length>0),this.listMultiSelection.set(mi.length>1),this.listDoubleSelection.set(mi.length===2)})})),this.disposables.add(this.onDidChangeFocus(()=>{const mi=this.getSelection(),Ii=this.getFocus();this.listHasSelectionOrFocus.set(mi.length>0||Ii.length>0)})),this.disposables.add(gt.onDidChangeConfiguration(mi=>{mi.affectsConfiguration(Gn)&&(this._useAltAsMultipleSelectionModifier=Ss(gt));let Ii={};if(mi.affectsConfiguration(fn)&&this.horizontalScrolling===void 0){const Ji=!!gt.getValue(fn);Ii=Object.assign(Object.assign({},Ii),{horizontalScrolling:Ji})}if(mi.affectsConfiguration(Ms)){const Ji=!!gt.getValue(Ms);Ii=Object.assign(Object.assign({},Ii),{smoothScrolling:Ji})}if(mi.affectsConfiguration(Ts)){const Ji=gt.getValue(Ts);Ii=Object.assign(Object.assign({},Ii),{mouseWheelScrollSensitivity:Ji})}if(mi.affectsConfiguration(Et)){const Ji=gt.getValue(Et);Ii=Object.assign(Object.assign({},Ii),{fastScrollSensitivity:Ji})}Object.keys(Ii).length>0&&this.updateOptions(Ii)})),this.navigator=new rs(this,Object.assign({configurationService:gt},ye)),this.disposables.add(this.navigator)}updateOptions(p){super.updateOptions(p),p.overrideStyles&&this.updateStyles(p.overrideStyles),p.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!p.multipleSelectionSupport)}updateStyles(p){var F;(F=this._styler)===null||F===void 0||F.dispose(),this._styler=(0,gn.DD)(this,this.themeService,p)}dispose(){var p;(p=this._styler)===null||p===void 0||p.dispose(),super.dispose()}};vs=Oi([Fi(5,Ei.fN),Fi(6,Bi),Fi(7,Gi.Gy),Fi(8,Jt.pG),Fi(9,Ni._Y)],vs);let As=class extends _{constructor(p,F,de,be,ye,Me,He,$e,gt,wt){const It=typeof ye.horizontalScrolling<"u"?ye.horizontalScrolling:!!gt.getValue(fn),[Pt,Wt]=wt.invokeFunction(zs,ye);super(p,F,de,be,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},(0,gn.KC)($e.getColorTheme(),gn.IN)),Pt),{horizontalScrolling:It})),this.disposables=new x.Cm,this.disposables.add(Wt),this.contextKeyService=vn(Me,this),this.themeService=$e,this.horizontalScrolling=ye.horizontalScrolling,this.listSupportsMultiSelect=jn.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(ye.multipleSelectionSupport!==!1),Nn.bindTo(this.contextKeyService).set(!!ye.selectionNavigation),this._useAltAsMultipleSelectionModifier=Ss(gt),this.disposables.add(this.contextKeyService),this.disposables.add(He.register(this)),ye.overrideStyles&&this.updateStyles(ye.overrideStyles),ye.overrideStyles&&this.disposables.add((0,gn.DD)(this,$e,ye.overrideStyles)),this.disposables.add(gt.onDidChangeConfiguration(mi=>{mi.affectsConfiguration(Gn)&&(this._useAltAsMultipleSelectionModifier=Ss(gt));let Ii={};if(mi.affectsConfiguration(fn)&&this.horizontalScrolling===void 0){const Ji=!!gt.getValue(fn);Ii=Object.assign(Object.assign({},Ii),{horizontalScrolling:Ji})}if(mi.affectsConfiguration(Ms)){const Ji=!!gt.getValue(Ms);Ii=Object.assign(Object.assign({},Ii),{smoothScrolling:Ji})}if(mi.affectsConfiguration(Ts)){const Ji=gt.getValue(Ts);Ii=Object.assign(Object.assign({},Ii),{mouseWheelScrollSensitivity:Ji})}if(mi.affectsConfiguration(Et)){const Ji=gt.getValue(Et);Ii=Object.assign(Object.assign({},Ii),{fastScrollSensitivity:Ji})}Object.keys(Ii).length>0&&this.updateOptions(Ii)})),this.navigator=new rs(this,Object.assign({configurationService:gt},ye)),this.disposables.add(this.navigator)}updateOptions(p){super.updateOptions(p),p.overrideStyles&&this.updateStyles(p.overrideStyles),p.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!p.multipleSelectionSupport)}updateStyles(p){var F;(F=this._styler)===null||F===void 0||F.dispose(),this._styler=(0,gn.DD)(this,this.themeService,p)}dispose(){var p;(p=this._styler)===null||p===void 0||p.dispose(),this.disposables.dispose(),super.dispose()}};As=Oi([Fi(5,Ei.fN),Fi(6,Bi),Fi(7,Gi.Gy),Fi(8,Jt.pG),Fi(9,Ni._Y)],As);let $s=class extends L{constructor(p,F,de,be,ye,Me,He,$e,gt,wt,It){const Pt=typeof Me.horizontalScrolling<"u"?Me.horizontalScrolling:!!wt.getValue(fn),[Wt,Xt]=It.invokeFunction(zs,Me);super(p,F,de,be,ye,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},(0,gn.KC)(gt.getColorTheme(),gn.IN)),Wt),{horizontalScrolling:Pt})),this.disposables.add(Xt),this.contextKeyService=vn(He,this),this.themeService=gt,this.listSupportsMultiSelect=jn.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(Me.multipleSelectionSupport!==!1),Nn.bindTo(this.contextKeyService).set(!!Me.selectionNavigation),this.listHasSelectionOrFocus=xn.bindTo(this.contextKeyService),this.listDoubleSelection=Rn.bindTo(this.contextKeyService),this.listMultiSelection=$i.bindTo(this.contextKeyService),this.horizontalScrolling=Me.horizontalScrolling,this._useAltAsMultipleSelectionModifier=Ss(wt),this.disposables.add(this.contextKeyService),this.disposables.add($e.register(this)),Me.overrideStyles&&this.updateStyles(Me.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{const Ii=this.getSelection(),Ji=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(Ii.length>0||Ji.length>0),this.listMultiSelection.set(Ii.length>1),this.listDoubleSelection.set(Ii.length===2)})})),this.disposables.add(this.onDidChangeFocus(()=>{const Ii=this.getSelection(),Ji=this.getFocus();this.listHasSelectionOrFocus.set(Ii.length>0||Ji.length>0)})),this.disposables.add(wt.onDidChangeConfiguration(Ii=>{Ii.affectsConfiguration(Gn)&&(this._useAltAsMultipleSelectionModifier=Ss(wt));let Ji={};if(Ii.affectsConfiguration(fn)&&this.horizontalScrolling===void 0){const In=!!wt.getValue(fn);Ji=Object.assign(Object.assign({},Ji),{horizontalScrolling:In})}if(Ii.affectsConfiguration(Ms)){const In=!!wt.getValue(Ms);Ji=Object.assign(Object.assign({},Ji),{smoothScrolling:In})}if(Ii.affectsConfiguration(Ts)){const In=wt.getValue(Ts);Ji=Object.assign(Object.assign({},Ji),{mouseWheelScrollSensitivity:In})}if(Ii.affectsConfiguration(Et)){const In=wt.getValue(Et);Ji=Object.assign(Object.assign({},Ji),{fastScrollSensitivity:In})}Object.keys(Ji).length>0&&this.updateOptions(Ji)})),this.navigator=new Bn(this,Object.assign({configurationService:wt},Me)),this.disposables.add(this.navigator)}updateOptions(p){super.updateOptions(p),p.overrideStyles&&this.updateStyles(p.overrideStyles),p.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!p.multipleSelectionSupport)}updateStyles(p){var F;(F=this._styler)===null||F===void 0||F.dispose(),this._styler=(0,gn.DD)(this,this.themeService,p)}dispose(){var p;(p=this._styler)===null||p===void 0||p.dispose(),this.disposables.dispose(),super.dispose()}};$s=Oi([Fi(6,Ei.fN),Fi(7,Bi),Fi(8,Gi.Gy),Fi(9,Jt.pG),Fi(10,Ni._Y)],$s);class Gs extends x.jG{constructor(p,F){var de;super(),this.widget=p,this._onDidOpen=this._register(new $.vl),this.onDidOpen=this._onDidOpen.event,this._register($.Jh.filter(this.widget.onDidChangeSelection,be=>be.browserEvent instanceof KeyboardEvent)(be=>this.onSelectionFromKeyboard(be))),this._register(this.widget.onPointer(be=>this.onPointer(be.element,be.browserEvent))),this._register(this.widget.onMouseDblClick(be=>this.onMouseDblClick(be.element,be.browserEvent))),typeof F?.openOnSingleClick!="boolean"&&F?.configurationService?(this.openOnSingleClick=F?.configurationService.getValue(ws)!=="doubleClick",this._register(F?.configurationService.onDidChangeConfiguration(()=>{this.openOnSingleClick=F?.configurationService.getValue(ws)!=="doubleClick"}))):this.openOnSingleClick=(de=F?.openOnSingleClick)!==null&&de!==void 0?de:!0}onSelectionFromKeyboard(p){if(p.elements.length!==1)return;const F=p.browserEvent,de=typeof F.preserveFocus=="boolean"?F.preserveFocus:!0,be=typeof F.pinned=="boolean"?F.pinned:!de,ye=!1;this._open(this.getSelectedElement(),de,be,ye,p.browserEvent)}onPointer(p,F){if(!this.openOnSingleClick||F.detail===2)return;const be=F.button===1,ye=!0,Me=be,He=F.ctrlKey||F.metaKey||F.altKey;this._open(p,ye,Me,He,F)}onMouseDblClick(p,F){if(!F)return;const de=F.target;if(de.classList.contains("monaco-tl-twistie")||de.classList.contains("monaco-icon-label")&&de.classList.contains("folder-icon")&&F.offsetX<16)return;const ye=!1,Me=!0,He=F.ctrlKey||F.metaKey||F.altKey;this._open(p,ye,Me,He,F)}_open(p,F,de,be,ye){p&&this._onDidOpen.fire({editorOptions:{preserveFocus:F,pinned:de,revealIfVisible:!0},sideBySide:be,element:p,browserEvent:ye})}}class rs extends Gs{constructor(p,F){super(p,F),this.widget=p}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class Bn extends Gs{constructor(p,F){super(p,F)}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class mn extends Gs{constructor(p,F){super(p,F)}getSelectedElement(){var p;return(p=this.widget.getSelection()[0])!==null&&p!==void 0?p:void 0}}function Kt(q){let p=!1;return F=>{if(F.toKeybinding().isModifierKey())return!1;if(p)return p=!1,!1;const de=q.softDispatch(F,F.target);return de?.enterChord?(p=!0,!1):(p=!1,!de)}}let Ri=class extends ut{constructor(p,F,de,be,ye,Me,He,$e,gt,wt){const{options:It,getTypeNavigationMode:Pt,disposable:Wt}=Me.invokeFunction(b,ye);super(p,F,de,be,It),this.disposables.add(Wt),this.internals=new P(this,ye,Pt,ye.overrideStyles,He,$e,gt,wt),this.disposables.add(this.internals)}updateOptions(p){super.updateOptions(p),this.internals.updateOptions(p)}};Ri=Oi([Fi(5,Ni._Y),Fi(6,Ei.fN),Fi(7,Bi),Fi(8,Gi.Gy),Fi(9,Jt.pG)],Ri);let nn=class extends Ki{constructor(p,F,de,be,ye,Me,He,$e,gt,wt){const{options:It,getTypeNavigationMode:Pt,disposable:Wt}=Me.invokeFunction(b,ye);super(p,F,de,be,It),this.disposables.add(Wt),this.internals=new P(this,ye,Pt,ye.overrideStyles,He,$e,gt,wt),this.disposables.add(this.internals)}updateOptions(p={}){super.updateOptions(p),p.overrideStyles&&this.internals.updateStyleOverrides(p.overrideStyles),this.internals.updateOptions(p)}};nn=Oi([Fi(5,Ni._Y),Fi(6,Ei.fN),Fi(7,Bi),Fi(8,Gi.Gy),Fi(9,Jt.pG)],nn);let Mn=class extends di{constructor(p,F,de,be,ye,Me,He,$e,gt,wt,It){const{options:Pt,getTypeNavigationMode:Wt,disposable:Xt}=He.invokeFunction(b,Me);super(p,F,de,be,ye,Pt),this.disposables.add(Xt),this.internals=new P(this,Me,Wt,Me.overrideStyles,$e,gt,wt,It),this.disposables.add(this.internals)}updateOptions(p={}){super.updateOptions(p),p.overrideStyles&&this.internals.updateStyleOverrides(p.overrideStyles),this.internals.updateOptions(p)}};Mn=Oi([Fi(6,Ni._Y),Fi(7,Ei.fN),Fi(8,Bi),Fi(9,Gi.Gy),Fi(10,Jt.pG)],Mn);let fs=class extends Ye{constructor(p,F,de,be,ye,Me,He,$e,gt,wt,It){const{options:Pt,getTypeNavigationMode:Wt,disposable:Xt}=He.invokeFunction(b,Me);super(p,F,de,be,ye,Pt),this.disposables.add(Xt),this.internals=new P(this,Me,Wt,Me.overrideStyles,$e,gt,wt,It),this.disposables.add(this.internals)}get onDidOpen(){return this.internals.onDidOpen}updateOptions(p={}){super.updateOptions(p),p.overrideStyles&&this.internals.updateStyleOverrides(p.overrideStyles),this.internals.updateOptions(p)}};fs=Oi([Fi(6,Ni._Y),Fi(7,Ei.fN),Fi(8,Bi),Fi(9,Gi.Gy),Fi(10,Jt.pG)],fs);let is=class extends ri{constructor(p,F,de,be,ye,Me,He,$e,gt,wt,It,Pt){const{options:Wt,getTypeNavigationMode:Xt,disposable:mi}=$e.invokeFunction(b,He);super(p,F,de,be,ye,Me,Wt),this.disposables.add(mi),this.internals=new P(this,He,Xt,He.overrideStyles,gt,wt,It,Pt),this.disposables.add(this.internals)}updateOptions(p){super.updateOptions(p),this.internals.updateOptions(p)}};is=Oi([Fi(7,Ni._Y),Fi(8,Ei.fN),Fi(9,Bi),Fi(10,Gi.Gy),Fi(11,Jt.pG)],is);function qe(q){const p=q.getValue(ks);if(p==="highlight")return Ie.Highlight;if(p==="filter")return Ie.Filter;const F=q.getValue(wn);if(F==="simple"||F==="highlight")return Ie.Highlight;if(F==="filter")return Ie.Filter}function b(q,p){var F;const de=q.get(Jt.pG),be=q.get(Ai.l),ye=q.get(Ei.fN),Me=q.get(Ni._Y),He=()=>{const Pt=ye.getContextKeyValue(cn);if(Pt==="automatic")return Q._C.Automatic;if(Pt==="trigger"||ye.getContextKeyValue(Wi)===!1)return Q._C.Trigger},$e=p.horizontalScrolling!==void 0?p.horizontalScrolling:!!de.getValue(fn),[gt,wt]=Me.invokeFunction(zs,p),It=p.additionalScrollHeight;return{getTypeNavigationMode:He,disposable:wt,options:Object.assign(Object.assign({keyboardSupport:!1},gt),{indent:typeof de.getValue(yn)=="number"?de.getValue(yn):void 0,renderIndentGuides:de.getValue(uo),smoothScrolling:!!de.getValue(Ms),defaultFindMode:qe(de),horizontalScrolling:$e,additionalScrollHeight:It,hideTwistiesOfChildlessElements:p.hideTwistiesOfChildlessElements,expandOnlyOnTwistieClick:(F=p.expandOnlyOnTwistieClick)!==null&&F!==void 0?F:de.getValue(ls)==="doubleClick",contextViewProvider:be})}}let P=class{constructor(p,F,de,be,ye,Me,He,$e){var gt;this.tree=p,this.themeService=He,this.disposables=[],this.contextKeyService=vn(ye,p),this.listSupportsMultiSelect=jn.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(F.multipleSelectionSupport!==!1),Nn.bindTo(this.contextKeyService).set(!!F.selectionNavigation),this.listSupportFindWidget=Jn.bindTo(this.contextKeyService),this.listSupportFindWidget.set((gt=F.findWidgetEnabled)!==null&>!==void 0?gt:!0),this.hasSelectionOrFocus=xn.bindTo(this.contextKeyService),this.hasDoubleSelection=Rn.bindTo(this.contextKeyService),this.hasMultiSelection=$i.bindTo(this.contextKeyService),this.treeElementCanCollapse=Ti.bindTo(this.contextKeyService),this.treeElementHasParent=es.bindTo(this.contextKeyService),this.treeElementCanExpand=xi.bindTo(this.contextKeyService),this.treeElementHasChild=os.bindTo(this.contextKeyService),this.treeFindOpen=Zi.bindTo(this.contextKeyService),this._useAltAsMultipleSelectionModifier=Ss($e),this.updateStyleOverrides(be);const It=()=>{const Wt=p.getFocus()[0];if(!Wt)return;const Xt=p.getNode(Wt);this.treeElementCanCollapse.set(Xt.collapsible&&!Xt.collapsed),this.treeElementHasParent.set(!!p.getParentElement(Wt)),this.treeElementCanExpand.set(Xt.collapsible&&Xt.collapsed),this.treeElementHasChild.set(!!p.getFirstElementChild(Wt))},Pt=new Set;Pt.add(cn),Pt.add(Wi),this.disposables.push(this.contextKeyService,Me.register(p),p.onDidChangeSelection(()=>{const Wt=p.getSelection(),Xt=p.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.hasSelectionOrFocus.set(Wt.length>0||Xt.length>0),this.hasMultiSelection.set(Wt.length>1),this.hasDoubleSelection.set(Wt.length===2)})}),p.onDidChangeFocus(()=>{const Wt=p.getSelection(),Xt=p.getFocus();this.hasSelectionOrFocus.set(Wt.length>0||Xt.length>0),It()}),p.onDidChangeCollapseState(It),p.onDidChangeModel(It),p.onDidChangeFindOpenState(Wt=>this.treeFindOpen.set(Wt)),$e.onDidChangeConfiguration(Wt=>{let Xt={};if(Wt.affectsConfiguration(Gn)&&(this._useAltAsMultipleSelectionModifier=Ss($e)),Wt.affectsConfiguration(yn)){const mi=$e.getValue(yn);Xt=Object.assign(Object.assign({},Xt),{indent:mi})}if(Wt.affectsConfiguration(uo)){const mi=$e.getValue(uo);Xt=Object.assign(Object.assign({},Xt),{renderIndentGuides:mi})}if(Wt.affectsConfiguration(Ms)){const mi=!!$e.getValue(Ms);Xt=Object.assign(Object.assign({},Xt),{smoothScrolling:mi})}if((Wt.affectsConfiguration(ks)||Wt.affectsConfiguration(wn))&&p.updateOptions({defaultFindMode:qe($e)}),Wt.affectsConfiguration(fn)&&F.horizontalScrolling===void 0){const mi=!!$e.getValue(fn);Xt=Object.assign(Object.assign({},Xt),{horizontalScrolling:mi})}if(Wt.affectsConfiguration(ls)&&F.expandOnlyOnTwistieClick===void 0&&(Xt=Object.assign(Object.assign({},Xt),{expandOnlyOnTwistieClick:$e.getValue(ls)==="doubleClick"})),Wt.affectsConfiguration(Ts)){const mi=$e.getValue(Ts);Xt=Object.assign(Object.assign({},Xt),{mouseWheelScrollSensitivity:mi})}if(Wt.affectsConfiguration(Et)){const mi=$e.getValue(Et);Xt=Object.assign(Object.assign({},Xt),{fastScrollSensitivity:mi})}Object.keys(Xt).length>0&&p.updateOptions(Xt)}),this.contextKeyService.onDidChangeContext(Wt=>{Wt.affectsSome(Pt)&&p.updateOptions({typeNavigationMode:de()})})),this.navigator=new mn(p,Object.assign({configurationService:$e},F)),this.disposables.push(this.navigator)}get onDidOpen(){return this.navigator.onDidOpen}updateOptions(p){p.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!p.multipleSelectionSupport)}updateStyleOverrides(p){(0,x.AS)(this.styler),this.styler=p?(0,gn.DD)(this.tree,this.themeService,p):x.jG.None}dispose(){this.disposables=(0,x.AS)(this.disposables),(0,x.AS)(this.styler),this.styler=void 0}};P=Oi([Fi(4,Ei.fN),Fi(5,Bi),Fi(6,Gi.Gy),Fi(7,Jt.pG)],P),Pi.O.as(ai.Fd.Configuration).registerConfiguration({id:"workbench",order:7,title:(0,lt.kg)("workbenchConfigurationTitle","Workbench"),type:"object",properties:{[Gn]:{type:"string",enum:["ctrlCmd","alt"],markdownEnumDescriptions:[(0,lt.kg)("multiSelectModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),(0,lt.kg)("multiSelectModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],default:"ctrlCmd",description:(0,lt.kg)({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.")},[ws]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:(0,lt.kg)({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.")},[fn]:{type:"boolean",default:!1,description:(0,lt.kg)("horizontalScrolling setting","Controls whether lists and trees support horizontal scrolling in the workbench. Warning: turning on this setting has a performance implication.")},[yn]:{type:"number",default:8,minimum:4,maximum:40,description:(0,lt.kg)("tree indent setting","Controls tree indentation in pixels.")},[uo]:{type:"string",enum:["none","onHover","always"],default:"onHover",description:(0,lt.kg)("render tree indent guides","Controls whether the tree should render indent guides.")},[Ms]:{type:"boolean",default:!1,description:(0,lt.kg)("list smoothScrolling setting","Controls whether lists and trees have smooth scrolling.")},[Ts]:{type:"number",default:1,markdownDescription:(0,lt.kg)("Mouse Wheel Scroll Sensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")},[Et]:{type:"number",default:5,description:(0,lt.kg)("Fast Scroll Sensitivity","Scrolling speed multiplier when pressing `Alt`.")},[ks]:{type:"string",enum:["highlight","filter"],enumDescriptions:[(0,lt.kg)("defaultFindModeSettingKey.highlight","Highlight elements when searching. Further up and down navigation will traverse only the highlighted elements."),(0,lt.kg)("defaultFindModeSettingKey.filter","Filter elements when searching.")],default:"highlight",description:(0,lt.kg)("defaultFindModeSettingKey","Controls the default find mode for lists and trees in the workbench.")},[wn]:{type:"string",enum:["simple","highlight","filter"],enumDescriptions:[(0,lt.kg)("keyboardNavigationSettingKey.simple","Simple keyboard navigation focuses elements which match the keyboard input. Matching is done only on prefixes."),(0,lt.kg)("keyboardNavigationSettingKey.highlight","Highlight keyboard navigation highlights elements which match the keyboard input. Further up and down navigation will traverse only the highlighted elements."),(0,lt.kg)("keyboardNavigationSettingKey.filter","Filter keyboard navigation will filter out and hide all the elements which do not match the keyboard input.")],default:"highlight",description:(0,lt.kg)("keyboardNavigationSettingKey","Controls the keyboard navigation style for lists and trees in the workbench. Can be simple, highlight and filter."),deprecated:!0,deprecationMessage:(0,lt.kg)("keyboardNavigationSettingKeyDeprecated","Please use 'workbench.list.defaultFindMode' instead.")},[ls]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:(0,lt.kg)("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.")}}})},46441:(Tt,Fe,f)=>{f.d(Fe,{$b:()=>x,Cr:()=>J,Kc:()=>z,rr:()=>$});var I=f(2106),h=f(10998),te=f(82399);const $=(0,te.u1)("logService");var x;(function(S){S[S.Trace=0]="Trace",S[S.Debug=1]="Debug",S[S.Info=2]="Info",S[S.Warning=3]="Warning",S[S.Error=4]="Error",S[S.Critical=5]="Critical",S[S.Off=6]="Off"})(x||(x={}));const ie=x.Info;class Q extends h.jG{constructor(){super(...arguments),this.level=ie,this._onDidChangeLogLevel=this._register(new I.vl)}setLevel(_){this.level!==_&&(this.level=_,this._onDidChangeLogLevel.fire(this.level))}getLevel(){return this.level}}class J extends Q{constructor(_=ie){super(),this.setLevel(_)}trace(_,...y){this.getLevel()<=x.Trace&&console.log("%cTRACE","color: #888",_,...y)}debug(_,...y){this.getLevel()<=x.Debug&&console.log("%cDEBUG","background: #eee; color: #888",_,...y)}info(_,...y){this.getLevel()<=x.Info&&console.log("%c INFO","color: #33f",_,...y)}error(_,...y){this.getLevel()<=x.Error&&console.log("%c ERR","color: #f33",_,...y)}dispose(){}}class z extends h.jG{constructor(_){super(),this.logger=_,this._register(_)}getLevel(){return this.logger.getLevel()}trace(_,...y){this.logger.trace(_,...y)}debug(_,...y){this.logger.debug(_,...y)}info(_,...y){this.logger.info(_,...y)}error(_,...y){this.logger.error(_,...y)}}},27619:(Tt,Fe,f)=>{f.d(Fe,{DR:()=>ie,cj:()=>$,oc:()=>x});var I=f(66459),h=f(3765),te=f(82399),$;(function(Q){Q[Q.Hint=1]="Hint",Q[Q.Info=2]="Info",Q[Q.Warning=4]="Warning",Q[Q.Error=8]="Error"})($||($={})),function(Q){function J(C,d){return d-C}Q.compare=J;const z=Object.create(null);z[Q.Error]=(0,h.kg)("sev.error","Error"),z[Q.Warning]=(0,h.kg)("sev.warning","Warning"),z[Q.Info]=(0,h.kg)("sev.info","Info");function S(C){return z[C]||""}Q.toString=S;function _(C){switch(C){case I.A.Error:return Q.Error;case I.A.Warning:return Q.Warning;case I.A.Info:return Q.Info;case I.A.Ignore:return Q.Hint}}Q.fromSeverity=_;function y(C){switch(C){case Q.Error:return I.A.Error;case Q.Warning:return I.A.Warning;case Q.Info:return I.A.Info;case Q.Hint:return I.A.Ignore}}Q.toSeverity=y}($||($={}));var x;(function(Q){const J="";function z(_){return S(_,!0)}Q.makeKey=z;function S(_,y){const C=[J];return _.source?C.push(_.source.replace("\xA6","\\\xA6")):C.push(J),_.code?typeof _.code=="string"?C.push(_.code.replace("\xA6","\\\xA6")):C.push(_.code.value.replace("\xA6","\\\xA6")):C.push(J),_.severity!==void 0&&_.severity!==null?C.push($.toString(_.severity)):C.push(J),_.message&&y?C.push(_.message.replace("\xA6","\\\xA6")):C.push(J),_.startLineNumber!==void 0&&_.startLineNumber!==null?C.push(_.startLineNumber.toString()):C.push(J),_.startColumn!==void 0&&_.startColumn!==null?C.push(_.startColumn.toString()):C.push(J),_.endLineNumber!==void 0&&_.endLineNumber!==null?C.push(_.endLineNumber.toString()):C.push(J),_.endColumn!==void 0&&_.endColumn!==null?C.push(_.endColumn.toString()):C.push(J),C.push(J),C.join("\xA6")}Q.makeKeyOptionalMessage=S})(x||(x={}));const ie=(0,te.u1)("markerService")},29879:(Tt,Fe,f)=>{f.d(Fe,{AI:()=>te,Kz:()=>x,Ot:()=>$});var I=f(66459),h=f(82399),te=I.A;const $=(0,h.u1)("notificationService");class x{}},54435:(Tt,Fe,f)=>{f.d(Fe,{Cr:()=>ie,ew:()=>S,fV:()=>z,m5:()=>Q,v$:()=>J});var I=f(10998),h=f(16844),te=f(37264),$=f(82399),x=function(_,y,C,d){function w(D){return D instanceof C?D:new C(function(L){L(D)})}return new(C||(C=Promise))(function(D,L){function k(B){try{N(d.next(B))}catch(T){L(T)}}function j(B){try{N(d.throw(B))}catch(T){L(T)}}function N(B){B.done?D(B.value):w(B.value).then(k,j)}N((d=d.apply(_,y||[])).next())})};const ie=(0,$.u1)("openerService"),Q=Object.freeze({_serviceBrand:void 0,registerOpener(){return I.jG.None},registerValidator(){return I.jG.None},registerExternalUriResolver(){return I.jG.None},setDefaultExternalOpener(){},registerExternalOpener(){return I.jG.None},open(){return x(this,void 0,void 0,function*(){return!1})},resolveExternalUri(_){return x(this,void 0,void 0,function*(){return{resolved:_,dispose(){}}})}});function J(_,y){return te.r.isUri(_)?(0,h.Q_)(_.scheme,y):(0,h.ns)(_,y+":")}function z(_,...y){return y.some(C=>J(_,C))}function S(_){let y;const C=/^L?(\d+)(?:,(\d+))?(-L?(\d+)(?:,(\d+))?)?/.exec(_.fragment);return C&&(y={startLineNumber:parseInt(C[1]),startColumn:C[2]?parseInt(C[2]):1,endLineNumber:C[4]?parseInt(C[4]):void 0,endColumn:C[4]?C[5]?parseInt(C[5]):1:void 0},_=_.with({fragment:""})),{selection:y,uri:_}}},44023:(Tt,Fe,f)=>{f.d(Fe,{G5:()=>h,N8:()=>x,ke:()=>$});var I=f(82399);const h=(0,I.u1)("progressService"),te=Object.freeze({total(){},worked(){},done(){}});class ${constructor(Q){this.callback=Q}report(Q){this._value=Q,this.callback(this._value)}}$.None=Object.freeze({report(){}});const x=(0,I.u1)("editorProgressService")},19381:(Tt,Fe,f)=>{f.d(Fe,{Fd:()=>x,aJ:()=>$});var I=f(13338),h=f(10998),te=f(67167),$;(function(Q){Q[Q.PRESERVE=0]="PRESERVE",Q[Q.LAST=1]="LAST"})($||($={}));const x={Quickaccess:"workbench.contributions.quickaccess"};class ie{constructor(){this.providers=[],this.defaultProvider=void 0}registerQuickAccessProvider(J){return J.prefix.length===0?this.defaultProvider=J:this.providers.push(J),this.providers.sort((z,S)=>S.prefix.length-z.prefix.length),(0,h.s)(()=>{this.providers.splice(this.providers.indexOf(J),1),this.defaultProvider===J&&(this.defaultProvider=void 0)})}getQuickAccessProviders(){return(0,I.Yc)([this.defaultProvider,...this.providers])}getQuickAccessProvider(J){return J&&this.providers.find(S=>J.startsWith(S.prefix))||void 0||this.defaultProvider}}te.O.add(x.Quickaccess,new ie)},73027:(Tt,Fe,f)=>{f.d(Fe,{C1:()=>h.C1,GK:()=>te});var I=f(82399),h=f(32802);const te=(0,I.u1)("quickInputService")},67167:(Tt,Fe,f)=>{f.d(Fe,{O:()=>$});var I=f(87110),h=f(79359);class te{constructor(){this.data=new Map}add(ie,Q){I.ok(h.Kg(ie)),I.ok(h.Gv(Q)),I.ok(!this.data.has(ie),"There is already an extension with this id"),this.data.set(ie,Q)}as(ie){return this.data.get(ie)||null}}const $=new te},90840:(Tt,Fe,f)=>{f.d(Fe,{CS:()=>_,pc:()=>d,LP:()=>y});var I=f(2106),h=f(10998),te=f(79359),$=f(65958),x=function(w,D,L,k){function j(N){return N instanceof L?N:new L(function(B){B(N)})}return new(L||(L=Promise))(function(N,B){function T(ee){try{Y(k.next(ee))}catch(ce){B(ce)}}function H(ee){try{Y(k.throw(ee))}catch(ce){B(ce)}}function Y(ee){ee.done?N(ee.value):j(ee.value).then(T,H)}Y((k=k.apply(w,D||[])).next())})},ie;(function(w){w[w.None=0]="None",w[w.Initialized=1]="Initialized",w[w.Closed=2]="Closed"})(ie||(ie={}));class Q extends h.jG{constructor(D,L=Object.create(null)){super(),this.database=D,this.options=L,this._onDidChangeStorage=this._register(new I.vl),this.onDidChangeStorage=this._onDidChangeStorage.event,this.state=ie.None,this.cache=new Map,this.flushDelayer=new $.Th(Q.DEFAULT_FLUSH_DELAY),this.pendingDeletes=new Set,this.pendingInserts=new Map,this.whenFlushedCallbacks=[],this.registerListeners()}registerListeners(){this._register(this.database.onDidChangeItemsExternal(D=>this.onDidChangeItemsExternal(D)))}onDidChangeItemsExternal(D){var L,k;(L=D.changed)===null||L===void 0||L.forEach((j,N)=>this.accept(N,j)),(k=D.deleted)===null||k===void 0||k.forEach(j=>this.accept(j,void 0))}accept(D,L){if(this.state===ie.Closed)return;let k=!1;(0,te.z)(L)?k=this.cache.delete(D):this.cache.get(D)!==L&&(this.cache.set(D,L),k=!0),k&&this._onDidChangeStorage.fire(D)}get(D,L){const k=this.cache.get(D);return(0,te.z)(k)?L:k}getBoolean(D,L){const k=this.get(D);return(0,te.z)(k)?L:k==="true"}getNumber(D,L){const k=this.get(D);return(0,te.z)(k)?L:parseInt(k,10)}set(D,L){return x(this,void 0,void 0,function*(){if(this.state===ie.Closed)return;if((0,te.z)(L))return this.delete(D);const k=String(L);if(this.cache.get(D)!==k)return this.cache.set(D,k),this.pendingInserts.set(D,k),this.pendingDeletes.delete(D),this._onDidChangeStorage.fire(D),this.doFlush()})}delete(D){return x(this,void 0,void 0,function*(){if(!(this.state===ie.Closed||!this.cache.delete(D)))return this.pendingDeletes.has(D)||this.pendingDeletes.add(D),this.pendingInserts.delete(D),this._onDidChangeStorage.fire(D),this.doFlush()})}get hasPending(){return this.pendingInserts.size>0||this.pendingDeletes.size>0}flushPending(){return x(this,void 0,void 0,function*(){if(!this.hasPending)return;const D={insert:this.pendingInserts,delete:this.pendingDeletes};return this.pendingDeletes=new Set,this.pendingInserts=new Map,this.database.updateItems(D).finally(()=>{var L;if(!this.hasPending)for(;this.whenFlushedCallbacks.length;)(L=this.whenFlushedCallbacks.pop())===null||L===void 0||L()})})}doFlush(D){return x(this,void 0,void 0,function*(){return this.flushDelayer.trigger(()=>this.flushPending(),D)})}dispose(){this.flushDelayer.dispose(),super.dispose()}}Q.DEFAULT_FLUSH_DELAY=100;class J{constructor(){this.onDidChangeItemsExternal=I.Jh.None,this.items=new Map}updateItems(D){var L,k;return x(this,void 0,void 0,function*(){(L=D.insert)===null||L===void 0||L.forEach((j,N)=>this.items.set(N,j)),(k=D.delete)===null||k===void 0||k.forEach(j=>this.items.delete(j))})}}var z=f(82399);const S="__$__targetStorageMarker",_=(0,z.u1)("storageService");var y;(function(w){w[w.NONE=0]="NONE",w[w.SHUTDOWN=1]="SHUTDOWN"})(y||(y={}));class C extends h.jG{constructor(D={flushInterval:C.DEFAULT_FLUSH_INTERVAL}){super(),this.options=D,this._onDidChangeValue=this._register(new I.fV),this.onDidChangeValue=this._onDidChangeValue.event,this._onDidChangeTarget=this._register(new I.fV),this._onWillSaveState=this._register(new I.vl),this.onWillSaveState=this._onWillSaveState.event,this._workspaceKeyTargets=void 0,this._profileKeyTargets=void 0,this._applicationKeyTargets=void 0}emitDidChangeValue(D,L){if(L===S){switch(D){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:D})}else this._onDidChangeValue.fire({scope:D,key:L,target:this.getKeyTargets(D)[L]})}get(D,L,k){var j;return(j=this.getStorage(L))===null||j===void 0?void 0:j.get(D,k)}getBoolean(D,L,k){var j;return(j=this.getStorage(L))===null||j===void 0?void 0:j.getBoolean(D,k)}getNumber(D,L,k){var j;return(j=this.getStorage(L))===null||j===void 0?void 0:j.getNumber(D,k)}store(D,L,k,j){if((0,te.z)(L)){this.remove(D,k);return}this.withPausedEmitters(()=>{var N;this.updateKeyTarget(D,k,j),(N=this.getStorage(k))===null||N===void 0||N.set(D,L)})}remove(D,L){this.withPausedEmitters(()=>{var k;this.updateKeyTarget(D,L,void 0),(k=this.getStorage(L))===null||k===void 0||k.delete(D)})}withPausedEmitters(D){this._onDidChangeValue.pause(),this._onDidChangeTarget.pause();try{D()}finally{this._onDidChangeValue.resume(),this._onDidChangeTarget.resume()}}updateKeyTarget(D,L,k){var j,N;const B=this.getKeyTargets(L);typeof k=="number"?B[D]!==k&&(B[D]=k,(j=this.getStorage(L))===null||j===void 0||j.set(S,JSON.stringify(B))):typeof B[D]=="number"&&(delete B[D],(N=this.getStorage(L))===null||N===void 0||N.set(S,JSON.stringify(B)))}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(D){switch(D){case-1:return this.applicationKeyTargets;case 0:return this.profileKeyTargets;default:return this.workspaceKeyTargets}}loadKeyTargets(D){const L=this.get(S,D);if(L)try{return JSON.parse(L)}catch{}return Object.create(null)}}C.DEFAULT_FLUSH_INTERVAL=60*1e3;class d extends C{constructor(){super(),this.applicationStorage=this._register(new Q(new J)),this.profileStorage=this._register(new Q(new J)),this.workspaceStorage=this._register(new Q(new J)),this._register(this.workspaceStorage.onDidChangeStorage(D=>this.emitDidChangeValue(1,D))),this._register(this.profileStorage.onDidChangeStorage(D=>this.emitDidChangeValue(0,D))),this._register(this.applicationStorage.onDidChangeStorage(D=>this.emitDidChangeValue(-1,D)))}getStorage(D){switch(D){case-1:return this.applicationStorage;case 0:return this.profileStorage;default:return this.workspaceStorage}}}},76243:(Tt,Fe,f)=>{f.d(Fe,{k:()=>h});var I=f(82399);const h=(0,I.u1)("telemetryService")},4874:(Tt,Fe,f)=>{f.d(Fe,{$$0:()=>ve,$BZ:()=>ks,$Qy:()=>ws,AN$:()=>ki,AjU:()=>Ko,AlL:()=>wt,B2L:()=>Jn,BTi:()=>zi,Bbc:()=>J,By2:()=>Ct,C1n:()=>De,C9U:()=>Gs,CMg:()=>ai,CQ3:()=>rs,CU6:()=>d,CgL:()=>at,D7X:()=>Ji,ECk:()=>qi,ELA:()=>bn,EY1:()=>xi,FEE:()=>ee,FdG:()=>z,FiB:()=>Yi,GNm:()=>cn,GVV:()=>zs,G_h:()=>ft,Gj6:()=>Zi,H8q:()=>q,HDX:()=>Ye,HJZ:()=>sn,HWC:()=>Ki,Hng:()=>we,HwT:()=>Rn,I$A:()=>O,IIb:()=>Zt,ILr:()=>ha,JO0:()=>pi,JPj:()=>ld,JVY:()=>No,K1Z:()=>Ia,L4c:()=>Z,L9Z:()=>ot,MHP:()=>vn,NBf:()=>xe,NXK:()=>Gn,ObF:()=>In,P6i:()=>Wn,P9Z:()=>M,Q96:()=>Ai,QI5:()=>nn,QRv:()=>Kt,Qfh:()=>Gt,QwA:()=>Jt,Rbi:()=>Te,Rig:()=>wo,Rjz:()=>ts,S5J:()=>Pi,S6W:()=>fe,SNb:()=>Ii,Sj:()=>Di,Stt:()=>ct,Syz:()=>Ei,T5N:()=>Ke,T9h:()=>pt,U4U:()=>de,ULt:()=>We,UPX:()=>D,US:()=>St,Ubg:()=>wi,Ux$:()=>mi,VFX:()=>Ts,WL6:()=>xn,WMx:()=>Ze,WfR:()=>Fi,WmU:()=>Ms,XJc:()=>jt,Xo2:()=>Bi,Xp1:()=>ca,YSW:()=>lt,YZM:()=>wn,YtV:()=>nt,ZEf:()=>os,Zgs:()=>se,Ztu:()=>jn,_$n:()=>Pe,_NC:()=>Ni,_pU:()=>$i,b1q:()=>N,bNw:()=>dd,bXl:()=>At,buw:()=>B,c1f:()=>he,c6Y:()=>Wt,c7i:()=>gt,cI_:()=>oi,cws:()=>le,dd_:()=>Pt,eMz:()=>Mn,eUu:()=>Rt,eYZ:()=>Re,efJ:()=>Et,er1:()=>ni,f4y:()=>$s,f9l:()=>oe,fAP:()=>pr,fED:()=>vs,fiM:()=>P,g$2:()=>It,gnV:()=>ei,gtq:()=>Ss,h9z:()=>Ue,i61:()=>Ci,iAJ:()=>Ri,ijf:()=>Bn,iwL:()=>Ce,k5u:()=>be,lO1:()=>mn,ld8:()=>fn,mH6:()=>Oi,mhZ:()=>Li,nH:()=>$e,n__:()=>Vo,oZ8:()=>rn,p7Y:()=>ls,pOz:()=>ut,pmr:()=>Xt,pnl:()=>b,qTN:()=>es,qaw:()=>yn,rB3:()=>vr,rRi:()=>_i,rm4:()=>fi,sDQ:()=>Oe,sIe:()=>bi,sbQ:()=>ye,seu:()=>ri,sjA:()=>Nn,t4B:()=>k,tAP:()=>j,tYX:()=>ro,tan:()=>di,uMG:()=>ms,uNK:()=>X,uNx:()=>As,vwp:()=>Y,w3C:()=>uo,w3w:()=>Wi,whs:()=>ze,x1A:()=>C,yHf:()=>Ti,yLC:()=>er,yLr:()=>Kr,yr0:()=>_r,z5H:()=>Ur,zRE:()=>_t,zUX:()=>Vt});var I=f(65958),h=f(94901),te=f(2106),$=f(79359),x=f(3765),ie=f(51460),Q=f(67167);function J(un){return`--vscode-${un.replace(/\./g,"-")}`}const z={ColorContribution:"base.contributions.colors"};class S{constructor(){this._onDidChangeSchema=new te.vl,this.onDidChangeSchema=this._onDidChangeSchema.event,this.colorSchema={type:"object",properties:{}},this.colorReferenceSchema={type:"string",enum:[],enumDescriptions:[]},this.colorsById={}}registerColor(Xn,us,Rs,js=!1,Zs){const sr={id:Xn,description:Rs,defaults:us,needsTransparency:js,deprecationMessage:Zs};this.colorsById[Xn]=sr;const ul={type:"string",description:Rs,format:"color-hex",defaultSnippets:[{body:"${1:#ff0000}"}]};return Zs&&(ul.deprecationMessage=Zs),this.colorSchema.properties[Xn]=ul,this.colorReferenceSchema.enum.push(Xn),this.colorReferenceSchema.enumDescriptions.push(Rs),this._onDidChangeSchema.fire(),Xn}getColors(){return Object.keys(this.colorsById).map(Xn=>this.colorsById[Xn])}resolveDefaultColor(Xn,us){const Rs=this.colorsById[Xn];if(Rs&&Rs.defaults){const js=Rs.defaults[us.type];return Vo(js,us)}}getColorSchema(){return this.colorSchema}toString(){const Xn=(us,Rs)=>{const js=us.indexOf(".")===-1?0:1,Zs=Rs.indexOf(".")===-1?0:1;return js!==Zs?js-Zs:us.localeCompare(Rs)};return Object.keys(this.colorsById).sort(Xn).map(us=>`- \`${us}\`: ${this.colorsById[us].description}`).join(` `)}}const _=new S;Q.O.add(z.ColorContribution,_);function y(un){return un===null||typeof un.hcLight>"u"&&(un.hcDark===null||typeof un.hcDark=="string"?un.hcLight=un.hcDark:un.hcLight=un.light),un}function C(un,Xn,us,Rs,js){return _.registerColor(un,y(Xn),us,Rs,js)}const d=C("foreground",{dark:"#CCCCCC",light:"#616161",hcDark:"#FFFFFF",hcLight:"#292929"},x.kg("foreground","Overall foreground color. This color is only used if not overridden by a component.")),w=C("disabledForeground",{dark:"#CCCCCC80",light:"#61616180",hcDark:"#A5A5A5",hcLight:"#7F7F7F"},x.kg("disabledForeground","Overall foreground for disabled elements. This color is only used if not overridden by a component.")),D=C("errorForeground",{dark:"#F48771",light:"#A1260D",hcDark:"#F48771",hcLight:"#B5200D"},x.kg("errorForeground","Overall foreground color for error messages. This color is only used if not overridden by a component.")),L=C("descriptionForeground",{light:"#717171",dark:pi(d,.7),hcDark:pi(d,.7),hcLight:pi(d,.7)},x.kg("descriptionForeground","Foreground color for description text providing additional information, for example for a label.")),k=C("icon.foreground",{dark:"#C5C5C5",light:"#424242",hcDark:"#FFFFFF",hcLight:"#292929"},x.kg("iconForeground","The default color for icons in the workbench.")),j=C("focusBorder",{dark:"#007FD4",light:"#0090F1",hcDark:"#F38518",hcLight:"#0F4A85"},x.kg("focusBorder","Overall border color for focused elements. This color is only used if not overridden by a component.")),N=C("contrastBorder",{light:null,dark:null,hcDark:"#6FC3DF",hcLight:"#0F4A85"},x.kg("contrastBorder","An extra border around elements to separate them from others for greater contrast.")),B=C("contrastActiveBorder",{light:null,dark:null,hcDark:j,hcLight:j},x.kg("activeContrastBorder","An extra border around active elements to separate them from others for greater contrast.")),T=C("selection.background",{light:null,dark:null,hcDark:null,hcLight:null},x.kg("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.")),H=C("textSeparator.foreground",{light:"#0000002e",dark:"#ffffff2e",hcDark:h.Q1.black,hcLight:"#292929"},x.kg("textSeparatorForeground","Color for text separators.")),Y=C("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hcDark:"#3794FF",hcLight:"#0F4A85"},x.kg("textLinkForeground","Foreground color for links in text.")),ee=C("textLink.activeForeground",{light:"#006AB1",dark:"#3794FF",hcDark:"#3794FF",hcLight:"#0F4A85"},x.kg("textLinkActiveForeground","Foreground color for links in text when clicked on and on mouse hover.")),ce=C("textPreformat.foreground",{light:"#A31515",dark:"#D7BA7D",hcDark:"#D7BA7D",hcLight:"#292929"},x.kg("textPreformatForeground","Foreground color for preformatted text segments.")),pe=C("textBlockQuote.background",{light:"#7f7f7f1a",dark:"#7f7f7f1a",hcDark:null,hcLight:"#F2F2F2"},x.kg("textBlockQuoteBackground","Background color for block quotes in text.")),ge=C("textBlockQuote.border",{light:"#007acc80",dark:"#007acc80",hcDark:h.Q1.white,hcLight:"#292929"},x.kg("textBlockQuoteBorder","Border color for block quotes in text.")),fe=C("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hcDark:h.Q1.black,hcLight:"#F2F2F2"},x.kg("textCodeBlockBackground","Background color for code blocks in text.")),oe=C("widget.shadow",{dark:pi(h.Q1.black,.36),light:pi(h.Q1.black,.16),hcDark:null,hcLight:null},x.kg("widgetShadow","Shadow color of widgets such as find/replace inside the editor.")),Z=C("input.background",{dark:"#3C3C3C",light:h.Q1.white,hcDark:h.Q1.black,hcLight:h.Q1.white},x.kg("inputBoxBackground","Input box background.")),le=C("input.foreground",{dark:d,light:d,hcDark:d,hcLight:d},x.kg("inputBoxForeground","Input box foreground.")),se=C("input.border",{dark:null,light:null,hcDark:N,hcLight:N},x.kg("inputBoxBorder","Input box border.")),X=C("inputOption.activeBorder",{dark:"#007ACC00",light:"#007ACC00",hcDark:N,hcLight:N},x.kg("inputBoxActiveOptionBorder","Border color of activated options in input fields.")),K=C("inputOption.hoverBackground",{dark:"#5a5d5e80",light:"#b8b8b850",hcDark:null,hcLight:null},x.kg("inputOption.hoverBackground","Background color of activated options in input fields.")),he=C("inputOption.activeBackground",{dark:pi(j,.4),light:pi(j,.2),hcDark:h.Q1.transparent,hcLight:h.Q1.transparent},x.kg("inputOption.activeBackground","Background hover color of options in input fields.")),ve=C("inputOption.activeForeground",{dark:h.Q1.white,light:h.Q1.black,hcDark:null,hcLight:d},x.kg("inputOption.activeForeground","Foreground color of activated options in input fields.")),Ee=C("input.placeholderForeground",{light:pi(d,.5),dark:pi(d,.5),hcDark:pi(d,.7),hcLight:pi(d,.7)},x.kg("inputPlaceholderForeground","Input box foreground color for placeholder text.")),O=C("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hcDark:h.Q1.black,hcLight:h.Q1.white},x.kg("inputValidationInfoBackground","Input validation background color for information severity.")),ot=C("inputValidation.infoForeground",{dark:null,light:null,hcDark:null,hcLight:d},x.kg("inputValidationInfoForeground","Input validation foreground color for information severity.")),lt=C("inputValidation.infoBorder",{dark:"#007acc",light:"#007acc",hcDark:N,hcLight:N},x.kg("inputValidationInfoBorder","Input validation border color for information severity.")),We=C("inputValidation.warningBackground",{dark:"#352A05",light:"#F6F5D2",hcDark:h.Q1.black,hcLight:h.Q1.white},x.kg("inputValidationWarningBackground","Input validation background color for warning severity.")),Ke=C("inputValidation.warningForeground",{dark:null,light:null,hcDark:null,hcLight:d},x.kg("inputValidationWarningForeground","Input validation foreground color for warning severity.")),De=C("inputValidation.warningBorder",{dark:"#B89500",light:"#B89500",hcDark:N,hcLight:N},x.kg("inputValidationWarningBorder","Input validation border color for warning severity.")),Pe=C("inputValidation.errorBackground",{dark:"#5A1D1D",light:"#F2DEDE",hcDark:h.Q1.black,hcLight:h.Q1.white},x.kg("inputValidationErrorBackground","Input validation background color for error severity.")),Ue=C("inputValidation.errorForeground",{dark:null,light:null,hcDark:null,hcLight:d},x.kg("inputValidationErrorForeground","Input validation foreground color for error severity.")),Re=C("inputValidation.errorBorder",{dark:"#BE1100",light:"#BE1100",hcDark:N,hcLight:N},x.kg("inputValidationErrorBorder","Input validation border color for error severity.")),et=C("dropdown.background",{dark:"#3C3C3C",light:h.Q1.white,hcDark:h.Q1.black,hcLight:h.Q1.white},x.kg("dropdownBackground","Dropdown background.")),rt=C("dropdown.listBackground",{dark:null,light:null,hcDark:h.Q1.black,hcLight:h.Q1.white},x.kg("dropdownListBackground","Dropdown list background.")),Lt=C("dropdown.foreground",{dark:"#F0F0F0",light:null,hcDark:h.Q1.white,hcLight:d},x.kg("dropdownForeground","Dropdown foreground.")),Dt=C("dropdown.border",{dark:et,light:"#CECECE",hcDark:N,hcLight:N},x.kg("dropdownBorder","Dropdown border.")),xt=C("checkbox.background",{dark:et,light:et,hcDark:et,hcLight:et},x.kg("checkbox.background","Background color of checkbox widget.")),Ie=C("checkbox.foreground",{dark:Lt,light:Lt,hcDark:Lt,hcLight:Lt},x.kg("checkbox.foreground","Foreground color of checkbox widget.")),dt=C("checkbox.border",{dark:Dt,light:Dt,hcDark:Dt,hcLight:Dt},x.kg("checkbox.border","Border color of checkbox widget.")),ft=C("button.foreground",{dark:h.Q1.white,light:h.Q1.white,hcDark:h.Q1.white,hcLight:h.Q1.white},x.kg("buttonForeground","Button foreground color.")),Bt=C("button.separator",{dark:pi(ft,.4),light:pi(ft,.4),hcDark:pi(ft,.4),hcLight:pi(ft,.4)},x.kg("buttonSeparator","Button separator color.")),jt=C("button.background",{dark:"#0E639C",light:"#007ACC",hcDark:null,hcLight:"#0F4A85"},x.kg("buttonBackground","Button background color.")),pt=C("button.hoverBackground",{dark:ds(jt,.2),light:yo(jt,.2),hcDark:null,hcLight:null},x.kg("buttonHoverBackground","Button background color when hovering.")),bt=C("button.border",{dark:N,light:N,hcDark:N,hcLight:N},x.kg("buttonBorder","Button border color.")),zt=C("button.secondaryForeground",{dark:h.Q1.white,light:h.Q1.white,hcDark:h.Q1.white,hcLight:d},x.kg("buttonSecondaryForeground","Secondary button foreground color.")),ii=C("button.secondaryBackground",{dark:"#3A3D41",light:"#5F6A79",hcDark:null,hcLight:h.Q1.white},x.kg("buttonSecondaryBackground","Secondary button background color.")),vi=C("button.secondaryHoverBackground",{dark:ds(ii,.2),light:yo(ii,.2),hcDark:null,hcLight:null},x.kg("buttonSecondaryHoverBackground","Secondary button background color when hovering.")),Ze=C("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hcDark:h.Q1.black,hcLight:"#0F4A85"},x.kg("badgeBackground","Badge background color. Badges are small information labels, e.g. for search results count.")),_t=C("badge.foreground",{dark:h.Q1.white,light:"#333",hcDark:h.Q1.white,hcLight:h.Q1.white},x.kg("badgeForeground","Badge foreground color. Badges are small information labels, e.g. for search results count.")),At=C("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hcDark:null,hcLight:null},x.kg("scrollbarShadow","Scrollbar shadow to indicate that the view is scrolled.")),ei=C("scrollbarSlider.background",{dark:h.Q1.fromHex("#797979").transparent(.4),light:h.Q1.fromHex("#646464").transparent(.4),hcDark:pi(N,.6),hcLight:pi(N,.4)},x.kg("scrollbarSliderBackground","Scrollbar slider background color.")),oi=C("scrollbarSlider.hoverBackground",{dark:h.Q1.fromHex("#646464").transparent(.7),light:h.Q1.fromHex("#646464").transparent(.7),hcDark:pi(N,.8),hcLight:pi(N,.8)},x.kg("scrollbarSliderHoverBackground","Scrollbar slider background color when hovering.")),Li=C("scrollbarSlider.activeBackground",{dark:h.Q1.fromHex("#BFBFBF").transparent(.4),light:h.Q1.fromHex("#000000").transparent(.6),hcDark:N,hcLight:N},x.kg("scrollbarSliderActiveBackground","Scrollbar slider background color when clicked on.")),zi=C("progressBar.background",{dark:h.Q1.fromHex("#0E70C0"),light:h.Q1.fromHex("#0E70C0"),hcDark:N,hcLight:N},x.kg("progressBarBackground","Background color of the progress bar that can show for long running operations.")),Di=C("editorError.background",{dark:null,light:null,hcDark:null,hcLight:null},x.kg("editorError.background","Background color of error text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),Te=C("editorError.foreground",{dark:"#F14C4C",light:"#E51400",hcDark:"#F48771",hcLight:"#B5200D"},x.kg("editorError.foreground","Foreground color of error squigglies in the editor.")),ki=C("editorError.border",{dark:null,light:null,hcDark:h.Q1.fromHex("#E47777").transparent(.8),hcLight:"#B5200D"},x.kg("errorBorder","Border color of error boxes in the editor.")),ze=C("editorWarning.background",{dark:null,light:null,hcDark:null,hcLight:null},x.kg("editorWarning.background","Background color of warning text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),we=C("editorWarning.foreground",{dark:"#CCA700",light:"#BF8803",hcDark:"#FFD37",hcLight:"#895503"},x.kg("editorWarning.foreground","Foreground color of warning squigglies in the editor.")),ct=C("editorWarning.border",{dark:null,light:null,hcDark:h.Q1.fromHex("#FFCC00").transparent(.8),hcLight:"#"},x.kg("warningBorder","Border color of warning boxes in the editor.")),Oe=C("editorInfo.background",{dark:null,light:null,hcDark:null,hcLight:null},x.kg("editorInfo.background","Background color of info text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),ut=C("editorInfo.foreground",{dark:"#3794FF",light:"#1a85ff",hcDark:"#3794FF",hcLight:"#1a85ff"},x.kg("editorInfo.foreground","Foreground color of info squigglies in the editor.")),Zt=C("editorInfo.border",{dark:null,light:null,hcDark:h.Q1.fromHex("#3794FF").transparent(.8),hcLight:"#292929"},x.kg("infoBorder","Border color of info boxes in the editor.")),Ci=C("editorHint.foreground",{dark:h.Q1.fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hcDark:null,hcLight:null},x.kg("editorHint.foreground","Foreground color of hint squigglies in the editor.")),Ki=C("editorHint.border",{dark:null,light:null,hcDark:h.Q1.fromHex("#eeeeee").transparent(.8),hcLight:"#292929"},x.kg("hintBorder","Border color of hint boxes in the editor.")),Ln=C("sash.hoverBorder",{dark:j,light:j,hcDark:j,hcLight:j},x.kg("sashActiveBorder","Border color of active sashes.")),nt=C("editor.background",{light:"#ffffff",dark:"#1E1E1E",hcDark:h.Q1.black,hcLight:h.Q1.white},x.kg("editorBackground","Editor background color.")),Ct=C("editor.foreground",{light:"#333333",dark:"#BBBBBB",hcDark:h.Q1.white,hcLight:d},x.kg("editorForeground","Editor default foreground color.")),Qt=C("editorStickyScroll.background",{light:nt,dark:nt,hcDark:nt,hcLight:nt},x.kg("editorStickyScrollBackground","Sticky scroll background color for the editor")),Ot=C("editorStickyScrollHover.background",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:null,hcLight:h.Q1.fromHex("#0F4A85").transparent(.1)},x.kg("editorStickyScrollHoverBackground","Sticky scroll on hover background color for the editor")),at=C("editorWidget.background",{dark:"#252526",light:"#F3F3F3",hcDark:"#0C141F",hcLight:h.Q1.white},x.kg("editorWidgetBackground","Background color of editor widgets, such as find/replace.")),Yi=C("editorWidget.foreground",{dark:d,light:d,hcDark:d,hcLight:d},x.kg("editorWidgetForeground","Foreground color of editor widgets, such as find/replace.")),bi=C("editorWidget.border",{dark:"#454545",light:"#C8C8C8",hcDark:N,hcLight:N},x.kg("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.")),St=C("editorWidget.resizeBorder",{light:null,dark:null,hcDark:null,hcLight:null},x.kg("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.")),bn=C("quickInput.background",{dark:at,light:at,hcDark:at,hcLight:at},x.kg("pickerBackground","Quick picker background color. The quick picker widget is the container for pickers like the command palette.")),sn=C("quickInput.foreground",{dark:Yi,light:Yi,hcDark:Yi,hcLight:Yi},x.kg("pickerForeground","Quick picker foreground color. The quick picker widget is the container for pickers like the command palette.")),ni=C("quickInputTitle.background",{dark:new h.Q1(new h.bU(255,255,255,.105)),light:new h.Q1(new h.bU(0,0,0,.06)),hcDark:"#000000",hcLight:h.Q1.white},x.kg("pickerTitleBackground","Quick picker title background color. The quick picker widget is the container for pickers like the command palette.")),xe=C("pickerGroup.foreground",{dark:"#3794FF",light:"#0066BF",hcDark:h.Q1.white,hcLight:"#0F4A85"},x.kg("pickerGroupForeground","Quick picker color for grouping labels.")),Ce=C("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hcDark:h.Q1.white,hcLight:"#0F4A85"},x.kg("pickerGroupBorder","Quick picker color for grouping borders.")),Ye=C("keybindingLabel.background",{dark:new h.Q1(new h.bU(128,128,128,.17)),light:new h.Q1(new h.bU(221,221,221,.4)),hcDark:h.Q1.transparent,hcLight:h.Q1.transparent},x.kg("keybindingLabelBackground","Keybinding label background color. The keybinding label is used to represent a keyboard shortcut.")),Rt=C("keybindingLabel.foreground",{dark:h.Q1.fromHex("#CCCCCC"),light:h.Q1.fromHex("#555555"),hcDark:h.Q1.white,hcLight:d},x.kg("keybindingLabelForeground","Keybinding label foreground color. The keybinding label is used to represent a keyboard shortcut.")),Vt=C("keybindingLabel.border",{dark:new h.Q1(new h.bU(51,51,51,.6)),light:new h.Q1(new h.bU(204,204,204,.4)),hcDark:new h.Q1(new h.bU(111,195,223)),hcLight:N},x.kg("keybindingLabelBorder","Keybinding label border color. The keybinding label is used to represent a keyboard shortcut.")),Gt=C("keybindingLabel.bottomBorder",{dark:new h.Q1(new h.bU(68,68,68,.6)),light:new h.Q1(new h.bU(187,187,187,.4)),hcDark:new h.Q1(new h.bU(111,195,223)),hcLight:d},x.kg("keybindingLabelBottomBorder","Keybinding label border bottom color. The keybinding label is used to represent a keyboard shortcut.")),ri=C("editor.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hcDark:"#f3f518",hcLight:"#0F4A85"},x.kg("editorSelectionBackground","Color of the editor selection.")),fi=C("editor.selectionForeground",{light:null,dark:null,hcDark:"#000000",hcLight:h.Q1.white},x.kg("editorSelectionForeground","Color of the selected text for high contrast.")),di=C("editor.inactiveSelectionBackground",{light:pi(ri,.5),dark:pi(ri,.5),hcDark:pi(ri,.7),hcLight:pi(ri,.5)},x.kg("editorInactiveSelection","Color of the selection in an inactive editor. The color must not be opaque so as not to hide underlying decorations."),!0),Jt=C("editor.selectionHighlightBackground",{light:Ma(ri,nt,.3,.6),dark:Ma(ri,nt,.3,.6),hcDark:null,hcLight:null},x.kg("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),ai=C("editor.selectionHighlightBorder",{light:null,dark:null,hcDark:B,hcLight:B},x.kg("editorSelectionHighlightBorder","Border color for regions with the same content as the selection.")),Ei=C("editor.findMatchBackground",{light:"#A8AC94",dark:"#515C6A",hcDark:null,hcLight:null},x.kg("editorFindMatch","Color of the current search match.")),wi=C("editor.findMatchHighlightBackground",{light:"#EA5C0055",dark:"#EA5C0055",hcDark:null,hcLight:null},x.kg("findMatchHighlight","Color of the other search matches. The color must not be opaque so as not to hide underlying decorations."),!0),Ai=C("editor.findRangeHighlightBackground",{dark:"#3a3d4166",light:"#b4b4b44d",hcDark:null,hcLight:null},x.kg("findRangeHighlight","Color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),Ni=C("editor.findMatchBorder",{light:null,dark:null,hcDark:B,hcLight:B},x.kg("editorFindMatchBorder","Border color of the current search match.")),qi=C("editor.findMatchHighlightBorder",{light:null,dark:null,hcDark:B,hcLight:B},x.kg("findMatchHighlightBorder","Border color of the other search matches.")),Pi=C("editor.findRangeHighlightBorder",{dark:null,light:null,hcDark:pi(B,.4),hcLight:pi(B,.4)},x.kg("findRangeHighlightBorder","Border color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),gn=C("searchEditor.findMatchBackground",{light:pi(wi,.66),dark:pi(wi,.66),hcDark:wi,hcLight:wi},x.kg("searchEditor.queryMatch","Color of the Search Editor query matches.")),Gi=C("searchEditor.findMatchBorder",{light:pi(qi,.66),dark:pi(qi,.66),hcDark:qi,hcLight:qi},x.kg("searchEditor.editorFindMatchBorder","Border color of the Search Editor query matches.")),Oi=C("editor.hoverHighlightBackground",{light:"#ADD6FF26",dark:"#264f7840",hcDark:"#ADD6FF26",hcLight:null},x.kg("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),Fi=C("editorHoverWidget.background",{light:at,dark:at,hcDark:at,hcLight:at},x.kg("hoverBackground","Background color of the editor hover.")),Bi=C("editorHoverWidget.foreground",{light:Yi,dark:Yi,hcDark:Yi,hcLight:Yi},x.kg("hoverForeground","Foreground color of the editor hover.")),rn=C("editorHoverWidget.border",{light:bi,dark:bi,hcDark:bi,hcLight:bi},x.kg("hoverBorder","Border color of the editor hover.")),_i=C("editorHoverWidget.statusBarBackground",{dark:ds(Fi,.2),light:yo(Fi,.05),hcDark:at,hcLight:at},x.kg("statusBarBackground","Background color of the editor hover status bar.")),jn=C("editorLink.activeForeground",{dark:"#4E94CE",light:h.Q1.blue,hcDark:h.Q1.cyan,hcLight:"#292929"},x.kg("activeLinkForeground","Color of active links.")),Wn=C("editorInlayHint.foreground",{dark:pi(_t,.8),light:pi(_t,.8),hcDark:_t,hcLight:_t},x.kg("editorInlayHintForeground","Foreground color of inline hints")),xn=C("editorInlayHint.background",{dark:pi(Ze,.6),light:pi(Ze,.3),hcDark:Ze,hcLight:Ze},x.kg("editorInlayHintBackground","Background color of inline hints")),Rn=C("editorInlayHint.typeForeground",{dark:Wn,light:Wn,hcDark:Wn,hcLight:Wn},x.kg("editorInlayHintForegroundTypes","Foreground color of inline hints for types")),$i=C("editorInlayHint.typeBackground",{dark:xn,light:xn,hcDark:xn,hcLight:xn},x.kg("editorInlayHintBackgroundTypes","Background color of inline hints for types")),Nn=C("editorInlayHint.parameterForeground",{dark:Wn,light:Wn,hcDark:Wn,hcLight:Wn},x.kg("editorInlayHintForegroundParameter","Foreground color of inline hints for parameters")),Jn=C("editorInlayHint.parameterBackground",{dark:xn,light:xn,hcDark:xn,hcLight:xn},x.kg("editorInlayHintBackgroundParameter","Background color of inline hints for parameters")),Ti=C("editorLightBulb.foreground",{dark:"#FFCC00",light:"#DDB100",hcDark:"#FFCC00",hcLight:"#007ACC"},x.kg("editorLightBulbForeground","The color used for the lightbulb actions icon.")),es=C("editorLightBulbAutoFix.foreground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},x.kg("editorLightBulbAutoFixForeground","The color used for the lightbulb auto fix actions icon.")),xi=new h.Q1(new h.bU(155,185,85,.2)),os=new h.Q1(new h.bU(255,0,0,.2)),Zi=C("diffEditor.insertedTextBackground",{dark:"#9ccc2c33",light:"#9ccc2c66",hcDark:null,hcLight:null},x.kg("diffEditorInserted","Background color for text that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),cn=C("diffEditor.removedTextBackground",{dark:"#ff000066",light:"#ff00004d",hcDark:null,hcLight:null},x.kg("diffEditorRemoved","Background color for text that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),Wi=C("diffEditor.insertedLineBackground",{dark:xi,light:xi,hcDark:null,hcLight:null},x.kg("diffEditorInsertedLines","Background color for lines that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),vn=C("diffEditor.removedLineBackground",{dark:os,light:os,hcDark:null,hcLight:null},x.kg("diffEditorRemovedLines","Background color for lines that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),Gn=C("diffEditorGutter.insertedLineBackground",{dark:null,light:null,hcDark:null,hcLight:null},x.kg("diffEditorInsertedLineGutter","Background color for the margin where lines got inserted.")),ws=C("diffEditorGutter.removedLineBackground",{dark:null,light:null,hcDark:null,hcLight:null},x.kg("diffEditorRemovedLineGutter","Background color for the margin where lines got removed.")),fn=C("diffEditorOverview.insertedForeground",{dark:null,light:null,hcDark:null,hcLight:null},x.kg("diffEditorOverviewInserted","Diff overview ruler foreground for inserted content.")),ks=C("diffEditorOverview.removedForeground",{dark:null,light:null,hcDark:null,hcLight:null},x.kg("diffEditorOverviewRemoved","Diff overview ruler foreground for removed content.")),wn=C("diffEditor.insertedTextBorder",{dark:null,light:null,hcDark:"#33ff2eff",hcLight:"#374E06"},x.kg("diffEditorInsertedOutline","Outline color for the text that got inserted.")),yn=C("diffEditor.removedTextBorder",{dark:null,light:null,hcDark:"#FF008F",hcLight:"#AD0707"},x.kg("diffEditorRemovedOutline","Outline color for text that got removed.")),uo=C("diffEditor.border",{dark:null,light:null,hcDark:N,hcLight:N},x.kg("diffEditorBorder","Border color between the two text editors.")),Ms=C("diffEditor.diagonalFill",{dark:"#cccccc33",light:"#22222233",hcDark:null,hcLight:null},x.kg("diffDiagonalFill","Color of the diff editor's diagonal fill. The diagonal fill is used in side-by-side diff views.")),Ts=C("list.focusBackground",{dark:null,light:null,hcDark:null,hcLight:null},x.kg("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.")),Et=C("list.focusForeground",{dark:null,light:null,hcDark:null,hcLight:null},x.kg("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.")),ls=C("list.focusOutline",{dark:j,light:j,hcDark:B,hcLight:B},x.kg("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.")),Ss=C("list.focusAndSelectionOutline",{dark:null,light:null,hcDark:null,hcLight:null},x.kg("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.")),ts=C("list.activeSelectionBackground",{dark:"#04395E",light:"#0060C0",hcDark:null,hcLight:h.Q1.fromHex("#0F4A85").transparent(.1)},x.kg("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.")),zs=C("list.activeSelectionForeground",{dark:h.Q1.white,light:h.Q1.white,hcDark:null,hcLight:null},x.kg("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.")),vs=C("list.activeSelectionIconForeground",{dark:null,light:null,hcDark:null,hcLight:null},x.kg("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.")),As=C("list.inactiveSelectionBackground",{dark:"#37373D",light:"#E4E6F1",hcDark:null,hcLight:h.Q1.fromHex("#0F4A85").transparent(.1)},x.kg("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.")),$s=C("list.inactiveSelectionForeground",{dark:null,light:null,hcDark:null,hcLight:null},x.kg("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.")),Gs=C("list.inactiveSelectionIconForeground",{dark:null,light:null,hcDark:null,hcLight:null},x.kg("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.")),rs=C("list.inactiveFocusBackground",{dark:null,light:null,hcDark:null,hcLight:null},x.kg("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.")),Bn=C("list.inactiveFocusOutline",{dark:null,light:null,hcDark:null,hcLight:null},x.kg("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.")),mn=C("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:null,hcLight:h.Q1.fromHex("#0F4A85").transparent(.1)},x.kg("listHoverBackground","List/Tree background when hovering over items using the mouse.")),Kt=C("list.hoverForeground",{dark:null,light:null,hcDark:null,hcLight:null},x.kg("listHoverForeground","List/Tree foreground when hovering over items using the mouse.")),Ri=C("list.dropBackground",{dark:"#062F4A",light:"#D6EBFF",hcDark:null,hcLight:null},x.kg("listDropBackground","List/Tree drag and drop background when moving items around using the mouse.")),nn=C("list.highlightForeground",{dark:"#2AAAFF",light:"#0066BF",hcDark:j,hcLight:j},x.kg("highlight","List/Tree foreground color of the match highlights when searching inside the list/tree.")),Mn=C("list.focusHighlightForeground",{dark:nn,light:Na(ts,nn,"#BBE7FF"),hcDark:nn,hcLight:nn},x.kg("listFocusHighlightForeground","List/Tree foreground color of the match highlights on actively focused items when searching inside the list/tree.")),fs=C("list.invalidItemForeground",{dark:"#B89500",light:"#B89500",hcDark:"#B89500",hcLight:"#B5200D"},x.kg("invalidItemForeground","List/Tree foreground color for invalid items, for example an unresolved root in explorer.")),is=C("list.errorForeground",{dark:"#F88070",light:"#B01011",hcDark:null,hcLight:null},x.kg("listErrorForeground","Foreground color of list items containing errors.")),qe=C("list.warningForeground",{dark:"#CCA700",light:"#855F00",hcDark:null,hcLight:null},x.kg("listWarningForeground","Foreground color of list items containing warnings.")),b=C("listFilterWidget.background",{light:yo(at,0),dark:ds(at,0),hcDark:at,hcLight:at},x.kg("listFilterWidgetBackground","Background color of the type filter widget in lists and trees.")),P=C("listFilterWidget.outline",{dark:h.Q1.transparent,light:h.Q1.transparent,hcDark:"#f38518",hcLight:"#007ACC"},x.kg("listFilterWidgetOutline","Outline color of the type filter widget in lists and trees.")),M=C("listFilterWidget.noMatchesOutline",{dark:"#BE1100",light:"#BE1100",hcDark:N,hcLight:N},x.kg("listFilterWidgetNoMatchesOutline","Outline color of the type filter widget in lists and trees, when there are no matches.")),q=C("listFilterWidget.shadow",{dark:oe,light:oe,hcDark:oe,hcLight:oe},x.kg("listFilterWidgetShadow","Shadown color of the type filter widget in lists and trees.")),p=C("list.filterMatchBackground",{dark:wi,light:wi,hcDark:null,hcLight:null},x.kg("listFilterMatchHighlight","Background color of the filtered match.")),F=C("list.filterMatchBorder",{dark:qi,light:qi,hcDark:N,hcLight:B},x.kg("listFilterMatchHighlightBorder","Border color of the filtered match.")),de=C("tree.indentGuidesStroke",{dark:"#585858",light:"#a9a9a9",hcDark:"#a9a9a9",hcLight:"#a5a5a5"},x.kg("treeIndentGuidesStroke","Tree stroke color for the indentation guides.")),be=C("tree.tableColumnsBorder",{dark:"#CCCCCC20",light:"#61616120",hcDark:null,hcLight:null},x.kg("tableColumnsBorder","Table border color between columns.")),ye=C("tree.tableOddRowsBackground",{dark:pi(d,.04),light:pi(d,.04),hcDark:null,hcLight:null},x.kg("tableOddRowsBackgroundColor","Background color for odd table rows.")),Me=C("list.deemphasizedForeground",{dark:"#8C8C8C",light:"#8E8E90",hcDark:"#A7A8A9",hcLight:"#666666"},x.kg("listDeemphasizedForeground","List/Tree foreground color for items that are deemphasized. ")),He=C("quickInput.list.focusBackground",{dark:null,light:null,hcDark:null,hcLight:null},"",void 0,x.kg("quickInput.list.focusBackground deprecation","Please use quickInputList.focusBackground instead")),$e=C("quickInputList.focusForeground",{dark:zs,light:zs,hcDark:zs,hcLight:zs},x.kg("quickInput.listFocusForeground","Quick picker foreground color for the focused item.")),gt=C("quickInputList.focusIconForeground",{dark:vs,light:vs,hcDark:vs,hcLight:vs},x.kg("quickInput.listFocusIconForeground","Quick picker icon foreground color for the focused item.")),wt=C("quickInputList.focusBackground",{dark:Kr(He,ts),light:Kr(He,ts),hcDark:null,hcLight:null},x.kg("quickInput.listFocusBackground","Quick picker background color for the focused item.")),It=C("menu.border",{dark:null,light:null,hcDark:N,hcLight:N},x.kg("menuBorder","Border color of menus.")),Pt=C("menu.foreground",{dark:Lt,light:d,hcDark:Lt,hcLight:Lt},x.kg("menuForeground","Foreground color of menu items.")),Wt=C("menu.background",{dark:et,light:et,hcDark:et,hcLight:et},x.kg("menuBackground","Background color of menu items.")),Xt=C("menu.selectionForeground",{dark:zs,light:zs,hcDark:zs,hcLight:zs},x.kg("menuSelectionForeground","Foreground color of the selected menu item in menus.")),mi=C("menu.selectionBackground",{dark:ts,light:ts,hcDark:ts,hcLight:ts},x.kg("menuSelectionBackground","Background color of the selected menu item in menus.")),Ii=C("menu.selectionBorder",{dark:null,light:null,hcDark:B,hcLight:B},x.kg("menuSelectionBorder","Border color of the selected menu item in menus.")),Ji=C("menu.separatorBackground",{dark:"#606060",light:"#D4D4D4",hcDark:N,hcLight:N},x.kg("menuSeparatorBackground","Color of a separator menu item in menus.")),In=C("toolbar.hoverBackground",{dark:"#5a5d5e50",light:"#b8b8b850",hcDark:null,hcLight:null},x.kg("toolbarHoverBackground","Toolbar background when hovering over actions using the mouse")),Mi=C("toolbar.hoverOutline",{dark:null,light:null,hcDark:B,hcLight:B},x.kg("toolbarHoverOutline","Toolbar outline when hovering over actions using the mouse")),Vi=C("toolbar.activeBackground",{dark:ds(In,.1),light:yo(In,.1),hcDark:null,hcLight:null},x.kg("toolbarActiveBackground","Toolbar background when holding the mouse over actions")),Os=C("editor.snippetTabstopHighlightBackground",{dark:new h.Q1(new h.bU(124,124,124,.3)),light:new h.Q1(new h.bU(10,50,100,.2)),hcDark:new h.Q1(new h.bU(124,124,124,.3)),hcLight:new h.Q1(new h.bU(10,50,100,.2))},x.kg("snippetTabstopHighlightBackground","Highlight background color of a snippet tabstop.")),bo=C("editor.snippetTabstopHighlightBorder",{dark:null,light:null,hcDark:null,hcLight:null},x.kg("snippetTabstopHighlightBorder","Highlight border color of a snippet tabstop.")),ns=C("editor.snippetFinalTabstopHighlightBackground",{dark:null,light:null,hcDark:null,hcLight:null},x.kg("snippetFinalTabstopHighlightBackground","Highlight background color of the final tabstop of a snippet.")),oo=C("editor.snippetFinalTabstopHighlightBorder",{dark:"#525252",light:new h.Q1(new h.bU(10,50,100,.5)),hcDark:"#525252",hcLight:"#292929"},x.kg("snippetFinalTabstopHighlightBorder","Highlight border color of the final tabstop of a snippet.")),go=C("breadcrumb.foreground",{light:pi(d,.8),dark:pi(d,.8),hcDark:pi(d,.8),hcLight:pi(d,.8)},x.kg("breadcrumbsFocusForeground","Color of focused breadcrumb items.")),Ps=C("breadcrumb.background",{light:nt,dark:nt,hcDark:nt,hcLight:nt},x.kg("breadcrumbsBackground","Background color of breadcrumb items.")),Us=C("breadcrumb.focusForeground",{light:yo(d,.2),dark:ds(d,.1),hcDark:ds(d,.1),hcLight:ds(d,.1)},x.kg("breadcrumbsFocusForeground","Color of focused breadcrumb items.")),Js=C("breadcrumb.activeSelectionForeground",{light:yo(d,.2),dark:ds(d,.1),hcDark:ds(d,.1),hcLight:ds(d,.1)},x.kg("breadcrumbsSelectedForeground","Color of selected breadcrumb items.")),Vs=C("breadcrumbPicker.background",{light:at,dark:at,hcDark:at,hcLight:at},x.kg("breadcrumbsSelectedBackground","Background color of breadcrumb item picker.")),Hr=.5,ad=h.Q1.fromHex("#40C8AE").transparent(Hr),zr=h.Q1.fromHex("#40A6FF").transparent(Hr),la=h.Q1.fromHex("#606060").transparent(.4),Yn=.4,Cs=1,hn=C("merge.currentHeaderBackground",{dark:ad,light:ad,hcDark:null,hcLight:null},x.kg("mergeCurrentHeaderBackground","Current header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),Ir=C("merge.currentContentBackground",{dark:pi(hn,Yn),light:pi(hn,Yn),hcDark:pi(hn,Yn),hcLight:pi(hn,Yn)},x.kg("mergeCurrentContentBackground","Current content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),Nr=C("merge.incomingHeaderBackground",{dark:zr,light:zr,hcDark:null,hcLight:null},x.kg("mergeIncomingHeaderBackground","Incoming header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),Mr=C("merge.incomingContentBackground",{dark:pi(Nr,Yn),light:pi(Nr,Yn),hcDark:pi(Nr,Yn),hcLight:pi(Nr,Yn)},x.kg("mergeIncomingContentBackground","Incoming content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),jo=C("merge.commonHeaderBackground",{dark:la,light:la,hcDark:null,hcLight:null},x.kg("mergeCommonHeaderBackground","Common ancestor header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),Tr=C("merge.commonContentBackground",{dark:pi(jo,Yn),light:pi(jo,Yn),hcDark:pi(jo,Yn),hcLight:pi(jo,Yn)},x.kg("mergeCommonContentBackground","Common ancestor content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),Qs=C("merge.border",{dark:null,light:null,hcDark:"#C3DF6F",hcLight:"#007ACC"},x.kg("mergeBorder","Border color on headers and the splitter in inline merge-conflicts.")),hc=C("editorOverviewRuler.currentContentForeground",{dark:pi(hn,Cs),light:pi(hn,Cs),hcDark:Qs,hcLight:Qs},x.kg("overviewRulerCurrentContentForeground","Current overview ruler foreground for inline merge-conflicts.")),da=C("editorOverviewRuler.incomingContentForeground",{dark:pi(Nr,Cs),light:pi(Nr,Cs),hcDark:Qs,hcLight:Qs},x.kg("overviewRulerIncomingContentForeground","Incoming overview ruler foreground for inline merge-conflicts.")),uc=C("editorOverviewRuler.commonContentForeground",{dark:pi(jo,Cs),light:pi(jo,Cs),hcDark:Qs,hcLight:Qs},x.kg("overviewRulerCommonContentForeground","Common ancestor overview ruler foreground for inline merge-conflicts.")),pr=C("editorOverviewRuler.findMatchForeground",{dark:"#d186167e",light:"#d186167e",hcDark:"#AB5A00",hcLight:""},x.kg("overviewRulerFindMatchForeground","Overview ruler marker color for find matches. The color must not be opaque so as not to hide underlying decorations."),!0),Ur=C("editorOverviewRuler.selectionHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hcDark:"#A0A0A0CC",hcLight:"#A0A0A0CC"},x.kg("overviewRulerSelectionHighlightForeground","Overview ruler marker color for selection highlights. The color must not be opaque so as not to hide underlying decorations."),!0),Ko=C("minimap.findMatchHighlight",{light:"#d18616",dark:"#d18616",hcDark:"#AB5A00",hcLight:"#0F4A85"},x.kg("minimapFindMatchHighlight","Minimap marker color for find matches."),!0),ca=C("minimap.selectionOccurrenceHighlight",{light:"#c9c9c9",dark:"#676767",hcDark:"#ffffff",hcLight:"#0F4A85"},x.kg("minimapSelectionOccurrenceHighlight","Minimap marker color for repeating editor selections."),!0),_r=C("minimap.selectionHighlight",{light:"#ADD6FF",dark:"#264F78",hcDark:"#ffffff",hcLight:"#0F4A85"},x.kg("minimapSelectionHighlight","Minimap marker color for the editor selection."),!0),er=C("minimap.errorHighlight",{dark:new h.Q1(new h.bU(255,18,18,.7)),light:new h.Q1(new h.bU(255,18,18,.7)),hcDark:new h.Q1(new h.bU(255,50,50,1)),hcLight:"#B5200D"},x.kg("minimapError","Minimap marker color for errors.")),ms=C("minimap.warningHighlight",{dark:we,light:we,hcDark:ct,hcLight:ct},x.kg("overviewRuleWarning","Minimap marker color for warnings.")),ha=C("minimap.background",{dark:null,light:null,hcDark:null,hcLight:null},x.kg("minimapBackground","Minimap background color.")),Ia=C("minimap.foregroundOpacity",{dark:h.Q1.fromHex("#000f"),light:h.Q1.fromHex("#000f"),hcDark:h.Q1.fromHex("#000f"),hcLight:h.Q1.fromHex("#000f")},x.kg("minimapForegroundOpacity",'Opacity of foreground elements rendered in the minimap. For example, "#000000c0" will render the elements with 75% opacity.')),vr=C("minimapSlider.background",{light:pi(ei,.5),dark:pi(ei,.5),hcDark:pi(ei,.5),hcLight:pi(ei,.5)},x.kg("minimapSliderBackground","Minimap slider background color.")),wo=C("minimapSlider.hoverBackground",{light:pi(oi,.5),dark:pi(oi,.5),hcDark:pi(oi,.5),hcLight:pi(oi,.5)},x.kg("minimapSliderHoverBackground","Minimap slider background color when hovering.")),No=C("minimapSlider.activeBackground",{light:pi(Li,.5),dark:pi(Li,.5),hcDark:pi(Li,.5),hcLight:pi(Li,.5)},x.kg("minimapSliderActiveBackground","Minimap slider background color when clicked on.")),ro=C("problemsErrorIcon.foreground",{dark:Te,light:Te,hcDark:Te,hcLight:Te},x.kg("problemsErrorIconForeground","The color used for the problems error icon.")),ld=C("problemsWarningIcon.foreground",{dark:we,light:we,hcDark:we,hcLight:we},x.kg("problemsWarningIconForeground","The color used for the problems warning icon.")),dd=C("problemsInfoIcon.foreground",{dark:ut,light:ut,hcDark:ut,hcLight:ut},x.kg("problemsInfoIconForeground","The color used for the problems info icon.")),gc=C("charts.foreground",{dark:d,light:d,hcDark:d,hcLight:d},x.kg("chartsForeground","The foreground color used in charts.")),hl=C("charts.lines",{dark:pi(d,.5),light:pi(d,.5),hcDark:pi(d,.5),hcLight:pi(d,.5)},x.kg("chartsLines","The color used for horizontal lines in charts.")),$o=C("charts.red",{dark:Te,light:Te,hcDark:Te,hcLight:Te},x.kg("chartsRed","The red color used in chart visualizations.")),qs=C("charts.blue",{dark:ut,light:ut,hcDark:ut,hcLight:ut},x.kg("chartsBlue","The blue color used in chart visualizations.")),jr=C("charts.yellow",{dark:we,light:we,hcDark:we,hcLight:we},x.kg("chartsYellow","The yellow color used in chart visualizations.")),ua=C("charts.orange",{dark:Ko,light:Ko,hcDark:Ko,hcLight:Ko},x.kg("chartsOrange","The orange color used in chart visualizations.")),Rr=C("charts.green",{dark:"#89D185",light:"#388A34",hcDark:"#89D185",hcLight:"#374e06"},x.kg("chartsGreen","The green color used in chart visualizations.")),So=C("charts.purple",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},x.kg("chartsPurple","The purple color used in chart visualizations."));function tr(un,Xn){var us,Rs,js;switch(un.op){case 0:return(us=Vo(un.value,Xn))===null||us===void 0?void 0:us.darken(un.factor);case 1:return(Rs=Vo(un.value,Xn))===null||Rs===void 0?void 0:Rs.lighten(un.factor);case 2:return(js=Vo(un.value,Xn))===null||js===void 0?void 0:js.transparent(un.factor);case 3:for(const Zs of un.values){const sr=Vo(Zs,Xn);if(sr)return sr}return;case 5:return Vo(Xn.defines(un.if)?un.then:un.else,Xn);case 4:{const Zs=Vo(un.value,Xn);if(!Zs)return;const sr=Vo(un.background,Xn);return sr?Zs.isDarkerThan(sr)?h.Q1.getLighterColor(Zs,sr,un.factor).transparent(un.transparency):h.Q1.getDarkerColor(Zs,sr,un.factor).transparent(un.transparency):Zs.transparent(un.factor*un.transparency)}default:throw(0,$.xb)(un)}}function yo(un,Xn){return{op:0,value:un,factor:Xn}}function ds(un,Xn){return{op:1,value:un,factor:Xn}}function pi(un,Xn){return{op:2,value:un,factor:Xn}}function Kr(...un){return{op:3,values:un}}function Na(un,Xn,us){return{op:5,if:un,then:Xn,else:us}}function Ma(un,Xn,us,Rs){return{op:4,value:un,background:Xn,factor:us,transparency:Rs}}function Vo(un,Xn){if(un!==null){if(typeof un=="string")return un[0]==="#"?h.Q1.fromHex(un):Xn.getColor(un);if(un instanceof h.Q1)return un;if(typeof un=="object")return tr(un,Xn)}}const ir="vscode://schemas/workbench-colors",nr=Q.O.as(ie.F.JSONContribution);nr.registerSchema(ir,_.getColorSchema());const fo=new I.uC(()=>nr.notifySchemaChanged(ir),200);_.onDidChangeSchema(()=>{fo.isScheduled()||fo.schedule()})},11210:(Tt,Fe,f)=>{f.d(Fe,{$_:()=>B,HT:()=>D,pU:()=>w});var I=f(65958),h=f(26048),te=f(2106),$=f(79359),x=f(37264),ie=f(3765),Q=f(51460),J=f(67167),z=f(89044);const S={IconContribution:"base.contributions.icons"};var _;(function(ce){function pe(ge,fe){let oe=ge.defaults;for(;z.L0.isThemeIcon(oe);){const Z=d.getIcon(oe.id);if(!Z)return;oe=Z.defaults}return oe}ce.getDefinition=pe})(_||(_={}));var y;(function(ce){function pe(fe){return{weight:fe.weight,style:fe.style,src:fe.src.map(oe=>({format:oe.format,location:oe.location.toString()}))}}ce.toJSONObject=pe;function ge(fe){const oe=Z=>(0,$.Kg)(Z)?Z:void 0;if(fe&&Array.isArray(fe.src)&&fe.src.every(Z=>(0,$.Kg)(Z.format)&&(0,$.Kg)(Z.location)))return{weight:oe(fe.weight),style:oe(fe.style),src:fe.src.map(Z=>({format:Z.format,location:x.r.parse(Z.location)}))}}ce.fromJSONObject=ge})(y||(y={}));class C{constructor(){this._onDidChange=new te.vl,this.onDidChange=this._onDidChange.event,this.iconSchema={definitions:{icons:{type:"object",properties:{fontId:{type:"string",description:(0,ie.kg)("iconDefinition.fontId","The id of the font to use. If not set, the font that is defined first is used.")},fontCharacter:{type:"string",description:(0,ie.kg)("iconDefinition.fontCharacter","The font character associated with the icon definition.")}},additionalProperties:!1,defaultSnippets:[{body:{fontCharacter:"\\\\e030"}}]}},type:"object",properties:{}},this.iconReferenceSchema={type:"string",pattern:`^${h.j3.iconNameExpression}$`,enum:[],enumDescriptions:[]},this.iconsById={},this.iconFontsById={}}registerIcon(pe,ge,fe,oe){const Z=this.iconsById[pe];if(Z){if(fe&&!Z.description){Z.description=fe,this.iconSchema.properties[pe].markdownDescription=`${fe} $(${pe})`;const X=this.iconReferenceSchema.enum.indexOf(pe);X!==-1&&(this.iconReferenceSchema.enumDescriptions[X]=fe),this._onDidChange.fire()}return Z}const le={id:pe,description:fe,defaults:ge,deprecationMessage:oe};this.iconsById[pe]=le;const se={$ref:"#/definitions/icons"};return oe&&(se.deprecationMessage=oe),fe&&(se.markdownDescription=`${fe}: $(${pe})`),this.iconSchema.properties[pe]=se,this.iconReferenceSchema.enum.push(pe),this.iconReferenceSchema.enumDescriptions.push(fe||""),this._onDidChange.fire(),{id:pe}}getIcons(){return Object.keys(this.iconsById).map(pe=>this.iconsById[pe])}getIcon(pe){return this.iconsById[pe]}getIconSchema(){return this.iconSchema}toString(){const pe=(Z,le)=>Z.id.localeCompare(le.id),ge=Z=>{for(;z.L0.isThemeIcon(Z.defaults);)Z=this.iconsById[Z.defaults.id];return`codicon codicon-${Z?Z.id:""}`},fe=[];fe.push("| preview | identifier | default codicon ID | description"),fe.push("| ----------- | --------------------------------- | --------------------------------- | --------------------------------- |");const oe=Object.keys(this.iconsById).map(Z=>this.iconsById[Z]);for(const Z of oe.filter(le=>!!le.description).sort(pe))fe.push(`|<i class="${ge(Z)}"></i>|${Z.id}|${z.L0.isThemeIcon(Z.defaults)?Z.defaults.id:Z.id}|${Z.description||""}|`);fe.push("| preview | identifier "),fe.push("| ----------- | --------------------------------- |");for(const Z of oe.filter(le=>!z.L0.isThemeIcon(le.defaults)).sort(pe))fe.push(`|<i class="${ge(Z)}"></i>|${Z.id}|`);return fe.join(` `)}}const d=new C;J.O.add(S.IconContribution,d);function w(ce,pe,ge,fe){return d.registerIcon(ce,pe,ge,fe)}function D(){return d}function L(){for(const ce of h.W6.getAll())d.registerIcon(ce.id,ce.definition,ce.description)}L();const k="vscode://schemas/icons",j=J.O.as(Q.F.JSONContribution);j.registerSchema(k,d.getIconSchema());const N=new I.uC(()=>j.notifySchemaChanged(k),200);d.onDidChange(()=>{N.isScheduled()||N.schedule()});const B=w("widget-close",h.W6.close,(0,ie.kg)("widgetClose","Icon for the close action in widgets.")),T=w("goto-previous-location",h.W6.arrowUp,(0,ie.kg)("previousChangeIcon","Icon for goto previous editor location.")),H=w("goto-next-location",h.W6.arrowDown,(0,ie.kg)("nextChangeIcon","Icon for goto next editor location.")),Y=z.L0.modify(h.W6.sync,"spin"),ee=z.L0.modify(h.W6.loading,"spin")},1597:(Tt,Fe,f)=>{f.d(Fe,{DD:()=>x,Gd:()=>$,IN:()=>ie,KC:()=>h,kg:()=>J});var I=f(4874);function h(z,S){const _=Object.create(null);for(const y in S){const C=S[y];C&&(_[y]=(0,I.n__)(C,z))}return _}function te(z,S,_){function y(){const C=h(z.getColorTheme(),S);typeof _=="function"?_(C):_.style(C)}return y(),z.onDidColorThemeChange(y)}function $(z,S,_){return te(S,{badgeBackground:_?.badgeBackground||I.WMx,badgeForeground:_?.badgeForeground||I.zRE,badgeBorder:I.b1q},z)}function x(z,S,_){return te(S,Object.assign(Object.assign({},ie),_||{}),z)}const ie={listFocusBackground:I.VFX,listFocusForeground:I.efJ,listFocusOutline:I.p7Y,listActiveSelectionBackground:I.Rjz,listActiveSelectionForeground:I.GVV,listActiveSelectionIconForeground:I.fED,listFocusAndSelectionOutline:I.gtq,listFocusAndSelectionBackground:I.Rjz,listFocusAndSelectionForeground:I.GVV,listInactiveSelectionBackground:I.uNx,listInactiveSelectionIconForeground:I.C9U,listInactiveSelectionForeground:I.f4y,listInactiveFocusBackground:I.CQ3,listInactiveFocusOutline:I.ijf,listHoverBackground:I.lO1,listHoverForeground:I.QRv,listDropBackground:I.iAJ,listSelectionOutline:I.buw,listHoverOutline:I.buw,listFilterWidgetBackground:I.pnl,listFilterWidgetOutline:I.fiM,listFilterWidgetNoMatchesOutline:I.P9Z,listFilterWidgetShadow:I.H8q,treeIndentGuidesStroke:I.U4U,tableColumnsBorder:I.k5u,tableOddRowsBackgroundColor:I.sbQ,inputActiveOptionBorder:I.uNK,inputActiveOptionForeground:I.$$0,inputActiveOptionBackground:I.c1f,inputBackground:I.L4c,inputForeground:I.cws,inputBorder:I.Zgs,inputValidationInfoBackground:I.I$A,inputValidationInfoForeground:I.L9Z,inputValidationInfoBorder:I.YSW,inputValidationWarningBackground:I.ULt,inputValidationWarningForeground:I.T5N,inputValidationWarningBorder:I.C1n,inputValidationErrorBackground:I._$n,inputValidationErrorForeground:I.h9z,inputValidationErrorBorder:I.eYZ},Q={shadowColor:I.f9l,borderColor:I.g$2,foregroundColor:I.dd_,backgroundColor:I.c6Y,selectionForegroundColor:I.pmr,selectionBackgroundColor:I.Ux$,selectionBorderColor:I.SNb,separatorColor:I.D7X,scrollbarShadow:I.bXl,scrollbarSliderBackground:I.gnV,scrollbarSliderHoverBackground:I.cI_,scrollbarSliderActiveBackground:I.mhZ};function J(z,S,_){return te(S,Object.assign(Object.assign({},Q),_),z)}},89563:(Tt,Fe,f)=>{f.d(Fe,{Bb:()=>h,HD:()=>te,zM:()=>I});var I;(function($){$.DARK="dark",$.LIGHT="light",$.HIGH_CONTRAST_DARK="hcDark",$.HIGH_CONTRAST_LIGHT="hcLight"})(I||(I={}));function h($){return $===I.HIGH_CONTRAST_DARK||$===I.HIGH_CONTRAST_LIGHT}function te($){return $===I.DARK||$===I.HIGH_CONTRAST_DARK}},89044:(Tt,Fe,f)=>{f.d(Fe,{Fd:()=>y,Gy:()=>Q,L0:()=>S,Pz:()=>_,Yf:()=>z,lR:()=>D,zy:()=>w});var I=f(26048),h=f(2106),te=f(10998),$=f(82399),x=f(67167),ie=f(89563);const Q=(0,$.u1)("themeService");var J;(function(L){function k(j){return j&&typeof j=="object"&&typeof j.id=="string"}L.isThemeColor=k})(J||(J={}));function z(L){return{id:L}}var S;(function(L){function k(ce){return ce&&typeof ce=="object"&&typeof ce.id=="string"&&(typeof ce.color>"u"||J.isThemeColor(ce.color))}L.isThemeIcon=k;const j=new RegExp(`^\\$\\((${I.j3.iconNameExpression}(?:${I.j3.iconModifierExpression})?)\\)$`);function N(ce){const pe=j.exec(ce);if(!pe)return;const[,ge]=pe;return{id:ge}}L.fromString=N;function B(ce){return{id:ce}}L.fromId=B;function T(ce,pe){let ge=ce.id;const fe=ge.lastIndexOf("~");return fe!==-1&&(ge=ge.substring(0,fe)),pe&&(ge=`${ge}~${pe}`),{id:ge}}L.modify=T;function H(ce){const pe=ce.id.lastIndexOf("~");if(pe!==-1)return ce.id.substring(pe+1)}L.getModifier=H;function Y(ce,pe){var ge,fe;return ce.id===pe.id&&((ge=ce.color)===null||ge===void 0?void 0:ge.id)===((fe=pe.color)===null||fe===void 0?void 0:fe.id)}L.isEqual=Y;function ee(ce,pe){return{id:ce.id,color:pe?z(pe):void 0}}L.asThemeIcon=ee,L.asClassNameArray=I.j3.asClassNameArray,L.asClassName=I.j3.asClassName,L.asCSSSelector=I.j3.asCSSSelector})(S||(S={}));function _(L){switch(L){case ie.zM.DARK:return"vs-dark";case ie.zM.HIGH_CONTRAST_DARK:return"hc-black";case ie.zM.HIGH_CONTRAST_LIGHT:return"hc-light";default:return"vs"}}const y={ThemingContribution:"base.contributions.theming"};class C{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new h.vl}onColorThemeChange(k){return this.themingParticipants.push(k),this.onThemingParticipantAddedEmitter.fire(k),(0,te.s)(()=>{const j=this.themingParticipants.indexOf(k);this.themingParticipants.splice(j,1)})}getThemingParticipants(){return this.themingParticipants}}const d=new C;x.O.add(y.ThemingContribution,d);function w(L){return d.onColorThemeChange(L)}class D extends te.jG{constructor(k){super(),this.themeService=k,this.theme=k.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(j=>this.onThemeChange(j)))}onThemeChange(k){this.theme=k,this.updateStyles()}updateStyles(){}}},38803:(Tt,Fe,f)=>{f.d(Fe,{$D:()=>h,I_:()=>$,To:()=>te,Ym:()=>x});var I=f(82399);const h=(0,I.u1)("undoRedoService");class te{constructor(Q,J){this.resource=Q,this.elements=J}}class ${constructor(){this.id=$._ID++,this.order=1}nextOrder(){return this.id===0?0:this.order++}}$._ID=0,$.None=new $;class x{constructor(){this.id=x._ID++,this.order=1}nextOrder(){return this.id===0?0:this.order++}}x._ID=0,x.None=new x},26851:(Tt,Fe,f)=>{f.d(Fe,{Q_:()=>Q,VR:()=>x,jB:()=>ie,kF:()=>S,mX:()=>z});var I=f(3765),h=f(27992),te=f(37264),$=f(82399);const x=(0,$.u1)("contextService");function ie(y){const C=y;return typeof C?.id=="string"&&te.r.isUri(C.uri)}function Q(y){if(y.configuration)return{id:y.id,configPath:y.configuration};if(y.folders.length===1)return{id:y.id,uri:y.folders[0].uri}}class J{constructor(C,d,w,D,L){this._id=C,this._transient=w,this._configuration=D,this._ignorePathCasing=L,this._foldersMap=TernarySearchTree.forUris(this._ignorePathCasing,()=>!0),this.folders=d}get folders(){return this._folders}set folders(C){this._folders=C,this.updateFoldersMap()}get id(){return this._id}get transient(){return this._transient}get configuration(){return this._configuration}set configuration(C){this._configuration=C}getFolder(C){return C&&this._foldersMap.findSubstr(C)||null}updateFoldersMap(){this._foldersMap=TernarySearchTree.forUris(this._ignorePathCasing,()=>!0);for(const C of this.folders)this._foldersMap.set(C.uri,C)}toJSON(){return{id:this.id,folders:this.folders,transient:this.transient,configuration:this.configuration}}}class z{constructor(C,d){this.raw=d,this.uri=C.uri,this.index=C.index,this.name=C.name}toJSON(){return{uri:this.uri,name:this.name,index:this.index}}}const S="code-workspace",_=[{name:(0,I.kg)("codeWorkspace","Code Workspace"),extensions:[S]}]},84657:(Tt,Fe,f)=>{f.d(Fe,{L:()=>h});var I=f(82399);const h=(0,I.u1)("workspaceTrustManagementService")},86287:(Tt,Fe,f)=>{f.r(Fe),f.d(Fe,{completionItemProvider:()=>qD,language:()=>JD,languageConfiguration:()=>$D});var I=f(94828);/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/var h=Object.defineProperty,te=Object.getOwnPropertyDescriptor,$=Object.getOwnPropertyNames,x=Object.prototype.hasOwnProperty,ie=(u,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of $(e))!x.call(u,s)&&s!==t&&h(u,s,{get:()=>e[s],enumerable:!(i=te(e,s))||i.enumerable});return u},Q=(u,e,t)=>(ie(u,e,"default"),t&&ie(t,e,"default")),J={};Q(J,I);var z={},S={},_=class{static getOrCreate(u){return S[u]||(S[u]=new _(u)),S[u]}_languageId;_loadingTriggered;_lazyLoadPromise;_lazyLoadPromiseResolve;_lazyLoadPromiseReject;constructor(u){this._languageId=u,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((e,t)=>{this._lazyLoadPromiseResolve=e,this._lazyLoadPromiseReject=t})}load(){return this._loadingTriggered||(this._loadingTriggered=!0,z[this._languageId].loader().then(u=>this._lazyLoadPromiseResolve(u),u=>this._lazyLoadPromiseReject(u))),this._lazyLoadPromise}};async function y(u){await _.getOrCreate(u).load(),J.editor.createModel("",u).dispose()}function C(u){const e=u.id;z[e]=u,J.languages.register(u);const t=_.getOrCreate(e);J.languages.registerTokensProviderFactory(e,{create:async()=>(await t.load()).language}),J.languages.onLanguage(e,async()=>{const i=await t.load();J.languages.setLanguageConfiguration(e,i.conf)})}/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"abap",extensions:[".abap"],aliases:["abap","ABAP"],loader:()=>f.e(1420).then(f.bind(f,21420))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"apex",extensions:[".cls"],aliases:["Apex","apex"],mimetypes:["text/x-apex-source","text/x-apex"],loader:()=>f.e(7048).then(f.bind(f,67048))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"azcli",extensions:[".azcli"],aliases:["Azure CLI","azcli"],loader:()=>f.e(3622).then(f.bind(f,3622))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],loader:()=>f.e(6185).then(f.bind(f,88566))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"bicep",extensions:[".bicep"],aliases:["Bicep"],loader:()=>f.e(9510).then(f.bind(f,29510))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"cameligo",extensions:[".mligo"],aliases:["Cameligo"],loader:()=>f.e(4334).then(f.bind(f,94334))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"clojure",extensions:[".clj",".cljs",".cljc",".edn"],aliases:["clojure","Clojure"],loader:()=>f.e(9150).then(f.bind(f,89150))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],loader:()=>f.e(968).then(f.bind(f,10968))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"c",extensions:[".c",".h"],aliases:["C","c"],loader:()=>f.e(6018).then(f.bind(f,26018))}),C({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],loader:()=>f.e(6018).then(f.bind(f,26018))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"csharp",extensions:[".cs",".csx",".cake"],aliases:["C#","csharp"],loader:()=>f.e(9038).then(f.bind(f,69038))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"csp",extensions:[],aliases:["CSP","csp"],loader:()=>f.e(1446).then(f.bind(f,21446))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:()=>f.e(4958).then(f.bind(f,34958))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"cypher",extensions:[".cypher",".cyp"],aliases:["Cypher","OpenCypher"],loader:()=>f.e(494).then(f.bind(f,10494))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"dart",extensions:[".dart"],aliases:["Dart","dart"],mimetypes:["text/x-dart-source","text/x-dart"],loader:()=>f.e(3062).then(f.bind(f,53062))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],loader:()=>f.e(2692).then(f.bind(f,82692))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"ecl",extensions:[".ecl"],aliases:["ECL","Ecl","ecl"],loader:()=>f.e(2278).then(f.bind(f,2278))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:()=>f.e(1710).then(f.bind(f,91710))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"flow9",extensions:[".flow"],aliases:["Flow9","Flow","flow9","flow"],loader:()=>f.e(1345).then(f.bind(f,91345))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"fsharp",extensions:[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],loader:()=>f.e(2244).then(f.bind(f,12244))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"freemarker2",extensions:[".ftl",".ftlh",".ftlx"],aliases:["FreeMarker2","Apache FreeMarker2"],loader:()=>f.e(2094).then(f.bind(f,22094)).then(u=>u.TagAutoInterpolationDollar)}),C({id:"freemarker2.tag-angle.interpolation-dollar",aliases:["FreeMarker2 (Angle/Dollar)","Apache FreeMarker2 (Angle/Dollar)"],loader:()=>f.e(2094).then(f.bind(f,22094)).then(u=>u.TagAngleInterpolationDollar)}),C({id:"freemarker2.tag-bracket.interpolation-dollar",aliases:["FreeMarker2 (Bracket/Dollar)","Apache FreeMarker2 (Bracket/Dollar)"],loader:()=>f.e(2094).then(f.bind(f,22094)).then(u=>u.TagBracketInterpolationDollar)}),C({id:"freemarker2.tag-angle.interpolation-bracket",aliases:["FreeMarker2 (Angle/Bracket)","Apache FreeMarker2 (Angle/Bracket)"],loader:()=>f.e(2094).then(f.bind(f,22094)).then(u=>u.TagAngleInterpolationBracket)}),C({id:"freemarker2.tag-bracket.interpolation-bracket",aliases:["FreeMarker2 (Bracket/Bracket)","Apache FreeMarker2 (Bracket/Bracket)"],loader:()=>f.e(2094).then(f.bind(f,22094)).then(u=>u.TagBracketInterpolationBracket)}),C({id:"freemarker2.tag-auto.interpolation-dollar",aliases:["FreeMarker2 (Auto/Dollar)","Apache FreeMarker2 (Auto/Dollar)"],loader:()=>f.e(2094).then(f.bind(f,22094)).then(u=>u.TagAutoInterpolationDollar)}),C({id:"freemarker2.tag-auto.interpolation-bracket",aliases:["FreeMarker2 (Auto/Bracket)","Apache FreeMarker2 (Auto/Bracket)"],loader:()=>f.e(2094).then(f.bind(f,22094)).then(u=>u.TagAutoInterpolationBracket)});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"go",extensions:[".go"],aliases:["Go"],loader:()=>f.e(5364).then(f.bind(f,25364))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"graphql",extensions:[".graphql",".gql"],aliases:["GraphQL","graphql","gql"],mimetypes:["application/graphql"],loader:()=>f.e(8902).then(f.bind(f,78902))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"handlebars",extensions:[".handlebars",".hbs"],aliases:["Handlebars","handlebars","hbs"],mimetypes:["text/x-handlebars-template"],loader:()=>f.e(7836).then(f.bind(f,97836))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"hcl",extensions:[".tf",".tfvars",".hcl"],aliases:["Terraform","tf","HCL","hcl"],loader:()=>f.e(9838).then(f.bind(f,89838))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({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:()=>f.e(2658).then(f.bind(f,92658))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"ini",extensions:[".ini",".properties",".gitconfig"],filenames:["config",".gitattributes",".gitconfig",".editorconfig"],aliases:["Ini","ini"],loader:()=>f.e(8542).then(f.bind(f,68542))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"java",extensions:[".java",".jav"],aliases:["Java","java"],mimetypes:["text/x-java-source","text/x-java"],loader:()=>f.e(7200).then(f.bind(f,77200))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"javascript",extensions:[".js",".es6",".jsx",".mjs",".cjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:()=>f.e(5550).then(f.bind(f,65550))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"julia",extensions:[".jl"],aliases:["julia","Julia"],loader:()=>f.e(2962).then(f.bind(f,42962))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"kotlin",extensions:[".kt"],aliases:["Kotlin","kotlin"],mimetypes:["text/x-kotlin-source","text/x-kotlin"],loader:()=>f.e(8566).then(f.bind(f,28566))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"less",extensions:[".less"],aliases:["Less","less"],mimetypes:["text/x-less","text/less"],loader:()=>f.e(1122).then(f.bind(f,1122))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"lexon",extensions:[".lex"],aliases:["Lexon"],loader:()=>f.e(5130).then(f.bind(f,82749))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"lua",extensions:[".lua"],aliases:["Lua","lua"],loader:()=>f.e(4114).then(f.bind(f,64114))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"liquid",extensions:[".liquid",".html.liquid"],aliases:["Liquid","liquid"],mimetypes:["application/liquid"],loader:()=>f.e(3096).then(f.bind(f,83096))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"m3",extensions:[".m3",".i3",".mg",".ig"],aliases:["Modula-3","Modula3","modula3","m3"],loader:()=>f.e(4120).then(f.bind(f,4120))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],loader:()=>f.e(9390).then(f.bind(f,29390))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"mips",extensions:[".s"],aliases:["MIPS","MIPS-V"],mimetypes:["text/x-mips","text/mips","text/plaintext"],loader:()=>f.e(398).then(f.bind(f,70398))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"msdax",extensions:[".dax",".msdax"],aliases:["DAX","MSDAX"],loader:()=>f.e(5786).then(f.bind(f,25786))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"mysql",extensions:[],aliases:["MySQL","mysql"],loader:()=>f.e(7466).then(f.bind(f,77466))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"objective-c",extensions:[".m"],aliases:["Objective-C"],loader:()=>f.e(2686).then(f.bind(f,32686))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"pascal",extensions:[".pas",".p",".pp"],aliases:["Pascal","pas"],mimetypes:["text/x-pascal-source","text/x-pascal"],loader:()=>f.e(6940).then(f.bind(f,56940))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"pascaligo",extensions:[".ligo"],aliases:["Pascaligo","ligo"],loader:()=>f.e(8230).then(f.bind(f,28230))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"perl",extensions:[".pl"],aliases:["Perl","pl"],loader:()=>f.e(7886).then(f.bind(f,57886))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"pgsql",extensions:[],aliases:["PostgreSQL","postgres","pg","postgre"],loader:()=>f.e(3182).then(f.bind(f,43182))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],mimetypes:["application/x-php"],loader:()=>f.e(6302).then(f.bind(f,33921))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"pla",extensions:[".pla"],loader:()=>f.e(8390).then(f.bind(f,98390))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"postiats",extensions:[".dats",".sats",".hats"],aliases:["ATS","ATS/Postiats"],loader:()=>f.e(198).then(f.bind(f,70198))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"powerquery",extensions:[".pq",".pqm"],aliases:["PQ","M","Power Query","Power Query M"],loader:()=>f.e(4209).then(f.bind(f,26590))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"powershell",extensions:[".ps1",".psm1",".psd1"],aliases:["PowerShell","powershell","ps","ps1"],loader:()=>f.e(4698).then(f.bind(f,24698))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"proto",extensions:[".proto"],aliases:["protobuf","Protocol Buffers"],loader:()=>f.e(1118).then(f.bind(f,21118))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"pug",extensions:[".jade",".pug"],aliases:["Pug","Jade","jade"],loader:()=>f.e(970).then(f.bind(f,30970))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",loader:()=>f.e(5196).then(f.bind(f,45196))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"qsharp",extensions:[".qs"],aliases:["Q#","qsharp"],loader:()=>f.e(5618).then(f.bind(f,25618))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"r",extensions:[".r",".rhistory",".rmd",".rprofile",".rt"],aliases:["R","r"],loader:()=>f.e(205).then(f.bind(f,92586))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"razor",extensions:[".cshtml"],aliases:["Razor","razor"],mimetypes:["text/x-cshtml"],loader:()=>f.e(946).then(f.bind(f,80946))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"redis",extensions:[".redis"],aliases:["redis"],loader:()=>f.e(8990).then(f.bind(f,88990))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"redshift",extensions:[],aliases:["Redshift","redshift"],loader:()=>f.e(558).then(f.bind(f,70558))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"restructuredtext",extensions:[".rst"],aliases:["reStructuredText","restructuredtext"],loader:()=>f.e(7246).then(f.bind(f,67246))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"ruby",extensions:[".rb",".rbx",".rjs",".gemspec",".pp"],filenames:["rakefile","Gemfile"],aliases:["Ruby","rb"],loader:()=>f.e(1560).then(f.bind(f,1560))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"rust",extensions:[".rs",".rlib"],aliases:["Rust","rust"],loader:()=>f.e(4680).then(f.bind(f,44680))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"sb",extensions:[".sb"],aliases:["Small Basic","sb"],loader:()=>f.e(4962).then(f.bind(f,44962))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({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:()=>f.e(6446).then(f.bind(f,66446))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"scheme",extensions:[".scm",".ss",".sch",".rkt"],aliases:["scheme","Scheme"],loader:()=>f.e(8494).then(f.bind(f,78494))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"scss",extensions:[".scss"],aliases:["Sass","sass","scss"],mimetypes:["text/x-scss","text/scss"],loader:()=>f.e(1888).then(f.bind(f,11888))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"shell",extensions:[".sh",".bash"],aliases:["Shell","sh"],loader:()=>f.e(9034).then(f.bind(f,89034))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"sol",extensions:[".sol"],aliases:["sol","solidity","Solidity"],loader:()=>f.e(3042).then(f.bind(f,83042))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"aes",extensions:[".aes"],aliases:["aes","sophia","Sophia"],loader:()=>f.e(8332).then(f.bind(f,68332))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"sparql",extensions:[".rq"],aliases:["sparql","SPARQL"],loader:()=>f.e(1282).then(f.bind(f,61282))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"sql",extensions:[".sql"],aliases:["SQL"],loader:()=>f.e(1914).then(f.bind(f,21914))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"st",extensions:[".st",".iecst",".iecplc",".lc3lib"],aliases:["StructuredText","scl","stl"],loader:()=>f.e(8334).then(f.bind(f,38334))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"swift",aliases:["Swift","swift"],extensions:[".swift"],mimetypes:["text/swift"],loader:()=>f.e(4630).then(f.bind(f,24630))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"systemverilog",extensions:[".sv",".svh"],aliases:["SV","sv","SystemVerilog","systemverilog"],loader:()=>f.e(2398).then(f.bind(f,40017))}),C({id:"verilog",extensions:[".v",".vh"],aliases:["V","v","Verilog","verilog"],loader:()=>f.e(2398).then(f.bind(f,40017))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"tcl",extensions:[".tcl"],aliases:["tcl","Tcl","tcltk","TclTk","tcl/tk","Tcl/Tk"],loader:()=>f.e(6414).then(f.bind(f,26414))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"twig",extensions:[".twig"],aliases:["Twig","twig"],mimetypes:["text/x-twig"],loader:()=>f.e(2586).then(f.bind(f,22586))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"typescript",extensions:[".ts",".tsx"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:()=>f.e(6830).then(f.bind(f,86830))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"vb",extensions:[".vb"],aliases:["Visual Basic","vb"],loader:()=>f.e(1740).then(f.bind(f,41740))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"xml",extensions:[".xml",".dtd",".ascx",".csproj",".config",".wxi",".wxl",".wxs",".xaml",".svg",".svgz",".opf",".xsl"],firstLine:"(\\<\\?xml.*)|(\\<svg)|(\\<\\!doctype\\s+svg)",aliases:["XML","xml"],mimetypes:["text/xml","application/xml","application/xaml+xml","application/xml-dtd"],loader:()=>f.e(1438).then(f.bind(f,1438))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/C({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml","text/x-yaml"],loader:()=>f.e(6990).then(f.bind(f,26990))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*//*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/var d=Object.defineProperty,w=Object.getOwnPropertyDescriptor,D=Object.getOwnPropertyNames,L=Object.prototype.hasOwnProperty,k=(u,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of D(e))!L.call(u,s)&&s!==t&&d(u,s,{get:()=>e[s],enumerable:!(i=w(e,s))||i.enumerable});return u},j=(u,e,t)=>(k(u,e,"default"),t&&k(t,e,"default")),N={};j(N,I);var B=class{_onDidChange=new N.Emitter;_options;_modeConfiguration;_languageId;constructor(u,e,t){this._languageId=u,this.setOptions(e),this.setModeConfiguration(t)}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(u){this._options=u||Object.create(null),this._onDidChange.fire(this)}setDiagnosticsOptions(u){this.setOptions(u)}setModeConfiguration(u){this._modeConfiguration=u||Object.create(null),this._onDidChange.fire(this)}},T={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}},H={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},Y=new B("css",T,H),ee=new B("scss",T,H),ce=new B("less",T,H);N.languages.css={cssDefaults:Y,lessDefaults:ce,scssDefaults:ee};function pe(){return f.e(2745).then(f.bind(f,52745))}N.languages.onLanguage("less",()=>{pe().then(u=>u.setupMode(ce))}),N.languages.onLanguage("scss",()=>{pe().then(u=>u.setupMode(ee))}),N.languages.onLanguage("css",()=>{pe().then(u=>u.setupMode(Y))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/var ge=Object.defineProperty,fe=Object.getOwnPropertyDescriptor,oe=Object.getOwnPropertyNames,Z=Object.prototype.hasOwnProperty,le=(u,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of oe(e))!Z.call(u,s)&&s!==t&&ge(u,s,{get:()=>e[s],enumerable:!(i=fe(e,s))||i.enumerable});return u},se=(u,e,t)=>(le(u,e,"default"),t&&le(t,e,"default")),X={};se(X,I);var K=class{_onDidChange=new X.Emitter;_options;_modeConfiguration;_languageId;constructor(u,e,t){this._languageId=u,this.setOptions(e),this.setModeConfiguration(t)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get options(){return this._options}get modeConfiguration(){return this._modeConfiguration}setOptions(u){this._options=u||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(u){this._modeConfiguration=u||Object.create(null),this._onDidChange.fire(this)}},he={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"},ve={format:he,suggest:{},data:{useDefaultDataProvider:!0}};function Ee(u){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:u===O,documentFormattingEdits:u===O,documentRangeFormattingEdits:u===O}}var O="html",ot="handlebars",lt="razor",We=rt(O,ve,Ee(O)),Ke=We.defaults,De=rt(ot,ve,Ee(ot)),Pe=De.defaults,Ue=rt(lt,ve,Ee(lt)),Re=Ue.defaults;X.languages.html={htmlDefaults:Ke,razorDefaults:Re,handlebarDefaults:Pe,htmlLanguageService:We,handlebarLanguageService:De,razorLanguageService:Ue,registerHTMLLanguageService:rt};function et(){return f.e(2077).then(f.bind(f,72077))}function rt(u,e=ve,t=Ee(u)){const i=new K(u,e,t);let s;const o=X.languages.onLanguage(u,async()=>{s=(await et()).setupMode(i)});return{defaults:i,dispose(){o.dispose(),s?.dispose(),s=void 0}}}/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/var Lt=Object.defineProperty,Dt=Object.getOwnPropertyDescriptor,xt=Object.getOwnPropertyNames,Ie=Object.prototype.hasOwnProperty,dt=(u,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of xt(e))!Ie.call(u,s)&&s!==t&&Lt(u,s,{get:()=>e[s],enumerable:!(i=Dt(e,s))||i.enumerable});return u},ft=(u,e,t)=>(dt(u,e,"default"),t&&dt(t,e,"default")),Bt={};ft(Bt,I);var jt=class{_onDidChange=new Bt.Emitter;_diagnosticsOptions;_modeConfiguration;_languageId;constructor(u,e,t){this._languageId=u,this.setDiagnosticsOptions(e),this.setModeConfiguration(t)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(u){this._diagnosticsOptions=u||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(u){this._modeConfiguration=u||Object.create(null),this._onDidChange.fire(this)}},pt={validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},bt={documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},zt=new jt("json",pt,bt);Bt.languages.json={jsonDefaults:zt};function ii(){return f.e(4839).then(f.bind(f,44839))}Bt.languages.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]}),Bt.languages.onLanguage("json",()=>{ii().then(u=>u.setupMode(zt))});var vi=f(19664),Ze=f(72521),_t=f(70651),At=f(648),ei=f(16878),oi=f(59407),Li=f(90028),zi=f(68387),Di=f(80978),Te=f(50946),ki=f(93702),ze=f(38122),we=f(3765),ct=f(96655),Oe=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},ut=function(u,e){return function(t,i){e(t,i,u)}},Zt=function(u,e,t,i){function s(o){return o instanceof t?o:new t(function(c){c(o)})}return new(t||(t=Promise))(function(o,c){function m(W){try{U(i.next(W))}catch(re){c(re)}}function A(W){try{U(i.throw(W))}catch(re){c(re)}}function U(W){W.done?o(W.value):s(W.value).then(m,A)}U((i=i.apply(u,e||[])).next())})};const Ci=new ct.N1("selectionAnchorSet",!1);let Ki=class sC{constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=Ci.bindTo(t),this.modelChangeListener=e.onDidChangeModel(()=>this.selectionAnchorSetContextKey.reset())}static get(e){return e.getContribution(sC.ID)}setSelectionAnchor(){if(this.editor.hasModel()){const e=this.editor.getPosition();this.editor.changeDecorations(t=>{this.decorationId&&t.removeDecoration(this.decorationId),this.decorationId=t.addDecoration(ki.L.fromPositions(e,e),{description:"selection-anchor",stickiness:1,hoverMessage:new Li.Bc().appendText((0,we.kg)("selectionAnchor","Selection Anchor")),className:"selection-anchor"})}),this.selectionAnchorSetContextKey.set(!!this.decorationId),(0,oi.xE)((0,we.kg)("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 t=this.editor.getPosition();this.editor.setSelection(ki.L.fromPositions(e.getStartPosition(),t)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){if(this.decorationId){const e=this.decorationId;this.editor.changeDecorations(t=>{t.removeDecoration(e),this.decorationId=void 0}),this.selectionAnchorSetContextKey.set(!1)}}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};Ki.ID="editor.contrib.selectionAnchorController",Ki=Oe([ut(1,ct.fN)],Ki);class Ln extends Te.ks{constructor(){super({id:"editor.action.setSelectionAnchor",label:(0,we.kg)("setSelectionAnchor","Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:ze.R.editorTextFocus,primary:(0,zi.m5)(2089,2080),weight:100}})}run(e,t){var i;return Zt(this,void 0,void 0,function*(){(i=Ki.get(t))===null||i===void 0||i.setSelectionAnchor()})}}class nt extends Te.ks{constructor(){super({id:"editor.action.goToSelectionAnchor",label:(0,we.kg)("goToSelectionAnchor","Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:Ci})}run(e,t){var i;return Zt(this,void 0,void 0,function*(){(i=Ki.get(t))===null||i===void 0||i.goToSelectionAnchor()})}}class Ct extends Te.ks{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:(0,we.kg)("selectFromAnchorToCursor","Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:Ci,kbOpts:{kbExpr:ze.R.editorTextFocus,primary:(0,zi.m5)(2089,2089),weight:100}})}run(e,t){var i;return Zt(this,void 0,void 0,function*(){(i=Ki.get(t))===null||i===void 0||i.selectFromAnchorToCursor()})}}class Qt extends Te.ks{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:(0,we.kg)("cancelSelectionAnchor","Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:Ci,kbOpts:{kbExpr:ze.R.editorTextFocus,primary:9,weight:100}})}run(e,t){var i;return Zt(this,void 0,void 0,function*(){(i=Ki.get(t))===null||i===void 0||i.cancelSelectionAnchor()})}}(0,Te.HW)(Ki.ID,Ki),(0,Te.Fl)(Ln),(0,Te.Fl)(nt),(0,Te.Fl)(Ct),(0,Te.Fl)(Qt);var Ot=f(65958),at=f(10998),Yi=f(45088),bi=f(15365),St=f(28061),bn=f(66055),sn=f(59922),ni=f(48295),xe=f(58067),Ce=f(4874),Ye=f(89044);const Rt=(0,Ce.x1A)("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hcDark:"#A0A0A0",hcLight:"#A0A0A0"},we.kg("overviewRulerBracketMatchForeground","Overview ruler marker color for matching brackets."));class Vt extends Te.ks{constructor(){super({id:"editor.action.jumpToBracket",label:we.kg("smartSelect.jumpBracket","Go to Bracket"),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:ze.R.editorTextFocus,primary:3160,weight:100}})}run(e,t){var i;(i=fi.get(t))===null||i===void 0||i.jumpToBracket()}}class Gt extends Te.ks{constructor(){super({id:"editor.action.selectToBracket",label:we.kg("smartSelect.selectToBracket","Select to Bracket"),alias:"Select to Bracket",precondition:void 0,description:{description:"Select to Bracket",args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(e,t,i){var s;let o=!0;i&&i.selectBrackets===!1&&(o=!1),(s=fi.get(t))===null||s===void 0||s.selectToBracket(o)}}class ri{constructor(e,t,i){this.position=e,this.brackets=t,this.options=i}}class fi extends at.jG{constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=this._editor.createDecorationsCollection(),this._updateBracketsSoon=this._register(new Ot.uC(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(66),this._updateBracketsSoon.schedule(),this._register(e.onDidChangeCursorPosition(t=>{this._matchBrackets!=="never"&&this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelContent(t=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModel(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelLanguageConfiguration(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeConfiguration(t=>{t.hasChanged(66)&&(this._matchBrackets=this._editor.getOption(66),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()}))}static get(e){return e.getContribution(fi.ID)}jumpToBracket(){if(!this._editor.hasModel())return;const e=this._editor.getModel(),t=this._editor.getSelections().map(i=>{const s=i.getStartPosition(),o=e.bracketPairs.matchBracket(s);let c=null;if(o)o[0].containsPosition(s)&&!o[1].containsPosition(s)?c=o[1].getStartPosition():o[1].containsPosition(s)&&(c=o[0].getStartPosition());else{const m=e.bracketPairs.findEnclosingBrackets(s);if(m)c=m[1].getStartPosition();else{const A=e.bracketPairs.findNextBracket(s);A&&A.range&&(c=A.range.getStartPosition())}}return c?new ki.L(c.lineNumber,c.column,c.lineNumber,c.column):new ki.L(s.lineNumber,s.column,s.lineNumber,s.column)});this._editor.setSelections(t),this._editor.revealRange(t[0])}selectToBracket(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),i=[];this._editor.getSelections().forEach(s=>{const o=s.getStartPosition();let c=t.bracketPairs.matchBracket(o);if(!c&&(c=t.bracketPairs.findEnclosingBrackets(o),!c)){const U=t.bracketPairs.findNextBracket(o);U&&U.range&&(c=t.bracketPairs.matchBracket(U.range.getStartPosition()))}let m=null,A=null;if(c){c.sort(St.Q.compareRangesUsingStarts);const[U,W]=c;if(m=e?U.getStartPosition():U.getEndPosition(),A=e?W.getEndPosition():W.getStartPosition(),W.containsPosition(o)){const re=m;m=A,A=re}}m&&A&&i.push(new ki.L(m.lineNumber,m.column,A.lineNumber,A.column))}),i.length>0&&(this._editor.setSelections(i),this._editor.revealRange(i[0]))}_updateBrackets(){if(this._matchBrackets==="never")return;this._recomputeBrackets();const e=[];let t=0;for(const i of this._lastBracketsData){const s=i.brackets;s&&(e[t++]={range:s[0],options:i.options},e[t++]={range:s[1],options:i.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 t=this._editor.getModel(),i=t.getVersionId();let s=[];this._lastVersionId===i&&(s=this._lastBracketsData);const o=[];let c=0;for(let re=0,Se=e.length;re<Se;re++){const Be=e[re];Be.isEmpty()&&(o[c++]=Be.getStartPosition())}o.length>1&&o.sort(bi.y.compare);const m=[];let A=0,U=0;const W=s.length;for(let re=0,Se=o.length;re<Se;re++){const Be=o[re];for(;U<W&&s[U].position.isBefore(Be);)U++;if(U<W&&s[U].position.equals(Be))m[A++]=s[U];else{let Qe=t.bracketPairs.matchBracket(Be,20),tt=fi._DECORATION_OPTIONS_WITH_OVERVIEW_RULER;!Qe&&this._matchBrackets==="always"&&(Qe=t.bracketPairs.findEnclosingBrackets(Be,20),tt=fi._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER),m[A++]=new ri(Be,Qe,tt)}}this._lastBracketsData=m,this._lastVersionId=i}}fi.ID="editor.contrib.bracketMatchingController",fi._DECORATION_OPTIONS_WITH_OVERVIEW_RULER=sn.kI.register({description:"bracket-match-overview",stickiness:1,className:"bracket-match",overviewRuler:{color:(0,Ye.Yf)(Rt),position:bn.A5.Center}}),fi._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER=sn.kI.register({description:"bracket-match-no-overview",stickiness:1,className:"bracket-match"}),(0,Te.HW)(fi.ID,fi),(0,Te.Fl)(Gt),(0,Te.Fl)(Vt),(0,Ye.zy)((u,e)=>{const t=u.getColor(ni.RU);t&&e.addRule(`.monaco-editor .bracket-match { background-color: ${t}; }`);const i=u.getColor(ni.$u);i&&e.addRule(`.monaco-editor .bracket-match { border: 1px solid ${i}; }`)}),xe.ZG.appendMenuItem(xe.D8.MenubarGoMenu,{group:"5_infile_nav",command:{id:"editor.action.jumpToBracket",title:we.kg({key:"miGoToBracket",comment:["&& denotes a mnemonic"]},"Go to &&Bracket")},order:2});class di{constructor(e,t){this._selection=e,this._isMovingLeft=t}getEditOperations(e,t){if(this._selection.startLineNumber!==this._selection.endLineNumber||this._selection.isEmpty())return;const i=this._selection.startLineNumber,s=this._selection.startColumn,o=this._selection.endColumn;if(!(this._isMovingLeft&&s===1)&&!(!this._isMovingLeft&&o===e.getLineMaxColumn(i)))if(this._isMovingLeft){const c=new St.Q(i,s-1,i,s),m=e.getValueInRange(c);t.addEditOperation(c,null),t.addEditOperation(new St.Q(i,o,i,o),m)}else{const c=new St.Q(i,o,i,o+1),m=e.getValueInRange(c);t.addEditOperation(c,null),t.addEditOperation(new St.Q(i,s,i,s),m)}}computeCursorState(e,t){return this._isMovingLeft?new ki.L(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new ki.L(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}}class Jt extends Te.ks{constructor(e,t){super(t),this.left=e}run(e,t){if(!t.hasModel())return;const i=[],s=t.getSelections();for(const o of s)i.push(new di(o,this.left));t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop()}}class ai extends Jt{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:we.kg("caret.moveLeft","Move Selected Text Left"),alias:"Move Selected Text Left",precondition:ze.R.writable})}}class Ei extends Jt{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:we.kg("caret.moveRight","Move Selected Text Right"),alias:"Move Selected Text Right",precondition:ze.R.writable})}}(0,Te.Fl)(ai),(0,Te.Fl)(Ei);var wi=f(66316),Ai=f(50572);class Ni extends Te.ks{constructor(){super({id:"editor.action.transposeLetters",label:we.kg("transposeLetters.label","Transpose Letters"),alias:"Transpose Letters",precondition:ze.R.writable,kbOpts:{kbExpr:ze.R.textInputFocus,primary:0,mac:{primary:306},weight:100}})}run(e,t){if(!t.hasModel())return;const i=t.getModel(),s=[],o=t.getSelections();for(const c of o){if(!c.isEmpty())continue;const m=c.startLineNumber,A=c.startColumn,U=i.getLineMaxColumn(m);if(m===1&&(A===1||A===2&&U===2))continue;const W=A===U?c.getPosition():Ai.I.rightPosition(i,c.getPosition().lineNumber,c.getPosition().column),re=Ai.I.leftPosition(i,W),Se=Ai.I.leftPosition(i,re),Be=i.getValueInRange(St.Q.fromPositions(Se,re)),Qe=i.getValueInRange(St.Q.fromPositions(re,W)),tt=St.Q.fromPositions(Se,W);s.push(new wi.iu(tt,Qe+Be))}s.length>0&&(t.pushUndoStop(),t.executeCommands(this.id,s),t.pushUndoStop())}}(0,Te.Fl)(Ni);var qi=f(55893),Pi=f(63339),gn=f(93344),Gi=f(87301),Oi=f(3338),Fi=function(u,e,t,i){function s(o){return o instanceof t?o:new t(function(c){c(o)})}return new(t||(t=Promise))(function(o,c){function m(W){try{U(i.next(W))}catch(re){c(re)}}function A(W){try{U(i.throw(W))}catch(re){c(re)}}function U(W){W.done?o(W.value):s(W.value).then(m,A)}U((i=i.apply(u,e||[])).next())})};const Bi="9_cutcopypaste",rn=Pi.ib||document.queryCommandSupported("cut"),_i=Pi.ib||document.queryCommandSupported("copy"),jn=typeof navigator.clipboard>"u"||qi.isFirefox?document.queryCommandSupported("paste"):!0;function Wn(u){return u.register(),u}const xn=rn?Wn(new Te.fE({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:Pi.ib?{primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:xe.D8.MenubarEditMenu,group:"2_ccp",title:we.kg({key:"miCut",comment:["&& denotes a mnemonic"]},"Cu&&t"),order:1},{menuId:xe.D8.EditorContext,group:Bi,title:we.kg("actions.clipboard.cutLabel","Cut"),when:ze.R.writable,order:1},{menuId:xe.D8.CommandPalette,group:"",title:we.kg("actions.clipboard.cutLabel","Cut"),order:1},{menuId:xe.D8.SimpleEditorContext,group:Bi,title:we.kg("actions.clipboard.cutLabel","Cut"),when:ze.R.writable,order:1}]})):void 0,Rn=_i?Wn(new Te.fE({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:Pi.ib?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:xe.D8.MenubarEditMenu,group:"2_ccp",title:we.kg({key:"miCopy",comment:["&& denotes a mnemonic"]},"&&Copy"),order:2},{menuId:xe.D8.EditorContext,group:Bi,title:we.kg("actions.clipboard.copyLabel","Copy"),order:2},{menuId:xe.D8.CommandPalette,group:"",title:we.kg("actions.clipboard.copyLabel","Copy"),order:1},{menuId:xe.D8.SimpleEditorContext,group:Bi,title:we.kg("actions.clipboard.copyLabel","Copy"),order:2}]})):void 0;xe.ZG.appendMenuItem(xe.D8.MenubarEditMenu,{submenu:xe.D8.MenubarCopy,title:{value:we.kg("copy as","Copy As"),original:"Copy As"},group:"2_ccp",order:3}),xe.ZG.appendMenuItem(xe.D8.EditorContext,{submenu:xe.D8.EditorContextCopy,title:{value:we.kg("copy as","Copy As"),original:"Copy As"},group:Bi,order:3}),xe.ZG.appendMenuItem(xe.D8.EditorContext,{submenu:xe.D8.EditorContextShare,title:{value:we.kg("share","Share"),original:"Share"},group:"11_share",order:-1});const $i=jn?Wn(new Te.fE({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:Pi.ib?{primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]},weight:100}:void 0,menuOpts:[{menuId:xe.D8.MenubarEditMenu,group:"2_ccp",title:we.kg({key:"miPaste",comment:["&& denotes a mnemonic"]},"&&Paste"),order:4},{menuId:xe.D8.EditorContext,group:Bi,title:we.kg("actions.clipboard.pasteLabel","Paste"),when:ze.R.writable,order:4},{menuId:xe.D8.CommandPalette,group:"",title:we.kg("actions.clipboard.pasteLabel","Paste"),order:1},{menuId:xe.D8.SimpleEditorContext,group:Bi,title:we.kg("actions.clipboard.pasteLabel","Paste"),when:ze.R.writable,order:4}]})):void 0;class Nn extends Te.ks{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:we.kg("actions.clipboard.copyWithSyntaxHighlightingLabel","Copy With Syntax Highlighting"),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:ze.R.textInputFocus,primary:0,weight:100}})}run(e,t){!t.hasModel()||!t.getOption(33)&&t.getSelection().isEmpty()||(gn.Eq.forceCopyWithSyntaxHighlighting=!0,t.focus(),document.execCommand("copy"),gn.Eq.forceCopyWithSyntaxHighlighting=!1)}}function Jn(u,e){u&&(u.addImplementation(1e4,"code-editor",(t,i)=>{const s=t.get(Gi.T).getFocusedCodeEditor();if(s&&s.hasTextFocus()){const o=s.getOption(33),c=s.getSelection();return c&&c.isEmpty()&&!o||document.execCommand(e),!0}return!1}),u.addImplementation(0,"generic-dom",(t,i)=>(document.execCommand(e),!0)))}Jn(xn,"cut"),Jn(Rn,"copy"),$i&&($i.addImplementation(1e4,"code-editor",(u,e)=>{const t=u.get(Gi.T),i=u.get(Oi.h),s=t.getFocusedCodeEditor();return s&&s.hasTextFocus()?!document.execCommand("paste")&&Pi.HZ?(()=>Fi(void 0,void 0,void 0,function*(){const c=yield i.readText();if(c!==""){const m=gn.bs.INSTANCE.get(c);let A=!1,U=null,W=null;m&&(A=s.getOption(33)&&!!m.isFromEmptySelection,U=typeof m.multicursorText<"u"?m.multicursorText:null,W=m.mode),s.trigger("keyboard","paste",{text:c,pasteOnNewLine:A,multicursorText:U,mode:W})}}))():!0:!1}),$i.addImplementation(0,"generic-dom",(u,e)=>(document.execCommand("paste"),!0))),_i&&(0,Te.Fl)(Nn);var Ti=f(78903),es=f(63946),xi=f(16844),os=f(98769),Zi=f(52230),cn=f(13338),Wi=f(94327),vn=f(37264),Gn=f(62105),ws=f(64830),fn=f(59715),ks=f(44023);class wn{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+wn.sep)}intersects(e){return this.contains(e)||e.contains(this)}append(e){return new wn(this.value+wn.sep+e)}}wn.sep=".",wn.None=new wn("@@none@@"),wn.Empty=new wn(""),wn.QuickFix=new wn("quickfix"),wn.Refactor=new wn("refactor"),wn.Source=new wn("source"),wn.SourceOrganizeImports=wn.Source.append("organizeImports"),wn.SourceFixAll=wn.Source.append("fixAll");var yn;(function(u){u.Refactor="refactor",u.RefactorPreview="refactor preview",u.Lightbulb="lightbulb",u.Default="other (default)",u.SourceAction="source action",u.QuickFix="quick fix action",u.FixAll="fix all",u.OrganizeImports="organize imports",u.AutoFix="auto fix",u.QuickFixHover="quick fix hover window",u.OnSave="save participants",u.ProblemsView="problems view"})(yn||(yn={}));function uo(u,e){return!(u.include&&!u.include.intersects(e)||u.excludes&&u.excludes.some(t=>Ts(e,t,u.include))||!u.includeSourceActions&&wn.Source.contains(e))}function Ms(u,e){const t=e.kind?new wn(e.kind):void 0;return!(u.include&&(!t||!u.include.contains(t))||u.excludes&&t&&u.excludes.some(i=>Ts(t,i,u.include))||!u.includeSourceActions&&t&&wn.Source.contains(t)||u.onlyIncludePreferredActions&&!e.isPreferred)}function Ts(u,e,t){return!(!e.contains(u)||t&&e.contains(t))}class Et{constructor(e,t,i){this.kind=e,this.apply=t,this.preferred=i}static fromUser(e,t){return!e||typeof e!="object"?new Et(t.kind,t.apply,!1):new Et(Et.getKindFromUser(e,t.kind),Et.getApplyFromUser(e,t.apply),Et.getPreferredUser(e))}static getApplyFromUser(e,t){switch(typeof e.apply=="string"?e.apply.toLowerCase():""){case"first":return"first";case"never":return"never";case"ifsingle":return"ifSingle";default:return t}}static getKindFromUser(e,t){return typeof e.kind=="string"?new wn(e.kind):t}static getPreferredUser(e){return typeof e.preferred=="boolean"?e.preferred:!1}}var ls=function(u,e,t,i){function s(o){return o instanceof t?o:new t(function(c){c(o)})}return new(t||(t=Promise))(function(o,c){function m(W){try{U(i.next(W))}catch(re){c(re)}}function A(W){try{U(i.throw(W))}catch(re){c(re)}}function U(W){W.done?o(W.value):s(W.value).then(m,A)}U((i=i.apply(u,e||[])).next())})};const Ss="editor.action.codeAction",ts="editor.action.refactor",zs="editor.action.refactor.preview",vs="editor.action.sourceAction",As="editor.action.organizeImports",$s="editor.action.fixAll";class Gs{constructor(e,t){this.action=e,this.provider=t}resolve(e){var t;return ls(this,void 0,void 0,function*(){if(!((t=this.provider)===null||t===void 0)&&t.resolveCodeAction&&!this.action.edit){let i;try{i=yield this.provider.resolveCodeAction(this.action,e)}catch(s){(0,Wi.M_)(s)}i&&(this.action.edit=i.edit)}return this})}}class rs extends at.jG{constructor(e,t,i){super(),this.documentation=t,this._register(i),this.allActions=[...e].sort(rs.codeActionsComparator),this.validActions=this.allActions.filter(({action:s})=>!s.disabled)}static codeActionsComparator({action:e},{action:t}){return e.isPreferred&&!t.isPreferred?-1:!e.isPreferred&&t.isPreferred?1:(0,cn.EI)(e.diagnostics)?(0,cn.EI)(t.diagnostics)?e.diagnostics[0].message.localeCompare(t.diagnostics[0].message):-1:(0,cn.EI)(t.diagnostics)?1:0}get hasAutoFix(){return this.validActions.some(({action:e})=>!!e.kind&&wn.QuickFix.contains(new wn(e.kind))&&!!e.isPreferred)}}const Bn={actions:[],documentation:void 0};function mn(u,e,t,i,s,o){var c;const m=i.filter||{},A={only:(c=m.include)===null||c===void 0?void 0:c.value,trigger:i.type},U=new Gn.ER(e,o),W=Kt(u,e,m),re=new at.Cm,Se=W.map(Qe=>ls(this,void 0,void 0,function*(){try{s.report(Qe);const tt=yield Qe.provideCodeActions(e,t,A,U.token);if(tt&&re.add(tt),U.token.isCancellationRequested)return Bn;const vt=(tt?.actions||[]).filter(ci=>ci&&Ms(m,ci)),Ht=Ri(Qe,vt,m.include);return{actions:vt.map(ci=>new Gs(ci,Qe)),documentation:Ht}}catch(tt){if((0,Wi.MB)(tt))throw tt;return(0,Wi.M_)(tt),Bn}})),Be=u.onDidChange(()=>{const Qe=u.all(e);(0,cn.aI)(Qe,W)||U.cancel()});return Promise.all(Se).then(Qe=>{const tt=Qe.map(Ht=>Ht.actions).flat(),vt=(0,cn.Yc)(Qe.map(Ht=>Ht.documentation));return new rs(tt,vt,re)}).finally(()=>{Be.dispose(),U.dispose()})}function Kt(u,e,t){return u.all(e).filter(i=>i.providedCodeActionKinds?i.providedCodeActionKinds.some(s=>uo(t,new wn(s))):!0)}function Ri(u,e,t){if(!u.documentation)return;const i=u.documentation.map(s=>({kind:new wn(s.kind),command:s.command}));if(t){let s;for(const o of i)o.kind.contains(t)&&(s?s.kind.contains(o.kind)&&(s=o):s=o);if(s)return s?.command}for(const s of e)if(s.kind){for(const o of i)if(o.kind.contains(new wn(s.kind)))return o.command}}fn.wb.registerCommand("_executeCodeActionProvider",function(u,e,t,i,s){return ls(this,void 0,void 0,function*(){if(!(e instanceof vn.r))throw(0,Wi.Qg)();const{codeActionProvider:o}=u.get(Zi.u),c=u.get(ws.S).getModel(e);if(!c)throw(0,Wi.Qg)();const m=ki.L.isISelection(t)?ki.L.liftSelection(t):St.Q.isIRange(t)?c.validateRange(t):void 0;if(!m)throw(0,Wi.Qg)();const A=typeof i=="string"?new wn(i):void 0,U=yield mn(o,c,m,{type:1,triggerAction:yn.Default,filter:{includeSourceActions:!0,include:A}},ks.ke.None,Ti.X.None),W=[],re=Math.min(U.validActions.length,typeof s=="number"?s:0);for(let Se=0;Se<re;Se++)W.push(U.validActions[Se].resolve(Ti.X.None));try{return yield Promise.all(W),U.validActions.map(Se=>Se.action)}finally{setTimeout(()=>U.dispose(),100)}})});var nn=f(81424),Mn=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},fs=function(u,e){return function(t,i){e(t,i,u)}};let is=class y_{constructor(e,t){this._messageWidget=new at.HE,this._messageListeners=new at.Cm,this._editor=e,this._visible=y_.MESSAGE_VISIBLE.bindTo(t)}static get(e){return e.getContribution(y_.ID)}dispose(){this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(e,t){(0,oi.xE)(e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._messageWidget.value=new b(this._editor,t,e),this._messageListeners.add(this._editor.onDidBlurEditorText(()=>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(new Ot.pc(()=>this.closeMessage(),3e3));let i;this._messageListeners.add(this._editor.onMouseMove(s=>{s.target.position&&(i?i.containsPosition(s.target.position)||this.closeMessage():i=new St.Q(t.lineNumber-3,1,s.target.position.lineNumber+3,1))}))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(b.fadeOut(this._messageWidget.value))}};is.ID="editor.contrib.messageController",is.MESSAGE_VISIBLE=new ct.N1("messageVisible",!1,we.kg("messageVisible","Whether the editor is currently showing an inline message")),is=Mn([fs(1,ct.fN)],is);const qe=Te.DX.bindToContribution(is.get);(0,Te.E_)(new qe({id:"leaveEditorMessage",precondition:is.MESSAGE_VISIBLE,handler:u=>u.closeMessage(),kbOpts:{weight:100+30,primary:9}}));class b{constructor(e,{lineNumber:t,column:i},s){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=e,this._editor.revealLinesInCenterIfOutsideViewport(t,t,0),this._position={lineNumber:t,column:i},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage"),this._domNode.style.marginLeft="-6px";const o=document.createElement("div");o.classList.add("anchor","top"),this._domNode.appendChild(o);const c=document.createElement("div");c.classList.add("message"),c.textContent=s,this._domNode.appendChild(c);const m=document.createElement("div");m.classList.add("anchor","below"),this._domNode.appendChild(m),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}static fadeOut(e){const t=()=>{e.dispose(),clearTimeout(i),e.getDomNode().removeEventListener("animationend",t)},i=setTimeout(t,110);return e.getDomNode().addEventListener("animationend",t),e.getDomNode().classList.add("fadeOut"),{dispose:t}}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)}}(0,Te.HW)(is.ID,is);var P=f(82399),M=f(59095),q=f(67954),p=f(27969),F=f(79518),de=f(85753),be=f(52348),ye=f(56071),Me=f(76243),He=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},$e=function(u,e){return function(t,i){e(t,i,u)}},gt=function(u,e,t,i){function s(o){return o instanceof t?o:new t(function(c){c(o)})}return new(t||(t=Promise))(function(o,c){function m(W){try{U(i.next(W))}catch(re){c(re)}}function A(W){try{U(i.throw(W))}catch(re){c(re)}}function U(W){W.done?o(W.value):s(W.value).then(m,A)}U((i=i.apply(u,e||[])).next())})};const wt={Visible:new ct.N1("CodeActionMenuVisible",!1,(0,we.kg)("CodeActionMenuVisible","Whether the code action list widget is visible"))};class It extends p.rc{constructor(e,t){super(e.command?e.command.id:e.title,Pt(e.title),void 0,!e.disabled,t),this.action=e}}function Pt(u){return u.replace(/\r\n|\r|\n/g," ")}const Wt="codeActionWidget",Xt=26;let mi=class{constructor(e,t){this.acceptKeybindings=e,this.keybindingService=t}get templateId(){return Wt}renderTemplate(e){const t=Object.create(null);return t.disposables=[],t.root=e,t.text=document.createElement("span"),e.append(t.text),t}renderElement(e,t,i){const s=i,o=e.title,c=e.isEnabled,m=e.isSeparator,A=e.isDocumentation;s.text.textContent=o,c?s.root.classList.remove("option-disabled"):(s.root.classList.add("option-disabled"),s.root.style.backgroundColor="transparent !important"),m&&(s.root.classList.add("separator"),s.root.style.height="10px"),A||(()=>{var W,re;const[Se,Be]=this.acceptKeybindings;s.root.title=(0,we.kg)({key:"label",comment:['placeholders are keybindings, e.g "F2 to Refactor, Shift+F2 to Preview"']},"{0} to Refactor, {1} to Preview",(W=this.keybindingService.lookupKeybinding(Se))===null||W===void 0?void 0:W.getLabel(),(re=this.keybindingService.lookupKeybinding(Be))===null||re===void 0?void 0:re.getLabel())})()}disposeTemplate(e){e.disposables=(0,at.AS)(e.disposables)}};mi=He([$e(1,ye.b)],mi);let Ii=class L_ extends at.jG{constructor(e,t,i,s,o,c,m,A,U,W){super(),this._editor=e,this._delegate=t,this._contextMenuService=i,this._languageFeaturesService=o,this._telemetryService=c,this._configurationService=A,this._contextViewService=U,this._contextKeyService=W,this._showingActions=this._register(new at.HE),this.codeActionList=this._register(new at.HE),this.options=[],this._visible=!1,this.viewItems=[],this.hasSeperator=!1,this._keybindingResolver=new Ji({getKeybindings:()=>s.getKeybindings()}),this._ctxMenuWidgetVisible=wt.Visible.bindTo(this._contextKeyService),this.listRenderer=new mi(["onEnterSelectCodeAction","onEnterSelectCodeActionWithPreview"],s)}get isVisible(){return this._visible}isCodeActionWidgetEnabled(e){return this._configurationService.getValue("editor.experimental.useCustomCodeActionMenu",{resource:e.uri})}_onListSelection(e){e.elements.length&&e.elements.forEach(t=>{t.isEnabled&&(t.action.run(),this.hideCodeActionWidget())})}_onListHover(e){var t,i,s,o;e.element?!((i=e.element)===null||i===void 0)&&i.isEnabled?((s=this.codeActionList.value)===null||s===void 0||s.setFocus([e.element.index]),this.focusedEnabledItem=this.viewItems.indexOf(e.element),this.currSelectedItem=e.element.index):(this.currSelectedItem=void 0,(o=this.codeActionList.value)===null||o===void 0||o.setFocus([e.element.index])):(this.currSelectedItem=void 0,(t=this.codeActionList.value)===null||t===void 0||t.setFocus([]))}renderCodeActionMenuList(e,t){var i;const s=new at.Cm,o=document.createElement("div"),c=document.createElement("div");this.block=e.appendChild(c),this.block.classList.add("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",s.add(M.ko(this.block,M.Bx.MOUSE_DOWN,Se=>Se.stopPropagation())),o.id="codeActionMenuWidget",o.classList.add("codeActionMenuWidget"),e.appendChild(o),this.codeActionList.value=new q.B8("codeActionWidget",o,{getHeight(Se){return Se.isSeparator?10:Xt},getTemplateId(Se){return"codeActionWidget"}},[this.listRenderer],{keyboardSupport:!1}),s.add(this.codeActionList.value.onMouseOver(Se=>this._onListHover(Se))),s.add(this.codeActionList.value.onDidChangeFocus(Se=>{var Be;return(Be=this.codeActionList.value)===null||Be===void 0?void 0:Be.domFocus()})),s.add(this.codeActionList.value.onDidChangeSelection(Se=>this._onListSelection(Se))),s.add(this._editor.onDidLayoutChange(Se=>this.hideCodeActionWidget())),t.forEach((Se,Be)=>{const Qe=Se.class==="separator";let tt=!1;Se instanceof It&&(tt=Se.action.kind===L_.documentationID),Qe&&(this.hasSeperator=!0);const vt={title:Se.label,detail:Se.tooltip,action:t[Be],isEnabled:Se.enabled,isSeparator:Qe,index:Be,isDocumentation:tt};Se.enabled&&this.viewItems.push(vt),this.options.push(vt)}),this.codeActionList.value.splice(0,this.codeActionList.value.length,this.options);const m=this.hasSeperator?(t.length-1)*Xt+10:t.length*Xt;o.style.height=String(m)+"px",this.codeActionList.value.layout(m);const A=[];this.options.forEach((Se,Be)=>{var Qe,tt;if(!this.codeActionList.value)return;const vt=(tt=document.getElementById((Qe=this.codeActionList.value)===null||Qe===void 0?void 0:Qe.getElementID(Be)))===null||tt===void 0?void 0:tt.getElementsByTagName("span")[0].offsetWidth;A.push(Number(vt))});const U=Math.max(...A);o.style.width=U+52+"px",(i=this.codeActionList.value)===null||i===void 0||i.layout(m,U),this.viewItems.length<1||this.viewItems.every(Se=>Se.isDocumentation)?this.currSelectedItem=void 0:(this.focusedEnabledItem=0,this.currSelectedItem=this.viewItems[0].index,this.codeActionList.value.setFocus([this.currSelectedItem])),this.codeActionList.value.domFocus();const W=M.w5(e),re=W.onDidBlur(()=>{this.hideCodeActionWidget()});return s.add(re),s.add(W),this._ctxMenuWidgetVisible.set(!0),s}focusPrevious(){var e;if(typeof this.focusedEnabledItem>"u")this.focusedEnabledItem=this.viewItems[0].index;else if(this.viewItems.length<1)return!1;const t=this.focusedEnabledItem;let i;do this.focusedEnabledItem=this.focusedEnabledItem-1,this.focusedEnabledItem<0&&(this.focusedEnabledItem=this.viewItems.length-1),i=this.viewItems[this.focusedEnabledItem],(e=this.codeActionList.value)===null||e===void 0||e.setFocus([i.index]),this.currSelectedItem=i.index;while(this.focusedEnabledItem!==t&&(!i.isEnabled||i.action.id===p.wv.ID));return!0}focusNext(){var e;if(typeof this.focusedEnabledItem>"u")this.focusedEnabledItem=this.viewItems.length-1;else if(this.viewItems.length<1)return!1;const t=this.focusedEnabledItem;let i;do this.focusedEnabledItem=(this.focusedEnabledItem+1)%this.viewItems.length,i=this.viewItems[this.focusedEnabledItem],(e=this.codeActionList.value)===null||e===void 0||e.setFocus([i.index]),this.currSelectedItem=i.index;while(this.focusedEnabledItem!==t&&(!i.isEnabled||i.action.id===p.wv.ID));return!0}navigateListWithKeysUp(){this.focusPrevious()}navigateListWithKeysDown(){this.focusNext()}onEnterSet(){var e;typeof this.currSelectedItem=="number"&&((e=this.codeActionList.value)===null||e===void 0||e.setSelection([this.currSelectedItem]))}dispose(){super.dispose()}hideCodeActionWidget(){this._ctxMenuWidgetVisible.reset(),this.options=[],this.viewItems=[],this.focusedEnabledItem=0,this.currSelectedItem=void 0,this.hasSeperator=!1,this._contextViewService.hideContextView({source:this})}codeActionTelemetry(e,t,i){this._telemetryService.publicLog2("codeAction.applyCodeAction",{codeActionFrom:e,validCodeActions:i.validActions.length,cancelled:t})}show(e,t,i,s){return gt(this,void 0,void 0,function*(){const o=this._editor.getModel();if(!o)return;const c=s.includeDisabledActions?t.allActions:t.validActions;if(!c.length){this._visible=!1;return}if(!this._editor.getDomNode())throw this._visible=!1,(0,Wi.aD)();this._visible=!0,this._showingActions.value=t;const m=this.getMenuActions(e,c,t.documentation),A=bi.y.isIPosition(i)?this._toCoords(i):i||{x:0,y:0},U=this._keybindingResolver.getResolver(),W=this._editor.getOption(117);this.isCodeActionWidgetEnabled(o)?this._contextViewService.showContextView({getAnchor:()=>A,render:re=>this.renderCodeActionMenuList(re,m),onHide:re=>{const Se=s.fromLightbulb?yn.Lightbulb:e.triggerAction;this.codeActionTelemetry(Se,re,t),this._visible=!1,this._editor.focus()}},this._editor.getDomNode(),!1):this._contextMenuService.showContextMenu({domForShadowRoot:W?this._editor.getDomNode():void 0,getAnchor:()=>A,getActions:()=>m,onHide:re=>{const Se=s.fromLightbulb?yn.Lightbulb:e.triggerAction;this.codeActionTelemetry(Se,re,t),this._visible=!1,this._editor.focus()},autoSelectFirstItem:!0,getKeyBinding:re=>re instanceof It?U(re.action):void 0})})}getMenuActions(e,t,i){var s,o;const c=W=>new It(W.action,()=>this._delegate.onSelectCodeAction(W,e)),m=t.map(c),A=[...i],U=this._editor.getModel();if(U&&m.length)for(const W of this._languageFeaturesService.codeActionProvider.all(U))W._getAdditionalMenuItems&&A.push(...W._getAdditionalMenuItems({trigger:e.type,only:(o=(s=e.filter)===null||s===void 0?void 0:s.include)===null||o===void 0?void 0:o.value},t.map(re=>re.action)));return A.length&&m.push(new p.wv,...A.map(W=>c(new Gs({title:W.title,command:W,kind:L_.documentationID},void 0)))),m}_toCoords(e){if(!this._editor.hasModel())return{x:0,y:0};this._editor.revealPosition(e,1),this._editor.render();const t=this._editor.getScrolledVisiblePosition(e),i=M.BK(this._editor.getDomNode()),s=i.left+t.left,o=i.top+t.top+t.height;return{x:s,y:o}}};Ii.documentationID="_documentation",Ii=He([$e(2,be.Z),$e(3,ye.b),$e(4,Zi.u),$e(5,Me.k),$e(6,Ye.Gy),$e(7,de.pG),$e(8,be.l),$e(9,ct.fN)],Ii);class Ji{constructor(e){this._keybindingProvider=e}getResolver(){const e=new es.d(()=>this._keybindingProvider.getKeybindings().filter(t=>Ji.codeActionCommands.indexOf(t.command)>=0).filter(t=>t.resolvedKeybinding).map(t=>{let i=t.commandArgs;return t.command===As?i={kind:wn.SourceOrganizeImports.value}:t.command===$s&&(i={kind:wn.SourceFixAll.value}),Object.assign({resolvedKeybinding:t.resolvedKeybinding},Et.fromUser(i,{kind:wn.None,apply:"never"}))}));return t=>{if(t.kind){const i=this.bestKeybindingForCodeAction(t,e.getValue());return i?.resolvedKeybinding}}}bestKeybindingForCodeAction(e,t){if(!e.kind)return;const i=new wn(e.kind);return t.filter(s=>s.kind.contains(i)).filter(s=>s.preferred?e.isPreferred:!0).reduceRight((s,o)=>s?s.kind.contains(o.kind)?o:s:o,void 0)}}Ji.codeActionCommands=[ts,Ss,vs,As,$s];var In=f(30474),Mi=f(26048),Vi=f(2106),Os=f(28838),bo=f(50969),ns=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},oo=function(u,e){return function(t,i){e(t,i,u)}},go;(function(u){u.Hidden={type:0};class e{constructor(i,s,o,c){this.actions=i,this.trigger=s,this.editorPosition=o,this.widgetPosition=c,this.type=1}}u.Showing=e})(go||(go={}));let Ps=class oC extends at.jG{constructor(e,t,i,s){super(),this._editor=e,this._quickFixActionId=t,this._preferredFixActionId=i,this._keybindingService=s,this._onClick=this._register(new Vi.vl),this.onClick=this._onClick.event,this._state=go.Hidden,this._domNode=document.createElement("div"),this._domNode.className=Mi.W6.lightBulb.classNames,this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent(o=>{const c=this._editor.getModel();(this.state.type!==1||!c||this.state.editorPosition.lineNumber>=c.getLineCount())&&this.hide()})),In.q.ignoreTarget(this._domNode),this._register(M.Xc(this._domNode,o=>{if(this.state.type!==1)return;this._editor.focus(),o.preventDefault();const{top:c,height:m}=M.BK(this._domNode),A=this._editor.getOption(61);let U=Math.floor(A/3);this.state.widgetPosition.position!==null&&this.state.widgetPosition.position.lineNumber<this.state.editorPosition.lineNumber&&(U+=A),this._onClick.fire({x:o.posx,y:c+m+U,actions:this.state.actions,trigger:this.state.trigger})})),this._register(M.ko(this._domNode,"mouseenter",o=>{(o.buttons&1)===1&&this.hide()})),this._register(this._editor.onDidChangeConfiguration(o=>{o.hasChanged(59)&&!this._editor.getOption(59).enabled&&this.hide()})),this._updateLightBulbTitleAndIcon(),this._register(this._keybindingService.onDidUpdateKeybindings(this._updateLightBulbTitleAndIcon,this))}dispose(){super.dispose(),this._editor.removeContentWidget(this)}getId(){return"LightBulbWidget"}getDomNode(){return this._domNode}getPosition(){return this._state.type===1?this._state.widgetPosition:null}update(e,t,i){if(e.validActions.length<=0)return this.hide();const s=this._editor.getOptions();if(!s.get(59).enabled)return this.hide();const o=this._editor.getModel();if(!o)return this.hide();const{lineNumber:c,column:m}=o.validatePosition(i),A=o.getOptions().tabSize,U=s.get(46),W=o.getLineContent(c),re=(0,bo.G)(W,A),Se=U.spaceWidth*re>22,Be=tt=>tt>2&&this._editor.getTopForLineNumber(tt)===this._editor.getTopForLineNumber(tt-1);let Qe=c;if(!Se){if(c>1&&!Be(c-1))Qe-=1;else if(!Be(c+1))Qe+=1;else if(m*U.spaceWidth<22)return this.hide()}this.state=new go.Showing(e,t,i,{position:{lineNumber:Qe,column:1},preference:oC._posPref}),this._editor.layoutContentWidget(this)}hide(){this.state=go.Hidden,this._editor.layoutContentWidget(this)}get state(){return this._state}set state(e){this._state=e,this._updateLightBulbTitleAndIcon()}_updateLightBulbTitleAndIcon(){if(this.state.type===1&&this.state.actions.hasAutoFix){this._domNode.classList.remove(...Mi.W6.lightBulb.classNamesArray),this._domNode.classList.add(...Mi.W6.lightbulbAutofix.classNamesArray);const t=this._keybindingService.lookupKeybinding(this._preferredFixActionId);if(t){this.title=we.kg("preferredcodeActionWithKb","Show Code Actions. Preferred Quick Fix Available ({0})",t.getLabel());return}}this._domNode.classList.remove(...Mi.W6.lightbulbAutofix.classNamesArray),this._domNode.classList.add(...Mi.W6.lightBulb.classNamesArray);const e=this._keybindingService.lookupKeybinding(this._quickFixActionId);e?this.title=we.kg("codeActionWithKb","Show Code Actions ({0})",e.getLabel()):this.title=we.kg("codeAction","Show Code Actions")}set title(e){this._domNode.title=e}};Ps._posPref=[0],Ps=ns([oo(3,ye.b)],Ps),(0,Ye.zy)((u,e)=>{var t;const i=(t=u.getColor(Ce.YtV))===null||t===void 0?void 0:t.transparent(.7),s=u.getColor(Ce.yHf);s&&e.addRule(` .monaco-editor .contentWidgets ${Mi.W6.lightBulb.cssSelector} { color: ${s}; background-color: ${i}; }`);const o=u.getColor(Ce.qTN);o&&e.addRule(` .monaco-editor .contentWidgets ${Mi.W6.lightbulbAutofix.cssSelector} { color: ${o}; background-color: ${i}; }`)});var Us=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},Js=function(u,e){return function(t,i){e(t,i,u)}},Vs=function(u,e,t,i){function s(o){return o instanceof t?o:new t(function(c){c(o)})}return new(t||(t=Promise))(function(o,c){function m(W){try{U(i.next(W))}catch(re){c(re)}}function A(W){try{U(i.throw(W))}catch(re){c(re)}}function U(W){W.done?o(W.value):s(W.value).then(m,A)}U((i=i.apply(u,e||[])).next())})},Hr=function(u,e,t,i,s){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?u!==e||!s:!e.has(u))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?s.call(u,t):s?s.value=t:e.set(u,t),t},ad=function(u,e,t,i){if(t==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?u!==e||!i:!e.has(u))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?i:t==="a"?i.call(u):i?i.value:e.get(u)},zr;let la=class extends at.jG{constructor(e,t,i,s,o){super(),this._editor=e,this.delegate=s,this._activeCodeActions=this._register(new at.HE),this.previewOn=!1,zr.set(this,!1),this._codeActionWidget=new es.d(()=>this._register(o.createInstance(Ii,this._editor,{onSelectCodeAction:(c,m)=>Vs(this,void 0,void 0,function*(){this.previewOn?this.delegate.applyCodeAction(c,!0,!!this.previewOn):this.delegate.applyCodeAction(c,!0,!!m.preview),this.previewOn=!1})}))),this._lightBulbWidget=new es.d(()=>{const c=this._register(o.createInstance(Ps,this._editor,t,i));return this._register(c.onClick(m=>this.showCodeActionList(m.trigger,m.actions,m,{includeDisabledActions:!1,fromLightbulb:!0}))),c})}dispose(){Hr(this,zr,!0,"f"),super.dispose()}hideCodeActionWidget(){this._codeActionWidget.hasValue()&&this._codeActionWidget.getValue().hideCodeActionWidget()}onEnter(){this._codeActionWidget.hasValue()&&this._codeActionWidget.getValue().onEnterSet()}onPreviewEnter(){this.previewOn=!0,this.onEnter()}navigateList(e){this._codeActionWidget.hasValue()&&(e?this._codeActionWidget.getValue().navigateListWithKeysUp():this._codeActionWidget.getValue().navigateListWithKeysDown())}update(e){var t,i,s,o,c;return Vs(this,void 0,void 0,function*(){if(e.type!==1){(t=this._lightBulbWidget.rawValue)===null||t===void 0||t.hide();return}let m;try{m=yield e.actions}catch(A){(0,Wi.dz)(A);return}if(!ad(this,zr,"f"))if(this._lightBulbWidget.getValue().update(m,e.trigger,e.position),e.trigger.type===1){if(!((i=e.trigger.filter)===null||i===void 0)&&i.include){const U=this.tryGetValidActionToApply(e.trigger,m);if(U){try{this._lightBulbWidget.getValue().hide(),yield this.delegate.applyCodeAction(U,!1,!1)}finally{m.dispose()}return}if(e.trigger.context){const W=this.getInvalidActionThatWouldHaveBeenApplied(e.trigger,m);if(W&&W.action.disabled){(s=is.get(this._editor))===null||s===void 0||s.showMessage(W.action.disabled,e.trigger.context.position),m.dispose();return}}}const A=!!(!((o=e.trigger.filter)===null||o===void 0)&&o.include);if(e.trigger.context&&(!m.allActions.length||!A&&!m.validActions.length)){(c=is.get(this._editor))===null||c===void 0||c.showMessage(e.trigger.context.notAvailableMessage,e.trigger.context.position),this._activeCodeActions.value=m,m.dispose();return}this._activeCodeActions.value=m,this._codeActionWidget.getValue().show(e.trigger,m,e.position,{includeDisabledActions:A,fromLightbulb:!1})}else this._codeActionWidget.getValue().isVisible?m.dispose():this._activeCodeActions.value=m})}getInvalidActionThatWouldHaveBeenApplied(e,t){if(t.allActions.length&&(e.autoApply==="first"&&t.validActions.length===0||e.autoApply==="ifSingle"&&t.allActions.length===1))return t.allActions.find(({action:i})=>i.disabled)}tryGetValidActionToApply(e,t){if(t.validActions.length&&(e.autoApply==="first"&&t.validActions.length>0||e.autoApply==="ifSingle"&&t.validActions.length===1))return t.validActions[0]}showCodeActionList(e,t,i,s){return Vs(this,void 0,void 0,function*(){this._codeActionWidget.getValue().show(e,t,i,s)})}};zr=new WeakMap,la=Us([Js(4,P._Y)],la);var Yn=f(27619),Cs=f(29879),hn=f(22467),Ir=function(u,e,t,i){if(t==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?u!==e||!i:!e.has(u))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?i:t==="a"?i.call(u):i?i.value:e.get(u)},Nr=function(u,e,t,i,s){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?u!==e||!s:!e.has(u))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?s.call(u,t):s?s.value=t:e.set(u,t),t},Mr;const jo=new ct.N1("supportedCodeAction","");class Tr extends at.jG{constructor(e,t,i,s=250){super(),this._editor=e,this._markerService=t,this._signalChange=i,this._delay=s,this._autoTriggerTimer=this._register(new Ot.pc),this._register(this._markerService.onMarkerChanged(o=>this._onMarkerChanges(o))),this._register(this._editor.onDidChangeCursorPosition(()=>this._onCursorChange()))}trigger(e){const t=this._getRangeOfSelectionUnlessWhitespaceEnclosed(e);return this._createEventAndSignalChange(e,t)}_onMarkerChanges(e){const t=this._editor.getModel();t&&e.some(i=>(0,hn.n4)(i,t.uri))&&this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:2,triggerAction:yn.Default})},this._delay)}_onCursorChange(){this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:2,triggerAction:yn.Default})},this._delay)}_getRangeOfMarker(e){const t=this._editor.getModel();if(t)for(const i of this._markerService.read({resource:t.uri})){const s=t.validateRange(i);if(St.Q.intersectRanges(s,e))return St.Q.lift(s)}}_getRangeOfSelectionUnlessWhitespaceEnclosed(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),i=this._editor.getSelection();if(i.isEmpty()&&e.type===2){const{lineNumber:s,column:o}=i.getPosition(),c=t.getLineContent(s);if(c.length===0)return;if(o===1){if(/\s/.test(c[0]))return}else if(o===t.getLineMaxColumn(s)){if(/\s/.test(c[c.length-1]))return}else if(/\s/.test(c[o-2])&&/\s/.test(c[o-1]))return}return i}_createEventAndSignalChange(e,t){const i=this._editor.getModel();if(!t||!i){this._signalChange(void 0);return}const s=this._getRangeOfMarker(t),o=s?s.getStartPosition():t.getStartPosition(),c={trigger:e,selection:t,position:o};return this._signalChange(c),c}}var Qs;(function(u){u.Empty={type:0};class e{constructor(i,s,o,c){this.trigger=i,this.rangeOrSelection=s,this.position=o,this._cancellablePromise=c,this.type=1,this.actions=c.catch(m=>{if((0,Wi.MB)(m))return hc;throw m})}cancel(){this._cancellablePromise.cancel()}}u.Triggered=e})(Qs||(Qs={}));const hc={allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1};class da extends at.jG{constructor(e,t,i,s,o){super(),this._editor=e,this._registry=t,this._markerService=i,this._progressService=o,this._codeActionOracle=this._register(new at.HE),this._state=Qs.Empty,this._onDidChangeState=this._register(new Vi.vl),this.onDidChangeState=this._onDidChangeState.event,Mr.set(this,!1),this._supportedCodeActions=jo.bindTo(s),this._register(this._editor.onDidChangeModel(()=>this._update())),this._register(this._editor.onDidChangeModelLanguage(()=>this._update())),this._register(this._registry.onDidChange(()=>this._update())),this._update()}dispose(){Ir(this,Mr,"f")||(Nr(this,Mr,!0,"f"),super.dispose(),this.setState(Qs.Empty,!0))}_update(){if(Ir(this,Mr,"f"))return;this._codeActionOracle.value=void 0,this.setState(Qs.Empty);const e=this._editor.getModel();if(e&&this._registry.has(e)&&!this._editor.getOption(83)){const t=[];for(const i of this._registry.all(e))Array.isArray(i.providedCodeActionKinds)&&t.push(...i.providedCodeActionKinds);this._supportedCodeActions.set(t.join(" ")),this._codeActionOracle.value=new Tr(this._editor,this._markerService,i=>{var s;if(!i){this.setState(Qs.Empty);return}const o=(0,Ot.SS)(c=>mn(this._registry,e,i.selection,i.trigger,ks.ke.None,c));i.trigger.type===1&&((s=this._progressService)===null||s===void 0||s.showWhile(o,250)),this.setState(new Qs.Triggered(i.trigger,i.selection,i.position,o))},void 0),this._codeActionOracle.value.trigger({type:2,triggerAction:yn.Default})}else this._supportedCodeActions.reset()}trigger(e){var t;(t=this._codeActionOracle.value)===null||t===void 0||t.trigger(e)}setState(e,t){e!==this._state&&(this._state.type===1&&this._state.cancel(),this._state=e,!t&&!Ir(this,Mr,"f")&&this._onDidChangeState.fire(e))}}Mr=new WeakMap;var uc=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},pr=function(u,e){return function(t,i){e(t,i,u)}},Ur=function(u,e,t,i){function s(o){return o instanceof t?o:new t(function(c){c(o)})}return new(t||(t=Promise))(function(o,c){function m(W){try{U(i.next(W))}catch(re){c(re)}}function A(W){try{U(i.throw(W))}catch(re){c(re)}}function U(W){W.done?o(W.value):s(W.value).then(m,A)}U((i=i.apply(u,e||[])).next())})};function Ko(u){return ct.M$.regex(jo.keys()[0],new RegExp("(\\s|^)"+(0,xi.bm)(u.value)+"\\b"))}function ca(u,e,t,i){const s=Et.fromUser(e,{kind:wn.Refactor,apply:"never"});return vr(u,typeof e?.kind=="string"?s.preferred?we.kg("editor.action.refactor.noneMessage.preferred.kind","No preferred refactorings for '{0}' available",e.kind):we.kg("editor.action.refactor.noneMessage.kind","No refactorings for '{0}' available",e.kind):s.preferred?we.kg("editor.action.refactor.noneMessage.preferred","No preferred refactorings available"):we.kg("editor.action.refactor.noneMessage","No refactorings available"),{include:wn.Refactor.contains(s.kind)?s.kind:wn.None,onlyIncludePreferredActions:s.preferred},s.apply,t,i)}const _r={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:we.kg("args.schema.kind","Kind of the code action to run.")},apply:{type:"string",description:we.kg("args.schema.apply","Controls when the returned actions are applied."),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[we.kg("args.schema.apply.first","Always apply the first returned code action."),we.kg("args.schema.apply.ifSingle","Apply the first returned code action if it is the only one."),we.kg("args.schema.apply.never","Do not apply the returned code actions.")]},preferred:{type:"boolean",default:!1,description:we.kg("args.schema.preferred","Controls if only preferred code actions should be returned.")}}};let er=class rC extends at.jG{constructor(e,t,i,s,o,c){super(),this._instantiationService=o,this._editor=e,this._model=this._register(new da(this._editor,c.codeActionProvider,t,i,s)),this._register(this._model.onDidChangeState(m=>this.update(m))),this._ui=new es.d(()=>this._register(new la(e,wo.Id,$o.Id,{applyCodeAction:(m,A,U)=>Ur(this,void 0,void 0,function*(){try{yield this._applyCodeAction(m,U)}finally{A&&this._trigger({type:2,triggerAction:yn.QuickFix,filter:{}})}})},this._instantiationService)))}static get(e){return e.getContribution(rC.ID)}update(e){this._ui.getValue().update(e)}hideCodeActionMenu(){this._ui.hasValue()&&this._ui.getValue().hideCodeActionWidget()}navigateCodeActionList(e){this._ui.hasValue()&&this._ui.getValue().navigateList(e)}selectedOption(){this._ui.hasValue()&&this._ui.getValue().onEnter()}selectedOptionWithPreview(){this._ui.hasValue()&&this._ui.getValue().onPreviewEnter()}showCodeActions(e,t,i){return this._ui.getValue().showCodeActionList(e,t,i,{includeDisabledActions:!1,fromLightbulb:!1})}manualTriggerAtCurrentPosition(e,t,i,s,o){var c;if(!this._editor.hasModel())return;(c=is.get(this._editor))===null||c===void 0||c.closeMessage();const m=this._editor.getPosition();this._trigger({type:1,triggerAction:t,filter:i,autoApply:s,context:{notAvailableMessage:e,position:m},preview:o})}_trigger(e){return this._model.trigger(e)}_applyCodeAction(e,t){return this._instantiationService.invokeFunction(ha,e,ms.FromCodeActions,{preview:t,editor:this._editor})}};er.ID="editor.contrib.quickFixController",er=uc([pr(1,Yn.DR),pr(2,ct.fN),pr(3,ks.N8),pr(4,P._Y),pr(5,Zi.u)],er);var ms;(function(u){u.OnSave="onSave",u.FromProblemsView="fromProblemsView",u.FromCodeActions="fromCodeActions"})(ms||(ms={}));function ha(u,e,t,i){return Ur(this,void 0,void 0,function*(){const s=u.get(os.nu),o=u.get(fn.wT),c=u.get(Me.k),m=u.get(Cs.Ot);if(c.publicLog2("codeAction.applyCodeAction",{codeActionTitle:e.action.title,codeActionKind:e.action.kind,codeActionIsPreferred:!!e.action.isPreferred,reason:t}),yield e.resolve(Ti.X.None),e.action.edit&&(yield s.apply(os.jN.convert(e.action.edit),{editor:i?.editor,label:e.action.title,quotableLabel:e.action.title,code:"undoredo.codeAction",respectAutoSaveConfig:!0,showPreview:i?.preview})),e.action.command)try{yield o.executeCommand(e.action.command.id,...e.action.command.arguments||[])}catch(A){const U=Ia(A);m.error(typeof U=="string"?U:we.kg("applyCodeActionFailed","An unknown error occurred while applying the code action"))}})}function Ia(u){return typeof u=="string"?u:u instanceof Error&&typeof u.message=="string"?u.message:void 0}function vr(u,e,t,i,s=!1,o=yn.Default){if(u.hasModel()){const c=er.get(u);c?.manualTriggerAtCurrentPosition(e,o,t,i,s)}}class wo extends Te.ks{constructor(){super({id:wo.Id,label:we.kg("quickfix.trigger.label","Quick Fix..."),alias:"Quick Fix...",precondition:ct.M$.and(ze.R.writable,ze.R.hasCodeActionsProvider),kbOpts:{kbExpr:ze.R.editorTextFocus,primary:2132,weight:100}})}run(e,t){return vr(t,we.kg("editor.action.quickFix.noneMessage","No code actions available"),void 0,void 0,!1,yn.QuickFix)}}wo.Id="editor.action.quickFix";class No extends Te.DX{constructor(){super({id:Ss,precondition:ct.M$.and(ze.R.writable,ze.R.hasCodeActionsProvider),description:{description:"Trigger a code action",args:[{name:"args",schema:_r}]}})}runEditorCommand(e,t,i){const s=Et.fromUser(i,{kind:wn.Empty,apply:"ifSingle"});return vr(t,typeof i?.kind=="string"?s.preferred?we.kg("editor.action.codeAction.noneMessage.preferred.kind","No preferred code actions for '{0}' available",i.kind):we.kg("editor.action.codeAction.noneMessage.kind","No code actions for '{0}' available",i.kind):s.preferred?we.kg("editor.action.codeAction.noneMessage.preferred","No preferred code actions available"):we.kg("editor.action.codeAction.noneMessage","No code actions available"),{include:s.kind,includeSourceActions:!0,onlyIncludePreferredActions:s.preferred},s.apply)}}class ro extends Te.ks{constructor(){super({id:ts,label:we.kg("refactor.label","Refactor..."),alias:"Refactor...",precondition:ct.M$.and(ze.R.writable,ze.R.hasCodeActionsProvider),kbOpts:{kbExpr:ze.R.editorTextFocus,primary:3120,mac:{primary:1328},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:ct.M$.and(ze.R.writable,Ko(wn.Refactor))},description:{description:"Refactor...",args:[{name:"args",schema:_r}]}})}run(e,t,i){return ca(t,i,!1,yn.Refactor)}}class ld extends Te.ks{constructor(){super({id:zs,label:we.kg("refactor.preview.label","Refactor with Preview..."),alias:"Refactor Preview...",precondition:ct.M$.and(ze.R.writable,ze.R.hasCodeActionsProvider),description:{description:"Refactor Preview...",args:[{name:"args",schema:_r}]}})}run(e,t,i){return ca(t,i,!0,yn.RefactorPreview)}}class dd extends Te.ks{constructor(){super({id:vs,label:we.kg("source.label","Source Action..."),alias:"Source Action...",precondition:ct.M$.and(ze.R.writable,ze.R.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:ct.M$.and(ze.R.writable,Ko(wn.Source))},description:{description:"Source Action...",args:[{name:"args",schema:_r}]}})}run(e,t,i){const s=Et.fromUser(i,{kind:wn.Source,apply:"never"});return vr(t,typeof i?.kind=="string"?s.preferred?we.kg("editor.action.source.noneMessage.preferred.kind","No preferred source actions for '{0}' available",i.kind):we.kg("editor.action.source.noneMessage.kind","No source actions for '{0}' available",i.kind):s.preferred?we.kg("editor.action.source.noneMessage.preferred","No preferred source actions available"):we.kg("editor.action.source.noneMessage","No source actions available"),{include:wn.Source.contains(s.kind)?s.kind:wn.None,includeSourceActions:!0,onlyIncludePreferredActions:s.preferred},s.apply,void 0,yn.SourceAction)}}class gc extends Te.ks{constructor(){super({id:As,label:we.kg("organizeImports.label","Organize Imports"),alias:"Organize Imports",precondition:ct.M$.and(ze.R.writable,Ko(wn.SourceOrganizeImports)),kbOpts:{kbExpr:ze.R.editorTextFocus,primary:1581,weight:100}})}run(e,t){return vr(t,we.kg("editor.action.organize.noneMessage","No organize imports action available"),{include:wn.SourceOrganizeImports,includeSourceActions:!0},"ifSingle",void 0,yn.OrganizeImports)}}class hl extends Te.ks{constructor(){super({id:$s,label:we.kg("fixAll.label","Fix All"),alias:"Fix All",precondition:ct.M$.and(ze.R.writable,Ko(wn.SourceFixAll))})}run(e,t){return vr(t,we.kg("fixAll.noneMessage","No fix all action available"),{include:wn.SourceFixAll,includeSourceActions:!0},"ifSingle",void 0,yn.FixAll)}}class $o extends Te.ks{constructor(){super({id:$o.Id,label:we.kg("autoFix.label","Auto Fix..."),alias:"Auto Fix...",precondition:ct.M$.and(ze.R.writable,Ko(wn.QuickFix)),kbOpts:{kbExpr:ze.R.editorTextFocus,primary:1620,mac:{primary:2644},weight:100}})}run(e,t){return vr(t,we.kg("editor.action.autoFix.noneMessage","No auto fixes available"),{include:wn.QuickFix,onlyIncludePreferredActions:!0},"ifSingle",void 0,yn.AutoFix)}}$o.Id="editor.action.autoFix";const qs=Te.DX.bindToContribution(er.get),jr=100+90;(0,Te.E_)(new qs({id:"hideCodeActionMenuWidget",precondition:wt.Visible,handler(u){u.hideCodeActionMenu()},kbOpts:{weight:jr,primary:9,secondary:[1033]}})),(0,Te.E_)(new qs({id:"focusPreviousCodeAction",precondition:wt.Visible,handler(u){u.navigateCodeActionList(!0)},kbOpts:{weight:jr+1e5,primary:16,secondary:[2064]}})),(0,Te.E_)(new qs({id:"focusNextCodeAction",precondition:wt.Visible,handler(u){u.navigateCodeActionList(!1)},kbOpts:{weight:jr+1e5,primary:18,secondary:[2066]}})),(0,Te.E_)(new qs({id:"onEnterSelectCodeAction",precondition:wt.Visible,handler(u){u.selectedOption()},kbOpts:{weight:jr+1e5,primary:3,secondary:[1026]}})),(0,Te.E_)(new qs({id:"onEnterSelectCodeActionWithPreview",precondition:wt.Visible,handler(u){u.selectedOptionWithPreview()},kbOpts:{weight:jr+1e5,primary:2051}}));var ua=f(85003),Rr=f(27142),So=f(67167);So.O.as(Rr.Fd.Configuration).registerConfiguration(Object.assign(Object.assign({},ua.JJ),{properties:{"editor.experimental.useCustomCodeActionMenu":{type:"boolean",tags:["experimental"],scope:5,description:we.kg("codeActionWidget","Enabling this adjusts how the code action menu is rendered."),default:!1}}})),(0,Te.HW)(er.ID,er),(0,Te.Fl)(wo),(0,Te.Fl)(ro),(0,Te.Fl)(ld),(0,Te.Fl)(dd),(0,Te.Fl)(gc),(0,Te.Fl)($o),(0,Te.Fl)(hl),(0,Te.E_)(new No);var tr=f(22344),yo=f(80878),ds=f(66476),pi=f(79359),Kr=function(u,e,t,i){function s(o){return o instanceof t?o:new t(function(c){c(o)})}return new(t||(t=Promise))(function(o,c){function m(W){try{U(i.next(W))}catch(re){c(re)}}function A(W){try{U(i.throw(W))}catch(re){c(re)}}function U(W){W.done?o(W.value):s(W.value).then(m,A)}U((i=i.apply(u,e||[])).next())})};class Na{constructor(){this.lenses=[],this._disposables=new at.Cm}dispose(){this._disposables.dispose()}get isDisposed(){return this._disposables.isDisposed}add(e,t){this._disposables.add(e);for(const i of e.lenses)this.lenses.push({symbol:i,provider:t})}}function Ma(u,e,t){return Kr(this,void 0,void 0,function*(){const i=u.ordered(e),s=new Map,o=new Na,c=i.map((m,A)=>Kr(this,void 0,void 0,function*(){s.set(m,A);try{const U=yield Promise.resolve(m.provideCodeLenses(e,t));U&&o.add(U,m)}catch(U){(0,Wi.M_)(U)}}));return yield Promise.all(c),o.lenses=o.lenses.sort((m,A)=>m.symbol.range.startLineNumber<A.symbol.range.startLineNumber?-1:m.symbol.range.startLineNumber>A.symbol.range.startLineNumber?1:s.get(m.provider)<s.get(A.provider)?-1:s.get(m.provider)>s.get(A.provider)?1:m.symbol.range.startColumn<A.symbol.range.startColumn?-1:m.symbol.range.startColumn>A.symbol.range.startColumn?1:0),o})}fn.wb.registerCommand("_executeCodeLensProvider",function(u,...e){let[t,i]=e;(0,pi.j)(vn.r.isUri(t)),(0,pi.j)(typeof i=="number"||!i);const{codeLensProvider:s}=u.get(Zi.u),o=u.get(ws.S).getModel(t);if(!o)throw(0,Wi.Qg)();const c=[],m=new at.Cm;return Ma(s,o,Ti.X.None).then(A=>{m.add(A);const U=[];for(const W of A.lenses)i==null||W.symbol.command?c.push(W.symbol):i-- >0&&W.provider.resolveCodeLens&&U.push(Promise.resolve(W.provider.resolveCodeLens(o,W.symbol,Ti.X.None)).then(re=>c.push(re||W.symbol)));return Promise.all(U)}).then(()=>c).finally(()=>{setTimeout(()=>m.dispose(),100)})});var Vo=f(48289),ir=f(27992),nr=f(66726),fo=f(90840),un=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},Xn=function(u,e){return function(t,i){e(t,i,u)}};const us=(0,P.u1)("ICodeLensCache");class Rs{constructor(e,t){this.lineCount=e,this.data=t}}let js=class{constructor(e){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new ir.qK(20,.75);const t="codelens/cache";(0,Ot.cx)(()=>e.remove(t,1));const i="codelens/cache2",s=e.get(i,1,"{}");this._deserialize(s),(0,Vo.O)(e.onWillSaveState)(o=>{o.reason===fo.LP.SHUTDOWN&&e.store(i,this._serialize(),1,1)})}put(e,t){const i=t.lenses.map(c=>{var m;return{range:c.symbol.range,command:c.symbol.command&&{id:"",title:(m=c.symbol.command)===null||m===void 0?void 0:m.title}}}),s=new Na;s.add({lenses:i,dispose:()=>{}},this._fakeProvider);const o=new Rs(e.getLineCount(),s);this._cache.set(e.uri.toString(),o)}get(e){const t=this._cache.get(e.uri.toString());return t&&t.lineCount===e.getLineCount()?t.data:void 0}delete(e){this._cache.delete(e.uri.toString())}_serialize(){const e=Object.create(null);for(const[t,i]of this._cache){const s=new Set;for(const o of i.data.lenses)s.add(o.symbol.range.startLineNumber);e[t]={lineCount:i.lineCount,lines:[...s.values()]}}return JSON.stringify(e)}_deserialize(e){try{const t=JSON.parse(e);for(const i in t){const s=t[i],o=[];for(const m of s.lines)o.push({range:new St.Q(m,1,m,11)});const c=new Na;c.add({lenses:o,dispose(){}},this._fakeProvider),this._cache.set(i,new Rs(s.lineCount,c))}}catch{}}};js=un([Xn(0,fo.CS)],js),(0,nr.v)(us,js);var Zs=f(91818),sr=f(8322);class ul{constructor(e,t,i){this.afterColumn=1073741824,this.afterLineNumber=e,this.heightInPx=t,this._onHeight=i,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")}}class gl{constructor(e,t,i){this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._commands=new Map,this._isEmpty=!0,this._editor=e,this._id=`codelens.widget-${gl._idPool++}`,this.updatePosition(i),this._domNode=document.createElement("span"),this._domNode.className=`codelens-decoration ${t}`}withCommands(e,t){this._commands.clear();const i=[];let s=!1;for(let o=0;o<e.length;o++){const c=e[o];if(c&&(s=!0,c.command)){const m=(0,Zs.n)(c.command.title.trim());c.command.id?(i.push(M.$("a",{id:String(o),title:c.command.tooltip,role:"button"},...m)),this._commands.set(String(o),c.command)):i.push(M.$("span",{title:c.command.tooltip},...m)),o+1<e.length&&i.push(M.$("span",void 0,"\xA0|\xA0"))}}s?(M.Ln(this._domNode,...i),this._isEmpty&&t&&this._domNode.classList.add("fadein"),this._isEmpty=!1):M.Ln(this._domNode,M.$("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 t=this._editor.getModel().getLineFirstNonWhitespaceColumn(e);this._widgetPosition={position:{lineNumber:e,column:t},preference:[1]}}getPosition(){return this._widgetPosition||null}}gl._idPool=0;class fl{constructor(){this._removeDecorations=[],this._addDecorations=[],this._addDecorationsCallbacks=[]}addDecoration(e,t){this._addDecorations.push(e),this._addDecorationsCallbacks.push(t)}removeDecoration(e){this._removeDecorations.push(e)}commit(e){const t=e.deltaDecorations(this._removeDecorations,this._addDecorations);for(let i=0,s=t.length;i<s;i++)this._addDecorationsCallbacks[i](t[i])}}class fc{constructor(e,t,i,s,o,c,m){this._isDisposed=!1,this._editor=t,this._className=i,this._data=e,this._decorationIds=[];let A;const U=[];this._data.forEach((W,re)=>{W.symbol.command&&U.push(W.symbol),s.addDecoration({range:W.symbol.range,options:sn.kI.EMPTY},Se=>this._decorationIds[re]=Se),A?A=St.Q.plusRange(A,W.symbol.range):A=St.Q.lift(W.symbol.range)}),this._viewZone=new ul(A.startLineNumber-1,c,m),this._viewZoneId=o.addZone(this._viewZone),U.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(U,!1))}_createContentWidgetIfNecessary(){this._contentWidget?this._editor.layoutContentWidget(this._contentWidget):(this._contentWidget=new gl(this._editor,this._className,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))}dispose(e,t){this._decorationIds.forEach(e.removeDecoration,e),this._decorationIds=[],t?.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,t)=>{const i=this._editor.getModel().getDecorationRange(e),s=this._data[t].symbol;return!!(i&&St.Q.isEmpty(s.range)===i.isEmpty())})}updateCodeLensSymbols(e,t){this._decorationIds.forEach(t.removeDecoration,t),this._decorationIds=[],this._data=e,this._data.forEach((i,s)=>{t.addDecoration({range:i.symbol.range,options:sn.kI.EMPTY},o=>this._decorationIds[s]=o)})}updateHeight(e,t){this._viewZone.heightInPx=e,t.layoutZone(this._viewZoneId),this._contentWidget&&this._editor.layoutContentWidget(this._contentWidget)}computeIfNecessary(e){if(!this._viewZone.isVisible())return null;for(let t=0;t<this._decorationIds.length;t++){const i=e.getDecorationRange(this._decorationIds[t]);i&&(this._data[t].symbol.range=i)}return this._data}updateCommands(e){this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(e,!0);for(let t=0;t<this._data.length;t++){const i=e[t];if(i){const{symbol:s}=this._data[t];s.command=i.command||s.command}}}getCommand(e){var t;return(t=this._contentWidget)===null||t===void 0?void 0:t.getCommand(e)}getLineNumber(){const e=this._editor.getModel().getDecorationRange(this._decorationIds[0]);return e?e.startLineNumber:-1}update(e){if(this.isValid()){const t=this._editor.getModel().getDecorationRange(this._decorationIds[0]);t&&(this._viewZone.afterLineNumber=t.startLineNumber-1,e.layoutZone(this._viewZoneId),this._contentWidget&&(this._contentWidget.updatePosition(t.startLineNumber),this._editor.layoutContentWidget(this._contentWidget)))}}}var $r=f(73027),Lo=f(12060),Ta=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},ga=function(u,e){return function(t,i){e(t,i,u)}},Nh=function(u,e,t,i){function s(o){return o instanceof t?o:new t(function(c){c(o)})}return new(t||(t=Promise))(function(o,c){function m(W){try{U(i.next(W))}catch(re){c(re)}}function A(W){try{U(i.throw(W))}catch(re){c(re)}}function U(W){W.done?o(W.value):s(W.value).then(m,A)}U((i=i.apply(u,e||[])).next())})};let Gr=class{constructor(e,t,i,s,o,c){this._editor=e,this._languageFeaturesService=t,this._commandService=s,this._notificationService=o,this._codeLensCache=c,this._disposables=new at.Cm,this._localToDispose=new at.Cm,this._lenses=[],this._oldCodeLensModels=new at.Cm,this._provideCodeLensDebounce=i.for(t.codeLensProvider,"CodeLensProvide",{min:250}),this._resolveCodeLensesDebounce=i.for(t.codeLensProvider,"CodeLensResolve",{min:250,salt:"resolve"}),this._resolveCodeLensesScheduler=new Ot.uC(()=>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(m=>{(m.hasChanged(46)||m.hasChanged(16)||m.hasChanged(15))&&this._updateLensStyle(),m.hasChanged(14)&&this._onModelChange()})),this._disposables.add(t.codeLensProvider.onDidChange(this._onModelChange,this)),this._onModelChange(),this._styleClassName="_"+(0,tr.tW)(this._editor.getId()).toString(16),this._styleElement=M.li(M.Cl(this._editor.getContainerDomNode())?this._editor.getContainerDomNode():void 0),this._updateLensStyle()}dispose(){var e;this._localDispose(),this._disposables.dispose(),this._oldCodeLensModels.dispose(),(e=this._currentCodeLensModel)===null||e===void 0||e.dispose(),this._styleElement.remove()}_getLayoutInfo(){const e=Math.max(1.3,this._editor.getOption(61)/this._editor.getOption(48));let t=this._editor.getOption(16);return(!t||t<5)&&(t=this._editor.getOption(48)*.9|0),{fontSize:t,codeLensHeight:t*e|0}}_updateLensStyle(){const{codeLensHeight:e,fontSize:t}=this._getLayoutInfo(),i=this._editor.getOption(15),s=this._editor.getOption(46),o=`--codelens-font-family${this._styleClassName}`,c=`--codelens-font-features${this._styleClassName}`;let m=` .monaco-editor .codelens-decoration.${this._styleClassName} { line-height: ${e}px; font-size: ${t}px; padding-right: ${Math.round(t*.5)}px; font-feature-settings: var(${c}) } .monaco-editor .codelens-decoration.${this._styleClassName} span.codicon { line-height: ${e}px; font-size: ${t}px; } `;i&&(m+=`.monaco-editor .codelens-decoration.${this._styleClassName} { font-family: var(${o}), ${ds.jU.fontFamily}}`),this._styleElement.textContent=m,this._editor.getContainerDomNode().style.setProperty(o,i??"inherit"),this._editor.getContainerDomNode().style.setProperty(c,s.fontFeatureSettings),this._editor.changeViewZones(A=>{for(const U of this._lenses)U.updateHeight(e,A)})}_localDispose(){var e,t,i;(e=this._getCodeLensModelPromise)===null||e===void 0||e.cancel(),this._getCodeLensModelPromise=void 0,(t=this._resolveCodeLensesPromise)===null||t===void 0||t.cancel(),this._resolveCodeLensesPromise=void 0,this._localToDispose.clear(),this._oldCodeLensModels.clear(),(i=this._currentCodeLensModel)===null||i===void 0||i.dispose()}_onModelChange(){this._localDispose();const e=this._editor.getModel();if(!e||!this._editor.getOption(14))return;const t=this._codeLensCache.get(e);if(t&&this._renderCodeLensSymbols(t),!this._languageFeaturesService.codeLensProvider.has(e)){t&&this._localToDispose.add((0,Ot.EQ)(()=>{const s=this._codeLensCache.get(e);t===s&&(this._codeLensCache.delete(e),this._onModelChange())},30*1e3));return}for(const s of this._languageFeaturesService.codeLensProvider.all(e))if(typeof s.onDidChange=="function"){const o=s.onDidChange(()=>i.schedule());this._localToDispose.add(o)}const i=new Ot.uC(()=>{var s;const o=Date.now();(s=this._getCodeLensModelPromise)===null||s===void 0||s.cancel(),this._getCodeLensModelPromise=(0,Ot.SS)(c=>Ma(this._languageFeaturesService.codeLensProvider,e,c)),this._getCodeLensModelPromise.then(c=>{this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel),this._currentCodeLensModel=c,this._codeLensCache.put(e,c);const m=this._provideCodeLensDebounce.update(e,Date.now()-o);i.delay=m,this._renderCodeLensSymbols(c),this._resolveCodeLensesInViewportSoon()},Wi.dz)},this._provideCodeLensDebounce.get(e));this._localToDispose.add(i),this._localToDispose.add((0,at.s)(()=>this._resolveCodeLensesScheduler.cancel())),this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._editor.changeDecorations(s=>{this._editor.changeViewZones(o=>{const c=[];let m=-1;this._lenses.forEach(U=>{!U.isValid()||m===U.getLineNumber()?c.push(U):(U.update(o),m=U.getLineNumber())});const A=new fl;c.forEach(U=>{U.dispose(A,o),this._lenses.splice(this._lenses.indexOf(U),1)}),A.commit(s)})}),i.schedule()})),this._localToDispose.add(this._editor.onDidFocusEditorWidget(()=>{i.schedule()})),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((0,at.s)(()=>{if(this._editor.getModel()){const s=yo.D.capture(this._editor);this._editor.changeDecorations(o=>{this._editor.changeViewZones(c=>{this._disposeAllLenses(o,c)})}),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 o=s.target.element;if(o?.tagName==="SPAN"&&(o=o.parentElement),o?.tagName==="A")for(const c of this._lenses){const m=c.getCommand(o);if(m){this._commandService.executeCommand(m.id,...m.arguments||[]).catch(A=>this._notificationService.error(A));break}}})),i.schedule()}_disposeAllLenses(e,t){const i=new fl;for(const s of this._lenses)s.dispose(i,t);e&&i.commit(e),this._lenses.length=0}_renderCodeLensSymbols(e){if(!this._editor.hasModel())return;const t=this._editor.getModel().getLineCount(),i=[];let s;for(const m of e.lenses){const A=m.symbol.range.startLineNumber;A<1||A>t||(s&&s[s.length-1].symbol.range.startLineNumber===A?s.push(m):(s=[m],i.push(s)))}const o=yo.D.capture(this._editor),c=this._getLayoutInfo();this._editor.changeDecorations(m=>{this._editor.changeViewZones(A=>{const U=new fl;let W=0,re=0;for(;re<i.length&&W<this._lenses.length;){const Se=i[re][0].symbol.range.startLineNumber,Be=this._lenses[W].getLineNumber();Be<Se?(this._lenses[W].dispose(U,A),this._lenses.splice(W,1)):Be===Se?(this._lenses[W].updateCodeLensSymbols(i[re],U),re++,W++):(this._lenses.splice(W,0,new fc(i[re],this._editor,this._styleClassName,U,A,c.codeLensHeight,()=>this._resolveCodeLensesInViewportSoon())),W++,re++)}for(;W<this._lenses.length;)this._lenses[W].dispose(U,A),this._lenses.splice(W,1);for(;re<i.length;)this._lenses.push(new fc(i[re],this._editor,this._styleClassName,U,A,c.codeLensHeight,()=>this._resolveCodeLensesInViewportSoon())),re++;U.commit(m)})}),o.restore(this._editor)}_resolveCodeLensesInViewportSoon(){this._editor.getModel()&&this._resolveCodeLensesScheduler.schedule()}_resolveCodeLensesInViewport(){var e;(e=this._resolveCodeLensesPromise)===null||e===void 0||e.cancel(),this._resolveCodeLensesPromise=void 0;const t=this._editor.getModel();if(!t)return;const i=[],s=[];if(this._lenses.forEach(m=>{const A=m.computeIfNecessary(t);A&&(i.push(A),s.push(m))}),i.length===0)return;const o=Date.now(),c=(0,Ot.SS)(m=>{const A=i.map((U,W)=>{const re=new Array(U.length),Se=U.map((Be,Qe)=>!Be.symbol.command&&typeof Be.provider.resolveCodeLens=="function"?Promise.resolve(Be.provider.resolveCodeLens(t,Be.symbol,m)).then(tt=>{re[Qe]=tt},Wi.M_):(re[Qe]=Be.symbol,Promise.resolve(void 0)));return Promise.all(Se).then(()=>{!m.isCancellationRequested&&!s[W].isDisposed()&&s[W].updateCommands(re)})});return Promise.all(A)});this._resolveCodeLensesPromise=c,this._resolveCodeLensesPromise.then(()=>{const m=this._resolveCodeLensesDebounce.update(t,Date.now()-o);this._resolveCodeLensesScheduler.delay=m,this._currentCodeLensModel&&this._codeLensCache.put(t,this._currentCodeLensModel),this._oldCodeLensModels.clear(),c===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)},m=>{(0,Wi.dz)(m),c===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)})}getModel(){return this._currentCodeLensModel}};Gr.ID="css.editor.codeLens",Gr=Ta([ga(1,Zi.u),ga(2,Lo.U),ga(3,fn.wT),ga(4,Cs.Ot),ga(5,us)],Gr),(0,Te.HW)(Gr.ID,Gr),(0,Te.Fl)(class extends Te.ks{constructor(){super({id:"codelens.showLensesInCurrentLine",precondition:ze.R.hasCodeLensProvider,label:(0,we.kg)("showLensOnLine","Show CodeLens Commands For Current Line"),alias:"Show CodeLens Commands For Current Line"})}run(e,t){return Nh(this,void 0,void 0,function*(){if(!t.hasModel())return;const i=e.get($r.GK),s=e.get(fn.wT),o=e.get(Cs.Ot),c=t.getSelection().positionLineNumber,m=t.getContribution(Gr.ID);if(!m)return;const A=m.getModel();if(!A)return;const U=[];for(const re of A.lenses)re.symbol.command&&re.symbol.range.startLineNumber===c&&U.push({label:re.symbol.command.title,command:re.symbol.command});if(U.length===0)return;const W=yield i.pick(U,{canPickMany:!1});if(W){if(A.isDisposed)return yield s.executeCommand(this.id);try{yield s.executeCommand(W.command.id,...W.command.arguments||[])}catch(re){o.error(re)}}})}});var Dn=f(94901),Ys=f(23013),Qr=f(58574);function cs(u,e,t){const i=[],o=u.ordered(e).reverse().map(c=>Promise.resolve(c.provideDocumentColors(e,t)).then(m=>{if(Array.isArray(m))for(const A of m)i.push({colorInfo:A,provider:c})}));return Promise.all(o).then(()=>i)}function ml(u,e,t,i){return Promise.resolve(t.provideColorPresentations(u,e,i))}fn.wb.registerCommand("_executeDocumentColorProvider",function(u,...e){const[t]=e;if(!(t instanceof vn.r))throw(0,Wi.Qg)();const{colorProvider:i}=u.get(Zi.u),s=u.get(ws.S).getModel(t);if(!s)throw(0,Wi.Qg)();const o=[],m=i.ordered(s).reverse().map(A=>Promise.resolve(A.provideDocumentColors(s,Ti.X.None)).then(U=>{if(Array.isArray(U))for(const W of U)o.push({range:W.range,color:[W.color.red,W.color.green,W.color.blue,W.color.alpha]})}));return Promise.all(m).then(()=>o)}),fn.wb.registerCommand("_executeColorPresentationProvider",function(u,...e){const[t,i]=e,{uri:s,range:o}=i;if(!(s instanceof vn.r)||!Array.isArray(t)||t.length!==4||!St.Q.isIRange(o))throw(0,Wi.Qg)();const[c,m,A,U]=t,{colorProvider:W}=u.get(Zi.u),re=u.get(ws.S).getModel(s);if(!re)throw(0,Wi.Qg)();const Se={range:o,color:{red:c,green:m,blue:A,alpha:U}},Be=[],tt=W.ordered(re).reverse().map(vt=>Promise.resolve(vt.provideColorPresentations(re,Se,Ti.X.None)).then(Ht=>{Array.isArray(Ht)&&Be.push(...Ht)}));return Promise.all(tt).then(()=>Be)});var pl=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},cd=function(u,e){return function(t,i){e(t,i,u)}},Mh=function(u,e,t,i){function s(o){return o instanceof t?o:new t(function(c){c(o)})}return new(t||(t=Promise))(function(o,c){function m(W){try{U(i.next(W))}catch(re){c(re)}}function A(W){try{U(i.throw(W))}catch(re){c(re)}}function U(W){W.done?o(W.value):s(W.value).then(m,A)}U((i=i.apply(u,e||[])).next())})};const mc=Object.create({}),Th=500;let Go=class aC extends at.jG{constructor(e,t,i,s){super(),this._editor=e,this._configurationService=t,this._languageFeaturesService=i,this._localToDispose=this._register(new at.Cm),this._decorationsIds=[],this._colorDatas=new Map,this._colorDecoratorIds=this._editor.createDecorationsCollection(),this._ruleFactory=new Qr.Qn(this._editor),this._colorDecorationClassRefs=this._register(new at.Cm),this._debounceInformation=s.for(i.colorProvider,"Document Colors",{min:aC.RECOMPUTE_TIME}),this._register(e.onDidChangeModel(()=>{this._isEnabled=this.isEnabled(),this.onModelChanged()})),this._register(e.onDidChangeModelLanguage(()=>this.onModelChanged())),this._register(i.colorProvider.onDidChange(()=>this.onModelChanged())),this._register(e.onDidChangeConfiguration(()=>{const o=this._isEnabled;this._isEnabled=this.isEnabled(),o!==this._isEnabled&&(this._isEnabled?this.onModelChanged():this.removeAllDecorations())})),this._timeoutTimer=null,this._computePromise=null,this._isEnabled=this.isEnabled(),this.onModelChanged()}isEnabled(){const e=this._editor.getModel();if(!e)return!1;const t=e.getLanguageId(),i=this._configurationService.getValue(t);if(i&&typeof i=="object"){const s=i.colorDecorators;if(s&&s.enable!==void 0&&!s.enable)return s.enable}return this._editor.getOption(17)}static get(e){return e.getContribution(this.ID)}dispose(){this.stop(),this.removeAllDecorations(),super.dispose()}onModelChanged(){if(this.stop(),!this._isEnabled)return;const e=this._editor.getModel();!e||!this._languageFeaturesService.colorProvider.has(e)||(this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._timeoutTimer||(this._timeoutTimer=new Ot.pc,this._timeoutTimer.cancelAndSet(()=>{this._timeoutTimer=null,this.beginCompute()},this._debounceInformation.get(e)))})),this.beginCompute())}beginCompute(){this._computePromise=(0,Ot.SS)(e=>Mh(this,void 0,void 0,function*(){const t=this._editor.getModel();if(!t)return Promise.resolve([]);const i=new Ys.W(!1),s=yield cs(this._languageFeaturesService.colorProvider,t,e);return this._debounceInformation.update(t,i.elapsed()),s})),this._computePromise.then(e=>{this.updateDecorations(e),this.updateColorDecorators(e),this._computePromise=null},Wi.dz)}stop(){this._timeoutTimer&&(this._timeoutTimer.cancel(),this._timeoutTimer=null),this._computePromise&&(this._computePromise.cancel(),this._computePromise=null),this._localToDispose.clear()}updateDecorations(e){const t=e.map(i=>({range:{startLineNumber:i.colorInfo.range.startLineNumber,startColumn:i.colorInfo.range.startColumn,endLineNumber:i.colorInfo.range.endLineNumber,endColumn:i.colorInfo.range.endColumn},options:sn.kI.EMPTY}));this._editor.changeDecorations(i=>{this._decorationsIds=i.deltaDecorations(this._decorationsIds,t),this._colorDatas=new Map,this._decorationsIds.forEach((s,o)=>this._colorDatas.set(s,e[o]))})}updateColorDecorators(e){this._colorDecorationClassRefs.clear();const t=[];for(let i=0;i<e.length&&t.length<Th;i++){const{red:s,green:o,blue:c,alpha:m}=e[i].colorInfo.color,A=new Dn.bU(Math.round(s*255),Math.round(o*255),Math.round(c*255),m),U=`rgba(${A.r}, ${A.g}, ${A.b}, ${A.a})`,W=this._colorDecorationClassRefs.add(this._ruleFactory.createClassNameRef({backgroundColor:U}));t.push({range:{startLineNumber:e[i].colorInfo.range.startLineNumber,startColumn:e[i].colorInfo.range.startColumn,endLineNumber:e[i].colorInfo.range.endLineNumber,endColumn:e[i].colorInfo.range.endColumn},options:{description:"colorDetector",before:{content:xi.S8,inlineClassName:`${W.className} colorpicker-color-decoration`,inlineClassNameAffectsLetterSpacing:!0,attachedData:mc}}})}this._colorDecoratorIds.set(t)}removeAllDecorations(){this._editor.removeDecorations(this._decorationsIds),this._decorationsIds=[],this._colorDecoratorIds.clear(),this._colorDecorationClassRefs.clear()}getColorData(e){const t=this._editor.getModel();if(!t)return null;const i=t.getDecorationsInRange(St.Q.fromPositions(e,e)).filter(s=>this._colorDatas.has(s.id));return i.length===0?null:this._colorDatas.get(i[0].id)}isColorDecoration(e){return this._colorDecoratorIds.has(e)}};Go.ID="editor.contrib.colorDetector",Go.RECOMPUTE_TIME=1e3,Go=pl([cd(1,de.pG),cd(2,Zi.u),cd(3,Lo.U)],Go),(0,Te.HW)(Go.ID,Go);class pc{constructor(e,t,i){this.presentationIndex=i,this._onColorFlushed=new Vi.vl,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new Vi.vl,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new Vi.vl,this.onDidChangePresentation=this._onDidChangePresentation.event,this.originalColor=e,this._color=e,this._colorPresentations=t}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)}selectNextColorPresentation(){this.presentationIndex=(this.presentationIndex+1)%this.colorPresentations.length,this.flushColor(),this._onDidChangePresentation.fire(this.presentation)}guessColorPresentation(e,t){for(let i=0;i<this.colorPresentations.length;i++)if(t.toLowerCase()===this.colorPresentations[i].label){this.presentationIndex=i,this._onDidChangePresentation.fire(this.presentation);break}}flushColor(){this._onColorFlushed.fire(this._color)}}var fa=f(10176),Cr=f(45222),_c=f(51580);const Mo=M.$;class vc extends at.jG{constructor(e,t,i){super(),this.model=t,this.domNode=Mo(".colorpicker-header"),M.BC(e,this.domNode),this.pickedColorNode=M.BC(this.domNode,Mo(".picked-color"));const s=(0,we.kg)("clickToToggleColorOptions","Click to toggle color options (rgb/hsl/hex)");this.pickedColorNode.setAttribute("title",s);const o=M.BC(this.domNode,Mo(".original-color"));o.style.backgroundColor=Dn.Q1.Format.CSS.format(this.model.originalColor)||"",this.backgroundColor=i.getColorTheme().getColor(Ce.WfR)||Dn.Q1.white,this._register((0,Ye.zy)((c,m)=>{this.backgroundColor=c.getColor(Ce.WfR)||Dn.Q1.white})),this._register(M.ko(this.pickedColorNode,M.Bx.CLICK,()=>this.model.selectNextColorPresentation())),this._register(M.ko(o,M.Bx.CLICK,()=>{this.model.color=this.model.originalColor,this.model.flushColor()})),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this._register(t.onDidChangePresentation(this.onDidChangePresentation,this)),this.pickedColorNode.style.backgroundColor=Dn.Q1.Format.CSS.format(t.color)||"",this.pickedColorNode.classList.toggle("light",t.color.rgba.a<.5?this.backgroundColor.isLighter():t.color.isLighter()),this.onDidChangeColor(this.model.color)}onDidChangeColor(e){this.pickedColorNode.style.backgroundColor=Dn.Q1.Format.CSS.format(e)||"",this.pickedColorNode.classList.toggle("light",e.rgba.a<.5?this.backgroundColor.isLighter():e.isLighter()),this.onDidChangePresentation()}onDidChangePresentation(){this.pickedColorNode.textContent=this.model.presentation?this.model.presentation.label:"",this.pickedColorNode.prepend(Mo(".codicon.codicon-color-mode"))}}class hd extends at.jG{constructor(e,t,i){super(),this.model=t,this.pixelRatio=i,this.domNode=Mo(".colorpicker-body"),M.BC(e,this.domNode),this.saturationBox=new Ra(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 Aa(this.domNode,this.model),this._register(this.opacityStrip),this._register(this.opacityStrip.onDidChange(this.onDidOpacityChange,this)),this._register(this.opacityStrip.onColorFlushed(this.flushColor,this)),this.hueStrip=new Oa(this.domNode,this.model),this._register(this.hueStrip),this._register(this.hueStrip.onDidChange(this.onDidHueChange,this)),this._register(this.hueStrip.onColorFlushed(this.flushColor,this))}flushColor(){this.model.flushColor()}onDidSaturationValueChange({s:e,v:t}){const i=this.model.color.hsva;this.model.color=new Dn.Q1(new Dn.$J(i.h,e,t,i.a))}onDidOpacityChange(e){const t=this.model.color.hsva;this.model.color=new Dn.Q1(new Dn.$J(t.h,t.s,t.v,e))}onDidHueChange(e){const t=this.model.color.hsva,i=(1-e)*360;this.model.color=new Dn.Q1(new Dn.$J(i===360?0:i,t.s,t.v,t.a))}layout(){this.saturationBox.layout(),this.opacityStrip.layout(),this.hueStrip.layout()}}class Ra extends at.jG{constructor(e,t,i){super(),this.model=t,this.pixelRatio=i,this._onDidChange=new Vi.vl,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new Vi.vl,this.onColorFlushed=this._onColorFlushed.event,this.domNode=Mo(".saturation-wrap"),M.BC(e,this.domNode),this.canvas=document.createElement("canvas"),this.canvas.className="saturation-box",M.BC(this.domNode,this.canvas),this.selection=Mo(".saturation-selection"),M.BC(this.domNode,this.selection),this.layout(),this._register(M.ko(this.domNode,M.Bx.POINTER_DOWN,s=>this.onPointerDown(s))),this._register(this.model.onDidChangeColor(this.onDidChangeColor,this)),this.monitor=null}onPointerDown(e){if(!e.target||!(e.target instanceof Element))return;this.monitor=this._register(new fa._);const t=M.BK(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-t.left,s.pageY-t.top),()=>null);const i=M.ko(document,M.Bx.POINTER_UP,()=>{this._onColorFlushed.fire(),i.dispose(),this.monitor&&(this.monitor.stopMonitoring(!0),this.monitor=null)},!0)}onDidChangePosition(e,t){const i=Math.max(0,Math.min(1,e/this.width)),s=Math.max(0,Math.min(1,1-t/this.height));this.paintSelection(i,s),this._onDidChange.fire({s:i,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,t=new Dn.Q1(new Dn.$J(e.h,1,1,1)),i=this.canvas.getContext("2d"),s=i.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 o=i.createLinearGradient(0,0,0,this.canvas.height);o.addColorStop(0,"rgba(0, 0, 0, 0)"),o.addColorStop(1,"rgba(0, 0, 0, 1)"),i.rect(0,0,this.canvas.width,this.canvas.height),i.fillStyle=Dn.Q1.Format.CSS.format(t),i.fill(),i.fillStyle=s,i.fill(),i.fillStyle=o,i.fill()}paintSelection(e,t){this.selection.style.left=`${e*this.width}px`,this.selection.style.top=`${this.height-t*this.height}px`}onDidChangeColor(){this.monitor&&this.monitor.isMonitoring()||this.paint()}}class br extends at.jG{constructor(e,t){super(),this.model=t,this._onDidChange=new Vi.vl,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new Vi.vl,this.onColorFlushed=this._onColorFlushed.event,this.domNode=M.BC(e,Mo(".strip")),this.overlay=M.BC(this.domNode,Mo(".overlay")),this.slider=M.BC(this.domNode,Mo(".slider")),this.slider.style.top="0px",this._register(M.ko(this.domNode,M.Bx.POINTER_DOWN,i=>this.onPointerDown(i))),this.layout()}layout(){this.height=this.domNode.offsetHeight-this.slider.offsetHeight;const e=this.getValue(this.model.color);this.updateSliderPosition(e)}onPointerDown(e){if(!e.target||!(e.target instanceof Element))return;const t=this._register(new fa._),i=M.BK(this.domNode);this.domNode.classList.add("grabbing"),e.target!==this.slider&&this.onDidChangeTop(e.offsetY),t.startMonitoring(e.target,e.pointerId,e.buttons,o=>this.onDidChangeTop(o.pageY-i.top),()=>null);const s=M.ko(document,M.Bx.POINTER_UP,()=>{this._onColorFlushed.fire(),s.dispose(),t.stopMonitoring(!0),this.domNode.classList.remove("grabbing")},!0)}onDidChangeTop(e){const t=Math.max(0,Math.min(1,1-e/this.height));this.updateSliderPosition(t),this._onDidChange.fire(t)}updateSliderPosition(e){this.slider.style.top=`${(1-e)*this.height}px`}}class Aa extends br{constructor(e,t){super(e,t),this.domNode.classList.add("opacity-strip"),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this.onDidChangeColor(this.model.color)}onDidChangeColor(e){const{r:t,g:i,b:s}=e.rgba,o=new Dn.Q1(new Dn.bU(t,i,s,1)),c=new Dn.Q1(new Dn.bU(t,i,s,0));this.overlay.style.background=`linear-gradient(to bottom, ${o} 0%, ${c} 100%)`}getValue(e){return e.hsva.a}}class Oa extends br{constructor(e,t){super(e,t),this.domNode.classList.add("hue-strip")}getValue(e){return 1-e.hsva.h/360}}class _l extends Cr.x{constructor(e,t,i,s){super(),this.model=t,this.pixelRatio=i,this._register(qi.PixelRatio.onDidChange(()=>this.layout()));const o=Mo(".colorpicker-widget");e.appendChild(o);const c=new vc(o,this.model,s);this.body=new hd(o,this.model,this.pixelRatio),this._register(c),this._register(this.body)}layout(){this.body.layout()}}var ma=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},vl=function(u,e){return function(t,i){e(t,i,u)}},ud=function(u,e,t,i){function s(o){return o instanceof t?o:new t(function(c){c(o)})}return new(t||(t=Promise))(function(o,c){function m(W){try{U(i.next(W))}catch(re){c(re)}}function A(W){try{U(i.throw(W))}catch(re){c(re)}}function U(W){W.done?o(W.value):s(W.value).then(m,A)}U((i=i.apply(u,e||[])).next())})};class Cc{constructor(e,t,i,s){this.owner=e,this.range=t,this.model=i,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 Cl=class{constructor(e,t){this._editor=e,this._themeService=t,this.hoverOrdinal=1}computeSync(e,t){return[]}computeAsync(e,t,i){return Ot.AE.fromPromise(this._computeAsync(e,t,i))}_computeAsync(e,t,i){return ud(this,void 0,void 0,function*(){if(!this._editor.hasModel())return[];const s=Go.get(this._editor);if(!s)return[];for(const o of t){if(!s.isColorDecoration(o))continue;const c=s.getColorData(o.range.getStartPosition());if(c)return[yield this._createColorHover(this._editor.getModel(),c.colorInfo,c.provider)]}return[]})}_createColorHover(e,t,i){return ud(this,void 0,void 0,function*(){const s=e.getValueInRange(t.range),{red:o,green:c,blue:m,alpha:A}=t.color,U=new Dn.bU(Math.round(o*255),Math.round(c*255),Math.round(m*255),A),W=new Dn.Q1(U),re=yield ml(e,t,i,Ti.X.None),Se=new pc(W,[],0);return Se.colorPresentations=re||[],Se.guessColorPresentation(W,s),new Cc(this,St.Q.lift(t.range),Se,i)})}renderHoverParts(e,t){if(t.length===0||!this._editor.hasModel())return at.jG.None;const i=new at.Cm,s=t[0],o=this._editor.getModel(),c=s.model,m=i.add(new _l(e.fragment,c,this._editor.getOption(131),this._themeService));e.setColorPicker(m);let A=new St.Q(s.range.startLineNumber,s.range.startColumn,s.range.endLineNumber,s.range.endColumn);const U=()=>{let re,Se;if(c.presentation.textEdit){re=[c.presentation.textEdit],Se=new St.Q(c.presentation.textEdit.range.startLineNumber,c.presentation.textEdit.range.startColumn,c.presentation.textEdit.range.endLineNumber,c.presentation.textEdit.range.endColumn);const Be=this._editor.getModel()._setTrackedRange(null,Se,3);this._editor.pushUndoStop(),this._editor.executeEdits("colorpicker",re),Se=this._editor.getModel()._getTrackedRange(Be)||Se}else re=[{range:A,text:c.presentation.label,forceMoveMarkers:!1}],Se=A.setEndPosition(A.endLineNumber,A.startColumn+c.presentation.label.length),this._editor.pushUndoStop(),this._editor.executeEdits("colorpicker",re);c.presentation.additionalTextEdits&&(re=[...c.presentation.additionalTextEdits],this._editor.executeEdits("colorpicker",re),e.hide()),this._editor.pushUndoStop(),A=Se},W=re=>ml(o,{range:A,color:{red:re.rgba.r/255,green:re.rgba.g/255,blue:re.rgba.b/255,alpha:re.rgba.a}},s.provider,Ti.X.None).then(Se=>{c.colorPresentations=Se||[]});return i.add(c.onColorFlushed(re=>{W(re).then(U)})),i.add(c.onDidChangeColor(W)),i}};Cl=ma([vl(1,Ye.Gy)],Cl);var Fs=f(77922),Pa=f(30568),Hs=f(37042);function Fa(u,e){return!!u[e]}class Ba{constructor(e,t){this.target=e.target,this.hasTriggerModifier=Fa(e.event,t.triggerModifier),this.hasSideBySideModifier=Fa(e.event,t.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=e.event.detail<=1}}class Wa{constructor(e,t){this.keyCodeIsTriggerKey=e.keyCode===t.triggerKey,this.keyCodeIsSideBySideKey=e.keyCode===t.triggerSideBySideKey,this.hasTriggerModifier=Fa(e,t.triggerModifier)}}class Qo{constructor(e,t,i,s){this.triggerKey=e,this.triggerModifier=t,this.triggerSideBySideKey=i,this.triggerSideBySideModifier=s}equals(e){return this.triggerKey===e.triggerKey&&this.triggerModifier===e.triggerModifier&&this.triggerSideBySideKey===e.triggerSideBySideKey&&this.triggerSideBySideModifier===e.triggerSideBySideModifier}}function bl(u){return u==="altKey"?Pi.zx?new Qo(57,"metaKey",6,"altKey"):new Qo(5,"ctrlKey",6,"altKey"):Pi.zx?new Qo(6,"altKey",57,"metaKey"):new Qo(6,"altKey",5,"ctrlKey")}class wl extends at.jG{constructor(e){super(),this._onMouseMoveOrRelevantKeyDown=this._register(new Vi.vl),this.onMouseMoveOrRelevantKeyDown=this._onMouseMoveOrRelevantKeyDown.event,this._onExecute=this._register(new Vi.vl),this.onExecute=this._onExecute.event,this._onCancel=this._register(new Vi.vl),this.onCancel=this._onCancel.event,this._editor=e,this._opts=bl(this._editor.getOption(72)),this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._register(this._editor.onDidChangeConfiguration(t=>{if(t.hasChanged(72)){const i=bl(this._editor.getOption(72));if(this._opts.equals(i))return;this._opts=i,this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._onCancel.fire()}})),this._register(this._editor.onMouseMove(t=>this._onEditorMouseMove(new Ba(t,this._opts)))),this._register(this._editor.onMouseDown(t=>this._onEditorMouseDown(new Ba(t,this._opts)))),this._register(this._editor.onMouseUp(t=>this._onEditorMouseUp(new Ba(t,this._opts)))),this._register(this._editor.onKeyDown(t=>this._onEditorKeyDown(new Wa(t,this._opts)))),this._register(this._editor.onKeyUp(t=>this._onEditorKeyUp(new Wa(t,this._opts)))),this._register(this._editor.onMouseDrag(()=>this._resetHandler())),this._register(this._editor.onDidChangeCursorSelection(t=>this._onDidChangeCursorSelection(t))),this._register(this._editor.onDidChangeModel(t=>this._resetHandler())),this._register(this._editor.onDidChangeModelContent(()=>this._resetHandler())),this._register(this._editor.onDidScrollChange(t=>{(t.scrollTopChanged||t.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=e.target.position?e.target.position.lineNumber:0}_onEditorMouseUp(e){const t=e.target.position?e.target.position.lineNumber:0;this._hasTriggerKeyOnMouseDown&&this._lineNumberOnMouseDown&&this._lineNumberOnMouseDown===t&&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()}}var Zr=f(77439),Va=f(71386),sg=f(16803),Fo=f(53909),ao=f(52394),Ha=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},To=function(u,e){return function(t,i){e(t,i,u)}};let or=class extends _t.x{constructor(e,t,i,s,o,c,m,A,U,W,re,Se){super(e,Object.assign(Object.assign({},i.getRawOptions()),{overflowWidgetsDomNode:i.getOverflowWidgetsDomNode()}),{},s,o,c,m,A,U,W,re,Se),this._parentEditor=i,this._overwriteOptions=t,super.updateOptions(this._overwriteOptions),this._register(i.onDidChangeConfiguration(Be=>this._onParentConfigurationChanged(Be)))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(e){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(e){Va.co(this._overwriteOptions,e,!0),super.updateOptions(this._overwriteOptions)}};or=Ha([To(3,P._Y),To(4,Gi.T),To(5,fn.wT),To(6,ct.fN),To(7,Ye.Gy),To(8,Cs.Ot),To(9,Fo.j),To(10,ao.JZ),To(11,Zi.u)],or);var Ar=f(86843),wr=f(94664),pa=f(13336);const Sl=new Dn.Q1(new Dn.bU(0,122,204)),_a={showArrow:!0,showFrame:!0,className:"",frameColor:Sl,arrowColor:Sl,keepEditorSelection:!1},Sr="vs.editor.contrib.zoneWidget";class gd{constructor(e,t,i,s,o,c){this.id="",this.domNode=e,this.afterLineNumber=t,this.afterColumn=i,this.heightInLines=s,this._onDomNodeTop=o,this._onComputedHeight=c}onDomNodeTop(e){this._onDomNodeTop(e)}onComputedHeight(e){this._onComputedHeight(e)}}class fd{constructor(e,t){this._id=e,this._domNode=t}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}}class rr{constructor(e){this._editor=e,this._ruleName=rr._IdGenerator.nextId(),this._decorations=this._editor.createDecorationsCollection(),this._color=null,this._height=-1}dispose(){this.hide(),M.U2(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(){M.U2(this._ruleName),M.Wt(`.monaco-editor ${this._ruleName}`,`border-style: solid; border-color: transparent; border-bottom-color: ${this._color}; border-width: ${this._height}px; bottom: -${this._height}px; margin-left: -${this._height}px; `)}show(e){e.column===1&&(e={lineNumber:e.lineNumber,column:2}),this._decorations.set([{range:St.Q.fromPositions(e),options:{description:"zone-widget-arrow",className:this._ruleName,stickiness:1}}])}hide(){this._decorations.clear()}}rr._IdGenerator=new wr.n(".arrow-decoration-");class mo{constructor(e,t={}){this._arrow=null,this._overlayWidget=null,this._resizeSash=null,this._viewZone=null,this._disposables=new at.Cm,this.container=null,this._isShowing=!1,this.editor=e,this._positionMarkerId=this.editor.createDecorationsCollection(),this.options=Va.Go(t),Va.co(this.options,_a,!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(i=>{const s=this._getWidth(i);this.domNode.style.width=s+"px",this.domNode.style.left=this._getLeft(i)+"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 rr(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){if(this.domNode.style.height=`${e}px`,this.container){const t=e-this._decoratingElementsHeight();this.container.style.height=`${t}px`;const i=this.editor.getLayoutInfo();this._doLayout(t,this._getWidth(i))}this._resizeSash&&this._resizeSash.layout()}get position(){const e=this._positionMarkerId.getRange(0);if(e)return e.getStartPosition()}show(e,t){const i=St.Q.isIRange(e)?St.Q.lift(e):St.Q.fromPositions(e);this._isShowing=!0,this._showImpl(i,t),this._isShowing=!1,this._positionMarkerId.set([{range:i,options:sn.kI.EMPTY}])}hide(){this._viewZone&&(this.editor.changeViewZones(e=>{this._viewZone&&e.removeZone(this._viewZone.id)}),this._viewZone=null),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._arrow&&this._arrow.hide()}_decoratingElementsHeight(){const e=this.editor.getOption(61);let t=0;if(this.options.showArrow){const i=Math.round(e/3);t+=2*i}if(this.options.showFrame){const i=Math.round(e/9);t+=2*i}return t}_showImpl(e,t){const i=e.getStartPosition(),s=this.editor.getLayoutInfo(),o=this._getWidth(s);this.domNode.style.width=`${o}px`,this.domNode.style.left=this._getLeft(s)+"px";const c=document.createElement("div");c.style.overflow="hidden";const m=this.editor.getOption(61),A=Math.max(12,this.editor.getLayoutInfo().height/m*.8);t=Math.min(t,A);let U=0,W=0;if(this._arrow&&this.options.showArrow&&(U=Math.round(m/3),this._arrow.height=U,this._arrow.show(i)),this.options.showFrame&&(W=Math.round(m/9)),this.editor.changeViewZones(Be=>{this._viewZone&&Be.removeZone(this._viewZone.id),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this.domNode.style.top="-1000px",this._viewZone=new gd(c,i.lineNumber,i.column,t,Qe=>this._onViewZoneTop(Qe),Qe=>this._onViewZoneHeight(Qe)),this._viewZone.id=Be.addZone(this._viewZone),this._overlayWidget=new fd(Sr+this._viewZone.id,this.domNode),this.editor.addOverlayWidget(this._overlayWidget)}),this.container&&this.options.showFrame){const Be=this.options.frameWidth?this.options.frameWidth:W;this.container.style.borderTopWidth=Be+"px",this.container.style.borderBottomWidth=Be+"px"}const re=t*m-this._decoratingElementsHeight();this.container&&(this.container.style.top=U+"px",this.container.style.height=re+"px",this.container.style.overflow="hidden"),this._doLayout(re,o),this.options.keepEditorSelection||this.editor.setSelection(e);const Se=this.editor.getModel();if(Se){const Be=e.endLineNumber+1;Be<=Se.getLineCount()?this.revealLine(Be,!1):this.revealLine(Se.getLineCount(),!0)}}revealLine(e,t){t?this.editor.revealLineInCenter(e,0):this.editor.revealLine(e,0)}setCssClass(e,t){this.container&&(t&&this.container.classList.remove(t),this.container.classList.add(e))}_onWidth(e){}_doLayout(e,t){}_relayout(e){this._viewZone&&this._viewZone.heightInLines!==e&&this.editor.changeViewZones(t=>{this._viewZone&&(this._viewZone.heightInLines=e,t.layoutZone(this._viewZone.id))})}_initSash(){if(this._resizeSash)return;this._resizeSash=this._disposables.add(new Ar.m(this.domNode,this,{orientation:1})),this.options.isResizeable||(this._resizeSash.state=0);let e;this._disposables.add(this._resizeSash.onDidStart(t=>{this._viewZone&&(e={startY:t.startY,heightInLines:this._viewZone.heightInLines})})),this._disposables.add(this._resizeSash.onDidEnd(()=>{e=void 0})),this._disposables.add(this._resizeSash.onDidChange(t=>{if(e){const i=(t.currentY-e.startY)/this.editor.getOption(61),s=i<0?Math.ceil(i):Math.floor(i),o=e.heightInLines+s;o>5&&o<35&&this._relayout(o)}}))}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 yr=f(87594),Un=f(45854),bc=f(43749);class yl extends p.LN{constructor(e,t){super(),this._onDidChangeVisibility=this._register(new Vi.vl),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this._element=(0,M.BC)(e,(0,M.$)(".monaco-dropdown")),this._label=(0,M.BC)(this._element,(0,M.$)(".dropdown-label"));let i=t.labelRenderer;i||(i=o=>(o.textContent=t.label||"",null));for(const o of[M.Bx.CLICK,M.Bx.MOUSE_DOWN,In.B.Tap])this._register((0,M.ko)(this.element,o,c=>M.fs.stop(c,!0)));for(const o of[M.Bx.MOUSE_DOWN,In.B.Tap])this._register((0,M.ko)(this._label,o,c=>{c instanceof MouseEvent&&(c.detail>1||c.button!==0)||(this.visible?this.hide():this.show())}));this._register((0,M.ko)(this._label,M.Bx.KEY_UP,o=>{const c=new yr.Z(o);(c.equals(3)||c.equals(10))&&(M.fs.stop(o,!0),this.visible?this.hide():this.show())}));const s=i(this._label);s&&this._register(s),this._register(In.q.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 md extends yl{constructor(e,t){super(e,t),this._actions=[],this._contextMenuProvider=t.contextMenuProvider,this.actions=t.actions||[],this.actionProvider=t.actionProvider,this.menuClassName=t.menuClassName||"",this.menuAsChild=!!t.menuAsChild}set menuOptions(e){this._menuOptions=e}get menuOptions(){return this._menuOptions}get actions(){return this.actionProvider?this.actionProvider.getActions():this._actions}set actions(e){this._actions=e}show(){super.show(),this.element.classList.add("active"),this._contextMenuProvider.showContextMenu({getAnchor:()=>this.element,getActions:()=>this.actions,getActionsContext:()=>this.menuOptions?this.menuOptions.context:null,getActionViewItem:e=>this.menuOptions&&this.menuOptions.actionViewItemProvider?this.menuOptions.actionViewItemProvider(e):void 0,getKeyBinding:e=>this.menuOptions&&this.menuOptions.getKeyBinding?this.menuOptions.getKeyBinding(e):void 0,getMenuClassName:()=>this.menuClassName,onHide:()=>this.onHide(),actionRunner:this.menuOptions?this.menuOptions.actionRunner:void 0,anchorAlignment:this.menuOptions?this.menuOptions.anchorAlignment:0,domForShadowRoot:this.menuAsChild?this.element:void 0})}hide(){super.hide()}onHide(){this.hide(),this.element.classList.remove("active")}}class Ll extends Un.E{constructor(e,t,i,s=Object.create(null)){super(null,e,s),this.actionItem=null,this._onDidChangeVisibility=this._register(new Vi.vl),this.menuActionsOrProvider=t,this.contextMenuProvider=i,this.options=s,this.options.actionRunner&&(this.actionRunner=this.options.actionRunner)}render(e){this.actionItem=e;const t=o=>{this.element=(0,M.BC)(o,(0,M.$)("a.action-label"));let c=[];return typeof this.options.classNames=="string"?c=this.options.classNames.split(/\s+/g).filter(m=>!!m):this.options.classNames&&(c=this.options.classNames),c.find(m=>m==="icon")||c.push("codicon"),this.element.classList.add(...c),this.element.setAttribute("role","button"),this.element.setAttribute("aria-haspopup","true"),this.element.setAttribute("aria-expanded","false"),this.element.title=this._action.label||"",this.element.ariaLabel=this._action.label||"",null},i=Array.isArray(this.menuActionsOrProvider),s={contextMenuProvider:this.contextMenuProvider,labelRenderer:t,menuAsChild:this.options.menuAsChild,actions:i?this.menuActionsOrProvider:void 0,actionProvider:i?void 0:this.menuActionsOrProvider};if(this.dropdownMenu=this._register(new md(e,s)),this._register(this.dropdownMenu.onDidChangeVisibility(o=>{var c;(c=this.element)===null||c===void 0||c.setAttribute("aria-expanded",`${o}`),this._onDidChangeVisibility.fire(o)})),this.dropdownMenu.menuOptions={actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,getKeyBinding:this.options.keybindingProvider,context:this._context},this.options.anchorAlignmentProvider){const o=this;this.dropdownMenu.menuOptions=Object.assign(Object.assign({},this.dropdownMenu.menuOptions),{get anchorAlignment(){return o.options.anchorAlignmentProvider()}})}this.updateTooltip(),this.updateEnabled()}getTooltip(){let e=null;return this.getAction().tooltip?e=this.getAction().tooltip:this.getAction().label&&(e=this.getAction().label),e??void 0}setActionContext(e){super.setActionContext(e),this.dropdownMenu&&(this.dropdownMenu.menuOptions?this.dropdownMenu.menuOptions.context=e:this.dropdownMenu.menuOptions={context:e})}updateEnabled(){var e,t;const i=!this.getAction().enabled;(e=this.actionItem)===null||e===void 0||e.classList.toggle("disabled",i),(t=this.element)===null||t===void 0||t.classList.toggle("disabled",i)}}var Rh=f(98315),og=f(83910),Ro=f(89563),za=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},eo=function(u,e){return function(t,i){e(t,i,u)}},pd=function(u,e,t,i){function s(o){return o instanceof t?o:new t(function(c){c(o)})}return new(t||(t=Promise))(function(o,c){function m(W){try{U(i.next(W))}catch(re){c(re)}}function A(W){try{U(i.throw(W))}catch(re){c(re)}}function U(W){W.done?o(W.value):s(W.value).then(m,A)}U((i=i.apply(u,e||[])).next())})};function va(u,e,t,i,s,o,c){const m=u.getActions(e);return Lr(m,t,!1,typeof i=="string"?U=>U===i:i,s,o,c),rg(m)}function rg(u){const e=new at.Cm;for(const[,t]of u)for(const i of t)e.add(i);return e}function Lr(u,e,t,i=m=>m==="navigation",s=Number.MAX_SAFE_INTEGER,o=()=>!1,c=!1){let m,A;Array.isArray(e)?(m=e,A=e):(m=e.primary,A=e.secondary);const U=new Set;for(const[W,re]of u){let Se;i(W)?(Se=m,Se.length>0&&c&&Se.push(new p.wv)):(Se=A,Se.length>0&&Se.push(new p.wv));for(let Be of re){t&&(Be=Be instanceof xe.Xe&&Be.alt?Be.alt:Be);const Qe=Se.push(Be);Be instanceof p.YH&&U.add({group:W,action:Be,index:Qe-1})}}for(const{group:W,action:re,index:Se}of U){const Be=i(W)?m:A,Qe=re.actions;(Qe.length<=1||Be.length+Qe.length-2<=s)&&o(re,W,Be.length)&&Be.splice(Se,1,...Qe)}if(m!==A&&m.length>s){const W=m.splice(s,m.length-s);A.unshift(...W,new p.wv)}}let Yr=class extends Un.Z{constructor(e,t,i,s,o,c,m){super(void 0,e,{icon:!!(e.class||e.item.icon),label:!e.class&&!e.item.icon,draggable:t?.draggable,keybinding:t?.keybinding,hoverDelegate:t?.hoverDelegate}),this._keybindingService=i,this._notificationService=s,this._contextKeyService=o,this._themeService=c,this._contextMenuService=m,this._wantsAltCommand=!1,this._itemClassDispose=this._register(new at.HE),this._altKey=M.Di.getInstance()}get _menuItemAction(){return this._action}get _commandAction(){return this._wantsAltCommand&&this._menuItemAction.alt||this._menuItemAction}onClick(e){return pd(this,void 0,void 0,function*(){e.preventDefault(),e.stopPropagation();try{yield this.actionRunner.run(this._commandAction,this._context)}catch(t){this._notificationService.error(t)}})}render(e){super.render(e),e.classList.add("menu-entry"),this._updateItemClass(this._menuItemAction.item);let t=!1,i=this._altKey.keyStatus.altKey||(Pi.uF||Pi.j9)&&this._altKey.keyStatus.shiftKey;const s=()=>{var o;const c=t&&i&&!!(!((o=this._commandAction.alt)===null||o===void 0)&&o.enabled);c!==this._wantsAltCommand&&(this._wantsAltCommand=c,this.updateLabel(),this.updateTooltip(),this.updateClass())};this._menuItemAction.alt&&this._register(this._altKey.event(o=>{i=o.altKey||(Pi.uF||Pi.j9)&&o.shiftKey,s()})),this._register((0,M.ko)(e,"mouseleave",o=>{t=!1,s()})),this._register((0,M.ko)(e,"mouseenter",o=>{t=!0,s()}))}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this._commandAction.label)}getTooltip(){var e;const t=this._keybindingService.lookupKeybinding(this._commandAction.id,this._contextKeyService),i=t&&t.getLabel(),s=this._commandAction.tooltip||this._commandAction.label;let o=i?(0,we.kg)("titleAndKb","{0} ({1})",s,i):s;if(!this._wantsAltCommand&&(!((e=this._menuItemAction.alt)===null||e===void 0)&&e.enabled)){const c=this._menuItemAction.alt.tooltip||this._menuItemAction.alt.label,m=this._keybindingService.lookupKeybinding(this._menuItemAction.alt.id,this._contextKeyService),A=m&&m.getLabel(),U=A?(0,we.kg)("titleAndKb","{0} ({1})",c,A):c;o=(0,we.kg)("titleAndKbAndAlt",`{0} [{1}] {2}`,o,Rh.Of.modifierLabels[Pi.OS].altKey,U)}return o}updateClass(){this.options.icon&&(this._commandAction!==this._menuItemAction?this._menuItemAction.alt&&this._updateItemClass(this._menuItemAction.alt.item):this._updateItemClass(this._menuItemAction.item))}_updateItemClass(e){var t;this._itemClassDispose.value=void 0;const{element:i,label:s}=this;if(!i||!s)return;const o=this._commandAction.checked&&(!((t=e.toggled)===null||t===void 0)&&t.icon)?e.toggled.icon:e.icon;if(o)if(Ye.L0.isThemeIcon(o)){const c=Ye.L0.asClassNameArray(o);s.classList.add(...c),this._itemClassDispose.value=(0,at.s)(()=>{s.classList.remove(...c)})}else s.style.backgroundImage=(0,Ro.HD)(this._themeService.getColorTheme().type)?(0,M.Tf)(o.dark):(0,M.Tf)(o.light),s.classList.add("icon"),this._itemClassDispose.value=(0,at.qE)((0,at.s)(()=>{s.style.backgroundImage="",s.classList.remove("icon")}),this._themeService.onDidColorThemeChange(()=>{this.updateClass()}))}};Yr=za([eo(2,ye.b),eo(3,Cs.Ot),eo(4,ct.fN),eo(5,Ye.Gy),eo(6,be.Z)],Yr);let Dl=class extends Ll{constructor(e,t,i,s){var o,c;const m=Object.assign({},t??Object.create(null),{menuAsChild:(o=t?.menuAsChild)!==null&&o!==void 0?o:!1,classNames:(c=t?.classNames)!==null&&c!==void 0?c:Ye.L0.isThemeIcon(e.item.icon)?Ye.L0.asClassName(e.item.icon):void 0});super(e,{getActions:()=>e.actions},i,m),this._contextMenuService=i,this._themeService=s}render(e){super.render(e),(0,pi.j)(this.element),e.classList.add("menu-entry");const t=this._action,{icon:i}=t.item;if(i&&!Ye.L0.isThemeIcon(i)){this.element.classList.add("icon");const s=()=>{this.element&&(this.element.style.backgroundImage=(0,Ro.HD)(this._themeService.getColorTheme().type)?(0,M.Tf)(i.dark):(0,M.Tf)(i.light))};s(),this._register(this._themeService.onDidColorThemeChange(()=>{s()}))}}};Dl=za([eo(2,be.Z),eo(3,Ye.Gy)],Dl);let wc=class extends Un.E{constructor(e,t,i,s,o,c,m,A){var U,W,re;super(null,e),this._keybindingService=i,this._notificationService=s,this._contextMenuService=o,this._menuService=c,this._instaService=m,this._storageService=A,this._container=null,this._options=t,this._storageKey=`${e.item.submenu.id}_lastActionId`;let Se;const Be=A.get(this._storageKey,1);Be&&(Se=e.actions.find(tt=>Be===tt.id)),Se||(Se=e.actions[0]),this._defaultAction=this._instaService.createInstance(Yr,Se,{keybinding:this._getDefaultActionKeybindingLabel(Se)});const Qe=Object.assign({},t??Object.create(null),{menuAsChild:(U=t?.menuAsChild)!==null&&U!==void 0?U:!0,classNames:(W=t?.classNames)!==null&&W!==void 0?W:["codicon","codicon-chevron-down"],actionRunner:(re=t?.actionRunner)!==null&&re!==void 0?re:new p.LN});this._dropdown=new Ll(e,e.actions,this._contextMenuService,Qe),this._dropdown.actionRunner.onDidRun(tt=>{tt.action instanceof xe.Xe&&this.update(tt.action)})}update(e){this._storageService.store(this._storageKey,e.id,1,0),this._defaultAction.dispose(),this._defaultAction=this._instaService.createInstance(Yr,e,{keybinding:this._getDefaultActionKeybindingLabel(e)}),this._defaultAction.actionRunner=new class extends p.LN{runAction(t,i){return pd(this,void 0,void 0,function*(){yield t.run(void 0)})}},this._container&&this._defaultAction.render((0,M.Hs)(this._container,(0,M.$)(".action-container")))}_getDefaultActionKeybindingLabel(e){var t;let i;if(!((t=this._options)===null||t===void 0)&&t.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 t=(0,M.$)(".action-container");this._defaultAction.render((0,M.BC)(this._container,t)),this._register((0,M.ko)(t,M.Bx.KEY_DOWN,s=>{const o=new yr.Z(s);o.equals(17)&&(this._defaultAction.element.tabIndex=-1,this._dropdown.focus(),o.stopPropagation())}));const i=(0,M.$)(".dropdown-action-container");this._dropdown.render((0,M.BC)(this._container,i)),this._register((0,M.ko)(i,M.Bx.KEY_DOWN,s=>{var o;const c=new yr.Z(s);c.equals(15)&&(this._defaultAction.element.tabIndex=0,this._dropdown.setFocusable(!1),(o=this._defaultAction.element)===null||o===void 0||o.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()}};wc=za([eo(2,ye.b),eo(3,Cs.Ot),eo(4,be.Z),eo(5,xe.ez),eo(6,P._Y),eo(7,fo.CS)],wc);function Ua(u,e,t){return e instanceof xe.Xe?u.createInstance(Yr,e,t):e instanceof xe.nI?e.item.rememberDefaultAction?u.createInstance(wc,e,t):u.createInstance(Dl,e,t):void 0}var kl=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},El=function(u,e){return function(t,i){e(t,i,u)}};const xl=(0,P.u1)("IPeekViewService");(0,nr.v)(xl,class{constructor(){this._widgets=new Map}addExclusiveWidget(u,e){const t=this._widgets.get(u);t&&(t.listener.dispose(),t.widget.dispose());const i=()=>{const s=this._widgets.get(u);s&&s.widget===e&&(s.listener.dispose(),this._widgets.delete(u))};this._widgets.set(u,{widget:e,listener:e.onDidClose(i)})}});var lo;(function(u){u.inPeekEditor=new ct.N1("inReferenceSearchEditor",!0,we.kg("inReferenceSearchEditor","Whether the current code editor is embedded inside peek")),u.notInPeekEditor=u.inPeekEditor.toNegated()})(lo||(lo={}));let ja=class{constructor(e,t){e instanceof or&&lo.inPeekEditor.bindTo(t)}dispose(){}};ja.ID="editor.contrib.referenceController",ja=kl([El(1,ct.fN)],ja),(0,Te.HW)(ja.ID,ja);function Il(u){const e=u.get(Gi.T).getFocusedCodeEditor();return e instanceof or?e.getParentEditor():e}const Ah={headerBackgroundColor:Dn.Q1.white,primaryHeadingColor:Dn.Q1.fromHex("#333333"),secondaryHeadingColor:Dn.Q1.fromHex("#6c6c6cb3")};let Ka=class extends mo{constructor(e,t,i){super(e,t),this.instantiationService=i,this._onDidClose=new Vi.vl,this.onDidClose=this._onDidClose.event,Va.co(this.options,Ah,!1)}dispose(){this.disposed||(this.disposed=!0,super.dispose(),this._onDidClose.fire(this))}style(e){const t=this.options;e.headerBackgroundColor&&(t.headerBackgroundColor=e.headerBackgroundColor),e.primaryHeadingColor&&(t.primaryHeadingColor=e.primaryHeadingColor),e.secondaryHeadingColor&&(t.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=M.$(".head"),this._bodyElement=M.$(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),e.appendChild(this._headElement),e.appendChild(this._bodyElement)}_fillHead(e,t){const i=M.$(".peekview-title");this.options.supportOnTitleClick&&(i.classList.add("clickable"),M.b2(i,"click",c=>this._onTitleClick(c))),M.BC(this._headElement,i),this._fillTitleIcon(i),this._primaryHeading=M.$("span.filename"),this._secondaryHeading=M.$("span.dirname"),this._metaHeading=M.$("span.meta"),M.BC(i,this._primaryHeading,this._secondaryHeading,this._metaHeading);const s=M.$(".peekview-actions");M.BC(this._headElement,s);const o=this._getActionBarOptions();this._actionbarWidget=new Zr.E(s,o),this._disposables.add(this._actionbarWidget),t||this._actionbarWidget.push(new p.rc("peekview.close",we.kg("label.close","Close"),Mi.W6.close.classNames,!0,()=>(this.dispose(),Promise.resolve())),{label:!1,icon:!0})}_fillTitleIcon(e){}_getActionBarOptions(){return{actionViewItemProvider:Ua.bind(void 0,this.instantiationService),orientation:0}}_onTitleClick(e){}setTitle(e,t){this._primaryHeading&&this._secondaryHeading&&(this._primaryHeading.innerText=e,this._primaryHeading.setAttribute("title",e),t?this._secondaryHeading.innerText=t:M.w_(this._secondaryHeading))}setMetaTitle(e){this._metaHeading&&(e?(this._metaHeading.innerText=e,M.WU(this._metaHeading)):M.jD(this._metaHeading))}_doLayout(e,t){if(!this._isShowing&&e<0){this.dispose();return}const i=Math.ceil(this.editor.getOption(61)*1.2),s=Math.round(e-(i+2));this._doLayoutHead(i,t),this._doLayoutBody(s,t)}_doLayoutHead(e,t){this._headElement&&(this._headElement.style.height=`${e}px`,this._headElement.style.lineHeight=this._headElement.style.height)}_doLayoutBody(e,t){this._bodyElement&&(this._bodyElement.style.height=`${e}px`)}};Ka=kl([El(2,P._Y)],Ka);const _d=(0,Ce.x1A)("peekViewTitle.background",{dark:(0,Ce.JO0)(Ce.pOz,.1),light:(0,Ce.JO0)(Ce.pOz,.1),hcDark:null,hcLight:null},we.kg("peekViewTitleBackground","Background color of the peek view title area.")),Sc=(0,Ce.x1A)("peekViewTitleLabel.foreground",{dark:Dn.Q1.white,light:Dn.Q1.black,hcDark:Dn.Q1.white,hcLight:Ce.By2},we.kg("peekViewTitleForeground","Color of the peek view title.")),Nl=(0,Ce.x1A)("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161",hcDark:"#FFFFFF99",hcLight:"#292929"},we.kg("peekViewTitleInfoForeground","Color of the peek view title info.")),Je=(0,Ce.x1A)("peekView.border",{dark:Ce.pOz,light:Ce.pOz,hcDark:Ce.b1q,hcLight:Ce.b1q},we.kg("peekViewBorder","Color of the peek view borders and arrow.")),n=(0,Ce.x1A)("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hcDark:Dn.Q1.black,hcLight:Dn.Q1.white},we.kg("peekViewResultsBackground","Background color of the peek view result list.")),a=(0,Ce.x1A)("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hcDark:Dn.Q1.white,hcLight:Ce.By2},we.kg("peekViewResultsMatchForeground","Foreground color for line nodes in the peek view result list.")),g=(0,Ce.x1A)("peekViewResult.fileForeground",{dark:Dn.Q1.white,light:"#1E1E1E",hcDark:Dn.Q1.white,hcLight:Ce.By2},we.kg("peekViewResultsFileForeground","Foreground color for file nodes in the peek view result list.")),E=(0,Ce.x1A)("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hcDark:null,hcLight:null},we.kg("peekViewResultsSelectionBackground","Background color of the selected entry in the peek view result list.")),R=(0,Ce.x1A)("peekViewResult.selectionForeground",{dark:Dn.Q1.white,light:"#6C6C6C",hcDark:Dn.Q1.white,hcLight:Ce.By2},we.kg("peekViewResultsSelectionForeground","Foreground color of the selected entry in the peek view result list.")),ne=(0,Ce.x1A)("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hcDark:Dn.Q1.black,hcLight:Dn.Q1.white},we.kg("peekViewEditorBackground","Background color of the peek view editor.")),_e=(0,Ce.x1A)("peekViewEditorGutter.background",{dark:ne,light:ne,hcDark:ne,hcLight:ne},we.kg("peekViewEditorGutterBackground","Background color of the gutter in the peek view editor.")),Le=(0,Ce.x1A)("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hcDark:null,hcLight:null},we.kg("peekViewResultsMatchHighlight","Match highlight color in the peek view result list.")),ke=(0,Ce.x1A)("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hcDark:null,hcLight:null},we.kg("peekViewEditorMatchHighlight","Match highlight color in the peek view editor.")),Ae=(0,Ce.x1A)("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hcDark:Ce.buw,hcLight:Ce.buw},we.kg("peekViewEditorMatchHighlightBorder","Match highlight border in the peek view editor."));var je=f(66638),Xe=f(44364),it=f(48421),yt=f(4169),Nt=function(u,e,t,i){function s(o){return o instanceof t?o:new t(function(c){c(o)})}return new(t||(t=Promise))(function(o,c){function m(W){try{U(i.next(W))}catch(re){c(re)}}function A(W){try{U(i.throw(W))}catch(re){c(re)}}function U(W){W.done?o(W.value):s(W.value).then(m,A)}U((i=i.apply(u,e||[])).next())})};class Ft{constructor(e,t,i,s){this.isProviderFirst=e,this.parent=t,this.link=i,this._rangeCallback=s,this.id=wr.r.nextId()}get uri(){return this.link.uri}get range(){var e,t;return(t=(e=this._range)!==null&&e!==void 0?e:this.link.targetSelectionRange)!==null&&t!==void 0?t:this.link.range}set range(e){this._range=e,this._rangeCallback(this)}get ariaMessage(){var e;const t=(e=this.parent.getPreview(this))===null||e===void 0?void 0:e.preview(this.range);return t?(0,we.kg)({key:"aria.oneReference.preview",comment:["Placeholders are: 0: filename, 1:line number, 2: column number, 3: preview snippet of source code"]},"symbol in {0} on line {1} at column {2}, {3}",(0,hn.P8)(this.uri),this.range.startLineNumber,this.range.startColumn,t.value):(0,we.kg)("aria.oneReference","symbol in {0} on line {1} at column {2}",(0,hn.P8)(this.uri),this.range.startLineNumber,this.range.startColumn)}}class Ut{constructor(e){this._modelReference=e}dispose(){this._modelReference.dispose()}preview(e,t=8){const i=this._modelReference.object.textEditorModel;if(!i)return;const{startLineNumber:s,startColumn:o,endLineNumber:c,endColumn:m}=e,A=i.getWordUntilPosition({lineNumber:s,column:o-t}),U=new St.Q(s,A.startColumn,s,o),W=new St.Q(c,m,c,1073741824),re=i.getValueInRange(U).replace(/^\s+/,""),Se=i.getValueInRange(e),Be=i.getValueInRange(W).replace(/\s+$/,"");return{value:re+Se+Be,highlight:{start:re.length,end:re.length+Se.length}}}}class ui{constructor(e,t){this.parent=e,this.uri=t,this.children=[],this._previews=new ir.fT}dispose(){(0,at.AS)(this._previews.values()),this._previews.clear()}getPreview(e){return this._previews.get(e.uri)}get ariaMessage(){const e=this.children.length;return e===1?(0,we.kg)("aria.fileReferences.1","1 symbol in {0}, full path {1}",(0,hn.P8)(this.uri),this.uri.fsPath):(0,we.kg)("aria.fileReferences.N","{0} symbols in {1}, full path {2}",e,(0,hn.P8)(this.uri),this.uri.fsPath)}resolve(e){return Nt(this,void 0,void 0,function*(){if(this._previews.size!==0)return this;for(const t of this.children)if(!this._previews.has(t.uri))try{const i=yield e.createModelReference(t.uri);this._previews.set(t.uri,new Ut(i))}catch(i){(0,Wi.dz)(i)}return this})}}class qt{constructor(e,t){this.groups=[],this.references=[],this._onDidChangeReferenceRange=new Vi.vl,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._links=e,this._title=t;const[i]=e;e.sort(qt._compareReferences);let s;for(const o of e)if((!s||!hn.er.isEqual(s.uri,o.uri,!0))&&(s=new ui(this,o.uri),this.groups.push(s)),s.children.length===0||qt._compareReferences(o,s.children[s.children.length-1])!==0){const c=new Ft(i===o,s,o,m=>this._onDidChangeReferenceRange.fire(m));this.references.push(c),s.children.push(c)}}dispose(){(0,at.AS)(this.groups),this._onDidChangeReferenceRange.dispose(),this.groups.length=0}clone(){return new qt(this._links,this._title)}get title(){return this._title}get isEmpty(){return this.groups.length===0}get ariaMessage(){return this.isEmpty?(0,we.kg)("aria.result.0","No results found"):this.references.length===1?(0,we.kg)("aria.result.1","Found 1 symbol in {0}",this.references[0].uri.fsPath):this.groups.length===1?(0,we.kg)("aria.result.n1","Found {0} symbols in {1}",this.references.length,this.groups[0].uri.fsPath):(0,we.kg)("aria.result.nm","Found {0} symbols in {1} files",this.references.length,this.groups.length)}nextOrPreviousReference(e,t){const{parent:i}=e;let s=i.children.indexOf(e);const o=i.children.length,c=i.parent.groups.length;return c===1||t&&s+1<o||!t&&s>0?(t?s=(s+1)%o:s=(s+o-1)%o,i.children[s]):(s=i.parent.groups.indexOf(i),t?(s=(s+1)%c,i.parent.groups[s].children[0]):(s=(s+c-1)%c,i.parent.groups[s].children[i.parent.groups[s].children.length-1]))}nearestReference(e,t){const i=this.references.map((s,o)=>({idx:o,prefixLen:xi.Qp(s.uri.toString(),e.toString()),offsetDist:Math.abs(s.range.startLineNumber-t.lineNumber)*100+Math.abs(s.range.startColumn-t.column)})).sort((s,o)=>s.prefixLen>o.prefixLen?-1:s.prefixLen<o.prefixLen?1:s.offsetDist<o.offsetDist?-1:s.offsetDist>o.offsetDist?1:0)[0];if(i)return this.references[i.idx]}referenceAt(e,t){for(const i of this.references)if(i.uri.toString()===e.toString()&&St.Q.containsPosition(i.range,t))return i}firstReference(){for(const e of this.references)if(e.isProviderFirst)return e;return this.references[0]}static _compareReferences(e,t){return hn.er.compare(e.uri,t.uri)||St.Q.compareRangesUsingStarts(e.range,t.range)}}var ji=f(67003),li=f(13072),en=f(65577),Xi=f(54957),Hi=f(49233),on=f(8431),Kn=f(84431),Qi=f(97669),Vn=f(8377),gs=f(1597),ys=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},Hn=function(u,e){return function(t,i){e(t,i,u)}};let Is=class{constructor(e){this._resolverService=e}hasChildren(e){return e instanceof qt||e instanceof ui}getChildren(e){if(e instanceof qt)return e.groups;if(e instanceof ui)return e.resolve(this._resolverService).then(t=>t.children);throw new Error("bad tree")}};Is=ys([Hn(0,Hs.b)],Is);class Ns{getHeight(){return 23}getTemplateId(e){return e instanceof ui?Cd.id:$a.id}}let Es=class{constructor(e){this._keybindingService=e}getKeyboardNavigationLabel(e){var t;if(e instanceof Ft){const i=(t=e.parent.getPreview(e))===null||t===void 0?void 0:t.preview(e.range);if(i)return i.value}return(0,hn.P8)(e.uri)}};Es=ys([Hn(0,ye.b)],Es);class Bo{getId(e){return e instanceof Ft?e.id:e.uri}}let vd=class extends at.jG{constructor(e,t,i){super(),this._labelService=t;const s=document.createElement("div");s.classList.add("reference-file"),this.file=this._register(new Kn.s(s,{supportHighlights:!0})),this.badge=new Hi.x(M.BC(s,M.$(".count"))),this._register((0,gs.Gd)(this.badge,i)),e.appendChild(s)}set(e,t){const i=(0,hn.pD)(e.uri);this.file.setLabel(this._labelService.getUriBasenameLabel(e.uri),this._labelService.getUriLabel(i,{relative:!0}),{title:this._labelService.getUriLabel(e.uri),matches:t});const s=e.children.length;this.badge.setCount(s),s>1?this.badge.setTitleFormat((0,we.kg)("referencesCount","{0} references",s)):this.badge.setTitleFormat((0,we.kg)("referenceCount","{0} reference",s))}};vd=ys([Hn(1,Vn.L),Hn(2,Ye.Gy)],vd);let Cd=class lC{constructor(e){this._instantiationService=e,this.templateId=lC.id}renderTemplate(e){return this._instantiationService.createInstance(vd,e)}renderElement(e,t,i){i.set(e.element,(0,Qi.WJ)(e.filterData))}disposeTemplate(e){e.dispose()}};Cd.id="FileReferencesRenderer",Cd=ys([Hn(0,P._Y)],Cd);class ag{constructor(e){this.label=new on._(e)}set(e,t){var i;const s=(i=e.parent.getPreview(e))===null||i===void 0?void 0:i.preview(e.range);if(!s||!s.value)this.label.set(`${(0,hn.P8)(e.uri)}:${e.range.startLineNumber+1}:${e.range.startColumn+1}`);else{const{value:o,highlight:c}=s;t&&!Qi.ne.isDefault(t)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(o,(0,Qi.WJ)(t))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(o,[c]))}}}class $a{constructor(){this.templateId=$a.id}renderTemplate(e){return new ag(e)}renderElement(e,t,i){i.set(e.element,e.filterData)}disposeTemplate(){}}$a.id="OneReferenceRenderer";class mm{getWidgetAriaLabel(){return(0,we.kg)("treeAriaLabel","References")}getAriaLabel(e){return e.ariaMessage}}var bd=f(38803),Oh=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},Or=function(u,e){return function(t,i){e(t,i,u)}},Ca=function(u,e,t,i){function s(o){return o instanceof t?o:new t(function(c){c(o)})}return new(t||(t=Promise))(function(o,c){function m(W){try{U(i.next(W))}catch(re){c(re)}}function A(W){try{U(i.throw(W))}catch(re){c(re)}}function U(W){W.done?o(W.value):s(W.value).then(m,A)}U((i=i.apply(u,e||[])).next())})};class Ml{constructor(e,t){this._editor=e,this._model=t,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=new at.Cm,this._callOnModelChange=new at.Cm,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 t of this._model.references)if(t.uri.toString()===e.uri.toString()){this._addDecorations(t.parent);return}}}_addDecorations(e){if(!this._editor.hasModel())return;this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations(()=>this._onDecorationChanged()));const t=[],i=[];for(let s=0,o=e.children.length;s<o;s++){const c=e.children[s];this._decorationIgnoreSet.has(c.id)||c.uri.toString()===this._editor.getModel().uri.toString()&&(t.push({range:c.range,options:Ml.DecorationOptions}),i.push(s))}this._editor.changeDecorations(s=>{const o=s.deltaDecorations([],t);for(let c=0;c<o.length;c++)this._decorations.set(o[c],e.children[i[c]])})}_onDecorationChanged(){const e=[],t=this._editor.getModel();if(t){for(const[i,s]of this._decorations){const o=t.getDecorationRange(i);if(!o)continue;let c=!1;if(!St.Q.equalsRange(o,s.range)){if(St.Q.spansMultipleLines(o))c=!0;else{const m=s.range.endColumn-s.range.startColumn,A=o.endColumn-o.startColumn;m!==A&&(c=!0)}c?(this._decorationIgnoreSet.add(s.id),e.push(i)):s.range=o}}for(let i=0,s=e.length;i<s;i++)this._decorations.delete(e[i]);this._editor.removeDecorations(e)}}removeDecorations(){this._editor.removeDecorations([...this._decorations.keys()]),this._decorations.clear()}}Ml.DecorationOptions=sn.kI.register({description:"reference-decoration",stickiness:1,className:"reference-decoration"});class Ph{constructor(){this.ratio=.7,this.heightInLines=18}static fromJSON(e){let t,i;try{const s=JSON.parse(e);t=s.ratio,i=s.heightInLines}catch{}return{ratio:t||.7,heightInLines:i||18}}}class Tl extends yt.er{}let Rl=class extends Ka{constructor(e,t,i,s,o,c,m,A,U,W,re,Se){super(e,{showFrame:!1,showArrow:!0,isResizeable:!0,isAccessible:!0,supportOnTitleClick:!0},c),this._defaultTreeKeyboardSupport=t,this.layoutData=i,this._textModelResolverService=o,this._instantiationService=c,this._peekViewService=m,this._uriLabel=A,this._undoRedoService=U,this._keybindingService=W,this._languageService=re,this._languageConfigurationService=Se,this._disposeOnNewModel=new at.Cm,this._callOnDispose=new at.Cm,this._onDidSelectReference=new Vi.vl,this.onDidSelectReference=this._onDidSelectReference.event,this._dim=new M.fg(0,0),this._applyTheme(s.getColorTheme()),this._callOnDispose.add(s.onDidColorThemeChange(this._applyTheme.bind(this))),this._peekViewService.addExclusiveWidget(e,this),this.create()}dispose(){this.setModel(void 0),this._callOnDispose.dispose(),this._disposeOnNewModel.dispose(),(0,at.AS)(this._preview),(0,at.AS)(this._previewNotAvailableMessage),(0,at.AS)(this._tree),(0,at.AS)(this._previewModelReference),this._splitView.dispose(),super.dispose()}_applyTheme(e){const t=e.getColor(Je)||Dn.Q1.transparent;this.style({arrowColor:t,frameColor:t,headerBackgroundColor:e.getColor(_d)||Dn.Q1.transparent,primaryHeadingColor:e.getColor(Sc),secondaryHeadingColor:e.getColor(Nl)})}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=M.BC(e,M.$("div.messages")),M.jD(this._messageContainer),this._splitView=new ji.U(e,{orientation:1}),this._previewContainer=M.BC(e,M.$("div.preview.inline"));const t={scrollBeyondLastLine:!1,scrollbar:{verticalScrollbarSize:14,horizontal:"auto",useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,alwaysConsumeMouseWheel:!1},overviewRulerLanes:2,fixedOverflowWidgets:!0,minimap:{enabled:!1}};this._preview=this._instantiationService.createInstance(or,this._previewContainer,t,this.editor),M.jD(this._previewContainer),this._previewNotAvailableMessage=new sn.Bz(we.kg("missingPreviewMessage","no preview available"),Xi.vH,sn.Bz.DEFAULT_CREATION_OPTIONS,null,this._undoRedoService,this._languageService,this._languageConfigurationService),this._treeContainer=M.BC(e,M.$("div.ref-tree.inline"));const i={keyboardSupport:this._defaultTreeKeyboardSupport,accessibilityProvider:new mm,keyboardNavigationLabelProvider:this._instantiationService.createInstance(Es),identityProvider:new Bo,openOnSingleClick:!0,selectionNavigation:!0,overrideStyles:{listBackground:n}};this._defaultTreeKeyboardSupport&&this._callOnDispose.add(M.b2(this._treeContainer,"keydown",o=>{o.equals(9)&&(this._keybindingService.dispatchEvent(o,o.target),o.stopPropagation())},!0)),this._tree=this._instantiationService.createInstance(Tl,"ReferencesWidget",this._treeContainer,new Ns,[this._instantiationService.createInstance(Cd),this._instantiationService.createInstance($a)],this._instantiationService.createInstance(Is),i),this._splitView.addView({onDidChange:Vi.Jh.None,element:this._previewContainer,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:o=>{this._preview.layout({height:this._dim.height,width:o})}},ji.X.Distribute),this._splitView.addView({onDidChange:Vi.Jh.None,element:this._treeContainer,minimumSize:100,maximumSize:Number.MAX_VALUE,layout:o=>{this._treeContainer.style.height=`${this._dim.height}px`,this._treeContainer.style.width=`${o}px`,this._tree.layout(this._dim.height,o)}},ji.X.Distribute),this._disposables.add(this._splitView.onDidSashChange(()=>{this._dim.width&&(this.layoutData.ratio=this._splitView.getViewSize(0)/this._dim.width)},void 0));const s=(o,c)=>{o instanceof Ft&&(c==="show"&&this._revealReference(o,!1),this._onDidSelectReference.fire({element:o,kind:c,source:"tree"}))};this._tree.onDidOpen(o=>{o.sideBySide?s(o.element,"side"):o.editorOptions.pinned?s(o.element,"goto"):s(o.element,"show")}),M.jD(this._treeContainer)}_onWidth(e){this._dim&&this._doLayoutBody(this._dim.height,e)}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._dim=new M.fg(t,e),this.layoutData.heightInLines=this._viewZone?this._viewZone.heightInLines:this.layoutData.heightInLines,this._splitView.layout(t),this._splitView.resizeView(0,t*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=we.kg("noResults","No results"),M.WU(this._messageContainer),Promise.resolve(void 0)):(M.jD(this._messageContainer),this._decorationsManager=new Ml(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:t,target:i}=e;if(t.detail!==2)return;const s=this._getFocusedReference();s&&this._onDidSelectReference.fire({element:{uri:s.uri,range:i.range},kind:t.ctrlKey||t.metaKey||t.altKey?"side":"open",source:"editor"})})),this.container.classList.add("results-loaded"),M.WU(this._treeContainer),M.WU(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 Ft)return e;if(e instanceof ui&&e.children.length>0)return e.children[0]}revealReference(e){return Ca(this,void 0,void 0,function*(){yield this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:"goto",source:"tree"})})}_revealReference(e,t){return Ca(this,void 0,void 0,function*(){if(this._revealedReference===e)return;this._revealedReference=e,e.uri.scheme!==li.ny.inMemory?this.setTitle((0,hn.Pi)(e.uri),this._uriLabel.getUriLabel((0,hn.pD)(e.uri))):this.setTitle(we.kg("peekView.alternateTitle","References"));const i=this._textModelResolverService.createModelReference(e.uri);this._tree.getInput()===e.parent?this._tree.reveal(e):(t&&this._tree.reveal(e.parent),yield this._tree.expand(e.parent),this._tree.reveal(e));const s=yield i;if(!this._model){s.dispose();return}(0,at.AS)(this._previewModelReference);const o=s.object;if(o){const c=this._preview.getModel()===o.textEditorModel?0:1,m=St.Q.lift(e.range).collapseToStart();this._previewModelReference=s,this._preview.setModel(o.textEditorModel),this._preview.setSelection(m),this._preview.revealRangeInCenter(m,c)}else this._preview.setModel(this._previewNotAvailableMessage),s.dispose()})}};Rl=Oh([Or(3,Ye.Gy),Or(4,Hs.b),Or(5,P._Y),Or(6,xl),Or(7,Vn.L),Or(8,bd.$D),Or(9,ye.b),Or(10,Fs.L),Or(11,ao.JZ)],Rl);var pm=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},Do=function(u,e){return function(t,i){e(t,i,u)}},lg=function(u,e,t,i){function s(o){return o instanceof t?o:new t(function(c){c(o)})}return new(t||(t=Promise))(function(o,c){function m(W){try{U(i.next(W))}catch(re){c(re)}}function A(W){try{U(i.throw(W))}catch(re){c(re)}}function U(W){W.done?o(W.value):s(W.value).then(m,A)}U((i=i.apply(u,e||[])).next())})};const Xr=new ct.N1("referenceSearchVisible",!1,we.kg("referenceSearchVisible","Whether reference peek is visible, like 'Peek References' or 'Peek Definition'"));let Pr=class D_{constructor(e,t,i,s,o,c,m,A){this._defaultTreeKeyboardSupport=e,this._editor=t,this._editorService=s,this._notificationService=o,this._instantiationService=c,this._storageService=m,this._configurationService=A,this._disposables=new at.Cm,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=Xr.bindTo(i)}static get(e){return e.getContribution(D_.ID)}dispose(){var e,t;this._referenceSearchVisible.reset(),this._disposables.dispose(),(e=this._widget)===null||e===void 0||e.dispose(),(t=this._model)===null||t===void 0||t.dispose(),this._widget=void 0,this._model=void 0}toggleWidget(e,t,i){let s;if(this._widget&&(s=this._widget.position),this.closeWidget(),s&&e.containsPosition(s))return;this._peekMode=i,this._referenceSearchVisible.set(!0),this._disposables.add(this._editor.onDidChangeModelLanguage(()=>{this.closeWidget()})),this._disposables.add(this._editor.onDidChangeModel(()=>{this._ignoreModelChangeEvent||this.closeWidget()}));const o="peekViewLayout",c=Ph.fromJSON(this._storageService.get(o,0,"{}"));this._widget=this._instantiationService.createInstance(Rl,this._editor,this._defaultTreeKeyboardSupport,c),this._widget.setTitle(we.kg("labelLoading","Loading...")),this._widget.show(e),this._disposables.add(this._widget.onDidClose(()=>{t.cancel(),this._widget&&(this._storageService.store(o,JSON.stringify(this._widget.layoutData),0,1),this._widget=void 0),this.closeWidget()})),this._disposables.add(this._widget.onDidSelectReference(A=>{const{element:U,kind:W}=A;if(U)switch(W){case"open":(A.source!=="editor"||!this._configurationService.getValue("editor.stablePeek"))&&this.openReference(U,!1,!1);break;case"side":this.openReference(U,!0,!1);break;case"goto":i?this._gotoReference(U):this.openReference(U,!1,!0);break}}));const m=++this._requestIdPool;t.then(A=>{var U;if(m!==this._requestIdPool||!this._widget){A.dispose();return}return(U=this._model)===null||U===void 0||U.dispose(),this._model=A,this._widget.setModel(this._model).then(()=>{if(this._widget&&this._model&&this._editor.hasModel()){this._model.isEmpty?this._widget.setMetaTitle(""):this._widget.setMetaTitle(we.kg("metaTitle.N","{0} ({1})",this._model.title,this._model.references.length));const W=this._editor.getModel().uri,re=new bi.y(e.startLineNumber,e.startColumn),Se=this._model.nearestReference(W,re);if(Se)return this._widget.setSelection(Se).then(()=>{this._widget&&this._editor.getOption(79)==="editor"&&this._widget.focusOnPreviewEditor()})}})},A=>{this._notificationService.error(A)})}changeFocusBetweenPreviewAndReferences(){this._widget&&(this._widget.isPreviewEditorFocused()?this._widget.focusOnReferenceTree():this._widget.focusOnPreviewEditor())}goToNextOrPreviousReference(e){return lg(this,void 0,void 0,function*(){if(!this._editor.hasModel()||!this._model||!this._widget)return;const t=this._widget.position;if(!t)return;const i=this._model.nearestReference(this._editor.getModel().uri,t);if(!i)return;const s=this._model.nextOrPreviousReference(i,e),o=this._editor.hasTextFocus(),c=this._widget.isPreviewEditorFocused();yield this._widget.setSelection(s),yield this._gotoReference(s),o?this._editor.focus():this._widget&&c&&this._widget.focusOnPreviewEditor()})}revealReference(e){return lg(this,void 0,void 0,function*(){!this._editor.hasModel()||!this._model||!this._widget||(yield this._widget.revealReference(e))})}closeWidget(e=!0){var t,i;(t=this._widget)===null||t===void 0||t.dispose(),(i=this._model)===null||i===void 0||i.dispose(),this._referenceSearchVisible.reset(),this._disposables.clear(),this._widget=void 0,this._model=void 0,e&&this._editor.focus(),this._requestIdPool+=1}_gotoReference(e){this._widget&&this._widget.hide(),this._ignoreModelChangeEvent=!0;const t=St.Q.lift(e.range).collapseToStart();return this._editorService.openCodeEditor({resource:e.uri,options:{selection:t,selectionSource:"code.jump"}},this._editor).then(i=>{var s;if(this._ignoreModelChangeEvent=!1,!i||!this._widget){this.closeWidget();return}if(this._editor===i)this._widget.show(t),this._widget.focusOnReferenceTree();else{const o=D_.get(i),c=this._model.clone();this.closeWidget(),i.focus(),o?.toggleWidget(t,(0,Ot.SS)(m=>Promise.resolve(c)),(s=this._peekMode)!==null&&s!==void 0?s:!1)}},i=>{this._ignoreModelChangeEvent=!1,(0,Wi.dz)(i)})}openReference(e,t,i){t||this.closeWidget();const{uri:s,range:o}=e;this._editorService.openCodeEditor({resource:s,options:{selection:o,selectionSource:"code.jump",pinned:i}},this._editor,t)}};Pr.ID="editor.contrib.referencesController",Pr=pm([Do(2,ct.fN),Do(3,Gi.T),Do(4,Cs.Ot),Do(5,P._Y),Do(6,fo.CS),Do(7,de.pG)],Pr);function co(u,e){const t=Il(u);if(!t)return;const i=Pr.get(t);i&&e(i)}it.f.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:(0,zi.m5)(2089,60),when:ct.M$.or(Xr,lo.inPeekEditor),handler(u){co(u,e=>{e.changeFocusBetweenPreviewAndReferences()})}}),it.f.registerCommandAndKeybindingRule({id:"goToNextReference",weight:100-10,primary:62,secondary:[70],when:ct.M$.or(Xr,lo.inPeekEditor),handler(u){co(u,e=>{e.goToNextOrPreviousReference(!0)})}}),it.f.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:100-10,primary:1086,secondary:[1094],when:ct.M$.or(Xr,lo.inPeekEditor),handler(u){co(u,e=>{e.goToNextOrPreviousReference(!1)})}}),fn.wb.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference"),fn.wb.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference"),fn.wb.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch"),fn.wb.registerCommand("closeReferenceSearch",u=>co(u,e=>e.closeWidget())),it.f.registerKeybindingRule({id:"closeReferenceSearch",weight:100-101,primary:9,secondary:[1033],when:ct.M$.and(lo.inPeekEditor,ct.M$.not("config.editor.stablePeek"))}),it.f.registerKeybindingRule({id:"closeReferenceSearch",weight:200+50,primary:9,secondary:[1033],when:ct.M$.and(Xr,ct.M$.not("config.editor.stablePeek"))}),it.f.registerCommandAndKeybindingRule({id:"revealReference",weight:200,primary:3,mac:{primary:3,secondary:[2066]},when:ct.M$.and(Xr,yt.YD,yt.Nf.negate(),yt.cH.negate()),handler(u){var e;const i=(e=u.get(yt.PE).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(i)&&i[0]instanceof Ft&&co(u,s=>s.revealReference(i[0]))}}),it.f.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2051,mac:{primary:259},when:ct.M$.and(Xr,yt.YD,yt.Nf.negate(),yt.cH.negate()),handler(u){var e;const i=(e=u.get(yt.PE).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(i)&&i[0]instanceof Ft&&co(u,s=>s.openReference(i[0],!0,!0))}}),fn.wb.registerCommand("openReference",u=>{var e;const i=(e=u.get(yt.PE).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(i)&&i[0]instanceof Ft&&co(u,s=>s.openReference(i[0],!1,!0))});var wd=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},Ga=function(u,e){return function(t,i){e(t,i,u)}};const ba=new ct.N1("hasSymbols",!1,(0,we.kg)("hasSymbols","Whether there are symbol locations that can be navigated via keyboard-only.")),Al=(0,P.u1)("ISymbolNavigationService");let Ol=class{constructor(e,t,i,s){this._editorService=t,this._notificationService=i,this._keybindingService=s,this._currentModel=void 0,this._currentIdx=-1,this._ignoreEditorChange=!1,this._ctxHasSymbols=ba.bindTo(e)}reset(){var e,t;this._ctxHasSymbols.reset(),(e=this._currentState)===null||e===void 0||e.dispose(),(t=this._currentMessage)===null||t===void 0||t.dispose(),this._currentModel=void 0,this._currentIdx=-1}put(e){const t=e.parent.parent;if(t.references.length<=1){this.reset();return}this._currentModel=t,this._currentIdx=t.references.indexOf(e),this._ctxHasSymbols.set(!0),this._showMessage();const i=new Sd(this._editorService),s=i.onDidChange(o=>{if(this._ignoreEditorChange)return;const c=this._editorService.getActiveCodeEditor();if(!c)return;const m=c.getModel(),A=c.getPosition();if(!m||!A)return;let U=!1,W=!1;for(const re of t.references)if((0,hn.n4)(re.uri,m.uri))U=!0,W=W||St.Q.containsPosition(re.range,A);else if(U)break;(!U||!W)&&this.reset()});this._currentState=(0,at.qE)(i,s)}revealNext(e){if(!this._currentModel)return Promise.resolve();this._currentIdx+=1,this._currentIdx%=this._currentModel.references.length;const t=this._currentModel.references[this._currentIdx];return this._showMessage(),this._ignoreEditorChange=!0,this._editorService.openCodeEditor({resource:t.uri,options:{selection:St.Q.collapseToStart(t.range),selectionRevealType:3}},e).finally(()=>{this._ignoreEditorChange=!1})}_showMessage(){var e;(e=this._currentMessage)===null||e===void 0||e.dispose();const t=this._keybindingService.lookupKeybinding("editor.gotoNextSymbolFromResult"),i=t?(0,we.kg)("location.kb","Symbol {0} of {1}, {2} for next",this._currentIdx+1,this._currentModel.references.length,t.getLabel()):(0,we.kg)("location","Symbol {0} of {1}",this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(i)}};Ol=wd([Ga(0,ct.fN),Ga(1,Gi.T),Ga(2,Cs.Ot),Ga(3,ye.b)],Ol),(0,nr.v)(Al,Ol,!0),(0,Te.E_)(new class extends Te.DX{constructor(){super({id:"editor.gotoNextSymbolFromResult",precondition:ba,kbOpts:{weight:100,primary:70}})}runEditorCommand(u,e){return u.get(Al).revealNext(e)}}),it.f.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:ba,primary:9,handler(u){u.get(Al).reset()}});let Sd=class{constructor(e){this._listener=new Map,this._disposables=new at.Cm,this._onDidChange=new Vi.vl,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(),(0,at.AS)(this._listener.values())}_onDidAddEditor(e){this._listener.set(e,(0,at.qE)(e.onDidChangeCursorPosition(t=>this._onDidChange.fire({editor:e})),e.onDidChangeModelContent(t=>this._onDidChange.fire({editor:e}))))}_onDidRemoveEditor(e){var t;(t=this._listener.get(e))===null||t===void 0||t.dispose(),this._listener.delete(e)}};Sd=wd([Ga(0,Gi.T)],Sd);var dg=function(u,e,t,i){function s(o){return o instanceof t?o:new t(function(c){c(o)})}return new(t||(t=Promise))(function(o,c){function m(W){try{U(i.next(W))}catch(re){c(re)}}function A(W){try{U(i.throw(W))}catch(re){c(re)}}function U(W){W.done?o(W.value):s(W.value).then(m,A)}U((i=i.apply(u,e||[])).next())})};function yd(u,e,t,i){const o=t.ordered(u).map(c=>Promise.resolve(i(c,u,e)).then(void 0,m=>{(0,Wi.M_)(m)}));return Promise.all(o).then(c=>{const m=[];for(const A of c)Array.isArray(A)?m.push(...A):A&&m.push(A);return m})}function yc(u,e,t,i){return yd(e,t,u,(s,o,c)=>s.provideDefinition(o,c,i))}function Qa(u,e,t,i){return yd(e,t,u,(s,o,c)=>s.provideDeclaration(o,c,i))}function Lc(u,e,t,i){return yd(e,t,u,(s,o,c)=>s.provideImplementation(o,c,i))}function Fh(u,e,t,i){return yd(e,t,u,(s,o,c)=>s.provideTypeDefinition(o,c,i))}function Fr(u,e,t,i,s){return yd(e,t,u,(o,c,m)=>dg(this,void 0,void 0,function*(){const A=yield o.provideReferences(c,m,{includeDeclaration:!0},s);if(!i||!A||A.length!==2)return A;const U=yield o.provideReferences(c,m,{includeDeclaration:!1},s);return U&&U.length===1?U:A}))}function Ld(u){return dg(this,void 0,void 0,function*(){const e=yield u(),t=new qt(e,""),i=t.references.map(s=>s.link);return t.dispose(),i})}(0,Te.ke)("_executeDefinitionProvider",(u,e,t)=>{const i=u.get(Zi.u),s=yc(i.definitionProvider,e,t,Ti.X.None);return Ld(()=>s)}),(0,Te.ke)("_executeTypeDefinitionProvider",(u,e,t)=>{const i=u.get(Zi.u),s=Fh(i.typeDefinitionProvider,e,t,Ti.X.None);return Ld(()=>s)}),(0,Te.ke)("_executeDeclarationProvider",(u,e,t)=>{const i=u.get(Zi.u),s=Qa(i.declarationProvider,e,t,Ti.X.None);return Ld(()=>s)}),(0,Te.ke)("_executeReferenceProvider",(u,e,t)=>{const i=u.get(Zi.u),s=Fr(i.referenceProvider,e,t,!1,Ti.X.None);return Ld(()=>s)}),(0,Te.ke)("_executeImplementationProvider",(u,e,t)=>{const i=u.get(Zi.u),s=Lc(i.implementationProvider,e,t,Ti.X.None);return Ld(()=>s)});var ar=function(u,e,t,i){function s(o){return o instanceof t?o:new t(function(c){c(o)})}return new(t||(t=Promise))(function(o,c){function m(W){try{U(i.next(W))}catch(re){c(re)}}function A(W){try{U(i.throw(W))}catch(re){c(re)}}function U(W){W.done?o(W.value):s(W.value).then(m,A)}U((i=i.apply(u,e||[])).next())})},Za,Dd,wa,Ya,Bh,Dc,kc,Wh;xe.ZG.appendMenuItem(xe.D8.EditorContext,{submenu:xe.D8.EditorContextPeek,title:we.kg("peek.submenu","Peek"),group:"navigation",order:100});const cg=new Set;function lr(u){const e=new u;return(0,Te.xX)(e),cg.add(e.id),e}class Xa{constructor(e,t){this.model=e,this.position=t}static is(e){return!e||typeof e!="object"?!1:!!(e instanceof Xa||bi.y.isIPosition(e.position)&&e.model)}}class dr extends Te.ks{constructor(e,t){super(t),this.configuration=e}run(e,t,i){if(!t.hasModel())return Promise.resolve(void 0);const s=e.get(Cs.Ot),o=e.get(Gi.T),c=e.get(ks.N8),m=e.get(Al),A=e.get(Zi.u),U=t.getModel(),W=t.getPosition(),re=Xa.is(i)?i:new Xa(U,W),Se=new Gn.gI(t,5),Be=(0,Ot.PK)(this._getLocationModel(A,re.model,re.position,Se.token),Se.token).then(Qe=>ar(this,void 0,void 0,function*(){var tt;if(!Qe||Se.token.isCancellationRequested)return;(0,oi.xE)(Qe.ariaMessage);let vt;if(Qe.referenceAt(U.uri,W)){const ci=this._getAlternativeCommand(t);!dr._activeAlternativeCommands.has(ci)&&cg.has(ci)&&(vt=t.getAction(ci))}const Ht=Qe.references.length;if(Ht===0){if(!this.configuration.muteMessage){const ci=U.getWordAtPosition(W);(tt=is.get(t))===null||tt===void 0||tt.showMessage(this._getNoResultFoundMessage(ci),W)}}else if(Ht===1&&vt)dr._activeAlternativeCommands.add(this.id),vt.run().finally(()=>{dr._activeAlternativeCommands.delete(this.id)});else return this._onResult(o,m,t,Qe)}),Qe=>{s.error(Qe)}).finally(()=>{Se.dispose()});return c.showWhile(Be,250),Be}_onResult(e,t,i,s){return ar(this,void 0,void 0,function*(){const o=this._getGoToPreference(i);if(!(i instanceof or)&&(this.configuration.openInPeek||o==="peek"&&s.references.length>1))this._openInPeek(i,s);else{const c=s.firstReference(),m=s.references.length>1&&o==="gotoAndPeek",A=yield this._openReference(i,e,c,this.configuration.openToSide,!m);m&&A?this._openInPeek(A,s):s.dispose(),o==="goto"&&t.put(c)}})}_openReference(e,t,i,s,o){return ar(this,void 0,void 0,function*(){let c;if((0,Xe.Iu)(i)&&(c=i.targetSelectionRange),c||(c=i.range),!c)return;const m=yield t.openCodeEditor({resource:i.uri,options:{selection:St.Q.collapseToStart(c),selectionRevealType:3,selectionSource:"code.jump"}},e,s);if(m){if(o){const A=m.getModel(),U=m.createDecorationsCollection([{range:c,options:{description:"symbol-navigate-action-highlight",className:"symbolHighlight"}}]);setTimeout(()=>{m.getModel()===A&&U.clear()},350)}return m}})}_openInPeek(e,t){const i=Pr.get(e);i&&e.hasModel()?i.toggleWidget(e.getSelection(),(0,Ot.SS)(s=>Promise.resolve(t)),this.configuration.openInPeek):t.dispose()}}dr._activeAlternativeCommands=new Set;class kd extends dr{_getLocationModel(e,t,i,s){return ar(this,void 0,void 0,function*(){return new qt(yield yc(e.definitionProvider,t,i,s),we.kg("def.title","Definitions"))})}_getNoResultFoundMessage(e){return e&&e.word?we.kg("noResultWord","No definition found for '{0}'",e.word):we.kg("generic.noResults","No definition found")}_getAlternativeCommand(e){return e.getOption(53).alternativeDefinitionCommand}_getGoToPreference(e){return e.getOption(53).multipleDefinitions}}const hg=Pi.HZ&&!(0,qi.isStandalone)()?2118:70;lr((Za=class k_ extends kd{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:k_.id,label:we.kg("actions.goToDecl.label","Go to Definition"),alias:"Go to Definition",precondition:ct.M$.and(ze.R.hasDefinitionProvider,ze.R.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:ze.R.editorTextFocus,primary:hg,weight:100},contextMenuOpts:{group:"navigation",order:1.1}}),fn.wb.registerCommandAlias("editor.action.goToDeclaration",k_.id)}},Za.id="editor.action.revealDefinition",Za)),lr((Dd=class E_ extends kd{constructor(){super({openToSide:!0,openInPeek:!1,muteMessage:!1},{id:E_.id,label:we.kg("actions.goToDeclToSide.label","Open Definition to the Side"),alias:"Open Definition to the Side",precondition:ct.M$.and(ze.R.hasDefinitionProvider,ze.R.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:ze.R.editorTextFocus,primary:(0,zi.m5)(2089,hg),weight:100}}),fn.wb.registerCommandAlias("editor.action.openDeclarationToTheSide",E_.id)}},Dd.id="editor.action.revealDefinitionAside",Dd)),lr((wa=class x_ extends kd{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:x_.id,label:we.kg("actions.previewDecl.label","Peek Definition"),alias:"Peek Definition",precondition:ct.M$.and(ze.R.hasDefinitionProvider,lo.notInPeekEditor,ze.R.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:ze.R.editorTextFocus,primary:582,linux:{primary:3140},weight:100},contextMenuOpts:{menuId:xe.D8.EditorContextPeek,group:"peek",order:2}}),fn.wb.registerCommandAlias("editor.action.previewDeclaration",x_.id)}},wa.id="editor.action.peekDefinition",wa));class ug extends dr{_getLocationModel(e,t,i,s){return ar(this,void 0,void 0,function*(){return new qt(yield Qa(e.declarationProvider,t,i,s),we.kg("decl.title","Declarations"))})}_getNoResultFoundMessage(e){return e&&e.word?we.kg("decl.noResultWord","No declaration found for '{0}'",e.word):we.kg("decl.generic.noResults","No declaration found")}_getAlternativeCommand(e){return e.getOption(53).alternativeDeclarationCommand}_getGoToPreference(e){return e.getOption(53).multipleDeclarations}}lr((Ya=class dC extends ug{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:dC.id,label:we.kg("actions.goToDeclaration.label","Go to Declaration"),alias:"Go to Declaration",precondition:ct.M$.and(ze.R.hasDeclarationProvider,ze.R.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{group:"navigation",order:1.3}})}_getNoResultFoundMessage(e){return e&&e.word?we.kg("decl.noResultWord","No declaration found for '{0}'",e.word):we.kg("decl.generic.noResults","No declaration found")}},Ya.id="editor.action.revealDeclaration",Ya)),lr(class extends ug{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",label:we.kg("actions.peekDecl.label","Peek Declaration"),alias:"Peek Declaration",precondition:ct.M$.and(ze.R.hasDeclarationProvider,lo.notInPeekEditor,ze.R.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:xe.D8.EditorContextPeek,group:"peek",order:3}})}});class Jr extends dr{_getLocationModel(e,t,i,s){return ar(this,void 0,void 0,function*(){return new qt(yield Fh(e.typeDefinitionProvider,t,i,s),we.kg("typedef.title","Type Definitions"))})}_getNoResultFoundMessage(e){return e&&e.word?we.kg("goToTypeDefinition.noResultWord","No type definition found for '{0}'",e.word):we.kg("goToTypeDefinition.generic.noResults","No type definition found")}_getAlternativeCommand(e){return e.getOption(53).alternativeTypeDefinitionCommand}_getGoToPreference(e){return e.getOption(53).multipleTypeDefinitions}}lr((Bh=class cC extends Jr{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:cC.ID,label:we.kg("actions.goToTypeDefinition.label","Go to Type Definition"),alias:"Go to Type Definition",precondition:ct.M$.and(ze.R.hasTypeDefinitionProvider,ze.R.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:ze.R.editorTextFocus,primary:0,weight:100},contextMenuOpts:{group:"navigation",order:1.4}})}},Bh.ID="editor.action.goToTypeDefinition",Bh)),lr((Dc=class hC extends Jr{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:hC.ID,label:we.kg("actions.peekTypeDefinition.label","Peek Type Definition"),alias:"Peek Type Definition",precondition:ct.M$.and(ze.R.hasTypeDefinitionProvider,lo.notInPeekEditor,ze.R.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:xe.D8.EditorContextPeek,group:"peek",order:4}})}},Dc.ID="editor.action.peekTypeDefinition",Dc));class gg extends dr{_getLocationModel(e,t,i,s){return ar(this,void 0,void 0,function*(){return new qt(yield Lc(e.implementationProvider,t,i,s),we.kg("impl.title","Implementations"))})}_getNoResultFoundMessage(e){return e&&e.word?we.kg("goToImplementation.noResultWord","No implementation found for '{0}'",e.word):we.kg("goToImplementation.generic.noResults","No implementation found")}_getAlternativeCommand(e){return e.getOption(53).alternativeImplementationCommand}_getGoToPreference(e){return e.getOption(53).multipleImplementations}}lr((kc=class uC extends gg{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:uC.ID,label:we.kg("actions.goToImplementation.label","Go to Implementations"),alias:"Go to Implementations",precondition:ct.M$.and(ze.R.hasImplementationProvider,ze.R.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:ze.R.editorTextFocus,primary:2118,weight:100},contextMenuOpts:{group:"navigation",order:1.45}})}},kc.ID="editor.action.goToImplementation",kc)),lr((Wh=class gC extends gg{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:gC.ID,label:we.kg("actions.peekImplementation.label","Peek Implementations"),alias:"Peek Implementations",precondition:ct.M$.and(ze.R.hasImplementationProvider,lo.notInPeekEditor,ze.R.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:ze.R.editorTextFocus,primary:3142,weight:100},contextMenuOpts:{menuId:xe.D8.EditorContextPeek,group:"peek",order:5}})}},Wh.ID="editor.action.peekImplementation",Wh));class fg extends dr{_getNoResultFoundMessage(e){return e?we.kg("references.no","No references found for '{0}'",e.word):we.kg("references.noGeneric","No references found")}_getAlternativeCommand(e){return e.getOption(53).alternativeReferenceCommand}_getGoToPreference(e){return e.getOption(53).multipleReferences}}lr(class extends fg{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",label:we.kg("goToReferences.label","Go to References"),alias:"Go to References",precondition:ct.M$.and(ze.R.hasReferenceProvider,lo.notInPeekEditor,ze.R.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:ze.R.editorTextFocus,primary:1094,weight:100},contextMenuOpts:{group:"navigation",order:1.45}})}_getLocationModel(e,t,i,s){return ar(this,void 0,void 0,function*(){return new qt(yield Fr(e.referenceProvider,t,i,!0,s),we.kg("ref.title","References"))})}}),lr(class extends fg{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",label:we.kg("references.action.label","Peek References"),alias:"Peek References",precondition:ct.M$.and(ze.R.hasReferenceProvider,lo.notInPeekEditor,ze.R.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:xe.D8.EditorContextPeek,group:"peek",order:6}})}_getLocationModel(e,t,i,s){return ar(this,void 0,void 0,function*(){return new qt(yield Fr(e.referenceProvider,t,i,!1,s),we.kg("ref.title","References"))})}});class mg extends dr{constructor(e,t,i){super(e,{id:"editor.action.goToLocation",label:we.kg("label.generic","Go to Any Symbol"),alias:"Go to Any Symbol",precondition:ct.M$.and(lo.notInPeekEditor,ze.R.isInWalkThroughSnippet.toNegated())}),this._references=t,this._gotoMultipleBehaviour=i}_getLocationModel(e,t,i,s){return ar(this,void 0,void 0,function*(){return new qt(this._references,we.kg("generic.title","Locations"))})}_getNoResultFoundMessage(e){return e&&we.kg("generic.noResult","No results for '{0}'",e.word)||""}_getGoToPreference(e){var t;return(t=this._gotoMultipleBehaviour)!==null&&t!==void 0?t:e.getOption(53).multipleReferences}_getAlternativeCommand(){return""}}fn.wb.registerCommand({id:"editor.action.goToLocations",description:{description:"Go to locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:vn.r},{name:"position",description:"The position at which to start",constraint:bi.y.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:(u,e,t,i,s,o,c)=>ar(void 0,void 0,void 0,function*(){(0,pi.j)(vn.r.isUri(e)),(0,pi.j)(bi.y.isIPosition(t)),(0,pi.j)(Array.isArray(i)),(0,pi.j)(typeof s>"u"||typeof s=="string"),(0,pi.j)(typeof c>"u"||typeof c=="boolean");const m=u.get(Gi.T),A=yield m.openCodeEditor({resource:e},m.getFocusedCodeEditor());if((0,je.z9)(A))return A.setPosition(t),A.revealPositionInCenterIfOutsideViewport(t,0),A.invokeWithinContext(U=>{const W=new class extends mg{_getNoResultFoundMessage(re){return o||super._getNoResultFoundMessage(re)}}({muteMessage:!o,openInPeek:!!c,openToSide:!1},i,s);U.get(P._Y).invokeFunction(W.run.bind(W),A)})})}),fn.wb.registerCommand({id:"editor.action.peekLocations",description:{description:"Peek locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:vn.r},{name:"position",description:"The position at which to start",constraint:bi.y.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:(u,e,t,i,s)=>ar(void 0,void 0,void 0,function*(){u.get(fn.wT).executeCommand("editor.action.goToLocations",e,t,i,s,void 0,!0)})}),fn.wb.registerCommand({id:"editor.action.findReferences",handler:(u,e,t)=>{(0,pi.j)(vn.r.isUri(e)),(0,pi.j)(bi.y.isIPosition(t));const i=u.get(Zi.u),s=u.get(Gi.T);return s.openCodeEditor({resource:e},s.getFocusedCodeEditor()).then(o=>{if(!(0,je.z9)(o)||!o.hasModel())return;const c=Pr.get(o);if(!c)return;const m=(0,Ot.SS)(U=>Fr(i.referenceProvider,o.getModel(),bi.y.lift(t),!1,U).then(W=>new qt(W,we.kg("ref.title","References")))),A=new St.Q(t.lineNumber,t.column,t.lineNumber,t.column);return Promise.resolve(c.toggleWidget(A,m,!1))})}}),fn.wb.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations"),xe.ZG.appendMenuItems([{id:xe.D8.MenubarGoMenu,item:{command:{id:"editor.action.revealDefinition",title:we.kg({key:"miGotoDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Definition")},group:"4_symbol_nav",order:2}},{id:xe.D8.MenubarGoMenu,item:{command:{id:"editor.action.revealDeclaration",title:we.kg({key:"miGotoDeclaration",comment:["&& denotes a mnemonic"]},"Go to &&Declaration")},group:"4_symbol_nav",order:3}},{id:xe.D8.MenubarGoMenu,item:{command:{id:"editor.action.goToTypeDefinition",title:we.kg({key:"miGotoTypeDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Type Definition")},group:"4_symbol_nav",order:3}},{id:xe.D8.MenubarGoMenu,item:{command:{id:"editor.action.goToImplementation",title:we.kg({key:"miGotoImplementation",comment:["&& denotes a mnemonic"]},"Go to &&Implementations")},group:"4_symbol_nav",order:4}},{id:xe.D8.MenubarGoMenu,item:{command:{id:"editor.action.goToReferences",title:we.kg({key:"miGotoReference",comment:["&& denotes a mnemonic"]},"Go to &&References")},group:"4_symbol_nav",order:5}}]);var pg=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},Ec=function(u,e){return function(t,i){e(t,i,u)}};let qr=class rm{constructor(e,t,i,s){this.textModelResolverService=t,this.languageService=i,this.languageFeaturesService=s,this.toUnhook=new at.Cm,this.toUnhookForKeyboard=new at.Cm,this.currentWordAtPosition=null,this.previousPromise=null,this.editor=e,this.linkDecorations=this.editor.createDecorationsCollection();const o=new wl(e);this.toUnhook.add(o),this.toUnhook.add(o.onMouseMoveOrRelevantKeyDown(([c,m])=>{this.startFindDefinitionFromMouse(c,(0,pi.UH)(m))})),this.toUnhook.add(o.onExecute(c=>{this.isEnabled(c)&&this.gotoDefinition(c.target.position,c.hasSideBySideModifier).then(()=>{this.removeLinkDecorations()},m=>{this.removeLinkDecorations(),(0,Wi.dz)(m)})})),this.toUnhook.add(o.onCancel(()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null}))}static get(e){return e.getContribution(rm.ID)}startFindDefinitionFromCursor(e){return this.startFindDefinition(e).then(()=>{this.toUnhookForKeyboard.add(this.editor.onDidChangeCursorPosition(()=>{this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear()})),this.toUnhookForKeyboard.add(this.editor.onKeyDown(t=>{t&&(this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear())}))})}startFindDefinitionFromMouse(e,t){if(e.target.type===9&&this.linkDecorations.length>0)return;if(!this.editor.hasModel()||!this.isEnabled(e,t)){this.currentWordAtPosition=null,this.removeLinkDecorations();return}const i=e.target.position;this.startFindDefinition(i)}startFindDefinition(e){var t;this.toUnhookForKeyboard.clear();const i=e?(t=this.editor.getModel())===null||t===void 0?void 0:t.getWordAtPosition(e):null;if(!i)return this.currentWordAtPosition=null,this.removeLinkDecorations(),Promise.resolve(0);if(this.currentWordAtPosition&&this.currentWordAtPosition.startColumn===i.startColumn&&this.currentWordAtPosition.endColumn===i.endColumn&&this.currentWordAtPosition.word===i.word)return Promise.resolve(0);this.currentWordAtPosition=i;const s=new Gn.$t(this.editor,15);return this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=(0,Ot.SS)(o=>this.findDefinition(e,o)),this.previousPromise.then(o=>{if(!o||!o.length||!s.validate(this.editor)){this.removeLinkDecorations();return}if(o.length>1)this.addDecoration(new St.Q(e.lineNumber,i.startColumn,e.lineNumber,i.endColumn),new Li.Bc().appendText(we.kg("multipleResults","Click to show {0} definitions.",o.length)));else{const c=o[0];if(!c.uri)return;this.textModelResolverService.createModelReference(c.uri).then(m=>{if(!m.object||!m.object.textEditorModel){m.dispose();return}const{object:{textEditorModel:A}}=m,{startLineNumber:U}=c.range;if(U<1||U>A.getLineCount()){m.dispose();return}const W=this.getPreviewValue(A,U,c);let re;c.originSelectionRange?re=St.Q.lift(c.originSelectionRange):re=new St.Q(e.lineNumber,i.startColumn,e.lineNumber,i.endColumn);const Se=this.languageService.guessLanguageIdByFilepathOrFirstLine(A.uri);this.addDecoration(re,new Li.Bc().appendCodeblock(Se||"",W)),m.dispose()})}}).then(void 0,Wi.dz)}getPreviewValue(e,t,i){let s=i.range;return s.endLineNumber-s.startLineNumber>=rm.MAX_SOURCE_PREVIEW_LINES&&(s=this.getPreviewRangeBasedOnIndentation(e,t)),this.stripIndentationFromPreviewRange(e,t,s)}stripIndentationFromPreviewRange(e,t,i){let o=e.getLineFirstNonWhitespaceColumn(t);for(let m=t+1;m<i.endLineNumber;m++){const A=e.getLineFirstNonWhitespaceColumn(m);o=Math.min(o,A)}return e.getValueInRange(i).replace(new RegExp(`^\\s{${o-1}}`,"gm"),"").trim()}getPreviewRangeBasedOnIndentation(e,t){const i=e.getLineFirstNonWhitespaceColumn(t),s=Math.min(e.getLineCount(),t+rm.MAX_SOURCE_PREVIEW_LINES);let o=t+1;for(;o<s;o++){const c=e.getLineFirstNonWhitespaceColumn(o);if(i===c)break}return new St.Q(t,1,o+1,1)}addDecoration(e,t){const i={range:e,options:{description:"goto-definition-link",inlineClassName:"goto-definition-link",hoverMessage:t}};this.linkDecorations.set([i])}removeLinkDecorations(){this.linkDecorations.clear()}isEnabled(e,t){return this.editor.hasModel()&&e.isNoneOrSingleMouseDown&&e.target.type===6&&(e.hasTriggerModifier||(t?t.keyCodeIsTriggerKey:!1))&&this.languageFeaturesService.definitionProvider.has(this.editor.getModel())}findDefinition(e,t){const i=this.editor.getModel();return i?yc(this.languageFeaturesService.definitionProvider,i,e,t):Promise.resolve(null)}gotoDefinition(e,t){return this.editor.setPosition(e),this.editor.invokeWithinContext(i=>{const s=!t&&this.editor.getOption(80)&&!this.isInPeekEditor(i);return new kd({openToSide:t,openInPeek:s,muteMessage:!0},{alias:"",label:"",id:"",precondition:void 0}).run(i,this.editor)})}isInPeekEditor(e){const t=e.get(ct.fN);return lo.inPeekEditor.getValue(t)}dispose(){this.toUnhook.dispose()}};qr.ID="editor.contrib.gotodefinitionatposition",qr.MAX_SOURCE_PREVIEW_LINES=8,qr=pg([Ec(1,Hs.b),Ec(2,Fs.L),Ec(3,Zi.u)],qr),(0,Te.HW)(qr.ID,qr),(0,Ye.zy)((u,e)=>{const t=u.getColor(Ce.Ztu);t&&e.addRule(`.monaco-editor .goto-definition-link { color: ${t} !important; }`)});var ko=f(63781),O_=f(25925);const xc=M.$;class ea extends at.jG{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 ko.MU(this.contentsDomNode,{consumeMouseWheelIfScrollbarIsNeeded:!0})),this.containerDomNode.appendChild(this.scrollbar.getDomNode())}onContentsChanged(){this.scrollbar.scanDomNode()}}class Ic extends at.jG{constructor(e,t,i){super(),this.actionContainer=M.BC(e,xc("div.action-container")),this.actionContainer.setAttribute("tabindex","0"),this.action=M.BC(this.actionContainer,xc("a.action")),this.action.setAttribute("role","button"),t.iconClass&&M.BC(this.action,xc(`span.icon.${t.iconClass}`));const s=M.BC(this.action,xc("span"));s.textContent=i?`${t.label} (${i})`:t.label,this._register(M.ko(this.actionContainer,M.Bx.CLICK,o=>{o.stopPropagation(),o.preventDefault(),t.run(this.actionContainer)})),this._register(M.ko(this.actionContainer,M.Bx.KEY_UP,o=>{new yr.Z(o).equals(3)&&(o.stopPropagation(),o.preventDefault(),t.run(this.actionContainer))})),this.setEnabled(!0)}static render(e,t,i){return new Ic(e,t,i)}setEnabled(e){e?(this.actionContainer.classList.remove("disabled"),this.actionContainer.removeAttribute("aria-disabled")):(this.actionContainer.classList.add("disabled"),this.actionContainer.setAttribute("aria-disabled","true"))}}var _g=function(u,e,t,i){function s(o){return o instanceof t?o:new t(function(c){c(o)})}return new(t||(t=Promise))(function(o,c){function m(W){try{U(i.next(W))}catch(re){c(re)}}function A(W){try{U(i.throw(W))}catch(re){c(re)}}function U(W){W.done?o(W.value):s(W.value).then(m,A)}U((i=i.apply(u,e||[])).next())})},vg=function(u){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=u[Symbol.asyncIterator],t;return e?e.call(u):(u=typeof __values=="function"?__values(u):u[Symbol.iterator](),t={},i("next"),i("throw"),i("return"),t[Symbol.asyncIterator]=function(){return this},t);function i(o){t[o]=u[o]&&function(c){return new Promise(function(m,A){c=u[o](c),s(m,A,c.done,c.value)})}}function s(o,c,m,A){Promise.resolve(A).then(function(U){o({value:U,done:m})},c)}};class Ls{constructor(e,t,i){this.value=e,this.isComplete=t,this.hasLoadingMessage=i}}class Cg extends at.jG{constructor(e,t){super(),this._editor=e,this._computer=t,this._onResult=this._register(new Vi.vl),this.onResult=this._onResult.event,this._firstWaitScheduler=this._register(new Ot.uC(()=>this._triggerAsyncComputation(),0)),this._secondWaitScheduler=this._register(new Ot.uC(()=>this._triggerSyncComputation(),0)),this._loadingMessageScheduler=this._register(new Ot.uC(()=>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(55).delay}get _firstWaitTime(){return this._hoverTime/2}get _secondWaitTime(){return this._hoverTime-this._firstWaitTime}get _loadingMessageTime(){return 3*this._hoverTime}_setState(e,t=!0){this._state=e,t&&this._fireResult()}_triggerAsyncComputation(){this._setState(2),this._secondWaitScheduler.schedule(this._secondWaitTime),this._computer.computeAsync?(this._asyncIterableDone=!1,this._asyncIterable=(0,Ot.bI)(e=>this._computer.computeAsync(e)),_g(this,void 0,void 0,function*(){var e,t;try{try{for(var i=vg(this._asyncIterable),s;s=yield i.next(),!s.done;){const o=s.value;o&&(this._result.push(o),this._fireResult())}}catch(o){e={error:o}}finally{try{s&&!s.done&&(t=i.return)&&(yield t.call(i))}finally{if(e)throw e.error}}this._asyncIterableDone=!0,(this._state===3||this._state===4)&&this._setState(0)}catch(o){(0,Wi.dz)(o)}})):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,t=this._state===4;this._onResult.fire(new Ls(this._result.slice(0),e,t))}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 Vh{constructor(e,t){this.priority=e,this.range=t,this.type=1}equals(e){return e.type===1&&this.range.equalsRange(e.range)}canAdoptVisibleHover(e,t){return e.type===1&&t.lineNumber===this.range.startLineNumber}}class Dr{constructor(e,t,i){this.priority=e,this.owner=t,this.range=i,this.type=2}equals(e){return e.type===2&&this.owner===e.owner}canAdoptVisibleHover(e,t){return e.type===2&&this.owner===e.owner}}const Bs=new class{constructor(){this._participants=[]}register(e){this._participants.push(e)}getAll(){return this._participants}};class Zo{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 t=0,i=this.value.charCodeAt(e),s;if(s=Zo._table[i],typeof s=="number")return this.pos+=1,{type:s,pos:e,len:1};if(Zo.isDigitCharacter(i)){s=8;do t+=1,i=this.value.charCodeAt(e+t);while(Zo.isDigitCharacter(i));return this.pos+=t,{type:s,pos:e,len:t}}if(Zo.isVariableCharacter(i)){s=9;do i=this.value.charCodeAt(e+ ++t);while(Zo.isVariableCharacter(i)||Zo.isDigitCharacter(i));return this.pos+=t,{type:s,pos:e,len:t}}s=10;do t+=1,i=this.value.charCodeAt(e+t);while(!isNaN(i)&&typeof Zo._table[i]>"u"&&!Zo.isDigitCharacter(i)&&!Zo.isVariableCharacter(i));return this.pos+=t,{type:s,pos:e,len:t}}}Zo._table={[36]:0,[58]:1,[44]:2,[123]:3,[125]:4,[92]:5,[47]:6,[124]:7,[43]:11,[45]:12,[63]:13};class Pl{constructor(){this._children=[]}appendChild(e){return e instanceof po&&this._children[this._children.length-1]instanceof po?this._children[this._children.length-1].value+=e.value:(e.parent=this,this._children.push(e)),this}replace(e,t){const{parent:i}=e,s=i.children.indexOf(e),o=i.children.slice(0);o.splice(s,1,...t),i._children=o,function c(m,A){for(const U of m)U.parent=A,c(U.children,U)}(t,i)}get children(){return this._children}get snippet(){let e=this;for(;;){if(!e)return;if(e instanceof Wl)return e;e=e.parent}}toString(){return this.children.reduce((e,t)=>e+t.toString(),"")}len(){return 0}}class po extends Pl{constructor(e){super(),this.value=e}toString(){return this.value}len(){return this.value.length}clone(){return new po(this.value)}}class Ed extends Pl{}class cr extends Ed{constructor(e){super(),this.index=e}static compareByIndex(e,t){return e.index===t.index?0:e.isFinalTabstop?1:t.isFinalTabstop||e.index<t.index?-1:e.index>t.index?1:0}get isFinalTabstop(){return this.index===0}get choice(){return this._children.length===1&&this._children[0]instanceof Fl?this._children[0]:void 0}clone(){const e=new cr(this.index);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(t=>t.clone()),e}}class Fl extends Pl{constructor(){super(...arguments),this.options=[]}appendChild(e){return e instanceof po&&(e.parent=this,this.options.push(e)),this}toString(){return this.options[0].value}len(){return this.options[0].len()}clone(){const e=new Fl;return this.options.forEach(e.appendChild,e),e}}class Bl extends Pl{constructor(){super(...arguments),this.regexp=new RegExp("")}resolve(e){const t=this;let i=!1,s=e.replace(this.regexp,function(){return i=!0,t._replace(Array.prototype.slice.call(arguments,0,-2))});return!i&&this._children.some(o=>o instanceof Yo&&!!o.elseValue)&&(s=this._replace([])),s}_replace(e){let t="";for(const i of this._children)if(i instanceof Yo){let s=e[i.index]||"";s=i.resolve(s),t+=s}else t+=i.toString();return t}toString(){return""}clone(){const e=new Bl;return e.regexp=new RegExp(this.regexp.source,(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),e._children=this.children.map(t=>t.clone()),e}}class Yo extends Pl{constructor(e,t,i,s){super(),this.index=e,this.shorthandName=t,this.ifValue=i,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 t=e.match(/[a-z0-9]+/gi);return t?t.map(i=>i.charAt(0).toUpperCase()+i.substr(1)).join(""):e}_toCamelCase(e){const t=e.match(/[a-z0-9]+/gi);return t?t.map((i,s)=>s===0?i.charAt(0).toLowerCase()+i.substr(1):i.charAt(0).toUpperCase()+i.substr(1)).join(""):e}clone(){return new Yo(this.index,this.shorthandName,this.ifValue,this.elseValue)}}class Sa extends Ed{constructor(e){super(),this.name=e}resolve(e){let t=e.resolve(this);return this.transform&&(t=this.transform.resolve(t||"")),t!==void 0?(this._children=[new po(t)],!0):!1}clone(){const e=new Sa(this.name);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(t=>t.clone()),e}}function bg(u,e){const t=[...u];for(;t.length>0;){const i=t.shift();if(!e(i))break;t.unshift(...i.children)}}class Wl extends Pl{get placeholderInfo(){if(!this._placeholders){const e=[];let t;this.walk(function(i){return i instanceof cr&&(e.push(i),t=!t||t.index<i.index?i:t),!0}),this._placeholders={all:e,last:t}}return this._placeholders}get placeholders(){const{all:e}=this.placeholderInfo;return e}offset(e){let t=0,i=!1;return this.walk(s=>s===e?(i=!0,!1):(t+=s.len(),!0)),i?t:-1}fullLen(e){let t=0;return bg([e],i=>(t+=i.len(),!0)),t}enclosingPlaceholders(e){const t=[];let{parent:i}=e;for(;i;)i instanceof cr&&t.push(i),i=i.parent;return t}resolveVariables(e){return this.walk(t=>(t instanceof Sa&&t.resolve(e)&&(this._placeholders=void 0),!0)),this}appendChild(e){return this._placeholders=void 0,super.appendChild(e)}replace(e,t){return this._placeholders=void 0,super.replace(e,t)}clone(){const e=new Wl;return this._children=this.children.map(t=>t.clone()),e}walk(e){bg(this.children,e)}}class ta{constructor(){this._scanner=new Zo,this._token={type:14,pos:0,len:0}}static escape(e){return e.replace(/\$|}|\\/g,"\\$&")}static guessNeedsClipboard(e){return/\${?CLIPBOARD/.test(e)}parse(e,t,i){const s=new Wl;return this.parseFragment(e,s),this.ensureFinalTabstop(s,i??!1,t??!1),s}parseFragment(e,t){const i=t.children.length;for(this._scanner.text(e),this._token=this._scanner.next();this._parse(t););const s=new Map,o=[];t.walk(c=>(c instanceof cr&&(c.isFinalTabstop?s.set(0,void 0):!s.has(c.index)&&c.children.length>0?s.set(c.index,c.children):o.push(c)),!0));for(const c of o){const m=s.get(c.index);if(m){const A=new cr(c.index);A.transform=c.transform;for(const U of m)A.appendChild(U.clone());t.replace(c,[A])}}return t.children.slice(i)}ensureFinalTabstop(e,t,i){(t||i&&e.placeholders.length>0)&&(e.placeholders.find(o=>o.index===0)||e.appendChild(new cr(0)))}_accept(e,t){if(e===void 0||this._token.type===e){const i=t?this._scanner.tokenText(this._token):!0;return this._token=this._scanner.next(),i}return!1}_backTo(e){return this._scanner.pos=e.pos+e.len,this._token=e,!1}_until(e){const t=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 i=this._scanner.value.substring(t.pos,this._token.pos).replace(/\\(\$|}|\\)/g,"$1");return this._token=this._scanner.next(),i}_parse(e){return this._parseEscaped(e)||this._parseTabstopOrVariableName(e)||this._parseComplexPlaceholder(e)||this._parseComplexVariable(e)||this._parseAnything(e)}_parseEscaped(e){let t;return(t=this._accept(5,!0))?(t=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||t,e.appendChild(new po(t)),!0):!1}_parseTabstopOrVariableName(e){let t;const i=this._token;return this._accept(0)&&(t=this._accept(9,!0)||this._accept(8,!0))?(e.appendChild(/^\d+$/.test(t)?new cr(Number(t)):new Sa(t)),!0):this._backTo(i)}_parseComplexPlaceholder(e){let t;const i=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(8,!0))))return this._backTo(i);const o=new cr(Number(t));if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(o),!0;if(!this._parse(o))return e.appendChild(new po("${"+t+":")),o.children.forEach(e.appendChild,e),!0}else if(o.index>0&&this._accept(7)){const c=new Fl;for(;;){if(this._parseChoiceElement(c)){if(this._accept(2))continue;if(this._accept(7)&&(o.appendChild(c),this._accept(4)))return e.appendChild(o),!0}return this._backTo(i),!1}}else return this._accept(6)?this._parseTransform(o)?(e.appendChild(o),!0):(this._backTo(i),!1):this._accept(4)?(e.appendChild(o),!0):this._backTo(i)}_parseChoiceElement(e){const t=this._token,i=[];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(t),!1;i.push(s)}return i.length===0?(this._backTo(t),!1):(e.appendChild(new po(i.join(""))),!0)}_parseComplexVariable(e){let t;const i=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(9,!0))))return this._backTo(i);const o=new Sa(t);if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(o),!0;if(!this._parse(o))return e.appendChild(new po("${"+t+":")),o.children.forEach(e.appendChild,e),!0}else return this._accept(6)?this._parseTransform(o)?(e.appendChild(o),!0):(this._backTo(i),!1):this._accept(4)?(e.appendChild(o),!0):this._backTo(i)}_parseTransform(e){const t=new Bl;let i="",s="";for(;!this._accept(6);){let o;if(o=this._accept(5,!0)){o=this._accept(6,!0)||o,i+=o;continue}if(this._token.type!==14){i+=this._accept(void 0,!0);continue}return!1}for(;!this._accept(6);){let o;if(o=this._accept(5,!0)){o=this._accept(5,!0)||this._accept(6,!0)||o,t.appendChild(new po(o));continue}if(!(this._parseFormatString(t)||this._parseAnything(t)))return!1}for(;!this._accept(4);){if(this._token.type!==14){s+=this._accept(void 0,!0);continue}return!1}try{t.regexp=new RegExp(i,s)}catch{return!1}return e.transform=t,!0}_parseFormatString(e){const t=this._token;if(!this._accept(0))return!1;let i=!1;this._accept(3)&&(i=!0);const s=this._accept(8,!0);if(s)if(i){if(this._accept(4))return e.appendChild(new Yo(Number(s))),!0;if(!this._accept(1))return this._backTo(t),!1}else return e.appendChild(new Yo(Number(s))),!0;else return this._backTo(t),!1;if(this._accept(6)){const o=this._accept(9,!0);return!o||!this._accept(4)?(this._backTo(t),!1):(e.appendChild(new Yo(Number(s),o)),!0)}else if(this._accept(11)){const o=this._until(4);if(o)return e.appendChild(new Yo(Number(s),void 0,o,void 0)),!0}else if(this._accept(12)){const o=this._until(4);if(o)return e.appendChild(new Yo(Number(s),void 0,void 0,o)),!0}else if(this._accept(13)){const o=this._until(1);if(o){const c=this._until(4);if(c)return e.appendChild(new Yo(Number(s),void 0,o,c)),!0}}else{const o=this._until(4);if(o)return e.appendChild(new Yo(Number(s),void 0,void 0,o)),!0}return this._backTo(t),!1}_parseAnything(e){return this._token.type!==14?(e.appendChild(new po(this._scanner.tokenText(this._token))),this._accept(void 0),!0):!1}}var Hh=f(6595),Nc=f(50585),_m=f(29004),Mc=f(37905);const Tc=we.kg("defaultLabel","input"),zh=we.kg("label.preserveCaseToggle","Preserve Case");class vm extends Nc.l{constructor(e){super({icon:Mi.W6.preserveCase,title:zh+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class Uh extends Cr.x{constructor(e,t,i,s){super(),this._showOptionButtons=i,this.fixFocusOnOptionClickEnabled=!0,this.cachedOptionsWidth=0,this._onDidOptionChange=this._register(new Vi.vl),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new Vi.vl),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new Vi.vl),this._onInput=this._register(new Vi.vl),this._onKeyUp=this._register(new Vi.vl),this._onPreserveCaseKeyDown=this._register(new Vi.vl),this.onPreserveCaseKeyDown=this._onPreserveCaseKeyDown.event,this.contextViewProvider=t,this.placeholder=s.placeholder||"",this.validation=s.validation,this.label=s.label||Tc,this.inputActiveOptionBorder=s.inputActiveOptionBorder,this.inputActiveOptionForeground=s.inputActiveOptionForeground,this.inputActiveOptionBackground=s.inputActiveOptionBackground,this.inputBackground=s.inputBackground,this.inputForeground=s.inputForeground,this.inputBorder=s.inputBorder,this.inputValidationInfoBorder=s.inputValidationInfoBorder,this.inputValidationInfoBackground=s.inputValidationInfoBackground,this.inputValidationInfoForeground=s.inputValidationInfoForeground,this.inputValidationWarningBorder=s.inputValidationWarningBorder,this.inputValidationWarningBackground=s.inputValidationWarningBackground,this.inputValidationWarningForeground=s.inputValidationWarningForeground,this.inputValidationErrorBorder=s.inputValidationErrorBorder,this.inputValidationErrorBackground=s.inputValidationErrorBackground,this.inputValidationErrorForeground=s.inputValidationErrorForeground;const o=s.appendPreserveCaseLabel||"",c=s.history||[],m=!!s.flexibleHeight,A=!!s.flexibleWidth,U=s.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new _m.m(this.domNode,this.contextViewProvider,{ariaLabel:this.label||"",placeholder:this.placeholder||"",validationOptions:{validation:this.validation},inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder,history:c,showHistoryHint:s.showHistoryHint,flexibleHeight:m,flexibleWidth:A,flexibleMaxHeight:U})),this.preserveCase=this._register(new vm({appendTitle:o,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.preserveCase.onChange(Se=>{this._onDidOptionChange.fire(Se),!Se&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.preserveCase.onKeyDown(Se=>{this._onPreserveCaseKeyDown.fire(Se)})),this._showOptionButtons?this.cachedOptionsWidth=this.preserveCase.width():this.cachedOptionsWidth=0;const W=[this.preserveCase.domNode];this.onkeydown(this.domNode,Se=>{if(Se.equals(15)||Se.equals(17)||Se.equals(9)){const Be=W.indexOf(document.activeElement);if(Be>=0){let Qe=-1;Se.equals(17)?Qe=(Be+1)%W.length:Se.equals(15)&&(Be===0?Qe=W.length-1:Qe=Be-1),Se.equals(9)?(W[Be].blur(),this.inputBox.focus()):Qe>=0&&W[Qe].focus(),M.fs.stop(Se,!0)}}});const re=document.createElement("div");re.className="controls",re.style.display=this._showOptionButtons?"block":"none",re.appendChild(this.preserveCase.domNode),this.domNode.appendChild(re),e?.appendChild(this.domNode),this.onkeydown(this.inputBox.inputElement,Se=>this._onKeyDown.fire(Se)),this.onkeyup(this.inputBox.inputElement,Se=>this._onKeyUp.fire(Se)),this.oninput(this.inputBox.inputElement,Se=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,Se=>this._onMouseDown.fire(Se))}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()}style(e){this.inputActiveOptionBorder=e.inputActiveOptionBorder,this.inputActiveOptionForeground=e.inputActiveOptionForeground,this.inputActiveOptionBackground=e.inputActiveOptionBackground,this.inputBackground=e.inputBackground,this.inputForeground=e.inputForeground,this.inputBorder=e.inputBorder,this.inputValidationInfoBackground=e.inputValidationInfoBackground,this.inputValidationInfoForeground=e.inputValidationInfoForeground,this.inputValidationInfoBorder=e.inputValidationInfoBorder,this.inputValidationWarningBackground=e.inputValidationWarningBackground,this.inputValidationWarningForeground=e.inputValidationWarningForeground,this.inputValidationWarningBorder=e.inputValidationWarningBorder,this.inputValidationErrorBackground=e.inputValidationErrorBackground,this.inputValidationErrorForeground=e.inputValidationErrorForeground,this.inputValidationErrorBorder=e.inputValidationErrorBorder,this.applyStyles()}applyStyles(){if(this.domNode){const e={inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground};this.preserveCase.style(e);const t={inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder};this.inputBox.style(t)}}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getPreserveCase(){return this.preserveCase.checked}setPreserveCase(e){this.preserveCase.checked=e}focusOnPreserve(){this.preserveCase.focus()}validate(){this.inputBox&&this.inputBox.validate()}set width(e){this.inputBox.paddingRight=this.cachedOptionsWidth,this.inputBox.width=e,this.domNode.style.width=e+"px"}dispose(){super.dispose()}}var wg=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},Sg=function(u,e){return function(t,i){e(t,i,u)}};const jh=new ct.N1("suggestWidgetVisible",!1,(0,we.kg)("suggestWidgetVisible","Whether suggestion are visible")),xd="historyNavigationWidgetFocus",an="historyNavigationForwardsEnabled",Rc="historyNavigationBackwardsEnabled";let ss;const Ac=[];function Kh(u,e){if(Ac.includes(e))throw new Error("Cannot register the same widget multiple times");Ac.push(e);const t=new at.Cm,i=t.add(u.createScoped(e.element)),s=new ct.N1(xd,!1).bindTo(i),o=new ct.N1(an,!0).bindTo(i),c=new ct.N1(Rc,!0).bindTo(i),m=()=>{s.set(!0),ss=e},A=()=>{s.set(!1),ss===e&&(ss=void 0)};return e.element===document.activeElement&&m(),t.add(e.onDidFocus(()=>m())),t.add(e.onDidBlur(()=>A())),t.add((0,at.s)(()=>{Ac.splice(Ac.indexOf(e),1),A()})),{scopedContextKeyService:i,historyNavigationForwardsEnablement:o,historyNavigationBackwardsEnablement:c,dispose(){t.dispose()}}}let $h=class extends Hh.c{constructor(e,t,i,s,o=!1){super(e,t,o,i),this._register(Kh(s,this.inputBox))}};$h=wg([Sg(3,ct.fN)],$h);let Vl=class extends Uh{constructor(e,t,i,s,o=!1){super(e,t,o,i),this._register(Kh(s,this.inputBox))}};Vl=wg([Sg(3,ct.fN)],Vl),it.f.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:ct.M$.and(ct.M$.has(xd),ct.M$.equals(Rc,!0),jh.isEqualTo(!1)),primary:16,secondary:[528],handler:u=>{ss&&ss.showPreviousValue()}}),it.f.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:ct.M$.and(ct.M$.has(xd),ct.M$.equals(an,!0),jh.isEqualTo(!1)),primary:18,secondary:[530],handler:u=>{ss&&ss.showNextValue()}});var Ja=function(u,e,t,i){function s(o){return o instanceof t?o:new t(function(c){c(o)})}return new(t||(t=Promise))(function(o,c){function m(W){try{U(i.next(W))}catch(re){c(re)}}function A(W){try{U(i.throw(W))}catch(re){c(re)}}function U(W){W.done?o(W.value):s(W.value).then(m,A)}U((i=i.apply(u,e||[])).next())})};const Tn={Visible:jh,HasFocusedSuggestion:new ct.N1("suggestWidgetHasFocusedSuggestion",!1,(0,we.kg)("suggestWidgetHasSelection","Whether any suggestion is focused")),DetailsVisible:new ct.N1("suggestWidgetDetailsVisible",!1,(0,we.kg)("suggestWidgetDetailsVisible","Whether suggestion details are visible")),MultipleSuggestions:new ct.N1("suggestWidgetMultipleSuggestions",!1,(0,we.kg)("suggestWidgetMultipleSuggestions","Whether there are multiple suggestions to pick from")),MakesTextEdit:new ct.N1("suggestionMakesTextEdit",!0,(0,we.kg)("suggestionMakesTextEdit","Whether inserting the current suggestion yields in a change or has everything already been typed")),AcceptSuggestionsOnEnter:new ct.N1("acceptSuggestionOnEnter",!0,(0,we.kg)("acceptSuggestionOnEnter","Whether suggestions are inserted when pressing Enter")),HasInsertAndReplaceRange:new ct.N1("suggestionHasInsertAndReplaceRange",!1,(0,we.kg)("suggestionHasInsertAndReplaceRange","Whether the current suggestion has insert and replace behaviour")),InsertMode:new ct.N1("suggestionInsertMode",void 0,{type:"string",description:(0,we.kg)("suggestionInsertMode","Whether the default behaviour is to insert or replace")}),CanResolve:new ct.N1("suggestionCanResolve",!1,(0,we.kg)("suggestionCanResolve","Whether the current suggestion supports to resolve further details"))},ia=new xe.D8("suggestWidgetStatusBar");class yg{constructor(e,t,i,s){this.position=e,this.completion=t,this.container=i,this.provider=s,this.isInvalid=!1,this.score=Qi.ne.Default,this.distance=0,this.textLabel=typeof t.label=="string"?t.label:t.label.label,this.labelLow=this.textLabel.toLowerCase(),this.isInvalid=!this.textLabel,this.sortTextLow=t.sortText&&t.sortText.toLowerCase(),this.filterTextLow=t.filterText&&t.filterText.toLowerCase(),this.extensionId=t.extensionId,St.Q.isIRange(t.range)?(this.editStart=new bi.y(t.range.startLineNumber,t.range.startColumn),this.editInsertEnd=new bi.y(t.range.endLineNumber,t.range.endColumn),this.editReplaceEnd=new bi.y(t.range.endLineNumber,t.range.endColumn),this.isInvalid=this.isInvalid||St.Q.spansMultipleLines(t.range)||t.range.startLineNumber!==e.lineNumber):(this.editStart=new bi.y(t.range.insert.startLineNumber,t.range.insert.startColumn),this.editInsertEnd=new bi.y(t.range.insert.endLineNumber,t.range.insert.endColumn),this.editReplaceEnd=new bi.y(t.range.replace.endLineNumber,t.range.replace.endColumn),this.isInvalid=this.isInvalid||St.Q.spansMultipleLines(t.range.insert)||St.Q.spansMultipleLines(t.range.replace)||t.range.insert.startLineNumber!==e.lineNumber||t.range.replace.startLineNumber!==e.lineNumber||t.range.insert.startColumn!==t.range.replace.startColumn),typeof s.resolveCompletionItem!="function"&&(this._resolveCache=Promise.resolve(),this._isResolved=!0)}get isResolved(){return!!this._isResolved}resolve(e){return Ja(this,void 0,void 0,function*(){if(!this._resolveCache){const t=e.onCancellationRequested(()=>{this._resolveCache=void 0,this._isResolved=!1});this._resolveCache=Promise.resolve(this.provider.resolveCompletionItem(this.completion,e)).then(i=>{Object.assign(this.completion,i),this._isResolved=!0,t.dispose()},i=>{(0,Wi.MB)(i)&&(this._resolveCache=void 0,this._isResolved=!1)})}return this._resolveCache})}}class Id{constructor(e=2,t=new Set,i=new Set,s=!0){this.snippetSortOrder=e,this.kindFilter=t,this.providerFilter=i,this.showDeprecated=s}}Id.default=new Id;let Nd;function Cm(){return Nd}class bm{constructor(e,t,i,s){this.items=e,this.needsClipboard=t,this.durations=i,this.disposable=s}}function Gh(u,e,t,i=Id.default,s={triggerKind:0},o=Ti.X.None){return Ja(this,void 0,void 0,function*(){const c=new Ys.W(!0);t=t.clone();const m=e.getWordAtPosition(t),A=m?new St.Q(t.lineNumber,m.startColumn,t.lineNumber,m.endColumn):St.Q.fromPositions(t),U={replace:A,insert:A.setEndPosition(t.lineNumber,t.column)},W=[],re=new at.Cm,Se=[];let Be=!1;const Qe=(vt,Ht,ci)=>{var gi,Ui,dn;let hs=!1;if(!Ht)return hs;for(const An of Ht.suggestions)if(!i.kindFilter.has(An.kind)){if(!i.showDeprecated&&(!((gi=An?.tags)===null||gi===void 0)&&gi.includes(1)))continue;An.range||(An.range=U),An.sortText||(An.sortText=typeof An.label=="string"?An.label:An.label.label),!Be&&An.insertTextRules&&An.insertTextRules&4&&(Be=ta.guessNeedsClipboard(An.insertText)),W.push(new yg(t,An,Ht,vt)),hs=!0}return(0,at.Xm)(Ht)&&re.add(Ht),Se.push({providerName:(Ui=vt._debugDisplayName)!==null&&Ui!==void 0?Ui:"unknown_provider",elapsedProvider:(dn=Ht.duration)!==null&&dn!==void 0?dn:-1,elapsedOverall:ci.elapsed()}),hs},tt=(()=>Ja(this,void 0,void 0,function*(){if(!Nd||i.kindFilter.has(27)||i.providerFilter.size>0&&!i.providerFilter.has(Nd))return;const vt=new Ys.W(!0),Ht=yield Nd.provideCompletionItems(e,t,s,o);Qe(Nd,Ht,vt)}))();for(const vt of u.orderedGroups(e)){let Ht=!1;if(yield Promise.all(vt.map(ci=>Ja(this,void 0,void 0,function*(){if(!(i.providerFilter.size>0&&!i.providerFilter.has(ci)))try{const gi=new Ys.W(!0),Ui=yield ci.provideCompletionItems(e,t,s,o);Ht=Qe(ci,Ui,gi)||Ht}catch(gi){(0,Wi.M_)(gi)}}))),Ht||o.isCancellationRequested)break}return yield tt,o.isCancellationRequested?(re.dispose(),Promise.reject(new Wi.AL)):new bm(W.sort(Lg(i.snippetSortOrder)),Be,{entries:Se,elapsed:c.elapsed()},re)})}function Qh(u,e){if(u.sortTextLow&&e.sortTextLow){if(u.sortTextLow<e.sortTextLow)return-1;if(u.sortTextLow>e.sortTextLow)return 1}return u.textLabel<e.textLabel?-1:u.textLabel>e.textLabel?1:u.completion.kind-e.completion.kind}function wm(u,e){if(u.completion.kind!==e.completion.kind){if(u.completion.kind===27)return-1;if(e.completion.kind===27)return 1}return Qh(u,e)}function Sm(u,e){if(u.completion.kind!==e.completion.kind){if(u.completion.kind===27)return 1;if(e.completion.kind===27)return-1}return Qh(u,e)}const Oc=new Map;Oc.set(0,wm),Oc.set(2,Sm),Oc.set(1,Qh);function Lg(u){return Oc.get(u)}fn.wb.registerCommand("_executeCompletionItemProvider",(u,...e)=>Ja(void 0,void 0,void 0,function*(){const[t,i,s,o]=e;(0,pi.j)(vn.r.isUri(t)),(0,pi.j)(bi.y.isIPosition(i)),(0,pi.j)(typeof s=="string"||!s),(0,pi.j)(typeof o=="number"||!o);const{completionProvider:c}=u.get(Zi.u),m=yield u.get(Hs.b).createModelReference(t);try{const A={incomplete:!1,suggestions:[]},U=[],W=yield Gh(c,m.object.textEditorModel,bi.y.lift(i),void 0,{triggerCharacter:s,triggerKind:s?1:0});for(const re of W.items)U.length<(o??0)&&U.push(re.resolve(Ti.X.None)),A.incomplete=A.incomplete||re.container.incomplete,A.suggestions.push(re.completion);try{return yield Promise.all(U),A}finally{setTimeout(()=>W.disposable.dispose(),100)}}finally{m.dispose()}}));function ym(u,e){var t;(t=u.getContribution("editor.contrib.suggestController"))===null||t===void 0||t.triggerSuggest(new Set().add(e),void 0,!0)}class Hl{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,t){switch(t){case 1:return e.comments;case 2:return e.strings;default:return e.other}}}var Zh=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},Pc=function(u,e){return function(t,i){e(t,i,u)}};const Dg=M.$;let Fc=class I_ extends at.jG{constructor(e,t,i){super(),this._editor=e,this._instantiationService=t,this._keybindingService=i,this._widget=this._register(this._instantiationService.createInstance(qa,this._editor)),this._isChangingDecorations=!1,this._messages=[],this._messagesAreComplete=!1,this._participants=[];for(const s of Bs.getAll())this._participants.push(this._instantiationService.createInstance(s,this._editor));this._participants.sort((s,o)=>s.hoverOrdinal-o.hoverOrdinal),this._computer=new Bc(this._editor,this._participants),this._hoverOperation=this._register(new Cg(this._editor,this._computer)),this._register(this._hoverOperation.onResult(s=>{this._withResult(s.value,s.isComplete,s.hasLoadingMessage)})),this._register(this._editor.onDidChangeModelDecorations(()=>{this._isChangingDecorations||this._onModelDecorationsChanged()})),this._register(M.b2(this._widget.getDomNode(),"keydown",s=>{s.equals(9)&&this.hide()})),this._register(Xe.dG.onDidChange(()=>{this._widget.position&&this._computer.anchor&&this._messages.length>0&&(this._widget.clear(),this._renderMessages(this._computer.anchor,this._messages))}))}_onModelDecorationsChanged(){this._widget.position&&(this._hoverOperation.cancel(),this._widget.isColorPickerVisible||this._hoverOperation.start(0))}maybeShowAt(e){const t=[];for(const s of this._participants)if(s.suggestHoverAnchor){const o=s.suggestHoverAnchor(e);o&&t.push(o)}const i=e.target;if(i.type===6&&t.push(new Vh(0,i.range)),i.type===7){const s=this._editor.getOption(46).typicalHalfwidthCharacterWidth/2;!i.detail.isAfterLines&&typeof i.detail.horizontalDistanceToText=="number"&&i.detail.horizontalDistanceToText<s&&t.push(new Vh(0,i.range))}return t.length===0?!1:(t.sort((s,o)=>o.priority-s.priority),this._startShowingAt(t[0],0,!1),!0)}startShowingAtRange(e,t,i){this._startShowingAt(new Vh(0,e),t,i)}_startShowingAt(e,t,i){if(!(this._computer.anchor&&this._computer.anchor.equals(e))){if(this._hoverOperation.cancel(),this._widget.position)if(!this._computer.anchor||!e.canAdoptVisibleHover(this._computer.anchor,this._widget.position))this.hide();else{const s=this._messages.filter(o=>o.isValidForHoverAnchor(e));if(s.length===0)this.hide();else{if(s.length===this._messages.length&&this._messagesAreComplete)return;this._renderMessages(e,s)}}this._computer.anchor=e,this._computer.shouldFocus=i,this._hoverOperation.start(t)}}hide(){this._computer.anchor=null,this._hoverOperation.cancel(),this._widget.hide()}isColorPickerVisible(){return this._widget.isColorPickerVisible}containsNode(e){return this._widget.getDomNode().contains(e)}_addLoadingMessage(e){if(this._computer.anchor){for(const t of this._participants)if(t.createLoadingMessage){const i=t.createLoadingMessage(this._computer.anchor);if(i)return e.slice(0).concat([i])}}return e}_withResult(e,t,i){this._messages=i?this._addLoadingMessage(e):e,this._messagesAreComplete=t,this._computer.anchor&&this._messages.length>0?this._renderMessages(this._computer.anchor,this._messages):t&&this.hide()}_renderMessages(e,t){const{showAtPosition:i,showAtRange:s,highlightRange:o}=I_.computeHoverRanges(e.range,t),c=new at.Cm,m=c.add(new Yh(this._keybindingService)),A=document.createDocumentFragment();let U=null;const W={fragment:A,statusBar:m,setColorPicker:re=>U=re,onContentsChanged:()=>this._widget.onContentsChanged(),hide:()=>this.hide()};for(const re of this._participants){const Se=t.filter(Be=>Be.owner===re);Se.length>0&&c.add(re.renderHoverParts(W,Se))}if(m.hasContent&&A.appendChild(m.hoverElement),A.hasChildNodes()){if(o){const re=this._editor.createDecorationsCollection();try{this._isChangingDecorations=!0,re.set([{range:o,options:I_._DECORATION_OPTIONS}])}finally{this._isChangingDecorations=!1}c.add((0,at.s)(()=>{try{this._isChangingDecorations=!0,re.clear()}finally{this._isChangingDecorations=!1}}))}this._widget.showAt(A,new Lm(U,i,s,this._editor.getOption(55).above,this._computer.shouldFocus,c))}else c.dispose()}static computeHoverRanges(e,t){const i=e.startLineNumber;let s=e.startColumn,o=e.endColumn,c=t[0].range,m=null;for(const A of t)c=St.Q.plusRange(c,A.range),A.range.startLineNumber===i&&A.range.endLineNumber===i&&(s=Math.min(s,A.range.startColumn),o=Math.max(o,A.range.endColumn)),A.forceShowAtRange&&(m=A.range);return{showAtPosition:m?m.getStartPosition():new bi.y(e.startLineNumber,s),showAtRange:m||new St.Q(i,s,i,o),highlightRange:c}}};Fc._DECORATION_OPTIONS=sn.kI.register({description:"content-hover-highlight",className:"hoverHighlight"}),Fc=Zh([Pc(1,P._Y),Pc(2,ye.b)],Fc);class Lm{constructor(e,t,i,s,o,c){this.colorPicker=e,this.showAtPosition=t,this.showAtRange=i,this.preferAbove=s,this.stoleFocus=o,this.disposables=c}}let qa=class fC extends at.jG{constructor(e,t){super(),this._editor=e,this._contextKeyService=t,this.allowEditorOverflow=!0,this._hoverVisibleKey=ze.R.hoverVisible.bindTo(this._contextKeyService),this._hover=this._register(new ea),this._visibleData=null,this._register(this._editor.onDidLayoutChange(()=>this._layout())),this._register(this._editor.onDidChangeConfiguration(i=>{i.hasChanged(46)&&this._updateFont()})),this._setVisibleData(null),this._layout(),this._editor.addContentWidget(this)}get position(){var e,t;return(t=(e=this._visibleData)===null||e===void 0?void 0:e.showAtPosition)!==null&&t!==void 0?t:null}get isColorPickerVisible(){var e;return!!(!((e=this._visibleData)===null||e===void 0)&&e.colorPicker)}dispose(){this._editor.removeContentWidget(this),this._visibleData&&this._visibleData.disposables.dispose(),super.dispose()}getId(){return fC.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){if(!this._visibleData)return null;let e=this._visibleData.preferAbove;return!e&&this._contextKeyService.getContextKeyValue(Tn.Visible.key)&&(e=!0),{position:this._visibleData.showAtPosition,range:this._visibleData.showAtRange,preference:e?[1,2]:[2,1]}}_setVisibleData(e){this._visibleData&&this._visibleData.disposables.dispose(),this._visibleData=e,this._hoverVisibleKey.set(!!this._visibleData),this._hover.containerDomNode.classList.toggle("hidden",!this._visibleData)}_layout(){const e=Math.max(this._editor.getLayoutInfo().height/4,250),{fontSize:t,lineHeight:i}=this._editor.getOption(46);this._hover.contentsDomNode.style.fontSize=`${t}px`,this._hover.contentsDomNode.style.lineHeight=`${i/t}`,this._hover.contentsDomNode.style.maxHeight=`${e}px`,this._hover.contentsDomNode.style.maxWidth=`${Math.max(this._editor.getLayoutInfo().width*.66,500)}px`}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(t=>this._editor.applyFontInfo(t))}showAt(e,t){this._setVisibleData(t),this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(e),this._hover.contentsDomNode.style.paddingBottom="",this._updateFont(),this.onContentsChanged(),this._editor.render(),this.onContentsChanged(),t.stoleFocus&&this._hover.containerDomNode.focus(),t.colorPicker&&t.colorPicker.layout()}hide(){if(this._visibleData){const e=this._visibleData.stoleFocus;this._setVisibleData(null),this._editor.layoutContentWidget(this),e&&this._editor.focus()}}onContentsChanged(){this._editor.layoutContentWidget(this),this._hover.onContentsChanged();const e=this._hover.scrollbar.getScrollDimensions();if(e.scrollWidth>e.width){const i=`${this._hover.scrollbar.options.horizontalScrollbarSize}px`;this._hover.contentsDomNode.style.paddingBottom!==i&&(this._hover.contentsDomNode.style.paddingBottom=i,this._editor.layoutContentWidget(this),this._hover.onContentsChanged())}}clear(){this._hover.contentsDomNode.textContent=""}};qa.ID="editor.contrib.contentHoverWidget",qa=Zh([Pc(1,ct.fN)],qa);let Yh=class extends at.jG{constructor(e){super(),this._keybindingService=e,this._hasContent=!1,this.hoverElement=Dg("div.hover-row.status-bar"),this.actionsElement=M.BC(this.hoverElement,Dg("div.actions"))}get hasContent(){return this._hasContent}addAction(e){const t=this._keybindingService.lookupKeybinding(e.commandId),i=t?t.getLabel():null;return this._hasContent=!0,this._register(Ic.render(this.actionsElement,e,i))}append(e){const t=M.BC(this.actionsElement,e);return this._hasContent=!0,t}};Yh=Zh([Pc(0,ye.b)],Yh);class Bc{constructor(e,t){this._editor=e,this._participants=t,this._anchor=null,this._shouldFocus=!1}get anchor(){return this._anchor}set anchor(e){this._anchor=e}get shouldFocus(){return this._shouldFocus}set shouldFocus(e){this._shouldFocus=e}static _getLineDecorations(e,t){if(t.type!==1)return[];const i=e.getModel(),s=t.range.startLineNumber;if(s>i.getLineCount())return[];const o=i.getLineMaxColumn(s);return e.getLineDecorations(s).filter(c=>{if(c.options.isWholeLine)return!0;const m=c.range.startLineNumber===s?c.range.startColumn:1,A=c.range.endLineNumber===s?c.range.endColumn:o;if(c.options.showIfCollapsed){if(m>t.range.startColumn+1||t.range.endColumn-1>A)return!1}else if(m>t.range.startColumn||t.range.endColumn>A)return!1;return!0})}computeAsync(e){const t=this._anchor;if(!this._editor.hasModel()||!t)return Ot.AE.EMPTY;const i=Bc._getLineDecorations(this._editor,t);return Ot.AE.merge(this._participants.map(s=>s.computeAsync?s.computeAsync(t,i,e):Ot.AE.EMPTY))}computeSync(){if(!this._editor.hasModel()||!this._anchor)return[];const e=Bc._getLineDecorations(this._editor,this._anchor);let t=[];for(const i of this._participants)t=t.concat(i.computeSync(this._anchor,e));return(0,cn.Yc)(t)}}var Xh=f(92542),Md=f(34061),kg=f(88213),Dm=f(9715),Eg=f(24594);let xg={};(function(){function u(e,t){t(xg)}u.amd=!0,function(e,t){typeof exports=="object"?t(exports):typeof u=="function"&&u.amd?u(["exports"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e.marked={}))}(this,function(e){"use strict";function t(si,$t){for(var Yt=0;Yt<$t.length;Yt++){var st=$t[Yt];st.enumerable=st.enumerable||!1,st.configurable=!0,"value"in st&&(st.writable=!0),Object.defineProperty(si,st.key,st)}}function i(si,$t,Yt){return $t&&t(si.prototype,$t),Yt&&t(si,Yt),Object.defineProperty(si,"prototype",{writable:!1}),si}function s(si,$t){if(si){if(typeof si=="string")return o(si,$t);var Yt=Object.prototype.toString.call(si).slice(8,-1);if(Yt==="Object"&&si.constructor&&(Yt=si.constructor.name),Yt==="Map"||Yt==="Set")return Array.from(si);if(Yt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Yt))return o(si,$t)}}function o(si,$t){($t==null||$t>si.length)&&($t=si.length);for(var Yt=0,st=new Array($t);Yt<$t;Yt++)st[Yt]=si[Yt];return st}function c(si,$t){var Yt=typeof Symbol<"u"&&si[Symbol.iterator]||si["@@iterator"];if(Yt)return(Yt=Yt.call(si)).next.bind(Yt);if(Array.isArray(si)||(Yt=s(si))||$t&&si&&typeof si.length=="number"){Yt&&(si=Yt);var st=0;return function(){return st>=si.length?{done:!0}:{done:!1,value:si[st++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function m(){return{baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}e.defaults=m();function A(si){e.defaults=si}var U=/[&<>"']/,W=/[&<>"']/g,re=/[<>"']|&(?!#?\w+;)/,Se=/[<>"']|&(?!#?\w+;)/g,Be={"&":"&","<":"<",">":">",'"':""","'":"'"},Qe=function($t){return Be[$t]};function tt(si,$t){if($t){if(U.test(si))return si.replace(W,Qe)}else if(re.test(si))return si.replace(Se,Qe);return si}var vt=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function Ht(si){return si.replace(vt,function($t,Yt){return Yt=Yt.toLowerCase(),Yt==="colon"?":":Yt.charAt(0)==="#"?Yt.charAt(1)==="x"?String.fromCharCode(parseInt(Yt.substring(2),16)):String.fromCharCode(+Yt.substring(1)):""})}var ci=/(^|[^\[])\^/g;function gi(si,$t){si=typeof si=="string"?si:si.source,$t=$t||"";var Yt={replace:function(ht,Mt){return Mt=Mt.source||Mt,Mt=Mt.replace(ci,"$1"),si=si.replace(ht,Mt),Yt},getRegex:function(){return new RegExp(si,$t)}};return Yt}var Ui=/[^\w:]/g,dn=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function hs(si,$t,Yt){if(si){var st;try{st=decodeURIComponent(Ht(Yt)).replace(Ui,"").toLowerCase()}catch{return null}if(st.indexOf("javascript:")===0||st.indexOf("vbscript:")===0||st.indexOf("data:")===0)return null}$t&&!dn.test(Yt)&&(Yt=Ea($t,Yt));try{Yt=encodeURI(Yt).replace(/%25/g,"%")}catch{return null}return Yt}var An={},vo=/^[^:]+:\/*[^/]*$/,Po=/^([^:]+:)[\s\S]*$/,Uo=/^([^:]+:\/*[^/]*)[\s\S]*$/;function Ea(si,$t){An[" "+si]||(vo.test(si)?An[" "+si]=si+"/":An[" "+si]=oc(si,"/",!0)),si=An[" "+si];var Yt=si.indexOf(":")===-1;return $t.substring(0,2)==="//"?Yt?$t:si.replace(Po,"$1")+$t:$t.charAt(0)==="/"?Yt?$t:si.replace(Uo,"$1")+$t:si+$t}var sc={exec:function(){}};function mr(si){for(var $t=1,Yt,st;$t<arguments.length;$t++){Yt=arguments[$t];for(st in Yt)Object.prototype.hasOwnProperty.call(Yt,st)&&(si[st]=Yt[st])}return si}function Yu(si,$t){var Yt=si.replace(/\|/g,function(Mt,kt,hi){for(var yi=!1,_n=kt;--_n>=0&&hi[_n]==="\\";)yi=!yi;return yi?"|":" |"}),st=Yt.split(/ \|/),ht=0;if(st[0].trim()||st.shift(),st.length>0&&!st[st.length-1].trim()&&st.pop(),st.length>$t)st.splice($t);else for(;st.length<$t;)st.push("");for(;ht<st.length;ht++)st[ht]=st[ht].trim().replace(/\\\|/g,"|");return st}function oc(si,$t,Yt){var st=si.length;if(st===0)return"";for(var ht=0;ht<st;){var Mt=si.charAt(st-ht-1);if(Mt===$t&&!Yt)ht++;else if(Mt!==$t&&Yt)ht++;else break}return si.slice(0,st-ht)}function tm(si,$t){if(si.indexOf($t[1])===-1)return-1;for(var Yt=si.length,st=0,ht=0;ht<Yt;ht++)if(si[ht]==="\\")ht++;else if(si[ht]===$t[0])st++;else if(si[ht]===$t[1]&&(st--,st<0))return ht;return-1}function Xu(si){si&&si.sanitize&&!si.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function Ju(si,$t){if($t<1)return"";for(var Yt="";$t>1;)$t&1&&(Yt+=si),$t>>=1,si+=si;return Yt+si}function Jv(si,$t,Yt,st){var ht=$t.href,Mt=$t.title?tt($t.title):null,kt=si[1].replace(/\\([\[\]])/g,"$1");if(si[0].charAt(0)!=="!"){st.state.inLink=!0;var hi={type:"link",raw:Yt,href:ht,title:Mt,text:kt,tokens:st.inlineTokens(kt,[])};return st.state.inLink=!1,hi}return{type:"image",raw:Yt,href:ht,title:Mt,text:tt(kt)}}function ek(si,$t){var Yt=si.match(/^(\s+)(?:```)/);if(Yt===null)return $t;var st=Yt[1];return $t.split(` `).map(function(ht){var Mt=ht.match(/^\s+/);if(Mt===null)return ht;var kt=Mt[0];return kt.length>=st.length?ht.slice(st.length):ht}).join(` `)}var im=function(){function si(Yt){this.options=Yt||e.defaults}var $t=si.prototype;return $t.space=function(st){var ht=this.rules.block.newline.exec(st);if(ht&&ht[0].length>0)return{type:"space",raw:ht[0]}},$t.code=function(st){var ht=this.rules.block.code.exec(st);if(ht){var Mt=ht[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:ht[0],codeBlockStyle:"indented",text:this.options.pedantic?Mt:oc(Mt,` `)}}},$t.fences=function(st){var ht=this.rules.block.fences.exec(st);if(ht){var Mt=ht[0],kt=ek(Mt,ht[3]||"");return{type:"code",raw:Mt,lang:ht[2]?ht[2].trim():ht[2],text:kt}}},$t.heading=function(st){var ht=this.rules.block.heading.exec(st);if(ht){var Mt=ht[2].trim();if(/#$/.test(Mt)){var kt=oc(Mt,"#");(this.options.pedantic||!kt||/ $/.test(kt))&&(Mt=kt.trim())}var hi={type:"heading",raw:ht[0],depth:ht[1].length,text:Mt,tokens:[]};return this.lexer.inline(hi.text,hi.tokens),hi}},$t.hr=function(st){var ht=this.rules.block.hr.exec(st);if(ht)return{type:"hr",raw:ht[0]}},$t.blockquote=function(st){var ht=this.rules.block.blockquote.exec(st);if(ht){var Mt=ht[0].replace(/^ *>[ \t]?/gm,"");return{type:"blockquote",raw:ht[0],tokens:this.lexer.blockTokens(Mt,[]),text:Mt}}},$t.list=function(st){var ht=this.rules.block.list.exec(st);if(ht){var Mt,kt,hi,yi,_n,ln,Zn,zn,Ds,_s,Cn,Co,Ks=ht[1].trim(),xa=Ks.length>1,Xs={type:"list",raw:"",ordered:xa,start:xa?+Ks.slice(0,-1):"",loose:!1,items:[]};Ks=xa?"\\d{1,9}\\"+Ks.slice(-1):"\\"+Ks,this.options.pedantic&&(Ks=xa?Ks:"[*+-]");for(var Wo=new RegExp("^( {0,3}"+Ks+")((?:[ ][^\\n]*)?(?:\\n|$))");st&&(Co=!1,!(!(ht=Wo.exec(st))||this.rules.block.hr.test(st)));){if(Mt=ht[0],st=st.substring(Mt.length),zn=ht[2].split(` `,1)[0],Ds=st.split(` `,1)[0],this.options.pedantic?(yi=2,Cn=zn.trimLeft()):(yi=ht[2].search(/[^ ]/),yi=yi>4?1:yi,Cn=zn.slice(yi),yi+=ht[1].length),ln=!1,!zn&&/^ *$/.test(Ds)&&(Mt+=Ds+` `,st=st.substring(Ds.length+1),Co=!0),!Co)for(var qu=new RegExp("^ {0,"+Math.min(3,yi-1)+"}(?:[*+-]|\\d{1,9}[.)])((?: [^\\n]*)?(?:\\n|$))"),sm=new RegExp("^ {0,"+Math.min(3,yi-1)+"}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)");st&&(_s=st.split(` `,1)[0],zn=_s,this.options.pedantic&&(zn=zn.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!(qu.test(zn)||sm.test(st)));){if(zn.search(/[^ ]/)>=yi||!zn.trim())Cn+=` `+zn.slice(yi);else if(!ln)Cn+=` `+zn;else break;!ln&&!zn.trim()&&(ln=!0),Mt+=_s+` `,st=st.substring(_s.length+1)}Xs.loose||(Zn?Xs.loose=!0:/\n *\n *$/.test(Mt)&&(Zn=!0)),this.options.gfm&&(kt=/^\[[ xX]\] /.exec(Cn),kt&&(hi=kt[0]!=="[ ] ",Cn=Cn.replace(/^\[[ xX]\] +/,""))),Xs.items.push({type:"list_item",raw:Mt,task:!!kt,checked:hi,loose:!1,text:Cn}),Xs.raw+=Mt}Xs.items[Xs.items.length-1].raw=Mt.trimRight(),Xs.items[Xs.items.length-1].text=Cn.trimRight(),Xs.raw=Xs.raw.trimRight();var lc=Xs.items.length;for(_n=0;_n<lc;_n++){this.lexer.state.top=!1,Xs.items[_n].tokens=this.lexer.blockTokens(Xs.items[_n].text,[]);var Dh=Xs.items[_n].tokens.filter(function(kh){return kh.type==="space"}),om=Dh.every(function(kh){for(var ck=kh.raw.split(""),eC=0,hk=c(ck),tC;!(tC=hk()).done;){var uk=tC.value;if(uk===` `&&(eC+=1),eC>1)return!0}return!1});!Xs.loose&&Dh.length&&om&&(Xs.loose=!0,Xs.items[_n].loose=!0)}return Xs}},$t.html=function(st){var ht=this.rules.block.html.exec(st);if(ht){var Mt={type:"html",raw:ht[0],pre:!this.options.sanitizer&&(ht[1]==="pre"||ht[1]==="script"||ht[1]==="style"),text:ht[0]};return this.options.sanitize&&(Mt.type="paragraph",Mt.text=this.options.sanitizer?this.options.sanitizer(ht[0]):tt(ht[0]),Mt.tokens=[],this.lexer.inline(Mt.text,Mt.tokens)),Mt}},$t.def=function(st){var ht=this.rules.block.def.exec(st);if(ht){ht[3]&&(ht[3]=ht[3].substring(1,ht[3].length-1));var Mt=ht[1].toLowerCase().replace(/\s+/g," ");return{type:"def",tag:Mt,raw:ht[0],href:ht[2],title:ht[3]}}},$t.table=function(st){var ht=this.rules.block.table.exec(st);if(ht){var Mt={type:"table",header:Yu(ht[1]).map(function(Zn){return{text:Zn}}),align:ht[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:ht[3]&&ht[3].trim()?ht[3].replace(/\n[ \t]*$/,"").split(` `):[]};if(Mt.header.length===Mt.align.length){Mt.raw=ht[0];var kt=Mt.align.length,hi,yi,_n,ln;for(hi=0;hi<kt;hi++)/^ *-+: *$/.test(Mt.align[hi])?Mt.align[hi]="right":/^ *:-+: *$/.test(Mt.align[hi])?Mt.align[hi]="center":/^ *:-+ *$/.test(Mt.align[hi])?Mt.align[hi]="left":Mt.align[hi]=null;for(kt=Mt.rows.length,hi=0;hi<kt;hi++)Mt.rows[hi]=Yu(Mt.rows[hi],Mt.header.length).map(function(Zn){return{text:Zn}});for(kt=Mt.header.length,yi=0;yi<kt;yi++)Mt.header[yi].tokens=[],this.lexer.inline(Mt.header[yi].text,Mt.header[yi].tokens);for(kt=Mt.rows.length,yi=0;yi<kt;yi++)for(ln=Mt.rows[yi],_n=0;_n<ln.length;_n++)ln[_n].tokens=[],this.lexer.inline(ln[_n].text,ln[_n].tokens);return Mt}}},$t.lheading=function(st){var ht=this.rules.block.lheading.exec(st);if(ht){var Mt={type:"heading",raw:ht[0],depth:ht[2].charAt(0)==="="?1:2,text:ht[1],tokens:[]};return this.lexer.inline(Mt.text,Mt.tokens),Mt}},$t.paragraph=function(st){var ht=this.rules.block.paragraph.exec(st);if(ht){var Mt={type:"paragraph",raw:ht[0],text:ht[1].charAt(ht[1].length-1)===` `?ht[1].slice(0,-1):ht[1],tokens:[]};return this.lexer.inline(Mt.text,Mt.tokens),Mt}},$t.text=function(st){var ht=this.rules.block.text.exec(st);if(ht){var Mt={type:"text",raw:ht[0],text:ht[0],tokens:[]};return this.lexer.inline(Mt.text,Mt.tokens),Mt}},$t.escape=function(st){var ht=this.rules.inline.escape.exec(st);if(ht)return{type:"escape",raw:ht[0],text:tt(ht[1])}},$t.tag=function(st){var ht=this.rules.inline.tag.exec(st);if(ht)return!this.lexer.state.inLink&&/^<a /i.test(ht[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(ht[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(ht[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(ht[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:ht[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ht[0]):tt(ht[0]):ht[0]}},$t.link=function(st){var ht=this.rules.inline.link.exec(st);if(ht){var Mt=ht[2].trim();if(!this.options.pedantic&&/^</.test(Mt)){if(!/>$/.test(Mt))return;var kt=oc(Mt.slice(0,-1),"\\");if((Mt.length-kt.length)%2===0)return}else{var hi=tm(ht[2],"()");if(hi>-1){var yi=ht[0].indexOf("!")===0?5:4,_n=yi+ht[1].length+hi;ht[2]=ht[2].substring(0,hi),ht[0]=ht[0].substring(0,_n).trim(),ht[3]=""}}var ln=ht[2],Zn="";if(this.options.pedantic){var zn=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(ln);zn&&(ln=zn[1],Zn=zn[3])}else Zn=ht[3]?ht[3].slice(1,-1):"";return ln=ln.trim(),/^</.test(ln)&&(this.options.pedantic&&!/>$/.test(Mt)?ln=ln.slice(1):ln=ln.slice(1,-1)),Jv(ht,{href:ln&&ln.replace(this.rules.inline._escapes,"$1"),title:Zn&&Zn.replace(this.rules.inline._escapes,"$1")},ht[0],this.lexer)}},$t.reflink=function(st,ht){var Mt;if((Mt=this.rules.inline.reflink.exec(st))||(Mt=this.rules.inline.nolink.exec(st))){var kt=(Mt[2]||Mt[1]).replace(/\s+/g," ");if(kt=ht[kt.toLowerCase()],!kt||!kt.href){var hi=Mt[0].charAt(0);return{type:"text",raw:hi,text:hi}}return Jv(Mt,kt,Mt[0],this.lexer)}},$t.emStrong=function(st,ht,Mt){Mt===void 0&&(Mt="");var kt=this.rules.inline.emStrong.lDelim.exec(st);if(kt&&!(kt[3]&&Mt.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDF70-\uDF81\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/))){var hi=kt[1]||kt[2]||"";if(!hi||hi&&(Mt===""||this.rules.inline.punctuation.exec(Mt))){var yi=kt[0].length-1,_n,ln,Zn=yi,zn=0,Ds=kt[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(Ds.lastIndex=0,ht=ht.slice(-1*st.length+yi);(kt=Ds.exec(ht))!=null;)if(_n=kt[1]||kt[2]||kt[3]||kt[4]||kt[5]||kt[6],!!_n){if(ln=_n.length,kt[3]||kt[4]){Zn+=ln;continue}else if((kt[5]||kt[6])&&yi%3&&!((yi+ln)%3)){zn+=ln;continue}if(Zn-=ln,!(Zn>0)){if(ln=Math.min(ln,ln+Zn+zn),Math.min(yi,ln)%2){var _s=st.slice(1,yi+kt.index+ln);return{type:"em",raw:st.slice(0,yi+kt.index+ln+1),text:_s,tokens:this.lexer.inlineTokens(_s,[])}}var Cn=st.slice(2,yi+kt.index+ln-1);return{type:"strong",raw:st.slice(0,yi+kt.index+ln+1),text:Cn,tokens:this.lexer.inlineTokens(Cn,[])}}}}}},$t.codespan=function(st){var ht=this.rules.inline.code.exec(st);if(ht){var Mt=ht[2].replace(/\n/g," "),kt=/[^ ]/.test(Mt),hi=/^ /.test(Mt)&&/ $/.test(Mt);return kt&&hi&&(Mt=Mt.substring(1,Mt.length-1)),Mt=tt(Mt,!0),{type:"codespan",raw:ht[0],text:Mt}}},$t.br=function(st){var ht=this.rules.inline.br.exec(st);if(ht)return{type:"br",raw:ht[0]}},$t.del=function(st){var ht=this.rules.inline.del.exec(st);if(ht)return{type:"del",raw:ht[0],text:ht[2],tokens:this.lexer.inlineTokens(ht[2],[])}},$t.autolink=function(st,ht){var Mt=this.rules.inline.autolink.exec(st);if(Mt){var kt,hi;return Mt[2]==="@"?(kt=tt(this.options.mangle?ht(Mt[1]):Mt[1]),hi="mailto:"+kt):(kt=tt(Mt[1]),hi=kt),{type:"link",raw:Mt[0],text:kt,href:hi,tokens:[{type:"text",raw:kt,text:kt}]}}},$t.url=function(st,ht){var Mt;if(Mt=this.rules.inline.url.exec(st)){var kt,hi;if(Mt[2]==="@")kt=tt(this.options.mangle?ht(Mt[0]):Mt[0]),hi="mailto:"+kt;else{var yi;do yi=Mt[0],Mt[0]=this.rules.inline._backpedal.exec(Mt[0])[0];while(yi!==Mt[0]);kt=tt(Mt[0]),Mt[1]==="www."?hi="http://"+kt:hi=kt}return{type:"link",raw:Mt[0],text:kt,href:hi,tokens:[{type:"text",raw:kt,text:kt}]}}},$t.inlineText=function(st,ht){var Mt=this.rules.inline.text.exec(st);if(Mt){var kt;return this.lexer.state.inRawBlock?kt=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Mt[0]):tt(Mt[0]):Mt[0]:kt=tt(this.options.smartypants?ht(Mt[0]):Mt[0]),{type:"text",raw:Mt[0],text:kt}}},si}(),Fn={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {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|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?<?([^\s>]+)>?(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:sc,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};Fn._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Fn._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,Fn.def=gi(Fn.def).replace("label",Fn._label).replace("title",Fn._title).getRegex(),Fn.bullet=/(?:[*+-]|\d{1,9}[.)])/,Fn.listItemStart=gi(/^( *)(bull) */).replace("bull",Fn.bullet).getRegex(),Fn.list=gi(Fn.list).replace(/bull/g,Fn.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Fn.def.source+")").getRegex(),Fn._tag="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|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Fn._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,Fn.html=gi(Fn.html,"i").replace("comment",Fn._comment).replace("tag",Fn._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Fn.paragraph=gi(Fn._paragraph).replace("hr",Fn.hr).replace("heading"," {0,3}#{1,6} ").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",Fn._tag).getRegex(),Fn.blockquote=gi(Fn.blockquote).replace("paragraph",Fn.paragraph).getRegex(),Fn.normal=mr({},Fn),Fn.gfm=mr({},Fn.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),Fn.gfm.table=gi(Fn.gfm.table).replace("hr",Fn.hr).replace("heading"," {0,3}#{1,6} ").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",Fn._tag).getRegex(),Fn.gfm.paragraph=gi(Fn._paragraph).replace("hr",Fn.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",Fn.gfm.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",Fn._tag).getRegex(),Fn.pedantic=mr({},Fn.normal,{html:gi(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Fn._comment).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:sc,paragraph:gi(Fn.normal._paragraph).replace("hr",Fn.hr).replace("heading",` *#{1,6} *[^ ]`).replace("lheading",Fn.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var pn={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:sc,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^[^_*]*?\_\_[^_*]*?\*[^_*]*?(?=\_\_)|[^*]+(?=[^*])|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?\_[^_*]*?(?=\*\*)|[^_]+(?=[^_])|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:sc,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};pn._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",pn.punctuation=gi(pn.punctuation).replace(/punctuation/g,pn._punctuation).getRegex(),pn.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,pn.escapedEmSt=/\\\*|\\_/g,pn._comment=gi(Fn._comment).replace("(?:-->|$)","-->").getRegex(),pn.emStrong.lDelim=gi(pn.emStrong.lDelim).replace(/punct/g,pn._punctuation).getRegex(),pn.emStrong.rDelimAst=gi(pn.emStrong.rDelimAst,"g").replace(/punct/g,pn._punctuation).getRegex(),pn.emStrong.rDelimUnd=gi(pn.emStrong.rDelimUnd,"g").replace(/punct/g,pn._punctuation).getRegex(),pn._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,pn._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,pn._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])?)+(?![-_])/,pn.autolink=gi(pn.autolink).replace("scheme",pn._scheme).replace("email",pn._email).getRegex(),pn._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,pn.tag=gi(pn.tag).replace("comment",pn._comment).replace("attribute",pn._attribute).getRegex(),pn._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,pn._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,pn._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,pn.link=gi(pn.link).replace("label",pn._label).replace("href",pn._href).replace("title",pn._title).getRegex(),pn.reflink=gi(pn.reflink).replace("label",pn._label).replace("ref",Fn._label).getRegex(),pn.nolink=gi(pn.nolink).replace("ref",Fn._label).getRegex(),pn.reflinkSearch=gi(pn.reflinkSearch,"g").replace("reflink",pn.reflink).replace("nolink",pn.nolink).getRegex(),pn.normal=mr({},pn),pn.pedantic=mr({},pn.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:gi(/^!?\[(label)\]\((.*?)\)/).replace("label",pn._label).getRegex(),reflink:gi(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",pn._label).getRegex()}),pn.gfm=mr({},pn.normal,{escape:gi(pn.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_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.!#$%&'*+\/=?_`{\|}~-]+@)))/}),pn.gfm.url=gi(pn.gfm.url,"i").replace("email",pn.gfm._extended_email).getRegex(),pn.breaks=mr({},pn.gfm,{br:gi(pn.br).replace("{2,}","*").getRegex(),text:gi(pn.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});function tk(si){return si.replace(/---/g,"\u2014").replace(/--/g,"\u2013").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201C").replace(/"/g,"\u201D").replace(/\.{3}/g,"\u2026")}function qv(si){var $t="",Yt,st,ht=si.length;for(Yt=0;Yt<ht;Yt++)st=si.charCodeAt(Yt),Math.random()>.5&&(st="x"+st.toString(16)),$t+="&#"+st+";";return $t}var rc=function(){function si(Yt){this.tokens=[],this.tokens.links=Object.create(null),this.options=Yt||e.defaults,this.options.tokenizer=this.options.tokenizer||new im,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};var st={block:Fn.normal,inline:pn.normal};this.options.pedantic?(st.block=Fn.pedantic,st.inline=pn.pedantic):this.options.gfm&&(st.block=Fn.gfm,this.options.breaks?st.inline=pn.breaks:st.inline=pn.gfm),this.tokenizer.rules=st}si.lex=function(st,ht){var Mt=new si(ht);return Mt.lex(st)},si.lexInline=function(st,ht){var Mt=new si(ht);return Mt.inlineTokens(st)};var $t=si.prototype;return $t.lex=function(st){st=st.replace(/\r\n|\r/g,` `),this.blockTokens(st,this.tokens);for(var ht;ht=this.inlineQueue.shift();)this.inlineTokens(ht.src,ht.tokens);return this.tokens},$t.blockTokens=function(st,ht){var Mt=this;ht===void 0&&(ht=[]),this.options.pedantic?st=st.replace(/\t/g," ").replace(/^ +$/gm,""):st=st.replace(/^( *)(\t+)/gm,function(Zn,zn,Ds){return zn+" ".repeat(Ds.length)});for(var kt,hi,yi,_n;st;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(function(Zn){return(kt=Zn.call({lexer:Mt},st,ht))?(st=st.substring(kt.raw.length),ht.push(kt),!0):!1}))){if(kt=this.tokenizer.space(st)){st=st.substring(kt.raw.length),kt.raw.length===1&&ht.length>0?ht[ht.length-1].raw+=` `:ht.push(kt);continue}if(kt=this.tokenizer.code(st)){st=st.substring(kt.raw.length),hi=ht[ht.length-1],hi&&(hi.type==="paragraph"||hi.type==="text")?(hi.raw+=` `+kt.raw,hi.text+=` `+kt.text,this.inlineQueue[this.inlineQueue.length-1].src=hi.text):ht.push(kt);continue}if(kt=this.tokenizer.fences(st)){st=st.substring(kt.raw.length),ht.push(kt);continue}if(kt=this.tokenizer.heading(st)){st=st.substring(kt.raw.length),ht.push(kt);continue}if(kt=this.tokenizer.hr(st)){st=st.substring(kt.raw.length),ht.push(kt);continue}if(kt=this.tokenizer.blockquote(st)){st=st.substring(kt.raw.length),ht.push(kt);continue}if(kt=this.tokenizer.list(st)){st=st.substring(kt.raw.length),ht.push(kt);continue}if(kt=this.tokenizer.html(st)){st=st.substring(kt.raw.length),ht.push(kt);continue}if(kt=this.tokenizer.def(st)){st=st.substring(kt.raw.length),hi=ht[ht.length-1],hi&&(hi.type==="paragraph"||hi.type==="text")?(hi.raw+=` `+kt.raw,hi.text+=` `+kt.raw,this.inlineQueue[this.inlineQueue.length-1].src=hi.text):this.tokens.links[kt.tag]||(this.tokens.links[kt.tag]={href:kt.href,title:kt.title});continue}if(kt=this.tokenizer.table(st)){st=st.substring(kt.raw.length),ht.push(kt);continue}if(kt=this.tokenizer.lheading(st)){st=st.substring(kt.raw.length),ht.push(kt);continue}if(yi=st,this.options.extensions&&this.options.extensions.startBlock&&function(){var Zn=1/0,zn=st.slice(1),Ds=void 0;Mt.options.extensions.startBlock.forEach(function(_s){Ds=_s.call({lexer:this},zn),typeof Ds=="number"&&Ds>=0&&(Zn=Math.min(Zn,Ds))}),Zn<1/0&&Zn>=0&&(yi=st.substring(0,Zn+1))}(),this.state.top&&(kt=this.tokenizer.paragraph(yi))){hi=ht[ht.length-1],_n&&hi.type==="paragraph"?(hi.raw+=` `+kt.raw,hi.text+=` `+kt.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=hi.text):ht.push(kt),_n=yi.length!==st.length,st=st.substring(kt.raw.length);continue}if(kt=this.tokenizer.text(st)){st=st.substring(kt.raw.length),hi=ht[ht.length-1],hi&&hi.type==="text"?(hi.raw+=` `+kt.raw,hi.text+=` `+kt.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=hi.text):ht.push(kt);continue}if(st){var ln="Infinite loop on byte: "+st.charCodeAt(0);if(this.options.silent){console.error(ln);break}else throw new Error(ln)}}return this.state.top=!0,ht},$t.inline=function(st,ht){this.inlineQueue.push({src:st,tokens:ht})},$t.inlineTokens=function(st,ht){var Mt=this;ht===void 0&&(ht=[]);var kt,hi,yi,_n=st,ln,Zn,zn;if(this.tokens.links){var Ds=Object.keys(this.tokens.links);if(Ds.length>0)for(;(ln=this.tokenizer.rules.inline.reflinkSearch.exec(_n))!=null;)Ds.includes(ln[0].slice(ln[0].lastIndexOf("[")+1,-1))&&(_n=_n.slice(0,ln.index)+"["+Ju("a",ln[0].length-2)+"]"+_n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(ln=this.tokenizer.rules.inline.blockSkip.exec(_n))!=null;)_n=_n.slice(0,ln.index)+"["+Ju("a",ln[0].length-2)+"]"+_n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(ln=this.tokenizer.rules.inline.escapedEmSt.exec(_n))!=null;)_n=_n.slice(0,ln.index)+"++"+_n.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;st;)if(Zn||(zn=""),Zn=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(function(Cn){return(kt=Cn.call({lexer:Mt},st,ht))?(st=st.substring(kt.raw.length),ht.push(kt),!0):!1}))){if(kt=this.tokenizer.escape(st)){st=st.substring(kt.raw.length),ht.push(kt);continue}if(kt=this.tokenizer.tag(st)){st=st.substring(kt.raw.length),hi=ht[ht.length-1],hi&&kt.type==="text"&&hi.type==="text"?(hi.raw+=kt.raw,hi.text+=kt.text):ht.push(kt);continue}if(kt=this.tokenizer.link(st)){st=st.substring(kt.raw.length),ht.push(kt);continue}if(kt=this.tokenizer.reflink(st,this.tokens.links)){st=st.substring(kt.raw.length),hi=ht[ht.length-1],hi&&kt.type==="text"&&hi.type==="text"?(hi.raw+=kt.raw,hi.text+=kt.text):ht.push(kt);continue}if(kt=this.tokenizer.emStrong(st,_n,zn)){st=st.substring(kt.raw.length),ht.push(kt);continue}if(kt=this.tokenizer.codespan(st)){st=st.substring(kt.raw.length),ht.push(kt);continue}if(kt=this.tokenizer.br(st)){st=st.substring(kt.raw.length),ht.push(kt);continue}if(kt=this.tokenizer.del(st)){st=st.substring(kt.raw.length),ht.push(kt);continue}if(kt=this.tokenizer.autolink(st,qv)){st=st.substring(kt.raw.length),ht.push(kt);continue}if(!this.state.inLink&&(kt=this.tokenizer.url(st,qv))){st=st.substring(kt.raw.length),ht.push(kt);continue}if(yi=st,this.options.extensions&&this.options.extensions.startInline&&function(){var Cn=1/0,Co=st.slice(1),Ks=void 0;Mt.options.extensions.startInline.forEach(function(xa){Ks=xa.call({lexer:this},Co),typeof Ks=="number"&&Ks>=0&&(Cn=Math.min(Cn,Ks))}),Cn<1/0&&Cn>=0&&(yi=st.substring(0,Cn+1))}(),kt=this.tokenizer.inlineText(yi,tk)){st=st.substring(kt.raw.length),kt.raw.slice(-1)!=="_"&&(zn=kt.raw.slice(-1)),Zn=!0,hi=ht[ht.length-1],hi&&hi.type==="text"?(hi.raw+=kt.raw,hi.text+=kt.text):ht.push(kt);continue}if(st){var _s="Infinite loop on byte: "+st.charCodeAt(0);if(this.options.silent){console.error(_s);break}else throw new Error(_s)}}return ht},i(si,null,[{key:"rules",get:function(){return{block:Fn,inline:pn}}}]),si}(),nm=function(){function si(Yt){this.options=Yt||e.defaults}var $t=si.prototype;return $t.code=function(st,ht,Mt){var kt=(ht||"").match(/\S*/)[0];if(this.options.highlight){var hi=this.options.highlight(st,kt);hi!=null&&hi!==st&&(Mt=!0,st=hi)}return st=st.replace(/\n$/,"")+` `,kt?'<pre><code class="'+this.options.langPrefix+tt(kt,!0)+'">'+(Mt?st:tt(st,!0))+`</code></pre> `:"<pre><code>"+(Mt?st:tt(st,!0))+`</code></pre> `},$t.blockquote=function(st){return`<blockquote> `+st+`</blockquote> `},$t.html=function(st){return st},$t.heading=function(st,ht,Mt,kt){if(this.options.headerIds){var hi=this.options.headerPrefix+kt.slug(Mt);return"<h"+ht+' id="'+hi+'">'+st+"</h"+ht+`> `}return"<h"+ht+">"+st+"</h"+ht+`> `},$t.hr=function(){return this.options.xhtml?`<hr/> `:`<hr> `},$t.list=function(st,ht,Mt){var kt=ht?"ol":"ul",hi=ht&&Mt!==1?' start="'+Mt+'"':"";return"<"+kt+hi+`> `+st+"</"+kt+`> `},$t.listitem=function(st){return"<li>"+st+`</li> `},$t.checkbox=function(st){return"<input "+(st?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},$t.paragraph=function(st){return"<p>"+st+`</p> `},$t.table=function(st,ht){return ht&&(ht="<tbody>"+ht+"</tbody>"),`<table> <thead> `+st+`</thead> `+ht+`</table> `},$t.tablerow=function(st){return`<tr> `+st+`</tr> `},$t.tablecell=function(st,ht){var Mt=ht.header?"th":"td",kt=ht.align?"<"+Mt+' align="'+ht.align+'">':"<"+Mt+">";return kt+st+("</"+Mt+`> `)},$t.strong=function(st){return"<strong>"+st+"</strong>"},$t.em=function(st){return"<em>"+st+"</em>"},$t.codespan=function(st){return"<code>"+st+"</code>"},$t.br=function(){return this.options.xhtml?"<br/>":"<br>"},$t.del=function(st){return"<del>"+st+"</del>"},$t.link=function(st,ht,Mt){if(st=hs(this.options.sanitize,this.options.baseUrl,st),st===null)return Mt;var kt='<a href="'+tt(st)+'"';return ht&&(kt+=' title="'+ht+'"'),kt+=">"+Mt+"</a>",kt},$t.image=function(st,ht,Mt){if(st=hs(this.options.sanitize,this.options.baseUrl,st),st===null)return Mt;var kt='<img src="'+st+'" alt="'+Mt+'"';return ht&&(kt+=' title="'+ht+'"'),kt+=this.options.xhtml?"/>":">",kt},$t.text=function(st){return st},si}(),b_=function(){function si(){}var $t=si.prototype;return $t.strong=function(st){return st},$t.em=function(st){return st},$t.codespan=function(st){return st},$t.del=function(st){return st},$t.html=function(st){return st},$t.text=function(st){return st},$t.link=function(st,ht,Mt){return""+Mt},$t.image=function(st,ht,Mt){return""+Mt},$t.br=function(){return""},si}(),w_=function(){function si(){this.seen={}}var $t=si.prototype;return $t.serialize=function(st){return st.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},$t.getNextSafeSlug=function(st,ht){var Mt=st,kt=0;if(this.seen.hasOwnProperty(Mt)){kt=this.seen[st];do kt++,Mt=st+"-"+kt;while(this.seen.hasOwnProperty(Mt))}return ht||(this.seen[st]=kt,this.seen[Mt]=0),Mt},$t.slug=function(st,ht){ht===void 0&&(ht={});var Mt=this.serialize(st);return this.getNextSafeSlug(Mt,ht.dryrun)},si}(),ac=function(){function si(Yt){this.options=Yt||e.defaults,this.options.renderer=this.options.renderer||new nm,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new b_,this.slugger=new w_}si.parse=function(st,ht){var Mt=new si(ht);return Mt.parse(st)},si.parseInline=function(st,ht){var Mt=new si(ht);return Mt.parseInline(st)};var $t=si.prototype;return $t.parse=function(st,ht){ht===void 0&&(ht=!0);var Mt="",kt,hi,yi,_n,ln,Zn,zn,Ds,_s,Cn,Co,Ks,xa,Xs,Wo,qu,sm,lc,Dh,om=st.length;for(kt=0;kt<om;kt++){if(Cn=st[kt],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[Cn.type]&&(Dh=this.options.extensions.renderers[Cn.type].call({parser:this},Cn),Dh!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(Cn.type))){Mt+=Dh||"";continue}switch(Cn.type){case"space":continue;case"hr":{Mt+=this.renderer.hr();continue}case"heading":{Mt+=this.renderer.heading(this.parseInline(Cn.tokens),Cn.depth,Ht(this.parseInline(Cn.tokens,this.textRenderer)),this.slugger);continue}case"code":{Mt+=this.renderer.code(Cn.text,Cn.lang,Cn.escaped);continue}case"table":{for(Ds="",zn="",_n=Cn.header.length,hi=0;hi<_n;hi++)zn+=this.renderer.tablecell(this.parseInline(Cn.header[hi].tokens),{header:!0,align:Cn.align[hi]});for(Ds+=this.renderer.tablerow(zn),_s="",_n=Cn.rows.length,hi=0;hi<_n;hi++){for(Zn=Cn.rows[hi],zn="",ln=Zn.length,yi=0;yi<ln;yi++)zn+=this.renderer.tablecell(this.parseInline(Zn[yi].tokens),{header:!1,align:Cn.align[yi]});_s+=this.renderer.tablerow(zn)}Mt+=this.renderer.table(Ds,_s);continue}case"blockquote":{_s=this.parse(Cn.tokens),Mt+=this.renderer.blockquote(_s);continue}case"list":{for(Co=Cn.ordered,Ks=Cn.start,xa=Cn.loose,_n=Cn.items.length,_s="",hi=0;hi<_n;hi++)Wo=Cn.items[hi],qu=Wo.checked,sm=Wo.task,Xs="",Wo.task&&(lc=this.renderer.checkbox(qu),xa?Wo.tokens.length>0&&Wo.tokens[0].type==="paragraph"?(Wo.tokens[0].text=lc+" "+Wo.tokens[0].text,Wo.tokens[0].tokens&&Wo.tokens[0].tokens.length>0&&Wo.tokens[0].tokens[0].type==="text"&&(Wo.tokens[0].tokens[0].text=lc+" "+Wo.tokens[0].tokens[0].text)):Wo.tokens.unshift({type:"text",text:lc}):Xs+=lc),Xs+=this.parse(Wo.tokens,xa),_s+=this.renderer.listitem(Xs,sm,qu);Mt+=this.renderer.list(_s,Co,Ks);continue}case"html":{Mt+=this.renderer.html(Cn.text);continue}case"paragraph":{Mt+=this.renderer.paragraph(this.parseInline(Cn.tokens));continue}case"text":{for(_s=Cn.tokens?this.parseInline(Cn.tokens):Cn.text;kt+1<om&&st[kt+1].type==="text";)Cn=st[++kt],_s+=` `+(Cn.tokens?this.parseInline(Cn.tokens):Cn.text);Mt+=ht?this.renderer.paragraph(_s):_s;continue}default:{var kh='Token with "'+Cn.type+'" type was not found.';if(this.options.silent){console.error(kh);return}else throw new Error(kh)}}}return Mt},$t.parseInline=function(st,ht){ht=ht||this.renderer;var Mt="",kt,hi,yi,_n=st.length;for(kt=0;kt<_n;kt++){if(hi=st[kt],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[hi.type]&&(yi=this.options.extensions.renderers[hi.type].call({parser:this},hi),yi!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(hi.type))){Mt+=yi||"";continue}switch(hi.type){case"escape":{Mt+=ht.text(hi.text);break}case"html":{Mt+=ht.html(hi.text);break}case"link":{Mt+=ht.link(hi.href,hi.title,this.parseInline(hi.tokens,ht));break}case"image":{Mt+=ht.image(hi.href,hi.title,hi.text);break}case"strong":{Mt+=ht.strong(this.parseInline(hi.tokens,ht));break}case"em":{Mt+=ht.em(this.parseInline(hi.tokens,ht));break}case"codespan":{Mt+=ht.codespan(hi.text);break}case"br":{Mt+=ht.br();break}case"del":{Mt+=ht.del(this.parseInline(hi.tokens,ht));break}case"text":{Mt+=ht.text(hi.text);break}default:{var ln='Token with "'+hi.type+'" type was not found.';if(this.options.silent){console.error(ln);return}else throw new Error(ln)}}}return Mt},si}();function $n(si,$t,Yt){if(typeof si>"u"||si===null)throw new Error("marked(): input parameter is undefined or null");if(typeof si!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(si)+", string expected");if(typeof $t=="function"&&(Yt=$t,$t=null),$t=mr({},$n.defaults,$t||{}),Xu($t),Yt){var st=$t.highlight,ht;try{ht=rc.lex(si,$t)}catch(yi){return Yt(yi)}var Mt=function(_n){var ln;if(!_n)try{$t.walkTokens&&$n.walkTokens(ht,$t.walkTokens),ln=ac.parse(ht,$t)}catch(Zn){_n=Zn}return $t.highlight=st,_n?Yt(_n):Yt(null,ln)};if(!st||st.length<3||(delete $t.highlight,!ht.length))return Mt();var kt=0;$n.walkTokens(ht,function(yi){yi.type==="code"&&(kt++,setTimeout(function(){st(yi.text,yi.lang,function(_n,ln){if(_n)return Mt(_n);ln!=null&&ln!==yi.text&&(yi.text=ln,yi.escaped=!0),kt--,kt===0&&Mt()})},0))}),kt===0&&Mt();return}try{var hi=rc.lex(si,$t);return $t.walkTokens&&$n.walkTokens(hi,$t.walkTokens),ac.parse(hi,$t)}catch(yi){if(yi.message+=` Please report this to https://github.com/markedjs/marked.`,$t.silent)return"<p>An error occurred:</p><pre>"+tt(yi.message+"",!0)+"</pre>";throw yi}}$n.options=$n.setOptions=function(si){return mr($n.defaults,si),A($n.defaults),$n},$n.getDefaults=m,$n.defaults=e.defaults,$n.use=function(){for(var si=arguments.length,$t=new Array(si),Yt=0;Yt<si;Yt++)$t[Yt]=arguments[Yt];var st=mr.apply(void 0,[{}].concat($t)),ht=$n.defaults.extensions||{renderers:{},childTokens:{}},Mt;$t.forEach(function(kt){if(kt.extensions&&(Mt=!0,kt.extensions.forEach(function(yi){if(!yi.name)throw new Error("extension name required");if(yi.renderer){var _n=ht.renderers?ht.renderers[yi.name]:null;_n?ht.renderers[yi.name]=function(){for(var ln=arguments.length,Zn=new Array(ln),zn=0;zn<ln;zn++)Zn[zn]=arguments[zn];var Ds=yi.renderer.apply(this,Zn);return Ds===!1&&(Ds=_n.apply(this,Zn)),Ds}:ht.renderers[yi.name]=yi.renderer}if(yi.tokenizer){if(!yi.level||yi.level!=="block"&&yi.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");ht[yi.level]?ht[yi.level].unshift(yi.tokenizer):ht[yi.level]=[yi.tokenizer],yi.start&&(yi.level==="block"?ht.startBlock?ht.startBlock.push(yi.start):ht.startBlock=[yi.start]:yi.level==="inline"&&(ht.startInline?ht.startInline.push(yi.start):ht.startInline=[yi.start]))}yi.childTokens&&(ht.childTokens[yi.name]=yi.childTokens)})),kt.renderer&&function(){var yi=$n.defaults.renderer||new nm,_n=function(zn){var Ds=yi[zn];yi[zn]=function(){for(var _s=arguments.length,Cn=new Array(_s),Co=0;Co<_s;Co++)Cn[Co]=arguments[Co];var Ks=kt.renderer[zn].apply(yi,Cn);return Ks===!1&&(Ks=Ds.apply(yi,Cn)),Ks}};for(var ln in kt.renderer)_n(ln);st.renderer=yi}(),kt.tokenizer&&function(){var yi=$n.defaults.tokenizer||new im,_n=function(zn){var Ds=yi[zn];yi[zn]=function(){for(var _s=arguments.length,Cn=new Array(_s),Co=0;Co<_s;Co++)Cn[Co]=arguments[Co];var Ks=kt.tokenizer[zn].apply(yi,Cn);return Ks===!1&&(Ks=Ds.apply(yi,Cn)),Ks}};for(var ln in kt.tokenizer)_n(ln);st.tokenizer=yi}(),kt.walkTokens){var hi=$n.defaults.walkTokens;st.walkTokens=function(yi){kt.walkTokens.call(this,yi),hi&&hi.call(this,yi)}}Mt&&(st.extensions=ht),$n.setOptions(st)})},$n.walkTokens=function(si,$t){for(var Yt=function(){var kt=ht.value;switch($t.call($n,kt),kt.type){case"table":{for(var hi=c(kt.header),yi;!(yi=hi()).done;){var _n=yi.value;$n.walkTokens(_n.tokens,$t)}for(var ln=c(kt.rows),Zn;!(Zn=ln()).done;)for(var zn=Zn.value,Ds=c(zn),_s;!(_s=Ds()).done;){var Cn=_s.value;$n.walkTokens(Cn.tokens,$t)}break}case"list":{$n.walkTokens(kt.items,$t);break}default:$n.defaults.extensions&&$n.defaults.extensions.childTokens&&$n.defaults.extensions.childTokens[kt.type]?$n.defaults.extensions.childTokens[kt.type].forEach(function(Co){$n.walkTokens(kt[Co],$t)}):kt.tokens&&$n.walkTokens(kt.tokens,$t)}},st=c(si),ht;!(ht=st()).done;)Yt()},$n.parseInline=function(si,$t){if(typeof si>"u"||si===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof si!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(si)+", string expected");$t=mr({},$n.defaults,$t||{}),Xu($t);try{var Yt=rc.lexInline(si,$t);return $t.walkTokens&&$n.walkTokens(Yt,$t.walkTokens),ac.parseInline(Yt,$t)}catch(st){if(st.message+=` Please report this to https://github.com/markedjs/marked.`,$t.silent)return"<p>An error occurred:</p><pre>"+tt(st.message+"",!0)+"</pre>";throw st}},$n.Parser=ac,$n.parser=ac.parse,$n.Renderer=nm,$n.TextRenderer=b_,$n.Lexer=rc,$n.lexer=rc.lex,$n.Tokenizer=im,$n.Slugger=w_,$n.parse=$n;var ik=$n.options,nk=$n.setOptions,sk=$n.use,ok=$n.walkTokens,rk=$n.parseInline,ak=$n,lk=ac.parse,dk=rc.lex;e.Lexer=rc,e.Parser=ac,e.Renderer=nm,e.Slugger=w_,e.TextRenderer=b_,e.Tokenizer=im,e.getDefaults=m,e.lexer=dk,e.marked=$n,e.options=ik,e.parse=ak,e.parseInline=rk,e.parser=lk,e.setOptions=nk,e.use=sk,e.walkTokens=ok,Object.defineProperty(e,"__esModule",{value:!0})})})();var Ig=xg||exports,Ng=f(50180);function km(u,e={},t={}){var i;const s=new at.Cm;let o=!1;const c=(0,kg.n)(e),m=function(tt){let vt;try{vt=(0,Ng.q)(decodeURIComponent(tt))}catch{}return vt?(vt=(0,Va.PI)(vt,Ht=>{if(u.uris&&u.uris[Ht])return vn.r.revive(u.uris[Ht])}),encodeURIComponent(JSON.stringify(vt))):tt},A=function(tt,vt){const Ht=u.uris&&u.uris[tt];let ci=vn.r.revive(Ht);return vt?tt.startsWith(li.ny.data+":")?tt:(ci||(ci=vn.r.parse(tt)),li.zl.asBrowserUri(ci).toString(!0)):!ci||vn.r.parse(tt).toString()===ci.toString()?tt:(ci.query&&(ci=ci.with({query:m(ci.query)})),ci.toString())},U=new Ig.Renderer;U.image=(tt,vt,Ht)=>{let ci=[],gi=[];return tt&&({href:tt,dimensions:ci}=(0,Li.nI)(tt),gi.push(`src="${(0,Li.oO)(tt)}"`)),Ht&&gi.push(`alt="${(0,Li.oO)(Ht)}"`),vt&&gi.push(`title="${(0,Li.oO)(vt)}"`),ci.length&&(gi=gi.concat(ci)),"<img "+gi.join(" ")+">"},U.link=(tt,vt,Ht)=>typeof tt!="string"?"":(tt===Ht&&(Ht=(0,Li._W)(Ht)),vt=typeof vt=="string"?(0,Li.oO)((0,Li._W)(vt)):"",tt=(0,Li._W)(tt),tt=tt.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),`<a href="${tt}" title="${vt||tt}">${Ht}</a>`),U.paragraph=tt=>`<p>${tt}</p>`;const W=[];if(e.codeBlockRenderer&&(U.code=(tt,vt)=>{const Ht=wr.r.nextId(),ci=e.codeBlockRenderer(vt??"",tt);return W.push(ci.then(gi=>[Ht,gi])),`<div class="code" data-code="${Ht}">${(0,xi.ih)(tt)}</div>`}),e.actionHandler){const tt=e.actionHandler.disposables.add(new Md.f(c,"click")),vt=e.actionHandler.disposables.add(new Md.f(c,"auxclick"));e.actionHandler.disposables.add(Vi.Jh.any(tt.event,vt.event)(Ht=>{const ci=new Dm.P(Ht);if(!ci.leftButton&&!ci.middleButton)return;let gi=ci.target;if(!(gi.tagName!=="A"&&(gi=gi.parentElement,!gi||gi.tagName!=="A")))try{let Ui=gi.dataset.href;Ui&&(u.baseUri&&(Ui=Jh(vn.r.from(u.baseUri),Ui)),e.actionHandler.callback(Ui,ci))}catch(Ui){(0,Wi.dz)(Ui)}finally{ci.preventDefault()}}))}u.supportHtml||(t.sanitizer=tt=>(u.isTrusted?tt.match(/^(<span[^>]+>)|(<\/\s*span>)$/):void 0)?tt:"",t.sanitize=!0,t.silent=!0),t.renderer=U;let re=(i=u.value)!==null&&i!==void 0?i:"";re.length>1e5&&(re=`${re.substr(0,1e5)}\u2026`),u.supportThemeIcons&&(re=(0,Eg.sA)(re));let Se=Ig.parse(re,t);u.supportThemeIcons&&(Se=(0,Zs.n)(Se).map(vt=>typeof vt=="string"?vt:vt.outerHTML).join(""));const Qe=new DOMParser().parseFromString(Td(u,Se),"text/html");if(Qe.body.querySelectorAll("img").forEach(tt=>{const vt=tt.getAttribute("src");if(vt){let Ht=vt;try{u.baseUri&&(Ht=Jh(vn.r.from(u.baseUri),Ht))}catch{}tt.src=A(Ht,!0)}}),Qe.body.querySelectorAll("a").forEach(tt=>{const vt=tt.getAttribute("href");if(tt.setAttribute("href",""),!vt||/^data:|javascript:/i.test(vt)||/^command:/i.test(vt)&&!u.isTrusted||/^command:(\/\/\/)?_workbench\.downloadResource/i.test(vt))tt.replaceWith(...tt.childNodes);else{let Ht=A(vt,!1);u.baseUri&&(Ht=Jh(vn.r.from(u.baseUri),vt)),tt.dataset.href=Ht}}),c.innerHTML=Td(u,Qe.body.innerHTML),W.length>0&&Promise.all(W).then(tt=>{var vt,Ht;if(o)return;const ci=new Map(tt),gi=c.querySelectorAll("div[data-code]");for(const Ui of gi){const dn=ci.get((vt=Ui.dataset.code)!==null&&vt!==void 0?vt:"");dn&&M.Ln(Ui,dn)}(Ht=e.asyncRenderCallback)===null||Ht===void 0||Ht.call(e)}),e.asyncRenderCallback)for(const tt of c.getElementsByTagName("img")){const vt=s.add(M.ko(tt,"load",()=>{vt.dispose(),e.asyncRenderCallback()}))}return{element:c,dispose:()=>{o=!0,s.dispose()}}}function Jh(u,e){return/^\w[\w\d+.-]*:/.test(e)?e:u.path.endsWith("/")?(0,hn.o1)(u,e).toString():(0,hn.o1)((0,hn.pD)(u),e).toString()}function Td(u,e){const{config:t,allowedSchemes:i}=Mg(u);Xh.$w("uponSanitizeAttribute",(o,c)=>{if(c.attrName==="style"||c.attrName==="class"){if(o.tagName==="SPAN"){if(c.attrName==="style"){c.keepAttr=/^(color\:#[0-9a-fA-F]+;)?(background-color\:#[0-9a-fA-F]+;)?$/.test(c.attrValue);return}else if(c.attrName==="class"){c.keepAttr=/^codicon codicon-[a-z\-]+( codicon-modifier-[a-z\-]+)?$/.test(c.attrValue);return}}c.keepAttr=!1;return}});const s=M.a4(i);try{return Xh.aj(e,Object.assign(Object.assign({},t),{RETURN_TRUSTED_TYPE:!0}))}finally{Xh.SV("uponSanitizeAttribute"),s.dispose()}}function Mg(u){const e=[li.ny.http,li.ny.https,li.ny.mailto,li.ny.data,li.ny.file,li.ny.vscodeFileResource,li.ny.vscodeRemote,li.ny.vscodeRemoteResource];return u.isTrusted&&e.push(li.ny.command),{config:{ALLOWED_TAGS:["ul","li","p","b","i","code","blockquote","ol","h1","h2","h3","h4","h5","h6","hr","em","pre","table","thead","tbody","tr","th","td","div","del","a","strong","br","img","span"],ALLOWED_ATTR:["href","data-href","target","title","src","alt","class","style","data-code","width","height","align"],ALLOW_UNKNOWN_PROTOCOLS:!0},allowedSchemes:e}}var Ho=f(54435),Tg=f(1458),Rd=f(25837),Em=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},Rg=function(u,e){return function(t,i){e(t,i,u)}},qh=function(u,e,t,i){function s(o){return o instanceof t?o:new t(function(c){c(o)})}return new(t||(t=Promise))(function(o,c){function m(W){try{U(i.next(W))}catch(re){c(re)}}function A(W){try{U(i.throw(W))}catch(re){c(re)}}function U(W){W.done?o(W.value):s(W.value).then(m,A)}U((i=i.apply(u,e||[])).next())})},eu;let Br=class mC{constructor(e,t,i){this._options=e,this._languageService=t,this._openerService=i,this._onDidRenderAsync=new Vi.vl,this.onDidRenderAsync=this._onDidRenderAsync.event}dispose(){this._onDidRenderAsync.dispose()}render(e,t,i){if(!e)return{element:document.createElement("span"),dispose:()=>{}};const s=new at.Cm;return{element:s.add(km(e,Object.assign(Object.assign({},this._getRenderOptions(e,s)),t),i)).element,dispose:()=>s.dispose()}}_getRenderOptions(e,t){return{codeBlockRenderer:(i,s)=>qh(this,void 0,void 0,function*(){var o,c,m;let A;i?A=this._languageService.getLanguageIdByLanguageName(i):this._options.editor&&(A=(o=this._options.editor.getModel())===null||o===void 0?void 0:o.getLanguageId()),A||(A=Xi.vH);const U=yield(0,Tg.Yj)(this._languageService,s,A),W=document.createElement("span");if(W.innerHTML=(m=(c=mC._ttpTokenizer)===null||c===void 0?void 0:c.createHTML(U))!==null&&m!==void 0?m:U,this._options.editor){const re=this._options.editor.getOption(46);(0,Rd.M)(W,re)}else this._options.codeBlockFontFamily&&(W.style.fontFamily=this._options.codeBlockFontFamily);return this._options.codeBlockFontSize!==void 0&&(W.style.fontSize=this._options.codeBlockFontSize),W}),asyncRenderCallback:()=>this._onDidRenderAsync.fire(),actionHandler:{callback:i=>this._openerService.open(i,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:e.isTrusted}).catch(Wi.dz),disposables:t}}}};Br._ttpTokenizer=(eu=window.trustedTypes)===null||eu===void 0?void 0:eu.createPolicy("tokenizeToString",{createHTML(u){return u}}),Br=Em([Rg(1,Fs.L),Rg(2,Ho.Cr)],Br);const Ag=M.$;class zl extends at.jG{constructor(e,t,i=Ho.m5){super(),this._renderDisposeables=this._register(new at.Cm),this._editor=e,this._isVisible=!1,this._messages=[],this._hover=this._register(new ea),this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._markdownRenderer=this._register(new Br({editor:this._editor},t,i)),this._computer=new xm(this._editor),this._hoverOperation=this._register(new Cg(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(46)&&this._updateFont()})),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return zl.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){return null}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(t=>this._editor.applyFontInfo(t))}_onModelDecorationsChanged(){this._isVisible&&(this._hoverOperation.cancel(),this._hoverOperation.start(0))}startShowingAt(e){this._computer.lineNumber!==e&&(this._hoverOperation.cancel(),this.hide(),this._computer.lineNumber=e,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,t){this._renderDisposeables.clear();const i=document.createDocumentFragment();for(const s of t){const o=Ag("div.hover-row.markdown-hover"),c=M.BC(o,Ag("div.hover-contents")),m=this._renderDisposeables.add(this._markdownRenderer.render(s.value));c.appendChild(m.element),i.appendChild(o)}this._updateContents(i),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 t=this._editor.getLayoutInfo(),i=this._editor.getTopForLineNumber(e),s=this._editor.getScrollTop(),o=this._editor.getOption(61),c=this._hover.containerDomNode.clientHeight,m=i-s-(c-o)/2;this._hover.containerDomNode.style.left=`${t.glyphMarginLeft+t.glyphMarginWidth}px`,this._hover.containerDomNode.style.top=`${Math.max(Math.round(m),0)}px`}}zl.ID="editor.contrib.modesGlyphHoverWidget";class xm{constructor(e){this._editor=e,this._lineNumber=-1}get lineNumber(){return this._lineNumber}set lineNumber(e){this._lineNumber=e}computeSync(){const e=s=>({value:s}),t=this._editor.getLineDecorations(this._lineNumber),i=[];if(!t)return i;for(const s of t){if(!s.options.glyphMarginClassName)continue;const o=s.options.glyphMarginHoverMessage;!o||(0,Li.it)(o)||i.push(...(0,cn._j)(o).map(e))}return i}}var Im=function(u,e,t,i){function s(o){return o instanceof t?o:new t(function(c){c(o)})}return new(t||(t=Promise))(function(o,c){function m(W){try{U(i.next(W))}catch(re){c(re)}}function A(W){try{U(i.throw(W))}catch(re){c(re)}}function U(W){W.done?o(W.value):s(W.value).then(m,A)}U((i=i.apply(u,e||[])).next())})};class Nm{constructor(e,t,i){this.provider=e,this.hover=t,this.ordinal=i}}function Mm(u,e,t,i,s){return Im(this,void 0,void 0,function*(){try{const o=yield Promise.resolve(u.provideHover(t,i,s));if(o&&Tm(o))return new Nm(u,o,e)}catch(o){(0,Wi.M_)(o)}})}function tu(u,e,t,i){const o=u.ordered(e).map((c,m)=>Mm(c,m,e,t,i));return Ot.AE.fromPromises(o).coalesce()}function Ad(u,e,t,i){return tu(u,e,t,i).map(s=>s.hover).toPromise()}(0,Te.ke)("_executeHoverProvider",(u,e,t)=>{const i=u.get(Zi.u);return Ad(i.hoverProvider,e,t,Ti.X.None)});function Tm(u){const e=typeof u.range<"u",t=typeof u.contents<"u"&&u.contents&&u.contents.length>0;return e&&t}var Rm=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},Od=function(u,e){return function(t,i){e(t,i,u)}};const Og=M.$;class kr{constructor(e,t,i,s){this.owner=e,this.range=t,this.contents=i,this.ordinal=s}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let Ul=class{constructor(e,t,i,s,o){this._editor=e,this._languageService=t,this._openerService=i,this._configurationService=s,this._languageFeaturesService=o,this.hoverOrdinal=2}createLoadingMessage(e){return new kr(this,e.range,[new Li.Bc().appendText(we.kg("modesContentHover.loading","Loading..."))],2e3)}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1)return[];const i=this._editor.getModel(),s=e.range.startLineNumber,o=i.getLineMaxColumn(s),c=[];let m=1e3;const A=i.getLineLength(s),U=i.getLanguageIdAtPosition(e.range.startLineNumber,e.range.startColumn),W=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:U});typeof W=="number"&&A>=W&&c.push(new kr(this,e.range,[{value:we.kg("too many characters","Tokenization is skipped for long lines for performance reasons. This can be configured via `editor.maxTokenizationLineLength`.")}],m++));for(const re of t){const Se=re.range.startLineNumber===s?re.range.startColumn:1,Be=re.range.endLineNumber===s?re.range.endColumn:o,Qe=re.options.hoverMessage;if(!Qe||(0,Li.it)(Qe))continue;const tt=new St.Q(e.range.startLineNumber,Se,e.range.startLineNumber,Be);c.push(new kr(this,tt,(0,cn._j)(Qe),m++))}return c}computeAsync(e,t,i){if(!this._editor.hasModel()||e.type!==1)return Ot.AE.EMPTY;const s=this._editor.getModel();if(!this._languageFeaturesService.hoverProvider.has(s))return Ot.AE.EMPTY;const o=new bi.y(e.range.startLineNumber,e.range.startColumn);return tu(this._languageFeaturesService.hoverProvider,s,o,i).filter(c=>!(0,Li.it)(c.hover.contents)).map(c=>{const m=c.hover.range?St.Q.lift(c.hover.range):e.range;return new kr(this,m,c.hover.contents,c.ordinal)})}renderHoverParts(e,t){return Pg(e,t,this._editor,this._languageService,this._openerService)}};Ul=Rm([Od(1,Fs.L),Od(2,Ho.Cr),Od(3,de.pG),Od(4,Zi.u)],Ul);function Pg(u,e,t,i,s){e.sort((c,m)=>c.ordinal-m.ordinal);const o=new at.Cm;for(const c of e)for(const m of c.contents){if((0,Li.it)(m))continue;const A=Og("div.hover-row.markdown-hover"),U=M.BC(A,Og("div.hover-contents")),W=o.add(new Br({editor:t},i,s));o.add(W.onDidRenderAsync(()=>{U.className="hover-contents code-hover-contents",u.onContentsChanged()}));const re=o.add(W.render(m));U.appendChild(re.element),u.fragment.appendChild(A)}return o}var Am=f(80886),Fg=f(85525),Bg=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},Wc=function(u,e){return function(t,i){e(t,i,u)}};class Wg{constructor(e,t,i){this.marker=e,this.index=t,this.total=i}}let iu=class{constructor(e,t,i){this._markerService=t,this._configService=i,this._onDidChange=new Vi.vl,this.onDidChange=this._onDidChange.event,this._dispoables=new at.Cm,this._markers=[],this._nextIdx=-1,vn.r.isUri(e)?this._resourceFilter=m=>m.toString()===e.toString():e&&(this._resourceFilter=e);const s=this._configService.getValue("problems.sortOrder"),o=(m,A)=>{let U=(0,xi.UD)(m.resource.toString(),A.resource.toString());return U===0&&(s==="position"?U=St.Q.compareRangesUsingStarts(m,A)||Yn.cj.compare(m.severity,A.severity):U=Yn.cj.compare(m.severity,A.severity)||St.Q.compareRangesUsingStarts(m,A)),U},c=()=>{this._markers=this._markerService.read({resource:vn.r.isUri(e)?e:void 0,severities:Yn.cj.Error|Yn.cj.Warning|Yn.cj.Info}),typeof e=="function"&&(this._markers=this._markers.filter(m=>this._resourceFilter(m.resource))),this._markers.sort(o)};c(),this._dispoables.add(t.onMarkerChanged(m=>{(!this._resourceFilter||m.some(A=>this._resourceFilter(A)))&&(c(),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 Wg(e,this._nextIdx+1,this._markers.length)}_initIdx(e,t,i){let s=!1,o=this._markers.findIndex(c=>c.resource.toString()===e.uri.toString());o<0&&(o=(0,cn.El)(this._markers,{resource:e.uri},(c,m)=>(0,xi.UD)(c.resource.toString(),m.resource.toString())),o<0&&(o=~o));for(let c=o;c<this._markers.length;c++){let m=St.Q.lift(this._markers[c]);if(m.isEmpty()){const A=e.getWordAtPosition(m.getStartPosition());A&&(m=new St.Q(m.startLineNumber,A.startColumn,m.startLineNumber,A.endColumn))}if(t&&(m.containsPosition(t)||t.isBeforeOrEqual(m.getStartPosition()))){this._nextIdx=c,s=!0;break}if(this._markers[c].resource.toString()!==e.uri.toString())break}s||(this._nextIdx=i?0:this._markers.length-1),this._nextIdx<0&&(this._nextIdx=this._markers.length-1)}resetIndex(){this._nextIdx=-1}move(e,t,i){if(this._markers.length===0)return!1;const s=this._nextIdx;return this._nextIdx===-1?this._initIdx(t,i,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,t){let i=this._markers.findIndex(s=>s.resource.toString()===e.toString());if(!(i<0)){for(;i<this._markers.length;i++)if(St.Q.containsPosition(this._markers[i],t))return new Wg(this._markers[i],i+1,this._markers.length)}}};iu=Bg([Wc(1,Yn.DR),Wc(2,de.pG)],iu);const Vg=(0,P.u1)("IMarkerNavigationService");let nu=class{constructor(e,t){this._markerService=e,this._configService=t,this._provider=new Fg.w}getMarkerList(e){for(const t of this._provider){const i=t.getMarkerList(e);if(i)return i}return new iu(e,this._markerService,this._configService)}};nu=Bg([Wc(0,Yn.DR),Wc(1,de.pG)],nu),(0,nr.v)(Vg,nu,!0);var ho=f(11210),P_=f(44029),jl=f(66459),su;(function(u){function e(t){switch(t){case jl.A.Ignore:return"severity-ignore "+Mi.W6.info.classNames;case jl.A.Info:return Mi.W6.info.classNames;case jl.A.Warning:return Mi.W6.warning.classNames;case jl.A.Error:return Mi.W6.error.classNames;default:return""}}u.className=e})(su||(su={})),(0,Ye.zy)((u,e)=>{const t=u.getColor(Ce.tYX);if(t){const o=Mi.W6.error.cssSelector;e.addRule(` .monaco-editor .zone-widget ${o}, .markers-panel .marker-icon${o}, .text-search-provider-messages .providerMessage ${o}, .extensions-viewlet > .extensions ${o} { color: ${t}; } `)}const i=u.getColor(Ce.JPj);if(i){const o=Mi.W6.warning.cssSelector;e.addRule(` .monaco-editor .zone-widget ${o}, .markers-panel .marker-icon${o}, .extensions-viewlet > .extensions ${o}, .extension-editor ${o}, .text-search-provider-messages .providerMessage ${o}, .preferences-editor ${o} { color: ${i}; } `)}const s=u.getColor(Ce.bNw);if(s){const o=Mi.W6.info.cssSelector;e.addRule(` .monaco-editor .zone-widget ${o}, .markers-panel .marker-icon${o}, .extensions-viewlet > .extensions ${o}, .text-search-provider-messages .providerMessage ${o}, .extension-editor ${o} { color: ${s}; } `)}});var Om=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},Kl=function(u,e){return function(t,i){e(t,i,u)}};class Pm{constructor(e,t,i,s,o){this._openerService=s,this._labelService=o,this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=new at.Cm,this._editor=t;const c=document.createElement("div");c.className="descriptioncontainer",this._messageBlock=document.createElement("div"),this._messageBlock.classList.add("message"),this._messageBlock.setAttribute("aria-live","assertive"),this._messageBlock.setAttribute("role","alert"),c.appendChild(this._messageBlock),this._relatedBlock=document.createElement("div"),c.appendChild(this._relatedBlock),this._disposables.add(M.b2(this._relatedBlock,"click",m=>{m.preventDefault();const A=this._relatedDiagnostics.get(m.target);A&&i(A)})),this._scrollable=new ko.Se(c,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:6,verticalScrollbarSize:6}),e.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll(m=>{c.style.left=`-${m.scrollLeft}px`,c.style.top=`-${m.scrollTop}px`})),this._disposables.add(this._scrollable)}dispose(){(0,at.AS)(this._disposables)}update(e){const{source:t,message:i,relatedInformation:s,code:o}=e;let c=(t?.length||0)+2;o&&(typeof o=="string"?c+=o.length:c+=o.value.length);const m=(0,xi.uz)(i);this._lines=m.length,this._longestLineLength=0;for(const Se of m)this._longestLineLength=Math.max(Se.length+c,this._longestLineLength);M.w_(this._messageBlock),this._messageBlock.setAttribute("aria-label",this.getAriaLabel(e)),this._editor.applyFontInfo(this._messageBlock);let A=this._messageBlock;for(const Se of m)A=document.createElement("div"),A.innerText=Se,Se===""&&(A.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(A);if(t||o){const Se=document.createElement("span");if(Se.classList.add("details"),A.appendChild(Se),t){const Be=document.createElement("span");Be.innerText=t,Be.classList.add("source"),Se.appendChild(Be)}if(o)if(typeof o=="string"){const Be=document.createElement("span");Be.innerText=`(${o})`,Be.classList.add("code"),Se.appendChild(Be)}else{this._codeLink=M.$("a.code-link"),this._codeLink.setAttribute("href",`${o.target.toString()}`),this._codeLink.onclick=Qe=>{this._openerService.open(o.target,{allowCommands:!0}),Qe.preventDefault(),Qe.stopPropagation()};const Be=M.BC(this._codeLink,M.$("span"));Be.innerText=o.value,Se.appendChild(this._codeLink)}}if(M.w_(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),(0,cn.EI)(s)){const Se=this._relatedBlock.appendChild(document.createElement("div"));Se.style.paddingTop=`${Math.floor(this._editor.getOption(61)*.66)}px`,this._lines+=1;for(const Be of s){const Qe=document.createElement("div"),tt=document.createElement("a");tt.classList.add("filename"),tt.innerText=`${this._labelService.getUriBasenameLabel(Be.resource)}(${Be.startLineNumber}, ${Be.startColumn}): `,tt.title=this._labelService.getUriLabel(Be.resource),this._relatedDiagnostics.set(tt,Be);const vt=document.createElement("span");vt.innerText=Be.message,Qe.appendChild(tt),Qe.appendChild(vt),this._lines+=1,Se.appendChild(Qe)}}const U=this._editor.getOption(46),W=Math.ceil(U.typicalFullwidthCharacterWidth*this._longestLineLength*.75),re=U.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:W,scrollHeight:re})}layout(e,t){this._scrollable.getDomNode().style.height=`${e}px`,this._scrollable.getDomNode().style.width=`${t}px`,this._scrollable.setScrollDimensions({width:t,height:e})}getHeightInLines(){return Math.min(17,this._lines)}getAriaLabel(e){let t="";switch(e.severity){case Yn.cj.Error:t=we.kg("Error","Error");break;case Yn.cj.Warning:t=we.kg("Warning","Warning");break;case Yn.cj.Info:t=we.kg("Info","Info");break;case Yn.cj.Hint:t=we.kg("Hint","Hint");break}let i=we.kg("marker aria","{0} at {1}. ",t,e.startLineNumber+":"+e.startColumn);const s=this._editor.getModel();return s&&e.startLineNumber<=s.getLineCount()&&e.startLineNumber>=1&&(i=`${s.getLineContent(e.startLineNumber)}, ${i}`),i}}let $l=class pC extends Ka{constructor(e,t,i,s,o,c,m){super(e,{showArrow:!0,showFrame:!0,isAccessible:!0,frameWidth:1},o),this._themeService=t,this._openerService=i,this._menuService=s,this._contextKeyService=c,this._labelService=m,this._callOnDispose=new at.Cm,this._onDidSelectRelatedInformation=new Vi.vl,this.onDidSelectRelatedInformation=this._onDidSelectRelatedInformation.event,this._severity=Yn.cj.Warning,this._backgroundColor=Dn.Q1.white,this._applyTheme(t.getColorTheme()),this._callOnDispose.add(t.onDidColorThemeChange(this._applyTheme.bind(this))),this.create()}_applyTheme(e){this._backgroundColor=e.getColor(Vm);let t=ou,i=Fm;this._severity===Yn.cj.Warning?(t=Vc,i=Bm):this._severity===Yn.cj.Info&&(t=ru,i=Wm);const s=e.getColor(t),o=e.getColor(i);this.style({arrowColor:s,frameColor:s,headerBackgroundColor:o,primaryHeadingColor:e.getColor(Sc),secondaryHeadingColor:e.getColor(Nl)})}_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.onBeforeRun(s=>this.editor.focus()));const t=[],i=this._menuService.createMenu(pC.TitleMenu,this._contextKeyService);va(i,void 0,t),this._actionbarWidget.push(t,{label:!1,icon:!0,index:0}),i.dispose()}_fillTitleIcon(e){this._icon=M.BC(e,M.$(""))}_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 Pm(this._container,this.editor,t=>this._onDidSelectRelatedInformation.fire(t),this._openerService,this._labelService),this._disposables.add(this._message)}show(){throw new Error("call showAtMarker")}showAtMarker(e,t,i){this._container.classList.remove("stale"),this._message.update(e),this._severity=e.severity,this._applyTheme(this._themeService.getColorTheme());const s=St.Q.lift(e),o=this.editor.getPosition(),c=o&&s.containsPosition(o)?o:s.getStartPosition();super.show(c,this.computeRequiredHeight());const m=this.editor.getModel();if(m){const A=i>1?we.kg("problems","{0} of {1} problems",t,i):we.kg("change","{0} of {1} problem",t,i);this.setTitle((0,hn.P8)(m.uri),A)}this._icon.className=`codicon ${su.className(Yn.cj.toSeverity(this._severity))}`,this.editor.revealPositionNearTop(c,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,t){super._doLayoutBody(e,t),this._heightInPixel=e,this._message.layout(e,t),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()}};$l.TitleMenu=new xe.D8("gotoErrorTitleMenu"),$l=Om([Kl(1,Ye.Gy),Kl(2,Ho.Cr),Kl(3,xe.ez),Kl(4,P._Y),Kl(5,ct.fN),Kl(6,Vn.L)],$l);const Hg=(0,Ce.yLr)(Ce.Rbi,Ce.AN$),zg=(0,Ce.yLr)(Ce.Hng,Ce.Stt),Ug=(0,Ce.yLr)(Ce.pOz,Ce.IIb),ou=(0,Ce.x1A)("editorMarkerNavigationError.background",{dark:Hg,light:Hg,hcDark:Ce.b1q,hcLight:Ce.b1q},we.kg("editorMarkerNavigationError","Editor marker navigation widget error color.")),Fm=(0,Ce.x1A)("editorMarkerNavigationError.headerBackground",{dark:(0,Ce.JO0)(ou,.1),light:(0,Ce.JO0)(ou,.1),hcDark:null,hcLight:null},we.kg("editorMarkerNavigationErrorHeaderBackground","Editor marker navigation widget error heading background.")),Vc=(0,Ce.x1A)("editorMarkerNavigationWarning.background",{dark:zg,light:zg,hcDark:Ce.b1q,hcLight:Ce.b1q},we.kg("editorMarkerNavigationWarning","Editor marker navigation widget warning color.")),Bm=(0,Ce.x1A)("editorMarkerNavigationWarning.headerBackground",{dark:(0,Ce.JO0)(Vc,.1),light:(0,Ce.JO0)(Vc,.1),hcDark:"#0C141F",hcLight:(0,Ce.JO0)(Vc,.2)},we.kg("editorMarkerNavigationWarningBackground","Editor marker navigation widget warning heading background.")),ru=(0,Ce.x1A)("editorMarkerNavigationInfo.background",{dark:Ug,light:Ug,hcDark:Ce.b1q,hcLight:Ce.b1q},we.kg("editorMarkerNavigationInfo","Editor marker navigation widget info color.")),Wm=(0,Ce.x1A)("editorMarkerNavigationInfo.headerBackground",{dark:(0,Ce.JO0)(ru,.1),light:(0,Ce.JO0)(ru,.1),hcDark:null,hcLight:null},we.kg("editorMarkerNavigationInfoHeaderBackground","Editor marker navigation widget info heading background.")),Vm=(0,Ce.x1A)("editorMarkerNavigation.background",{dark:Ce.YtV,light:Ce.YtV,hcDark:Ce.YtV,hcLight:Ce.YtV},we.kg("editorMarkerNavigationBackground","Editor marker navigation widget background."));var Hm=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},Hc=function(u,e){return function(t,i){e(t,i,u)}},zc=function(u,e,t,i){function s(o){return o instanceof t?o:new t(function(c){c(o)})}return new(t||(t=Promise))(function(o,c){function m(W){try{U(i.next(W))}catch(re){c(re)}}function A(W){try{U(i.throw(W))}catch(re){c(re)}}function U(W){W.done?o(W.value):s(W.value).then(m,A)}U((i=i.apply(u,e||[])).next())})};let Ws=class am{constructor(e,t,i,s,o){this._markerNavigationService=t,this._contextKeyService=i,this._editorService=s,this._instantiationService=o,this._sessionDispoables=new at.Cm,this._editor=e,this._widgetVisible=jg.bindTo(this._contextKeyService)}static get(e){return e.getContribution(am.ID)}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 t=!1;return this._model&&(t=!0,this._cleanUp()),this._model=this._markerNavigationService.getMarkerList(e),t&&this._model.move(!0,this._editor.getModel(),this._editor.getPosition()),this._widget=this._instantiationService.createInstance($l,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(i=>{var s,o,c;(!(!((s=this._model)===null||s===void 0)&&s.selected)||!St.Q.containsPosition((o=this._model)===null||o===void 0?void 0:o.selected.marker,i.position))&&((c=this._model)===null||c===void 0||c.resetIndex())})),this._sessionDispoables.add(this._model.onDidChange(()=>{if(!this._widget||!this._widget.position||!this._model)return;const i=this._model.find(this._editor.getModel().uri,this._widget.position);i?this._widget.updateMarker(i.marker):this._widget.showStale()})),this._sessionDispoables.add(this._widget.onDidSelectRelatedInformation(i=>{this._editorService.openCodeEditor({resource:i.resource,options:{pinned:!0,revealIfOpened:!0,selection:St.Q.lift(i).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 t=this._getOrCreateModel(this._editor.getModel().uri);t.resetIndex(),t.move(!0,this._editor.getModel(),new bi.y(e.startLineNumber,e.startColumn)),t.selected&&this._widget.showAtMarker(t.selected.marker,t.selected.index,t.selected.total)}}nagivate(e,t){var i,s;return zc(this,void 0,void 0,function*(){if(this._editor.hasModel()){const o=this._getOrCreateModel(t?void 0:this._editor.getModel().uri);if(o.move(e,this._editor.getModel(),this._editor.getPosition()),!o.selected)return;if(o.selected.marker.resource.toString()!==this._editor.getModel().uri.toString()){this._cleanUp();const c=yield this._editorService.openCodeEditor({resource:o.selected.marker.resource,options:{pinned:!1,revealIfOpened:!0,selectionRevealType:2,selection:o.selected.marker}},this._editor);c&&((i=am.get(c))===null||i===void 0||i.close(),(s=am.get(c))===null||s===void 0||s.nagivate(e,t))}else this._widget.showAtMarker(o.selected.marker,o.selected.index,o.selected.total)}})}};Ws.ID="editor.contrib.markerController",Ws=Hm([Hc(1,Vg),Hc(2,ct.fN),Hc(3,Gi.T),Hc(4,P._Y)],Ws);class Uc extends Te.ks{constructor(e,t,i){super(i),this._next=e,this._multiFile=t}run(e,t){var i;return zc(this,void 0,void 0,function*(){t.hasModel()&&((i=Ws.get(t))===null||i===void 0||i.nagivate(this._next,this._multiFile))})}}class ya extends Uc{constructor(){super(!0,!1,{id:ya.ID,label:ya.LABEL,alias:"Go to Next Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:ze.R.focus,primary:578,weight:100},menuOpts:{menuId:$l.TitleMenu,title:ya.LABEL,icon:(0,ho.pU)("marker-navigation-next",Mi.W6.arrowDown,we.kg("nextMarkerIcon","Icon for goto next marker.")),group:"navigation",order:1}})}}ya.ID="editor.action.marker.next",ya.LABEL=we.kg("markerAction.next.label","Go to Next Problem (Error, Warning, Info)");class el extends Uc{constructor(){super(!1,!1,{id:el.ID,label:el.LABEL,alias:"Go to Previous Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:ze.R.focus,primary:1602,weight:100},menuOpts:{menuId:$l.TitleMenu,title:el.LABEL,icon:(0,ho.pU)("marker-navigation-previous",Mi.W6.arrowUp,we.kg("previousMarkerIcon","Icon for goto previous marker.")),group:"navigation",order:2}})}}el.ID="editor.action.marker.prev",el.LABEL=we.kg("markerAction.previous.label","Go to Previous Problem (Error, Warning, Info)");class zm extends Uc{constructor(){super(!0,!0,{id:"editor.action.marker.nextInFiles",label:we.kg("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:ze.R.focus,primary:66,weight:100},menuOpts:{menuId:xe.D8.MenubarGoMenu,title:we.kg({key:"miGotoNextProblem",comment:["&& denotes a mnemonic"]},"Next &&Problem"),group:"6_problem_nav",order:1}})}}class Um extends Uc{constructor(){super(!1,!0,{id:"editor.action.marker.prevInFiles",label:we.kg("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:ze.R.focus,primary:1090,weight:100},menuOpts:{menuId:xe.D8.MenubarGoMenu,title:we.kg({key:"miGotoPreviousProblem",comment:["&& denotes a mnemonic"]},"Previous &&Problem"),group:"6_problem_nav",order:2}})}}(0,Te.HW)(Ws.ID,Ws),(0,Te.Fl)(ya),(0,Te.Fl)(el),(0,Te.Fl)(zm),(0,Te.Fl)(Um);const jg=new ct.N1("markersNavigationVisible",!1),jm=Te.DX.bindToContribution(Ws.get);(0,Te.E_)(new jm({id:"closeMarkersNavigation",precondition:jg,handler:u=>u.close(),kbOpts:{weight:100+50,kbExpr:ze.R.focus,primary:9,secondary:[1033]}}));var Km=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},au=function(u,e){return function(t,i){e(t,i,u)}};const hr=M.$;class $m{constructor(e,t,i){this.owner=e,this.range=t,this.marker=i}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}const Kg={type:1,filter:{include:wn.QuickFix},triggerAction:yn.QuickFixHover};let lu=class{constructor(e,t,i,s){this._editor=e,this._markerDecorationsService=t,this._openerService=i,this._languageFeaturesService=s,this.hoverOrdinal=5,this.recentMarkerCodeActionsInfo=void 0}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1)return[];const i=this._editor.getModel(),s=e.range.startLineNumber,o=i.getLineMaxColumn(s),c=[];for(const m of t){const A=m.range.startLineNumber===s?m.range.startColumn:1,U=m.range.endLineNumber===s?m.range.endColumn:o,W=this._markerDecorationsService.getMarker(i.uri,m);if(!W)continue;const re=new St.Q(e.range.startLineNumber,A,e.range.startLineNumber,U);c.push(new $m(this,re,W))}return c}renderHoverParts(e,t){if(!t.length)return at.jG.None;const i=new at.Cm;t.forEach(o=>e.fragment.appendChild(this.renderMarkerHover(o,i)));const s=t.length===1?t[0]:t.sort((o,c)=>Yn.cj.compare(o.marker.severity,c.marker.severity))[0];return this.renderMarkerStatusbar(e,s,i),i}renderMarkerHover(e,t){const i=hr("div.hover-row"),s=M.BC(i,hr("div.marker.hover-contents")),{source:o,message:c,code:m,relatedInformation:A}=e.marker;this._editor.applyFontInfo(s);const U=M.BC(s,hr("span"));if(U.style.whiteSpace="pre-wrap",U.innerText=c,o||m)if(m&&typeof m!="string"){const W=hr("span");if(o){const Qe=M.BC(W,hr("span"));Qe.innerText=o}const re=M.BC(W,hr("a.code-link"));re.setAttribute("href",m.target.toString()),t.add(M.ko(re,"click",Qe=>{this._openerService.open(m.target,{allowCommands:!0}),Qe.preventDefault(),Qe.stopPropagation()}));const Se=M.BC(re,hr("span"));Se.innerText=m.value;const Be=M.BC(s,W);Be.style.opacity="0.6",Be.style.paddingLeft="6px"}else{const W=M.BC(s,hr("span"));W.style.opacity="0.6",W.style.paddingLeft="6px",W.innerText=o&&m?`${o}(${m})`:o||`(${m})`}if((0,cn.EI)(A))for(const{message:W,resource:re,startLineNumber:Se,startColumn:Be}of A){const Qe=M.BC(s,hr("div"));Qe.style.marginTop="8px";const tt=M.BC(Qe,hr("a"));tt.innerText=`${(0,hn.P8)(re)}(${Se}, ${Be}): `,tt.style.cursor="pointer",t.add(M.ko(tt,"click",Ht=>{Ht.stopPropagation(),Ht.preventDefault(),this._openerService&&this._openerService.open(re,{fromUserGesture:!0,editorOptions:{selection:{startLineNumber:Se,startColumn:Be}}}).catch(Wi.dz)}));const vt=M.BC(Qe,hr("span"));vt.innerText=W,this._editor.applyFontInfo(vt)}return i}renderMarkerStatusbar(e,t,i){if((t.marker.severity===Yn.cj.Error||t.marker.severity===Yn.cj.Warning||t.marker.severity===Yn.cj.Info)&&e.statusBar.addAction({label:we.kg("view problem","View Problem"),commandId:ya.ID,run:()=>{var s;e.hide(),(s=Ws.get(this._editor))===null||s===void 0||s.showAtMarker(t.marker),this._editor.focus()}}),!this._editor.getOption(83)){const s=e.statusBar.append(hr("div"));this.recentMarkerCodeActionsInfo&&(Yn.oc.makeKey(this.recentMarkerCodeActionsInfo.marker)===Yn.oc.makeKey(t.marker)?this.recentMarkerCodeActionsInfo.hasCodeActions||(s.textContent=we.kg("noQuickFixes","No quick fixes available")):this.recentMarkerCodeActionsInfo=void 0);const o=this.recentMarkerCodeActionsInfo&&!this.recentMarkerCodeActionsInfo.hasCodeActions?at.jG.None:i.add((0,Ot.EQ)(()=>s.textContent=we.kg("checkingForQuickFixes","Checking for quick fixes..."),200));s.textContent||(s.textContent=String.fromCharCode(160));const c=this.getCodeActions(t.marker);i.add((0,at.s)(()=>c.cancel())),c.then(m=>{if(o.dispose(),this.recentMarkerCodeActionsInfo={marker:t.marker,hasCodeActions:m.validActions.length>0},!this.recentMarkerCodeActionsInfo.hasCodeActions){m.dispose(),s.textContent=we.kg("noQuickFixes","No quick fixes available");return}s.style.display="none";let A=!1;i.add((0,at.s)(()=>{A||m.dispose()})),e.statusBar.addAction({label:we.kg("quick fixes","Quick Fix..."),commandId:wo.Id,run:U=>{A=!0;const W=er.get(this._editor),re=M.BK(U);e.hide(),W?.showCodeActions(Kg,m,{x:re.left+6,y:re.top+re.height+6,width:re.width,height:re.height})}})},Wi.dz)}}getCodeActions(e){return(0,Ot.SS)(t=>mn(this._languageFeaturesService.codeActionProvider,this._editor.getModel(),new St.Q(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),Kg,ks.ke.None,t))}};lu=Km([au(1,Am.A),au(2,Ho.Cr),au(3,Zi.u)],lu),(0,Ye.zy)((u,e)=>{const t=u.getColor(Ce.vwp);t&&e.addRule(`.monaco-hover .hover-contents a.code-link span { color: ${t}; }`);const i=u.getColor(Ce.FEE);i&&e.addRule(`.monaco-hover .hover-contents a.code-link span:hover { color: ${i}; }`)});var Gm=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},ue=function(u,e){return function(t,i){e(t,i,u)}};let r=class _C{constructor(e,t,i,s,o){this._editor=e,this._instantiationService=t,this._openerService=i,this._languageService=s,this._toUnhook=new at.Cm,this._isMouseDown=!1,this._hoverClicked=!1,this._contentWidget=null,this._glyphWidget=null,this._hookEvents(),this._didChangeConfigurationHandler=this._editor.onDidChangeConfiguration(c=>{c.hasChanged(55)&&(this._unhookEvents(),this._hookEvents())})}static get(e){return e.getContribution(_C.ID)}_hookEvents(){const e=()=>this._hideWidgets(),t=this._editor.getOption(55);this._isHoverEnabled=t.enabled,this._isHoverSticky=t.sticky,this._isHoverEnabled?(this._toUnhook.add(this._editor.onMouseDown(i=>this._onEditorMouseDown(i))),this._toUnhook.add(this._editor.onMouseUp(i=>this._onEditorMouseUp(i))),this._toUnhook.add(this._editor.onMouseMove(i=>this._onEditorMouseMove(i))),this._toUnhook.add(this._editor.onKeyDown(i=>this._onKeyDown(i)))):(this._toUnhook.add(this._editor.onMouseMove(i=>this._onEditorMouseMove(i))),this._toUnhook.add(this._editor.onKeyDown(i=>this._onKeyDown(i)))),this._toUnhook.add(this._editor.onMouseLeave(i=>this._onEditorMouseLeave(i))),this._toUnhook.add(this._editor.onDidChangeModel(e)),this._toUnhook.add(this._editor.onDidScrollChange(i=>this._onEditorScrollChanged(i)))}_unhookEvents(){this._toUnhook.clear()}_onEditorScrollChanged(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this._hideWidgets()}_onEditorMouseDown(e){this._isMouseDown=!0;const t=e.target;if(t.type===9&&t.detail===qa.ID){this._hoverClicked=!0;return}t.type===12&&t.detail===zl.ID||(t.type!==12&&(this._hoverClicked=!1),this._hideWidgets())}_onEditorMouseUp(e){this._isMouseDown=!1}_onEditorMouseLeave(e){var t;const i=e.event.browserEvent.relatedTarget;!((t=this._contentWidget)===null||t===void 0)&&t.containsNode(i)||this._hideWidgets()}_onEditorMouseMove(e){var t,i,s,o,c;const m=e.target;if(this._isMouseDown&&this._hoverClicked||this._isHoverSticky&&m.type===9&&m.detail===qa.ID||this._isHoverSticky&&!(!((i=(t=e.event.browserEvent.view)===null||t===void 0?void 0:t.getSelection())===null||i===void 0)&&i.isCollapsed)||!this._isHoverSticky&&m.type===9&&m.detail===qa.ID&&(!((s=this._contentWidget)===null||s===void 0)&&s.isColorPickerVisible())||this._isHoverSticky&&m.type===12&&m.detail===zl.ID)return;if(!this._isHoverEnabled){this._hideWidgets();return}if(this._getOrCreateContentWidget().maybeShowAt(e)){(o=this._glyphWidget)===null||o===void 0||o.hide();return}if(m.type===2&&m.position){(c=this._contentWidget)===null||c===void 0||c.hide(),this._glyphWidget||(this._glyphWidget=new zl(this._editor,this._languageService,this._openerService)),this._glyphWidget.startShowingAt(m.position.lineNumber);return}this._hideWidgets()}_onKeyDown(e){e.keyCode!==5&&e.keyCode!==6&&e.keyCode!==57&&e.keyCode!==4&&this._hideWidgets()}_hideWidgets(){var e,t,i;this._isMouseDown&&this._hoverClicked&&(!((e=this._contentWidget)===null||e===void 0)&&e.isColorPickerVisible())||(this._hoverClicked=!1,(t=this._glyphWidget)===null||t===void 0||t.hide(),(i=this._contentWidget)===null||i===void 0||i.hide())}_getOrCreateContentWidget(){return this._contentWidget||(this._contentWidget=this._instantiationService.createInstance(Fc,this._editor)),this._contentWidget}isColorPickerVisible(){var e;return((e=this._contentWidget)===null||e===void 0?void 0:e.isColorPickerVisible())||!1}showContentHover(e,t,i){this._getOrCreateContentWidget().startShowingAtRange(e,t,i)}dispose(){var e,t;this._unhookEvents(),this._toUnhook.dispose(),this._didChangeConfigurationHandler.dispose(),(e=this._glyphWidget)===null||e===void 0||e.dispose(),(t=this._contentWidget)===null||t===void 0||t.dispose()}};r.ID="editor.contrib.hover",r=Gm([ue(1,P._Y),ue(2,Ho.Cr),ue(3,Fs.L),ue(4,ct.fN)],r);class l extends Te.ks{constructor(){super({id:"editor.action.showHover",label:we.kg({key:"showHover",comment:["Label for action that will trigger the showing of a hover in the editor.","This allows for users to show the hover without using the mouse."]},"Show Hover"),alias:"Show Hover",precondition:void 0,kbOpts:{kbExpr:ze.R.editorTextFocus,primary:(0,zi.m5)(2089,2087),weight:100}})}run(e,t){if(!t.hasModel())return;const i=r.get(t);if(!i)return;const s=t.getPosition(),o=new St.Q(s.lineNumber,s.column,s.lineNumber,s.column),c=t.getOption(2)===2;i.showContentHover(o,1,c)}}class v extends Te.ks{constructor(){super({id:"editor.action.showDefinitionPreviewHover",label:we.kg({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})}run(e,t){const i=r.get(t);if(!i)return;const s=t.getPosition();if(!s)return;const o=new St.Q(s.lineNumber,s.column,s.lineNumber,s.column),c=qr.get(t);if(!c)return;c.startFindDefinitionFromCursor(s).then(()=>{i.showContentHover(o,1,!0)})}}(0,Te.HW)(r.ID,r),(0,Te.Fl)(l),(0,Te.Fl)(v),Bs.register(Ul),Bs.register(lu),(0,Ye.zy)((u,e)=>{const t=u.getColor(Ce.mH6);t&&e.addRule(`.monaco-editor .hoverHighlight { background-color: ${t}; }`);const i=u.getColor(Ce.WfR);i&&e.addRule(`.monaco-editor .monaco-hover { background-color: ${i}; }`);const s=u.getColor(Ce.oZ8);s&&(e.addRule(`.monaco-editor .monaco-hover { border: 1px solid ${s}; }`),e.addRule(`.monaco-editor .monaco-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${s.transparent(.5)}; }`),e.addRule(`.monaco-editor .monaco-hover hr { border-top: 1px solid ${s.transparent(.5)}; }`),e.addRule(`.monaco-editor .monaco-hover hr { border-bottom: 0px solid ${s.transparent(.5)}; }`));const o=u.getColor(Ce.vwp);o&&e.addRule(`.monaco-editor .monaco-hover a { color: ${o}; }`);const c=u.getColor(Ce.FEE);c&&e.addRule(`.monaco-editor .monaco-hover a:hover { color: ${c}; }`);const m=u.getColor(Ce.Xo2);m&&e.addRule(`.monaco-editor .monaco-hover { color: ${m}; }`);const A=u.getColor(Ce.rRi);A&&e.addRule(`.monaco-editor .monaco-hover .hover-row .actions { background-color: ${A}; }`);const U=u.getColor(Ce.S6W);U&&e.addRule(`.monaco-editor .monaco-hover code { background-color: ${U}; }`)});class V extends at.jG{constructor(e){super(),this._editor=e,this._register(e.onMouseDown(t=>this.onMouseDown(t)))}dispose(){super.dispose()}onMouseDown(e){const t=e.target;if(t.type!==6||!t.detail.injectedText||t.detail.injectedText.options.attachedData!==mc||!t.range)return;const i=this._editor.getContribution(r.ID);if(i&&!i.isColorPickerVisible()){const s=new St.Q(t.range.startLineNumber,t.range.startColumn+1,t.range.endLineNumber,t.range.endColumn+1);i.showContentHover(s,1,!1)}}}V.ID="editor.contrib.colorContribution",(0,Te.HW)(V.ID,V),Bs.register(Cl);var G=f(39587),ae=function(u,e,t,i){function s(o){return o instanceof t?o:new t(function(c){c(o)})}return new(t||(t=Promise))(function(o,c){function m(W){try{U(i.next(W))}catch(re){c(re)}}function A(W){try{U(i.throw(W))}catch(re){c(re)}}function U(W){W.done?o(W.value):s(W.value).then(m,A)}U((i=i.apply(u,e||[])).next())})};function me(u){return{asString:()=>ae(this,void 0,void 0,function*(){return u}),asFile:()=>{},value:typeof u=="string"?u:void 0}}function Ne(u,e,t){return{asString:()=>ae(this,void 0,void 0,function*(){return""}),asFile:()=>({name:u,uri:e,data:t}),value:void 0}}class Ve{constructor(){this._entries=new Map}get size(){return this._entries.size}has(e){return this._entries.has(this.toKey(e))}get(e){var t;return(t=this._entries.get(this.toKey(e)))===null||t===void 0?void 0:t[0]}append(e,t){const i=this._entries.get(e);i?i.push(t):this._entries.set(this.toKey(e),[t])}replace(e,t){this._entries.set(this.toKey(e),[t])}delete(e){this._entries.delete(this.toKey(e))}*entries(){for(const[e,t]of this._entries.entries())for(const i of t)yield[e,i]}values(){return Array.from(this._entries.values()).flat()}forEach(e){for(const[t,i]of this.entries())e(i,t)}toKey(e){return e.toLowerCase()}}var Ge=f(53720);const mt=function(){if(typeof crypto=="object"&&typeof crypto.randomUUID=="function")return crypto.randomUUID.bind(crypto);let u;typeof crypto=="object"&&typeof crypto.getRandomValues=="function"?u=crypto.getRandomValues.bind(crypto):u=function(i){for(let s=0;s<i.length;s++)i[s]=Math.floor(Math.random()*256);return i};const e=new Uint8Array(16),t=[];for(let i=0;i<256;i++)t.push(i.toString(16).padStart(2,"0"));return function(){u(e),e[6]=e[6]&15|64,e[8]=e[8]&63|128;let s=0,o="";return o+=t[e[s++]],o+=t[e[s++]],o+=t[e[s++]],o+=t[e[s++]],o+="-",o+=t[e[s++]],o+=t[e[s++]],o+="-",o+=t[e[s++]],o+=t[e[s++]],o+="-",o+=t[e[s++]],o+=t[e[s++]],o+="-",o+=t[e[s++]],o+=t[e[s++]],o+=t[e[s++]],o+=t[e[s++]],o+=t[e[s++]],o+=t[e[s++]],o}}(),ti={EDITORS:"CodeEditors",FILES:"CodeFiles"};function Si(u){var e;const t=[];if(u.dataTransfer&&u.dataTransfer.types.length>0){const i=u.dataTransfer.getData(ti.EDITORS);if(i)try{t.push(...(0,Ng.q)(i))}catch{}else try{const c=u.dataTransfer.getData(G.t.RESOURCES);t.push(...tn(c))}catch{}if(!((e=u.dataTransfer)===null||e===void 0)&&e.files)for(let c=0;c<u.dataTransfer.files.length;c++){const m=u.dataTransfer.files[c];if(m&&m.path)try{t.push({resource:vn.r.file(m.path),isExternal:!0,allowWorkspaceOpen:!0})}catch{}}const s=u.dataTransfer.getData(ti.FILES);if(s)try{const c=JSON.parse(s);for(const m of c)t.push({resource:vn.r.file(m),isExternal:!0,allowWorkspaceOpen:!0})}catch{}const o=So.O.as(On.DragAndDropContribution).getAll();for(const c of o){const m=u.dataTransfer.getData(c.dataFormatKey);if(m)try{t.push(...c.getEditorInputs(m))}catch{}}}return t}function tn(u){const e=[];if(u){const t=JSON.parse(u);for(const i of t)if(i.indexOf(":")>0){const{selection:s,uri:o}=(0,Ho.ew)(vn.r.parse(i));e.push({resource:o,options:{selection:s}})}}return e}class kn{constructor(){this._contributions=new Map}getAll(){return this._contributions.values()}}const On={DragAndDropContribution:"workbench.contributions.dragAndDrop"};So.O.add(On.DragAndDropContribution,new kn);var as=function(u,e,t,i){function s(o){return o instanceof t?o:new t(function(c){c(o)})}return new(t||(t=Promise))(function(o,c){function m(W){try{U(i.next(W))}catch(re){c(re)}}function A(W){try{U(i.throw(W))}catch(re){c(re)}}function U(W){W.done?o(W.value):s(W.value).then(m,A)}U((i=i.apply(u,e||[])).next())})};function qn(u){const e=new Ve;for(const t of u.items){const i=t.type;if(t.kind==="string"){const s=new Promise(o=>t.getAsString(o));e.append(i,me(s))}else if(t.kind==="file"){const s=t.getAsFile();s&&e.append(i,Pn(s))}}return e}function Pn(u){const e=u.path?vn.r.parse(u.path):void 0;return Ne(u.name,e,()=>as(this,void 0,void 0,function*(){return new Uint8Array(yield u.arrayBuffer())}))}const Qn=Object.freeze([ti.EDITORS,ti.FILES,G.t.RESOURCES]);function zo(u,e,t=!1){var i;if(e.dataTransfer&&(t||!u.has(Ge.K.uriList))){const s=Si(e).filter(o=>o.resource).map(o=>o.resource.toString());for(const o of(i=e.dataTransfer)===null||i===void 0?void 0:i.items){const c=o.getAsFile();c&&s.push(c.path?vn.r.file(c.path).toString():c.name)}s.length&&u.replace(Ge.K.uriList,me(na.create(s)))}for(const s of Qn)u.delete(s)}const na=Object.freeze({create:u=>(0,cn.dM)(u.map(e=>e.toString())).join(`\r `),parse:u=>u.split(`\r `).filter(e=>!e.startsWith("#"))});var xs=f(46441),jc=f(28130),Sn=f(23877),En=f(26851),to=f(78518);function tl(u,e=Pi.uF){return(0,to.No)(u,e)?u.charAt(0).toUpperCase()+u.slice(1):u}let Pd=Object.create(null);var il=f(64033),RC=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},AC=function(u,e){return function(t,i){e(t,i,u)}};const gk=Object.freeze({CURRENT_YEAR:!0,CURRENT_YEAR_SHORT:!0,CURRENT_MONTH:!0,CURRENT_DATE:!0,CURRENT_HOUR:!0,CURRENT_MINUTE:!0,CURRENT_SECOND:!0,CURRENT_DAY_NAME:!0,CURRENT_DAY_NAME_SHORT:!0,CURRENT_MONTH_NAME:!0,CURRENT_MONTH_NAME_SHORT:!0,CURRENT_SECONDS_UNIX:!0,SELECTION:!0,CLIPBOARD:!0,TM_SELECTED_TEXT:!0,TM_CURRENT_LINE:!0,TM_CURRENT_WORD:!0,TM_LINE_INDEX:!0,TM_LINE_NUMBER:!0,TM_FILENAME:!0,TM_FILENAME_BASE:!0,TM_DIRECTORY:!0,TM_FILEPATH:!0,CURSOR_INDEX:!0,CURSOR_NUMBER:!0,RELATIVE_FILEPATH:!0,BLOCK_COMMENT_START:!0,BLOCK_COMMENT_END:!0,LINE_COMMENT:!0,WORKSPACE_NAME:!0,WORKSPACE_FOLDER:!0,RANDOM:!0,RANDOM_HEX:!0,UUID:!0});class F_{constructor(e){this._delegates=e}resolve(e){for(const t of this._delegates){const i=t.resolve(e);if(i!==void 0)return i}}}class B_{constructor(e,t,i,s){this._model=e,this._selection=t,this._selectionIdx=i,this._overtypingCapturer=s}resolve(e){const{name:t}=e;if(t==="SELECTION"||t==="TM_SELECTED_TEXT"){let i=this._model.getValueInRange(this._selection)||void 0,s=this._selection.startLineNumber!==this._selection.endLineNumber;if(!i&&this._overtypingCapturer){const o=this._overtypingCapturer.getLastOvertypedInfo(this._selectionIdx);o&&(i=o.value,s=o.multiline)}if(i&&s&&e.snippet){const o=this._model.getLineContent(this._selection.startLineNumber),c=(0,xi.UU)(o,0,this._selection.startColumn-1);let m=c;e.snippet.walk(U=>U===e?!1:(U instanceof po&&(m=(0,xi.UU)((0,xi.uz)(U.value).pop())),!0));const A=(0,xi.Qp)(m,c);i=i.replace(/(\r\n|\r|\n)(.*)/g,(U,W,re)=>`${W}${m.substr(A)}${re}`)}return i}else{if(t==="TM_CURRENT_LINE")return this._model.getLineContent(this._selection.positionLineNumber);if(t==="TM_CURRENT_WORD"){const i=this._model.getWordAtPosition({lineNumber:this._selection.positionLineNumber,column:this._selection.positionColumn});return i&&i.word||void 0}else{if(t==="TM_LINE_INDEX")return String(this._selection.positionLineNumber-1);if(t==="TM_LINE_NUMBER")return String(this._selection.positionLineNumber);if(t==="CURSOR_INDEX")return String(this._selectionIdx);if(t==="CURSOR_NUMBER")return String(this._selectionIdx+1)}}}}class W_{constructor(e,t){this._labelService=e,this._model=t}resolve(e){const{name:t}=e;if(t==="TM_FILENAME")return il.P8(this._model.uri.fsPath);if(t==="TM_FILENAME_BASE"){const i=il.P8(this._model.uri.fsPath),s=i.lastIndexOf(".");return s<=0?i:i.slice(0,s)}else{if(t==="TM_DIRECTORY")return il.pD(this._model.uri.fsPath)==="."?"":this._labelService.getUriLabel((0,hn.pD)(this._model.uri));if(t==="TM_FILEPATH")return this._labelService.getUriLabel(this._model.uri);if(t==="RELATIVE_FILEPATH")return this._labelService.getUriLabel(this._model.uri,{relative:!0,noPrefix:!0})}}}class V_{constructor(e,t,i,s){this._readClipboardText=e,this._selectionIdx=t,this._selectionCount=i,this._spread=s}resolve(e){if(e.name!=="CLIPBOARD")return;const t=this._readClipboardText();if(t){if(this._spread){const i=t.split(/\r\n|\n|\r/).filter(s=>!(0,xi.AV)(s));if(i.length===this._selectionCount)return i[this._selectionIdx]}return t}}}let $g=class{constructor(e,t,i){this._model=e,this._selection=t,this._languageConfigurationService=i}resolve(e){const{name:t}=e,i=this._model.getLanguageIdAtPosition(this._selection.selectionStartLineNumber,this._selection.selectionStartColumn),s=this._languageConfigurationService.getLanguageConfiguration(i).comments;if(s){if(t==="LINE_COMMENT")return s.lineCommentToken||void 0;if(t==="BLOCK_COMMENT_START")return s.blockCommentStartToken||void 0;if(t==="BLOCK_COMMENT_END")return s.blockCommentEndToken||void 0}}};$g=RC([AC(2,ao.JZ)],$g);class sa{constructor(){this._date=new Date}resolve(e){const{name:t}=e;if(t==="CURRENT_YEAR")return String(this._date.getFullYear());if(t==="CURRENT_YEAR_SHORT")return String(this._date.getFullYear()).slice(-2);if(t==="CURRENT_MONTH")return String(this._date.getMonth().valueOf()+1).padStart(2,"0");if(t==="CURRENT_DATE")return String(this._date.getDate().valueOf()).padStart(2,"0");if(t==="CURRENT_HOUR")return String(this._date.getHours().valueOf()).padStart(2,"0");if(t==="CURRENT_MINUTE")return String(this._date.getMinutes().valueOf()).padStart(2,"0");if(t==="CURRENT_SECOND")return String(this._date.getSeconds().valueOf()).padStart(2,"0");if(t==="CURRENT_DAY_NAME")return sa.dayNames[this._date.getDay()];if(t==="CURRENT_DAY_NAME_SHORT")return sa.dayNamesShort[this._date.getDay()];if(t==="CURRENT_MONTH_NAME")return sa.monthNames[this._date.getMonth()];if(t==="CURRENT_MONTH_NAME_SHORT")return sa.monthNamesShort[this._date.getMonth()];if(t==="CURRENT_SECONDS_UNIX")return String(Math.floor(this._date.getTime()/1e3))}}sa.dayNames=[we.kg("Sunday","Sunday"),we.kg("Monday","Monday"),we.kg("Tuesday","Tuesday"),we.kg("Wednesday","Wednesday"),we.kg("Thursday","Thursday"),we.kg("Friday","Friday"),we.kg("Saturday","Saturday")],sa.dayNamesShort=[we.kg("SundayShort","Sun"),we.kg("MondayShort","Mon"),we.kg("TuesdayShort","Tue"),we.kg("WednesdayShort","Wed"),we.kg("ThursdayShort","Thu"),we.kg("FridayShort","Fri"),we.kg("SaturdayShort","Sat")],sa.monthNames=[we.kg("January","January"),we.kg("February","February"),we.kg("March","March"),we.kg("April","April"),we.kg("May","May"),we.kg("June","June"),we.kg("July","July"),we.kg("August","August"),we.kg("September","September"),we.kg("October","October"),we.kg("November","November"),we.kg("December","December")],sa.monthNamesShort=[we.kg("JanuaryShort","Jan"),we.kg("FebruaryShort","Feb"),we.kg("MarchShort","Mar"),we.kg("AprilShort","Apr"),we.kg("MayShort","May"),we.kg("JuneShort","Jun"),we.kg("JulyShort","Jul"),we.kg("AugustShort","Aug"),we.kg("SeptemberShort","Sep"),we.kg("OctoberShort","Oct"),we.kg("NovemberShort","Nov"),we.kg("DecemberShort","Dec")];class H_{constructor(e){this._workspaceService=e}resolve(e){if(!this._workspaceService)return;const t=(0,En.Q_)(this._workspaceService.getWorkspace());if(t){if(e.name==="WORKSPACE_NAME")return this._resolveWorkspaceName(t);if(e.name==="WORKSPACE_FOLDER")return this._resoveWorkspacePath(t)}}_resolveWorkspaceName(e){if((0,En.jB)(e))return il.P8(e.uri.path);let t=il.P8(e.configPath.path);return t.endsWith(En.kF)&&(t=t.substr(0,t.length-En.kF.length-1)),t}_resoveWorkspacePath(e){if((0,En.jB)(e))return tl(e.uri.fsPath);const t=il.P8(e.configPath.path);let i=e.configPath.fsPath;return i.endsWith(t)&&(i=i.substr(0,i.length-t.length-1)),i?tl(i):"/"}}class z_{resolve(e){const{name:t}=e;if(t==="RANDOM")return Math.random().toString().slice(-6);if(t==="RANDOM_HEX")return Math.random().toString(16).slice(-6);if(t==="UUID")return mt()}}var OC=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},PC=function(u,e){return function(t,i){e(t,i,u)}};class Er{constructor(e,t,i){this._editor=e,this._snippet=t,this._snippetLineLeadingWhitespace=i,this._offset=-1,this._nestingLevel=1,this._placeholderGroups=(0,cn.$z)(t.placeholders,cr.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(t=>{for(const i of this._snippet.placeholders){const s=this._snippet.offset(i),o=this._snippet.fullLen(i),c=St.Q.fromPositions(e.getPositionAt(this._offset+s),e.getPositionAt(this._offset+s+o)),m=i.isFinalTabstop?Er._decor.inactiveFinal:Er._decor.inactive,A=t.addDecoration(c,m);this._placeholderDecorations.set(i,A)}})}move(e){if(!this._editor.hasModel())return[];if(this._initDecorations(),this._placeholderGroupsIdx>=0){const s=[];for(const o of this._placeholderGroups[this._placeholderGroupsIdx])if(o.transform){const c=this._placeholderDecorations.get(o),m=this._editor.getModel().getDecorationRange(c),A=this._editor.getModel().getValueInRange(m),U=o.transform.resolve(A).split(/\r\n|\r|\n/);for(let W=1;W<U.length;W++)U[W]=this._editor.getModel().normalizeIndentation(this._snippetLineLeadingWhitespace+U[W]);s.push(Sn.k.replace(m,U.join(this._editor.getModel().getEOL())))}s.length>0&&this._editor.executeEdits("snippet.placeholderTransform",s)}let t=!1;e===!0&&this._placeholderGroupsIdx<this._placeholderGroups.length-1?(this._placeholderGroupsIdx+=1,t=!0):e===!1&&this._placeholderGroupsIdx>0&&(this._placeholderGroupsIdx-=1,t=!0);const i=this._editor.getModel().changeDecorations(s=>{const o=new Set,c=[];for(const m of this._placeholderGroups[this._placeholderGroupsIdx]){const A=this._placeholderDecorations.get(m),U=this._editor.getModel().getDecorationRange(A);c.push(new ki.L(U.startLineNumber,U.startColumn,U.endLineNumber,U.endColumn)),t=t&&this._hasPlaceholderBeenCollapsed(m),s.changeDecorationOptions(A,m.isFinalTabstop?Er._decor.activeFinal:Er._decor.active),o.add(m);for(const W of this._snippet.enclosingPlaceholders(m)){const re=this._placeholderDecorations.get(W);s.changeDecorationOptions(re,W.isFinalTabstop?Er._decor.activeFinal:Er._decor.active),o.add(W)}}for(const[m,A]of this._placeholderDecorations)o.has(m)||s.changeDecorationOptions(A,m.isFinalTabstop?Er._decor.inactiveFinal:Er._decor.inactive);return c});return t?this.move(e):i??[]}_hasPlaceholderBeenCollapsed(e){let t=e;for(;t;){if(t instanceof cr){const i=this._placeholderDecorations.get(t);if(this._editor.getModel().getDecorationRange(i).isEmpty()&&t.toString().length>0)return!0}t=t.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(){return this._snippet.placeholders.length===0||this._snippet.placeholders.length===1&&this._snippet.placeholders[0].isFinalTabstop}computePossibleSelections(){const e=new Map;for(const t of this._placeholderGroups){let i;for(const s of t){if(s.isFinalTabstop)break;i||(i=[],e.set(s.index,i));const o=this._placeholderDecorations.get(s),c=this._editor.getModel().getDecorationRange(o);if(!c){e.delete(s.index);break}i.push(c)}}return e}get activeChoice(){if(!this._placeholderDecorations)return;const e=this._placeholderGroups[this._placeholderGroupsIdx][0];if(!e?.choice)return;const t=this._placeholderDecorations.get(e);if(!t)return;const i=this._editor.getModel().getDecorationRange(t);if(i)return{range:i,choice:e.choice}}get hasChoice(){let e=!1;return this._snippet.walk(t=>(e=t instanceof Fl,!e)),e}merge(e){const t=this._editor.getModel();this._nestingLevel*=10,this._editor.changeDecorations(i=>{for(const s of this._placeholderGroups[this._placeholderGroupsIdx]){const o=e.shift();console.assert(o._offset!==-1),console.assert(!o._placeholderDecorations);const c=o._snippet.placeholderInfo.last.index;for(const A of o._snippet.placeholderInfo.all)A.isFinalTabstop?A.index=s.index+(c+1)/this._nestingLevel:A.index=s.index+A.index/this._nestingLevel;this._snippet.replace(s,o._snippet.children);const m=this._placeholderDecorations.get(s);i.removeDecoration(m),this._placeholderDecorations.delete(s);for(const A of o._snippet.placeholders){const U=o._snippet.offset(A),W=o._snippet.fullLen(A),re=St.Q.fromPositions(t.getPositionAt(o._offset+U),t.getPositionAt(o._offset+U+W)),Se=i.addDecoration(re,Er._decor.inactive);this._placeholderDecorations.set(A,Se)}}this._placeholderGroups=(0,cn.$z)(this._snippet.placeholders,cr.compareByIndex)})}}Er._decor={active:sn.kI.register({description:"snippet-placeholder-1",stickiness:0,className:"snippet-placeholder"}),inactive:sn.kI.register({description:"snippet-placeholder-2",stickiness:1,className:"snippet-placeholder"}),activeFinal:sn.kI.register({description:"snippet-placeholder-3",stickiness:1,className:"finish-snippet-placeholder"}),inactiveFinal:sn.kI.register({description:"snippet-placeholder-4",stickiness:1,className:"finish-snippet-placeholder"})};const U_={overwriteBefore:0,overwriteAfter:0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};let Gg=class cl{constructor(e,t,i=U_,s){this._editor=e,this._template=t,this._options=i,this._languageConfigurationService=s,this._templateMerges=[],this._snippets=[]}static adjustWhitespace(e,t,i,s,o){const c=e.getLineContent(t.lineNumber),m=(0,xi.UU)(c,0,t.column-1);let A;return i.walk(U=>{if(!(U instanceof po)||U.parent instanceof Fl)return!0;const W=U.value.split(/\r\n|\r|\n/);if(s){const Se=i.offset(U);if(Se===0)W[0]=e.normalizeIndentation(W[0]);else{A=A??i.toString();const Be=A.charCodeAt(Se-1);(Be===10||Be===13)&&(W[0]=e.normalizeIndentation(m+W[0]))}for(let Be=1;Be<W.length;Be++)W[Be]=e.normalizeIndentation(m+W[Be])}const re=W.join(e.getEOL());return re!==U.value&&(U.parent.replace(U,[new po(re)]),A=void 0),!0}),m}static adjustSelection(e,t,i,s){if(i!==0||s!==0){const{positionLineNumber:o,positionColumn:c}=t,m=c-i,A=c+s,U=e.validateRange({startLineNumber:o,startColumn:m,endLineNumber:o,endColumn:A});t=ki.L.createWithDirection(U.startLineNumber,U.startColumn,U.endLineNumber,U.endColumn,t.getDirection())}return t}static createEditsAndSnippetsFromSelections(e,t,i,s,o,c,m,A,U){const W=[],re=[];if(!e.hasModel())return{edits:W,snippets:re};const Se=e.getModel(),Be=e.invokeWithinContext(Ui=>Ui.get(En.VR)),Qe=e.invokeWithinContext(Ui=>new W_(Ui.get(Vn.L),Se)),tt=()=>m,vt=Se.getValueInRange(cl.adjustSelection(Se,e.getSelection(),i,0)),Ht=Se.getValueInRange(cl.adjustSelection(Se,e.getSelection(),0,s)),ci=Se.getLineFirstNonWhitespaceColumn(e.getSelection().positionLineNumber),gi=e.getSelections().map((Ui,dn)=>({selection:Ui,idx:dn})).sort((Ui,dn)=>St.Q.compareRangesUsingStarts(Ui.selection,dn.selection));for(const{selection:Ui,idx:dn}of gi){let hs=cl.adjustSelection(Se,Ui,i,0),An=cl.adjustSelection(Se,Ui,0,s);vt!==Se.getValueInRange(hs)&&(hs=Ui),Ht!==Se.getValueInRange(An)&&(An=Ui);const vo=Ui.setStartPosition(hs.startLineNumber,hs.startColumn).setEndPosition(An.endLineNumber,An.endColumn),Po=new ta().parse(t,!0,o),Uo=vo.getStartPosition(),Ea=cl.adjustWhitespace(Se,Uo,Po,c||dn>0&&ci!==Se.getLineFirstNonWhitespaceColumn(Ui.positionLineNumber),!0);Po.resolveVariables(new F_([Qe,new V_(tt,dn,gi.length,e.getOption(73)==="spread"),new B_(Se,Ui,dn,A),new $g(Se,Ui,U),new sa,new H_(Be),new z_])),W[dn]=Sn.k.replace(vo,Po.toString()),W[dn].identifier={major:dn,minor:0},W[dn]._isTracked=!0,re[dn]=new Er(e,Po,Ea)}return{edits:W,snippets:re}}static createEditsAndSnippetsFromEdits(e,t,i,s,o,c,m){if(!e.hasModel()||t.length===0)return{edits:[],snippets:[]};const A=[],U=e.getModel(),W=new ta,re=new Wl,Se=new F_([e.invokeWithinContext(Qe=>new W_(Qe.get(Vn.L),U)),new V_(()=>o,0,e.getSelections().length,e.getOption(73)==="spread"),new B_(U,e.getSelection(),0,c),new $g(U,e.getSelection(),m),new sa,new H_(e.invokeWithinContext(Qe=>Qe.get(En.VR))),new z_]);t=t.sort((Qe,tt)=>St.Q.compareRangesUsingStarts(Qe.range,tt.range));let Be=0;for(let Qe=0;Qe<t.length;Qe++){const{range:tt,template:vt}=t[Qe];if(Qe>0){const Ui=t[Qe-1].range,dn=St.Q.fromPositions(Ui.getEndPosition(),tt.getStartPosition()),hs=new po(U.getValueInRange(dn));re.appendChild(hs),Be+=hs.value.length}W.parseFragment(vt,re),re.resolveVariables(Se);const Ht=re.toString(),ci=Ht.slice(Be);Be=Ht.length;const gi=Sn.k.replace(tt,ci);gi.identifier={major:Qe,minor:0},gi._isTracked=!0,A.push(gi)}return W.ensureFinalTabstop(re,i,!0),{edits:A,snippets:[new Er(e,re,"")]}}dispose(){(0,at.AS)(this._snippets)}_logInfo(){return`template="${this._template}", merged_templates="${this._templateMerges.join(" -> ")}"`}insert(){if(!this._editor.hasModel())return;const{edits:e,snippets:t}=typeof this._template=="string"?cl.createEditsAndSnippetsFromSelections(this._editor,this._template,this._options.overwriteBefore,this._options.overwriteAfter,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService):cl.createEditsAndSnippetsFromEdits(this._editor,this._template,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService);this._snippets=t,this._editor.executeEdits("snippet",e,i=>{const s=i.filter(o=>!!o.identifier);for(let o=0;o<t.length;o++)t[o].initialize(s[o].textChange);return this._snippets[0].hasPlaceholder?this._move(!0):s.map(o=>ki.L.fromPositions(o.range.getEndPosition()))}),this._editor.revealRange(this._editor.getSelections()[0])}merge(e,t=U_){if(!this._editor.hasModel())return;this._templateMerges.push([this._snippets[0]._nestingLevel,this._snippets[0]._placeholderGroupsIdx,e]);const{edits:i,snippets:s}=cl.createEditsAndSnippetsFromSelections(this._editor,e,t.overwriteBefore,t.overwriteAfter,!0,t.adjustWhitespace,t.clipboardText,t.overtypingCapturer,this._languageConfigurationService);this._editor.executeEdits("snippet",i,o=>{const c=o.filter(A=>!!A.identifier);for(let A=0;A<s.length;A++)s[A].initialize(c[A].textChange);const m=s[0].isTrivialSnippet;if(!m){for(const A of this._snippets)A.merge(s);console.assert(s.length===0)}return this._snippets[0].hasPlaceholder&&!m?this._move(void 0):c.map(A=>ki.L.fromPositions(A.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 t=[];for(const i of this._snippets){const s=i.move(e);t.push(...s)}return t}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 t=new Map;for(const i of this._snippets){const s=i.computePossibleSelections();if(t.size===0)for(const[o,c]of s){c.sort(St.Q.compareRangesUsingStarts);for(const m of e)if(c[0].containsRange(m)){t.set(o,[]);break}}if(t.size===0)return!1;t.forEach((o,c)=>{o.push(...s.get(c))})}e.sort(St.Q.compareRangesUsingStarts);for(const[i,s]of t){if(s.length!==e.length){t.delete(i);continue}s.sort(St.Q.compareRangesUsingStarts);for(let o=0;o<s.length;o++)if(!s[o].containsRange(e[o])){t.delete(i);continue}}return t.size>0}};Gg=OC([PC(3,ao.JZ)],Gg);var FC=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},Qg=function(u,e){return function(t,i){e(t,i,u)}};const Zg={overwriteBefore:0,overwriteAfter:0,undoStopBefore:!0,undoStopAfter:!0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};let io=class ng{constructor(e,t,i,s,o){this._editor=e,this._logService=t,this._languageFeaturesService=i,this._languageConfigurationService=o,this._snippetListener=new at.Cm,this._modelVersionId=-1,this._inSnippet=ng.InSnippetMode.bindTo(s),this._hasNextTabstop=ng.HasNextTabstop.bindTo(s),this._hasPrevTabstop=ng.HasPrevTabstop.bindTo(s)}static get(e){return e.getContribution(ng.ID)}dispose(){var e;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),(e=this._session)===null||e===void 0||e.dispose(),this._snippetListener.dispose()}apply(e,t){try{this._doInsert(e,typeof t>"u"?Zg:Object.assign(Object.assign({},Zg),t))}catch(i){this.cancel(),this._logService.error(i),this._logService.error("snippet_error"),this._logService.error("insert_edits=",e),this._logService.error("existing_template=",this._session?this._session._logInfo():"<no_session>")}}insert(e,t){try{this._doInsert(e,typeof t>"u"?Zg:Object.assign(Object.assign({},Zg),t))}catch(i){this.cancel(),this._logService.error(i),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,t){var i;if(this._editor.hasModel()){if(this._snippetListener.clear(),t.undoStopBefore&&this._editor.getModel().pushStackElement(),this._session&&typeof e!="string"&&this.cancel(),this._session?((0,pi.j)(typeof e=="string"),this._session.merge(e,t)):(this._modelVersionId=this._editor.getModel().getAlternativeVersionId(),this._session=new Gg(this._editor,e,t,this._languageConfigurationService),this._session.insert()),t.undoStopAfter&&this._editor.getModel().pushStackElement(),!((i=this._session)===null||i===void 0)&&i.hasChoice){this._choiceCompletionItemProvider={provideCompletionItems:(o,c)=>{if(!this._session||o!==this._editor.getModel()||!bi.y.equals(this._editor.getPosition(),c))return;const{activeChoice:m}=this._session;if(!m||m.choice.options.length===0)return;const A=o.getValueInRange(m.range),U=!!m.choice.options.find(re=>re.value===A),W=[];for(let re=0;re<m.choice.options.length;re++){const Se=m.choice.options[re];W.push({kind:13,label:Se.value,insertText:Se.value,sortText:"a".repeat(re+1),range:m.range,filterText:U?`${A}_${Se.value}`:void 0,command:{id:"jumpToNextSnippetPlaceholder",title:(0,we.kg)("next","Go to next placeholder...")}})}return{suggestions:W}}};const s=this._languageFeaturesService.completionProvider.register({language:this._editor.getModel().getLanguageId(),pattern:this._editor.getModel().uri.fsPath,scheme:this._editor.getModel().uri.scheme},this._choiceCompletionItemProvider);this._snippetListener.add(s)}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(){if(!this._session||!this._editor.hasModel()){this._currentChoice=void 0;return}const{activeChoice:e}=this._session;if(!e||!this._choiceCompletionItemProvider){this._currentChoice=void 0;return}this._currentChoice!==e.choice&&(this._currentChoice=e.choice,queueMicrotask(()=>{ym(this._editor,this._choiceCompletionItemProvider)}))}finish(){for(;this._inSnippet.get();)this.next()}cancel(e=!1){var t;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),this._snippetListener.clear(),this._currentChoice=void 0,(t=this._session)===null||t===void 0||t.dispose(),this._session=void 0,this._modelVersionId=-1,e&&this._editor.setSelections([this._editor.getSelection()])}prev(){this._session&&this._session.prev(),this._updateState()}next(){this._session&&this._session.next(),this._updateState()}isInSnippet(){return!!this._inSnippet.get()}};io.ID="snippetController2",io.InSnippetMode=new ct.N1("inSnippetMode",!1,(0,we.kg)("inSnippetMode","Whether the editor in current in snippet mode")),io.HasNextTabstop=new ct.N1("hasNextTabstop",!1,(0,we.kg)("hasNextTabstop","Whether there is a next tab stop when in snippet mode")),io.HasPrevTabstop=new ct.N1("hasPrevTabstop",!1,(0,we.kg)("hasPrevTabstop","Whether there is a previous tab stop when in snippet mode")),io=FC([Qg(1,xs.rr),Qg(2,Zi.u),Qg(3,ct.fN),Qg(4,ao.JZ)],io),(0,Te.HW)(io.ID,io);const Yg=Te.DX.bindToContribution(io.get);(0,Te.E_)(new Yg({id:"jumpToNextSnippetPlaceholder",precondition:ct.M$.and(io.InSnippetMode,io.HasNextTabstop),handler:u=>u.next(),kbOpts:{weight:100+30,kbExpr:ze.R.editorTextFocus,primary:2}})),(0,Te.E_)(new Yg({id:"jumpToPrevSnippetPlaceholder",precondition:ct.M$.and(io.InSnippetMode,io.HasPrevTabstop),handler:u=>u.prev(),kbOpts:{weight:100+30,kbExpr:ze.R.editorTextFocus,primary:1026}})),(0,Te.E_)(new Yg({id:"leaveSnippet",precondition:io.InSnippetMode,handler:u=>u.cancel(!0),kbOpts:{weight:100+30,kbExpr:ze.R.editorTextFocus,primary:9,secondary:[1033]}})),(0,Te.E_)(new Yg({id:"acceptSnippet",precondition:io.InSnippetMode,handler:u=>u.finish()}));function j_(u,e,t){const i=io.get(u);return i?(u.focus(),i.apply(t.map(s=>({range:ki.L.liftSelection(s),template:e}))),i.isInSnippet()):!1}var BC=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},Xg=function(u,e){return function(t,i){e(t,i,u)}},K_=function(u,e,t,i){function s(o){return o instanceof t?o:new t(function(c){c(o)})}return new(t||(t=Promise))(function(o,c){function m(W){try{U(i.next(W))}catch(re){c(re)}}function A(W){try{U(i.throw(W))}catch(re){c(re)}}function U(W){W.done?o(W.value):s(W.value).then(m,A)}U((i=i.apply(u,e||[])).next())})};const Qm="application/vnd.code.copyMetadata";let du=class extends at.jG{constructor(e,t,i,s,o){super(),this._bulkEditService=t,this._clipboardService=i,this._configurationService=s,this._languageFeaturesService=o,this._editor=e;const c=e.getContainerDomNode();this._register((0,M.ko)(c,"copy",m=>this.handleCopy(m))),this._register((0,M.ko)(c,"cut",m=>this.handleCopy(m))),this._register((0,M.ko)(c,"paste",m=>this.handlePaste(m),!0))}arePasteActionsEnabled(e){return this._configurationService.getValue("editor.experimental.pasteActions.enabled",{resource:e.uri})}handleCopy(e){var t;if(!e.clipboardData||!this._editor.hasTextFocus())return;const i=this._editor.getModel(),s=this._editor.getSelections();if(!i||!s?.length||!this.arePasteActionsEnabled(i))return;const o=[...s],c=s[0],m=c.isEmpty();if(m){if(!this._editor.getOption(33))return;o[0]=new St.Q(c.startLineNumber,0,c.startLineNumber,i.getLineLength(c.startLineNumber))}const A=this._languageFeaturesService.documentPasteEditProvider.ordered(i).filter(Se=>!!Se.prepareDocumentPaste);if(!A.length){this.setCopyMetadata(e.clipboardData,{wasFromEmptySelection:m});return}const U=qn(e.clipboardData),W=mt();this.setCopyMetadata(e.clipboardData,{id:W,wasFromEmptySelection:m});const re=(0,Ot.SS)(Se=>K_(this,void 0,void 0,function*(){const Be=yield Promise.all(A.map(Qe=>Qe.prepareDocumentPaste(i,o,U,Se)));for(const Qe of Be)Qe?.forEach((tt,vt)=>{U.replace(vt,tt)});return U}));(t=this._currentClipboardItem)===null||t===void 0||t.dataTransferPromise.cancel(),this._currentClipboardItem={handle:W,dataTransferPromise:re}}setCopyMetadata(e,t){e.setData(Qm,JSON.stringify(t))}handlePaste(e){var t,i,s;return K_(this,void 0,void 0,function*(){if(!e.clipboardData||!this._editor.hasTextFocus())return;const o=this._editor.getSelections();if(!o?.length||!this._editor.hasModel())return;const c=this._editor.getModel();if(!this.arePasteActionsEnabled(c))return;let m;const A=(t=e.clipboardData)===null||t===void 0?void 0:t.getData(Qm);A&&typeof A=="string"&&(m=JSON.parse(A));const U=this._languageFeaturesService.documentPasteEditProvider.ordered(c);if(!U.length)return;e.preventDefault(),e.stopImmediatePropagation();const W=c.getVersionId(),re=new Gn.gI(this._editor,3);try{const Se=qn(e.clipboardData);if(m?.id&&((i=this._currentClipboardItem)===null||i===void 0?void 0:i.handle)===m.id&&(yield this._currentClipboardItem.dataTransferPromise).forEach((vt,Ht)=>{Se.replace(Ht,vt)}),!Se.has(Ge.K.uriList)){const tt=yield this._clipboardService.readResources();tt.length&&Se.append(Ge.K.uriList,me(na.create(tt)))}Se.delete(Qm);for(const tt of U){if(!tt.pasteMimeTypes.some(Ht=>Ht.toLowerCase()===G.t.FILES.toLowerCase()?[...Se.values()].some(ci=>ci.asFile()):Se.has(Ht)))continue;const vt=yield tt.provideDocumentPasteEdits(c,o,Se,re.token);if(W!==c.getVersionId())return;if(vt){j_(this._editor,typeof vt.insertText=="string"?ta.escape(vt.insertText):vt.insertText.snippet,o),vt.additionalEdit&&(yield this._bulkEditService.apply(os.jN.convert(vt.additionalEdit),{editor:this._editor}));return}}const Be=(s=Se.get(Ge.K.text))!==null&&s!==void 0?s:Se.get("text");if(!Be)return;const Qe=yield Be.asString();if(W!==c.getVersionId())return;this._editor.trigger("keyboard","paste",{text:Qe,pasteOnNewLine:m?.wasFromEmptySelection,multicursorText:null})}finally{re.dispose()}})}};du.ID="editor.contrib.copyPasteActionController",du=BC([Xg(1,os.nu),Xg(2,Oi.h),Xg(3,de.pG),Xg(4,Zi.u)],du),(0,Te.HW)(du.ID,du),So.O.as(Rr.Fd.Configuration).registerConfiguration(Object.assign(Object.assign({},ua.JJ),{properties:{"editor.experimental.pasteActions.enabled":{type:"boolean",scope:5,description:we.kg("pasteActions","Enable/disable running edits from extensions on paste."),default:!1}}}));class Gl{constructor(e,t,i){this.languageConfigurationService=i,this._selection=e,this._insertSpace=t,this._usedEndToken=null}static _haystackHasNeedleAtOffset(e,t,i){if(i<0)return!1;const s=t.length,o=e.length;if(i+s>o)return!1;for(let c=0;c<s;c++){const m=e.charCodeAt(i+c),A=t.charCodeAt(c);if(m!==A&&!(m>=65&&m<=90&&m+32===A)&&!(A>=65&&A<=90&&A+32===m))return!1}return!0}_createOperationsForBlockComment(e,t,i,s,o,c){const m=e.startLineNumber,A=e.startColumn,U=e.endLineNumber,W=e.endColumn,re=o.getLineContent(m),Se=o.getLineContent(U);let Be=re.lastIndexOf(t,A-1+t.length),Qe=Se.indexOf(i,W-1-i.length);if(Be!==-1&&Qe!==-1)if(m===U)re.substring(Be+t.length,Qe).indexOf(i)>=0&&(Be=-1,Qe=-1);else{const vt=re.substring(Be+t.length),Ht=Se.substring(0,Qe);(vt.indexOf(i)>=0||Ht.indexOf(i)>=0)&&(Be=-1,Qe=-1)}let tt;Be!==-1&&Qe!==-1?(s&&Be+t.length<re.length&&re.charCodeAt(Be+t.length)===32&&(t=t+" "),s&&Qe>0&&Se.charCodeAt(Qe-1)===32&&(i=" "+i,Qe-=1),tt=Gl._createRemoveBlockCommentOperations(new St.Q(m,Be+t.length+1,U,Qe+1),t,i)):(tt=Gl._createAddBlockCommentOperations(e,t,i,this._insertSpace),this._usedEndToken=tt.length===1?i:null);for(const vt of tt)c.addTrackedEditOperation(vt.range,vt.text)}static _createRemoveBlockCommentOperations(e,t,i){const s=[];return St.Q.isEmpty(e)?s.push(Sn.k.delete(new St.Q(e.startLineNumber,e.startColumn-t.length,e.endLineNumber,e.endColumn+i.length))):(s.push(Sn.k.delete(new St.Q(e.startLineNumber,e.startColumn-t.length,e.startLineNumber,e.startColumn))),s.push(Sn.k.delete(new St.Q(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn+i.length)))),s}static _createAddBlockCommentOperations(e,t,i,s){const o=[];return St.Q.isEmpty(e)?o.push(Sn.k.replace(new St.Q(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),t+" "+i)):(o.push(Sn.k.insert(new bi.y(e.startLineNumber,e.startColumn),t+(s?" ":""))),o.push(Sn.k.insert(new bi.y(e.endLineNumber,e.endColumn),(s?" ":"")+i))),o}getEditOperations(e,t){const i=this._selection.startLineNumber,s=this._selection.startColumn;e.tokenization.tokenizeIfCheap(i);const o=e.getLanguageIdAtPosition(i,s),c=this.languageConfigurationService.getLanguageConfiguration(o).comments;!c||!c.blockCommentStartToken||!c.blockCommentEndToken||this._createOperationsForBlockComment(this._selection,c.blockCommentStartToken,c.blockCommentEndToken,this._insertSpace,e,t)}computeCursorState(e,t){const i=t.getInverseEditOperations();if(i.length===2){const s=i[0],o=i[1];return new ki.L(s.range.endLineNumber,s.range.endColumn,o.range.startLineNumber,o.range.startColumn)}else{const s=i[0].range,o=this._usedEndToken?-this._usedEndToken.length-1:0;return new ki.L(s.endLineNumber,s.endColumn+o,s.endLineNumber,s.endColumn+o)}}}class nl{constructor(e,t,i,s,o,c,m){this.languageConfigurationService=e,this._selection=t,this._tabSize=i,this._type=s,this._insertSpace=o,this._selectionId=null,this._deltaColumn=0,this._moveEndPositionDown=!1,this._ignoreEmptyLines=c,this._ignoreFirstLine=m||!1}static _gatherPreflightCommentStrings(e,t,i,s){e.tokenization.tokenizeIfCheap(t);const o=e.getLanguageIdAtPosition(t,1),c=s.getLanguageConfiguration(o).comments,m=c?c.lineCommentToken:null;if(!m)return null;const A=[];for(let U=0,W=i-t+1;U<W;U++)A[U]={ignore:!1,commentStr:m,commentStrOffset:0,commentStrLength:m.length};return A}static _analyzeLines(e,t,i,s,o,c,m,A){let U=!0,W;e===0?W=!0:e===1?W=!1:W=!0;for(let re=0,Se=s.length;re<Se;re++){const Be=s[re],Qe=o+re;if(Qe===o&&m){Be.ignore=!0;continue}const tt=i.getLineContent(Qe),vt=xi.HG(tt);if(vt===-1){Be.ignore=c,Be.commentStrOffset=tt.length;continue}if(U=!1,Be.ignore=!1,Be.commentStrOffset=vt,W&&!Gl._haystackHasNeedleAtOffset(tt,Be.commentStr,vt)&&(e===0?W=!1:e===1||(Be.ignore=!0)),W&&t){const Ht=vt+Be.commentStrLength;Ht<tt.length&&tt.charCodeAt(Ht)===32&&(Be.commentStrLength+=1)}}if(e===0&&U){W=!1;for(let re=0,Se=s.length;re<Se;re++)s[re].ignore=!1}return{supported:!0,shouldRemoveComments:W,lines:s}}static _gatherPreflightData(e,t,i,s,o,c,m,A){const U=nl._gatherPreflightCommentStrings(i,s,o,A);return U===null?{supported:!1}:nl._analyzeLines(e,t,i,U,s,c,m,A)}_executeLineComments(e,t,i,s){let o;i.shouldRemoveComments?o=nl._createRemoveLineCommentsOperations(i.lines,s.startLineNumber):(nl._normalizeInsertionPoint(e,i.lines,s.startLineNumber,this._tabSize),o=this._createAddLineCommentsOperations(i.lines,s.startLineNumber));const c=new bi.y(s.positionLineNumber,s.positionColumn);for(let m=0,A=o.length;m<A;m++)t.addEditOperation(o[m].range,o[m].text),St.Q.isEmpty(o[m].range)&&St.Q.getStartPosition(o[m].range).equals(c)&&e.getLineContent(c.lineNumber).length+1===c.column&&(this._deltaColumn=(o[m].text||"").length);this._selectionId=t.trackSelection(s)}_attemptRemoveBlockComment(e,t,i,s){let o=t.startLineNumber,c=t.endLineNumber;const m=s.length+Math.max(e.getLineFirstNonWhitespaceColumn(t.startLineNumber),t.startColumn);let A=e.getLineContent(o).lastIndexOf(i,m-1),U=e.getLineContent(c).indexOf(s,t.endColumn-1-i.length);return A!==-1&&U===-1&&(U=e.getLineContent(o).indexOf(s,A+i.length),c=o),A===-1&&U!==-1&&(A=e.getLineContent(c).lastIndexOf(i,U),o=c),t.isEmpty()&&(A===-1||U===-1)&&(A=e.getLineContent(o).indexOf(i),A!==-1&&(U=e.getLineContent(o).indexOf(s,A+i.length))),A!==-1&&e.getLineContent(o).charCodeAt(A+i.length)===32&&(i+=" "),U!==-1&&e.getLineContent(c).charCodeAt(U-1)===32&&(s=" "+s,U-=1),A!==-1&&U!==-1?Gl._createRemoveBlockCommentOperations(new St.Q(o,A+i.length+1,c,U+1),i,s):null}_executeBlockComment(e,t,i){e.tokenization.tokenizeIfCheap(i.startLineNumber);const s=e.getLanguageIdAtPosition(i.startLineNumber,1),o=this.languageConfigurationService.getLanguageConfiguration(s).comments;if(!o||!o.blockCommentStartToken||!o.blockCommentEndToken)return;const c=o.blockCommentStartToken,m=o.blockCommentEndToken;let A=this._attemptRemoveBlockComment(e,i,c,m);if(!A){if(i.isEmpty()){const U=e.getLineContent(i.startLineNumber);let W=xi.HG(U);W===-1&&(W=U.length),A=Gl._createAddBlockCommentOperations(new St.Q(i.startLineNumber,W+1,i.startLineNumber,U.length+1),c,m,this._insertSpace)}else A=Gl._createAddBlockCommentOperations(new St.Q(i.startLineNumber,e.getLineFirstNonWhitespaceColumn(i.startLineNumber),i.endLineNumber,e.getLineMaxColumn(i.endLineNumber)),c,m,this._insertSpace);A.length===1&&(this._deltaColumn=c.length+1)}this._selectionId=t.trackSelection(i);for(const U of A)t.addEditOperation(U.range,U.text)}getEditOperations(e,t){let i=this._selection;if(this._moveEndPositionDown=!1,i.startLineNumber===i.endLineNumber&&this._ignoreFirstLine){t.addEditOperation(new St.Q(i.startLineNumber,e.getLineMaxColumn(i.startLineNumber),i.startLineNumber+1,1),i.startLineNumber===e.getLineCount()?"":` `),this._selectionId=t.trackSelection(i);return}i.startLineNumber<i.endLineNumber&&i.endColumn===1&&(this._moveEndPositionDown=!0,i=i.setEndPosition(i.endLineNumber-1,e.getLineMaxColumn(i.endLineNumber-1)));const s=nl._gatherPreflightData(this._type,this._insertSpace,e,i.startLineNumber,i.endLineNumber,this._ignoreEmptyLines,this._ignoreFirstLine,this.languageConfigurationService);return s.supported?this._executeLineComments(e,t,s,i):this._executeBlockComment(e,t,i)}computeCursorState(e,t){let i=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(i=i.setEndPosition(i.endLineNumber+1,1)),new ki.L(i.selectionStartLineNumber,i.selectionStartColumn+this._deltaColumn,i.positionLineNumber,i.positionColumn+this._deltaColumn)}static _createRemoveLineCommentsOperations(e,t){const i=[];for(let s=0,o=e.length;s<o;s++){const c=e[s];c.ignore||i.push(Sn.k.delete(new St.Q(t+s,c.commentStrOffset+1,t+s,c.commentStrOffset+c.commentStrLength+1)))}return i}_createAddLineCommentsOperations(e,t){const i=[],s=this._insertSpace?" ":"";for(let o=0,c=e.length;o<c;o++){const m=e[o];m.ignore||i.push(Sn.k.insert(new bi.y(t+o,m.commentStrOffset+1),m.commentStr+s))}return i}static nextVisibleColumn(e,t,i,s){return i?e+(t-e%t):e+s}static _normalizeInsertionPoint(e,t,i,s){let o=1073741824,c,m;for(let A=0,U=t.length;A<U;A++){if(t[A].ignore)continue;const W=e.getLineContent(i+A);let re=0;for(let Se=0,Be=t[A].commentStrOffset;re<o&&Se<Be;Se++)re=nl.nextVisibleColumn(re,s,W.charCodeAt(Se)===9,1);re<o&&(o=re)}o=Math.floor(o/s)*s;for(let A=0,U=t.length;A<U;A++){if(t[A].ignore)continue;const W=e.getLineContent(i+A);let re=0;for(c=0,m=t[A].commentStrOffset;re<o&&c<m;c++)re=nl.nextVisibleColumn(re,s,W.charCodeAt(c)===9,1);re>o?t[A].commentStrOffset=c-1:t[A].commentStrOffset=c}}}class Zm extends Te.ks{constructor(e,t){super(t),this._type=e}run(e,t){const i=e.get(ao.JZ);if(!t.hasModel())return;const s=t.getModel(),o=[],c=s.getOptions(),m=t.getOption(19),A=t.getSelections().map((W,re)=>({selection:W,index:re,ignoreFirstLine:!1}));A.sort((W,re)=>St.Q.compareRangesUsingStarts(W.selection,re.selection));let U=A[0];for(let W=1;W<A.length;W++){const re=A[W];U.selection.endLineNumber===re.selection.startLineNumber&&(U.index<re.index?re.ignoreFirstLine=!0:(U.ignoreFirstLine=!0,U=re))}for(const W of A)o.push(new nl(i,W.selection,c.tabSize,this._type,m.insertSpace,m.ignoreEmptyLines,W.ignoreFirstLine));t.pushUndoStop(),t.executeCommands(this.id,o),t.pushUndoStop()}}class WC extends Zm{constructor(){super(0,{id:"editor.action.commentLine",label:we.kg("comment.line","Toggle Line Comment"),alias:"Toggle Line Comment",precondition:ze.R.writable,kbOpts:{kbExpr:ze.R.editorTextFocus,primary:2133,weight:100},menuOpts:{menuId:xe.D8.MenubarEditMenu,group:"5_insert",title:we.kg({key:"miToggleLineComment",comment:["&& denotes a mnemonic"]},"&&Toggle Line Comment"),order:1}})}}class VC extends Zm{constructor(){super(1,{id:"editor.action.addCommentLine",label:we.kg("comment.line.add","Add Line Comment"),alias:"Add Line Comment",precondition:ze.R.writable,kbOpts:{kbExpr:ze.R.editorTextFocus,primary:(0,zi.m5)(2089,2081),weight:100}})}}class HC extends Zm{constructor(){super(2,{id:"editor.action.removeCommentLine",label:we.kg("comment.line.remove","Remove Line Comment"),alias:"Remove Line Comment",precondition:ze.R.writable,kbOpts:{kbExpr:ze.R.editorTextFocus,primary:(0,zi.m5)(2089,2099),weight:100}})}}class zC extends Te.ks{constructor(){super({id:"editor.action.blockComment",label:we.kg("comment.block","Toggle Block Comment"),alias:"Toggle Block Comment",precondition:ze.R.writable,kbOpts:{kbExpr:ze.R.editorTextFocus,primary:1567,linux:{primary:3103},weight:100},menuOpts:{menuId:xe.D8.MenubarEditMenu,group:"5_insert",title:we.kg({key:"miToggleBlockComment",comment:["&& denotes a mnemonic"]},"Toggle &&Block Comment"),order:2}})}run(e,t){const i=e.get(ao.JZ);if(!t.hasModel())return;const s=t.getOption(19),o=[],c=t.getSelections();for(const m of c)o.push(new Gl(m,s.insertSpace,i));t.pushUndoStop(),t.executeCommands(this.id,o),t.pushUndoStop()}}(0,Te.Fl)(WC),(0,Te.Fl)(VC),(0,Te.Fl)(HC),(0,Te.Fl)(zC);var UC=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},Kc=function(u,e){return function(t,i){e(t,i,u)}};let $c=class vC{constructor(e,t,i,s,o,c,m){this._contextMenuService=t,this._contextViewService=i,this._contextKeyService=s,this._keybindingService=o,this._menuService=c,this._configurationService=m,this._toDispose=new at.Cm,this._contextMenuIsBeingShownCount=0,this._editor=e,this._toDispose.add(this._editor.onContextMenu(A=>this._onContextMenu(A))),this._toDispose.add(this._editor.onMouseWheel(A=>{if(this._contextMenuIsBeingShownCount>0){const U=this._contextViewService.getContextViewElement(),W=A.srcElement;W.shadowRoot&&M.jG(U)===W.shadowRoot||this._contextViewService.hideContextView()}})),this._toDispose.add(this._editor.onKeyDown(A=>{this._editor.getOption(20)&&A.keyCode===58&&(A.preventDefault(),A.stopPropagation(),this.showContextMenu())}))}static get(e){return e.getContribution(vC.ID)}_onContextMenu(e){if(!this._editor.hasModel())return;if(!this._editor.getOption(20)){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({x:e.event.posx-1,width:2,y:e.event.posy-1,height:2});if(e.target.type!==6&&e.target.type!==7&&e.target.type!==1)return;if(this._editor.focus(),e.target.position){let i=!1;for(const s of this._editor.getSelections())if(s.containsPosition(e.target.position)){i=!0;break}i||this._editor.setPosition(e.target.position)}let t=null;e.target.type!==1&&(t={x:e.event.posx-1,width:2,y:e.event.posy-1,height:2}),this.showContextMenu(t)}showContextMenu(e){if(!this._editor.getOption(20)||!this._editor.hasModel())return;const t=this._getMenuActions(this._editor.getModel(),this._editor.isSimpleWidget?xe.D8.SimpleEditorContext:xe.D8.EditorContext);t.length>0&&this._doShowContextMenu(t,e)}_getMenuActions(e,t){const i=[],s=this._menuService.createMenu(t,this._contextKeyService),o=s.getActions({arg:e.uri});s.dispose();for(const c of o){const[,m]=c;let A=0;for(const U of m)if(U instanceof xe.nI){const W=this._getMenuActions(e,U.item.submenu);W.length>0&&(i.push(new p.YH(U.id,U.label,W)),A++)}else i.push(U),A++;A&&i.push(new p.wv)}return i.length&&i.pop(),i}_doShowContextMenu(e,t=null){if(!this._editor.hasModel())return;const i=this._editor.getOption(55);if(this._editor.updateOptions({hover:{enabled:!1}}),!t){this._editor.revealPosition(this._editor.getPosition(),1),this._editor.render();const o=this._editor.getScrolledVisiblePosition(this._editor.getPosition()),c=M.BK(this._editor.getDomNode()),m=c.left+o.left,A=c.top+o.top+o.height;t={x:m,y:A}}const s=this._editor.getOption(117)&&!Pi.un;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:s?this._editor.getDomNode():void 0,getAnchor:()=>t,getActions:()=>e,getActionViewItem:o=>{const c=this._keybindingFor(o);if(c)return new Un.Z(o,o,{label:!0,keybinding:c.getLabel(),isMenu:!0});const m=o;return typeof m.getActionViewItem=="function"?m.getActionViewItem():new Un.Z(o,o,{icon:!0,label:!0,isMenu:!0})},getKeyBinding:o=>this._keybindingFor(o),onHide:o=>{this._contextMenuIsBeingShownCount--,this._editor.focus(),this._editor.updateOptions({hover:i})}})}_showScrollbarContextMenu(e){if(!this._editor.hasModel())return;const t=this._editor.getOption(67);let i=0;const s=U=>({id:`menu-action-${++i}`,label:U.label,tooltip:"",class:void 0,enabled:typeof U.enabled>"u"?!0:U.enabled,checked:U.checked,run:U.run,dispose:()=>null}),o=(U,W)=>new p.YH(`menu-action-${++i}`,U,W,void 0),c=(U,W,re,Se,Be)=>{if(!W)return s({label:U,enabled:W,run:()=>{}});const Qe=vt=>()=>{this._configurationService.updateValue(re,vt)},tt=[];for(const vt of Be)tt.push(s({label:vt.label,checked:Se===vt.value,run:Qe(vt.value)}));return o(U,tt)},m=[];m.push(s({label:we.kg("context.minimap.minimap","Minimap"),checked:t.enabled,run:()=>{this._configurationService.updateValue("editor.minimap.enabled",!t.enabled)}})),m.push(new p.wv),m.push(s({label:we.kg("context.minimap.renderCharacters","Render Characters"),enabled:t.enabled,checked:t.renderCharacters,run:()=>{this._configurationService.updateValue("editor.minimap.renderCharacters",!t.renderCharacters)}})),m.push(c(we.kg("context.minimap.size","Vertical size"),t.enabled,"editor.minimap.size",t.size,[{label:we.kg("context.minimap.size.proportional","Proportional"),value:"proportional"},{label:we.kg("context.minimap.size.fill","Fill"),value:"fill"},{label:we.kg("context.minimap.size.fit","Fit"),value:"fit"}])),m.push(c(we.kg("context.minimap.slider","Slider"),t.enabled,"editor.minimap.showSlider",t.showSlider,[{label:we.kg("context.minimap.slider.mouseover","Mouse Over"),value:"mouseover"},{label:we.kg("context.minimap.slider.always","Always"),value:"always"}]));const A=this._editor.getOption(117)&&!Pi.un;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:A?this._editor.getDomNode():void 0,getAnchor:()=>e,getActions:()=>m,onHide:U=>{this._contextMenuIsBeingShownCount--,this._editor.focus()}})}_keybindingFor(e){return this._keybindingService.lookupKeybinding(e.id)}dispose(){this._contextMenuIsBeingShownCount>0&&this._contextViewService.hideContextView(),this._toDispose.dispose()}};$c.ID="editor.contrib.contextmenu",$c=UC([Kc(1,be.Z),Kc(2,be.l),Kc(3,ct.fN),Kc(4,ye.b),Kc(5,xe.ez),Kc(6,de.pG)],$c);class jC extends Te.ks{constructor(){super({id:"editor.action.showContextMenu",label:we.kg("action.showContextMenu.label","Show Editor Context Menu"),alias:"Show Editor Context Menu",precondition:void 0,kbOpts:{kbExpr:ze.R.textInputFocus,primary:1092,weight:100}})}run(e,t){var i;(i=$c.get(t))===null||i===void 0||i.showContextMenu()}}(0,Te.HW)($c.ID,$c),(0,Te.Fl)(jC);class Ym{constructor(e){this.selections=e}equals(e){const t=this.selections.length,i=e.selections.length;if(t!==i)return!1;for(let s=0;s<t;s++)if(!this.selections[s].equalsSelection(e.selections[s]))return!1;return!0}}class Xm{constructor(e,t,i){this.cursorState=e,this.scrollTop=t,this.scrollLeft=i}}class Fd extends at.jG{constructor(e){super(),this._editor=e,this._isCursorUndoRedo=!1,this._undoStack=[],this._redoStack=[],this._register(e.onDidChangeModel(t=>{this._undoStack=[],this._redoStack=[]})),this._register(e.onDidChangeModelContent(t=>{this._undoStack=[],this._redoStack=[]})),this._register(e.onDidChangeCursorSelection(t=>{if(this._isCursorUndoRedo||!t.oldSelections||t.oldModelVersionId!==t.modelVersionId)return;const i=new Ym(t.oldSelections);this._undoStack.length>0&&this._undoStack[this._undoStack.length-1].cursorState.equals(i)||(this._undoStack.push(new Xm(i,e.getScrollTop(),e.getScrollLeft())),this._redoStack=[],this._undoStack.length>50&&this._undoStack.shift())}))}static get(e){return e.getContribution(Fd.ID)}cursorUndo(){!this._editor.hasModel()||this._undoStack.length===0||(this._redoStack.push(new Xm(new Ym(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 Xm(new Ym(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}}Fd.ID="editor.contrib.cursorUndoRedoController";class KC extends Te.ks{constructor(){super({id:"cursorUndo",label:we.kg("cursor.undo","Cursor Undo"),alias:"Cursor Undo",precondition:void 0,kbOpts:{kbExpr:ze.R.textInputFocus,primary:2099,weight:100}})}run(e,t,i){var s;(s=Fd.get(t))===null||s===void 0||s.cursorUndo()}}class $C extends Te.ks{constructor(){super({id:"cursorRedo",label:we.kg("cursor.redo","Cursor Redo"),alias:"Cursor Redo",precondition:void 0})}run(e,t,i){var s;(s=Fd.get(t))===null||s===void 0||s.cursorRedo()}}(0,Te.HW)(Fd.ID,Fd),(0,Te.Fl)(KC),(0,Te.Fl)($C);var fk=f(79008);class GC{constructor(e,t,i){this.selection=e,this.targetPosition=t,this.copy=i,this.targetSelection=null}getEditOperations(e,t){const i=e.getValueInRange(this.selection);if(this.copy||t.addEditOperation(this.selection,null),t.addEditOperation(new St.Q(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column),i),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 ki.L(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 ki.L(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 ki.L(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 ki.L(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 ki.L(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,t){return this.targetSelection}}function Gc(u){return Pi.zx?u.altKey:u.ctrlKey}class sl extends at.jG{constructor(e){super(),this._editor=e,this._dndDecorationIds=this._editor.createDecorationsCollection(),this._register(this._editor.onMouseDown(t=>this._onEditorMouseDown(t))),this._register(this._editor.onMouseUp(t=>this._onEditorMouseUp(t))),this._register(this._editor.onMouseDrag(t=>this._onEditorMouseDrag(t))),this._register(this._editor.onMouseDrop(t=>this._onEditorMouseDrop(t))),this._register(this._editor.onMouseDropCanceled(()=>this._onEditorMouseDropCanceled())),this._register(this._editor.onKeyDown(t=>this.onEditorKeyDown(t))),this._register(this._editor.onKeyUp(t=>this.onEditorKeyUp(t))),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(31)||this._editor.getOption(18)||(Gc(e)&&(this._modifierPressed=!0),this._mouseDown&&Gc(e)&&this._editor.updateOptions({mouseStyle:"copy"}))}onEditorKeyUp(e){!this._editor.getOption(31)||this._editor.getOption(18)||(Gc(e)&&(this._modifierPressed=!1),this._mouseDown&&e.keyCode===sl.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 t=e.target;if(this._dragSelection===null){const s=(this._editor.getSelections()||[]).filter(o=>t.position&&o.containsPosition(t.position));if(s.length===1)this._dragSelection=s[0];else return}Gc(e.event)?this._editor.updateOptions({mouseStyle:"copy"}):this._editor.updateOptions({mouseStyle:"default"}),t.position&&(this._dragSelection.containsPosition(t.position)?this._removeDecoration():this.showAt(t.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 t=new bi.y(e.target.position.lineNumber,e.target.position.column);if(this._dragSelection===null){let i=null;if(e.event.shiftKey){const s=this._editor.getSelection();if(s){const{selectionStartLineNumber:o,selectionStartColumn:c}=s;i=[new ki.L(o,c,t.lineNumber,t.column)]}}else i=(this._editor.getSelections()||[]).map(s=>s.containsPosition(t)?new ki.L(t.lineNumber,t.column,t.lineNumber,t.column):s);this._editor.setSelections(i||[],"mouse",3)}else(!this._dragSelection.containsPosition(t)||(Gc(e.event)||this._modifierPressed)&&(this._dragSelection.getEndPosition().equals(t)||this._dragSelection.getStartPosition().equals(t)))&&(this._editor.pushUndoStop(),this._editor.executeCommand(sl.ID,new GC(this._dragSelection,t,Gc(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 St.Q(e.lineNumber,e.column,e.lineNumber,e.column),options:sl._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()}}sl.ID="editor.contrib.dragAndDrop",sl.TRIGGER_KEY_VALUE=Pi.zx?6:5,sl._DECORATION_OPTIONS=sn.kI.register({description:"dnd-target",className:"dnd-target"}),(0,Te.HW)(sl.ID,sl);var $_=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},cu=function(u,e){return function(t,i){e(t,i,u)}},Jg=function(u,e,t,i){function s(o){return o instanceof t?o:new t(function(c){c(o)})}return new(t||(t=Promise))(function(o,c){function m(W){try{U(i.next(W))}catch(re){c(re)}}function A(W){try{U(i.throw(W))}catch(re){c(re)}}function U(W){W.done?o(W.value):s(W.value).then(m,A)}U((i=i.apply(u,e||[])).next())})};let hu=class extends at.jG{constructor(e,t,i,s,o){super(),this._bulkEditService=t,this._languageFeaturesService=i,this._progressService=s,this._register(e.onDropIntoEditor(c=>this.onDropIntoEditor(e,c.position,c.event))),this._languageFeaturesService.documentOnDropEditProvider.register("*",new Jm(o))}onDropIntoEditor(e,t,i){return Jg(this,void 0,void 0,function*(){if(!i.dataTransfer||!e.hasModel())return;const s=e.getModel(),o=s.getVersionId(),c=yield this.extractDataTransferData(i);if(c.size===0||e.getModel().getVersionId()!==o)return;const m=new Gn.gI(e,1);try{const A=this._languageFeaturesService.documentOnDropEditProvider.ordered(s),U=yield this._progressService.withProgress({location:15,delay:750,title:(0,we.kg)("dropProgressTitle","Running drop handlers..."),cancellable:!0},()=>(0,Ot.PK)((()=>Jg(this,void 0,void 0,function*(){for(const W of A){const re=yield W.provideDocumentOnDropEdits(s,t,c,m.token);if(m.token.isCancellationRequested)return;if(re)return re}}))(),m.token),()=>{m.cancel()});if(m.token.isCancellationRequested||e.getModel().getVersionId()!==o)return;if(U){const W=new St.Q(t.lineNumber,t.column,t.lineNumber,t.column);j_(e,typeof U.insertText=="string"?ta.escape(U.insertText):U.insertText.snippet,[ki.L.fromRange(W,0)]),U.additionalEdit&&(yield this._bulkEditService.apply(os.jN.convert(U.additionalEdit),{editor:e}));return}}finally{m.dispose()}})}extractDataTransferData(e){return Jg(this,void 0,void 0,function*(){if(!e.dataTransfer)return new Ve;const t=qn(e.dataTransfer);return zo(t,e),t})}};hu.ID="editor.contrib.dropIntoEditorController",hu=$_([cu(1,os.nu),cu(2,Zi.u),cu(3,ks.G5),cu(4,En.VR)],hu);let Jm=class{constructor(e){this._workspaceContextService=e}provideDocumentOnDropEdits(e,t,i,s){var o;return Jg(this,void 0,void 0,function*(){const c=i.get(Ge.K.uriList);if(c){const A=yield c.asString(),U=this.getUriListInsertText(A);if(U)return{insertText:U}}const m=(o=i.get("text"))!==null&&o!==void 0?o:i.get(Ge.K.text);if(m)return{insertText:yield m.asString()}})}getUriListInsertText(e){const t=[];for(const i of na.parse(e))try{t.push(vn.r.parse(i))}catch{}if(t.length)return t.map(i=>{const s=this._workspaceContextService.getWorkspaceFolder(i);if(s){const o=(0,hn.iZ)(s.uri,i);if(o)return o}return i.fsPath}).join(" ")}};Jm=$_([cu(0,En.VR)],Jm),(0,Te.HW)(hu.ID,hu);var QC=f(104);class Ao{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(t=>this._editor.getModel().getDecorationRange(t)).filter(t=>!!t);if(e.length)return e}return null}getStartPosition(){return this._startPosition}setStartPosition(e){this._startPosition=e,this.setCurrentFindMatch(null)}_getDecorationIndex(e){const t=this._decorations.indexOf(e);return t>=0?t+1:1}getCurrentMatchesPosition(e){const t=this._editor.getModel().getDecorationsInRange(e);for(const i of t){const s=i.options;if(s===Ao._FIND_MATCH_DECORATION||s===Ao._CURRENT_FIND_MATCH_DECORATION)return this._getDecorationIndex(i.id)}return 0}setCurrentFindMatch(e){let t=null,i=0;if(e)for(let s=0,o=this._decorations.length;s<o;s++){const c=this._editor.getModel().getDecorationRange(this._decorations[s]);if(e.equalsRange(c)){t=this._decorations[s],i=s+1;break}}return(this._highlightedDecorationId!==null||t!==null)&&this._editor.changeDecorations(s=>{if(this._highlightedDecorationId!==null&&(s.changeDecorationOptions(this._highlightedDecorationId,Ao._FIND_MATCH_DECORATION),this._highlightedDecorationId=null),t!==null&&(this._highlightedDecorationId=t,s.changeDecorationOptions(this._highlightedDecorationId,Ao._CURRENT_FIND_MATCH_DECORATION)),this._rangeHighlightDecorationId!==null&&(s.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),t!==null){let o=this._editor.getModel().getDecorationRange(t);if(o.startLineNumber!==o.endLineNumber&&o.endColumn===1){const c=o.endLineNumber-1,m=this._editor.getModel().getLineMaxColumn(c);o=new St.Q(o.startLineNumber,o.startColumn,c,m)}this._rangeHighlightDecorationId=s.addDecoration(o,Ao._RANGE_HIGHLIGHT_DECORATION)}}),i}set(e,t){this._editor.changeDecorations(i=>{let s=Ao._FIND_MATCH_DECORATION;const o=[];if(e.length>1e3){s=Ao._FIND_MATCH_NO_OVERVIEW_DECORATION;const m=this._editor.getModel().getLineCount(),U=this._editor.getLayoutInfo().height/m,W=Math.max(2,Math.ceil(3/U));let re=e[0].range.startLineNumber,Se=e[0].range.endLineNumber;for(let Be=1,Qe=e.length;Be<Qe;Be++){const tt=e[Be].range;Se+W>=tt.startLineNumber?tt.endLineNumber>Se&&(Se=tt.endLineNumber):(o.push({range:new St.Q(re,1,Se,1),options:Ao._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),re=tt.startLineNumber,Se=tt.endLineNumber)}o.push({range:new St.Q(re,1,Se,1),options:Ao._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}const c=new Array(e.length);for(let m=0,A=e.length;m<A;m++)c[m]={range:e[m].range,options:s};this._decorations=i.deltaDecorations(this._decorations,c),this._overviewRulerApproximateDecorations=i.deltaDecorations(this._overviewRulerApproximateDecorations,o),this._rangeHighlightDecorationId&&(i.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),this._findScopeDecorationIds.length&&(this._findScopeDecorationIds.forEach(m=>i.removeDecoration(m)),this._findScopeDecorationIds=[]),t?.length&&(this._findScopeDecorationIds=t.map(m=>i.addDecoration(m,Ao._FIND_SCOPE_DECORATION)))})}matchBeforePosition(e){if(this._decorations.length===0)return null;for(let t=this._decorations.length-1;t>=0;t--){const i=this._decorations[t],s=this._editor.getModel().getDecorationRange(i);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 t=0,i=this._decorations.length;t<i;t++){const s=this._decorations[t],o=this._editor.getModel().getDecorationRange(s);if(!(!o||o.startLineNumber<e.lineNumber)){if(o.startLineNumber>e.lineNumber)return o;if(!(o.startColumn<e.column))return o}}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}}Ao._CURRENT_FIND_MATCH_DECORATION=sn.kI.register({description:"current-find-match",stickiness:1,zIndex:13,className:"currentFindMatch",showIfCollapsed:!0,overviewRuler:{color:(0,Ye.Yf)(Ce.fAP),position:bn.A5.Center},minimap:{color:(0,Ye.Yf)(Ce.AjU),position:bn.R3.Inline}}),Ao._FIND_MATCH_DECORATION=sn.kI.register({description:"find-match",stickiness:1,zIndex:10,className:"findMatch",showIfCollapsed:!0,overviewRuler:{color:(0,Ye.Yf)(Ce.fAP),position:bn.A5.Center},minimap:{color:(0,Ye.Yf)(Ce.AjU),position:bn.R3.Inline}}),Ao._FIND_MATCH_NO_OVERVIEW_DECORATION=sn.kI.register({description:"find-match-no-overview",stickiness:1,className:"findMatch",showIfCollapsed:!0}),Ao._FIND_MATCH_ONLY_OVERVIEW_DECORATION=sn.kI.register({description:"find-match-only-overview",stickiness:1,overviewRuler:{color:(0,Ye.Yf)(Ce.fAP),position:bn.A5.Center}}),Ao._RANGE_HIGHLIGHT_DECORATION=sn.kI.register({description:"find-range-highlight",stickiness:1,className:"rangeHighlight",isWholeLine:!0}),Ao._FIND_SCOPE_DECORATION=sn.kI.register({description:"find-scope",className:"findScope",isWholeLine:!0});class ZC{constructor(e,t,i){this._editorSelection=e,this._ranges=t,this._replaceStrings=i,this._trackedEditorSelectionId=null}getEditOperations(e,t){if(this._ranges.length>0){const i=[];for(let c=0;c<this._ranges.length;c++)i.push({range:this._ranges[c],text:this._replaceStrings[c]});i.sort((c,m)=>St.Q.compareRangesUsingStarts(c.range,m.range));const s=[];let o=i[0];for(let c=1;c<i.length;c++)o.range.endLineNumber===i[c].range.startLineNumber&&o.range.endColumn===i[c].range.startColumn?(o.range=o.range.plusRange(i[c].range),o.text=o.text+i[c].text):(s.push(o),o=i[c]);s.push(o);for(const c of s)t.addEditOperation(c.range,c.text)}this._trackedEditorSelectionId=t.trackSelection(this._editorSelection)}computeCursorState(e,t){return t.getTrackedSelection(this._trackedEditorSelectionId)}}function G_(u,e){if(u&&u[0]!==""){const t=Q_(u,e,"-"),i=Q_(u,e,"_");return t&&!i?Z_(u,e,"-"):!t&&i?Z_(u,e,"_"):u[0].toUpperCase()===u[0]?e.toUpperCase():u[0].toLowerCase()===u[0]?e.toLowerCase():xi.zY(u[0][0])&&e.length>0?e[0].toUpperCase()+e.substr(1):u[0][0].toUpperCase()!==u[0][0]&&e.length>0?e[0].toLowerCase()+e.substr(1):e}else return e}function Q_(u,e,t){return u[0].indexOf(t)!==-1&&e.indexOf(t)!==-1&&u[0].split(t).length===e.split(t).length}function Z_(u,e,t){const i=e.split(t),s=u[0].split(t);let o="";return i.forEach((c,m)=>{o+=G_([s[m]],c)+t}),o.slice(0,-1)}class Y_{constructor(e){this.staticValue=e,this.kind=0}}class YC{constructor(e){this.pieces=e,this.kind=1}}class Qc{constructor(e){!e||e.length===0?this._state=new Y_(""):e.length===1&&e[0].staticValue!==null?this._state=new Y_(e[0].staticValue):this._state=new YC(e)}static fromStaticValue(e){return new Qc([Bd.staticValue(e)])}get hasReplacementPatterns(){return this._state.kind===1}buildReplaceString(e,t){if(this._state.kind===0)return t?G_(e,this._state.staticValue):this._state.staticValue;let i="";for(let s=0,o=this._state.pieces.length;s<o;s++){const c=this._state.pieces[s];if(c.staticValue!==null){i+=c.staticValue;continue}let m=Qc._substitute(c.matchIndex,e);if(c.caseOps!==null&&c.caseOps.length>0){const A=[],U=c.caseOps.length;let W=0;for(let re=0,Se=m.length;re<Se;re++){if(W>=U){A.push(m.slice(re));break}switch(c.caseOps[W]){case"U":A.push(m[re].toUpperCase());break;case"u":A.push(m[re].toUpperCase()),W++;break;case"L":A.push(m[re].toLowerCase());break;case"l":A.push(m[re].toLowerCase()),W++;break;default:A.push(m[re])}}m=A.join("")}i+=m}return i}static _substitute(e,t){if(t===null)return"";if(e===0)return t[0];let i="";for(;e>0;){if(e<t.length)return(t[e]||"")+i;i=String(e%10)+i,e=Math.floor(e/10)}return"$"+i}}class Bd{constructor(e,t,i){this.staticValue=e,this.matchIndex=t,!i||i.length===0?this.caseOps=null:this.caseOps=i.slice(0)}static staticValue(e){return new Bd(e,-1,null)}static caseOps(e,t){return new Bd(null,e,t)}}class XC{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,t){this._emitStatic(e),this._lastCharIndex=t}_emitStatic(e){e.length!==0&&(this._currentStaticPiece+=e)}emitMatchIndex(e,t,i){this._currentStaticPiece.length!==0&&(this._result[this._resultLen++]=Bd.staticValue(this._currentStaticPiece),this._currentStaticPiece=""),this._result[this._resultLen++]=Bd.caseOps(e,i),this._lastCharIndex=t}finalize(){return this.emitUnchanged(this._source.length),this._currentStaticPiece.length!==0&&(this._result[this._resultLen++]=Bd.staticValue(this._currentStaticPiece),this._currentStaticPiece=""),new Qc(this._result)}}function JC(u){if(!u||u.length===0)return new Qc(null);const e=[],t=new XC(u);for(let i=0,s=u.length;i<s;i++){const o=u.charCodeAt(i);if(o===92){if(i++,i>=s)break;const c=u.charCodeAt(i);switch(c){case 92:t.emitUnchanged(i-1),t.emitStatic("\\",i+1);break;case 110:t.emitUnchanged(i-1),t.emitStatic(` `,i+1);break;case 116:t.emitUnchanged(i-1),t.emitStatic(" ",i+1);break;case 117:case 85:case 108:case 76:t.emitUnchanged(i-1),t.emitStatic("",i+1),e.push(String.fromCharCode(c));break}continue}if(o===36){if(i++,i>=s)break;const c=u.charCodeAt(i);if(c===36){t.emitUnchanged(i-1),t.emitStatic("$",i+1);continue}if(c===48||c===38){t.emitUnchanged(i-1),t.emitMatchIndex(0,i+1,e),e.length=0;continue}if(49<=c&&c<=57){let m=c-48;if(i+1<s){const A=u.charCodeAt(i+1);if(48<=A&&A<=57){i++,m=m*10+(A-48),t.emitUnchanged(i-2),t.emitMatchIndex(m,i+1,e),e.length=0;continue}}t.emitUnchanged(i-1),t.emitMatchIndex(m,i+1,e),e.length=0;continue}}}return t.finalize()}const Ql=new ct.N1("findWidgetVisible",!1),mk=Ql.toNegated(),qg=new ct.N1("findInputFocussed",!1),qm=new ct.N1("replaceInputFocussed",!1),ef={primary:545,mac:{primary:2593}},tf={primary:565,mac:{primary:2613}},nf={primary:560,mac:{primary:2608}},sf={primary:554,mac:{primary:2602}},of={primary:558,mac:{primary:2606}},ps={StartFindAction:"actions.find",StartFindWithSelection:"actions.findWithSelection",StartFindWithArgs:"editor.actions.findWithArgs",NextMatchFindAction:"editor.action.nextMatchFindAction",PreviousMatchFindAction:"editor.action.previousMatchFindAction",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"},Zl=19999,qC=240;class uu{constructor(e,t){this._toDispose=new at.Cm,this._editor=e,this._state=t,this._isDisposed=!1,this._startSearchingTimer=new Ot.pc,this._decorations=new Ao(e),this._toDispose.add(this._decorations),this._updateDecorationsScheduler=new Ot.uC(()=>this.research(!1),100),this._toDispose.add(this._updateDecorationsScheduler),this._toDispose.add(this._editor.onDidChangeCursorPosition(i=>{(i.reason===3||i.reason===5||i.reason===6)&&this._decorations.setStartPosition(this._editor.getPosition())})),this._ignoreModelContentChanged=!1,this._toDispose.add(this._editor.onDidChangeModelContent(i=>{this._ignoreModelContentChanged||(i.isFlush&&this._decorations.reset(),this._decorations.setStartPosition(this._editor.getPosition()),this._updateDecorationsScheduler.schedule())})),this._toDispose.add(this._state.onFindReplaceStateChange(i=>this._onStateChanged(i))),this.research(!1,this._state.searchScope)}dispose(){this._isDisposed=!0,(0,at.AS)(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)},qC)):e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor))}static _getSearchRange(e,t){return t||e.getFullModelRange()}research(e,t){let i=null;typeof t<"u"?t!==null&&(Array.isArray(t)?i=t:i=[t]):i=this._decorations.getFindScopes(),i!==null&&(i=i.map(m=>{if(m.startLineNumber!==m.endLineNumber){let A=m.endLineNumber;return m.endColumn===1&&(A=A-1),new St.Q(m.startLineNumber,1,A,this._editor.getModel().getLineMaxColumn(A))}return m}));const s=this._findMatches(i,!1,Zl);this._decorations.set(s,i);const o=this._editor.getSelection();let c=this._decorations.getCurrentMatchesPosition(o);if(c===0&&s.length>0){const m=(0,cn.aB)(s.map(A=>A.range),A=>St.Q.compareRangesUsingStarts(A,o)>=0);c=m>0?m-1+1:c}this._state.changeMatchInfo(c,this._decorations.getCount(),void 0),e&&this._editor.getOption(37).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 t=this._decorations.setCurrentFindMatch(e);this._state.changeMatchInfo(t,this._decorations.getCount(),e),this._editor.setSelection(e),this._editor.revealRangeInCenterIfOutsideViewport(e,0)}_prevSearchPosition(e){const t=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0);let{lineNumber:i,column:s}=e;const o=this._editor.getModel();return t||s===1?(i===1?i=o.getLineCount():i--,s=o.getLineMaxColumn(i)):s--,new bi.y(i,s)}_moveToPrevMatch(e,t=!1){if(!this._state.canNavigateBack()){const W=this._decorations.matchAfterPosition(e);W&&this._setCurrentFindMatch(W);return}if(this._decorations.getCount()<Zl){let W=this._decorations.matchBeforePosition(e);W&&W.isEmpty()&&W.getStartPosition().equals(e)&&(e=this._prevSearchPosition(e),W=this._decorations.matchBeforePosition(e)),W&&this._setCurrentFindMatch(W);return}if(this._cannotFind())return;const i=this._decorations.getFindScope(),s=uu._getSearchRange(this._editor.getModel(),i);s.getEndPosition().isBefore(e)&&(e=s.getEndPosition()),e.isBefore(s.getStartPosition())&&(e=s.getEndPosition());const{lineNumber:o,column:c}=e,m=this._editor.getModel();let A=new bi.y(o,c),U=m.findPreviousMatch(this._state.searchString,A,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(119):null,!1);if(U&&U.range.isEmpty()&&U.range.getStartPosition().equals(A)&&(A=this._prevSearchPosition(A),U=m.findPreviousMatch(this._state.searchString,A,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(119):null,!1)),!!U){if(!t&&!s.containsRange(U.range))return this._moveToPrevMatch(U.range.getStartPosition(),!0);this._setCurrentFindMatch(U.range)}}moveToPrevMatch(){this._moveToPrevMatch(this._editor.getSelection().getStartPosition())}_nextSearchPosition(e){const t=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0);let{lineNumber:i,column:s}=e;const o=this._editor.getModel();return t||s===o.getLineMaxColumn(i)?(i===o.getLineCount()?i=1:i++,s=1):s++,new bi.y(i,s)}_moveToNextMatch(e){if(!this._state.canNavigateForward()){const i=this._decorations.matchBeforePosition(e);i&&this._setCurrentFindMatch(i);return}if(this._decorations.getCount()<Zl){let i=this._decorations.matchAfterPosition(e);i&&i.isEmpty()&&i.getStartPosition().equals(e)&&(e=this._nextSearchPosition(e),i=this._decorations.matchAfterPosition(e)),i&&this._setCurrentFindMatch(i);return}const t=this._getNextMatch(e,!1,!0);t&&this._setCurrentFindMatch(t.range)}_getNextMatch(e,t,i,s=!1){if(this._cannotFind())return null;const o=this._decorations.getFindScope(),c=uu._getSearchRange(this._editor.getModel(),o);c.getEndPosition().isBefore(e)&&(e=c.getStartPosition()),e.isBefore(c.getStartPosition())&&(e=c.getStartPosition());const{lineNumber:m,column:A}=e,U=this._editor.getModel();let W=new bi.y(m,A),re=U.findNextMatch(this._state.searchString,W,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(119):null,t);return i&&re&&re.range.isEmpty()&&re.range.getStartPosition().equals(W)&&(W=this._nextSearchPosition(W),re=U.findNextMatch(this._state.searchString,W,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(119):null,t)),re?!s&&!c.containsRange(re.range)?this._getNextMatch(re.range.getEndPosition(),t,i,!0):re:null}moveToNextMatch(){this._moveToNextMatch(this._editor.getSelection().getEndPosition())}_getReplacePattern(){return this._state.isRegex?JC(this._state.replaceString):Qc.fromStaticValue(this._state.replaceString)}replace(){if(!this._hasMatches())return;const e=this._getReplacePattern(),t=this._editor.getSelection(),i=this._getNextMatch(t.getStartPosition(),!0,!1);if(i)if(t.equalsRange(i.range)){const s=e.buildReplaceString(i.matches,this._state.preserveCase),o=new wi.iu(t,s);this._executeEditorCommand("replace",o),this._decorations.setStartPosition(new bi.y(t.startLineNumber,t.startColumn+s.length)),this.research(!0)}else this._decorations.setStartPosition(this._editor.getPosition()),this._setCurrentFindMatch(i.range)}_findMatches(e,t,i){const s=(e||[null]).map(o=>uu._getSearchRange(this._editor.getModel(),o));return this._editor.getModel().findMatches(this._state.searchString,s,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(119):null,t,i)}replaceAll(){if(!this._hasMatches())return;const e=this._decorations.getFindScopes();e===null&&this._state.matchesCount>=Zl?this._largeReplaceAll():this._regularReplaceAll(e),this.research(!1)}_largeReplaceAll(){const t=new QC.lt(this._state.searchString,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(119):null).parseSearchRequest();if(!t)return;let i=t.regex;if(!i.multiline){let re="mu";i.ignoreCase&&(re+="i"),i.global&&(re+="g"),i=new RegExp(i.source,re)}const s=this._editor.getModel(),o=s.getValue(1),c=s.getFullModelRange(),m=this._getReplacePattern();let A;const U=this._state.preserveCase;m.hasReplacementPatterns||U?A=o.replace(i,function(){return m.buildReplaceString(arguments,U)}):A=o.replace(i,m.buildReplaceString(null,U));const W=new wi.ui(c,A,this._editor.getSelection());this._executeEditorCommand("replaceAll",W)}_regularReplaceAll(e){const t=this._getReplacePattern(),i=this._findMatches(e,t.hasReplacementPatterns||this._state.preserveCase,1073741824),s=[];for(let c=0,m=i.length;c<m;c++)s[c]=t.buildReplaceString(i[c].matches,this._state.preserveCase);const o=new ZC(this._editor.getSelection(),i.map(c=>c.range),s);this._executeEditorCommand("replaceAll",o)}selectAllMatches(){if(!this._hasMatches())return;const e=this._decorations.getFindScopes();let i=this._findMatches(e,!1,1073741824).map(o=>new ki.L(o.range.startLineNumber,o.range.startColumn,o.range.endLineNumber,o.range.endColumn));const s=this._editor.getSelection();for(let o=0,c=i.length;o<c;o++)if(i[o].equalsRange(s)){i=[s].concat(i.slice(0,o)).concat(i.slice(o+1));break}this._editor.setSelections(i)}_executeEditorCommand(e,t){try{this._ignoreModelContentChanged=!0,this._editor.pushUndoStop(),this._editor.executeCommand(e,t),this._editor.pushUndoStop()}finally{this._ignoreModelContentChanged=!1}}}var ep=f(5906);class rf extends Cr.x{constructor(e,t,i,s){super(),this._hideSoon=this._register(new Ot.uC(()=>this._hide(),2e3)),this._isVisible=!1,this._editor=e,this._state=t,this._keybindingService=i,this._domNode=document.createElement("div"),this._domNode.className="findOptionsWidget",this._domNode.style.display="none",this._domNode.style.top="10px",this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true");const o=s.getColorTheme().getColor(Ce.uNK),c=s.getColorTheme().getColor(Ce.$$0),m=s.getColorTheme().getColor(Ce.c1f);this.caseSensitive=this._register(new ep.bc({appendTitle:this._keybindingLabelFor(ps.ToggleCaseSensitiveCommand),isChecked:this._state.matchCase,inputActiveOptionBorder:o,inputActiveOptionForeground:c,inputActiveOptionBackground:m})),this._domNode.appendChild(this.caseSensitive.domNode),this._register(this.caseSensitive.onChange(()=>{this._state.change({matchCase:this.caseSensitive.checked},!1)})),this.wholeWords=this._register(new ep.nV({appendTitle:this._keybindingLabelFor(ps.ToggleWholeWordCommand),isChecked:this._state.wholeWord,inputActiveOptionBorder:o,inputActiveOptionForeground:c,inputActiveOptionBackground:m})),this._domNode.appendChild(this.wholeWords.domNode),this._register(this.wholeWords.onChange(()=>{this._state.change({wholeWord:this.wholeWords.checked},!1)})),this.regex=this._register(new ep.Ix({appendTitle:this._keybindingLabelFor(ps.ToggleRegexCommand),isChecked:this._state.isRegex,inputActiveOptionBorder:o,inputActiveOptionForeground:c,inputActiveOptionBackground:m})),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(A=>{let U=!1;A.isRegex&&(this.regex.checked=this._state.isRegex,U=!0),A.wholeWord&&(this.wholeWords.checked=this._state.wholeWord,U=!0),A.matchCase&&(this.caseSensitive.checked=this._state.matchCase,U=!0),!this._state.isRevealed&&U&&this._revealTemporarily()})),this._register(M.ko(this._domNode,M.Bx.MOUSE_LEAVE,A=>this._onMouseLeave())),this._register(M.ko(this._domNode,"mouseover",A=>this._onMouseOver())),this._applyTheme(s.getColorTheme()),this._register(s.onDidColorThemeChange(this._applyTheme.bind(this)))}_keybindingLabelFor(e){const t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return rf.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")}_applyTheme(e){const t={inputActiveOptionBorder:e.getColor(Ce.uNK),inputActiveOptionForeground:e.getColor(Ce.$$0),inputActiveOptionBackground:e.getColor(Ce.c1f)};this.caseSensitive.style(t),this.wholeWords.style(t),this.regex.style(t)}}rf.ID="editor.contrib.findOptionsWidget",(0,Ye.zy)((u,e)=>{const t=u.getColor(Ce.CgL);t&&e.addRule(`.monaco-editor .findOptionsWidget { background-color: ${t}; }`);const i=u.getColor(Ce.FiB);i&&e.addRule(`.monaco-editor .findOptionsWidget { color: ${i}; }`);const s=u.getColor(Ce.f9l);s&&e.addRule(`.monaco-editor .findOptionsWidget { box-shadow: 0 0 8px 2px ${s}; }`);const o=u.getColor(Ce.b1q);o&&e.addRule(`.monaco-editor .findOptionsWidget { border: 2px solid ${o}; }`)});function af(u,e){return u===1?!0:u===2?!1:e}class e1 extends at.jG{constructor(){super(),this._onFindReplaceStateChange=this._register(new Vi.vl),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}get searchString(){return this._searchString}get replaceString(){return this._replaceString}get isRevealed(){return this._isRevealed}get isReplaceRevealed(){return this._isReplaceRevealed}get isRegex(){return af(this._isRegexOverride,this._isRegex)}get wholeWord(){return af(this._wholeWordOverride,this._wholeWord)}get matchCase(){return af(this._matchCaseOverride,this._matchCase)}get preserveCase(){return af(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}changeMatchInfo(e,t,i){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 o=!1;t===0&&(e=0),e>t&&(e=t),this._matchesPosition!==e&&(this._matchesPosition=e,s.matchesPosition=!0,o=!0),this._matchesCount!==t&&(this._matchesCount=t,s.matchesCount=!0,o=!0),typeof i<"u"&&(St.Q.equalsRange(this._currentMatch,i)||(this._currentMatch=i,s.currentMatch=!0,o=!0)),o&&this._onFindReplaceStateChange.fire(s)}change(e,t,i=!0){var s;const o={moveCursor:t,updateHistory:i,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 m=this.isRegex,A=this.wholeWord,U=this.matchCase,W=this.preserveCase;typeof e.searchString<"u"&&this._searchString!==e.searchString&&(this._searchString=e.searchString,o.searchString=!0,c=!0),typeof e.replaceString<"u"&&this._replaceString!==e.replaceString&&(this._replaceString=e.replaceString,o.replaceString=!0,c=!0),typeof e.isRevealed<"u"&&this._isRevealed!==e.isRevealed&&(this._isRevealed=e.isRevealed,o.isRevealed=!0,c=!0),typeof e.isReplaceRevealed<"u"&&this._isReplaceRevealed!==e.isReplaceRevealed&&(this._isReplaceRevealed=e.isReplaceRevealed,o.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"&&(!((s=e.searchScope)===null||s===void 0)&&s.every(re=>{var Se;return(Se=this._searchScope)===null||Se===void 0?void 0:Se.some(Be=>!St.Q.equalsRange(Be,re))})||(this._searchScope=e.searchScope,o.searchScope=!0,c=!0)),typeof e.loop<"u"&&this._loop!==e.loop&&(this._loop=e.loop,o.loop=!0,c=!0),typeof e.isSearching<"u"&&this._isSearching!==e.isSearching&&(this._isSearching=e.isSearching,o.isSearching=!0,c=!0),typeof e.filters<"u"&&(this._filters?this._filters.update(e.filters):this._filters=e.filters,o.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,m!==this.isRegex&&(c=!0,o.isRegex=!0),A!==this.wholeWord&&(c=!0,o.wholeWord=!0),U!==this.matchCase&&(c=!0,o.matchCase=!0),W!==this.preserveCase&&(c=!0,o.preserveCase=!0),c&&this._onFindReplaceStateChange.fire(o)}canNavigateBack(){return this.canNavigateInLoop()||this.matchesPosition!==1}canNavigateForward(){return this.canNavigateInLoop()||this.matchesPosition<this.matchesCount}canNavigateInLoop(){return this._loop||this.matchesCount>=Zl}}var pk=f(68926);function X_(u){var e,t;return((e=u.lookupKeybinding("history.showPrevious"))===null||e===void 0?void 0:e.getElectronAccelerator())==="Up"&&((t=u.lookupKeybinding("history.showNext"))===null||t===void 0?void 0:t.getElectronAccelerator())==="Down"}var t1=function(u,e,t,i){function s(o){return o instanceof t?o:new t(function(c){c(o)})}return new(t||(t=Promise))(function(o,c){function m(W){try{U(i.next(W))}catch(re){c(re)}}function A(W){try{U(i.throw(W))}catch(re){c(re)}}function U(W){W.done?o(W.value):s(W.value).then(m,A)}U((i=i.apply(u,e||[])).next())})};const i1=(0,ho.pU)("find-selection",Mi.W6.selection,we.kg("findSelectionIcon","Icon for 'Find in Selection' in the editor find widget.")),J_=(0,ho.pU)("find-collapsed",Mi.W6.chevronRight,we.kg("findCollapsedIcon","Icon to indicate that the editor find widget is collapsed.")),q_=(0,ho.pU)("find-expanded",Mi.W6.chevronDown,we.kg("findExpandedIcon","Icon to indicate that the editor find widget is expanded.")),n1=(0,ho.pU)("find-replace",Mi.W6.replace,we.kg("findReplaceIcon","Icon for 'Replace' in the editor find widget.")),s1=(0,ho.pU)("find-replace-all",Mi.W6.replaceAll,we.kg("findReplaceAllIcon","Icon for 'Replace All' in the editor find widget.")),o1=(0,ho.pU)("find-previous-match",Mi.W6.arrowUp,we.kg("findPreviousMatchIcon","Icon for 'Find Previous' in the editor find widget.")),r1=(0,ho.pU)("find-next-match",Mi.W6.arrowDown,we.kg("findNextMatchIcon","Icon for 'Find Next' in the editor find widget.")),a1=we.kg("label.find","Find"),l1=we.kg("placeholder.find","Find"),d1=we.kg("label.previousMatchButton","Previous Match"),c1=we.kg("label.nextMatchButton","Next Match"),h1=we.kg("label.toggleSelectionFind","Find in Selection"),u1=we.kg("label.closeButton","Close"),g1=we.kg("label.replace","Replace"),f1=we.kg("placeholder.replace","Replace"),m1=we.kg("label.replaceButton","Replace"),p1=we.kg("label.replaceAllButton","Replace All"),_1=we.kg("label.toggleReplaceButton","Toggle Replace"),v1=we.kg("title.matchesCountLimit","Only the first {0} results are highlighted, but all find operations work on the entire text.",Zl),C1=we.kg("label.matchesLocation","{0} of {1}"),e0=we.kg("label.noResults","No results"),La=419,b1=275-54;let gu=69;const w1=33,t0="ctrlEnterReplaceAll.windows.donotask",i0=Pi.zx?256:2048;class tp{constructor(e){this.afterLineNumber=e,this.heightInPx=w1,this.suppressMouseDown=!1,this.domNode=document.createElement("div"),this.domNode.className="dock-find-viewzone"}}function n0(u,e,t){const i=!!e.match(/\n/);if(t&&i&&t.selectionStart>0){u.stopPropagation();return}}function s0(u,e,t){const i=!!e.match(/\n/);if(t&&i&&t.selectionEnd<t.value.length){u.stopPropagation();return}}class lf extends Cr.x{constructor(e,t,i,s,o,c,m,A,U){super(),this._cachedHeight=null,this._revealTimeouts=[],this._codeEditor=e,this._controller=t,this._state=i,this._contextViewProvider=s,this._keybindingService=o,this._contextKeyService=c,this._storageService=A,this._notificationService=U,this._ctrlEnterReplaceAllWarningPrompted=!!A.getBoolean(t0,0),this._isVisible=!1,this._isReplaceVisible=!1,this._ignoreChangeEvent=!1,this._updateHistoryDelayer=new Ot.ve(500),this._register((0,at.s)(()=>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(83)&&(this._codeEditor.getOption(83)&&this._state.change({isReplaceRevealed:!1},!1),this._updateButtons()),W.hasChanged(133)&&this._tryUpdateWidgetWidth(),W.hasChanged(2)&&this.updateAccessibilitySupport(),W.hasChanged(37)){const re=this._codeEditor.getOption(37).addExtraSpaceOnTop;re&&!this._viewZone&&(this._viewZone=new tp(0),this._showViewZone()),!re&&this._viewZone&&this._removeViewZone()}})),this.updateAccessibilitySupport(),this._register(this._codeEditor.onDidChangeCursorSelection(()=>{this._isVisible&&this._updateToggleSelectionFindButton()})),this._register(this._codeEditor.onDidFocusEditorWidget(()=>t1(this,void 0,void 0,function*(){if(this._isVisible){const W=yield this._controller.getGlobalBufferTerm();W&&W!==this._state.searchString&&(this._state.change({searchString:W},!1),this._findInput.select())}}))),this._findInputFocused=qg.bindTo(c),this._findFocusTracker=this._register(M.w5(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=qm.bindTo(c),this._replaceFocusTracker=this._register(M.w5(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(37).addExtraSpaceOnTop&&(this._viewZone=new tp(0)),this._applyTheme(m.getColorTheme()),this._register(m.onDidColorThemeChange(this._applyTheme.bind(this))),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 lf.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(83)&&!this._isReplaceVisible&&(this._isReplaceVisible=!0,this._replaceInput.width=M.Tr(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 t=this._state.searchString.length>0&&this._state.matchesCount===0;this._domNode.classList.toggle("no-results",t),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,Wi.dz)}_updateHistory(){this._state.searchString&&this._findInput.inputBox.addToHistory(),this._state.replaceString&&this._replaceInput.inputBox.addToHistory()}_updateMatchesCount(){this._matchesCount.style.minWidth=gu+"px",this._state.matchesCount>=Zl?this._matchesCount.title=v1:this._matchesCount.title="",this._matchesCount.firstChild&&this._matchesCount.removeChild(this._matchesCount.firstChild);let e;if(this._state.matchesCount>0){let t=String(this._state.matchesCount);this._state.matchesCount>=Zl&&(t+="+");let i=String(this._state.matchesPosition);i==="0"&&(i="?"),e=xi.GP(C1,i,t)}else e=e0;this._matchesCount.appendChild(document.createTextNode(e)),(0,oi.xE)(this._getAriaLabel(e,this._state.currentMatch,this._state.searchString)),gu=Math.max(gu,this._matchesCount.clientWidth)}_getAriaLabel(e,t,i){if(e===e0)return i===""?we.kg("ariaSearchNoResultEmpty","{0} found",e):we.kg("ariaSearchNoResult","{0} found for '{1}'",e,i);if(t){const s=we.kg("ariaSearchNoResultWithLineNum","{0} found for '{1}', at {2}",e,i,t.startLineNumber+":"+t.startColumn),o=this._codeEditor.getModel();return o&&t.startLineNumber<=o.getLineCount()&&t.startLineNumber>=1?`${o.getLineContent(t.startLineNumber)}, ${s}`:s}return we.kg("ariaSearchNoResultWithLineNumNoCurrentMatch","{0} found for '{1}'",e,i)}_updateToggleSelectionFindButton(){const e=this._codeEditor.getSelection(),t=e?e.startLineNumber!==e.endLineNumber||e.startColumn!==e.endColumn:!1,i=this._toggleSelectionFind.checked;this._isVisible&&(i||t)?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,t=!!this._state.matchesCount;this._prevBtn.setEnabled(this._isVisible&&e&&t&&this._state.canNavigateBack()),this._nextBtn.setEnabled(this._isVisible&&e&&t&&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 i=!this._codeEditor.getOption(83);this._toggleReplaceBtn.setEnabled(this._isVisible&&i)}_reveal(){if(this._revealTimeouts.forEach(e=>{clearTimeout(e)}),this._revealTimeouts=[],!this._isVisible){this._isVisible=!0;const e=this._codeEditor.getSelection();switch(this._codeEditor.getOption(37).autoFindInSelection){case"always":this._toggleSelectionFind.checked=!0;break;case"never":this._toggleSelectionFind.checked=!1;break;case"multiline":{const i=!!e&&e.startLineNumber!==e.endLineNumber;this._toggleSelectionFind.checked=i;break}default: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 t=!0;if(this._codeEditor.getOption(37).seedSearchStringFromSelection&&e){const i=this._codeEditor.getDomNode();if(i){const s=M.BK(i),o=this._codeEditor.getScrolledVisiblePosition(e.getStartPosition()),c=s.left+(o?o.left:0),m=o?o.top:0;if(this._viewZone&&m<this._viewZone.heightInPx){e.endLineNumber>e.startLineNumber&&(t=!1);const A=M.cL(this._domNode).left;c>A&&(t=!1);const U=this._codeEditor.getScrolledVisiblePosition(e.getEndPosition());s.left+(U?U.left:0)>A&&(t=!1)}}}this._showViewZone(t)}}_hide(e){this._revealTimeouts.forEach(t=>{clearTimeout(t)}),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(37).addExtraSpaceOnTop){this._removeViewZone();return}if(!this._isVisible)return;const i=this._viewZone;this._viewZoneId!==void 0||!i||this._codeEditor.changeViewZones(s=>{i.heightInPx=this._getHeight(),this._viewZoneId=s.addZone(i),this._codeEditor.setScrollTop(e||this._codeEditor.getScrollTop()+i.heightInPx)})}_showViewZone(e=!0){if(!this._isVisible||!this._codeEditor.getOption(37).addExtraSpaceOnTop)return;this._viewZone===void 0&&(this._viewZone=new tp(0));const i=this._viewZone;this._codeEditor.changeViewZones(s=>{if(this._viewZoneId!==void 0){const o=this._getHeight();if(o===i.heightInPx)return;const c=o-i.heightInPx;i.heightInPx=o,s.layoutZone(this._viewZoneId),e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+c);return}else{let o=this._getHeight();if(o-=this._codeEditor.getOption(77).top,o<=0)return;i.heightInPx=o,this._viewZoneId=s.addZone(i),e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+o)}})}_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))})}_applyTheme(e){const t={inputActiveOptionBorder:e.getColor(Ce.uNK),inputActiveOptionBackground:e.getColor(Ce.c1f),inputActiveOptionForeground:e.getColor(Ce.$$0),inputBackground:e.getColor(Ce.L4c),inputForeground:e.getColor(Ce.cws),inputBorder:e.getColor(Ce.Zgs),inputValidationInfoBackground:e.getColor(Ce.I$A),inputValidationInfoForeground:e.getColor(Ce.L9Z),inputValidationInfoBorder:e.getColor(Ce.YSW),inputValidationWarningBackground:e.getColor(Ce.ULt),inputValidationWarningForeground:e.getColor(Ce.T5N),inputValidationWarningBorder:e.getColor(Ce.C1n),inputValidationErrorBackground:e.getColor(Ce._$n),inputValidationErrorForeground:e.getColor(Ce.h9z),inputValidationErrorBorder:e.getColor(Ce.eYZ)};this._findInput.style(t),this._replaceInput.style(t),this._toggleSelectionFind.style(t)}_tryUpdateWidgetWidth(){if(!this._isVisible||!M.qD(this._domNode))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 i=e.width,s=e.minimap.minimapWidth;let o=!1,c=!1,m=!1;if(this._resized&&M.Tr(this._domNode)>La){this._domNode.style.maxWidth=`${i-28-s-15}px`,this._replaceInput.width=M.Tr(this._findInput.domNode);return}if(La+28+s>=i&&(c=!0),La+28+s-gu>=i&&(m=!0),La+28+s-gu>=i+50&&(o=!0),this._domNode.classList.toggle("collapsed-find-widget",o),this._domNode.classList.toggle("narrow-find-widget",m),this._domNode.classList.toggle("reduced-find-widget",c),!m&&!o&&(this._domNode.style.maxWidth=`${i-28-s-15}px`),this._resized){this._findInput.inputBox.layout();const A=this._findInput.inputBox.element.clientWidth;A>0&&(this._replaceInput.width=A)}else this._isReplaceVisible&&(this._replaceInput.width=M.Tr(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(t=>{t.endColumn===1&&t.endLineNumber>t.startLineNumber&&(t=t.setEndPosition(t.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(t.endLineNumber-1)));const i=this._state.currentMatch;return t.startLineNumber!==t.endLineNumber&&!St.Q.equalsRange(t,i)?t:null}).filter(t=>!!t),e.length&&this._state.change({searchScope:e},!0)}}_onFindInputMouseDown(e){e.middleButton&&e.stopPropagation()}_onFindInputKeyDown(e){if(e.equals(i0|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 n0(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"));if(e.equals(18))return s0(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"))}_onReplaceInputKeyDown(e){if(e.equals(i0|3))if(this._keybindingService.dispatchEvent(e,e.target)){e.preventDefault();return}else{Pi.uF&&Pi.ib&&!this._ctrlEnterReplaceAllWarningPrompted&&(this._notificationService.info(we.kg("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(t0,!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 n0(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"));if(e.equals(18))return s0(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"))}getVerticalSashLeft(e){return 0}_keybindingLabelFor(e){const t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}_buildDomNode(){this._findInput=this._register(new $h(null,this._contextViewProvider,{width:b1,label:a1,placeholder:l1,appendCaseSensitiveLabel:this._keybindingLabelFor(ps.ToggleCaseSensitiveCommand),appendWholeWordsLabel:this._keybindingLabelFor(ps.ToggleWholeWordCommand),appendRegexLabel:this._keybindingLabelFor(ps.ToggleRegexCommand),validation:A=>{if(A.length===0||!this._findInput.getRegex())return null;try{return new RegExp(A,"gu"),null}catch(U){return{content:U.message}}},flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showHistoryHint:()=>X_(this._keybindingService)},this._contextKeyService,!0)),this._findInput.setRegex(!!this._state.isRegex),this._findInput.setCaseSensitive(!!this._state.matchCase),this._findInput.setWholeWords(!!this._state.wholeWord),this._register(this._findInput.onKeyDown(A=>this._onFindInputKeyDown(A))),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(A=>{A.equals(1026)&&this._isReplaceVisible&&(this._replaceInput.focus(),A.preventDefault())})),this._register(this._findInput.onRegexKeyDown(A=>{A.equals(2)&&this._isReplaceVisible&&(this._replaceInput.focusOnPreserve(),A.preventDefault())})),this._register(this._findInput.inputBox.onDidHeightChange(A=>{this._tryUpdateHeight()&&this._showViewZone()})),Pi.j9&&this._register(this._findInput.onMouseDown(A=>this._onFindInputMouseDown(A))),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount(),this._prevBtn=this._register(new Zc({label:d1+this._keybindingLabelFor(ps.PreviousMatchFindAction),icon:o1,onTrigger:()=>{this._codeEditor.getAction(ps.PreviousMatchFindAction).run().then(void 0,Wi.dz)}})),this._nextBtn=this._register(new Zc({label:c1+this._keybindingLabelFor(ps.NextMatchFindAction),icon:r1,onTrigger:()=>{this._codeEditor.getAction(ps.NextMatchFindAction).run().then(void 0,Wi.dz)}}));const i=document.createElement("div");i.className="find-part",i.appendChild(this._findInput.domNode);const s=document.createElement("div");s.className="find-actions",i.appendChild(s),s.appendChild(this._matchesCount),s.appendChild(this._prevBtn.domNode),s.appendChild(this._nextBtn.domNode),this._toggleSelectionFind=this._register(new Nc.l({icon:i1,title:h1+this._keybindingLabelFor(ps.ToggleSearchScopeCommand),isChecked:!1})),this._register(this._toggleSelectionFind.onChange(()=>{if(this._toggleSelectionFind.checked){if(this._codeEditor.hasModel()){const A=this._codeEditor.getSelections();A.map(U=>(U.endColumn===1&&U.endLineNumber>U.startLineNumber&&(U=U.setEndPosition(U.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(U.endLineNumber-1))),U.isEmpty()?null:U)).filter(U=>!!U),A.length&&this._state.change({searchScope:A},!0)}}else this._state.change({searchScope:null},!0)})),s.appendChild(this._toggleSelectionFind.domNode),this._closeBtn=this._register(new Zc({label:u1+this._keybindingLabelFor(ps.CloseFindWidgetCommand),icon:ho.$_,onTrigger:()=>{this._state.change({isRevealed:!1,searchScope:null},!1)},onKeyDown:A=>{A.equals(2)&&this._isReplaceVisible&&(this._replaceBtn.isEnabled()?this._replaceBtn.focus():this._codeEditor.focus(),A.preventDefault())}})),s.appendChild(this._closeBtn.domNode),this._replaceInput=this._register(new Vl(null,void 0,{label:g1,placeholder:f1,appendPreserveCaseLabel:this._keybindingLabelFor(ps.TogglePreserveCaseCommand),history:[],flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showHistoryHint:()=>X_(this._keybindingService)},this._contextKeyService,!0)),this._replaceInput.setPreserveCase(!!this._state.preserveCase),this._register(this._replaceInput.onKeyDown(A=>this._onReplaceInputKeyDown(A))),this._register(this._replaceInput.inputBox.onDidChange(()=>{this._state.change({replaceString:this._replaceInput.inputBox.value},!1)})),this._register(this._replaceInput.inputBox.onDidHeightChange(A=>{this._isReplaceVisible&&this._tryUpdateHeight()&&this._showViewZone()})),this._register(this._replaceInput.onDidOptionChange(()=>{this._state.change({preserveCase:this._replaceInput.getPreserveCase()},!0)})),this._register(this._replaceInput.onPreserveCaseKeyDown(A=>{A.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(),A.preventDefault())})),this._replaceBtn=this._register(new Zc({label:m1+this._keybindingLabelFor(ps.ReplaceOneAction),icon:n1,onTrigger:()=>{this._controller.replace()},onKeyDown:A=>{A.equals(1026)&&(this._closeBtn.focus(),A.preventDefault())}})),this._replaceAllBtn=this._register(new Zc({label:p1+this._keybindingLabelFor(ps.ReplaceAllAction),icon:s1,onTrigger:()=>{this._controller.replaceAll()}}));const o=document.createElement("div");o.className="replace-part",o.appendChild(this._replaceInput.domNode);const c=document.createElement("div");c.className="replace-actions",o.appendChild(c),c.appendChild(this._replaceBtn.domNode),c.appendChild(this._replaceAllBtn.domNode),this._toggleReplaceBtn=this._register(new Zc({label:_1,className:"codicon toggle left",onTrigger:()=>{this._state.change({isReplaceRevealed:!this._isReplaceVisible},!1),this._isReplaceVisible&&(this._replaceInput.width=M.Tr(this._findInput.domNode),this._replaceInput.inputBox.layout()),this._showViewZone()}})),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.style.width=`${La}px`,this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._domNode.appendChild(i),this._domNode.appendChild(o),this._resizeSash=new Ar.m(this._domNode,this,{orientation:0,size:2}),this._resized=!1;let m=La;this._register(this._resizeSash.onDidStart(()=>{m=M.Tr(this._domNode)})),this._register(this._resizeSash.onDidChange(A=>{this._resized=!0;const U=m+A.startX-A.currentX;if(U<La)return;const W=parseFloat(M.L9(this._domNode).maxWidth)||0;U>W||(this._domNode.style.width=`${U}px`,this._isReplaceVisible&&(this._replaceInput.width=M.Tr(this._findInput.domNode)),this._findInput.inputBox.layout(),this._tryUpdateHeight())})),this._register(this._resizeSash.onDidReset(()=>{const A=M.Tr(this._domNode);if(A<La)return;let U=La;if(!this._resized||A===La){const W=this._codeEditor.getLayoutInfo();U=W.width-28-W.minimap.minimapWidth-15,this._resized=!0}this._domNode.style.width=`${U}px`,this._isReplaceVisible&&(this._replaceInput.width=M.Tr(this._findInput.domNode)),this._findInput.inputBox.layout()}))}updateAccessibilitySupport(){const e=this._codeEditor.getOption(2);this._findInput.setFocusInputOnOptionClick(e!==2)}}lf.ID="editor.contrib.findWidget";class Zc extends Cr.x{constructor(e){super(),this._opts=e;let t="button";this._opts.className&&(t=t+" "+this._opts.className),this._opts.icon&&(t=t+" "+Ye.L0.asClassName(this._opts.icon)),this._domNode=document.createElement("div"),this._domNode.title=this._opts.label,this._domNode.tabIndex=0,this._domNode.className=t,this._domNode.setAttribute("role","button"),this._domNode.setAttribute("aria-label",this._opts.label),this.onclick(this._domNode,i=>{this._opts.onTrigger(),i.preventDefault()}),this.onkeydown(this._domNode,i=>{var s,o;if(i.equals(10)||i.equals(3)){this._opts.onTrigger(),i.preventDefault();return}(o=(s=this._opts).onKeyDown)===null||o===void 0||o.call(s,i)})}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(...Ye.L0.asClassNameArray(J_)),this._domNode.classList.add(...Ye.L0.asClassNameArray(q_))):(this._domNode.classList.remove(...Ye.L0.asClassNameArray(q_)),this._domNode.classList.add(...Ye.L0.asClassNameArray(J_)))}}(0,Ye.zy)((u,e)=>{const t=(Qe,tt)=>{tt&&e.addRule(`.monaco-editor ${Qe} { background-color: ${tt}; }`)};t(".findMatch",u.getColor(Ce.Ubg)),t(".currentFindMatch",u.getColor(Ce.Syz)),t(".findScope",u.getColor(Ce.Q96));const i=u.getColor(Ce.CgL);t(".find-widget",i);const s=u.getColor(Ce.f9l);s&&e.addRule(`.monaco-editor .find-widget { box-shadow: 0 0 8px 2px ${s}; }`);const o=u.getColor(Ce.ECk);o&&e.addRule(`.monaco-editor .findMatch { border: 1px ${(0,Ro.Bb)(u.type)?"dotted":"solid"} ${o}; box-sizing: border-box; }`);const c=u.getColor(Ce._NC);c&&e.addRule(`.monaco-editor .currentFindMatch { border: 2px solid ${c}; padding: 1px; box-sizing: border-box; }`);const m=u.getColor(Ce.S5J);m&&e.addRule(`.monaco-editor .findScope { border: 1px ${(0,Ro.Bb)(u.type)?"dashed":"solid"} ${m}; }`);const A=u.getColor(Ce.b1q);A&&e.addRule(`.monaco-editor .find-widget { border: 1px solid ${A}; }`);const U=u.getColor(Ce.FiB);U&&e.addRule(`.monaco-editor .find-widget { color: ${U}; }`);const W=u.getColor(Ce.UPX);W&&e.addRule(`.monaco-editor .find-widget.no-results .matchesCount { color: ${W}; }`);const re=u.getColor(Ce.US);if(re)e.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${re}; }`);else{const Qe=u.getColor(Ce.sIe);Qe&&e.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${Qe}; }`)}const Se=u.getColor(Ce.ObF);Se&&e.addRule(` .monaco-editor .find-widget .button:not(.disabled):hover, .monaco-editor .find-widget .codicon-find-selection:hover { background-color: ${Se} !important; } `);const Be=u.getColor(Ce.tAP);Be&&e.addRule(`.monaco-editor .find-widget .monaco-inputbox.synthetic-focus { outline-color: ${Be}; }`)});var o0=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},Da=function(u,e){return function(t,i){e(t,i,u)}},Wd=function(u,e,t,i){function s(o){return o instanceof t?o:new t(function(c){c(o)})}return new(t||(t=Promise))(function(o,c){function m(W){try{U(i.next(W))}catch(re){c(re)}}function A(W){try{U(i.throw(W))}catch(re){c(re)}}function U(W){W.done?o(W.value):s(W.value).then(m,A)}U((i=i.apply(u,e||[])).next())})};const S1=524288;function ip(u,e="single",t=!1){if(!u.hasModel())return null;const i=u.getSelection();if(e==="single"&&i.startLineNumber===i.endLineNumber||e==="multiple"){if(i.isEmpty()){const s=u.getConfiguredWordAtPosition(i.getStartPosition());if(s&&t===!1)return s.word}else if(u.getModel().getValueLengthInRange(i)<S1)return u.getModel().getValueInRange(i)}return null}let Xo=class CC extends at.jG{constructor(e,t,i,s){super(),this._editor=e,this._findWidgetVisible=Ql.bindTo(t),this._contextKeyService=t,this._storageService=i,this._clipboardService=s,this._updateHistoryDelayer=new Ot.ve(500),this._state=this._register(new e1),this.loadQueryState(),this._register(this._state.onFindReplaceStateChange(o=>this._onStateChanged(o))),this._model=null,this._register(this._editor.onDidChangeModel(()=>{const o=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),o&&this._start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!1,updateSearchScope:!1,loop:this._editor.getOption(37).loop})}))}get editor(){return this._editor}static get(e){return e.getContribution(CC.ID)}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,0),e.wholeWord&&this._storageService.store("editor.wholeWord",this._state.actualWholeWord,1,0),e.matchCase&&this._storageService.store("editor.matchCase",this._state.actualMatchCase,1,0),e.preserveCase&&this._storageService.store("editor.preserveCase",this._state.actualPreserveCase,1,0)}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!!qg.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()){const e=this._editor.getSelections();e.map(t=>(t.endColumn===1&&t.endLineNumber>t.startLineNumber&&(t=t.setEndPosition(t.endLineNumber-1,this._editor.getModel().getLineMaxColumn(t.endLineNumber-1))),t.isEmpty()?null:t)).filter(t=>!!t),e.length&&this._state.change({searchScope:e},!0)}}setSearchString(e){this._state.isRegex&&(e=xi.bm(e)),this._state.change({searchString:e},!1)}highlightFindOptions(e=!1){}_start(e,t){return Wd(this,void 0,void 0,function*(){if(this.disposeModel(),!this._editor.hasModel())return;const i=Object.assign(Object.assign({},t),{isRevealed:!0});if(e.seedSearchStringFromSelection==="single"){const s=ip(this._editor,e.seedSearchStringFromSelection,e.seedSearchStringFromNonEmptySelection);s&&(this._state.isRegex?i.searchString=xi.bm(s):i.searchString=s)}else if(e.seedSearchStringFromSelection==="multiple"&&!e.updateSearchScope){const s=ip(this._editor,e.seedSearchStringFromSelection);s&&(i.searchString=s)}if(!i.searchString&&e.seedSearchStringFromGlobalClipboard){const s=yield this.getGlobalBufferTerm();if(!this._editor.hasModel())return;s&&(i.searchString=s)}if(e.forceRevealReplace||i.isReplaceRevealed?i.isReplaceRevealed=!0:this._findWidgetVisible.get()||(i.isReplaceRevealed=!1),e.updateSearchScope){const s=this._editor.getSelections();s.some(o=>!o.isEmpty())&&(i.searchScope=s)}i.loop=e.loop,this._state.change(i,!1),this._model||(this._model=new uu(this._editor,this._state))})}start(e,t){return this._start(e,t)}moveToNextMatch(){return this._model?(this._model.moveToNextMatch(),!0):!1}moveToPrevMatch(){return this._model?(this._model.moveToPrevMatch(),!0):!1}replace(){return this._model?(this._model.replace(),!0):!1}replaceAll(){return this._model?(this._model.replaceAll(),!0):!1}selectAllMatches(){return this._model?(this._model.selectAllMatches(),this._editor.focus(),!0):!1}getGlobalBufferTerm(){return Wd(this,void 0,void 0,function*(){return this._editor.getOption(37).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()?this._clipboardService.readFindText():""})}setGlobalBufferTerm(e){this._editor.getOption(37).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()&&this._clipboardService.writeFindText(e)}};Xo.ID="editor.contrib.findController",Xo=o0([Da(1,ct.fN),Da(2,fo.CS),Da(3,Oi.h)],Xo);let np=class extends Xo{constructor(e,t,i,s,o,c,m,A){super(e,i,m,A),this._contextViewService=t,this._keybindingService=s,this._themeService=o,this._notificationService=c,this._widget=null,this._findOptionsWidget=null}_start(e,t){const i=Object.create(null,{_start:{get:()=>super._start}});return Wd(this,void 0,void 0,function*(){this._widget||this._createFindWidget();const s=this._editor.getSelection();let o=!1;switch(this._editor.getOption(37).autoFindInSelection){case"always":o=!0;break;case"never":o=!1;break;case"multiline":{o=!!s&&s.startLineNumber!==s.endLineNumber;break}default:break}e.updateSearchScope=e.updateSearchScope||o,yield i._start.call(this,e,t),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 lf(this._editor,this,this._state,this._contextViewService,this._keybindingService,this._contextKeyService,this._themeService,this._storageService,this._notificationService)),this._findOptionsWidget=this._register(new rf(this._editor,this._state,this._keybindingService,this._themeService))}};np=o0([Da(1,be.l),Da(2,ct.fN),Da(3,ye.b),Da(4,Ye.Gy),Da(5,Cs.Ot),Da(6,fo.CS),Da(7,Oi.h)],np),(0,Te.gW)(new Te.PF({id:ps.StartFindAction,label:we.kg("startFindAction","Find"),alias:"Find",precondition:ct.M$.or(ze.R.focus,ct.M$.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2084,weight:100},menuOpts:{menuId:xe.D8.MenubarEditMenu,group:"3_find",title:we.kg({key:"miFind",comment:["&& denotes a mnemonic"]},"&&Find"),order:1}})).addImplementation(0,(u,e,t)=>{const i=Xo.get(e);return i?i.start({forceRevealReplace:!1,seedSearchStringFromSelection:e.getOption(37).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:e.getOption(37).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:e.getOption(37).globalFindClipboard,shouldFocus:1,shouldAnimate:!0,updateSearchScope:!1,loop:e.getOption(37).loop}):!1});const y1={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"},regex:{type:"boolean"},regexOverride:{type:"number",description:we.kg("actions.find.isRegexOverride",`Overrides "Use Regular Expression" flag. The flag will not be saved for the future. 0: Do Nothing 1: True 2: False`)},wholeWord:{type:"boolean"},wholeWordOverride:{type:"number",description:we.kg("actions.find.wholeWordOverride",`Overrides "Match Whole Word" flag. The flag will not be saved for the future. 0: Do Nothing 1: True 2: False`)},matchCase:{type:"boolean"},matchCaseOverride:{type:"number",description:we.kg("actions.find.matchCaseOverride",`Overrides "Math Case" flag. The flag will not be saved for the future. 0: Do Nothing 1: True 2: False`)},preserveCase:{type:"boolean"},preserveCaseOverride:{type:"number",description:we.kg("actions.find.preserveCaseOverride",`Overrides "Preserve Case" flag. The flag will not be saved for the future. 0: Do Nothing 1: True 2: False`)},findInSelection:{type:"boolean"}}}}]};class L1 extends Te.ks{constructor(){super({id:ps.StartFindWithArgs,label:we.kg("startFindWithArgsAction","Find With Arguments"),alias:"Find With Arguments",precondition:void 0,kbOpts:{kbExpr:null,primary:0,weight:100},description:y1})}run(e,t,i){return Wd(this,void 0,void 0,function*(){const s=Xo.get(t);if(s){const o=i?{searchString:i.searchString,replaceString:i.replaceString,isReplaceRevealed:i.replaceString!==void 0,isRegex:i.isRegex,wholeWord:i.matchWholeWord,matchCase:i.isCaseSensitive,preserveCase:i.preserveCase}:{};yield s.start({forceRevealReplace:!1,seedSearchStringFromSelection:s.getState().searchString.length===0&&t.getOption(37).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:t.getOption(37).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:1,shouldAnimate:!0,updateSearchScope:i?.findInSelection||!1,loop:t.getOption(37).loop},o),s.setGlobalBufferTerm(s.getState().searchString)}})}}class D1 extends Te.ks{constructor(){super({id:ps.StartFindWithSelection,label:we.kg("startFindWithSelectionAction","Find With Selection"),alias:"Find With Selection",precondition:void 0,kbOpts:{kbExpr:null,primary:0,mac:{primary:2083},weight:100}})}run(e,t){return Wd(this,void 0,void 0,function*(){const i=Xo.get(t);i&&(yield i.start({forceRevealReplace:!1,seedSearchStringFromSelection:"multiple",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(37).loop}),i.setGlobalBufferTerm(i.getState().searchString))})}}class r0 extends Te.ks{run(e,t){return Wd(this,void 0,void 0,function*(){const i=Xo.get(t);i&&!this._run(i)&&(yield i.start({forceRevealReplace:!1,seedSearchStringFromSelection:i.getState().searchString.length===0&&t.getOption(37).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:t.getOption(37).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(37).loop}),this._run(i))})}}class k1 extends r0{constructor(){super({id:ps.NextMatchFindAction,label:we.kg("findNextMatchAction","Find Next"),alias:"Find Next",precondition:void 0,kbOpts:[{kbExpr:ze.R.focus,primary:61,mac:{primary:2085,secondary:[61]},weight:100},{kbExpr:ct.M$.and(ze.R.focus,qg),primary:3,weight:100}]})}_run(e){return e.moveToNextMatch()?(e.editor.pushUndoStop(),!0):!1}}class E1 extends r0{constructor(){super({id:ps.PreviousMatchFindAction,label:we.kg("findPreviousMatchAction","Find Previous"),alias:"Find Previous",precondition:void 0,kbOpts:[{kbExpr:ze.R.focus,primary:1085,mac:{primary:3109,secondary:[1085]},weight:100},{kbExpr:ct.M$.and(ze.R.focus,qg),primary:1027,weight:100}]})}_run(e){return e.moveToPrevMatch()}}class a0 extends Te.ks{run(e,t){return Wd(this,void 0,void 0,function*(){const i=Xo.get(t);if(!i)return;const s=t.getOption(37).seedSearchStringFromSelection==="selection";let o=null;t.getOption(37).seedSearchStringFromSelection!=="never"&&(o=ip(t,"single",s)),o&&i.setSearchString(o),this._run(i)||(yield i.start({forceRevealReplace:!1,seedSearchStringFromSelection:t.getOption(37).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:s,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(37).loop}),this._run(i))})}}class x1 extends a0{constructor(){super({id:ps.NextSelectionMatchFindAction,label:we.kg("nextSelectionMatchFindAction","Find Next Selection"),alias:"Find Next Selection",precondition:void 0,kbOpts:{kbExpr:ze.R.focus,primary:2109,weight:100}})}_run(e){return e.moveToNextMatch()}}class I1 extends a0{constructor(){super({id:ps.PreviousSelectionMatchFindAction,label:we.kg("previousSelectionMatchFindAction","Find Previous Selection"),alias:"Find Previous Selection",precondition:void 0,kbOpts:{kbExpr:ze.R.focus,primary:3133,weight:100}})}_run(e){return e.moveToPrevMatch()}}(0,Te.gW)(new Te.PF({id:ps.StartFindReplaceAction,label:we.kg("startReplace","Replace"),alias:"Replace",precondition:ct.M$.or(ze.R.focus,ct.M$.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2086,mac:{primary:2596},weight:100},menuOpts:{menuId:xe.D8.MenubarEditMenu,group:"3_find",title:we.kg({key:"miReplace",comment:["&& denotes a mnemonic"]},"&&Replace"),order:2}})).addImplementation(0,(u,e,t)=>{if(!e.hasModel()||e.getOption(83))return!1;const i=Xo.get(e);if(!i)return!1;const s=e.getSelection(),o=i.isFindInputFocused(),c=!s.isEmpty()&&s.startLineNumber===s.endLineNumber&&e.getOption(37).seedSearchStringFromSelection!=="never"&&!o,m=o||c?2:1;return i.start({forceRevealReplace:!0,seedSearchStringFromSelection:c?"single":"none",seedSearchStringFromNonEmptySelection:e.getOption(37).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:e.getOption(37).seedSearchStringFromSelection!=="never",shouldFocus:m,shouldAnimate:!0,updateSearchScope:!1,loop:e.getOption(37).loop})}),(0,Te.HW)(Xo.ID,np),(0,Te.Fl)(L1),(0,Te.Fl)(D1),(0,Te.Fl)(k1),(0,Te.Fl)(E1),(0,Te.Fl)(x1),(0,Te.Fl)(I1);const oa=Te.DX.bindToContribution(Xo.get);(0,Te.E_)(new oa({id:ps.CloseFindWidgetCommand,precondition:Ql,handler:u=>u.closeFindWidget(),kbOpts:{weight:100+5,kbExpr:ct.M$.and(ze.R.focus,ct.M$.not("isComposing")),primary:9,secondary:[1033]}})),(0,Te.E_)(new oa({id:ps.ToggleCaseSensitiveCommand,precondition:void 0,handler:u=>u.toggleCaseSensitive(),kbOpts:{weight:100+5,kbExpr:ze.R.focus,primary:ef.primary,mac:ef.mac,win:ef.win,linux:ef.linux}})),(0,Te.E_)(new oa({id:ps.ToggleWholeWordCommand,precondition:void 0,handler:u=>u.toggleWholeWords(),kbOpts:{weight:100+5,kbExpr:ze.R.focus,primary:tf.primary,mac:tf.mac,win:tf.win,linux:tf.linux}})),(0,Te.E_)(new oa({id:ps.ToggleRegexCommand,precondition:void 0,handler:u=>u.toggleRegex(),kbOpts:{weight:100+5,kbExpr:ze.R.focus,primary:nf.primary,mac:nf.mac,win:nf.win,linux:nf.linux}})),(0,Te.E_)(new oa({id:ps.ToggleSearchScopeCommand,precondition:void 0,handler:u=>u.toggleSearchScope(),kbOpts:{weight:100+5,kbExpr:ze.R.focus,primary:sf.primary,mac:sf.mac,win:sf.win,linux:sf.linux}})),(0,Te.E_)(new oa({id:ps.TogglePreserveCaseCommand,precondition:void 0,handler:u=>u.togglePreserveCase(),kbOpts:{weight:100+5,kbExpr:ze.R.focus,primary:of.primary,mac:of.mac,win:of.win,linux:of.linux}})),(0,Te.E_)(new oa({id:ps.ReplaceOneAction,precondition:Ql,handler:u=>u.replace(),kbOpts:{weight:100+5,kbExpr:ze.R.focus,primary:3094}})),(0,Te.E_)(new oa({id:ps.ReplaceOneAction,precondition:Ql,handler:u=>u.replace(),kbOpts:{weight:100+5,kbExpr:ct.M$.and(ze.R.focus,qm),primary:3}})),(0,Te.E_)(new oa({id:ps.ReplaceAllAction,precondition:Ql,handler:u=>u.replaceAll(),kbOpts:{weight:100+5,kbExpr:ze.R.focus,primary:2563}})),(0,Te.E_)(new oa({id:ps.ReplaceAllAction,precondition:Ql,handler:u=>u.replaceAll(),kbOpts:{weight:100+5,kbExpr:ct.M$.and(ze.R.focus,qm),primary:void 0,mac:{primary:2051}}})),(0,Te.E_)(new oa({id:ps.SelectAllMatchesAction,precondition:Ql,handler:u=>u.selectAllMatches(),kbOpts:{weight:100+5,kbExpr:ze.R.focus,primary:515}}));var bk=f(73152);const l0=65535,ra=16777215,d0=4278190080;class sp{constructor(e){const t=Math.ceil(e/32);this._states=new Uint32Array(t)}get(e){const t=e/32|0,i=e%32;return(this._states[t]&1<<i)!==0}set(e,t){const i=e/32|0,s=e%32,o=this._states[i];t?this._states[i]=o|1<<s:this._states[i]=o&~(1<<s)}}class ur{constructor(e,t,i){if(this.sourceAbbr={[0]:" ",[1]:"u",[2]:"r"},e.length!==t.length||e.length>l0)throw new Error("invalid startIndexes or endIndexes size");this._startIndexes=e,this._endIndexes=t,this._collapseStates=new sp(e.length),this._userDefinedStates=new sp(e.length),this._recoveredStates=new sp(e.length),this._types=i,this._parentsComputed=!1}ensureParentIndices(){if(!this._parentsComputed){this._parentsComputed=!0;const e=[],t=(i,s)=>{const o=e[e.length-1];return this.getStartLineNumber(o)<=i&&this.getEndLineNumber(o)>=s};for(let i=0,s=this._startIndexes.length;i<s;i++){const o=this._startIndexes[i],c=this._endIndexes[i];if(o>ra||c>ra)throw new Error("startLineNumber or endLineNumber must not exceed "+ra);for(;e.length>0&&!t(o,c);)e.pop();const m=e.length>0?e[e.length-1]:-1;e.push(i),this._startIndexes[i]=o+((m&255)<<24),this._endIndexes[i]=c+((m&65280)<<16)}}}get length(){return this._startIndexes.length}getStartLineNumber(e){return this._startIndexes[e]&ra}getEndLineNumber(e){return this._endIndexes[e]&ra}getType(e){return this._types?this._types[e]:void 0}hasTypes(){return!!this._types}isCollapsed(e){return this._collapseStates.get(e)}setCollapsed(e,t){this._collapseStates.set(e,t)}isUserDefined(e){return this._userDefinedStates.get(e)}setUserDefined(e,t){return this._userDefinedStates.set(e,t)}isRecovered(e){return this._recoveredStates.get(e)}setRecovered(e,t){return this._recoveredStates.set(e,t)}getSource(e){return this.isUserDefined(e)?1:this.isRecovered(e)?2:0}setSource(e,t){t===1?(this.setUserDefined(e,!0),this.setRecovered(e,!1)):t===2?(this.setUserDefined(e,!1),this.setRecovered(e,!0)):(this.setUserDefined(e,!1),this.setRecovered(e,!1))}setCollapsedAllOfType(e,t){let i=!1;if(this._types)for(let s=0;s<this._types.length;s++)this._types[s]===e&&(this.setCollapsed(s,t),i=!0);return i}toRegion(e){return new N1(this,e)}getParentIndex(e){this.ensureParentIndices();const t=((this._startIndexes[e]&d0)>>>24)+((this._endIndexes[e]&d0)>>>16);return t===l0?-1:t}contains(e,t){return this.getStartLineNumber(e)<=t&&this.getEndLineNumber(e)>=t}findIndex(e){let t=0,i=this._startIndexes.length;if(i===0)return-1;for(;t<i;){const s=Math.floor((t+i)/2);e<this.getStartLineNumber(s)?i=s:t=s+1}return t-1}findRange(e){let t=this.findIndex(e);if(t>=0){if(this.getEndLineNumber(t)>=e)return t;for(t=this.getParentIndex(t);t!==-1;){if(this.contains(t,e))return t;t=this.getParentIndex(t)}}return-1}toString(){const e=[];for(let t=0;t<this.length;t++)e[t]=`[${this.sourceAbbr[this.getSource(t)]}${this.isCollapsed(t)?"+":"-"}] ${this.getStartLineNumber(t)}/${this.getEndLineNumber(t)}`;return e.join(", ")}toFoldRange(e){return{startLineNumber:this._startIndexes[e]&ra,endLineNumber:this._endIndexes[e]&ra,type:this._types?this._types[e]:void 0,isCollapsed:this.isCollapsed(e),source:this.getSource(e)}}static fromFoldRanges(e){const t=e.length,i=new Uint32Array(t),s=new Uint32Array(t);let o=[],c=!1;for(let A=0;A<t;A++){const U=e[A];i[A]=U.startLineNumber,s[A]=U.endLineNumber,o.push(U.type),U.type&&(c=!0)}c||(o=void 0);const m=new ur(i,s,o);for(let A=0;A<t;A++)e[A].isCollapsed&&m.setCollapsed(A,!0),m.setSource(A,e[A].source);return m}static sanitizeAndMerge(e,t,i){i=i??Number.MAX_VALUE;const s=(tt,vt)=>Array.isArray(tt)?Ht=>Ht<vt?tt[Ht]:void 0:Ht=>Ht<vt?tt.toFoldRange(Ht):void 0,o=s(e,e.length),c=s(t,t.length);let m=0,A=0,U=o(0),W=c(0);const re=[];let Se,Be=0;const Qe=[];for(;U||W;){let tt;if(W&&(!U||U.startLineNumber>=W.startLineNumber))U&&U.startLineNumber===W.startLineNumber?(W.source===1?tt=W:(tt=U,tt.isCollapsed=W.isCollapsed&&U.endLineNumber===W.endLineNumber,tt.source=0),U=o(++m)):(tt=W,W.isCollapsed&&W.source===0&&(tt.source=2)),W=c(++A);else{let vt=A,Ht=W;for(;;){if(!Ht||Ht.startLineNumber>U.endLineNumber){tt=U;break}if(Ht.source===1&&Ht.endLineNumber>U.endLineNumber)break;Ht=c(++vt)}U=o(++m)}if(tt){for(;Se&&Se.endLineNumber<tt.startLineNumber;)Se=re.pop();tt.endLineNumber>tt.startLineNumber&&tt.startLineNumber>Be&&tt.endLineNumber<=i&&(!Se||Se.endLineNumber>=tt.endLineNumber)&&(Qe.push(tt),Be=tt.startLineNumber,Se&&re.push(Se),Se=tt)}}return Qe}}class N1{constructor(e,t){this.ranges=e,this.index=t}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 M1{constructor(e,t){this._updateEventEmitter=new Vi.vl,this.onDidChange=this._updateEventEmitter.event,this._textModel=e,this._decorationProvider=t,this._regions=new ur(new Uint32Array(0),new Uint32Array(0)),this._editorDecorationIds=[]}get regions(){return this._regions}get textModel(){return this._textModel}toggleCollapseState(e){if(!e.length)return;e=e.sort((i,s)=>i.regionIndex-s.regionIndex);const t={};this._decorationProvider.changeDecorations(i=>{let s=0,o=-1,c=-1;const m=A=>{for(;s<A;){const U=this._regions.getEndLineNumber(s),W=this._regions.isCollapsed(s);if(U<=o){const re=this.regions.getSource(s)!==0;i.changeDecorationOptions(this._editorDecorationIds[s],this._decorationProvider.getDecorationOption(W,U<=c,re))}W&&U>c&&(c=U),s++}};for(const A of e){const U=A.regionIndex,W=this._editorDecorationIds[U];if(W&&!t[W]){t[W]=!0,m(U);const re=!this._regions.isCollapsed(U);this._regions.setCollapsed(U,re),o=Math.max(o,this._regions.getEndLineNumber(U))}}m(this._regions.length)}),this._updateEventEmitter.fire({model:this,collapseStateChanged:e})}removeManualRanges(e){const t=new Array,i=s=>{for(const o of e)if(!(o.startLineNumber>s.endLineNumber||s.startLineNumber>o.endLineNumber))return!0;return!1};for(let s=0;s<this._regions.length;s++){const o=this._regions.toFoldRange(s);(o.source===0||!i(o))&&t.push(o)}this.updatePost(ur.fromFoldRanges(t))}update(e,t=[]){const i=this._currentFoldedOrManualRanges(t),s=ur.sanitizeAndMerge(e,i,this._textModel.getLineCount());this.updatePost(ur.fromFoldRanges(s))}updatePost(e){const t=[];let i=-1;for(let s=0,o=e.length;s<o;s++){const c=e.getStartLineNumber(s),m=e.getEndLineNumber(s),A=e.isCollapsed(s),U=e.getSource(s)!==0,W={startLineNumber:c,startColumn:this._textModel.getLineMaxColumn(c),endLineNumber:m,endColumn:this._textModel.getLineMaxColumn(m)+1};t.push({range:W,options:this._decorationProvider.getDecorationOption(A,m<=i,U)}),A&&m>i&&(i=m)}this._decorationProvider.changeDecorations(s=>this._editorDecorationIds=s.deltaDecorations(this._editorDecorationIds,t)),this._regions=e,this._updateEventEmitter.fire({model:this})}_currentFoldedOrManualRanges(e=[]){const t=(s,o)=>{for(const c of e)if(s<c&&c<=o)return!0;return!1},i=[];for(let s=0,o=this._regions.length;s<o;s++){let c=this.regions.isCollapsed(s);const m=this.regions.getSource(s);if(c||m!==0){const A=this._regions.toFoldRange(s),U=this._textModel.getDecorationRange(this._editorDecorationIds[s]);U&&(c&&(t(U.startLineNumber,U.endLineNumber)||U.endLineNumber-U.startLineNumber!==A.endLineNumber-A.startLineNumber)&&(c=!1),i.push({startLineNumber:U.startLineNumber,endLineNumber:U.endLineNumber,type:A.type,isCollapsed:c,source:m}))}}return i}getMemento(){const e=this._currentFoldedOrManualRanges(),t=[];for(let i=0,s=e.length;i<s;i++){const o=e[i],c=this._getLinesChecksum(o.startLineNumber+1,o.endLineNumber);t.push({startLineNumber:o.startLineNumber,endLineNumber:o.endLineNumber,isCollapsed:o.isCollapsed,source:o.source,checksum:c})}return t.length>0?t:void 0}applyMemento(e){var t,i;if(!Array.isArray(e))return;const s=[],o=this._textModel.getLineCount();for(const m of e){if(m.startLineNumber>=m.endLineNumber||m.startLineNumber<1||m.endLineNumber>o)continue;const A=this._getLinesChecksum(m.startLineNumber+1,m.endLineNumber);(!m.checksum||A===m.checksum)&&s.push({startLineNumber:m.startLineNumber,endLineNumber:m.endLineNumber,type:void 0,isCollapsed:(t=m.isCollapsed)!==null&&t!==void 0?t:!0,source:(i=m.source)!==null&&i!==void 0?i:0})}const c=ur.sanitizeAndMerge(this._regions,s,o);this.updatePost(ur.fromFoldRanges(c))}_getLinesChecksum(e,t){return(0,tr.tW)(this._textModel.getLineContent(e)+this._textModel.getLineContent(t))%1e6}dispose(){this._decorationProvider.removeDecorations(this._editorDecorationIds)}getAllRegionsAtLine(e,t){const i=[];if(this._regions){let s=this._regions.findRange(e),o=1;for(;s>=0;){const c=this._regions.toRegion(s);(!t||t(c,o))&&i.push(c),o++,s=c.parentIndex}}return i}getRegionAtLine(e){if(this._regions){const t=this._regions.findRange(e);if(t>=0)return this._regions.toRegion(t)}return null}getRegionsInside(e,t){const i=[],s=e?e.regionIndex+1:0,o=e?e.endLineNumber:Number.MAX_VALUE;if(t&&t.length===2){const c=[];for(let m=s,A=this._regions.length;m<A;m++){const U=this._regions.toRegion(m);if(this._regions.getStartLineNumber(m)<o){for(;c.length>0&&!U.containedBy(c[c.length-1]);)c.pop();c.push(U),t(U,c.length)&&i.push(U)}else break}}else for(let c=s,m=this._regions.length;c<m;c++){const A=this._regions.toRegion(c);if(this._regions.getStartLineNumber(c)<o)(!t||t(A))&&i.push(A);else break}return i}}function T1(u,e,t){const i=[];for(const s of t){const o=u.getRegionAtLine(s);if(o){const c=!o.isCollapsed;if(i.push(o),e>1){const m=u.getRegionsInside(o,(A,U)=>A.isCollapsed!==c&&U<e);i.push(...m)}}}u.toggleCollapseState(i)}function Yc(u,e,t=Number.MAX_VALUE,i){const s=[];if(i&&i.length>0)for(const o of i){const c=u.getRegionAtLine(o);if(c&&(c.isCollapsed!==e&&s.push(c),t>1)){const m=u.getRegionsInside(c,(A,U)=>A.isCollapsed!==e&&U<t);s.push(...m)}}else{const o=u.getRegionsInside(null,(c,m)=>c.isCollapsed!==e&&m<t);s.push(...o)}u.toggleCollapseState(s)}function c0(u,e,t,i){const s=[];for(const o of i){const c=u.getAllRegionsAtLine(o,(m,A)=>m.isCollapsed!==e&&A<=t);s.push(...c)}u.toggleCollapseState(s)}function R1(u,e,t){const i=[];for(const s of t){const o=u.getAllRegionsAtLine(s,c=>c.isCollapsed!==e);o.length>0&&i.push(o[0])}u.toggleCollapseState(i)}function A1(u,e,t,i){const s=(c,m)=>m===e&&c.isCollapsed!==t&&!i.some(A=>c.containsLine(A)),o=u.getRegionsInside(null,s);u.toggleCollapseState(o)}function h0(u,e,t){const i=[];for(const c of t){const m=u.getAllRegionsAtLine(c,void 0);m.length>0&&i.push(m[0])}const s=c=>i.every(m=>!m.containedBy(c)&&!c.containedBy(m))&&c.isCollapsed!==e,o=u.getRegionsInside(null,s);u.toggleCollapseState(o)}function op(u,e,t){const i=u.textModel,s=u.regions,o=[];for(let c=s.length-1;c>=0;c--)if(t!==s.isCollapsed(c)){const m=s.getStartLineNumber(c);e.test(i.getLineContent(m))&&o.push(s.toRegion(c))}u.toggleCollapseState(o)}function rp(u,e,t){const i=u.regions,s=[];for(let o=i.length-1;o>=0;o--)t!==i.isCollapsed(o)&&e===i.getType(o)&&s.push(i.toRegion(o));u.toggleCollapseState(s)}function O1(u,e){let t=null;const i=e.getRegionAtLine(u);if(i!==null&&(t=i.startLineNumber,u===t)){const s=i.parentIndex;s!==-1?t=e.regions.getStartLineNumber(s):t=null}return t}function P1(u,e){let t=e.getRegionAtLine(u);if(t!==null&&t.startLineNumber===u){if(u!==t.startLineNumber)return t.startLineNumber;{const i=t.parentIndex;let s=0;for(i!==-1&&(s=e.regions.getStartLineNumber(t.parentIndex));t!==null;)if(t.regionIndex>0){if(t=e.regions.toRegion(t.regionIndex-1),t.startLineNumber<=s)return null;if(t.parentIndex===i)return t.startLineNumber}else return null}}else if(e.regions.length>0)for(t=e.regions.toRegion(e.regions.length-1);t!==null;){if(t.startLineNumber<u)return t.startLineNumber;t.regionIndex>0?t=e.regions.toRegion(t.regionIndex-1):t=null}return null}function F1(u,e){let t=e.getRegionAtLine(u);if(t!==null&&t.startLineNumber===u){const i=t.parentIndex;let s=0;if(i!==-1)s=e.regions.getEndLineNumber(t.parentIndex);else{if(e.regions.length===0)return null;s=e.regions.getEndLineNumber(e.regions.length-1)}for(;t!==null;)if(t.regionIndex<e.regions.length){if(t=e.regions.toRegion(t.regionIndex+1),t.startLineNumber>=s)return null;if(t.parentIndex===i)return t.startLineNumber}else return null}else if(e.regions.length>0)for(t=e.regions.toRegion(0);t!==null;){if(t.startLineNumber>u)return t.startLineNumber;t.regionIndex<e.regions.length?t=e.regions.toRegion(t.regionIndex+1):t=null}return null}var B1=f(3902);class W1{constructor(e){this._updateEventEmitter=new Vi.vl,this._hasLineChanges=!1,this._foldingModel=e,this._foldingModelListener=e.onDidChange(t=>this.updateHiddenRanges()),this._hiddenRanges=[],e.regions.length&&this.updateHiddenRanges()}get onDidChange(){return this._updateEventEmitter.event}get hiddenRanges(){return this._hiddenRanges}notifyChangeModelContent(e){this._hiddenRanges.length&&!this._hasLineChanges&&(this._hasLineChanges=e.changes.some(t=>t.range.endLineNumber!==t.range.startLineNumber||(0,B1.W)(t.text)[0]!==0))}updateHiddenRanges(){let e=!1;const t=[];let i=0,s=0,o=Number.MAX_VALUE,c=-1;const m=this._foldingModel.regions;for(;i<m.length;i++){if(!m.isCollapsed(i))continue;const A=m.getStartLineNumber(i)+1,U=m.getEndLineNumber(i);o<=A&&U<=c||(!e&&s<this._hiddenRanges.length&&this._hiddenRanges[s].startLineNumber===A&&this._hiddenRanges[s].endLineNumber===U?(t.push(this._hiddenRanges[s]),s++):(e=!0,t.push(new St.Q(A,1,U,1))),o=A,c=U)}(this._hasLineChanges||e||s<this._hiddenRanges.length)&&this.applyHiddenRanges(t)}applyHiddenRanges(e){this._hiddenRanges=e,this._hasLineChanges=!1,this._updateEventEmitter.fire(e)}hasRanges(){return this._hiddenRanges.length>0}isHidden(e){return u0(this._hiddenRanges,e)!==null}adjustSelections(e){let t=!1;const i=this._foldingModel.textModel;let s=null;const o=c=>((!s||!V1(c,s))&&(s=u0(this._hiddenRanges,c)),s?s.startLineNumber-1:null);for(let c=0,m=e.length;c<m;c++){let A=e[c];const U=o(A.startLineNumber);U&&(A=A.setStartPosition(U,i.getLineMaxColumn(U)),t=!0);const W=o(A.endLineNumber);W&&(A=A.setEndPosition(W,i.getLineMaxColumn(W)),t=!0),e[c]=A}return t}dispose(){this.hiddenRanges.length>0&&(this._hiddenRanges=[],this._updateEventEmitter.fire(this._hiddenRanges)),this._foldingModelListener&&(this._foldingModelListener.dispose(),this._foldingModelListener=null)}}function V1(u,e){return u>=e.startLineNumber&&u<=e.endLineNumber}function u0(u,e){const t=(0,cn.aB)(u,i=>e<i.startLineNumber)-1;return t>=0&&u[t].endLineNumber>=e?u[t]:null}const H1=5e3,z1="indent";class U1{constructor(e,t,i){this.editorModel=e,this.languageConfigurationService=t,this.maxFoldingRegions=i,this.id=z1}dispose(){}compute(e,t){const i=this.languageConfigurationService.getLanguageConfiguration(this.editorModel.getLanguageId()).foldingRules,s=i&&!!i.offSide,o=i&&i.markers;return Promise.resolve(K1(this.editorModel,s,o,this.maxFoldingRegions,t))}}class j1{constructor(e,t){this._notifyTooManyRegions=t,this._startIndexes=[],this._endIndexes=[],this._indentOccurrences=[],this._length=0,this._foldingRangesLimit=e}insertFirst(e,t,i){if(e>ra||t>ra)return;const s=this._length;this._startIndexes[s]=e,this._endIndexes[s]=t,this._length++,i<1e3&&(this._indentOccurrences[i]=(this._indentOccurrences[i]||0)+1)}toIndentRanges(e){var t;if(this._length<=this._foldingRangesLimit){const i=new Uint32Array(this._length),s=new Uint32Array(this._length);for(let o=this._length-1,c=0;o>=0;o--,c++)i[c]=this._startIndexes[o],s[c]=this._endIndexes[o];return new ur(i,s)}else{(t=this._notifyTooManyRegions)===null||t===void 0||t.call(this,this._foldingRangesLimit);let i=0,s=this._indentOccurrences.length;for(let A=0;A<this._indentOccurrences.length;A++){const U=this._indentOccurrences[A];if(U){if(U+i>this._foldingRangesLimit){s=A;break}i+=U}}const o=e.getOptions().tabSize,c=new Uint32Array(this._foldingRangesLimit),m=new Uint32Array(this._foldingRangesLimit);for(let A=this._length-1,U=0;A>=0;A--){const W=this._startIndexes[A],re=e.getLineContent(W),Se=(0,bo.G)(re,o);(Se<s||Se===s&&i++<this._foldingRangesLimit)&&(c[U]=W,m[U]=this._endIndexes[A],U++)}return new ur(c,m)}}}function K1(u,e,t,i,s){const o=u.getOptions().tabSize;i=i??H1;const c=new j1(i,s);let m;t&&(m=new RegExp(`(${t.start.source})|(?:${t.end.source})`));const A=[],U=u.getLineCount()+1;A.push({indent:-1,endAbove:U,line:U});for(let W=u.getLineCount();W>0;W--){const re=u.getLineContent(W),Se=(0,bo.G)(re,o);let Be=A[A.length-1];if(Se===-1){e&&(Be.endAbove=W);continue}let Qe;if(m&&(Qe=re.match(m)))if(Qe[1]){let tt=A.length-1;for(;tt>0&&A[tt].indent!==-2;)tt--;if(tt>0){A.length=tt+1,Be=A[tt],c.insertFirst(W,Be.line,Se),Be.line=W,Be.indent=Se,Be.endAbove=W;continue}}else{A.push({indent:-2,endAbove:W,line:W});continue}if(Be.indent>Se){do A.pop(),Be=A[A.length-1];while(Be.indent>Se);const tt=Be.endAbove-1;tt-W>=1&&c.insertFirst(W,tt,Se)}Be.indent===Se?Be.endAbove=W:A.push({indent:Se,endAbove:W,line:W})}return c.toIndentRanges(u)}const fu=(0,ho.pU)("folding-expanded",Mi.W6.chevronDown,(0,we.kg)("foldingExpandedIcon","Icon for expanded ranges in the editor glyph margin.")),df=(0,ho.pU)("folding-collapsed",Mi.W6.chevronRight,(0,we.kg)("foldingCollapsedIcon","Icon for collapsed ranges in the editor glyph margin.")),g0=(0,ho.pU)("folding-manual-collapsed",df,(0,we.kg)("foldingManualCollapedIcon","Icon for manually collapsed ranges in the editor glyph margin.")),ap=(0,ho.pU)("folding-manual-expanded",fu,(0,we.kg)("foldingManualExpandedIcon","Icon for manually expanded ranges in the editor glyph margin."));class _o{constructor(e){this.editor=e,this.showFoldingControls="mouseover",this.showFoldingHighlights=!0}getDecorationOption(e,t,i){return t||this.showFoldingControls==="never"?_o.HIDDEN_RANGE_DECORATION:e?i?this.showFoldingHighlights?_o.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:_o.MANUALLY_COLLAPSED_VISUAL_DECORATION:this.showFoldingHighlights?_o.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:_o.COLLAPSED_VISUAL_DECORATION:this.showFoldingControls==="mouseover"?i?_o.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION:_o.EXPANDED_AUTO_HIDE_VISUAL_DECORATION:i?_o.MANUALLY_EXPANDED_VISUAL_DECORATION:_o.EXPANDED_VISUAL_DECORATION}changeDecorations(e){return this.editor.changeDecorations(e)}removeDecorations(e){this.editor.removeDecorations(e)}}_o.COLLAPSED_VISUAL_DECORATION=sn.kI.register({description:"folding-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,firstLineDecorationClassName:Ye.L0.asClassName(df)}),_o.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=sn.kI.register({description:"folding-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",isWholeLine:!0,firstLineDecorationClassName:Ye.L0.asClassName(df)}),_o.MANUALLY_COLLAPSED_VISUAL_DECORATION=sn.kI.register({description:"folding-manually-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+Ye.L0.asClassName(fu)}),_o.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=sn.kI.register({description:"folding-manually-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",isWholeLine:!0,firstLineDecorationClassName:Ye.L0.asClassName(g0)}),_o.EXPANDED_AUTO_HIDE_VISUAL_DECORATION=sn.kI.register({description:"folding-expanded-auto-hide-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:Ye.L0.asClassName(fu)}),_o.EXPANDED_VISUAL_DECORATION=sn.kI.register({description:"folding-expanded-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+Ye.L0.asClassName(fu)}),_o.MANUALLY_EXPANDED_VISUAL_DECORATION=sn.kI.register({description:"folding-manually-expanded-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+Ye.L0.asClassName(ap)}),_o.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION=sn.kI.register({description:"folding-manually-expanded-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:Ye.L0.asClassName(ap)}),_o.HIDDEN_RANGE_DECORATION=sn.kI.register({description:"folding-hidden-range-decoration",stickiness:1});const $1={},G1="syntax";class Q1{constructor(e,t,i,s){this.editorModel=e,this.providers=t,this.limit=s,this.id=G1;for(const o of t)typeof o.onDidChange=="function"&&(this.disposables||(this.disposables=new at.Cm),this.disposables.add(o.onDidChange(i)))}compute(e,t){return Z1(this.providers,this.editorModel,e).then(i=>i?X1(i,this.limit,t):null)}dispose(){var e;(e=this.disposables)===null||e===void 0||e.dispose()}}function Z1(u,e,t){let i=null;const s=u.map((o,c)=>Promise.resolve(o.provideFoldingRanges(e,$1,t)).then(m=>{if(!t.isCancellationRequested&&Array.isArray(m)){Array.isArray(i)||(i=[]);const A=e.getLineCount();for(const U of m)U.start>0&&U.end>U.start&&U.end<=A&&i.push({start:U.start,end:U.end,rank:c,kind:U.kind})}},Wi.M_));return Promise.all(s).then(o=>i)}class Y1{constructor(e,t){this._notifyTooManyRegions=t,this._startIndexes=[],this._endIndexes=[],this._nestingLevels=[],this._nestingLevelCounts=[],this._types=[],this._length=0,this._foldingRangesLimit=e}add(e,t,i,s){if(e>ra||t>ra)return;const o=this._length;this._startIndexes[o]=e,this._endIndexes[o]=t,this._nestingLevels[o]=s,this._types[o]=i,this._length++,s<30&&(this._nestingLevelCounts[s]=(this._nestingLevelCounts[s]||0)+1)}toIndentRanges(){var e;if(this._length<=this._foldingRangesLimit){const t=new Uint32Array(this._length),i=new Uint32Array(this._length);for(let s=0;s<this._length;s++)t[s]=this._startIndexes[s],i[s]=this._endIndexes[s];return new ur(t,i,this._types)}else{(e=this._notifyTooManyRegions)===null||e===void 0||e.call(this,this._foldingRangesLimit);let t=0,i=this._nestingLevelCounts.length;for(let m=0;m<this._nestingLevelCounts.length;m++){const A=this._nestingLevelCounts[m];if(A){if(A+t>this._foldingRangesLimit){i=m;break}t+=A}}const s=new Uint32Array(this._foldingRangesLimit),o=new Uint32Array(this._foldingRangesLimit),c=[];for(let m=0,A=0;m<this._length;m++){const U=this._nestingLevels[m];(U<i||U===i&&t++<this._foldingRangesLimit)&&(s[A]=this._startIndexes[m],o[A]=this._endIndexes[m],c[A]=this._types[m],A++)}return new ur(s,o,c)}}}function X1(u,e,t){const i=u.sort((m,A)=>{let U=m.start-A.start;return U===0&&(U=m.rank-A.rank),U}),s=new Y1(e,t);let o;const c=[];for(const m of i)if(!o)o=m,s.add(m.start,m.end,m.kind&&m.kind.value,c.length);else if(m.start>o.start)if(m.end<=o.end)c.push(o),o=m,s.add(m.start,m.end,m.kind&&m.kind.value,c.length);else{if(m.start>o.end){do o=c.pop();while(o&&m.start>o.end);o&&c.push(o),o=m}s.add(m.start,m.end,m.kind&&m.kind.value,c.length)}return s.toIndentRanges()}var J1=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},mu=function(u,e){return function(t,i){e(t,i,u)}};const Eo=new ct.N1("foldingEnabled",!1);let Xc=class bC extends at.jG{constructor(e,t,i,s,o,c){super(),this.contextKeyService=t,this.languageConfigurationService=i,this.languageFeaturesService=c,this._tooManyRegionsNotified=!1,this.localToDispose=this._register(new at.Cm),this.editor=e;const m=this.editor.getOptions();this._isEnabled=m.get(39),this._useFoldingProviders=m.get(40)!=="indentation",this._unfoldOnClickAfterEndOfLine=m.get(44),this._restoringViewState=!1,this._currentModelHasFoldedImports=!1,this._foldingImportsByDefault=m.get(42),this._maxFoldingRegions=m.get(43),this.updateDebounceInfo=o.for(c.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 _o(e),this.foldingDecorationProvider.showFoldingControls=m.get(101),this.foldingDecorationProvider.showFoldingHighlights=m.get(41),this.foldingEnabled=Eo.bindTo(this.contextKeyService),this.foldingEnabled.set(this._isEnabled),this._notifyTooManyRegions=A=>{this._tooManyRegionsNotified||(s.notify({severity:jl.A.Warning,sticky:!0,message:we.kg("maximum fold ranges",`The number of foldable regions is limited to a maximum of {0}. Increase configuration option ['Folding Maximum Regions'](command:workbench.action.openSettings?["editor.foldingMaximumRegions"]) to enable more.`,A)}),this._tooManyRegionsNotified=!0)},this._register(this.editor.onDidChangeModel(()=>this.onModelChanged())),this._register(this.editor.onDidChangeConfiguration(A=>{if(A.hasChanged(39)&&(this._isEnabled=this.editor.getOptions().get(39),this.foldingEnabled.set(this._isEnabled),this.onModelChanged()),A.hasChanged(43)&&(this._maxFoldingRegions=this.editor.getOptions().get(43),this._tooManyRegionsNotified=!1,this.onModelChanged()),A.hasChanged(101)||A.hasChanged(41)){const U=this.editor.getOptions();this.foldingDecorationProvider.showFoldingControls=U.get(101),this.foldingDecorationProvider.showFoldingHighlights=U.get(41),this.triggerFoldingModelChanged()}A.hasChanged(40)&&(this._useFoldingProviders=this.editor.getOptions().get(40)!=="indentation",this.onFoldingStrategyChanged()),A.hasChanged(44)&&(this._unfoldOnClickAfterEndOfLine=this.editor.getOptions().get(44)),A.hasChanged(42)&&(this._foldingImportsByDefault=this.editor.getOptions().get(42))})),this.onModelChanged()}static get(e){return e.getContribution(bC.ID)}saveViewState(){const e=this.editor.getModel();if(!e||!this._isEnabled||e.isTooLargeForTokenization())return{};if(this.foldingModel){const t=this.foldingModel.getMemento(),i=this.rangeProvider?this.rangeProvider.id:void 0;return{collapsedRegions:t,lineCount:e.getLineCount(),provider:i,foldedImports:this._currentModelHasFoldedImports}}}restoreViewState(e){const t=this.editor.getModel();if(!(!t||!this._isEnabled||t.isTooLargeForTokenization()||!this.hiddenRangeModel)&&!(!e||e.lineCount!==t.getLineCount())&&(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 M1(e,this.foldingDecorationProvider),this.localToDispose.add(this.foldingModel),this.hiddenRangeModel=new W1(this.foldingModel),this.localToDispose.add(this.hiddenRangeModel),this.localToDispose.add(this.hiddenRangeModel.onDidChange(t=>this.onHiddenRangesChanges(t))),this.updateScheduler=new Ot.ve(this.updateDebounceInfo.get(e)),this.cursorChangedScheduler=new Ot.uC(()=>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(t=>this.onDidChangeModelContent(t))),this.localToDispose.add(this.editor.onDidChangeCursorPosition(()=>this.onCursorPositionChanged())),this.localToDispose.add(this.editor.onMouseDown(t=>this.onEditorMouseDown(t))),this.localToDispose.add(this.editor.onMouseUp(t=>this.onEditorMouseUp(t))),this.localToDispose.add({dispose:()=>{this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.updateScheduler&&this.updateScheduler.cancel(),this.updateScheduler=null,this.foldingModel=null,this.foldingModelPromise=null,this.hiddenRangeModel=null,this.cursorChangedScheduler=null,this.rangeProvider&&this.rangeProvider.dispose(),this.rangeProvider=null}}),this.triggerFoldingModelChanged())}onFoldingStrategyChanged(){this.rangeProvider&&this.rangeProvider.dispose(),this.rangeProvider=null,this.triggerFoldingModelChanged()}getRangeProvider(e){if(this.rangeProvider)return this.rangeProvider;if(this.rangeProvider=new U1(e,this.languageConfigurationService,this._maxFoldingRegions),this._useFoldingProviders&&this.foldingModel){const t=this.languageFeaturesService.foldingRangeProvider.ordered(this.foldingModel.textModel);t.length>0&&(this.rangeProvider=new Q1(e,t,()=>this.triggerFoldingModelChanged(),this._maxFoldingRegions))}return this.rangeProvider}getFoldingModel(){return this.foldingModelPromise}onDidChangeModelContent(e){var t;(t=this.hiddenRangeModel)===null||t===void 0||t.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 t=new Ys.W(!0),i=this.getRangeProvider(e.textModel),s=this.foldingRegionPromise=(0,Ot.SS)(o=>i.compute(o,this._notifyTooManyRegions));return s.then(o=>{if(o&&s===this.foldingRegionPromise){let c;if(this._foldingImportsByDefault&&!this._currentModelHasFoldedImports){const W=o.setCollapsedAllOfType(Xe.lO.Imports.value,!0);W&&(c=yo.D.capture(this.editor),this._currentModelHasFoldedImports=W)}const m=this.editor.getSelections(),A=m?m.map(W=>W.startLineNumber):[];e.update(o,A),c?.restore(this.editor);const U=this.updateDebounceInfo.update(e.textModel,t.elapsed());this.updateScheduler&&(this.updateScheduler.defaultDelay=U)}return e})}).then(void 0,e=>((0,Wi.dz)(e),null)))}onHiddenRangesChanges(e){if(this.hiddenRangeModel&&e.length&&!this._restoringViewState){const t=this.editor.getSelections();t&&this.hiddenRangeModel.adjustSelections(t)&&this.editor.setSelections(t)}this.editor.setHiddenAreas(e)}onCursorPositionChanged(){this.hiddenRangeModel&&this.hiddenRangeModel.hasRanges()&&this.cursorChangedScheduler.schedule()}revealCursor(){const e=this.getFoldingModel();e&&e.then(t=>{if(t){const i=this.editor.getSelections();if(i&&i.length>0){const s=[];for(const o of i){const c=o.selectionStartLineNumber;this.hiddenRangeModel&&this.hiddenRangeModel.isHidden(c)&&s.push(...t.getAllRegionsAtLine(c,m=>m.isCollapsed&&c>m.startLineNumber))}s.length&&(t.toggleCollapseState(s),this.reveal(i[0].getPosition()))}}}).then(void 0,Wi.dz)}onEditorMouseDown(e){if(this.mouseDownInfo=null,!this.hiddenRangeModel||!e.target||!e.target.range||!e.event.leftButton&&!e.event.middleButton)return;const t=e.target.range;let i=!1;switch(e.target.type){case 4:{const s=e.target.detail,o=e.target.element.offsetLeft;if(s.offsetX-o<5)return;i=!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&&t.startColumn===s.getLineMaxColumn(t.startLineNumber))break}return}default:return}this.mouseDownInfo={lineNumber:t.startLineNumber,iconClicked:i}}onEditorMouseUp(e){const t=this.foldingModel;if(!t||!this.mouseDownInfo||!e.target)return;const i=this.mouseDownInfo.lineNumber,s=this.mouseDownInfo.iconClicked,o=e.target.range;if(!o||o.startLineNumber!==i)return;if(s){if(e.target.type!==4)return}else{const m=this.editor.getModel();if(!m||o.startColumn!==m.getLineMaxColumn(i))return}const c=t.getRegionAtLine(i);if(c&&c.startLineNumber===i){const m=c.isCollapsed;if(s||m){const A=e.event.altKey;let U=[];if(A){const W=Se=>!Se.containedBy(c)&&!c.containedBy(Se),re=t.getRegionsInside(null,W);for(const Se of re)Se.isCollapsed&&U.push(Se);U.length===0&&(U=re)}else{const W=e.event.middleButton||e.event.shiftKey;if(W)for(const re of t.getRegionsInside(c))re.isCollapsed===m&&U.push(re);(m||!W||U.length===0)&&U.push(c)}t.toggleCollapseState(U),this.reveal({lineNumber:i,column:1})}}}reveal(e){this.editor.revealPositionInCenterIfOutsideViewport(e,0)}};Xc.ID="editor.contrib.folding",Xc=J1([mu(1,ct.fN),mu(2,ao.JZ),mu(3,Cs.Ot),mu(4,Lo.U),mu(5,Zi.u)],Xc);class Oo extends Te.ks{runEditorCommand(e,t,i){const s=e.get(ao.JZ),o=Xc.get(t);if(!o)return;const c=o.getFoldingModel();if(c)return this.reportTelemetry(e,t),c.then(m=>{if(m){this.invoke(o,m,t,i,s);const A=t.getSelection();A&&o.reveal(A.getStartPosition())}})}getSelectedLines(e){const t=e.getSelections();return t?t.map(i=>i.startLineNumber):[]}getLineNumbers(e,t){return e&&e.selectionLines?e.selectionLines.map(i=>i+1):this.getSelectedLines(t)}run(e,t){}}function f0(u){if(!pi.b0(u)){if(!pi.Gv(u))return!1;const e=u;if(!pi.b0(e.levels)&&!pi.Et(e.levels)||!pi.b0(e.direction)&&!pi.Kg(e.direction)||!pi.b0(e.selectionLines)&&(!pi.cy(e.selectionLines)||!e.selectionLines.every(pi.Et)))return!1}return!0}class q1 extends Oo{constructor(){super({id:"editor.unfold",label:we.kg("unfoldAction.label","Unfold"),alias:"Unfold",precondition:Eo,kbOpts:{kbExpr:ze.R.editorTextFocus,primary:3161,mac:{primary:2649},weight:100},description:{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:f0,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,t,i,s){const o=s&&s.levels||1,c=this.getLineNumbers(s,i);s&&s.direction==="up"?c0(t,!1,o,c):Yc(t,!1,o,c)}}class eb extends Oo{constructor(){super({id:"editor.unfoldRecursively",label:we.kg("unFoldRecursivelyAction.label","Unfold Recursively"),alias:"Unfold Recursively",precondition:Eo,kbOpts:{kbExpr:ze.R.editorTextFocus,primary:(0,zi.m5)(2089,2137),weight:100}})}invoke(e,t,i,s){Yc(t,!1,Number.MAX_VALUE,this.getSelectedLines(i))}}class tb extends Oo{constructor(){super({id:"editor.fold",label:we.kg("foldAction.label","Fold"),alias:"Fold",precondition:Eo,kbOpts:{kbExpr:ze.R.editorTextFocus,primary:3159,mac:{primary:2647},weight:100},description:{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:f0,schema:{type:"object",properties:{levels:{type:"number"},direction:{type:"string",enum:["up","down"]},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(e,t,i,s){const o=this.getLineNumbers(s,i),c=s&&s.levels,m=s&&s.direction;typeof c!="number"&&typeof m!="string"?R1(t,!0,o):m==="up"?c0(t,!0,c||1,o):Yc(t,!0,c||1,o)}}class ib extends Oo{constructor(){super({id:"editor.toggleFold",label:we.kg("toggleFoldAction.label","Toggle Fold"),alias:"Toggle Fold",precondition:Eo,kbOpts:{kbExpr:ze.R.editorTextFocus,primary:(0,zi.m5)(2089,2090),weight:100}})}invoke(e,t,i){const s=this.getSelectedLines(i);T1(t,1,s)}}class nb extends Oo{constructor(){super({id:"editor.foldRecursively",label:we.kg("foldRecursivelyAction.label","Fold Recursively"),alias:"Fold Recursively",precondition:Eo,kbOpts:{kbExpr:ze.R.editorTextFocus,primary:(0,zi.m5)(2089,2135),weight:100}})}invoke(e,t,i){const s=this.getSelectedLines(i);Yc(t,!0,Number.MAX_VALUE,s)}}class sb extends Oo{constructor(){super({id:"editor.foldAllBlockComments",label:we.kg("foldAllBlockComments.label","Fold All Block Comments"),alias:"Fold All Block Comments",precondition:Eo,kbOpts:{kbExpr:ze.R.editorTextFocus,primary:(0,zi.m5)(2089,2133),weight:100}})}invoke(e,t,i,s,o){if(t.regions.hasTypes())rp(t,Xe.lO.Comment.value,!0);else{const c=i.getModel();if(!c)return;const m=o.getLanguageConfiguration(c.getLanguageId()).comments;if(m&&m.blockCommentStartToken){const A=new RegExp("^\\s*"+(0,xi.bm)(m.blockCommentStartToken));op(t,A,!0)}}}}class ob extends Oo{constructor(){super({id:"editor.foldAllMarkerRegions",label:we.kg("foldAllMarkerRegions.label","Fold All Regions"),alias:"Fold All Regions",precondition:Eo,kbOpts:{kbExpr:ze.R.editorTextFocus,primary:(0,zi.m5)(2089,2077),weight:100}})}invoke(e,t,i,s,o){if(t.regions.hasTypes())rp(t,Xe.lO.Region.value,!0);else{const c=i.getModel();if(!c)return;const m=o.getLanguageConfiguration(c.getLanguageId()).foldingRules;if(m&&m.markers&&m.markers.start){const A=new RegExp(m.markers.start);op(t,A,!0)}}}}class rb extends Oo{constructor(){super({id:"editor.unfoldAllMarkerRegions",label:we.kg("unfoldAllMarkerRegions.label","Unfold All Regions"),alias:"Unfold All Regions",precondition:Eo,kbOpts:{kbExpr:ze.R.editorTextFocus,primary:(0,zi.m5)(2089,2078),weight:100}})}invoke(e,t,i,s,o){if(t.regions.hasTypes())rp(t,Xe.lO.Region.value,!1);else{const c=i.getModel();if(!c)return;const m=o.getLanguageConfiguration(c.getLanguageId()).foldingRules;if(m&&m.markers&&m.markers.start){const A=new RegExp(m.markers.start);op(t,A,!1)}}}}class ab extends Oo{constructor(){super({id:"editor.foldAllExcept",label:we.kg("foldAllExcept.label","Fold All Regions Except Selected"),alias:"Fold All Regions Except Selected",precondition:Eo,kbOpts:{kbExpr:ze.R.editorTextFocus,primary:(0,zi.m5)(2089,2131),weight:100}})}invoke(e,t,i){const s=this.getSelectedLines(i);h0(t,!0,s)}}class lb extends Oo{constructor(){super({id:"editor.unfoldAllExcept",label:we.kg("unfoldAllExcept.label","Unfold All Regions Except Selected"),alias:"Unfold All Regions Except Selected",precondition:Eo,kbOpts:{kbExpr:ze.R.editorTextFocus,primary:(0,zi.m5)(2089,2129),weight:100}})}invoke(e,t,i){const s=this.getSelectedLines(i);h0(t,!1,s)}}class db extends Oo{constructor(){super({id:"editor.foldAll",label:we.kg("foldAllAction.label","Fold All"),alias:"Fold All",precondition:Eo,kbOpts:{kbExpr:ze.R.editorTextFocus,primary:(0,zi.m5)(2089,2069),weight:100}})}invoke(e,t,i){Yc(t,!0)}}class cb extends Oo{constructor(){super({id:"editor.unfoldAll",label:we.kg("unfoldAllAction.label","Unfold All"),alias:"Unfold All",precondition:Eo,kbOpts:{kbExpr:ze.R.editorTextFocus,primary:(0,zi.m5)(2089,2088),weight:100}})}invoke(e,t,i){Yc(t,!1)}}class Vd extends Oo{getFoldingLevel(){return parseInt(this.id.substr(Vd.ID_PREFIX.length))}invoke(e,t,i){A1(t,this.getFoldingLevel(),!0,this.getSelectedLines(i))}}Vd.ID_PREFIX="editor.foldLevel",Vd.ID=u=>Vd.ID_PREFIX+u;class hb extends Oo{constructor(){super({id:"editor.gotoParentFold",label:we.kg("gotoParentFold.label","Go to Parent Fold"),alias:"Go to Parent Fold",precondition:Eo,kbOpts:{kbExpr:ze.R.editorTextFocus,weight:100}})}invoke(e,t,i){const s=this.getSelectedLines(i);if(s.length>0){const o=O1(s[0],t);o!==null&&i.setSelection({startLineNumber:o,startColumn:1,endLineNumber:o,endColumn:1})}}}class ub extends Oo{constructor(){super({id:"editor.gotoPreviousFold",label:we.kg("gotoPreviousFold.label","Go to Previous Folding Range"),alias:"Go to Previous Folding Range",precondition:Eo,kbOpts:{kbExpr:ze.R.editorTextFocus,weight:100}})}invoke(e,t,i){const s=this.getSelectedLines(i);if(s.length>0){const o=P1(s[0],t);o!==null&&i.setSelection({startLineNumber:o,startColumn:1,endLineNumber:o,endColumn:1})}}}class gb extends Oo{constructor(){super({id:"editor.gotoNextFold",label:we.kg("gotoNextFold.label","Go to Next Folding Range"),alias:"Go to Next Folding Range",precondition:Eo,kbOpts:{kbExpr:ze.R.editorTextFocus,weight:100}})}invoke(e,t,i){const s=this.getSelectedLines(i);if(s.length>0){const o=F1(s[0],t);o!==null&&i.setSelection({startLineNumber:o,startColumn:1,endLineNumber:o,endColumn:1})}}}class fb extends Oo{constructor(){super({id:"editor.createFoldingRangeFromSelection",label:we.kg("createManualFoldRange.label","Create Manual Folding Range from Selection"),alias:"Create Folding Range from Selection",precondition:Eo,kbOpts:{kbExpr:ze.R.editorTextFocus,primary:(0,zi.m5)(2089,2130),weight:100}})}invoke(e,t,i){var s;const o=[],c=i.getSelections();if(c){for(const m of c){let A=m.endLineNumber;m.endColumn===1&&--A,A>m.startLineNumber&&(o.push({startLineNumber:m.startLineNumber,endLineNumber:A,type:void 0,isCollapsed:!0,source:1}),i.setSelection({startLineNumber:m.startLineNumber,startColumn:1,endLineNumber:m.startLineNumber,endColumn:1}))}if(o.length>0){o.sort((A,U)=>A.startLineNumber-U.startLineNumber);const m=ur.sanitizeAndMerge(t.regions,o,(s=i.getModel())===null||s===void 0?void 0:s.getLineCount());t.updatePost(ur.fromFoldRanges(m))}}}}class mb extends Oo{constructor(){super({id:"editor.removeManualFoldingRanges",label:we.kg("removeManualFoldingRanges.label","Remove Manual Folding Ranges"),alias:"Remove Manual Folding Ranges",precondition:Eo,kbOpts:{kbExpr:ze.R.editorTextFocus,primary:(0,zi.m5)(2089,2132),weight:100}})}invoke(e,t,i){const s=i.getSelections();if(s){const o=[];for(const c of s){const{startLineNumber:m,endLineNumber:A}=c;o.push(A>=m?{startLineNumber:m,endLineNumber:A}:{endLineNumber:A,startLineNumber:m})}t.removeManualRanges(o),e.triggerFoldingModelChanged()}}}(0,Te.HW)(Xc.ID,Xc),(0,Te.Fl)(q1),(0,Te.Fl)(eb),(0,Te.Fl)(tb),(0,Te.Fl)(nb),(0,Te.Fl)(db),(0,Te.Fl)(cb),(0,Te.Fl)(sb),(0,Te.Fl)(ob),(0,Te.Fl)(rb),(0,Te.Fl)(ab),(0,Te.Fl)(lb),(0,Te.Fl)(ib),(0,Te.Fl)(hb),(0,Te.Fl)(ub),(0,Te.Fl)(gb),(0,Te.Fl)(fb),(0,Te.Fl)(mb);for(let u=1;u<=7;u++)(0,Te.xX)(new Vd({id:Vd.ID(u),label:we.kg("foldLevelAction.label","Fold Level {0}",u),alias:`Fold Level ${u}`,precondition:Eo,kbOpts:{kbExpr:ze.R.editorTextFocus,primary:(0,zi.m5)(2089,2048|21+u),weight:100}}));const pb=(0,Ce.x1A)("editor.foldBackground",{light:(0,Ce.JO0)(Ce.seu,.3),dark:(0,Ce.JO0)(Ce.seu,.3),hcDark:null,hcLight:null},we.kg("foldBackgroundBackground","Background color behind folded ranges. The color must not be opaque so as not to hide underlying decorations."),!0),_b=(0,Ce.x1A)("editorGutter.foldingControlForeground",{dark:Ce.t4B,light:Ce.t4B,hcDark:Ce.t4B,hcLight:Ce.t4B},we.kg("editorGutter.foldingControlForeground","Color of the folding control in the editor gutter."));(0,Ye.zy)((u,e)=>{const t=u.getColor(pb);t&&e.addRule(`.monaco-editor .folded-background { background-color: ${t}; }`);const i=u.getColor(_b);i&&e.addRule(` .monaco-editor .cldr${Ye.L0.asCSSSelector(fu)}, .monaco-editor .cldr${Ye.L0.asCSSSelector(df)}, .monaco-editor .cldr${Ye.L0.asCSSSelector(ap)}, .monaco-editor .cldr${Ye.L0.asCSSSelector(g0)} { color: ${i} !important; } `)});var pu=f(84587);class vb extends Te.ks{constructor(){super({id:"editor.action.fontZoomIn",label:we.kg("EditorFontZoomIn.label","Editor Font Zoom In"),alias:"Editor Font Zoom In",precondition:void 0})}run(e,t){pu.D.setZoomLevel(pu.D.getZoomLevel()+1)}}class Cb extends Te.ks{constructor(){super({id:"editor.action.fontZoomOut",label:we.kg("EditorFontZoomOut.label","Editor Font Zoom Out"),alias:"Editor Font Zoom Out",precondition:void 0})}run(e,t){pu.D.setZoomLevel(pu.D.getZoomLevel()-1)}}class bb extends Te.ks{constructor(){super({id:"editor.action.fontZoomReset",label:we.kg("EditorFontZoomReset.label","Editor Font Zoom Reset"),alias:"Editor Font Zoom Reset",precondition:void 0})}run(e,t){pu.D.setZoomLevel(0)}}(0,Te.Fl)(vb),(0,Te.Fl)(Cb),(0,Te.Fl)(bb);var Jc=f(27454),_u=f(90304),vu=f(38801),wb=f(55406),m0=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},cf=function(u,e){return function(t,i){e(t,i,u)}},lp=function(u,e,t,i){function s(o){return o instanceof t?o:new t(function(c){c(o)})}return new(t||(t=Promise))(function(o,c){function m(W){try{U(i.next(W))}catch(re){c(re)}}function A(W){try{U(i.throw(W))}catch(re){c(re)}}function U(W){W.done?o(W.value):s(W.value).then(m,A)}U((i=i.apply(u,e||[])).next())})};let Cu=class{constructor(e,t,i){this._editor=e,this._languageFeaturesService=t,this._workerService=i,this._disposables=new at.Cm,this._sessionDisposables=new at.Cm,this._disposables.add(t.onTypeFormattingEditProvider.onDidChange(this._update,this)),this._disposables.add(e.onDidChangeModel(()=>this._update())),this._disposables.add(e.onDidChangeModelLanguage(()=>this._update())),this._disposables.add(e.onDidChangeConfiguration(s=>{s.hasChanged(51)&&this._update()}))}dispose(){this._disposables.dispose(),this._sessionDisposables.dispose()}_update(){if(this._sessionDisposables.clear(),!this._editor.getOption(51)||!this._editor.hasModel())return;const e=this._editor.getModel(),[t]=this._languageFeaturesService.onTypeFormattingEditProvider.ordered(e);if(!t||!t.autoFormatTriggerCharacters)return;const i=new Jc.y;for(const s of t.autoFormatTriggerCharacters)i.add(s.charCodeAt(0));this._sessionDisposables.add(this._editor.onDidType(s=>{const o=s.charCodeAt(s.length-1);i.has(o)&&this._trigger(String.fromCharCode(o))}))}_trigger(e){if(!this._editor.hasModel()||this._editor.getSelections().length>1||!this._editor.getSelection().isEmpty())return;const t=this._editor.getModel(),i=this._editor.getPosition(),s=new Ti.Q,o=this._editor.onDidChangeModelContent(c=>{if(c.isFlush){s.cancel(),o.dispose();return}for(let m=0,A=c.changes.length;m<A;m++)if(c.changes[m].range.endLineNumber<=i.lineNumber){s.cancel(),o.dispose();return}});(0,vu._V)(this._workerService,this._languageFeaturesService,t,i,e,t.getFormattingOptions(),s.token).then(c=>{s.token.isCancellationRequested||(0,cn.EI)(c)&&(wb.c.execute(this._editor,c,!0),(0,vu.pD)(c))}).finally(()=>{o.dispose()})}};Cu.ID="editor.contrib.autoFormat",Cu=m0([cf(1,Zi.u),cf(2,_u.w)],Cu);let bu=class{constructor(e,t,i){this.editor=e,this._languageFeaturesService=t,this._instantiationService=i,this._callOnDispose=new at.Cm,this._callOnModel=new at.Cm,this._callOnDispose.add(e.onDidChangeConfiguration(()=>this._update())),this._callOnDispose.add(e.onDidChangeModel(()=>this._update())),this._callOnDispose.add(e.onDidChangeModelLanguage(()=>this._update())),this._callOnDispose.add(t.documentRangeFormattingEditProvider.onDidChange(this._update,this))}dispose(){this._callOnDispose.dispose(),this._callOnModel.dispose()}_update(){this._callOnModel.clear(),this.editor.getOption(50)&&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(vu.jX,this.editor,e,2,ks.ke.None,Ti.X.None).catch(Wi.dz))}};bu.ID="editor.contrib.formatOnPaste",bu=m0([cf(1,Zi.u),cf(2,P._Y)],bu);class Sb extends Te.ks{constructor(){super({id:"editor.action.formatDocument",label:we.kg("formatDocument.label","Format Document"),alias:"Format Document",precondition:ct.M$.and(ze.R.notInCompositeEditor,ze.R.writable,ze.R.hasDocumentFormattingProvider),kbOpts:{kbExpr:ze.R.editorTextFocus,primary:1572,linux:{primary:3111},weight:100},contextMenuOpts:{group:"1_modification",order:1.3}})}run(e,t){return lp(this,void 0,void 0,function*(){if(t.hasModel()){const i=e.get(P._Y);yield e.get(ks.N8).showWhile(i.invokeFunction(vu.vg,t,1,ks.ke.None,Ti.X.None),250)}})}}class yb extends Te.ks{constructor(){super({id:"editor.action.formatSelection",label:we.kg("formatSelection.label","Format Selection"),alias:"Format Selection",precondition:ct.M$.and(ze.R.writable,ze.R.hasDocumentSelectionFormattingProvider),kbOpts:{kbExpr:ze.R.editorTextFocus,primary:(0,zi.m5)(2089,2084),weight:100},contextMenuOpts:{when:ze.R.hasNonEmptySelection,group:"1_modification",order:1.31}})}run(e,t){return lp(this,void 0,void 0,function*(){if(!t.hasModel())return;const i=e.get(P._Y),s=t.getModel(),o=t.getSelections().map(m=>m.isEmpty()?new St.Q(m.startLineNumber,1,m.startLineNumber,s.getLineMaxColumn(m.startLineNumber)):m);yield e.get(ks.N8).showWhile(i.invokeFunction(vu.jX,t,o,1,ks.ke.None,Ti.X.None),250)})}}(0,Te.HW)(Cu.ID,Cu),(0,Te.HW)(bu.ID,bu),(0,Te.Fl)(Sb),(0,Te.Fl)(yb),fn.wb.registerCommand("editor.action.format",u=>lp(void 0,void 0,void 0,function*(){const e=u.get(Gi.T).getFocusedCodeEditor();if(!e||!e.hasModel())return;const t=u.get(fn.wT);e.getSelection().isEmpty()?yield t.executeCommand("editor.action.formatDocument"):yield t.executeCommand("editor.action.formatSelection")}));var wu=f(17954),Lb=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},dp=function(u,e){return function(t,i){e(t,i,u)}},Db=function(u,e,t,i){function s(o){return o instanceof t?o:new t(function(c){c(o)})}return new(t||(t=Promise))(function(o,c){function m(W){try{U(i.next(W))}catch(re){c(re)}}function A(W){try{U(i.throw(W))}catch(re){c(re)}}function U(W){W.done?o(W.value):s(W.value).then(m,A)}U((i=i.apply(u,e||[])).next())})};class qc{remove(){var e;(e=this.parent)===null||e===void 0||e.children.delete(this.id)}static findId(e,t){let i;typeof e=="string"?i=`${t.id}/${e}`:(i=`${t.id}/${e.name}`,t.children.get(i)!==void 0&&(i=`${t.id}/${e.name}_${e.range.startLineNumber}_${e.range.startColumn}`));let s=i;for(let o=0;t.children.get(s)!==void 0;o++)s=`${i}_${o}`;return s}static empty(e){return e.children.size===0}}class hf extends qc{constructor(e,t,i){super(),this.id=e,this.parent=t,this.symbol=i,this.children=new Map}}class kb extends qc{constructor(e,t,i,s){super(),this.id=e,this.parent=t,this.label=i,this.order=s,this.children=new Map}}class ol extends qc{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}static create(e,t,i){const s=new Ti.Q(i),o=new ol(t.uri),c=e.ordered(t),m=c.map((U,W)=>{var re;const Se=qc.findId(`provider_${W}`,o),Be=new kb(Se,o,(re=U.displayName)!==null&&re!==void 0?re:"Unknown Outline Provider",W);return Promise.resolve(U.provideDocumentSymbols(t,s.token)).then(Qe=>{for(const tt of Qe||[])ol._makeOutlineElement(tt,Be);return Be},Qe=>((0,Wi.M_)(Qe),Be)).then(Qe=>{qc.empty(Qe)?Qe.remove():o._groups.set(Se,Qe)})}),A=e.onDidChange(()=>{const U=e.ordered(t);(0,cn.aI)(U,c)||s.cancel()});return Promise.all(m).then(()=>s.token.isCancellationRequested&&!i.isCancellationRequested?ol.create(e,t,i):o._compact()).finally(()=>{A.dispose()})}static _makeOutlineElement(e,t){const i=qc.findId(e,t),s=new hf(i,t,e);if(e.children)for(const o of e.children)ol._makeOutlineElement(o,s);t.children.set(s.id,s)}_compact(){let e=0;for(const[t,i]of this._groups)i.children.size===0?this._groups.delete(t):e+=1;if(e!==1)this.children=this._groups;else{const t=wu.f.first(this._groups.values());for(const[,i]of t.children)i.parent=this,this.children.set(i.id,i)}return this}getTopLevelSymbols(){const e=[];for(const t of this.children.values())t instanceof hf?e.push(t.symbol):e.push(...wu.f.map(t.children.values(),i=>i.symbol));return e.sort((t,i)=>St.Q.compareRangesUsingStarts(t.range,i.range))}asListOfDocumentSymbols(){const e=this.getTopLevelSymbols(),t=[];return ol._flattenDocumentSymbols(t,e,""),t.sort((i,s)=>bi.y.compare(St.Q.getStartPosition(i.range),St.Q.getStartPosition(s.range))||bi.y.compare(St.Q.getEndPosition(s.range),St.Q.getEndPosition(i.range)))}static _flattenDocumentSymbols(e,t,i){for(const s of t)e.push({kind:s.kind,tags:s.tags,name:s.name,detail:s.detail,containerName:s.containerName||i,range:s.range,selectionRange:s.selectionRange,children:void 0}),s.children&&ol._flattenDocumentSymbols(e,s.children,s.name)}}const uf=(0,P.u1)("IOutlineModelService");let cp=class{constructor(e,t,i){this._languageFeaturesService=e,this._disposables=new at.Cm,this._cache=new ir.qK(10,.7),this._debounceInformation=t.for(e.documentSymbolProvider,"DocumentSymbols",{min:350}),this._disposables.add(i.onModelRemoved(s=>{this._cache.delete(s.id)}))}dispose(){this._disposables.dispose()}getOrCreate(e,t){return Db(this,void 0,void 0,function*(){const i=this._languageFeaturesService.documentSymbolProvider,s=i.ordered(e);let o=this._cache.get(e.id);if(!o||o.versionId!==e.getVersionId()||!(0,cn.aI)(o.provider,s)){const m=new Ti.Q;o={versionId:e.getVersionId(),provider:s,promiseCnt:0,source:m,promise:ol.create(i,e,m.token),model:void 0},this._cache.set(e.id,o);const A=Date.now();o.promise.then(U=>{o.model=U,this._debounceInformation.update(e,Date.now()-A)}).catch(U=>{this._cache.delete(e.id)})}if(o.model)return o.model;o.promiseCnt+=1;const c=t.onCancellationRequested(()=>{--o.promiseCnt===0&&(o.source.cancel(),this._cache.delete(e.id))});try{return yield o.promise}finally{c.dispose()}})}};cp=Lb([dp(0,Zi.u),dp(1,Lo.U),dp(2,ws.S)],cp),(0,nr.v)(uf,cp,!0);var Eb=function(u,e,t,i){function s(o){return o instanceof t?o:new t(function(c){c(o)})}return new(t||(t=Promise))(function(o,c){function m(W){try{U(i.next(W))}catch(re){c(re)}}function A(W){try{U(i.throw(W))}catch(re){c(re)}}function U(W){W.done?o(W.value):s(W.value).then(m,A)}U((i=i.apply(u,e||[])).next())})};fn.wb.registerCommand("_executeDocumentSymbolProvider",function(u,...e){return Eb(this,void 0,void 0,function*(){const[t]=e;(0,pi.j)(vn.r.isUri(t));const i=u.get(uf),o=yield u.get(Hs.b).createModelReference(t);try{return(yield i.getOrCreate(o.object.textEditorModel,Ti.X.None)).getTopLevelSymbols()}finally{o.dispose()}})});const gf="editor.action.inlineSuggest.commit";var xb=f(62549);function Ib(u,e){return{object:u,dispose:()=>e?.dispose()}}function Nb(u,e){const t=new Mb(u),i=e.map(s=>{const o=St.Q.lift(s.range);return{startOffset:t.getOffset(o.getStartPosition()),endOffset:t.getOffset(o.getEndPosition()),text:s.text}});i.sort((s,o)=>o.startOffset-s.startOffset);for(const s of i)u=u.substring(0,s.startOffset)+s.text+u.substring(s.endOffset);return u}class Mb{constructor(e){this.lineStartOffsetByLineIdx=[],this.lineStartOffsetByLineIdx.push(0);for(let t=0;t<e.length;t++)e.charAt(t)===` `&&this.lineStartOffsetByLineIdx.push(t+1)}getOffset(e){return this.lineStartOffsetByLineIdx[e.lineNumber-1]+e.column-1}}const Tb=[];function Rb(){return Tb}class p0{constructor(e,t,i=0){this.lineNumber=e,this.parts=t,this.additionalReservedLineCount=i}renderForScreenReader(e){if(this.parts.length===0)return"";const t=this.parts[this.parts.length-1],i=e.substr(0,t.column-1);return Nb(i,this.parts.map(o=>({range:{startLineNumber:1,endLineNumber:1,startColumn:o.column,endColumn:o.column},text:o.lines.join(` `)}))).substring(this.parts[0].column-1)}isEmpty(){return this.parts.every(e=>e.lines.length===0)}}class hp{constructor(e,t,i){this.column=e,this.lines=t,this.preview=i}}class _0{constructor(e,t,i,s,o=0){this.lineNumber=e,this.columnStart=t,this.length=i,this.newLines=s,this.additionalReservedLineCount=o,this.parts=[new hp(this.columnStart+this.length,this.newLines,!1)]}renderForScreenReader(e){return this.newLines.join(` `)}}class v0 extends at.jG{constructor(e){super(),this.editor=e,this._expanded=void 0,this.onDidChangeEmitter=new Vi.vl,this.onDidChange=this.onDidChangeEmitter.event,this._register(e.onDidChangeConfiguration(t=>{t.hasChanged(108)&&this._expanded===void 0&&this.onDidChangeEmitter.fire()}))}setExpanded(e){this._expanded=!0,this.onDidChangeEmitter.fire()}}var Ab=f(2111);function ff(u,e){if(!e)return e;const t=u.getValueInRange(e.range),i=xi.Qp(t,e.insertText),s=u.getOffsetAt(e.range.getStartPosition())+i,o=u.getPositionAt(s),c=t.substr(i),m=xi.Vi(c,e.insertText),A=u.getPositionAt(Math.max(s,u.getOffsetAt(e.range.getEndPosition())-m));return{range:St.Q.fromPositions(o,A),insertText:e.insertText.substr(i,e.insertText.length-i-m),snippetInfo:e.snippetInfo,filterText:e.filterText,additionalTextEdits:e.additionalTextEdits}}function Ob(u,e){return u===e?!0:!u||!e?!1:u.range.equalsRange(e.range)&&u.insertText===e.insertText&&u.command===e.command}function C0(u,e,t,i,s=0){if(u.range.startLineNumber!==u.range.endLineNumber)return;const o=e.getLineContent(u.range.startLineNumber),c=xi.UU(o).length;if(u.range.startColumn-1<=c){const Be=xi.UU(u.insertText).length,Qe=o.substring(u.range.startColumn-1,c),tt=St.Q.fromPositions(u.range.getStartPosition().delta(0,Qe.length),u.range.getEndPosition()),vt=u.insertText.startsWith(Qe)?u.insertText.substring(Qe.length):u.insertText.substring(Be);u={range:tt,insertText:vt,command:u.command,snippetInfo:void 0,filterText:u.filterText,additionalTextEdits:u.additionalTextEdits}}const A=e.getValueInRange(u.range),U=Pb(A,u.insertText);if(!U)return;const W=u.range.startLineNumber,re=new Array;if(t==="prefix"){const Be=U.filter(Qe=>Qe.originalLength===0);if(Be.length>1||Be.length===1&&Be[0].originalStart!==A.length)return}const Se=u.insertText.length-s;for(const Be of U){const Qe=u.range.startColumn+Be.originalStart+Be.originalLength;if(t==="subwordSmart"&&i&&i.lineNumber===u.range.startLineNumber&&Qe<i.column||Be.originalLength>0)return;if(Be.modifiedLength===0)continue;const tt=Be.modifiedStart+Be.modifiedLength,vt=Math.max(Be.modifiedStart,Math.min(tt,Se)),Ht=u.insertText.substring(Be.modifiedStart,vt),ci=u.insertText.substring(vt,Math.max(Be.modifiedStart,tt));if(Ht.length>0){const gi=xi.uz(Ht);re.push(new hp(Qe,gi,!1))}if(ci.length>0){const gi=xi.uz(ci);re.push(new hp(Qe,gi,!0))}}return new p0(W,re,0)}let ka;function Pb(u,e){if(ka?.originalValue===u&&ka?.newValue===e)return ka?.changes;{let t=w0(u,e,!0);if(t){const i=b0(t);if(i>0){const s=w0(u,e,!1);s&&b0(s)<i&&(t=s)}}return ka={originalValue:u,newValue:e,changes:t},t}}function b0(u){let e=0;for(const t of u)e+=Math.max(t.originalLength-t.modifiedLength,0);return e}function w0(u,e,t){if(u.length>5e3||e.length>5e3)return;function i(U){let W=0;for(let re=0,Se=U.length;re<Se;re++){const Be=U.charCodeAt(re);Be>W&&(W=Be)}return W}const s=Math.max(i(u),i(e));function o(U){if(U<0)throw new Error("unexpected");return s+U+1}function c(U){let W=0,re=0;const Se=new Int32Array(U.length);for(let Be=0,Qe=U.length;Be<Qe;Be++)if(t&&U[Be]==="("){const tt=re*100+W;Se[Be]=o(2*tt),W++}else if(t&&U[Be]===")"){W=Math.max(W-1,0);const tt=re*100+W;Se[Be]=o(2*tt+1),W===0&&re++}else Se[Be]=U.charCodeAt(Be);return Se}const m=c(u),A=c(e);return new Ab.uP({getElements:()=>m},{getElements:()=>A}).ComputeDiff(!1).changes}var Fb=f(85702),Yl=f(34883),Bb=f(68302),Wb=f(60756),Vb=f(33206);function Hb(u,e){const t=new Wb.Mg,i=new Fb.Z(t,U=>e.getLanguageConfiguration(U)),s=new Vb.tk(new zb([u]),i),o=(0,Bb.T)(s,[],void 0,!0);let c="";const m=u.getLineContent();function A(U,W){if(U.kind===2)if(A(U.openingBracket,W),W=(0,Yl.QB)(W,U.openingBracket.length),U.child&&(A(U.child,W),W=(0,Yl.QB)(W,U.child.length)),U.closingBracket)A(U.closingBracket,W),W=(0,Yl.QB)(W,U.closingBracket.length);else{const Se=i.getSingleLanguageBracketTokens(U.openingBracket.languageId).findClosingTokenText(U.openingBracket.bracketIds);c+=Se}else if(U.kind!==3){if(U.kind===0||U.kind===1)c+=m.substring((0,Yl.sS)(W),(0,Yl.sS)((0,Yl.QB)(W,U.length)));else if(U.kind===4)for(const re of U.children)A(re,W),W=(0,Yl.QB)(W,re.length)}}return A(o,Yl.Vp),c}class zb{constructor(e){this.lines=e,this.tokenization={getLineTokens:t=>this.lines[t-1]}}getLineCount(){return this.lines.length}getLineLength(e){return this.lines[e-1].getLineContent().length}}var Ub=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},Su=function(u,e){return function(t,i){e(t,i,u)}},rl=function(u,e,t,i){function s(o){return o instanceof t?o:new t(function(c){c(o)})}return new(t||(t=Promise))(function(o,c){function m(W){try{U(i.next(W))}catch(re){c(re)}}function A(W){try{U(i.throw(W))}catch(re){c(re)}}function U(W){W.done?o(W.value):s(W.value).then(m,A)}U((i=i.apply(u,e||[])).next())})};let up=class extends at.jG{constructor(e,t,i,s,o,c,m){super(),this.editor=e,this.cache=t,this.commandService=i,this.languageConfigurationService=s,this.languageFeaturesService=o,this.debounceService=c,this.onDidChangeEmitter=new Vi.vl,this.onDidChange=this.onDidChangeEmitter.event,this.completionSession=this._register(new at.HE),this.active=!1,this.disposed=!1,this.debounceValue=this.debounceService.for(this.languageFeaturesService.inlineCompletionsProvider,"InlineCompletionsDebounce",{min:50,max:50}),this._register(i.onDidExecuteCommand(A=>{new Set([Ze.Yh.Tab.id,Ze.Yh.DeleteLeft.id,Ze.Yh.DeleteRight.id,gf,"acceptSelectedSuggestion"]).has(A.commandId)&&e.hasTextFocus()&&this.handleUserInput()})),this._register(this.editor.onDidType(A=>{this.handleUserInput()})),this._register(this.editor.onDidChangeCursorPosition(A=>{(A.reason===3||this.session&&!this.session.isValid)&&this.hide()})),this._register((0,at.s)(()=>{this.disposed=!0})),this._register(this.editor.onDidBlurEditorWidget(()=>{m.getValue("editor.inlineSuggest.hideOnBlur")||this.hide()}))}handleUserInput(){this.session&&!this.session.isValid&&this.hide(),setTimeout(()=>{this.disposed||this.startSessionIfTriggered()},0)}get session(){return this.completionSession.value}get ghostText(){var e;return(e=this.session)===null||e===void 0?void 0:e.ghostText}get minReservedLineCount(){return this.session?this.session.minReservedLineCount:0}setExpanded(e){var t;(t=this.session)===null||t===void 0||t.setExpanded(e)}setActive(e){var t;this.active=e,e&&((t=this.session)===null||t===void 0||t.scheduleAutomaticUpdate())}startSessionIfTriggered(){this.editor.getOption(57).enabled&&(this.session&&this.session.isValid||this.trigger(Xe.qw.Automatic))}trigger(e){if(this.completionSession.value){e===Xe.qw.Explicit&&this.completionSession.value.ensureUpdateWithExplicitContext();return}this.completionSession.value=new jb(this.editor,this.editor.getPosition(),()=>this.active,this.commandService,this.cache,e,this.languageConfigurationService,this.languageFeaturesService.inlineCompletionsProvider,this.debounceValue),this.completionSession.value.takeOwnership(this.completionSession.value.onDidChange(()=>{this.onDidChangeEmitter.fire()}))}hide(){this.completionSession.clear(),this.onDidChangeEmitter.fire()}commitCurrentSuggestion(){var e;(e=this.session)===null||e===void 0||e.commitCurrentCompletion()}showNext(){var e;(e=this.session)===null||e===void 0||e.showNextInlineCompletion()}showPrevious(){var e;(e=this.session)===null||e===void 0||e.showPreviousInlineCompletion()}hasMultipleInlineCompletions(){var e;return rl(this,void 0,void 0,function*(){const t=yield(e=this.session)===null||e===void 0?void 0:e.hasMultipleInlineCompletions();return t!==void 0?t:!1})}};up=Ub([Su(2,fn.wT),Su(3,ao.JZ),Su(4,Zi.u),Su(5,Lo.U),Su(6,de.pG)],up);class jb extends v0{constructor(e,t,i,s,o,c,m,A,U){super(e),this.triggerPosition=t,this.shouldUpdate=i,this.commandService=s,this.cache=o,this.initialTriggerKind=c,this.languageConfigurationService=m,this.registry=A,this.debounce=U,this.minReservedLineCount=0,this.updateOperation=this._register(new at.HE),this.updateSoon=this._register(new Ot.uC(()=>{const re=this.initialTriggerKind;return this.initialTriggerKind=Xe.qw.Automatic,this.update(re)},50)),this.filteredCompletions=[],this.currentlySelectedCompletionId=void 0;let W;this._register(this.onDidChange(()=>{var re;const Se=this.currentCompletion;if(Se&&Se.sourceInlineCompletion!==W){W=Se.sourceInlineCompletion;const Be=Se.sourceProvider;(re=Be.handleItemDidShow)===null||re===void 0||re.call(Be,Se.sourceInlineCompletions,W)}})),this._register((0,at.s)(()=>{this.cache.clear()})),this._register(this.editor.onDidChangeCursorPosition(re=>{var Se;re.reason!==3&&((Se=this.cache.value)===null||Se===void 0||Se.updateRanges(),this.cache.value&&(this.updateFilteredInlineCompletions(),this.onDidChangeEmitter.fire()))})),this._register(this.editor.onDidChangeModelContent(re=>{var Se;(Se=this.cache.value)===null||Se===void 0||Se.updateRanges(),this.updateFilteredInlineCompletions(),this.scheduleAutomaticUpdate()})),this._register(this.registry.onDidChange(()=>{this.updateSoon.schedule(this.debounce.get(this.editor.getModel()))})),this.scheduleAutomaticUpdate()}updateFilteredInlineCompletions(){if(!this.cache.value){this.filteredCompletions=[];return}const e=this.editor.getModel(),t=e.validatePosition(this.editor.getPosition());this.filteredCompletions=this.cache.value.completions.filter(i=>{const s=e.getValueInRange(i.synchronizedRange).toLowerCase(),o=i.inlineCompletion.filterText.toLowerCase(),c=e.getLineIndentColumn(i.synchronizedRange.startLineNumber),m=Math.max(0,t.column-i.synchronizedRange.startColumn);let A=o.substring(0,m),U=o.substring(m),W=s.substring(0,m),re=s.substring(m);return i.synchronizedRange.startColumn<=c&&(W=W.trimStart(),W.length===0&&(re=re.trimStart()),A=A.trimStart(),A.length===0&&(U=U.trimStart())),A.startsWith(W)&&(0,Qi.dE)(re,U)})}fixAndGetIndexOfCurrentSelection(){if(!this.currentlySelectedCompletionId||!this.cache.value||this.cache.value.completions.length===0)return 0;const e=this.filteredCompletions.findIndex(t=>t.semanticId===this.currentlySelectedCompletionId);return e===-1?(this.currentlySelectedCompletionId=void 0,0):e}get currentCachedCompletion(){if(this.cache.value)return this.filteredCompletions[this.fixAndGetIndexOfCurrentSelection()]}showNextInlineCompletion(){return rl(this,void 0,void 0,function*(){yield this.ensureUpdateWithExplicitContext();const e=this.filteredCompletions||[];if(e.length>0){const t=(this.fixAndGetIndexOfCurrentSelection()+1)%e.length;this.currentlySelectedCompletionId=e[t].semanticId}else this.currentlySelectedCompletionId=void 0;this.onDidChangeEmitter.fire()})}showPreviousInlineCompletion(){return rl(this,void 0,void 0,function*(){yield this.ensureUpdateWithExplicitContext();const e=this.filteredCompletions||[];if(e.length>0){const t=(this.fixAndGetIndexOfCurrentSelection()+e.length-1)%e.length;this.currentlySelectedCompletionId=e[t].semanticId}else this.currentlySelectedCompletionId=void 0;this.onDidChangeEmitter.fire()})}ensureUpdateWithExplicitContext(){var e;return rl(this,void 0,void 0,function*(){this.updateOperation.value?this.updateOperation.value.triggerKind===Xe.qw.Explicit?yield this.updateOperation.value.promise:yield this.update(Xe.qw.Explicit):((e=this.cache.value)===null||e===void 0?void 0:e.triggerKind)!==Xe.qw.Explicit&&(yield this.update(Xe.qw.Explicit))})}hasMultipleInlineCompletions(){var e;return rl(this,void 0,void 0,function*(){return yield this.ensureUpdateWithExplicitContext(),(((e=this.cache.value)===null||e===void 0?void 0:e.completions.length)||0)>1})}get ghostText(){const e=this.currentCompletion;if(!e)return;const t=this.editor.getPosition();if(e.range.getEndPosition().isBefore(t))return;const i=this.editor.getOptions().get(57).mode,s=C0(e,this.editor.getModel(),i,t);return s?s.isEmpty()?void 0:s:new _0(e.range.startLineNumber,e.range.startColumn,e.range.endColumn-e.range.startColumn,e.insertText.split(` `),0)}get currentCompletion(){const e=this.currentCachedCompletion;if(e)return e.toLiveInlineCompletion()}get isValid(){return this.editor.getPosition().lineNumber===this.triggerPosition.lineNumber}scheduleAutomaticUpdate(){this.updateOperation.clear(),this.updateSoon.schedule(this.debounce.get(this.editor.getModel()))}update(e){return rl(this,void 0,void 0,function*(){if(!this.shouldUpdate())return;const t=this.editor.getPosition(),i=new Date,s=(0,Ot.SS)(c=>rl(this,void 0,void 0,function*(){let m;try{m=yield y0(this.registry,t,this.editor.getModel(),{triggerKind:e,selectedSuggestionInfo:void 0},c,this.languageConfigurationService);const A=new Date;this.debounce.update(this.editor.getModel(),A.getTime()-i.getTime())}catch(A){(0,Wi.dz)(A);return}c.isCancellationRequested||(this.cache.setValue(this.editor,m,e),this.updateFilteredInlineCompletions(),this.onDidChangeEmitter.fire())})),o=new S0(s,e);this.updateOperation.value=o,yield s,this.updateOperation.value===o&&this.updateOperation.clear()})}takeOwnership(e){this._register(e)}commitCurrentCompletion(){if(!this.ghostText)return;const t=this.currentCompletion;t&&this.commit(t)}commit(e){var t;const i=this.cache.clearAndLeak();e.snippetInfo?(this.editor.executeEdits("inlineSuggestion.accept",[Sn.k.replaceMove(e.range,""),...e.additionalTextEdits]),this.editor.setPosition(e.snippetInfo.range.getStartPosition()),(t=io.get(this.editor))===null||t===void 0||t.insert(e.snippetInfo.snippet)):this.editor.executeEdits("inlineSuggestion.accept",[Sn.k.replaceMove(e.range,e.insertText),...e.additionalTextEdits]),e.command?this.commandService.executeCommand(e.command.id,...e.command.arguments||[]).finally(()=>{i?.dispose()}).then(void 0,Wi.M_):i?.dispose(),this.onDidChangeEmitter.fire()}get commands(){var e;return[...new Set(((e=this.cache.value)===null||e===void 0?void 0:e.completions.map(i=>i.inlineCompletion.sourceInlineCompletions))||[])].flatMap(i=>i.commands||[])}}class S0{constructor(e,t){this.promise=e,this.triggerKind=t}dispose(){this.promise.cancel()}}class Kb extends at.jG{constructor(e,t,i,s){super(),this.editor=t,this.onChange=i,this.triggerKind=s,this.isDisposing=!1;const o=t.changeDecorations(c=>c.deltaDecorations([],e.items.map(m=>({range:m.range,options:{description:"inline-completion-tracking-range"}}))));this._register((0,at.s)(()=>{this.isDisposing=!0,t.removeDecorations(o)})),this.completions=e.items.map((c,m)=>new $b(c,o[m])),this._register(t.onDidChangeModelContent(()=>{this.updateRanges()})),this._register(e)}updateRanges(){if(this.isDisposing)return;let e=!1;const t=this.editor.getModel();for(const i of this.completions){const s=t.getDecorationRange(i.decorationId);if(!s){(0,Wi.dz)(new Error("Decoration has no range"));continue}i.synchronizedRange.equalsRange(s)||(e=!0,i.synchronizedRange=s)}e&&this.onChange()}}class $b{constructor(e,t){this.inlineCompletion=e,this.decorationId=t,this.semanticId=JSON.stringify({text:this.inlineCompletion.insertText,abbreviation:this.inlineCompletion.filterText,startLine:this.inlineCompletion.range.startLineNumber,startColumn:this.inlineCompletion.range.startColumn,command:this.inlineCompletion.command}),this.synchronizedRange=e.range}toLiveInlineCompletion(){return{insertText:this.inlineCompletion.insertText,range:this.synchronizedRange,command:this.inlineCompletion.command,sourceProvider:this.inlineCompletion.sourceProvider,sourceInlineCompletions:this.inlineCompletion.sourceInlineCompletions,sourceInlineCompletion:this.inlineCompletion.sourceInlineCompletion,snippetInfo:this.inlineCompletion.snippetInfo,filterText:this.inlineCompletion.filterText,additionalTextEdits:this.inlineCompletion.additionalTextEdits}}}function y0(u,e,t,i,s=Ti.X.None,o){return rl(this,void 0,void 0,function*(){const c=Gb(e,t),m=u.all(t),A=yield Promise.all(m.map(W=>rl(this,void 0,void 0,function*(){const re=yield Promise.resolve(W.provideInlineCompletions(t,e,i,s)).catch(Wi.M_);return{completions:re,provider:W,dispose:()=>{re&&W.freeInlineCompletions(re)}}}))),U=new Map;for(const W of A){const re=W.completions;if(re)for(const Se of re.items){let Be=Se.range?St.Q.lift(Se.range):c;if(Be.startLineNumber!==Be.endLineNumber)continue;let Qe,tt;if(typeof Se.insertText=="string"){if(Qe=Se.insertText,o&&Se.completeBracketPairs){Qe=Qb(Qe,Be.getStartPosition(),t,o);const Ht=Qe.length-Se.insertText.length;Ht!==0&&(Be=new St.Q(Be.startLineNumber,Be.startColumn,Be.endLineNumber,Be.endColumn+Ht))}tt=void 0}else"snippet"in Se.insertText?(Qe=new ta().parse(Se.insertText.snippet).toString(),tt={snippet:Se.insertText.snippet,range:Be}):(0,pi.xb)(Se.insertText);const vt={insertText:Qe,snippetInfo:tt,range:Be,command:Se.command,sourceProvider:W.provider,sourceInlineCompletions:re,sourceInlineCompletion:Se,filterText:Se.filterText||Qe,additionalTextEdits:Se.additionalTextEdits||Rb()};U.set(JSON.stringify({insertText:Qe,range:Se.range}),vt)}}return{items:[...U.values()],dispose:()=>{for(const W of A)W.dispose()}}})}function Gb(u,e){const t=e.getWordAtPosition(u),i=e.getLineMaxColumn(u.lineNumber);return t?new St.Q(u.lineNumber,t.startColumn,u.lineNumber,i):St.Q.fromPositions(u,u.with(void 0,i))}function Qb(u,e,t,i){const o=t.getLineContent(e.lineNumber).substring(0,e.column-1)+u,c=t.tokenization.tokenizeLineWithEdit(e,o.length-(e.column-1),u),m=c?.sliceAndInflate(e.column-1,o.length,0);return m?Hb(m,i):u}var L0=f(39619),Zb=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},D0=function(u,e){return function(t,i){e(t,i,u)}};class gp{constructor(e){this.name=e}select(e,t,i){if(i.length===0)return 0;const s=i[0].score[0];for(let o=0;o<i.length;o++){const{score:c,completion:m}=i[o];if(c[0]!==s)break;if(m.preselect)return o}return 0}}class k0 extends gp{constructor(){super("first")}memorize(e,t,i){}toJSON(){}fromJSON(){}}class Yb extends gp{constructor(){super("recentlyUsed"),this._cache=new ir.qK(300,.66),this._seq=0}memorize(e,t,i){const s=`${e.getLanguageId()}/${i.textLabel}`;this._cache.set(s,{touch:this._seq++,type:i.completion.kind,insertText:i.completion.insertText})}select(e,t,i){if(i.length===0)return 0;const s=e.getLineContent(t.lineNumber).substr(t.column-10,t.column-1);if(/\s$/.test(s))return super.select(e,t,i);const o=i[0].score[0];let c=-1,m=-1,A=-1;for(let U=0;U<i.length&&i[U].score[0]===o;U++){const W=`${e.getLanguageId()}/${i[U].textLabel}`,re=this._cache.peek(W);if(re&&re.touch>A&&re.type===i[U].completion.kind&&re.insertText===i[U].completion.insertText&&(A=re.touch,m=U),i[U].completion.preselect&&c===-1)return c=U}return m!==-1?m:c!==-1?c:0}toJSON(){return this._cache.toJSON()}fromJSON(e){this._cache.clear();const t=0;for(const[i,s]of e)s.touch=t,s.type=typeof s.type=="number"?s.type:Xe.HC.fromString(s.type),this._cache.set(i,s);this._seq=this._cache.size}}class Xb extends gp{constructor(){super("recentlyUsedByPrefix"),this._trie=ir.cB.forStrings(),this._seq=0}memorize(e,t,i){const{word:s}=e.getWordUntilPosition(t),o=`${e.getLanguageId()}/${s}`;this._trie.set(o,{type:i.completion.kind,insertText:i.completion.insertText,touch:this._seq++})}select(e,t,i){const{word:s}=e.getWordUntilPosition(t);if(!s)return super.select(e,t,i);const o=`${e.getLanguageId()}/${s}`;let c=this._trie.get(o);if(c||(c=this._trie.findSubstr(o)),c)for(let m=0;m<i.length;m++){const{kind:A,insertText:U}=i[m].completion;if(A===c.type&&U===c.insertText)return m}return super.select(e,t,i)}toJSON(){const e=[];return this._trie.forEach((t,i)=>e.push([i,t])),e.sort((t,i)=>-(t[1].touch-i[1].touch)).forEach((t,i)=>t[1].touch=i),e.slice(0,200)}fromJSON(e){if(this._trie.clear(),e.length>0){this._seq=e[0][1].touch+1;for(const[t,i]of e)i.type=typeof i.type=="number"?i.type:Xe.HC.fromString(i.type),this._trie.set(t,i)}}}let yu=class lm{constructor(e,t){this._storageService=e,this._configService=t,this._disposables=new at.Cm,this._persistSoon=new Ot.uC(()=>this._saveState(),500),this._disposables.add(e.onWillSaveState(i=>{i.reason===fo.LP.SHUTDOWN&&this._saveState()}))}dispose(){this._disposables.dispose(),this._persistSoon.dispose()}memorize(e,t,i){this._withStrategy(e,t).memorize(e,t,i),this._persistSoon.schedule()}select(e,t,i){return this._withStrategy(e,t).select(e,t,i)}_withStrategy(e,t){var i;const s=this._configService.getValue("editor.suggestSelection",{overrideIdentifier:e.getLanguageIdAtPosition(t.lineNumber,t.column),resource:e.uri});if(((i=this._strategy)===null||i===void 0?void 0:i.name)!==s){this._saveState();const o=lm._strategyCtors.get(s)||k0;this._strategy=new o;try{const m=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,A=this._storageService.get(`${lm._storagePrefix}/${s}`,m);A&&this._strategy.fromJSON(JSON.parse(A))}catch{}}return this._strategy}_saveState(){if(this._strategy){const t=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,i=JSON.stringify(this._strategy);this._storageService.store(`${lm._storagePrefix}/${this._strategy.name}`,i,t,1)}}};yu._strategyCtors=new Map([["recentlyUsedByPrefix",Xb],["recentlyUsed",Yb],["first",k0]]),yu._storagePrefix="suggest/memories",yu=Zb([D0(0,fo.CS),D0(1,de.pG)],yu);const mf=(0,P.u1)("ISuggestMemories");(0,nr.v)(mf,yu,!0);var Jb=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},qb=function(u,e){return function(t,i){e(t,i,u)}};let Lu=class wC{constructor(e,t){this._editor=e,this._enabled=!1,this._ckAtEnd=wC.AtEnd.bindTo(t),this._configListener=this._editor.onDidChangeConfiguration(i=>i.hasChanged(113)&&this._update()),this._update()}dispose(){var e;this._configListener.dispose(),(e=this._selectionListener)===null||e===void 0||e.dispose(),this._ckAtEnd.reset()}_update(){const e=this._editor.getOption(113)==="on";if(this._enabled!==e)if(this._enabled=e,this._enabled){const t=()=>{if(!this._editor.hasModel()){this._ckAtEnd.set(!1);return}const i=this._editor.getModel(),s=this._editor.getSelection(),o=i.getWordAtPosition(s.getStartPosition());if(!o){this._ckAtEnd.set(!1);return}this._ckAtEnd.set(o.endColumn===s.getStartPosition().column)};this._selectionListener=this._editor.onDidChangeCursorSelection(t),t()}else this._selectionListener&&(this._ckAtEnd.reset(),this._selectionListener.dispose(),this._selectionListener=void 0)}};Lu.AtEnd=new ct.N1("atEndOfWord",!1),Lu=Jb([qb(1,ct.fN)],Lu);var ew=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},tw=function(u,e){return function(t,i){e(t,i,u)}};let Hd=class dm{constructor(e,t){this._editor=e,this._index=0,this._ckOtherSuggestions=dm.OtherSuggestions.bindTo(t)}dispose(){this.reset()}reset(){var e;this._ckOtherSuggestions.reset(),(e=this._listener)===null||e===void 0||e.dispose(),this._model=void 0,this._acceptNext=void 0,this._ignore=!1}set({model:e,index:t},i){if(e.items.length===0){this.reset();return}if(dm._moveIndex(!0,e,t)===t){this.reset();return}this._acceptNext=i,this._model=e,this._index=t,this._listener=this._editor.onDidChangeCursorPosition(()=>{this._ignore||this.reset()}),this._ckOtherSuggestions.set(!0)}static _moveIndex(e,t,i){let s=i;for(;s=(s+t.items.length+(e?1:-1))%t.items.length,!(s===i||!t.items[s].completion.additionalTextEdits););return s}next(){this._move(!0)}prev(){this._move(!1)}_move(e){if(this._model)try{this._ignore=!0,this._index=dm._moveIndex(e,this._model,this._index),this._acceptNext({index:this._index,item:this._model.items[this._index],model:this._model})}finally{this._ignore=!1}}};Hd.OtherSuggestions=new ct.N1("hasOtherSuggestions",!1),Hd=ew([tw(1,ct.fN)],Hd);class iw{constructor(e,t,i){this._disposables=new at.Cm,this._disposables.add(t.onDidShow(()=>this._onItem(t.getFocusedItem()))),this._disposables.add(t.onDidFocus(this._onItem,this)),this._disposables.add(t.onDidHide(this.reset,this)),this._disposables.add(e.onWillType(s=>{if(this._active&&!t.isFrozen()){const o=s.charCodeAt(s.length-1);this._active.acceptCharacters.has(o)&&e.getOption(0)&&i(this._active.item)}}))}_onItem(e){if(!e||!(0,cn.EI)(e.item.completion.commitCharacters)){this.reset();return}if(this._active&&this._active.item.item===e.item)return;const t=new Jc.y;for(const i of e.item.completion.commitCharacters)i.length>0&&t.add(i.charCodeAt(0));this._active={acceptCharacters:t,item:e}}reset(){this._active=void 0}dispose(){this._disposables.dispose()}}var nw=function(u,e,t,i){function s(o){return o instanceof t?o:new t(function(c){c(o)})}return new(t||(t=Promise))(function(o,c){function m(W){try{U(i.next(W))}catch(re){c(re)}}function A(W){try{U(i.throw(W))}catch(re){c(re)}}function U(W){W.done?o(W.value):s(W.value).then(m,A)}U((i=i.apply(u,e||[])).next())})};class gr{provideSelectionRanges(e,t){return nw(this,void 0,void 0,function*(){const i=[];for(const s of t){const o=[];i.push(o);const c=new Map;yield new Promise(m=>gr._bracketsRightYield(m,0,e,s,c)),yield new Promise(m=>gr._bracketsLeftYield(m,0,e,s,c,o))}return i})}static _bracketsRightYield(e,t,i,s,o){const c=new Map,m=Date.now();for(;;){if(t>=gr._maxRounds){e();break}if(!s){e();break}const A=i.bracketPairs.findNextBracket(s);if(!A){e();break}if(Date.now()-m>gr._maxDuration){setTimeout(()=>gr._bracketsRightYield(e,t+1,i,s,o));break}if(A.bracketInfo.isOpeningBracket){const W=A.bracketInfo.bracketText,re=c.has(W)?c.get(W):0;c.set(W,re+1)}else{const W=A.bracketInfo.getClosedBrackets()[0].bracketText;let re=c.has(W)?c.get(W):0;if(re-=1,c.set(W,Math.max(0,re)),re<0){let Se=o.get(W);Se||(Se=new Fg.w,o.set(W,Se)),Se.push(A.range)}}s=A.range.getEndPosition()}}static _bracketsLeftYield(e,t,i,s,o,c){const m=new Map,A=Date.now();for(;;){if(t>=gr._maxRounds&&o.size===0){e();break}if(!s){e();break}const U=i.bracketPairs.findPrevBracket(s);if(!U){e();break}if(Date.now()-A>gr._maxDuration){setTimeout(()=>gr._bracketsLeftYield(e,t+1,i,s,o,c));break}if(U.bracketInfo.isOpeningBracket){const re=U.bracketInfo.bracketText;let Se=m.has(re)?m.get(re):0;if(Se-=1,m.set(re,Math.max(0,Se)),Se<0){const Be=o.get(re);if(Be){const Qe=Be.shift();Be.size===0&&o.delete(re);const tt=St.Q.fromPositions(U.range.getEndPosition(),Qe.getStartPosition()),vt=St.Q.fromPositions(U.range.getStartPosition(),Qe.getEndPosition());c.push({range:tt}),c.push({range:vt}),gr._addBracketLeading(i,vt,c)}}}else{const re=U.bracketInfo.getClosedBrackets()[0].bracketText,Se=m.has(re)?m.get(re):0;m.set(re,Se+1)}s=U.range.getStartPosition()}}static _addBracketLeading(e,t,i){if(t.startLineNumber===t.endLineNumber)return;const s=t.startLineNumber,o=e.getLineFirstNonWhitespaceColumn(s);o!==0&&o!==t.startColumn&&(i.push({range:St.Q.fromPositions(new bi.y(s,o),t.getEndPosition())}),i.push({range:St.Q.fromPositions(new bi.y(s,1),t.getEndPosition())}));const c=s-1;if(c>0){const m=e.getLineFirstNonWhitespaceColumn(c);m===t.startColumn&&m!==e.getLineLastNonWhitespaceColumn(c)&&(i.push({range:St.Q.fromPositions(new bi.y(c,m),t.getEndPosition())}),i.push({range:St.Q.fromPositions(new bi.y(c,1),t.getEndPosition())}))}}}gr._maxDuration=30,gr._maxRounds=2;var sw=function(u,e,t,i){function s(o){return o instanceof t?o:new t(function(c){c(o)})}return new(t||(t=Promise))(function(o,c){function m(W){try{U(i.next(W))}catch(re){c(re)}}function A(W){try{U(i.throw(W))}catch(re){c(re)}}function U(W){W.done?o(W.value):s(W.value).then(m,A)}U((i=i.apply(u,e||[])).next())})};class aa{static create(e,t){return sw(this,void 0,void 0,function*(){if(!t.getOption(108).localityBonus||!t.hasModel())return aa.None;const i=t.getModel(),s=t.getPosition();if(!e.canComputeWordRanges(i.uri))return aa.None;const[o]=yield new gr().provideSelectionRanges(i,[s]);if(o.length===0)return aa.None;const c=yield e.computeWordRanges(i.uri,o[0].range);if(!c)return aa.None;const m=i.getWordUntilPosition(s);return delete c[m.word],new class extends aa{distance(A,U){if(!s.equals(t.getPosition()))return 0;if(U.kind===17)return 2<<20;const W=typeof U.label=="string"?U.label:U.label.label,re=c[W];if((0,cn.Ct)(re))return 2<<20;const Se=(0,cn.El)(re,St.Q.fromPositions(A),St.Q.compareRangesUsingStarts),Be=Se>=0?re[Se]:re[Math.max(0,~Se-1)];let Qe=o.length;for(const tt of o){if(!St.Q.containsRange(tt.range,Be))break;Qe-=1}return Qe}}})}}aa.None=new class extends aa{distance(){return 0}};class E0{constructor(e,t){this.leadingLineContent=e,this.characterCountDelta=t}}class Xl{constructor(e,t,i,s,o,c,m=Qi.Nd.default,A=void 0){this.clipboardText=A,this._snippetCompareFn=Xl._compareCompletionItems,this._items=e,this._column=t,this._wordDistance=s,this._options=o,this._refilterKind=1,this._lineContext=i,this._fuzzyScoreOptions=m,c==="top"?this._snippetCompareFn=Xl._compareCompletionItemsSnippetsUp:c==="bottom"&&(this._snippetCompareFn=Xl._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}get allProvider(){return this._ensureCachedState(),this._providerInfo.keys()}get incomplete(){this._ensureCachedState();const e=new Set;for(const[t,i]of this._providerInfo)i&&e.add(t);return e}adopt(e){const t=[];for(let i=0;i<this._items.length;)e.has(this._items[i].provider)?i++:(t.push(this._items[i]),this._items[i]=this._items[this._items.length-1],this._items.pop());return this._refilterKind=1,t}get stats(){return this._ensureCachedState(),this._stats}_ensureCachedState(){this._refilterKind!==0&&this._createCachedState()}_createCachedState(){this._providerInfo=new Map;const e=[],{leadingLineContent:t,characterCountDelta:i}=this._lineContext;let s="",o="";const c=this._refilterKind===1?this._items:this._filteredItems,m=[],A=!this._options.filterGraceful||c.length>2e3?Qi.dt:Qi.uU;for(let U=0;U<c.length;U++){const W=c[U];if(W.isInvalid)continue;this._providerInfo.set(W.provider,!!W.container.incomplete);const re=W.position.column-W.editStart.column,Se=re+i-(W.position.column-this._column);if(s.length!==Se&&(s=Se===0?"":t.slice(-Se),o=s.toLowerCase()),W.word=s,Se===0)W.score=Qi.ne.Default;else{let Be=0;for(;Be<re;){const Qe=s.charCodeAt(Be);if(Qe===32||Qe===9)Be+=1;else break}if(Be>=Se)W.score=Qi.ne.Default;else if(typeof W.completion.filterText=="string"){const Qe=A(s,o,Be,W.completion.filterText,W.filterTextLow,0,this._fuzzyScoreOptions);if(!Qe)continue;(0,xi.W1)(W.completion.filterText,W.textLabel)===0?W.score=Qe:(W.score=(0,Qi.Jo)(s,o,Be,W.textLabel,W.labelLow,0),W.score[0]=Qe[0])}else{const Qe=A(s,o,Be,W.textLabel,W.labelLow,0,this._fuzzyScoreOptions);if(!Qe)continue;W.score=Qe}}W.idx=U,W.distance=this._wordDistance.distance(W.position,W.completion),m.push(W),e.push(W.textLabel.length)}this._filteredItems=m.sort(this._snippetCompareFn),this._refilterKind=0,this._stats={pLabelLen:e.length?(0,cn.SO)(e.length-.85,e,(U,W)=>U-W):0}}static _compareCompletionItems(e,t){return e.score[0]>t.score[0]?-1:e.score[0]<t.score[0]?1:e.distance<t.distance?-1:e.distance>t.distance?1:e.idx<t.idx?-1:e.idx>t.idx?1:0}static _compareCompletionItemsSnippetsDown(e,t){if(e.completion.kind!==t.completion.kind){if(e.completion.kind===27)return 1;if(t.completion.kind===27)return-1}return Xl._compareCompletionItems(e,t)}static _compareCompletionItemsSnippetsUp(e,t){if(e.completion.kind!==t.completion.kind){if(e.completion.kind===27)return-1;if(t.completion.kind===27)return 1}return Xl._compareCompletionItems(e,t)}}var ow=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},zd=function(u,e){return function(t,i){e(t,i,u)}},rw=function(u,e,t,i){function s(o){return o instanceof t?o:new t(function(c){c(o)})}return new(t||(t=Promise))(function(o,c){function m(W){try{U(i.next(W))}catch(re){c(re)}}function A(W){try{U(i.throw(W))}catch(re){c(re)}}function U(W){W.done?o(W.value):s(W.value).then(m,A)}U((i=i.apply(u,e||[])).next())})};class eh{constructor(e,t,i,s,o){this.leadingLineContent=e.getLineContent(t.lineNumber).substr(0,t.column-1),this.leadingWord=e.getWordUntilPosition(t),this.lineNumber=t.lineNumber,this.column=t.column,this.auto=i,this.shy=s,this.noSelect=o}static shouldAutoTrigger(e){if(!e.hasModel())return!1;const t=e.getModel(),i=e.getPosition();t.tokenization.tokenizeIfCheap(i.lineNumber);const s=t.getWordAtPosition(i);return!(!s||s.endColumn!==i.column||!isNaN(Number(s.word)))}}function wk(u){return u.getOption(108).preview}function aw(u,e,t){if(!e.getContextKeyValue("inlineSuggestionVisible"))return!0;const i=t.getValue("editor.inlineSuggest.allowQuickSuggestions");return i!==void 0?!!i:!1}function lw(u,e,t){if(!e.getContextKeyValue("inlineSuggestionVisible"))return!0;const i=t.getValue("editor.inlineSuggest.allowSuggestOnTriggerCharacters");return i!==void 0?!!i:!1}let fp=class SC{constructor(e,t,i,s,o,c,m,A){this._editor=e,this._editorWorkerService=t,this._clipboardService=i,this._telemetryService=s,this._logService=o,this._contextKeyService=c,this._configurationService=m,this._languageFeaturesService=A,this._toDispose=new at.Cm,this._triggerCharacterListener=new at.Cm,this._triggerQuickSuggest=new Ot.pc,this._state=0,this._completionDisposables=new at.Cm,this._onDidCancel=new Vi.vl,this._onDidTrigger=new Vi.vl,this._onDidSuggest=new Vi.vl,this.onDidCancel=this._onDidCancel.event,this.onDidTrigger=this._onDidTrigger.event,this.onDidSuggest=this._onDidSuggest.event,this._telemetryGate=0,this._currentSelection=this._editor.getSelection()||new ki.L(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 U=!1;this._toDispose.add(this._editor.onDidCompositionStart(()=>{U=!0})),this._toDispose.add(this._editor.onDidCompositionEnd(()=>{U=!1,this._onCompositionEnd()})),this._toDispose.add(this._editor.onDidChangeCursorSelection(W=>{U||this._onCursorChange(W)})),this._toDispose.add(this._editor.onDidChangeModelContent(()=>{U||this._refilterCompletionItems()})),this._updateTriggerCharacters()}dispose(){(0,at.AS)(this._triggerCharacterListener),(0,at.AS)([this._onDidCancel,this._onDidSuggest,this._onDidTrigger,this._triggerQuickSuggest]),this._toDispose.dispose(),this._completionDisposables.dispose(),this.cancel()}_updateTriggerCharacters(){if(this._triggerCharacterListener.clear(),this._editor.getOption(83)||!this._editor.hasModel()||!this._editor.getOption(111))return;const e=new Map;for(const i of this._languageFeaturesService.completionProvider.all(this._editor.getModel()))for(const s of i.triggerCharacters||[]){let o=e.get(s);o||(o=new Set,o.add(Cm()),e.set(s,o)),o.add(i)}const t=i=>{if(!lw(this._editor,this._contextKeyService,this._configurationService)||eh.shouldAutoTrigger(this._editor))return;if(!i){const c=this._editor.getPosition();i=this._editor.getModel().getLineContent(c.lineNumber).substr(0,c.column-1)}let s="";(0,xi.LJ)(i.charCodeAt(i.length-1))?(0,xi.pc)(i.charCodeAt(i.length-2))&&(s=i.substr(i.length-2)):s=i.charAt(i.length-1);const o=e.get(s);if(o){const c=this._completionModel?{items:this._completionModel.adopt(o),clipboardText:this._completionModel.clipboardText}:void 0;this.trigger({auto:!0,shy:!1,noSelect:!1,triggerCharacter:s},!!this._completionModel,o,c)}};this._triggerCharacterListener.add(this._editor.onDidType(t)),this._triggerCharacterListener.add(this._editor.onDidCompositionEnd(()=>t()))}get state(){return this._state}cancel(e=!1){var t;this._state!==0&&(this._triggerQuickSuggest.cancel(),(t=this._requestToken)===null||t===void 0||t.cancel(),this._requestToken=void 0,this._state=0,this._completionModel=void 0,this._context=void 0,this._onDidCancel.fire({retrigger:e}))}clear(){this._completionDisposables.clear()}_updateActiveSuggestSession(){this._state!==0&&(!this._editor.hasModel()||!this._languageFeaturesService.completionProvider.has(this._editor.getModel())?this.cancel():this.trigger({auto:this._state===2,shy:!1,noSelect:!1},!0))}_onCursorChange(e){if(!this._editor.hasModel())return;const t=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._state===0&&e.reason===0?(t.containsRange(this._currentSelection)||t.getEndPosition().isBeforeOrEqual(this._currentSelection.getPosition()))&&this._doTriggerQuickSuggest():this._state!==0&&e.reason===3&&this._refilterCompletionItems()}_onCompositionEnd(){this._state===0?this._doTriggerQuickSuggest():this._refilterCompletionItems()}_doTriggerQuickSuggest(){var e;Hl.isAllOff(this._editor.getOption(81))||this._editor.getOption(108).snippetsPreventQuickSuggestions&&(!((e=io.get(this._editor))===null||e===void 0)&&e.isInSnippet())||(this.cancel(),this._triggerQuickSuggest.cancelAndSet(()=>{if(this._state!==0||!eh.shouldAutoTrigger(this._editor)||!this._editor.hasModel()||!this._editor.hasWidgetFocus())return;const t=this._editor.getModel(),i=this._editor.getPosition(),s=this._editor.getOption(81);if(!Hl.isAllOff(s)){if(!Hl.isAllOn(s)){t.tokenization.tokenizeIfCheap(i.lineNumber);const o=t.tokenization.getLineTokens(i.lineNumber),c=o.getStandardTokenType(o.findTokenIndexAtOffset(Math.max(i.column-1-1,0)));if(Hl.valueFor(s,c)!=="on")return}aw(this._editor,this._contextKeyService,this._configurationService)&&this._languageFeaturesService.completionProvider.has(t)&&this.trigger({auto:!0,shy:!1,noSelect:!1})}},this._editor.getOption(82)))}_refilterCompletionItems(){Promise.resolve().then(()=>{if(this._state===0||!this._editor.hasModel())return;const e=this._editor.getModel(),t=this._editor.getPosition(),i=new eh(e,t,this._state===2,!1,!1);this._onNewContext(i)})}trigger(e,t=!1,i,s,o){var c;if(!this._editor.hasModel())return;const m=this._editor.getModel(),A=e.auto,U=new eh(m,this._editor.getPosition(),A,e.shy,e.noSelect);this.cancel(t),this._state=A?2:1,this._onDidTrigger.fire({auto:A,shy:e.shy,position:this._editor.getPosition()}),this._context=U;let W={triggerKind:(c=e.triggerKind)!==null&&c!==void 0?c:0};e.triggerCharacter&&(W={triggerKind:1,triggerCharacter:e.triggerCharacter}),this._requestToken=new Ti.Q;const re=this._editor.getOption(103);let Se=1;switch(re){case"top":Se=0;break;case"bottom":Se=2;break}const{itemKind:Be,showDeprecated:Qe}=SC._createSuggestFilter(this._editor),tt=new Id(Se,o?new Set:Be,i,Qe),vt=aa.create(this._editorWorkerService,this._editor),Ht=Gh(this._languageFeaturesService.completionProvider,m,this._editor.getPosition(),tt,W,this._requestToken.token);Promise.all([Ht,vt]).then(([ci,gi])=>rw(this,void 0,void 0,function*(){var Ui;if((Ui=this._requestToken)===null||Ui===void 0||Ui.dispose(),!this._editor.hasModel())return;let dn=s?.clipboardText;if(!dn&&ci.needsClipboard&&(dn=yield this._clipboardService.readText()),this._state===0)return;const hs=this._editor.getModel();let An=ci.items;if(s){const Po=Lg(Se);An=An.concat(s.items).sort(Po)}const vo=new eh(hs,this._editor.getPosition(),A,e.shy,e.noSelect);this._completionModel=new Xl(An,this._context.column,{leadingLineContent:vo.leadingLineContent,characterCountDelta:vo.column-this._context.column},gi,this._editor.getOption(108),this._editor.getOption(103),void 0,dn),this._completionDisposables.add(ci.disposable),this._onNewContext(vo),this._reportDurationsTelemetry(ci.durations)})).catch(Wi.dz)}_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 t=new Set;e.getOption(103)==="none"&&t.add(27);const s=e.getOption(108);return s.showMethods||t.add(0),s.showFunctions||t.add(1),s.showConstructors||t.add(2),s.showFields||t.add(3),s.showVariables||t.add(4),s.showClasses||t.add(5),s.showStructs||t.add(6),s.showInterfaces||t.add(7),s.showModules||t.add(8),s.showProperties||t.add(9),s.showEvents||t.add(10),s.showOperators||t.add(11),s.showUnits||t.add(12),s.showValues||t.add(13),s.showConstants||t.add(14),s.showEnums||t.add(15),s.showEnumMembers||t.add(16),s.showKeywords||t.add(17),s.showWords||t.add(18),s.showColors||t.add(19),s.showFiles||t.add(20),s.showReferences||t.add(21),s.showColors||t.add(22),s.showFolders||t.add(23),s.showTypeParameters||t.add(24),s.showSnippets||t.add(27),s.showUsers||t.add(25),s.showIssues||t.add(26),{itemKind:t,showDeprecated:s.showDeprecated}}_onNewContext(e){if(this._context){if(e.lineNumber!==this._context.lineNumber){this.cancel();return}if((0,xi.UU)(e.leadingLineContent)!==(0,xi.UU)(this._context.leadingLineContent)){this.cancel();return}if(e.column<this._context.column){e.leadingWord.word?this.trigger({auto:this._context.auto,shy:!1,noSelect:!1},!0):this.cancel();return}if(this._completionModel){if(e.leadingWord.word.length!==0&&e.leadingWord.startColumn>this._context.leadingWord.startColumn){const t=new Set(this._languageFeaturesService.completionProvider.all(this._editor.getModel()));for(const s of this._completionModel.allProvider)t.delete(s);const i=this._completionModel.adopt(new Set);this.trigger({auto:this._context.auto,shy:!1,noSelect:!1},!0,t,{items:i,clipboardText:this._completionModel.clipboardText});return}if(e.column>this._context.column&&this._completionModel.incomplete.size>0&&e.leadingWord.word.length!==0){const{incomplete:t}=this._completionModel,i=this._completionModel.adopt(t);this.trigger({auto:this._state===2,shy:!1,noSelect:!1,triggerKind:2},!0,t,{items:i,clipboardText:this._completionModel.clipboardText})}else{const t=this._completionModel.lineContext;let i=!1;if(this._completionModel.lineContext={leadingLineContent:e.leadingLineContent,characterCountDelta:e.column-this._context.column},this._completionModel.items.length===0){if(eh.shouldAutoTrigger(this._editor)&&this._context.leadingWord.endColumn<e.leadingWord.startColumn){this.trigger({auto:this._context.auto,shy:!1,noSelect:!1},!0);return}if(this._context.auto){this.cancel();return}else if(this._completionModel.lineContext=t,i=this._completionModel.items.length>0,i&&e.leadingWord.word.length===0){this.cancel();return}}this._onDidSuggest.fire({completionModel:this._completionModel,auto:this._context.auto,shy:this._context.shy,noSelect:this._context.noSelect,isFrozen:i})}}}}};fp=ow([zd(1,_u.w),zd(2,Oi.h),zd(3,Me.k),zd(4,xs.rr),zd(5,ct.fN),zd(6,de.pG),zd(7,Zi.u)],fp);class pf{constructor(e,t){this._disposables=new at.Cm,this._lastOvertyped=[],this._empty=!0,this._disposables.add(e.onWillType(()=>{if(!this._empty||!e.hasModel())return;const i=e.getSelections(),s=i.length;let o=!1;for(let m=0;m<s;m++)if(!i[m].isEmpty()){o=!0;break}if(!o)return;this._lastOvertyped=[];const c=e.getModel();for(let m=0;m<s;m++){const A=i[m];if(c.getValueLengthInRange(A)>pf._maxSelectionLength)return;this._lastOvertyped[m]={value:c.getValueInRange(A),multiline:A.startLineNumber!==A.endLineNumber}}this._empty=!1})),this._disposables.add(t.onDidCancel(i=>{!this._empty&&!i.retrigger&&(this._empty=!0)}))}getLastOvertypedInfo(e){if(!this._empty&&e>=0&&e<this._lastOvertyped.length)return this._lastOvertyped[e]}dispose(){this._disposables.dispose()}}pf._maxSelectionLength=51200;var Sk=f(96852),dw=f(62992),yk=f(69269),cw=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},mp=function(u,e){return function(t,i){e(t,i,u)}};class pp extends Yr{updateLabel(){const e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();this.label&&(this.label.textContent=(0,we.kg)("ddd","{0} ({1})",this._action.label,pp.symbolPrintEnter(e)))}static symbolPrintEnter(e){var t;return(t=e.getLabel())===null||t===void 0?void 0:t.replace(/\benter\b/gi,"\u23CE")}}let _p=class{constructor(e,t,i,s){this._menuService=i,this._contextKeyService=s,this._menuDisposables=new at.Cm,this.element=M.BC(e,M.$(".suggest-status-bar"));const o=c=>c instanceof xe.Xe?t.createInstance(pp,c,void 0):void 0;this._leftActions=new Zr.E(this.element,{actionViewItemProvider:o}),this._rightActions=new Zr.E(this.element,{actionViewItemProvider:o}),this._leftActions.domNode.classList.add("left"),this._rightActions.domNode.classList.add("right")}dispose(){this._menuDisposables.dispose(),this.element.remove()}show(){const e=this._menuService.createMenu(ia,this._contextKeyService),t=()=>{const i=[],s=[];for(const[o,c]of e.getActions())o==="left"?i.push(...c):s.push(...c);this._leftActions.clear(),this._leftActions.push(i),this._rightActions.clear(),this._rightActions.push(s)};this._menuDisposables.add(e.onDidChange(()=>t())),this._menuDisposables.add(e)}hide(){this._menuDisposables.clear()}};_p=cw([mp(1,P._Y),mp(2,xe.ez),mp(3,ct.fN)],_p);const hw=(0,Ce.x1A)("symbolIcon.arrayForeground",{dark:Ce.CU6,light:Ce.CU6,hcDark:Ce.CU6,hcLight:Ce.CU6},(0,we.kg)("symbolIcon.arrayForeground","The foreground color for array symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),uw=(0,Ce.x1A)("symbolIcon.booleanForeground",{dark:Ce.CU6,light:Ce.CU6,hcDark:Ce.CU6,hcLight:Ce.CU6},(0,we.kg)("symbolIcon.booleanForeground","The foreground color for boolean symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),gw=(0,Ce.x1A)("symbolIcon.classForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},(0,we.kg)("symbolIcon.classForeground","The foreground color for class symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),fw=(0,Ce.x1A)("symbolIcon.colorForeground",{dark:Ce.CU6,light:Ce.CU6,hcDark:Ce.CU6,hcLight:Ce.CU6},(0,we.kg)("symbolIcon.colorForeground","The foreground color for color symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),mw=(0,Ce.x1A)("symbolIcon.constantForeground",{dark:Ce.CU6,light:Ce.CU6,hcDark:Ce.CU6,hcLight:Ce.CU6},(0,we.kg)("symbolIcon.constantForeground","The foreground color for constant symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),pw=(0,Ce.x1A)("symbolIcon.constructorForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},(0,we.kg)("symbolIcon.constructorForeground","The foreground color for constructor symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),_w=(0,Ce.x1A)("symbolIcon.enumeratorForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},(0,we.kg)("symbolIcon.enumeratorForeground","The foreground color for enumerator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),vw=(0,Ce.x1A)("symbolIcon.enumeratorMemberForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,we.kg)("symbolIcon.enumeratorMemberForeground","The foreground color for enumerator member symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Cw=(0,Ce.x1A)("symbolIcon.eventForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},(0,we.kg)("symbolIcon.eventForeground","The foreground color for event symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),bw=(0,Ce.x1A)("symbolIcon.fieldForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,we.kg)("symbolIcon.fieldForeground","The foreground color for field symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),ww=(0,Ce.x1A)("symbolIcon.fileForeground",{dark:Ce.CU6,light:Ce.CU6,hcDark:Ce.CU6,hcLight:Ce.CU6},(0,we.kg)("symbolIcon.fileForeground","The foreground color for file symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Sw=(0,Ce.x1A)("symbolIcon.folderForeground",{dark:Ce.CU6,light:Ce.CU6,hcDark:Ce.CU6,hcLight:Ce.CU6},(0,we.kg)("symbolIcon.folderForeground","The foreground color for folder symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),yw=(0,Ce.x1A)("symbolIcon.functionForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},(0,we.kg)("symbolIcon.functionForeground","The foreground color for function symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Lw=(0,Ce.x1A)("symbolIcon.interfaceForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,we.kg)("symbolIcon.interfaceForeground","The foreground color for interface symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Dw=(0,Ce.x1A)("symbolIcon.keyForeground",{dark:Ce.CU6,light:Ce.CU6,hcDark:Ce.CU6,hcLight:Ce.CU6},(0,we.kg)("symbolIcon.keyForeground","The foreground color for key symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),kw=(0,Ce.x1A)("symbolIcon.keywordForeground",{dark:Ce.CU6,light:Ce.CU6,hcDark:Ce.CU6,hcLight:Ce.CU6},(0,we.kg)("symbolIcon.keywordForeground","The foreground color for keyword symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Ew=(0,Ce.x1A)("symbolIcon.methodForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},(0,we.kg)("symbolIcon.methodForeground","The foreground color for method symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),xw=(0,Ce.x1A)("symbolIcon.moduleForeground",{dark:Ce.CU6,light:Ce.CU6,hcDark:Ce.CU6,hcLight:Ce.CU6},(0,we.kg)("symbolIcon.moduleForeground","The foreground color for module symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Iw=(0,Ce.x1A)("symbolIcon.namespaceForeground",{dark:Ce.CU6,light:Ce.CU6,hcDark:Ce.CU6,hcLight:Ce.CU6},(0,we.kg)("symbolIcon.namespaceForeground","The foreground color for namespace symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Nw=(0,Ce.x1A)("symbolIcon.nullForeground",{dark:Ce.CU6,light:Ce.CU6,hcDark:Ce.CU6,hcLight:Ce.CU6},(0,we.kg)("symbolIcon.nullForeground","The foreground color for null symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Mw=(0,Ce.x1A)("symbolIcon.numberForeground",{dark:Ce.CU6,light:Ce.CU6,hcDark:Ce.CU6,hcLight:Ce.CU6},(0,we.kg)("symbolIcon.numberForeground","The foreground color for number symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Tw=(0,Ce.x1A)("symbolIcon.objectForeground",{dark:Ce.CU6,light:Ce.CU6,hcDark:Ce.CU6,hcLight:Ce.CU6},(0,we.kg)("symbolIcon.objectForeground","The foreground color for object symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Rw=(0,Ce.x1A)("symbolIcon.operatorForeground",{dark:Ce.CU6,light:Ce.CU6,hcDark:Ce.CU6,hcLight:Ce.CU6},(0,we.kg)("symbolIcon.operatorForeground","The foreground color for operator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Aw=(0,Ce.x1A)("symbolIcon.packageForeground",{dark:Ce.CU6,light:Ce.CU6,hcDark:Ce.CU6,hcLight:Ce.CU6},(0,we.kg)("symbolIcon.packageForeground","The foreground color for package symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Ow=(0,Ce.x1A)("symbolIcon.propertyForeground",{dark:Ce.CU6,light:Ce.CU6,hcDark:Ce.CU6,hcLight:Ce.CU6},(0,we.kg)("symbolIcon.propertyForeground","The foreground color for property symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Pw=(0,Ce.x1A)("symbolIcon.referenceForeground",{dark:Ce.CU6,light:Ce.CU6,hcDark:Ce.CU6,hcLight:Ce.CU6},(0,we.kg)("symbolIcon.referenceForeground","The foreground color for reference symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Fw=(0,Ce.x1A)("symbolIcon.snippetForeground",{dark:Ce.CU6,light:Ce.CU6,hcDark:Ce.CU6,hcLight:Ce.CU6},(0,we.kg)("symbolIcon.snippetForeground","The foreground color for snippet symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Bw=(0,Ce.x1A)("symbolIcon.stringForeground",{dark:Ce.CU6,light:Ce.CU6,hcDark:Ce.CU6,hcLight:Ce.CU6},(0,we.kg)("symbolIcon.stringForeground","The foreground color for string symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Ww=(0,Ce.x1A)("symbolIcon.structForeground",{dark:Ce.CU6,light:Ce.CU6,hcDark:Ce.CU6,hcLight:Ce.CU6},(0,we.kg)("symbolIcon.structForeground","The foreground color for struct symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Vw=(0,Ce.x1A)("symbolIcon.textForeground",{dark:Ce.CU6,light:Ce.CU6,hcDark:Ce.CU6,hcLight:Ce.CU6},(0,we.kg)("symbolIcon.textForeground","The foreground color for text symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Hw=(0,Ce.x1A)("symbolIcon.typeParameterForeground",{dark:Ce.CU6,light:Ce.CU6,hcDark:Ce.CU6,hcLight:Ce.CU6},(0,we.kg)("symbolIcon.typeParameterForeground","The foreground color for type parameter symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),zw=(0,Ce.x1A)("symbolIcon.unitForeground",{dark:Ce.CU6,light:Ce.CU6,hcDark:Ce.CU6,hcLight:Ce.CU6},(0,we.kg)("symbolIcon.unitForeground","The foreground color for unit symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Uw=(0,Ce.x1A)("symbolIcon.variableForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,we.kg)("symbolIcon.variableForeground","The foreground color for variable symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));(0,Ye.zy)((u,e)=>{const t=u.getColor(hw);t&&e.addRule(`${Mi.W6.symbolArray.cssSelector} { color: ${t}; }`);const i=u.getColor(uw);i&&e.addRule(`${Mi.W6.symbolBoolean.cssSelector} { color: ${i}; }`);const s=u.getColor(gw);s&&e.addRule(`${Mi.W6.symbolClass.cssSelector} { color: ${s}; }`);const o=u.getColor(Ew);o&&e.addRule(`${Mi.W6.symbolMethod.cssSelector} { color: ${o}; }`);const c=u.getColor(fw);c&&e.addRule(`${Mi.W6.symbolColor.cssSelector} { color: ${c}; }`);const m=u.getColor(mw);m&&e.addRule(`${Mi.W6.symbolConstant.cssSelector} { color: ${m}; }`);const A=u.getColor(pw);A&&e.addRule(`${Mi.W6.symbolConstructor.cssSelector} { color: ${A}; }`);const U=u.getColor(_w);U&&e.addRule(` ${Mi.W6.symbolValue.cssSelector},${Mi.W6.symbolEnum.cssSelector} { color: ${U}; }`);const W=u.getColor(vw);W&&e.addRule(`${Mi.W6.symbolEnumMember.cssSelector} { color: ${W}; }`);const re=u.getColor(Cw);re&&e.addRule(`${Mi.W6.symbolEvent.cssSelector} { color: ${re}; }`);const Se=u.getColor(bw);Se&&e.addRule(`${Mi.W6.symbolField.cssSelector} { color: ${Se}; }`);const Be=u.getColor(ww);Be&&e.addRule(`${Mi.W6.symbolFile.cssSelector} { color: ${Be}; }`);const Qe=u.getColor(Sw);Qe&&e.addRule(`${Mi.W6.symbolFolder.cssSelector} { color: ${Qe}; }`);const tt=u.getColor(yw);tt&&e.addRule(`${Mi.W6.symbolFunction.cssSelector} { color: ${tt}; }`);const vt=u.getColor(Lw);vt&&e.addRule(`${Mi.W6.symbolInterface.cssSelector} { color: ${vt}; }`);const Ht=u.getColor(Dw);Ht&&e.addRule(`${Mi.W6.symbolKey.cssSelector} { color: ${Ht}; }`);const ci=u.getColor(kw);ci&&e.addRule(`${Mi.W6.symbolKeyword.cssSelector} { color: ${ci}; }`);const gi=u.getColor(xw);gi&&e.addRule(`${Mi.W6.symbolModule.cssSelector} { color: ${gi}; }`);const Ui=u.getColor(Iw);Ui&&e.addRule(`${Mi.W6.symbolNamespace.cssSelector} { color: ${Ui}; }`);const dn=u.getColor(Nw);dn&&e.addRule(`${Mi.W6.symbolNull.cssSelector} { color: ${dn}; }`);const hs=u.getColor(Mw);hs&&e.addRule(`${Mi.W6.symbolNumber.cssSelector} { color: ${hs}; }`);const An=u.getColor(Tw);An&&e.addRule(`${Mi.W6.symbolObject.cssSelector} { color: ${An}; }`);const vo=u.getColor(Rw);vo&&e.addRule(`${Mi.W6.symbolOperator.cssSelector} { color: ${vo}; }`);const Po=u.getColor(Aw);Po&&e.addRule(`${Mi.W6.symbolPackage.cssSelector} { color: ${Po}; }`);const Uo=u.getColor(Ow);Uo&&e.addRule(`${Mi.W6.symbolProperty.cssSelector} { color: ${Uo}; }`);const Ea=u.getColor(Pw);Ea&&e.addRule(`${Mi.W6.symbolReference.cssSelector} { color: ${Ea}; }`);const sc=u.getColor(Fw);sc&&e.addRule(`${Mi.W6.symbolSnippet.cssSelector} { color: ${sc}; }`);const mr=u.getColor(Bw);mr&&e.addRule(`${Mi.W6.symbolString.cssSelector} { color: ${mr}; }`);const Yu=u.getColor(Ww);Yu&&e.addRule(`${Mi.W6.symbolStruct.cssSelector} { color: ${Yu}; }`);const oc=u.getColor(Vw);oc&&e.addRule(`${Mi.W6.symbolText.cssSelector} { color: ${oc}; }`);const tm=u.getColor(Hw);tm&&e.addRule(`${Mi.W6.symbolTypeParameter.cssSelector} { color: ${tm}; }`);const Xu=u.getColor(zw);Xu&&e.addRule(`${Mi.W6.symbolUnit.cssSelector} { color: ${Xu}; }`);const Ju=u.getColor(Uw);Ju&&e.addRule(`${Mi.W6.symbolVariable.cssSelector} { color: ${Ju}; }`)});class x0{constructor(){this._onDidWillResize=new Vi.vl,this.onDidWillResize=this._onDidWillResize.event,this._onDidResize=new Vi.vl,this.onDidResize=this._onDidResize.event,this._sashListener=new at.Cm,this._size=new M.fg(0,0),this._minSize=new M.fg(0,0),this._maxSize=new M.fg(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER),this.domNode=document.createElement("div"),this._eastSash=new Ar.m(this.domNode,{getVerticalSashLeft:()=>this._size.width},{orientation:0}),this._westSash=new Ar.m(this.domNode,{getVerticalSashLeft:()=>0},{orientation:0}),this._northSash=new Ar.m(this.domNode,{getHorizontalSashTop:()=>0},{orientation:1,orthogonalEdge:Ar.B.North}),this._southSash=new Ar.m(this.domNode,{getHorizontalSashTop:()=>this._size.height},{orientation:1,orthogonalEdge:Ar.B.South}),this._northSash.orthogonalStartSash=this._westSash,this._northSash.orthogonalEndSash=this._eastSash,this._southSash.orthogonalStartSash=this._westSash,this._southSash.orthogonalEndSash=this._eastSash;let e,t=0,i=0;this._sashListener.add(Vi.Jh.any(this._northSash.onDidStart,this._eastSash.onDidStart,this._southSash.onDidStart,this._westSash.onDidStart)(()=>{e===void 0&&(this._onDidWillResize.fire(),e=this._size,t=0,i=0)})),this._sashListener.add(Vi.Jh.any(this._northSash.onDidEnd,this._eastSash.onDidEnd,this._southSash.onDidEnd,this._westSash.onDidEnd)(()=>{e!==void 0&&(e=void 0,t=0,i=0,this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(this._eastSash.onDidChange(s=>{e&&(i=s.currentX-s.startX,this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,east:!0}))})),this._sashListener.add(this._westSash.onDidChange(s=>{e&&(i=-(s.currentX-s.startX),this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,west:!0}))})),this._sashListener.add(this._northSash.onDidChange(s=>{e&&(t=-(s.currentY-s.startY),this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,north:!0}))})),this._sashListener.add(this._southSash.onDidChange(s=>{e&&(t=s.currentY-s.startY,this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,south:!0}))})),this._sashListener.add(Vi.Jh.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(Vi.Jh.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,t,i,s){this._northSash.state=e?3:0,this._eastSash.state=t?3:0,this._southSash.state=i?3:0,this._westSash.state=s?3:0}layout(e=this.size.height,t=this.size.width){const{height:i,width:s}=this._minSize,{height:o,width:c}=this._maxSize;e=Math.max(i,Math.min(o,e)),t=Math.max(s,Math.min(c,t));const m=new M.fg(t,e);M.fg.equals(m,this._size)||(this.domNode.style.height=e+"px",this.domNode.style.width=t+"px",this._size=m,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}}var jw=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},Kw=function(u,e){return function(t,i){e(t,i,u)}};function vp(u){return!!u&&!!(u.completion.documentation||u.completion.detail&&u.completion.detail!==u.completion.label)}let Cp=class{constructor(e,t){this._editor=e,this._onDidClose=new Vi.vl,this.onDidClose=this._onDidClose.event,this._onDidChangeContents=new Vi.vl,this.onDidChangeContents=this._onDidChangeContents.event,this._disposables=new at.Cm,this._renderDisposeable=new at.Cm,this._borderWidth=1,this._size=new M.fg(330,0),this.domNode=M.$(".suggest-details"),this.domNode.classList.add("no-docs"),this._markdownRenderer=t.createInstance(Br,{editor:e}),this._body=M.$(".body"),this._scrollbar=new ko.MU(this._body,{alwaysConsumeMouseWheel:!0}),M.BC(this.domNode,this._scrollbar.getDomNode()),this._disposables.add(this._scrollbar),this._header=M.BC(this._body,M.$(".header")),this._close=M.BC(this._header,M.$("span"+Mi.W6.close.cssSelector)),this._close.title=we.kg("details.close","Close"),this._type=M.BC(this._header,M.$("p.type")),this._docs=M.BC(this._body,M.$("p.docs")),this._configureFont(),this._disposables.add(this._editor.onDidChangeConfiguration(i=>{i.hasChanged(46)&&this._configureFont()}))}dispose(){this._disposables.dispose(),this._renderDisposeable.dispose()}_configureFont(){const e=this._editor.getOptions(),t=e.get(46),i=t.getMassagedFontFamily(),s=e.get(109)||t.fontSize,o=e.get(110)||t.lineHeight,c=t.fontWeight,m=`${s}px`,A=`${o}px`;this.domNode.style.fontSize=m,this.domNode.style.lineHeight=`${o/s}`,this.domNode.style.fontWeight=c,this.domNode.style.fontFeatureSettings=t.fontFeatureSettings,this._type.style.fontFamily=i,this._close.style.height=A,this._close.style.width=A}getLayoutInfo(){const e=this._editor.getOption(110)||this._editor.getOption(46).lineHeight,t=this._borderWidth,i=t*2;return{lineHeight:e,borderWidth:t,borderHeight:i,verticalPadding:22,horizontalPadding:14}}renderLoading(){this._type.textContent=we.kg("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,t){var i,s;this._renderDisposeable.clear();let{detail:o,documentation:c}=e.completion;if(t){let m="";m+=`score: ${e.score[0]} `,m+=`prefix: ${(i=e.word)!==null&&i!==void 0?i:"(no prefix)"} `,m+=`word: ${e.completion.filterText?e.completion.filterText+" (filterText)":e.textLabel} `,m+=`distance: ${e.distance} (localityBonus-setting) `,m+=`index: ${e.idx}, based on ${e.completion.sortText&&`sortText: "${e.completion.sortText}"`||"label"} `,m+=`commit_chars: ${(s=e.completion.commitCharacters)===null||s===void 0?void 0:s.join("")} `,c=new Li.Bc().appendCodeblock("empty",m),o=`Provider: ${e.provider._debugDisplayName}`}if(!t&&!vp(e)){this.clearContents();return}if(this.domNode.classList.remove("no-docs","no-type"),o){const m=o.length>1e5?`${o.substr(0,1e5)}\u2026`:o;this._type.textContent=m,this._type.title=m,M.WU(this._type),this._type.classList.toggle("auto-wrap",!/\r?\n^\s+/gmi.test(m))}else M.w_(this._type),this._type.title="",M.jD(this._type),this.domNode.classList.add("no-type");if(M.w_(this._docs),typeof c=="string")this._docs.classList.remove("markdown-docs"),this._docs.textContent=c;else if(c){this._docs.classList.add("markdown-docs"),M.w_(this._docs);const m=this._markdownRenderer.render(c);this._docs.appendChild(m.element),this._renderDisposeable.add(m),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=m=>{m.preventDefault(),m.stopPropagation()},this._close.onclick=m=>{m.preventDefault(),m.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 size(){return this._size}layout(e,t){const i=new M.fg(e,t);M.fg.equals(i,this._size)||(this._size=i,M.Ej(this.domNode,e,t)),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}};Cp=jw([Kw(1,P._Y)],Cp);class $w{constructor(e,t){this.widget=e,this._editor=t,this._disposables=new at.Cm,this._added=!1,this._preferAlignAtTop=!0,this._resizable=new x0,this._resizable.domNode.classList.add("suggest-details-container"),this._resizable.domNode.appendChild(e.domNode),this._resizable.enableSashes(!1,!0,!0,!1);let i,s,o=0,c=0;this._disposables.add(this._resizable.onDidWillResize(()=>{i=this._topLeft,s=this._resizable.size})),this._disposables.add(this._resizable.onDidResize(m=>{if(i&&s){this.widget.layout(m.dimension.width,m.dimension.height);let A=!1;m.west&&(c=s.width-m.dimension.width,A=!0),m.north&&(o=s.height-m.dimension.height,A=!0),A&&this._applyTopLeft({top:i.top+o,left:i.left+c})}m.done&&(i=void 0,s=void 0,o=0,c=0,this._userSize=m.dimension)})),this._disposables.add(this.widget.onDidChangeContents(()=>{var m;this._anchorBox&&this._placeAtAnchor(this._anchorBox,(m=this._userSize)!==null&&m!==void 0?m: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 null}show(){this._added||(this._editor.addOverlayWidget(this),this.getDomNode().style.position="fixed",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,t){var i;const s=e.getBoundingClientRect();this._anchorBox=s,this._preferAlignAtTop=t,this._placeAtAnchor(this._anchorBox,(i=this._userSize)!==null&&i!==void 0?i:this.widget.size,t)}_placeAtAnchor(e,t,i){var s;const o=M.tG(document.body),c=this.widget.getLayoutInfo(),m=new M.fg(220,2*c.lineHeight),A=e.top,U=function(){const gi=o.width-(e.left+e.width+c.borderWidth+c.horizontalPadding),Ui=-c.borderWidth+e.left+e.width,dn=new M.fg(gi,o.height-e.top-c.borderHeight-c.verticalPadding),hs=dn.with(void 0,e.top+e.height-c.borderHeight-c.verticalPadding);return{top:A,left:Ui,fit:gi-t.width,maxSizeTop:dn,maxSizeBottom:hs,minSize:m.with(Math.min(gi,m.width))}}(),W=function(){const gi=e.left-c.borderWidth-c.horizontalPadding,Ui=Math.max(c.horizontalPadding,e.left-t.width-c.borderWidth),dn=new M.fg(gi,o.height-e.top-c.borderHeight-c.verticalPadding),hs=dn.with(void 0,e.top+e.height-c.borderHeight-c.verticalPadding);return{top:A,left:Ui,fit:gi-t.width,maxSizeTop:dn,maxSizeBottom:hs,minSize:m.with(Math.min(gi,m.width))}}(),re=function(){const gi=e.left,Ui=-c.borderWidth+e.top+e.height,dn=new M.fg(e.width-c.borderHeight,o.height-e.top-e.height-c.verticalPadding);return{top:Ui,left:gi,fit:dn.height-t.height,maxSizeBottom:dn,maxSizeTop:dn,minSize:m.with(dn.width)}}(),Se=[U,W,re],Be=(s=Se.find(gi=>gi.fit>=0))!==null&&s!==void 0?s:Se.sort((gi,Ui)=>Ui.fit-gi.fit)[0],Qe=e.top+e.height-c.borderHeight;let tt,vt=t.height;const Ht=Math.max(Be.maxSizeTop.height,Be.maxSizeBottom.height);vt>Ht&&(vt=Ht);let ci;i?vt<=Be.maxSizeTop.height?(tt=!0,ci=Be.maxSizeTop):(tt=!1,ci=Be.maxSizeBottom):vt<=Be.maxSizeBottom.height?(tt=!1,ci=Be.maxSizeBottom):(tt=!0,ci=Be.maxSizeTop),this._applyTopLeft({left:Be.left,top:tt?Be.top:Qe-vt}),this.getDomNode().style.position="fixed",this._resizable.enableSashes(!tt,Be===U,tt,Be!==U),this._resizable.minSize=Be.minSize,this._resizable.maxSize=ci,this._resizable.layout(vt,Math.min(ci.width,t.width)),this.widget.layout(this._resizable.size.width,this._resizable.size.height)}_applyTopLeft(e){this._topLeft=e,this.getDomNode().style.left=`${this._topLeft.left}px`,this.getDomNode().style.top=`${this._topLeft.top}px`}}var al;(function(u){u[u.FILE=0]="FILE",u[u.FOLDER=1]="FOLDER",u[u.ROOT_FOLDER=2]="ROOT_FOLDER"})(al||(al={}));const Gw=/(?:\/|^)(?:([^\/]+)\/)?([^\/]+)$/;function _f(u,e,t,i){const s=i===al.ROOT_FOLDER?["rootfolder-icon"]:i===al.FOLDER?["folder-icon"]:["file-icon"];if(t){let o;if(t.scheme===li.ny.data)o=hn.B6.parseMetaData(t).get(hn.B6.META_DATA_LABEL);else{const c=t.path.match(Gw);c?(o=vf(c[2].toLowerCase()),c[1]&&s.push(`${vf(c[1].toLowerCase())}-name-dir-icon`)):o=vf(t.authority.toLowerCase())}if(i===al.FOLDER)s.push(`${o}-name-folder-icon`);else{if(o){if(s.push(`${o}-name-file-icon`),s.push("name-file-icon"),o.length<=255){const m=o.split(".");for(let A=1;A<m.length;A++)s.push(`${m.slice(A).join(".")}-ext-file-icon`)}s.push("ext-file-icon")}const c=Qw(u,e,t);c&&s.push(`${vf(c)}-lang-file-icon`)}}return s}function Qw(u,e,t){if(!t)return null;let i=null;if(t.scheme===li.ny.data){const o=hn.B6.parseMetaData(t).get(hn.B6.META_DATA_MIME);o&&(i=e.getLanguageIdByMimeType(o))}else{const s=u.getModel(t);s&&(i=s.getLanguageId())}return i&&i!==Xi.vH?i:e.guessLanguageIdByFilepathOrFirstLine(t)}function vf(u){return u.replace(/[\11\12\14\15\40]/g,"/")}var Zw=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},bp=function(u,e){return function(t,i){e(t,i,u)}},Du;function I0(u){return`suggest-aria-id:${u}`}const Yw=(0,ho.pU)("suggest-more-info",Mi.W6.chevronRight,we.kg("suggestMoreInfoIcon","Icon for more information in the suggest widget.")),Xw=new(Du=class cm{extract(e,t){if(e.textLabel.match(cm._regexStrict))return t[0]=e.textLabel,!0;if(e.completion.detail&&e.completion.detail.match(cm._regexStrict))return t[0]=e.completion.detail,!0;if(typeof e.completion.documentation=="string"){const i=cm._regexRelaxed.exec(e.completion.documentation);if(i&&(i.index===0||i.index+i[0].length===e.completion.documentation.length))return t[0]=i[0],!0}return!1}},Du._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*\))/,Du._regexStrict=new RegExp(`^${Du._regexRelaxed.source}$`,"i"),Du);let wp=class{constructor(e,t,i,s){this._editor=e,this._modelService=t,this._languageService=i,this._themeService=s,this._onDidToggleDetails=new Vi.vl,this.onDidToggleDetails=this._onDidToggleDetails.event,this.templateId="suggestion"}dispose(){this._onDidToggleDetails.dispose()}renderTemplate(e){const t=Object.create(null);t.disposables=new at.Cm,t.root=e,t.root.classList.add("show-file-icons"),t.icon=(0,M.BC)(e,(0,M.$)(".icon")),t.colorspan=(0,M.BC)(t.icon,(0,M.$)("span.colorspan"));const i=(0,M.BC)(e,(0,M.$)(".contents")),s=(0,M.BC)(i,(0,M.$)(".main"));t.iconContainer=(0,M.BC)(s,(0,M.$)(".icon-label.codicon")),t.left=(0,M.BC)(s,(0,M.$)("span.left")),t.right=(0,M.BC)(s,(0,M.$)("span.right")),t.iconLabel=new Kn.s(t.left,{supportHighlights:!0,supportIcons:!0}),t.disposables.add(t.iconLabel),t.parametersLabel=(0,M.BC)(t.left,(0,M.$)("span.signature-label")),t.qualifierLabel=(0,M.BC)(t.left,(0,M.$)("span.qualifier-label")),t.detailsLabel=(0,M.BC)(t.right,(0,M.$)("span.details-label")),t.readMore=(0,M.BC)(t.right,(0,M.$)("span.readMore"+Ye.L0.asCSSSelector(Yw))),t.readMore.title=we.kg("readMore","Read More");const o=()=>{const c=this._editor.getOptions(),m=c.get(46),A=m.getMassagedFontFamily(),U=m.fontFeatureSettings,W=c.get(109)||m.fontSize,re=c.get(110)||m.lineHeight,Se=m.fontWeight,Be=m.letterSpacing,Qe=`${W}px`,tt=`${re}px`,vt=`${Be}px`;t.root.style.fontSize=Qe,t.root.style.fontWeight=Se,t.root.style.letterSpacing=vt,s.style.fontFamily=A,s.style.fontFeatureSettings=U,s.style.lineHeight=tt,t.icon.style.height=tt,t.icon.style.width=tt,t.readMore.style.height=tt,t.readMore.style.width=tt};return o(),t.disposables.add(this._editor.onDidChangeConfiguration(c=>{(c.hasChanged(46)||c.hasChanged(109)||c.hasChanged(110))&&o()})),t}renderElement(e,t,i){const{completion:s}=e;i.root.id=I0(t),i.colorspan.style.backgroundColor="";const o={labelEscapeNewLines:!0,matches:(0,Qi.WJ)(e.score)},c=[];if(s.kind===19&&Xw.extract(e,c))i.icon.className="icon customcolor",i.iconContainer.className="icon hide",i.colorspan.style.backgroundColor=c[0];else if(s.kind===20&&this._themeService.getFileIconTheme().hasFileIcons){i.icon.className="icon hide",i.iconContainer.className="icon hide";const m=_f(this._modelService,this._languageService,vn.r.from({scheme:"fake",path:e.textLabel}),al.FILE),A=_f(this._modelService,this._languageService,vn.r.from({scheme:"fake",path:s.detail}),al.FILE);o.extraClasses=m.length>A.length?m:A}else s.kind===23&&this._themeService.getFileIconTheme().hasFolderIcons?(i.icon.className="icon hide",i.iconContainer.className="icon hide",o.extraClasses=[_f(this._modelService,this._languageService,vn.r.from({scheme:"fake",path:e.textLabel}),al.FOLDER),_f(this._modelService,this._languageService,vn.r.from({scheme:"fake",path:s.detail}),al.FOLDER)].flat()):(i.icon.className="icon hide",i.iconContainer.className="",i.iconContainer.classList.add("suggest-icon",...Mi.j3.asClassNameArray(Xe.HC.toIcon(s.kind))));s.tags&&s.tags.indexOf(1)>=0&&(o.extraClasses=(o.extraClasses||[]).concat(["deprecated"]),o.matches=[]),i.iconLabel.setLabel(e.textLabel,void 0,o),typeof s.label=="string"?(i.parametersLabel.textContent="",i.detailsLabel.textContent=Sp(s.detail||""),i.root.classList.add("string-label")):(i.parametersLabel.textContent=Sp(s.label.detail||""),i.detailsLabel.textContent=Sp(s.label.description||""),i.root.classList.remove("string-label")),this._editor.getOption(108).showInlineDetails?(0,M.WU)(i.detailsLabel):(0,M.jD)(i.detailsLabel),vp(e)?(i.right.classList.add("can-expand-details"),(0,M.WU)(i.readMore),i.readMore.onmousedown=m=>{m.stopPropagation(),m.preventDefault()},i.readMore.onclick=m=>{m.stopPropagation(),m.preventDefault(),this._onDidToggleDetails.fire()}):(i.right.classList.remove("can-expand-details"),(0,M.jD)(i.readMore),i.readMore.onmousedown=null,i.readMore.onclick=null)}disposeTemplate(e){e.disposables.dispose()}};wp=Zw([bp(1,ws.S),bp(2,Fs.L),bp(3,Ye.Gy)],wp);function Sp(u){return u.replace(/\r\n|\r|\n/g,"")}var Jw=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},Cf=function(u,e){return function(t,i){e(t,i,u)}},qw=function(u,e,t,i){function s(o){return o instanceof t?o:new t(function(c){c(o)})}return new(t||(t=Promise))(function(o,c){function m(W){try{U(i.next(W))}catch(re){c(re)}}function A(W){try{U(i.throw(W))}catch(re){c(re)}}function U(W){W.done?o(W.value):s(W.value).then(m,A)}U((i=i.apply(u,e||[])).next())})};const Lk=(0,Ce.x1A)("editorSuggestWidget.background",{dark:Ce.CgL,light:Ce.CgL,hcDark:Ce.CgL,hcLight:Ce.CgL},we.kg("editorSuggestWidgetBackground","Background color of the suggest widget.")),Dk=(0,Ce.x1A)("editorSuggestWidget.border",{dark:Ce.sIe,light:Ce.sIe,hcDark:Ce.sIe,hcLight:Ce.sIe},we.kg("editorSuggestWidgetBorder","Border color of the suggest widget.")),bf=(0,Ce.x1A)("editorSuggestWidget.foreground",{dark:Ce.By2,light:Ce.By2,hcDark:Ce.By2,hcLight:Ce.By2},we.kg("editorSuggestWidgetForeground","Foreground color of the suggest widget.")),kk=(0,Ce.x1A)("editorSuggestWidget.selectedForeground",{dark:Ce.nH,light:Ce.nH,hcDark:Ce.nH,hcLight:Ce.nH},we.kg("editorSuggestWidgetSelectedForeground","Foreground color of the selected entry in the suggest widget.")),Ek=(0,Ce.x1A)("editorSuggestWidget.selectedIconForeground",{dark:Ce.c7i,light:Ce.c7i,hcDark:Ce.c7i,hcLight:Ce.c7i},we.kg("editorSuggestWidgetSelectedIconForeground","Icon foreground color of the selected entry in the suggest widget.")),eS=(0,Ce.x1A)("editorSuggestWidget.selectedBackground",{dark:Ce.AlL,light:Ce.AlL,hcDark:Ce.AlL,hcLight:Ce.AlL},we.kg("editorSuggestWidgetSelectedBackground","Background color of the selected entry in the suggest widget.")),xk=(0,Ce.x1A)("editorSuggestWidget.highlightForeground",{dark:Ce.QI5,light:Ce.QI5,hcDark:Ce.QI5,hcLight:Ce.QI5},we.kg("editorSuggestWidgetHighlightForeground","Color of the match highlights in the suggest widget.")),Ik=(0,Ce.x1A)("editorSuggestWidget.focusHighlightForeground",{dark:Ce.eMz,light:Ce.eMz,hcDark:Ce.eMz,hcLight:Ce.eMz},we.kg("editorSuggestWidgetFocusHighlightForeground","Color of the match highlights in the suggest widget when an item is focused.")),Nk=(0,Ce.x1A)("editorSuggestWidgetStatus.foreground",{dark:(0,Ce.JO0)(bf,.5),light:(0,Ce.JO0)(bf,.5),hcDark:(0,Ce.JO0)(bf,.5),hcLight:(0,Ce.JO0)(bf,.5)},we.kg("editorSuggestWidgetStatusForeground","Foreground color of the suggest widget status."));class tS{constructor(e,t){this._service=e,this._key=`suggestWidget.size/${t.getEditorType()}/${t instanceof or}`}restore(){var e;const t=(e=this._service.get(this._key,0))!==null&&e!==void 0?e:"";try{const i=JSON.parse(t);if(M.fg.is(i))return M.fg.lift(i)}catch{}}store(e){this._service.store(this._key,JSON.stringify(e),0,1)}reset(){this._service.remove(this._key,0)}}let ku=class N_{constructor(e,t,i,s,o){this.editor=e,this._storageService=t,this._state=0,this._isAuto=!1,this._ignoreFocusEvents=!1,this._forceRenderingAbove=!1,this._explainMode=!1,this._showTimeout=new Ot.pc,this._disposables=new at.Cm,this._onDidSelect=new Vi.vl,this._onDidFocus=new Vi.vl,this._onDidHide=new Vi.vl,this._onDidShow=new Vi.vl,this.onDidSelect=this._onDidSelect.event,this.onDidFocus=this._onDidFocus.event,this.onDidHide=this._onDidHide.event,this.onDidShow=this._onDidShow.event,this._onDetailsKeydown=new Vi.vl,this.onDetailsKeyDown=this._onDetailsKeydown.event,this.element=new x0,this.element.domNode.classList.add("editor-widget","suggest-widget"),this._contentWidget=new iS(this,e),this._persistedSize=new tS(t,e);class c{constructor(Be,Qe,tt=!1,vt=!1){this.persistedSize=Be,this.currentSize=Qe,this.persistHeight=tt,this.persistWidth=vt}}let m;this._disposables.add(this.element.onDidWillResize(()=>{this._contentWidget.lockPreference(),m=new c(this._persistedSize.restore(),this.element.size)})),this._disposables.add(this.element.onDidResize(Se=>{var Be,Qe,tt,vt;if(this._resize(Se.dimension.width,Se.dimension.height),m&&(m.persistHeight=m.persistHeight||!!Se.north||!!Se.south,m.persistWidth=m.persistWidth||!!Se.east||!!Se.west),!!Se.done){if(m){const{itemHeight:Ht,defaultSize:ci}=this.getLayoutInfo(),gi=Math.round(Ht/2);let{width:Ui,height:dn}=this.element.size;(!m.persistHeight||Math.abs(m.currentSize.height-dn)<=gi)&&(dn=(Qe=(Be=m.persistedSize)===null||Be===void 0?void 0:Be.height)!==null&&Qe!==void 0?Qe:ci.height),(!m.persistWidth||Math.abs(m.currentSize.width-Ui)<=gi)&&(Ui=(vt=(tt=m.persistedSize)===null||tt===void 0?void 0:tt.width)!==null&&vt!==void 0?vt:ci.width),this._persistedSize.store(new M.fg(Ui,dn))}this._contentWidget.unlockPreference(),m=void 0}})),this._messageElement=M.BC(this.element.domNode,M.$(".message")),this._listElement=M.BC(this.element.domNode,M.$(".tree"));const A=o.createInstance(Cp,this.editor);A.onDidClose(this.toggleDetails,this,this._disposables),this._details=new $w(A,this.editor);const U=()=>this.element.domNode.classList.toggle("no-icons",!this.editor.getOption(108).showIcons);U();const W=o.createInstance(wp,this.editor);this._disposables.add(W),this._disposables.add(W.onDidToggleDetails(()=>this.toggleDetails())),this._list=new q.B8("SuggestWidget",this._listElement,{getHeight:Se=>this.getLayoutInfo().itemHeight,getTemplateId:Se=>"suggestion"},[W],{alwaysConsumeMouseWheel:!0,useShadows:!1,mouseSupport:!1,multipleSelectionSupport:!1,accessibilityProvider:{getRole:()=>"option",getWidgetAriaLabel:()=>we.kg("suggest","Suggest"),getWidgetRole:()=>"listbox",getAriaLabel:Se=>{let Be=Se.textLabel;if(typeof Se.completion.label!="string"){const{detail:Ht,description:ci}=Se.completion.label;Ht&&ci?Be=we.kg("label.full","{0}{1}, {2}",Be,Ht,ci):Ht?Be=we.kg("label.detail","{0}{1}",Be,Ht):ci&&(Be=we.kg("label.desc","{0}, {1}",Be,ci))}if(!Se.isResolved||!this._isDetailsVisible())return Be;const{documentation:Qe,detail:tt}=Se.completion,vt=xi.GP("{0}{1}",tt||"",Qe?typeof Qe=="string"?Qe:Qe.value:"");return we.kg("ariaCurrenttSuggestionReadDetails","{0}, docs: {1}",Be,vt)}}}),this._status=o.createInstance(_p,this.element.domNode);const re=()=>this.element.domNode.classList.toggle("with-status-bar",this.editor.getOption(108).showStatusBar);re(),this._disposables.add((0,gs.DD)(this._list,s,{listInactiveFocusBackground:eS,listInactiveFocusOutline:Ce.buw})),this._disposables.add(s.onDidColorThemeChange(Se=>this._onThemeChange(Se))),this._onThemeChange(s.getColorTheme()),this._disposables.add(this._list.onMouseDown(Se=>this._onListMouseDownOrTap(Se))),this._disposables.add(this._list.onTap(Se=>this._onListMouseDownOrTap(Se))),this._disposables.add(this._list.onDidChangeSelection(Se=>this._onListSelection(Se))),this._disposables.add(this._list.onDidChangeFocus(Se=>this._onListFocus(Se))),this._disposables.add(this.editor.onDidChangeCursorSelection(()=>this._onCursorSelectionChanged())),this._disposables.add(this.editor.onDidChangeConfiguration(Se=>{Se.hasChanged(108)&&(re(),U())})),this._ctxSuggestWidgetVisible=Tn.Visible.bindTo(i),this._ctxSuggestWidgetDetailsVisible=Tn.DetailsVisible.bindTo(i),this._ctxSuggestWidgetMultipleSuggestions=Tn.MultipleSuggestions.bindTo(i),this._ctxSuggestWidgetHasFocusedSuggestion=Tn.HasFocusedSuggestion.bindTo(i),this._disposables.add(M.b2(this._details.widget.domNode,"keydown",Se=>{this._onDetailsKeydown.fire(Se)})),this._disposables.add(this.editor.onMouseDown(Se=>this._onEditorMouseDown(Se)))}dispose(){var e;this._details.widget.dispose(),this._details.dispose(),this._list.dispose(),this._status.dispose(),this._disposables.dispose(),(e=this._loadingTimeout)===null||e===void 0||e.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,t){const i=this._completionModel;i&&(this._onDidSelect.fire({item:e,index:t,model:i}),this.editor.focus())}_onThemeChange(e){this._details.widget.borderWidth=(0,Ro.Bb)(e.type)?2:1}_onListFocus(e){var t;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],s=e.indexes[0];i!==this._focusedItem&&((t=this._currentSuggestionDetails)===null||t===void 0||t.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=i,this._list.reveal(s),this._currentSuggestionDetails=(0,Ot.SS)(o=>qw(this,void 0,void 0,function*(){const c=(0,Ot.EQ)(()=>{this._isDetailsVisible()&&this.showDetails(!0)},250),m=o.onCancellationRequested(()=>c.dispose()),A=yield i.resolve(o);return c.dispose(),m.dispose(),A})),this._currentSuggestionDetails.then(()=>{s>=this._list.length||i!==this._list.element(s)||(this._ignoreFocusEvents=!0,this._list.splice(s,1,[i]),this._list.setFocus([s]),this._ignoreFocusEvents=!1,this._isDetailsVisible()?this.showDetails(!1):this.element.domNode.classList.remove("docs-side"),this.editor.setAriaOptions({activeDescendant:I0(s)}))}).catch(Wi.dz)),this._onDidFocus.fire({item:i,index:s,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:M.jD(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=N_.LOADING_MESSAGE,M.jD(this._listElement,this._status.element),M.WU(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0;break;case 2:this.element.domNode.classList.add("message"),this._messageElement.textContent=N_.NO_SUGGESTIONS_MESSAGE,M.jD(this._listElement,this._status.element),M.WU(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0;break;case 3:M.jD(this._messageElement),M.WU(this._listElement,this._status.element),this._show();break;case 4:M.jD(this._messageElement),M.WU(this._listElement,this._status.element),this._show();break;case 5:M.jD(this._messageElement),M.WU(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,t){this._state===0&&(this._contentWidget.setPosition(this.editor.getPosition()),this._isAuto=!!e,this._isAuto||(this._loadingTimeout=(0,Ot.EQ)(()=>this._setState(1),t)))}showSuggestions(e,t,i,s){var o,c;if(this._contentWidget.setPosition(this.editor.getPosition()),(o=this._loadingTimeout)===null||o===void 0||o.dispose(),(c=this._currentSuggestionDetails)===null||c===void 0||c.cancel(),this._currentSuggestionDetails=void 0,this._completionModel!==e&&(this._completionModel=e),i&&this._state!==2&&this._state!==0){this._setState(4);return}const m=this._completionModel.items.length,A=m===0;if(this._ctxSuggestWidgetMultipleSuggestions.set(m>1),A){this._setState(s?0:2),this._completionModel=void 0;return}this._focusedItem=void 0,this._list.splice(0,this._list.length,this._completionModel.items),this._setState(i?4:3),t>=0&&(this._list.reveal(t,0),this._list.setFocus([t])),this._layout(this.element.size),this._details.widget.domNode.classList.remove("focused")}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)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._ctxSuggestWidgetDetailsVisible.set(!1),this._setDetailsVisible(!1),this._details.hide(),this.element.domNode.classList.remove("shows-details")):(vp(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._details.show(),e?this._details.widget.renderLoading():this._details.widget.renderItem(this._list.getFocusedElements()[0],this._explainMode),this._positionDetails(),this.editor.focus(),this.element.domNode.classList.add("shows-details")}toggleExplainMode(){this._list.getFocusedElements()[0]&&(this._explainMode=!this._explainMode,this._isDetailsVisible()?this.showDetails(!1):this.toggleDetails())}resetPersistedSize(){this._persistedSize.reset()}hideWidget(){var e;(e=this._loadingTimeout)===null||e===void 0||e.dispose(),this._setState(0),this._onDidHide.fire(this),this.element.clearSashHoverState();const t=this._persistedSize.restore(),i=Math.ceil(this.getLayoutInfo().itemHeight*4.3);t&&t.height<i&&this._persistedSize.store(t.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.show(),this._positionDetails())}_layout(e){var t,i,s;if(!this.editor.hasModel()||!this.editor.getDomNode())return;const o=M.tG(document.body),c=this.getLayoutInfo();e||(e=c.defaultSize);let m=e.height,A=e.width;if(this._status.element.style.lineHeight=`${c.itemHeight}px`,this._state===2||this._state===1)m=c.itemHeight+c.borderHeight,A=c.defaultSize.width/2,this.element.enableSashes(!1,!1,!1,!1),this.element.minSize=this.element.maxSize=new M.fg(A,m),this._contentWidget.setPreference(2);else{const U=o.width-c.borderHeight-2*c.horizontalPadding;A>U&&(A=U);const W=this._completionModel?this._completionModel.stats.pLabelLen*c.typicalHalfwidthCharacterWidth:A,re=c.statusBarHeight+this._list.contentHeight+c.borderHeight,Se=c.itemHeight+c.statusBarHeight,Be=M.BK(this.editor.getDomNode()),Qe=this.editor.getScrolledVisiblePosition(this.editor.getPosition()),tt=Be.top+Qe.top+Qe.height,vt=Math.min(o.height-tt-c.verticalPadding,re),Ht=Be.top+Qe.top-c.verticalPadding,ci=Math.min(Ht,re);let gi=Math.min(Math.max(ci,vt)+c.borderHeight,re);m===((t=this._cappedHeight)===null||t===void 0?void 0:t.capped)&&(m=this._cappedHeight.wanted),m<Se&&(m=Se),m>gi&&(m=gi);const Ui=150;m>vt||this._forceRenderingAbove&&Ht>Ui?(this._contentWidget.setPreference(1),this.element.enableSashes(!0,!0,!1,!1),gi=ci):(this._contentWidget.setPreference(2),this.element.enableSashes(!1,!0,!0,!1),gi=vt),this.element.preferredSize=new M.fg(W,c.defaultSize.height),this.element.maxSize=new M.fg(U,gi),this.element.minSize=new M.fg(220,Se),this._cappedHeight=m===re?{wanted:(s=(i=this._cappedHeight)===null||i===void 0?void 0:i.wanted)!==null&&s!==void 0?s:e.height,capped:m}:void 0}this._resize(A,m)}_resize(e,t){const{width:i,height:s}=this.element.maxSize;e=Math.min(i,e),t=Math.min(s,t);const{statusBarHeight:o}=this.getLayoutInfo();this._list.layout(t-o,e),this._listElement.style.height=`${t-o}px`,this.element.layout(t,e),this._contentWidget.layout(),this._positionDetails()}_positionDetails(){var e;this._isDetailsVisible()&&this._details.placeAtAnchor(this.element.domNode,((e=this._contentWidget.getPosition())===null||e===void 0?void 0:e.preference[0])===2)}getLayoutInfo(){const e=this.editor.getOption(46),t=(0,dw.qE)(this.editor.getOption(110)||e.lineHeight,8,1e3),i=!this.editor.getOption(108).showStatusBar||this._state===2||this._state===1?0:t,s=this._details.widget.borderWidth,o=2*s;return{itemHeight:t,statusBarHeight:i,borderWidth:s,borderHeight:o,typicalHalfwidthCharacterWidth:e.typicalHalfwidthCharacterWidth,verticalPadding:22,horizontalPadding:14,defaultSize:new M.fg(430,i+12*t+o)}}_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}};ku.LOADING_MESSAGE=we.kg("suggestWidget.loading","Loading..."),ku.NO_SUGGESTIONS_MESSAGE=we.kg("suggestWidget.noSuggestions","No suggestions."),ku=Jw([Cf(1,fo.CS),Cf(2,ct.fN),Cf(3,Ye.Gy),Cf(4,P._Y)],ku);class iS{constructor(e,t){this._widget=e,this._editor=t,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:t}=this._widget.element.size,{borderWidth:i,horizontalPadding:s}=this._widget.getLayoutInfo();return new M.fg(t+2*i+s,e+2*i)}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 nS=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},th=function(u,e){return function(t,i){e(t,i,u)}};const sS=!1;class oS{constructor(e,t){if(this._model=e,this._position=t,e.getLineMaxColumn(t.lineNumber)!==t.column){const s=e.getOffsetAt(t),o=e.getPositionAt(s+1);this._marker=e.deltaDecorations([],[{range:St.Q.fromPositions(t,o),options:{description:"suggest-line-suffix",stickiness:1}}])}}dispose(){this._marker&&!this._model.isDisposed()&&this._model.deltaDecorations(this._marker,[])}delta(e){if(this._model.isDisposed()||this._position.lineNumber!==e.lineNumber)return 0;if(this._marker){const t=this._model.getDecorationRange(this._marker[0]);return this._model.getOffsetAt(t.getStartPosition())-this._model.getOffsetAt(e)}else return this._model.getLineMaxColumn(e.lineNumber)-e.column}}let Wr=class yC{constructor(e,t,i,s,o,c,m){this._memoryService=t,this._commandService=i,this._contextKeyService=s,this._instantiationService=o,this._logService=c,this._telemetryService=m,this._lineSuffix=new at.HE,this._toDispose=new at.Cm,this._selectors=new rS(re=>re.priority),this._telemetryGate=0,this.editor=e,this.model=o.createInstance(fp,this.editor);const A=Tn.InsertMode.bindTo(s);A.set(e.getOption(108).insertMode),this.model.onDidTrigger(()=>A.set(e.getOption(108).insertMode)),this.widget=this._toDispose.add(new Ot.kb(()=>{const re=this._instantiationService.createInstance(ku,this.editor);this._toDispose.add(re),this._toDispose.add(re.onDidSelect(vt=>this._insertSuggestion(vt,0),this));const Se=new iw(this.editor,re,vt=>this._insertSuggestion(vt,2));this._toDispose.add(Se),this._toDispose.add(this.model.onDidSuggest(vt=>{vt.completionModel.items.length===0&&Se.reset()}));const Be=Tn.MakesTextEdit.bindTo(this._contextKeyService),Qe=Tn.HasInsertAndReplaceRange.bindTo(this._contextKeyService),tt=Tn.CanResolve.bindTo(this._contextKeyService);return this._toDispose.add((0,at.s)(()=>{Be.reset(),Qe.reset(),tt.reset()})),this._toDispose.add(re.onDidFocus(({item:vt})=>{const Ht=this.editor.getPosition(),ci=vt.editStart.column,gi=Ht.column;let Ui=!0;this.editor.getOption(1)==="smart"&&this.model.state===2&&!vt.completion.additionalTextEdits&&!(vt.completion.insertTextRules&4)&&gi-ci===vt.completion.insertText.length&&(Ui=this.editor.getModel().getValueInRange({startLineNumber:Ht.lineNumber,startColumn:ci,endLineNumber:Ht.lineNumber,endColumn:gi})!==vt.completion.insertText),Be.set(Ui),Qe.set(!bi.y.equals(vt.editInsertEnd,vt.editReplaceEnd)),tt.set(!!vt.provider.resolveCompletionItem||!!vt.completion.documentation||vt.completion.detail!==vt.completion.label)})),this._toDispose.add(re.onDetailsKeyDown(vt=>{if(vt.toKeybinding().equals(new L0.h$(!0,!1,!1,!1,33))||Pi.zx&&vt.toKeybinding().equals(new L0.h$(!1,!1,!1,!0,33))){vt.stopPropagation();return}vt.toKeybinding().isModifierKey()||this.editor.focus()})),re})),this._overtypingCapturer=this._toDispose.add(new Ot.kb(()=>this._toDispose.add(new pf(this.editor,this.model)))),this._alternatives=this._toDispose.add(new Ot.kb(()=>this._toDispose.add(new Hd(this.editor,this._contextKeyService)))),this._toDispose.add(o.createInstance(Lu,e)),this._toDispose.add(this.model.onDidTrigger(re=>{this.widget.value.showTriggered(re.auto,re.shy?250:50),this._lineSuffix.value=new oS(this.editor.getModel(),re.position)})),this._toDispose.add(this.model.onDidSuggest(re=>{if(re.shy)return;let Se=-1;if(!re.noSelect){for(const Be of this._selectors.itemsOrderedByPriorityDesc)if(Se=Be.select(this.editor.getModel(),this.editor.getPosition(),re.completionModel.items),Se!==-1)break;Se===-1&&(Se=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),re.completionModel.items))}this.widget.value.showSuggestions(re.completionModel,Se,re.isFrozen,re.auto)})),this._toDispose.add(this.model.onDidCancel(re=>{re.retrigger||this.widget.value.hideWidget()})),this._toDispose.add(this.editor.onDidBlurEditorWidget(()=>{sS||(this.model.cancel(),this.model.clear())}));const U=Tn.AcceptSuggestionsOnEnter.bindTo(s),W=()=>{const re=this.editor.getOption(1);U.set(re==="on"||re==="smart")};this._toDispose.add(this.editor.onDidChangeConfiguration(()=>W())),W()}static get(e){return e.getContribution(yC.ID)}dispose(){this._alternatives.dispose(),this._toDispose.dispose(),this.widget.dispose(),this.model.dispose(),this._lineSuffix.dispose()}_insertSuggestion(e,t){if(!e||!e.item){this._alternatives.value.reset(),this.model.cancel(),this.model.clear();return}if(!this.editor.hasModel())return;const i=io.get(this.editor);if(!i)return;const s=this.editor.getModel(),o=s.getAlternativeVersionId(),{item:c}=e,m=[],A=new Ti.Q;t&1||this.editor.pushUndoStop();const U=this.getOverwriteInfo(c,!!(t&8));if(this._memoryService.memorize(s,this.editor.getPosition(),c),Array.isArray(c.completion.additionalTextEdits)){const re=yo.D.capture(this.editor);this.editor.executeEdits("suggestController.additionalTextEdits.sync",c.completion.additionalTextEdits.map(Se=>Sn.k.replaceMove(St.Q.lift(Se.range),Se.text))),re.restoreRelativeVerticalPositionOfCursor(this.editor)}else if(!c.isResolved){const re=new Ys.W(!0);let Se;const Be=s.onDidChangeContent(Ht=>{if(Ht.isFlush){A.cancel(),Be.dispose();return}for(const ci of Ht.changes){const gi=St.Q.getEndPosition(ci.range);(!Se||bi.y.isBefore(gi,Se))&&(Se=gi)}}),Qe=t;t|=2;let tt=!1;const vt=this.editor.onWillType(()=>{vt.dispose(),tt=!0,Qe&2||this.editor.pushUndoStop()});m.push(c.resolve(A.token).then(()=>{if(!c.completion.additionalTextEdits||A.token.isCancellationRequested||Se&&c.completion.additionalTextEdits.some(ci=>bi.y.isBefore(Se,St.Q.getStartPosition(ci.range))))return!1;tt&&this.editor.pushUndoStop();const Ht=yo.D.capture(this.editor);return this.editor.executeEdits("suggestController.additionalTextEdits.async",c.completion.additionalTextEdits.map(ci=>Sn.k.replaceMove(St.Q.lift(ci.range),ci.text))),Ht.restoreRelativeVerticalPositionOfCursor(this.editor),(tt||!(Qe&2))&&this.editor.pushUndoStop(),!0}).then(Ht=>{this._logService.trace("[suggest] async resolving of edits DONE (ms, applied?)",re.elapsed(),Ht),Be.dispose(),vt.dispose()}))}let{insertText:W}=c.completion;c.completion.insertTextRules&4||(W=ta.escape(W)),i.insert(W,{overwriteBefore:U.overwriteBefore,overwriteAfter:U.overwriteAfter,undoStopBefore:!1,undoStopAfter:!1,adjustWhitespace:!(c.completion.insertTextRules&1),clipboardText:e.model.clipboardText,overtypingCapturer:this._overtypingCapturer.value}),t&2||this.editor.pushUndoStop(),c.completion.command?c.completion.command.id===Eu.id?this.model.trigger({auto:!0,shy:!1,noSelect:!1},!0):(m.push(this._commandService.executeCommand(c.completion.command.id,...c.completion.command.arguments?[...c.completion.command.arguments]:[]).catch(Wi.dz)),this.model.cancel()):this.model.cancel(),t&4&&this._alternatives.value.set(e,re=>{for(A.cancel();s.canUndo();){o!==s.getAlternativeVersionId()&&s.undo(),this._insertSuggestion(re,3|(t&8?8:0));break}}),this._alertCompletionItem(c),Promise.all(m).finally(()=>{this._reportSuggestionAcceptedTelemetry(c,s,e),this.model.clear(),A.dispose()})}_reportSuggestionAcceptedTelemetry(e,t,i){var s;if(this._telemetryGate++%100!==0)return;const o=e.extensionId?e.extensionId.value:((s=i.item.provider._debugDisplayName)!==null&&s!==void 0?s:"unknown").split("(",1)[0].toLowerCase();this._telemetryService.publicLog2("suggest.acceptedSuggestion",{providerId:o,kind:e.completion.kind,basenameHash:(0,tr.tW)((0,hn.P8)(t.uri)).toString(16),languageId:t.getLanguageId(),fileExtension:(0,hn.LC)(t.uri)})}getOverwriteInfo(e,t){(0,pi.j)(this.editor.hasModel());let i=this.editor.getOption(108).insertMode==="replace";t&&(i=!i);const s=e.position.column-e.editStart.column,o=(i?e.editReplaceEnd.column:e.editInsertEnd.column)-e.position.column,c=this.editor.getPosition().column-e.position.column,m=this._lineSuffix.value?this._lineSuffix.value.delta(this.editor.getPosition()):0;return{overwriteBefore:s+c,overwriteAfter:o+m}}_alertCompletionItem(e){if((0,cn.EI)(e.completion.additionalTextEdits)){const t=we.kg("aria.alert.snippet","Accepting '{0}' made {1} additional edits",e.textLabel,e.completion.additionalTextEdits.length);(0,oi.xE)(t)}}triggerSuggest(e,t,i,s){this.editor.hasModel()&&(this.model.trigger({auto:t??!1,shy:!1,noSelect:s??!1},!1,e,void 0,i),this.editor.revealPosition(this.editor.getPosition(),0),this.editor.focus())}triggerSuggestAndAcceptBest(e){if(!this.editor.hasModel())return;const t=this.editor.getPosition(),i=()=>{t.equals(this.editor.getPosition())&&this._commandService.executeCommand(e.fallback)},s=o=>{if(o.completion.insertTextRules&4||o.completion.additionalTextEdits)return!0;const c=this.editor.getPosition(),m=o.editStart.column,A=c.column;return A-m!==o.completion.insertText.length?!0:this.editor.getModel().getValueInRange({startLineNumber:c.lineNumber,startColumn:m,endLineNumber:c.lineNumber,endColumn:A})!==o.completion.insertText};Vi.Jh.once(this.model.onDidTrigger)(o=>{const c=[];Vi.Jh.any(this.model.onDidTrigger,this.model.onDidCancel)(()=>{(0,at.AS)(c),i()},void 0,c),this.model.onDidSuggest(({completionModel:m})=>{if((0,at.AS)(c),m.items.length===0){i();return}const A=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),m.items),U=m.items[A];if(!s(U)){i();return}this.editor.pushUndoStop(),this._insertSuggestion({index:A,item:U,model:m},7)},void 0,c)}),this.model.trigger({auto:!1,shy:!0,noSelect:!1}),this.editor.revealPosition(t,0),this.editor.focus()}acceptSelectedSuggestion(e,t){const i=this.widget.value.getFocusedItem();let s=0;e&&(s|=4),t&&(s|=8),this._insertSuggestion(i,s)}acceptNextSuggestion(){this._alternatives.value.next()}acceptPrevSuggestion(){this._alternatives.value.prev()}cancelSuggestWidget(){this.model.cancel(),this.model.clear(),this.widget.value.hideWidget()}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)}};Wr.ID="editor.contrib.suggestController",Wr=nS([th(1,mf),th(2,fn.wT),th(3,ct.fN),th(4,P._Y),th(5,xs.rr),th(6,Me.k)],Wr);class rS{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((t,i)=>this.prioritySelector(i)-this.prioritySelector(t)),{dispose:()=>{const t=this._items.indexOf(e);t>=0&&this._items.splice(t,1)}}}get itemsOrderedByPriorityDesc(){return this._items}}class Eu extends Te.ks{constructor(){super({id:Eu.id,label:we.kg("suggest.trigger.label","Trigger Suggest"),alias:"Trigger Suggest",precondition:ct.M$.and(ze.R.writable,ze.R.hasCompletionItemProvider),kbOpts:{kbExpr:ze.R.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[521,2087]},weight:100}})}run(e,t,i){const s=Wr.get(t);if(!s)return;let o,c;i&&typeof i=="object"&&(i.auto===!0&&(o=!0),i.noSelection===!0&&(c=!0)),s.triggerSuggest(void 0,o,void 0,c)}}Eu.id="editor.action.triggerSuggest",(0,Te.HW)(Wr.ID,Wr),(0,Te.Fl)(Eu);const xr=100+90,Jo=Te.DX.bindToContribution(Wr.get);(0,Te.E_)(new Jo({id:"acceptSelectedSuggestion",precondition:ct.M$.and(Tn.Visible,Tn.HasFocusedSuggestion),handler(u){u.acceptSelectedSuggestion(!0,!1)},kbOpts:[{primary:2,kbExpr:ct.M$.and(Tn.Visible,ze.R.textInputFocus),weight:xr},{primary:3,kbExpr:ct.M$.and(Tn.Visible,ze.R.textInputFocus,Tn.AcceptSuggestionsOnEnter,Tn.MakesTextEdit),weight:xr}],menuOpts:[{menuId:ia,title:we.kg("accept.insert","Insert"),group:"left",order:1,when:Tn.HasInsertAndReplaceRange.toNegated()},{menuId:ia,title:we.kg("accept.insert","Insert"),group:"left",order:1,when:ct.M$.and(Tn.HasInsertAndReplaceRange,Tn.InsertMode.isEqualTo("insert"))},{menuId:ia,title:we.kg("accept.replace","Replace"),group:"left",order:1,when:ct.M$.and(Tn.HasInsertAndReplaceRange,Tn.InsertMode.isEqualTo("replace"))}]})),(0,Te.E_)(new Jo({id:"acceptAlternativeSelectedSuggestion",precondition:ct.M$.and(Tn.Visible,ze.R.textInputFocus,Tn.HasFocusedSuggestion),kbOpts:{weight:xr,kbExpr:ze.R.textInputFocus,primary:1027,secondary:[1026]},handler(u){u.acceptSelectedSuggestion(!1,!0)},menuOpts:[{menuId:ia,group:"left",order:2,when:ct.M$.and(Tn.HasInsertAndReplaceRange,Tn.InsertMode.isEqualTo("insert")),title:we.kg("accept.replace","Replace")},{menuId:ia,group:"left",order:2,when:ct.M$.and(Tn.HasInsertAndReplaceRange,Tn.InsertMode.isEqualTo("replace")),title:we.kg("accept.insert","Insert")}]})),fn.wb.registerCommandAlias("acceptSelectedSuggestionOnEnter","acceptSelectedSuggestion"),(0,Te.E_)(new Jo({id:"hideSuggestWidget",precondition:Tn.Visible,handler:u=>u.cancelSuggestWidget(),kbOpts:{weight:xr,kbExpr:ze.R.textInputFocus,primary:9,secondary:[1033]}})),(0,Te.E_)(new Jo({id:"selectNextSuggestion",precondition:ct.M$.and(Tn.Visible,Tn.MultipleSuggestions),handler:u=>u.selectNextSuggestion(),kbOpts:{weight:xr,kbExpr:ze.R.textInputFocus,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})),(0,Te.E_)(new Jo({id:"selectNextPageSuggestion",precondition:ct.M$.and(Tn.Visible,Tn.MultipleSuggestions),handler:u=>u.selectNextPageSuggestion(),kbOpts:{weight:xr,kbExpr:ze.R.textInputFocus,primary:12,secondary:[2060]}})),(0,Te.E_)(new Jo({id:"selectLastSuggestion",precondition:ct.M$.and(Tn.Visible,Tn.MultipleSuggestions),handler:u=>u.selectLastSuggestion()})),(0,Te.E_)(new Jo({id:"selectPrevSuggestion",precondition:ct.M$.and(Tn.Visible,Tn.MultipleSuggestions),handler:u=>u.selectPrevSuggestion(),kbOpts:{weight:xr,kbExpr:ze.R.textInputFocus,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})),(0,Te.E_)(new Jo({id:"selectPrevPageSuggestion",precondition:ct.M$.and(Tn.Visible,Tn.MultipleSuggestions),handler:u=>u.selectPrevPageSuggestion(),kbOpts:{weight:xr,kbExpr:ze.R.textInputFocus,primary:11,secondary:[2059]}})),(0,Te.E_)(new Jo({id:"selectFirstSuggestion",precondition:ct.M$.and(Tn.Visible,Tn.MultipleSuggestions),handler:u=>u.selectFirstSuggestion()})),(0,Te.E_)(new Jo({id:"toggleSuggestionDetails",precondition:Tn.Visible,handler:u=>u.toggleSuggestionDetails(),kbOpts:{weight:xr,kbExpr:ze.R.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}},menuOpts:[{menuId:ia,group:"right",order:1,when:ct.M$.and(Tn.DetailsVisible,Tn.CanResolve),title:we.kg("detail.more","show less")},{menuId:ia,group:"right",order:1,when:ct.M$.and(Tn.DetailsVisible.toNegated(),Tn.CanResolve),title:we.kg("detail.less","show more")}]})),(0,Te.E_)(new Jo({id:"toggleExplainMode",precondition:Tn.Visible,handler:u=>u.toggleExplainMode(),kbOpts:{weight:100,primary:2133}})),(0,Te.E_)(new Jo({id:"toggleSuggestionFocus",precondition:Tn.Visible,handler:u=>u.toggleSuggestionFocus(),kbOpts:{weight:xr,kbExpr:ze.R.textInputFocus,primary:2570,mac:{primary:778}}})),(0,Te.E_)(new Jo({id:"insertBestCompletion",precondition:ct.M$.and(ze.R.textInputFocus,ct.M$.equals("config.editor.tabCompletion","on"),Lu.AtEnd,Tn.Visible.toNegated(),Hd.OtherSuggestions.toNegated(),io.InSnippetMode.toNegated()),handler:(u,e)=>{u.triggerSuggestAndAcceptBest((0,pi.Gv)(e)?Object.assign({fallback:"tab"},e):{fallback:"tab"})},kbOpts:{weight:xr,primary:2}})),(0,Te.E_)(new Jo({id:"insertNextSuggestion",precondition:ct.M$.and(ze.R.textInputFocus,ct.M$.equals("config.editor.tabCompletion","on"),Hd.OtherSuggestions,Tn.Visible.toNegated(),io.InSnippetMode.toNegated()),handler:u=>u.acceptNextSuggestion(),kbOpts:{weight:xr,kbExpr:ze.R.textInputFocus,primary:2}})),(0,Te.E_)(new Jo({id:"insertPrevSuggestion",precondition:ct.M$.and(ze.R.textInputFocus,ct.M$.equals("config.editor.tabCompletion","on"),Hd.OtherSuggestions,Tn.Visible.toNegated(),io.InSnippetMode.toNegated()),handler:u=>u.acceptPrevSuggestion(),kbOpts:{weight:xr,kbExpr:ze.R.textInputFocus,primary:1026}})),(0,Te.Fl)(class extends Te.ks{constructor(){super({id:"editor.action.resetSuggestSize",label:we.kg("suggest.reset.label","Reset Suggest Widget Size"),alias:"Reset Suggest Widget Size",precondition:void 0})}run(u,e){var t;(t=Wr.get(e))===null||t===void 0||t.resetWidgetSize()}});class aS extends at.jG{constructor(e,t){super(),this.editor=e,this.suggestControllerPreselector=t,this.isSuggestWidgetVisible=!1,this.isShiftKeyPressed=!1,this._isActive=!1,this._currentSuggestItemInfo=void 0,this.onDidChangeEmitter=new Vi.vl,this.onDidChange=this.onDidChangeEmitter.event,this.setInactiveDelayed=this._register(new Ot.uC(()=>{this.isSuggestWidgetVisible||this._isActive&&(this._isActive=!1,this.onDidChangeEmitter.fire())},100)),this._register(e.onKeyDown(s=>{s.shiftKey&&!this.isShiftKeyPressed&&(this.isShiftKeyPressed=!0,this.update(this._isActive))})),this._register(e.onKeyUp(s=>{s.shiftKey&&this.isShiftKeyPressed&&(this.isShiftKeyPressed=!1,this.update(this._isActive))}));const i=Wr.get(this.editor);if(i){this._register(i.registerSelector({priority:100,select:(c,m,A)=>{const U=this.editor.getModel(),W=ff(U,this.suggestControllerPreselector());if(!W)return-1;const re=bi.y.lift(m),Se=A.map((Qe,tt)=>{const vt=N0(i,re,Qe,this.isShiftKeyPressed),Ht=ff(U,vt?.normalizedInlineCompletion);if(!Ht)return;const ci=lS(W.range,Ht.range)&&W.insertText.startsWith(Ht.insertText);return{index:tt,valid:ci,prefixLength:Ht.insertText.length,suggestItem:Qe}}).filter(Qe=>Qe&&Qe.valid),Be=(0,cn.vj)(Se,(0,cn.VE)(Qe=>Qe.prefixLength,cn.U9));return Be?Be.index:-1}}));let s=!1;const o=()=>{s||(s=!0,this._register(i.widget.value.onDidShow(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)})),this._register(i.widget.value.onDidHide(()=>{this.isSuggestWidgetVisible=!1,this.setInactiveDelayed.schedule(),this.update(this._isActive)})),this._register(i.widget.value.onDidFocus(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)})))};this._register(Vi.Jh.once(i.model.onDidTrigger)(c=>{o()}))}this.update(this._isActive)}get state(){if(this._isActive)return{selectedItem:this._currentSuggestItemInfo}}update(e){const t=this.getSuggestItemInfo();let i=!1;dS(this._currentSuggestItemInfo,t)||(this._currentSuggestItemInfo=t,i=!0),this._isActive!==e&&(this._isActive=e,i=!0),i&&this.onDidChangeEmitter.fire()}getSuggestItemInfo(){const e=Wr.get(this.editor);if(!e||!this.isSuggestWidgetVisible)return;const t=e.widget.value.getFocusedItem();if(t)return N0(e,this.editor.getPosition(),t.item,this.isShiftKeyPressed)}stopForceRenderingAbove(){const e=Wr.get(this.editor);e&&e.stopForceRenderingAbove()}forceRenderingAbove(){const e=Wr.get(this.editor);e&&e.forceRenderingAbove()}}function lS(u,e){return e.startLineNumber===u.startLineNumber&&e.startColumn===u.startColumn&&(e.endLineNumber<u.endLineNumber||e.endLineNumber===u.endLineNumber&&e.endColumn<=u.endColumn)}function dS(u,e){return u===e?!0:!u||!e?!1:u.completionItemKind===e.completionItemKind&&u.isSnippetText===e.isSnippetText&&Ob(u.normalizedInlineCompletion,e.normalizedInlineCompletion)}function N0(u,e,t,i){if(Array.isArray(t.completion.additionalTextEdits)&&t.completion.additionalTextEdits.length>0)return{completionItemKind:t.completion.kind,isSnippetText:!1,normalizedInlineCompletion:{range:St.Q.fromPositions(e,e),insertText:"",filterText:"",snippetInfo:void 0,additionalTextEdits:[]}};let{insertText:s}=t.completion,o=!1;if(t.completion.insertTextRules&4){const m=new ta().parse(s),A=u.editor.getModel();if(m.children.length>100)return;Gg.adjustWhitespace(A,e,m,!0,!0),s=m.toString(),o=!0}const c=u.getOverwriteInfo(t,i);return{isSnippetText:o,completionItemKind:t.completion.kind,normalizedInlineCompletion:{insertText:s,filterText:s,range:St.Q.fromPositions(e.delta(0,-c.overwriteBefore),e.delta(0,Math.max(c.overwriteAfter,0))),snippetInfo:void 0,additionalTextEdits:[]}}}var cS=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},hS=function(u,e){return function(t,i){e(t,i,u)}},M0=function(u,e,t,i){function s(o){return o instanceof t?o:new t(function(c){c(o)})}return new(t||(t=Promise))(function(o,c){function m(W){try{U(i.next(W))}catch(re){c(re)}}function A(W){try{U(i.throw(W))}catch(re){c(re)}}function U(W){W.done?o(W.value):s(W.value).then(m,A)}U((i=i.apply(u,e||[])).next())})};let yp=class extends v0{constructor(e,t,i){super(e),this.cache=t,this.languageFeaturesService=i,this.suggestionInlineCompletionSource=this._register(new aS(this.editor,()=>{var s,o;return(o=(s=this.cache.value)===null||s===void 0?void 0:s.completions[0])===null||o===void 0?void 0:o.toLiveInlineCompletion()})),this.updateOperation=this._register(new at.HE),this.updateCacheSoon=this._register(new Ot.uC(()=>this.updateCache(),50)),this.minReservedLineCount=0,this._register(this.suggestionInlineCompletionSource.onDidChange(()=>{if(!this.editor.hasModel())return;this.updateCacheSoon.schedule(),this.suggestionInlineCompletionSource.state||(this.minReservedLineCount=0);const o=this.ghostText;o&&(this.minReservedLineCount=Math.max(this.minReservedLineCount,uS(o.parts.map(c=>c.lines.length-1)))),this.minReservedLineCount>=1?this.suggestionInlineCompletionSource.forceRenderingAbove():this.suggestionInlineCompletionSource.stopForceRenderingAbove(),this.onDidChangeEmitter.fire()})),this._register(this.cache.onDidChange(()=>{this.onDidChangeEmitter.fire()})),this._register(this.editor.onDidChangeCursorPosition(s=>{this.minReservedLineCount=0,this.updateCacheSoon.schedule(),this.onDidChangeEmitter.fire()})),this._register((0,at.s)(()=>this.suggestionInlineCompletionSource.stopForceRenderingAbove()))}get isActive(){return this.suggestionInlineCompletionSource.state!==void 0}isSuggestionPreviewEnabled(){return this.editor.getOption(108).preview}updateCache(){return M0(this,void 0,void 0,function*(){const e=this.suggestionInlineCompletionSource.state;if(!e||!e.selectedItem)return;const t={text:e.selectedItem.normalizedInlineCompletion.insertText,range:e.selectedItem.normalizedInlineCompletion.range,isSnippetText:e.selectedItem.isSnippetText,completionKind:e.selectedItem.completionItemKind},i=this.editor.getPosition();if(e.selectedItem.isSnippetText||e.selectedItem.completionItemKind===27||e.selectedItem.completionItemKind===20||e.selectedItem.completionItemKind===23){this.cache.clear();return}const s=(0,Ot.SS)(c=>M0(this,void 0,void 0,function*(){let m;try{m=yield y0(this.languageFeaturesService.inlineCompletionsProvider,i,this.editor.getModel(),{triggerKind:Xe.qw.Automatic,selectedSuggestionInfo:t},c)}catch(A){(0,Wi.dz)(A);return}if(c.isCancellationRequested){m.dispose();return}this.cache.setValue(this.editor,m,Xe.qw.Automatic),this.onDidChangeEmitter.fire()})),o=new S0(s,Xe.qw.Automatic);this.updateOperation.value=o,yield s,this.updateOperation.value===o&&this.updateOperation.clear()})}get ghostText(){var e,t,i;const s=this.isSuggestionPreviewEnabled(),o=this.editor.getModel(),c=ff(o,(t=(e=this.cache.value)===null||e===void 0?void 0:e.completions[0])===null||t===void 0?void 0:t.toLiveInlineCompletion()),m=this.suggestionInlineCompletionSource.state,A=ff(o,(i=m?.selectedItem)===null||i===void 0?void 0:i.normalizedInlineCompletion),U=c&&A&&c.insertText.startsWith(A.insertText)&&c.range.equalsRange(A.range);if(!s&&!U)return;const W=U?c:A||c,re=U?W.insertText.length-A.insertText.length:0;return this.toGhostText(W,re)}toGhostText(e,t){const i=this.editor.getOptions().get(108).previewMode;return e?C0(e,this.editor.getModel(),i,this.editor.getPosition(),t)||new p0(e.range.endLineNumber,[],this.minReservedLineCount):void 0}};yp=cS([hS(2,Zi.u)],yp);function uS(u){return u.reduce((e,t)=>e+t,0)}var gS=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},fS=function(u,e){return function(t,i){e(t,i,u)}},mS=function(u,e,t,i){function s(o){return o instanceof t?o:new t(function(c){c(o)})}return new(t||(t=Promise))(function(o,c){function m(W){try{U(i.next(W))}catch(re){c(re)}}function A(W){try{U(i.throw(W))}catch(re){c(re)}}function U(W){W.done?o(W.value):s(W.value).then(m,A)}U((i=i.apply(u,e||[])).next())})};class pS extends at.jG{constructor(){super(...arguments),this.onDidChangeEmitter=new Vi.vl,this.onDidChange=this.onDidChangeEmitter.event,this.hasCachedGhostText=!1,this.currentModelRef=this._register(new at.HE)}get targetModel(){var e;return(e=this.currentModelRef.value)===null||e===void 0?void 0:e.object}setTargetModel(e){var t;((t=this.currentModelRef.value)===null||t===void 0?void 0:t.object)!==e&&(this.currentModelRef.clear(),this.currentModelRef.value=e?Ib(e,e.onDidChange(()=>{this.hasCachedGhostText=!1,this.onDidChangeEmitter.fire()})):void 0,this.hasCachedGhostText=!1,this.onDidChangeEmitter.fire())}get ghostText(){var e,t;return this.hasCachedGhostText||(this.cachedGhostText=(t=(e=this.currentModelRef.value)===null||e===void 0?void 0:e.object)===null||t===void 0?void 0:t.ghostText,this.hasCachedGhostText=!0),this.cachedGhostText}setExpanded(e){var t;(t=this.targetModel)===null||t===void 0||t.setExpanded(e)}get minReservedLineCount(){return this.targetModel?this.targetModel.minReservedLineCount:0}}let Lp=class extends pS{constructor(e,t){super(),this.editor=e,this.instantiationService=t,this.sharedCache=this._register(new _S),this.suggestWidgetAdapterModel=this._register(this.instantiationService.createInstance(yp,this.editor,this.sharedCache)),this.inlineCompletionsModel=this._register(this.instantiationService.createInstance(up,this.editor,this.sharedCache)),this._register(this.suggestWidgetAdapterModel.onDidChange(()=>{this.updateModel()})),this.updateModel()}get activeInlineCompletionsModel(){if(this.targetModel===this.inlineCompletionsModel)return this.inlineCompletionsModel}updateModel(){this.setTargetModel(this.suggestWidgetAdapterModel.isActive?this.suggestWidgetAdapterModel:this.inlineCompletionsModel),this.inlineCompletionsModel.setActive(this.targetModel===this.inlineCompletionsModel)}shouldShowHoverAt(e){var t;const i=(t=this.activeInlineCompletionsModel)===null||t===void 0?void 0:t.ghostText;return i?i.parts.some(s=>e.containsPosition(new bi.y(i.lineNumber,s.column))):!1}triggerInlineCompletion(){var e;(e=this.activeInlineCompletionsModel)===null||e===void 0||e.trigger(Xe.qw.Explicit)}commitInlineCompletion(){var e;(e=this.activeInlineCompletionsModel)===null||e===void 0||e.commitCurrentSuggestion()}hideInlineCompletion(){var e;(e=this.activeInlineCompletionsModel)===null||e===void 0||e.hide()}showNextInlineCompletion(){var e;(e=this.activeInlineCompletionsModel)===null||e===void 0||e.showNext()}showPreviousInlineCompletion(){var e;(e=this.activeInlineCompletionsModel)===null||e===void 0||e.showPrevious()}hasMultipleInlineCompletions(){var e;return mS(this,void 0,void 0,function*(){const t=yield(e=this.activeInlineCompletionsModel)===null||e===void 0?void 0:e.hasMultipleInlineCompletions();return t!==void 0?t:!1})}};Lp=gS([fS(1,P._Y)],Lp);class _S extends at.jG{constructor(){super(...arguments),this.onDidChangeEmitter=new Vi.vl,this.onDidChange=this.onDidChangeEmitter.event,this.cache=this._register(new at.HE)}get value(){return this.cache.value}setValue(e,t,i){this.cache.value=new Kb(t,e,()=>this.onDidChangeEmitter.fire(),i)}clearAndLeak(){return this.cache.clearAndLeak()}clear(){this.cache.clear()}}var Mk=f(56588),vS=f(57445),T0=f(54324),Dp=f(45561),wf=f(39723),CS=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},R0=function(u,e){return function(t,i){e(t,i,u)}},kp;const A0=(kp=window.trustedTypes)===null||kp===void 0?void 0:kp.createPolicy("editorGhostText",{createHTML:u=>u});let Ep=class extends at.jG{constructor(e,t,i,s){super(),this.editor=e,this.model=t,this.instantiationService=i,this.languageService=s,this.disposed=!1,this.partsWidget=this._register(this.instantiationService.createInstance(wS,this.editor)),this.additionalLinesWidget=this._register(new SS(this.editor,this.languageService.languageIdCodec)),this.viewMoreContentWidget=void 0,this.replacementDecoration=this._register(new bS(this.editor)),this._register(this.editor.onDidChangeConfiguration(o=>{(o.hasChanged(29)||o.hasChanged(107)||o.hasChanged(90)||o.hasChanged(85)||o.hasChanged(47)||o.hasChanged(46)||o.hasChanged(61))&&this.update()})),this._register((0,at.s)(()=>{var o;this.disposed=!0,this.update(),(o=this.viewMoreContentWidget)===null||o===void 0||o.dispose(),this.viewMoreContentWidget=void 0})),this._register(t.onDidChange(()=>{this.update()})),this.update()}shouldShowHoverAtViewZone(e){return this.additionalLinesWidget.viewZoneId===e}update(){var e;const t=this.model.ghostText;if(!this.editor.hasModel()||!t||this.disposed){this.partsWidget.clear(),this.additionalLinesWidget.clear(),this.replacementDecoration.clear();return}const i=new Array,s=new Array;function o(U,W){if(s.length>0){const re=s[s.length-1];W&&re.decorations.push(new Dp.d(re.content.length+1,re.content.length+1+U[0].length,W,0)),re.content+=U[0],U=U.slice(1)}for(const re of U)s.push({content:re,decorations:W?[new Dp.d(1,re.length+1,W,0)]:[]})}t instanceof _0?this.replacementDecoration.setDecorations([{range:new St.Q(t.lineNumber,t.columnStart,t.lineNumber,t.columnStart+t.length),options:{inlineClassName:"inline-completion-text-to-replace",description:"GhostTextReplacement"}}]):this.replacementDecoration.setDecorations([]);const c=this.editor.getModel().getLineContent(t.lineNumber);let m,A=0;for(const U of t.parts){let W=U.lines;m===void 0?(i.push({column:U.column,text:W[0],preview:U.preview}),W=W.slice(1)):o([c.substring(A,U.column-1)],void 0),W.length>0&&(o(W,"ghost-text"),m===void 0&&U.column<=c.length&&(m=U.column)),A=U.column-1}m!==void 0&&o([c.substring(A)],void 0),this.partsWidget.setParts(t.lineNumber,i,m!==void 0?{column:m,length:c.length+1-m}:void 0),this.additionalLinesWidget.updateLines(t.lineNumber,s,t.additionalReservedLineCount),(e=this.viewMoreContentWidget)===null||e===void 0||e.dispose(),this.viewMoreContentWidget=void 0}renderViewMoreLines(e,t,i){const s=this.editor.getOption(46),o=document.createElement("div");o.className="suggest-preview-additional-widget",(0,Rd.M)(o,s);const c=document.createElement("span");c.className="content-spacer",c.append(t),o.append(c);const m=document.createElement("span");m.className="content-newline suggest-preview-text",m.append("\u23CE "),o.append(m);const A=new at.Cm,U=document.createElement("div");return U.className="button suggest-preview-text",U.append(`+${i} lines\u2026`),A.add(M.b2(U,"mousedown",W=>{var re;(re=this.model)===null||re===void 0||re.setExpanded(!0),W.preventDefault(),this.editor.focus()})),o.append(U),new LS(this.editor,e,o,A)}};Ep=CS([R0(2,P._Y),R0(3,Fs.L)],Ep);class bS{constructor(e){this.editor=e,this.decorationIds=[]}setDecorations(e){this.editor.changeDecorations(t=>{this.decorationIds=t.deltaDecorations(this.decorationIds,e)})}clear(){this.setDecorations([])}dispose(){this.clear()}}class wS{constructor(e){this.editor=e,this.decorationIds=[]}dispose(){this.clear()}clear(){this.editor.changeDecorations(e=>{this.decorationIds=e.deltaDecorations(this.decorationIds,[])})}setParts(e,t,i){if(!this.editor.getModel())return;const o=new Array;i&&o.push({range:St.Q.fromPositions(new bi.y(e,i.column),new bi.y(e,i.column+i.length)),options:{inlineClassName:"ghost-text-hidden",description:"ghost-text-hidden"}}),this.editor.changeDecorations(c=>{this.decorationIds=c.deltaDecorations(this.decorationIds,t.map(m=>({range:St.Q.fromPositions(new bi.y(e,m.column)),options:{description:"ghost-text",after:{content:m.text,inlineClassName:m.preview?"ghost-text-decoration-preview":"ghost-text-decoration",cursorStops:bn.VW.Left},showIfCollapsed:!0}})).concat(o))})}}class SS{constructor(e,t){this.editor=e,this.languageIdCodec=t,this._viewZoneId=void 0}get viewZoneId(){return this._viewZoneId}dispose(){this.clear()}clear(){this.editor.changeViewZones(e=>{this._viewZoneId&&(e.removeZone(this._viewZoneId),this._viewZoneId=void 0)})}updateLines(e,t,i){const s=this.editor.getModel();if(!s)return;const{tabSize:o}=s.getOptions();this.editor.changeViewZones(c=>{this._viewZoneId&&(c.removeZone(this._viewZoneId),this._viewZoneId=void 0);const m=Math.max(t.length,i);if(m>0){const A=document.createElement("div");yS(A,o,t,this.editor.getOptions(),this.languageIdCodec),this._viewZoneId=c.addZone({afterLineNumber:e,heightInLines:m,domNode:A,afterColumnAffinity:1})}})}}function yS(u,e,t,i,s){const o=i.get(29),c=i.get(107),m="none",A=i.get(85),U=i.get(47),W=i.get(46),re=i.get(61),Se=(0,T0.Du)(1e4);Se.appendASCIIString('<div class="suggest-preview-text">');for(let tt=0,vt=t.length;tt<vt;tt++){const Ht=t[tt],ci=Ht.content;Se.appendASCIIString('<div class="view-line'),Se.appendASCIIString('" style="top:'),Se.appendASCIIString(String(tt*re)),Se.appendASCIIString('px;width:1000000px;">');const gi=xi.aC(ci),Ui=xi.E_(ci),dn=vS.f.createEmpty(ci,s);(0,wf.UW)(new wf.zL(W.isMonospace&&!o,W.canUseHalfwidthRightwardsArrow,ci,!1,gi,Ui,0,dn,Ht.decorations,e,0,W.spaceWidth,W.middotWidth,W.wsmiddotWidth,c,m,A,U!==ds.Bc.OFF,null),Se),Se.appendASCIIString("</div>")}Se.appendASCIIString("</div>"),(0,Rd.M)(u,W);const Be=Se.build(),Qe=A0?A0.createHTML(Be):Be;u.innerHTML=Qe}class LS extends at.jG{constructor(e,t,i,s){super(),this.editor=e,this.position=t,this.domNode=i,this.allowEditorOverflow=!1,this.suppressMouseDown=!1,this._register(s),this._register((0,at.s)(()=>{this.editor.removeContentWidget(this)})),this.editor.addContentWidget(this)}getId(){return"editor.widget.viewMoreLinesWidget"}getDomNode(){return this.domNode}getPosition(){return{position:this.position,preference:[0]}}}(0,Ye.zy)((u,e)=>{const t=u.getColor(ni.Ek);t&&(e.addRule(`.monaco-editor .ghost-text-decoration { color: ${t.toString()} !important; }`),e.addRule(`.monaco-editor .ghost-text-decoration-preview { color: ${t.toString()} !important; }`),e.addRule(`.monaco-editor .suggest-preview-text .ghost-text { color: ${t.toString()} !important; }`));const i=u.getColor(ni.RH);i&&(e.addRule(`.monaco-editor .ghost-text-decoration { background-color: ${i.toString()}; }`),e.addRule(`.monaco-editor .ghost-text-decoration-preview { background-color: ${i.toString()}; }`),e.addRule(`.monaco-editor .suggest-preview-text .ghost-text { background-color: ${i.toString()}; }`));const s=u.getColor(ni.DH);s&&(e.addRule(`.monaco-editor .suggest-preview-text .ghost-text { border: 1px solid ${s}; }`),e.addRule(`.monaco-editor .ghost-text-decoration { border: 1px solid ${s}; }`),e.addRule(`.monaco-editor .ghost-text-decoration-preview { border: 1px solid ${s}; }`))});var O0=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},xp=function(u,e){return function(t,i){e(t,i,u)}},Sf=function(u,e,t,i){function s(o){return o instanceof t?o:new t(function(c){c(o)})}return new(t||(t=Promise))(function(o,c){function m(W){try{U(i.next(W))}catch(re){c(re)}}function A(W){try{U(i.throw(W))}catch(re){c(re)}}function U(W){W.done?o(W.value):s(W.value).then(m,A)}U((i=i.apply(u,e||[])).next())})};let no=class LC extends at.jG{constructor(e,t){super(),this.editor=e,this.instantiationService=t,this.triggeredExplicitly=!1,this.activeController=this._register(new at.HE),this.activeModelDidChangeEmitter=this._register(new Vi.vl),this._register(this.editor.onDidChangeModel(()=>{this.updateModelController()})),this._register(this.editor.onDidChangeConfiguration(i=>{i.hasChanged(108)&&this.updateModelController(),i.hasChanged(57)&&this.updateModelController()})),this.updateModelController()}static get(e){return e.getContribution(LC.ID)}get activeModel(){var e;return(e=this.activeController.value)===null||e===void 0?void 0:e.model}updateModelController(){const e=this.editor.getOption(108),t=this.editor.getOption(57);this.activeController.value=void 0,this.activeController.value=this.editor.hasModel()&&(e.preview||t.enabled||this.triggeredExplicitly)?this.instantiationService.createInstance(Ip,this.editor):void 0,this.activeModelDidChangeEmitter.fire()}shouldShowHoverAt(e){var t;return((t=this.activeModel)===null||t===void 0?void 0:t.shouldShowHoverAt(e))||!1}shouldShowHoverAtViewZone(e){var t,i;return((i=(t=this.activeController.value)===null||t===void 0?void 0:t.widget)===null||i===void 0?void 0:i.shouldShowHoverAtViewZone(e))||!1}trigger(){var e;this.triggeredExplicitly=!0,this.activeController.value||this.updateModelController(),(e=this.activeModel)===null||e===void 0||e.triggerInlineCompletion()}commit(){var e;(e=this.activeModel)===null||e===void 0||e.commitInlineCompletion()}hide(){var e;(e=this.activeModel)===null||e===void 0||e.hideInlineCompletion()}showNextInlineCompletion(){var e;(e=this.activeModel)===null||e===void 0||e.showNextInlineCompletion()}showPreviousInlineCompletion(){var e;(e=this.activeModel)===null||e===void 0||e.showPreviousInlineCompletion()}hasMultipleInlineCompletions(){var e;return Sf(this,void 0,void 0,function*(){const t=yield(e=this.activeModel)===null||e===void 0?void 0:e.hasMultipleInlineCompletions();return t!==void 0?t:!1})}};no.inlineSuggestionVisible=new ct.N1("inlineSuggestionVisible",!1,we.kg("inlineSuggestionVisible","Whether an inline suggestion is visible")),no.inlineSuggestionHasIndentation=new ct.N1("inlineSuggestionHasIndentation",!1,we.kg("inlineSuggestionHasIndentation","Whether the inline suggestion starts with whitespace")),no.inlineSuggestionHasIndentationLessThanTabSize=new ct.N1("inlineSuggestionHasIndentationLessThanTabSize",!0,we.kg("inlineSuggestionHasIndentationLessThanTabSize","Whether the inline suggestion starts with whitespace that is less than what would be inserted by tab")),no.ID="editor.contrib.ghostTextController",no=O0([xp(1,P._Y)],no);class DS{constructor(e){this.contextKeyService=e,this.inlineCompletionVisible=no.inlineSuggestionVisible.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentation=no.inlineSuggestionHasIndentation.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentationLessThanTabSize=no.inlineSuggestionHasIndentationLessThanTabSize.bindTo(this.contextKeyService)}}let Ip=class extends at.jG{constructor(e,t,i){super(),this.editor=e,this.instantiationService=t,this.contextKeyService=i,this.contextKeys=new DS(this.contextKeyService),this.model=this._register(this.instantiationService.createInstance(Lp,this.editor)),this.widget=this._register(this.instantiationService.createInstance(Ep,this.editor,this.model)),this._register((0,at.s)(()=>{this.contextKeys.inlineCompletionVisible.set(!1),this.contextKeys.inlineCompletionSuggestsIndentation.set(!1),this.contextKeys.inlineCompletionSuggestsIndentationLessThanTabSize.set(!0)})),this._register(this.model.onDidChange(()=>{this.updateContextKeys()})),this.updateContextKeys()}updateContextKeys(){var e;this.contextKeys.inlineCompletionVisible.set(((e=this.model.activeInlineCompletionsModel)===null||e===void 0?void 0:e.ghostText)!==void 0);let t=!1,i=!0;const s=this.model.inlineCompletionsModel.ghostText;if(this.model.activeInlineCompletionsModel&&s&&s.parts.length>0){const{column:o,lines:c}=s.parts[0],m=c[0],A=this.editor.getModel().getLineIndentColumn(s.lineNumber);if(o<=A){let W=(0,xi.HG)(m);W===-1&&(W=m.length-1),t=W>0;const re=this.editor.getModel().getOptions().tabSize;i=xb.A.visibleColumnFromColumn(m,W+1,re)<re}}this.contextKeys.inlineCompletionSuggestsIndentation.set(t),this.contextKeys.inlineCompletionSuggestsIndentationLessThanTabSize.set(i)}};Ip=O0([xp(1,P._Y),xp(2,ct.fN)],Ip);class ih extends Te.ks{constructor(){super({id:ih.ID,label:we.kg("action.inlineSuggest.showNext","Show Next Inline Suggestion"),alias:"Show Next Inline Suggestion",precondition:ct.M$.and(ze.R.writable,no.inlineSuggestionVisible),kbOpts:{weight:100,primary:601}})}run(e,t){return Sf(this,void 0,void 0,function*(){const i=no.get(t);i&&(i.showNextInlineCompletion(),t.focus())})}}ih.ID="editor.action.inlineSuggest.showNext";class nh extends Te.ks{constructor(){super({id:nh.ID,label:we.kg("action.inlineSuggest.showPrevious","Show Previous Inline Suggestion"),alias:"Show Previous Inline Suggestion",precondition:ct.M$.and(ze.R.writable,no.inlineSuggestionVisible),kbOpts:{weight:100,primary:599}})}run(e,t){return Sf(this,void 0,void 0,function*(){const i=no.get(t);i&&(i.showPreviousInlineCompletion(),t.focus())})}}nh.ID="editor.action.inlineSuggest.showPrevious";class kS extends Te.ks{constructor(){super({id:"editor.action.inlineSuggest.trigger",label:we.kg("action.inlineSuggest.trigger","Trigger Inline Suggestion"),alias:"Trigger Inline Suggestion",precondition:ze.R.writable})}run(e,t){return Sf(this,void 0,void 0,function*(){const i=no.get(t);i&&i.trigger()})}}var ES=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},sh=function(u,e){return function(t,i){e(t,i,u)}};class xS{constructor(e,t,i){this.owner=e,this.range=t,this.controller=i}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}hasMultipleSuggestions(){return this.controller.hasMultipleInlineCompletions()}get commands(){var e,t,i;return((i=(t=(e=this.controller.activeModel)===null||e===void 0?void 0:e.activeInlineCompletionsModel)===null||t===void 0?void 0:t.completionSession.value)===null||i===void 0?void 0:i.commands)||[]}}let Np=class{constructor(e,t,i,s,o,c,m){this._editor=e,this._commandService=t,this._menuService=i,this._contextKeyService=s,this._languageService=o,this._openerService=c,this.accessibilityService=m,this.hoverOrdinal=3}suggestHoverAnchor(e){const t=no.get(this._editor);if(!t)return null;const i=e.target;if(i.type===8){const s=i.detail;if(t.shouldShowHoverAtViewZone(s.viewZoneId))return new Dr(1e3,this,St.Q.fromPositions(s.positionBefore||s.position,s.positionBefore||s.position))}return i.type===7&&t.shouldShowHoverAt(i.range)?new Dr(1e3,this,i.range):i.type===6&&i.detail.mightBeForeignElement&&t.shouldShowHoverAt(i.range)?new Dr(1e3,this,i.range):null}computeSync(e,t){const i=no.get(this._editor);return i&&i.shouldShowHoverAt(e.range)?[new xS(this,e.range,i)]:[]}renderHoverParts(e,t){const i=new at.Cm,s=t[0];this.accessibilityService.isScreenReaderOptimized()&&this.renderScreenReaderText(e,s,i);const o=i.add(this._menuService.createMenu(xe.D8.InlineCompletionsActions,this._contextKeyService)),c=e.statusBar.addAction({label:we.kg("showNextInlineSuggestion","Next"),commandId:ih.ID,run:()=>this._commandService.executeCommand(ih.ID)}),m=e.statusBar.addAction({label:we.kg("showPreviousInlineSuggestion","Previous"),commandId:nh.ID,run:()=>this._commandService.executeCommand(nh.ID)});e.statusBar.addAction({label:we.kg("acceptInlineSuggestion","Accept"),commandId:gf,run:()=>this._commandService.executeCommand(gf)});const A=[c,m];for(const U of A)U.setEnabled(!1);s.hasMultipleSuggestions().then(U=>{for(const W of A)W.setEnabled(U)});for(const U of s.commands)e.statusBar.addAction({label:U.title,commandId:U.id,run:()=>this._commandService.executeCommand(U.id,...U.arguments||[])});for(const[U,W]of o.getActions())for(const re of W)re instanceof xe.Xe&&e.statusBar.addAction({label:re.label,commandId:re.item.id,run:()=>this._commandService.executeCommand(re.item.id)});return i}renderScreenReaderText(e,t,i){var s,o;const c=M.$,m=c("div.hover-row.markdown-hover"),A=M.BC(m,c("div.hover-contents")),U=i.add(new Br({editor:this._editor},this._languageService,this._openerService)),W=Se=>{i.add(U.onDidRenderAsync(()=>{A.className="hover-contents code-hover-contents",e.onContentsChanged()}));const Be=we.kg("inlineSuggestionFollows","Suggestion:"),Qe=i.add(U.render(new Li.Bc().appendText(Be).appendCodeblock("text",Se)));A.replaceChildren(Qe.element)},re=(o=(s=t.controller.activeModel)===null||s===void 0?void 0:s.inlineCompletionsModel)===null||o===void 0?void 0:o.ghostText;if(re){const Se=this._editor.getModel().getLineContent(re.lineNumber);W(re.renderForScreenReader(Se))}e.fragment.appendChild(m)}};Np=ES([sh(1,fn.wT),sh(2,xe.ez),sh(3,ct.fN),sh(4,Fs.L),sh(5,Ho.Cr),sh(6,Fo.j)],Np),(0,Te.HW)(no.ID,no),(0,Te.Fl)(kS),(0,Te.Fl)(ih),(0,Te.Fl)(nh),Bs.register(Np);const P0=Te.DX.bindToContribution(no.get),Mp=new P0({id:gf,precondition:no.inlineSuggestionVisible,handler(u){u.commit(),u.editor.focus()}});(0,Te.E_)(Mp),it.f.registerKeybindingRule({primary:2,weight:200,id:Mp.id,when:ct.M$.and(Mp.precondition,ze.R.tabMovesFocus.toNegated(),no.inlineSuggestionHasIndentationLessThanTabSize)}),(0,Te.E_)(new P0({id:"editor.action.inlineSuggest.hide",precondition:no.inlineSuggestionVisible,kbOpts:{weight:100,primary:9},handler(u){u.hide()}}));var oh=f(41672);function qo(u,e){let t=0;for(let i=0;i<u.length;i++)u.charAt(i)===" "?t+=e:t++;return t}function xu(u,e,t){u=u<0?0:u;let i="";if(!t){const s=Math.floor(u/e);u=u%e;for(let o=0;o<s;o++)i+=" "}for(let s=0;s<u;s++)i+=" ";return i}var F0=f(57999),Ud=f(70645),IS=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},NS=function(u,e){return function(t,i){e(t,i,u)}};function B0(u,e,t,i,s){if(u.getLineCount()===1&&u.getLineMaxColumn(1)===1)return[];const o=e.getLanguageConfiguration(u.getLanguageId()).indentationRules;if(!o)return[];for(i=Math.min(i,u.getLineCount());t<=i&&o.unIndentedLinePattern;){const vt=u.getLineContent(t);if(!o.unIndentedLinePattern.test(vt))break;t++}if(t>i-1)return[];const{tabSize:c,indentSize:m,insertSpaces:A}=u.getOptions(),U=(vt,Ht)=>(Ht=Ht||1,oh.Y.shiftIndent(vt,vt.length+Ht,c,m,A)),W=(vt,Ht)=>(Ht=Ht||1,oh.Y.unshiftIndent(vt,vt.length+Ht,c,m,A)),re=[];let Se;const Be=u.getLineContent(t);let Qe=Be;if(s!=null){Se=s;const vt=xi.UU(Be);Qe=Se+Be.substring(vt.length),o.decreaseIndentPattern&&o.decreaseIndentPattern.test(Qe)&&(Se=W(Se),Qe=Se+Be.substring(vt.length)),Be!==Qe&&re.push(Sn.k.replaceMove(new ki.L(t,1,t,vt.length+1),(0,F0.P)(Se,m,A)))}else Se=xi.UU(Be);let tt=Se;o.increaseIndentPattern&&o.increaseIndentPattern.test(Qe)?(tt=U(tt),Se=U(Se)):o.indentNextLinePattern&&o.indentNextLinePattern.test(Qe)&&(tt=U(tt)),t++;for(let vt=t;vt<=i;vt++){const Ht=u.getLineContent(vt),ci=xi.UU(Ht),gi=tt+Ht.substring(ci.length);o.decreaseIndentPattern&&o.decreaseIndentPattern.test(gi)&&(tt=W(tt),Se=W(Se)),ci!==tt&&re.push(Sn.k.replaceMove(new ki.L(vt,1,vt,ci.length+1),(0,F0.P)(tt,m,A))),!(o.unIndentedLinePattern&&o.unIndentedLinePattern.test(Ht))&&(o.increaseIndentPattern&&o.increaseIndentPattern.test(gi)?(Se=U(Se),tt=Se):o.indentNextLinePattern&&o.indentNextLinePattern.test(gi)?tt=U(tt):tt=Se)}return re}class yf extends Te.ks{constructor(){super({id:yf.ID,label:we.kg("indentationToSpaces","Convert Indentation to Spaces"),alias:"Convert Indentation to Spaces",precondition:ze.R.writable})}run(e,t){const i=t.getModel();if(!i)return;const s=i.getOptions(),o=t.getSelection();if(!o)return;const c=new AS(o,s.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[c]),t.pushUndoStop(),i.updateOptions({insertSpaces:!0})}}yf.ID="editor.action.indentationToSpaces";class Lf extends Te.ks{constructor(){super({id:Lf.ID,label:we.kg("indentationToTabs","Convert Indentation to Tabs"),alias:"Convert Indentation to Tabs",precondition:ze.R.writable})}run(e,t){const i=t.getModel();if(!i)return;const s=i.getOptions(),o=t.getSelection();if(!o)return;const c=new OS(o,s.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[c]),t.pushUndoStop(),i.updateOptions({insertSpaces:!1})}}Lf.ID="editor.action.indentationToTabs";class W0 extends Te.ks{constructor(e,t){super(t),this.insertSpaces=e}run(e,t){const i=e.get($r.GK),s=e.get(ws.S),o=t.getModel();if(!o)return;const c=s.getCreationOptions(o.getLanguageId(),o.uri,o.isForSimpleWidget),m=[1,2,3,4,5,6,7,8].map(U=>({id:U.toString(),label:U.toString(),description:U===c.tabSize?we.kg("configuredTabSize","Configured Tab Size"):void 0})),A=Math.min(o.getOptions().tabSize-1,7);setTimeout(()=>{i.pick(m,{placeHolder:we.kg({key:"selectTabWidth",comment:["Tab corresponds to the tab key"]},"Select Tab Size for Current File"),activeItem:m[A]}).then(U=>{U&&o&&!o.isDisposed()&&o.updateOptions({tabSize:parseInt(U.label,10),insertSpaces:this.insertSpaces})})},50)}}class Df extends W0{constructor(){super(!1,{id:Df.ID,label:we.kg("indentUsingTabs","Indent Using Tabs"),alias:"Indent Using Tabs",precondition:void 0})}}Df.ID="editor.action.indentUsingTabs";class kf extends W0{constructor(){super(!0,{id:kf.ID,label:we.kg("indentUsingSpaces","Indent Using Spaces"),alias:"Indent Using Spaces",precondition:void 0})}}kf.ID="editor.action.indentUsingSpaces";class Ef extends Te.ks{constructor(){super({id:Ef.ID,label:we.kg("detectIndentation","Detect Indentation from Content"),alias:"Detect Indentation from Content",precondition:void 0})}run(e,t){const i=e.get(ws.S),s=t.getModel();if(!s)return;const o=i.getCreationOptions(s.getLanguageId(),s.uri,s.isForSimpleWidget);s.detectIndentation(o.insertSpaces,o.tabSize)}}Ef.ID="editor.action.detectIndentation";class MS extends Te.ks{constructor(){super({id:"editor.action.reindentlines",label:we.kg("editor.reindentlines","Reindent Lines"),alias:"Reindent Lines",precondition:ze.R.writable})}run(e,t){const i=e.get(ao.JZ),s=t.getModel();if(!s)return;const o=B0(s,i,1,s.getLineCount());o.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,o),t.pushUndoStop())}}class TS extends Te.ks{constructor(){super({id:"editor.action.reindentselectedlines",label:we.kg("editor.reindentselectedlines","Reindent Selected Lines"),alias:"Reindent Selected Lines",precondition:ze.R.writable})}run(e,t){const i=e.get(ao.JZ),s=t.getModel();if(!s)return;const o=t.getSelections();if(o===null)return;const c=[];for(const m of o){let A=m.startLineNumber,U=m.endLineNumber;if(A!==U&&m.endColumn===1&&U--,A===1){if(A===U)continue}else A--;const W=B0(s,i,A,U);c.push(...W)}c.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,c),t.pushUndoStop())}}class RS{constructor(e,t){this._initialSelection=t,this._edits=[],this._selectionId=null;for(const i of e)i.range&&typeof i.text=="string"&&this._edits.push(i)}getEditOperations(e,t){for(const s of this._edits)t.addEditOperation(St.Q.lift(s.range),s.text);let i=!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?(i=!0,this._selectionId=t.trackSelection(this._initialSelection,!0)):this._edits[0].range.endColumn===this._initialSelection.startColumn&&this._edits[0].range.endLineNumber===this._initialSelection.startLineNumber&&(i=!0,this._selectionId=t.trackSelection(this._initialSelection,!1))),i||(this._selectionId=t.trackSelection(this._initialSelection))}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}let Iu=class{constructor(e,t){this.editor=e,this._languageConfigurationService=t,this.callOnDispose=new at.Cm,this.callOnModel=new at.Cm,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(9)<4||this.editor.getOption(50))&&this.editor.hasModel()&&this.callOnModel.add(this.editor.onDidPaste(({range:e})=>{this.trigger(e)}))}trigger(e){const t=this.editor.getSelections();if(t===null||t.length>1)return;const i=this.editor.getModel();if(!i||!i.tokenization.isCheapToTokenize(e.getStartPosition().lineNumber))return;const s=this.editor.getOption(9),{tabSize:o,indentSize:c,insertSpaces:m}=i.getOptions(),A=[],U={shiftIndent:Be=>oh.Y.shiftIndent(Be,Be.length+1,o,c,m),unshiftIndent:Be=>oh.Y.unshiftIndent(Be,Be.length+1,o,c,m)};let W=e.startLineNumber;for(;W<=e.endLineNumber;){if(this.shouldIgnoreLine(i,W)){W++;continue}break}if(W>e.endLineNumber)return;let re=i.getLineContent(W);if(!/\S/.test(re.substring(0,e.startColumn-1))){const Be=(0,Ud.$f)(s,i,i.getLanguageId(),W,U,this._languageConfigurationService);if(Be!==null){const Qe=xi.UU(re),tt=qo(Be,o),vt=qo(Qe,o);if(tt!==vt){const Ht=xu(tt,o,m);A.push({range:new St.Q(W,1,W,Qe.length+1),text:Ht}),re=Ht+re.substr(Qe.length)}else{const Ht=(0,Ud.Yb)(i,W,this._languageConfigurationService);if(Ht===0||Ht===8)return}}}const Se=W;for(;W<e.endLineNumber;){if(!/\S/.test(i.getLineContent(W+1))){W++;continue}break}if(W!==e.endLineNumber){const Be={tokenization:{getLineTokens:tt=>i.tokenization.getLineTokens(tt),getLanguageId:()=>i.getLanguageId(),getLanguageIdAtPosition:(tt,vt)=>i.getLanguageIdAtPosition(tt,vt)},getLineContent:tt=>tt===Se?re:i.getLineContent(tt)},Qe=(0,Ud.$f)(s,Be,i.getLanguageId(),W+1,U,this._languageConfigurationService);if(Qe!==null){const tt=qo(Qe,o),vt=qo(xi.UU(i.getLineContent(W+1)),o);if(tt!==vt){const Ht=tt-vt;for(let ci=W+1;ci<=e.endLineNumber;ci++){const gi=i.getLineContent(ci),Ui=xi.UU(gi),hs=qo(Ui,o)+Ht,An=xu(hs,o,m);An!==Ui&&A.push({range:new St.Q(ci,1,ci,Ui.length+1),text:An})}}}}if(A.length>0){this.editor.pushUndoStop();const Be=new RS(A,this.editor.getSelection());this.editor.executeCommand("autoIndentOnPaste",Be),this.editor.pushUndoStop()}}shouldIgnoreLine(e,t){e.tokenization.forceTokenization(t);const i=e.getLineFirstNonWhitespaceColumn(t);if(i===0)return!0;const s=e.tokenization.getLineTokens(t);if(s.getCount()>0){const o=s.findTokenIndexAtOffset(i);if(o>=0&&s.getStandardTokenType(o)===1)return!0}return!1}dispose(){this.callOnDispose.dispose(),this.callOnModel.dispose()}};Iu.ID="editor.contrib.autoIndentOnPaste",Iu=IS([NS(1,ao.JZ)],Iu);function V0(u,e,t,i){if(u.getLineCount()===1&&u.getLineMaxColumn(1)===1)return;let s="";for(let c=0;c<t;c++)s+=" ";const o=new RegExp(s,"gi");for(let c=1,m=u.getLineCount();c<=m;c++){let A=u.getLineFirstNonWhitespaceColumn(c);if(A===0&&(A=u.getLineMaxColumn(c)),A===1)continue;const U=new St.Q(c,1,c,A),W=u.getValueInRange(U),re=i?W.replace(/\t/ig,s):W.replace(o," ");e.addEditOperation(U,re)}}class AS{constructor(e,t){this.selection=e,this.tabSize=t,this.selectionId=null}getEditOperations(e,t){this.selectionId=t.trackSelection(this.selection),V0(e,t,this.tabSize,!0)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}}class OS{constructor(e,t){this.selection=e,this.tabSize=t,this.selectionId=null}getEditOperations(e,t){this.selectionId=t.trackSelection(this.selection),V0(e,t,this.tabSize,!1)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}}(0,Te.HW)(Iu.ID,Iu),(0,Te.Fl)(yf),(0,Te.Fl)(Lf),(0,Te.Fl)(Df),(0,Te.Fl)(kf),(0,Te.Fl)(Ef),(0,Te.Fl)(MS),(0,Te.Fl)(TS);var xf=function(u,e,t,i){function s(o){return o instanceof t?o:new t(function(c){c(o)})}return new(t||(t=Promise))(function(o,c){function m(W){try{U(i.next(W))}catch(re){c(re)}}function A(W){try{U(i.throw(W))}catch(re){c(re)}}function U(W){W.done?o(W.value):s(W.value).then(m,A)}U((i=i.apply(u,e||[])).next())})};class H0{constructor(e,t){this.range=e,this.direction=t}}class Tp{constructor(e,t,i){this.hint=e,this.anchor=t,this.provider=i,this._isResolved=!1}with(e){const t=new Tp(this.hint,e.anchor,this.provider);return t._isResolved=this._isResolved,t._currentResolve=this._currentResolve,t}resolve(e){return xf(this,void 0,void 0,function*(){if(typeof this.provider.resolveInlayHint=="function"){if(this._currentResolve)return yield this._currentResolve,e.isCancellationRequested?void 0:this.resolve(e);this._isResolved||(this._currentResolve=this._doResolve(e).finally(()=>this._currentResolve=void 0)),yield this._currentResolve}})}_doResolve(e){var t,i;return xf(this,void 0,void 0,function*(){try{const s=yield Promise.resolve(this.provider.resolveInlayHint(this.hint,e));this.hint.tooltip=(t=s?.tooltip)!==null&&t!==void 0?t:this.hint.tooltip,this.hint.label=(i=s?.label)!==null&&i!==void 0?i:this.hint.label,this._isResolved=!0}catch(s){(0,Wi.M_)(s),this._isResolved=!1}})}}class Nu{constructor(e,t,i){this._disposables=new at.Cm,this.ranges=e,this.provider=new Set;const s=[];for(const[o,c]of t){this._disposables.add(o),this.provider.add(c);for(const m of o.hints){const A=i.validatePosition(m.position);let U="before";const W=Nu._getRangeAtPosition(i,A);let re;W.getStartPosition().isBefore(A)?(re=St.Q.fromPositions(W.getStartPosition(),A),U="after"):(re=St.Q.fromPositions(A,W.getEndPosition()),U="before"),s.push(new Tp(m,new H0(re,U),c))}}this.items=s.sort((o,c)=>bi.y.compare(o.hint.position,c.hint.position))}static create(e,t,i,s){return xf(this,void 0,void 0,function*(){const o=[],c=e.ordered(t).reverse().map(m=>i.map(A=>xf(this,void 0,void 0,function*(){try{const U=yield m.provideInlayHints(t,A,s);U?.hints.length&&o.push([U,m])}catch(U){(0,Wi.M_)(U)}})));if(yield Promise.all(c.flat()),s.isCancellationRequested||t.isDisposed())throw new Wi.AL;return new Nu(i,o,t)})}dispose(){this._disposables.dispose()}static _getRangeAtPosition(e,t){const i=t.lineNumber,s=e.getWordAtPosition(t);if(s)return new St.Q(i,s.startColumn,i,s.endColumn);e.tokenization.tokenizeIfCheap(i);const o=e.tokenization.getLineTokens(i),c=t.column-1,m=o.findTokenIndexAtOffset(c);let A=o.getStartOffset(m),U=o.getEndOffset(m);return U-A===1&&(A===c&&m>1?(A=o.getStartOffset(m-1),U=o.getEndOffset(m-1)):U===c&&m<o.getCount()-1&&(A=o.getStartOffset(m+1),U=o.getEndOffset(m+1))),new St.Q(i,A+1,i,U+1)}}function PS(u){return vn.r.from({scheme:li.ny.command,path:u.id,query:u.arguments&&encodeURIComponent(JSON.stringify(u.arguments))}).toString()}var Mu=function(u,e,t,i){function s(o){return o instanceof t?o:new t(function(c){c(o)})}return new(t||(t=Promise))(function(o,c){function m(W){try{U(i.next(W))}catch(re){c(re)}}function A(W){try{U(i.throw(W))}catch(re){c(re)}}function U(W){W.done?o(W.value):s(W.value).then(m,A)}U((i=i.apply(u,e||[])).next())})};function FS(u,e,t,i){var s;return Mu(this,void 0,void 0,function*(){const o=u.get(Hs.b),c=u.get(be.Z),m=u.get(fn.wT),A=u.get(P._Y),U=u.get(Cs.Ot);if(yield i.item.resolve(Ti.X.None),!i.part.location)return;const W=i.part.location,re=[],Se=new Set(xe.ZG.getMenuItems(xe.D8.EditorContext).map(Qe=>(0,xe.is)(Qe)?Qe.command.id:""));for(const Qe of Te.dS.getEditorActions())Qe instanceof dr&&Se.has(Qe.id)&&re.push(new p.rc(Qe.id,Qe.label,void 0,!0,()=>Mu(this,void 0,void 0,function*(){const tt=yield o.createModelReference(W.uri);try{yield A.invokeFunction(Qe.run.bind(Qe),e,new Xa(tt.object.textEditorModel,St.Q.getStartPosition(W.range)))}finally{tt.dispose()}})));if(i.part.command){const{command:Qe}=i.part;re.push(new p.wv),re.push(new p.rc(Qe.id,Qe.title,void 0,!0,()=>Mu(this,void 0,void 0,function*(){var tt;try{yield m.executeCommand(Qe.id,...(tt=Qe.arguments)!==null&&tt!==void 0?tt:[])}catch(vt){U.notify({severity:Cs.AI.Error,source:i.item.provider.displayName,message:vt})}})))}const Be=e.getOption(117);c.showContextMenu({domForShadowRoot:Be&&(s=e.getDomNode())!==null&&s!==void 0?s:void 0,getAnchor:()=>{const Qe=M.BK(t);return{x:Qe.left,y:Qe.top+Qe.height+8}},getActions:()=>re,onHide:()=>{e.focus()},autoSelectFirstItem:!0})})}function BS(u,e,t,i){return Mu(this,void 0,void 0,function*(){const o=yield u.get(Hs.b).createModelReference(i.uri);yield t.invokeWithinContext(c=>Mu(this,void 0,void 0,function*(){const m=e.hasSideBySideModifier,A=c.get(ct.fN),U=lo.inPeekEditor.getValue(A),W=!m&&t.getOption(80)&&!U;return new kd({openToSide:m,openInPeek:W,muteMessage:!0},{alias:"",label:"",id:"",precondition:void 0}).run(c,t,{model:o.object.textEditorModel,position:St.Q.getStartPosition(i.range)})})),o.dispose()})}var WS=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},rh=function(u,e){return function(t,i){e(t,i,u)}},ah=function(u,e,t,i){function s(o){return o instanceof t?o:new t(function(c){c(o)})}return new(t||(t=Promise))(function(o,c){function m(W){try{U(i.next(W))}catch(re){c(re)}}function A(W){try{U(i.throw(W))}catch(re){c(re)}}function U(W){W.done?o(W.value):s(W.value).then(m,A)}U((i=i.apply(u,e||[])).next())})};class If{constructor(){this._entries=new ir.qK(50)}get(e){const t=If._key(e);return this._entries.get(t)}set(e,t){const i=If._key(e);this._entries.set(i,t)}static _key(e){return`${e.uri.toString()}/${e.getVersionId()}`}}const z0=(0,P.u1)("IInlayHintsCache");(0,nr.v)(z0,If,!0);class Rp{constructor(e,t){this.item=e,this.index=t}get part(){const e=this.item.hint.label;return typeof e=="string"?{label:e}:e[this.index]}}class VS{constructor(e,t){this.part=e,this.hasTriggerModifier=t}}let jd=class M_{constructor(e,t,i,s,o,c,m){this._editor=e,this._languageFeaturesService=t,this._inlayHintsCache=s,this._commandService=o,this._notificationService=c,this._instaService=m,this._disposables=new at.Cm,this._sessionDisposables=new at.Cm,this._decorationsMetadata=new Map,this._ruleFactory=new Qr.Qn(this._editor),this._activeRenderMode=0,this._debounceInfo=i.for(t.inlayHintsProvider,"InlayHint",{min:25}),this._disposables.add(t.inlayHintsProvider.onDidChange(()=>this._update())),this._disposables.add(e.onDidChangeModel(()=>this._update())),this._disposables.add(e.onDidChangeModelLanguage(()=>this._update())),this._disposables.add(e.onDidChangeConfiguration(A=>{A.hasChanged(129)&&this._update()})),this._update()}static get(e){var t;return(t=e.getContribution(M_.ID))!==null&&t!==void 0?t:void 0}dispose(){this._sessionDisposables.dispose(),this._removeAllDecorations(),this._disposables.dispose()}_update(){this._sessionDisposables.clear(),this._removeAllDecorations();const e=this._editor.getOption(129);if(e.enabled==="off")return;const t=this._editor.getModel();if(!t||!this._languageFeaturesService.inlayHintsProvider.has(t))return;const i=this._inlayHintsCache.get(t);i&&this._updateHintsDecorators([t.getFullModelRange()],i),this._sessionDisposables.add((0,at.s)(()=>{t.isDisposed()||this._cacheHintsForFastRestore(t)}));let s;const o=new Set,c=new Ot.uC(()=>ah(this,void 0,void 0,function*(){const m=Date.now();s?.dispose(!0),s=new Ti.Q;const A=t.onWillDispose(()=>s?.cancel());try{const U=s.token,W=yield Nu.create(this._languageFeaturesService.inlayHintsProvider,t,this._getHintsRanges(),U);if(c.delay=this._debounceInfo.update(t,Date.now()-m),U.isCancellationRequested){W.dispose();return}for(const re of W.provider)typeof re.onDidChangeInlayHints=="function"&&!o.has(re)&&(o.add(re),this._sessionDisposables.add(re.onDidChangeInlayHints(()=>{c.isScheduled()||c.schedule()})));this._sessionDisposables.add(W),this._updateHintsDecorators(W.ranges,W.items),this._cacheHintsForFastRestore(t)}catch(U){(0,Wi.dz)(U)}finally{s.dispose(),A.dispose()}}),this._debounceInfo.get(t));if(this._sessionDisposables.add(c),this._sessionDisposables.add((0,at.s)(()=>s?.dispose(!0))),c.schedule(0),this._sessionDisposables.add(this._editor.onDidScrollChange(m=>{(m.scrollTopChanged||!c.isScheduled())&&c.schedule()})),this._sessionDisposables.add(this._editor.onDidChangeModelContent(m=>{const A=Math.max(c.delay,1250);c.schedule(A)})),e.enabled==="on")this._activeRenderMode=0;else{let m,A;e.enabled==="onUnlessPressed"?(m=0,A=1):(m=1,A=0),this._activeRenderMode=m,this._sessionDisposables.add(M.Di.getInstance().event(U=>{if(!this._editor.hasModel())return;const W=U.altKey&&U.ctrlKey?A:m;if(W!==this._activeRenderMode){this._activeRenderMode=W;const re=this._editor.getModel(),Se=this._copyInlayHintsWithCurrentAnchor(re);this._updateHintsDecorators([re.getFullModelRange()],Se),c.schedule(0)}}))}this._sessionDisposables.add(this._installDblClickGesture(()=>c.schedule(0))),this._sessionDisposables.add(this._installLinkGesture()),this._sessionDisposables.add(this._installContextMenu())}_installLinkGesture(){const e=new at.Cm,t=e.add(new wl(this._editor)),i=new at.Cm;return e.add(i),e.add(t.onMouseMoveOrRelevantKeyDown(s=>{const[o]=s,c=this._getInlayHintLabelPart(o),m=this._editor.getModel();if(!c||!m){i.clear();return}const A=new Ti.Q;i.add((0,at.s)(()=>A.dispose(!0))),c.item.resolve(A.token),this._activeInlayHintPart=c.part.command||c.part.location?new VS(c,o.hasTriggerModifier):void 0;const U=c.item.hint.position.lineNumber,W=new St.Q(U,1,U,m.getLineMaxColumn(U)),re=this._getInlineHintsForRange(W);this._updateHintsDecorators([W],re),i.add((0,at.s)(()=>{this._activeInlayHintPart=void 0,this._updateHintsDecorators([W],re)}))})),e.add(t.onCancel(()=>i.clear())),e.add(t.onExecute(s=>ah(this,void 0,void 0,function*(){const o=this._getInlayHintLabelPart(s);if(o){const c=o.part;c.location?this._instaService.invokeFunction(BS,s,this._editor,c.location):Xe.uB.is(c.command)&&(yield this._invokeCommand(c.command,o.item))}}))),e}_getInlineHintsForRange(e){const t=new Set;for(const i of this._decorationsMetadata.values())e.containsRange(i.item.anchor.range)&&t.add(i.item);return Array.from(t)}_installDblClickGesture(e){return this._editor.onMouseUp(t=>ah(this,void 0,void 0,function*(){if(t.event.detail!==2)return;const i=this._getInlayHintLabelPart(t);if(i&&(t.event.preventDefault(),yield i.item.resolve(Ti.X.None),(0,cn.EI)(i.item.hint.textEdits))){const s=i.item.hint.textEdits.map(o=>Sn.k.replace(St.Q.lift(o.range),o.text));this._editor.executeEdits("inlayHint.default",s),e()}}))}_installContextMenu(){return this._editor.onContextMenu(e=>ah(this,void 0,void 0,function*(){if(!(e.event.target instanceof HTMLElement))return;const t=this._getInlayHintLabelPart(e);t&&(yield this._instaService.invokeFunction(FS,this._editor,e.event.target,t))}))}_getInlayHintLabelPart(e){var t;if(e.target.type!==6)return;const i=(t=e.target.detail.injectedText)===null||t===void 0?void 0:t.options;if(i instanceof sn.Ho&&i?.attachedData instanceof Rp)return i.attachedData}_invokeCommand(e,t){var i;return ah(this,void 0,void 0,function*(){try{yield this._commandService.executeCommand(e.id,...(i=e.arguments)!==null&&i!==void 0?i:[])}catch(s){this._notificationService.notify({severity:Cs.AI.Error,source:t.provider.displayName,message:s})}})}_cacheHintsForFastRestore(e){const t=this._copyInlayHintsWithCurrentAnchor(e);this._inlayHintsCache.set(e,t)}_copyInlayHintsWithCurrentAnchor(e){const t=new Map;for(const[i,s]of this._decorationsMetadata){if(t.has(s.item))continue;const o=e.getDecorationRange(i);if(o){const c=new H0(o,s.item.anchor.direction),m=s.item.with({anchor:c});t.set(s.item,m)}}return Array.from(t.values())}_getHintsRanges(){const t=this._editor.getModel(),i=this._editor.getVisibleRangesPlusViewportAboveBelow(),s=[];for(const o of i.sort(St.Q.compareRangesUsingStarts)){const c=t.validateRange(new St.Q(o.startLineNumber-30,o.startColumn,o.endLineNumber+30,o.endColumn));s.length===0||!St.Q.areIntersectingOrTouching(s[s.length-1],c)?s.push(c):s[s.length-1]=St.Q.plusRange(s[s.length-1],c)}return s}_updateHintsDecorators(e,t){var i,s;const o=[],c=(Qe,tt,vt,Ht,ci)=>{const gi={content:vt,inlineClassNameAffectsLetterSpacing:!0,inlineClassName:tt.className,cursorStops:Ht,attachedData:ci};o.push({item:Qe,classNameRef:tt,decoration:{range:Qe.anchor.range,options:{description:"InlayHint",showIfCollapsed:Qe.anchor.range.isEmpty(),collapseOnReplaceEdit:!Qe.anchor.range.isEmpty(),stickiness:0,[Qe.anchor.direction]:this._activeRenderMode===0?gi:void 0}}})},m=(Qe,tt)=>{const vt=this._ruleFactory.createClassNameRef({width:`${A/3|0}px`,display:"inline-block"});c(Qe,vt,"\u200A",tt?bn.VW.Right:bn.VW.None)},{fontSize:A,fontFamily:U,padding:W,isUniform:re}=this._getLayoutInfo(),Se="--code-editorInlayHintsFontFamily";this._editor.getContainerDomNode().style.setProperty(Se,U);for(const Qe of t){Qe.hint.paddingLeft&&m(Qe,!1);const tt=typeof Qe.hint.label=="string"?[{label:Qe.hint.label}]:Qe.hint.label;for(let vt=0;vt<tt.length;vt++){const Ht=tt[vt],ci=vt===0,gi=vt===tt.length-1,Ui={fontSize:`${A}px`,fontFamily:`var(${Se}), ${ds.jU.fontFamily}`,verticalAlign:re?"baseline":"middle"};(0,cn.EI)(Qe.hint.textEdits)&&(Ui.cursor="default"),this._fillInColors(Ui,Qe.hint),(Ht.command||Ht.location)&&((i=this._activeInlayHintPart)===null||i===void 0?void 0:i.part.item)===Qe&&this._activeInlayHintPart.part.index===vt&&(Ui.textDecoration="underline",this._activeInlayHintPart.hasTriggerModifier&&(Ui.color=(0,Ye.Yf)(Ce.Ztu),Ui.cursor="pointer")),W&&(ci&&gi?(Ui.padding=`1px ${Math.max(1,A/4)|0}px`,Ui.borderRadius=`${A/4|0}px`):ci?(Ui.padding=`1px 0 1px ${Math.max(1,A/4)|0}px`,Ui.borderRadius=`${A/4|0}px 0 0 ${A/4|0}px`):gi?(Ui.padding=`1px ${Math.max(1,A/4)|0}px 1px 0`,Ui.borderRadius=`0 ${A/4|0}px ${A/4|0}px 0`):Ui.padding="1px 0 1px 0"),c(Qe,this._ruleFactory.createClassNameRef(Ui),HS(Ht.label),gi&&!Qe.hint.paddingRight?bn.VW.Right:bn.VW.None,new Rp(Qe,vt))}if(Qe.hint.paddingRight&&m(Qe,!0),o.length>M_._MAX_DECORATORS)break}const Be=[];for(const Qe of e)for(const{id:tt}of(s=this._editor.getDecorationsInRange(Qe))!==null&&s!==void 0?s:[]){const vt=this._decorationsMetadata.get(tt);vt&&(Be.push(tt),vt.classNameRef.dispose(),this._decorationsMetadata.delete(tt))}this._editor.changeDecorations(Qe=>{const tt=Qe.deltaDecorations(Be,o.map(vt=>vt.decoration));for(let vt=0;vt<tt.length;vt++){const Ht=o[vt];this._decorationsMetadata.set(tt[vt],Ht)}})}_fillInColors(e,t){t.kind===Xe.r4.Parameter?(e.backgroundColor=(0,Ye.Yf)(Ce.B2L),e.color=(0,Ye.Yf)(Ce.sjA)):t.kind===Xe.r4.Type?(e.backgroundColor=(0,Ye.Yf)(Ce._pU),e.color=(0,Ye.Yf)(Ce.HwT)):(e.backgroundColor=(0,Ye.Yf)(Ce.WL6),e.color=(0,Ye.Yf)(Ce.P6i))}_getLayoutInfo(){const e=this._editor.getOption(129),t=e.padding,i=this._editor.getOption(48),s=this._editor.getOption(45);let o=e.fontSize;(!o||o<5||o>i)&&(o=i);const c=e.fontFamily||s;return{fontSize:o,fontFamily:c,padding:t,isUniform:!t&&c===s&&o===i}}_removeAllDecorations(){this._editor.removeDecorations(Array.from(this._decorationsMetadata.keys()));for(const e of this._decorationsMetadata.values())e.classNameRef.dispose();this._decorationsMetadata.clear()}};jd.ID="editor.contrib.InlayHints",jd._MAX_DECORATORS=1500,jd=WS([rh(1,Zi.u),rh(2,Lo.U),rh(3,z0),rh(4,fn.wT),rh(5,Cs.Ot),rh(6,P._Y)],jd);function HS(u){const e="\xA0";return u.replace(/[ \t]/g,e)}fn.wb.registerCommand("_executeInlayHintProvider",(u,...e)=>ah(void 0,void 0,void 0,function*(){const[t,i]=e;(0,pi.j)(vn.r.isUri(t)),(0,pi.j)(St.Q.isIRange(i));const{inlayHintsProvider:s}=u.get(Zi.u),o=yield u.get(Hs.b).createModelReference(t);try{const c=yield Nu.create(s,o.object.textEditorModel,[St.Q.lift(i)],Ti.X.None),m=c.items.map(A=>A.hint);return setTimeout(()=>c.dispose(),0),m}finally{o.dispose()}}));var zS=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},Tu=function(u,e){return function(t,i){e(t,i,u)}},U0=function(u,e,t,i){function s(o){return o instanceof t?o:new t(function(c){c(o)})}return new(t||(t=Promise))(function(o,c){function m(W){try{U(i.next(W))}catch(re){c(re)}}function A(W){try{U(i.throw(W))}catch(re){c(re)}}function U(W){W.done?o(W.value):s(W.value).then(m,A)}U((i=i.apply(u,e||[])).next())})},US=function(u){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=u[Symbol.asyncIterator],t;return e?e.call(u):(u=typeof __values=="function"?__values(u):u[Symbol.iterator](),t={},i("next"),i("throw"),i("return"),t[Symbol.asyncIterator]=function(){return this},t);function i(o){t[o]=u[o]&&function(c){return new Promise(function(m,A){c=u[o](c),s(m,A,c.done,c.value)})}}function s(o,c,m,A){Promise.resolve(A).then(function(U){o({value:U,done:m})},c)}};class j0 extends Dr{constructor(e,t){super(10,t,e.item.anchor.range),this.part=e}}let Ap=class extends Ul{constructor(e,t,i,s,o,c){super(e,t,i,s,c),this._resolverService=o,this.hoverOrdinal=6}suggestHoverAnchor(e){var t;if(!jd.get(this._editor)||e.target.type!==6)return null;const s=(t=e.target.detail.injectedText)===null||t===void 0?void 0:t.options;return s instanceof sn.Ho&&s.attachedData instanceof Rp?new j0(s.attachedData,this):null}computeSync(){return[]}computeAsync(e,t,i){return e instanceof j0?new Ot.AE(s=>U0(this,void 0,void 0,function*(){var o,c;const{part:m}=e;if(yield m.item.resolve(i),i.isCancellationRequested)return;let A;typeof m.item.hint.tooltip=="string"?A=new Li.Bc().appendText(m.item.hint.tooltip):m.item.hint.tooltip&&(A=m.item.hint.tooltip),A&&s.emitOne(new kr(this,e.range,[A],0)),(0,cn.EI)(m.item.hint.textEdits)&&s.emitOne(new kr(this,e.range,[new Li.Bc().appendText((0,we.kg)("hint.dbl","Double click to insert"))],10001));let U;if(typeof m.part.tooltip=="string"?U=new Li.Bc().appendText(m.part.tooltip):m.part.tooltip&&(U=m.part.tooltip),U&&s.emitOne(new kr(this,e.range,[U],1)),m.part.location||m.part.command){let Be;const tt=this._editor.getOption(72)==="altKey"?Pi.zx?(0,we.kg)("links.navigate.kb.meta.mac","cmd + click"):(0,we.kg)("links.navigate.kb.meta","ctrl + click"):Pi.zx?(0,we.kg)("links.navigate.kb.alt.mac","option + click"):(0,we.kg)("links.navigate.kb.alt","alt + click");m.part.location&&m.part.command?Be=new Li.Bc().appendText((0,we.kg)("hint.defAndCommand","Go to Definition ({0}), right click for more",tt)):m.part.location?Be=new Li.Bc().appendText((0,we.kg)("hint.def","Go to Definition ({0})",tt)):m.part.command&&(Be=new Li.Bc(`[${(0,we.kg)("hint.cmd","Execute Command")}](${PS(m.part.command)} "${m.part.command.title}") (${tt})`,{isTrusted:!0})),Be&&s.emitOne(new kr(this,e.range,[Be],1e4))}const W=yield this._resolveInlayHintLabelPartHover(m,i);try{for(var re=US(W),Se;Se=yield re.next(),!Se.done;){const Be=Se.value;s.emitOne(Be)}}catch(Be){o={error:Be}}finally{try{Se&&!Se.done&&(c=re.return)&&(yield c.call(re))}finally{if(o)throw o.error}}})):Ot.AE.EMPTY}_resolveInlayHintLabelPartHover(e,t){return U0(this,void 0,void 0,function*(){if(!e.part.location)return Ot.AE.EMPTY;const{uri:i,range:s}=e.part.location,o=yield this._resolverService.createModelReference(i);try{const c=o.object.textEditorModel;return this._languageFeaturesService.hoverProvider.has(c)?tu(this._languageFeaturesService.hoverProvider,c,new bi.y(s.startLineNumber,s.startColumn),t).filter(m=>!(0,Li.it)(m.hover.contents)).map(m=>new kr(this,e.item.anchor.range,m.hover.contents,2+m.ordinal)):Ot.AE.EMPTY}finally{o.dispose()}})}};Ap=zS([Tu(1,Fs.L),Tu(2,Ho.Cr),Tu(3,de.pG),Tu(4,Hs.b),Tu(5,Zi.u)],Ap),(0,Te.HW)(jd.ID,jd),Bs.register(Ap);class jS{constructor(e,t,i){this._editRange=e,this._originalSelection=t,this._text=i}getEditOperations(e,t){t.addTrackedEditOperation(this._editRange,this._text)}computeCursorState(e,t){const s=t.getInverseEditOperations()[0].range;return this._originalSelection.isEmpty()?new ki.L(s.endLineNumber,Math.min(this._originalSelection.positionColumn,s.endColumn),s.endLineNumber,Math.min(this._originalSelection.positionColumn,s.endColumn)):new ki.L(s.endLineNumber,s.endColumn-this._text.length,s.endLineNumber,s.endColumn)}}var KS=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},$S=function(u,e){return function(t,i){e(t,i,u)}};let Jl=class T_{constructor(e,t){this.editor=e,this.editorWorkerService=t,this.decorations=this.editor.createDecorationsCollection()}static get(e){return e.getContribution(T_.ID)}dispose(){}run(e,t){this.currentRequest&&this.currentRequest.cancel();const i=this.editor.getSelection(),s=this.editor.getModel();if(!s||!i)return;let o=i;if(o.startLineNumber!==o.endLineNumber)return;const c=new Gn.$t(this.editor,5),m=s.uri;return this.editorWorkerService.canNavigateValueSet(m)?(this.currentRequest=(0,Ot.SS)(A=>this.editorWorkerService.navigateValueSet(m,o,t)),this.currentRequest.then(A=>{if(!A||!A.range||!A.value||!c.validate(this.editor))return;const U=St.Q.lift(A.range);let W=A.range;const re=A.value.length-(o.endColumn-o.startColumn);W={startLineNumber:W.startLineNumber,startColumn:W.startColumn,endLineNumber:W.endLineNumber,endColumn:W.startColumn+A.value.length},re>1&&(o=new ki.L(o.startLineNumber,o.startColumn,o.endLineNumber,o.endColumn+re-1));const Se=new jS(U,o,A.value);this.editor.pushUndoStop(),this.editor.executeCommand(e,Se),this.editor.pushUndoStop(),this.decorations.set([{range:W,options:T_.DECORATION}]),this.decorationRemover&&this.decorationRemover.cancel(),this.decorationRemover=(0,Ot.wR)(350),this.decorationRemover.then(()=>this.decorations.clear()).catch(Wi.dz)}).catch(Wi.dz)):Promise.resolve(void 0)}};Jl.ID="editor.contrib.inPlaceReplaceController",Jl.DECORATION=sn.kI.register({description:"in-place-replace",className:"valueSetReplacement"}),Jl=KS([$S(1,_u.w)],Jl);class GS extends Te.ks{constructor(){super({id:"editor.action.inPlaceReplace.up",label:we.kg("InPlaceReplaceAction.previous.label","Replace with Previous Value"),alias:"Replace with Previous Value",precondition:ze.R.writable,kbOpts:{kbExpr:ze.R.editorTextFocus,primary:3154,weight:100}})}run(e,t){const i=Jl.get(t);return i?i.run(this.id,!0):Promise.resolve(void 0)}}class QS extends Te.ks{constructor(){super({id:"editor.action.inPlaceReplace.down",label:we.kg("InPlaceReplaceAction.next.label","Replace with Next Value"),alias:"Replace with Next Value",precondition:ze.R.writable,kbOpts:{kbExpr:ze.R.editorTextFocus,primary:3156,weight:100}})}run(e,t){const i=Jl.get(t);return i?i.run(this.id,!1):Promise.resolve(void 0)}}(0,Te.HW)(Jl.ID,Jl),(0,Te.Fl)(GS),(0,Te.Fl)(QS),(0,Ye.zy)((u,e)=>{const t=u.getColor(ni.$u);t&&e.addRule(`.monaco-editor.vs .valueSetReplacement { outline: solid 2px ${t}; }`)});var Op=f(27064);class ZS extends Te.ks{constructor(){super({id:"expandLineSelection",label:we.kg("expandLineSelection","Expand Line Selection"),alias:"Expand Line Selection",precondition:void 0,kbOpts:{weight:0,kbExpr:ze.R.textInputFocus,primary:2090}})}run(e,t,i){if(i=i||{},!t.hasModel())return;const s=t._getViewModel();s.model.pushStackElement(),s.setCursorStates(i.source,3,Op.c.expandLineSelection(s,s.getCursorStates())),s.revealPrimaryCursor(i.source,!0)}}(0,Te.Fl)(ZS);class YS{constructor(e,t){this._selection=e,this._cursors=t,this._selectionId=null}getEditOperations(e,t){const i=XS(e,this._cursors);for(let s=0,o=i.length;s<o;s++){const c=i[s];t.addEditOperation(c.range,c.text)}this._selectionId=t.trackSelection(this._selection)}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}function XS(u,e){e.sort((c,m)=>c.lineNumber===m.lineNumber?c.column-m.column:c.lineNumber-m.lineNumber);for(let c=e.length-2;c>=0;c--)e[c].lineNumber===e[c+1].lineNumber&&e.splice(c,1);const t=[];let i=0,s=0;const o=e.length;for(let c=1,m=u.getLineCount();c<=m;c++){const A=u.getLineContent(c),U=A.length+1;let W=0;if(s<o&&e[s].lineNumber===c&&(W=e[s].column,s++,W===U)||A.length===0)continue;const re=xi.lT(A);let Se=0;if(re===-1)Se=1;else if(re!==A.length-1)Se=re+2;else continue;Se=Math.max(W,Se),t[i++]=Sn.k.delete(new St.Q(c,Se,c,U))}return t}var Pp=f(61710);class K0{constructor(e,t,i){this._selection=e,this._isCopyingDown=t,this._noop=i||!1,this._selectionDirection=0,this._selectionId=null,this._startLineNumberDelta=0,this._endLineNumberDelta=0}getEditOperations(e,t){let i=this._selection;this._startLineNumberDelta=0,this._endLineNumberDelta=0,i.startLineNumber<i.endLineNumber&&i.endColumn===1&&(this._endLineNumberDelta=1,i=i.setEndPosition(i.endLineNumber-1,e.getLineMaxColumn(i.endLineNumber-1)));const s=[];for(let c=i.startLineNumber;c<=i.endLineNumber;c++)s.push(e.getLineContent(c));const o=s.join(` `);o===""&&this._isCopyingDown&&(this._startLineNumberDelta++,this._endLineNumberDelta++),this._noop?t.addEditOperation(new St.Q(i.endLineNumber,e.getLineMaxColumn(i.endLineNumber),i.endLineNumber+1,1),i.endLineNumber===e.getLineCount()?"":` `):this._isCopyingDown?t.addEditOperation(new St.Q(i.startLineNumber,1,i.startLineNumber,1),o+` `):t.addEditOperation(new St.Q(i.endLineNumber,e.getLineMaxColumn(i.endLineNumber),i.endLineNumber,e.getLineMaxColumn(i.endLineNumber)),` `+o),this._selectionId=t.trackSelection(i),this._selectionDirection=this._selection.getDirection()}computeCursorState(e,t){let i=t.getTrackedSelection(this._selectionId);if(this._startLineNumberDelta!==0||this._endLineNumberDelta!==0){let s=i.startLineNumber,o=i.startColumn,c=i.endLineNumber,m=i.endColumn;this._startLineNumberDelta!==0&&(s=s+this._startLineNumberDelta,o=1),this._endLineNumberDelta!==0&&(c=c+this._endLineNumberDelta,m=1),i=ki.L.createWithDirection(s,o,c,m,this._selectionDirection)}return i}}var Nf=f(49550),Fp=f(80794),JS=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},qS=function(u,e){return function(t,i){e(t,i,u)}};let Bp=class{constructor(e,t,i,s){this._languageConfigurationService=s,this._selection=e,this._isMovingDown=t,this._autoIndent=i,this._selectionId=null,this._moveEndLineSelectionShrink=!1}getEditOperations(e,t){const i=e.getLineCount();if(this._isMovingDown&&this._selection.endLineNumber===i){this._selectionId=t.trackSelection(this._selection);return}if(!this._isMovingDown&&this._selection.startLineNumber===1){this._selectionId=t.trackSelection(this._selection);return}this._moveEndPositionDown=!1;let s=this._selection;s.startLineNumber<s.endLineNumber&&s.endColumn===1&&(this._moveEndPositionDown=!0,s=s.setEndPosition(s.endLineNumber-1,e.getLineMaxColumn(s.endLineNumber-1)));const{tabSize:o,indentSize:c,insertSpaces:m}=e.getOptions(),A=this.buildIndentConverter(o,c,m),U={tokenization:{getLineTokens:W=>e.tokenization.getLineTokens(W),getLanguageId:()=>e.getLanguageId(),getLanguageIdAtPosition:(W,re)=>e.getLanguageIdAtPosition(W,re)},getLineContent:null};if(s.startLineNumber===s.endLineNumber&&e.getLineMaxColumn(s.startLineNumber)===1){const W=s.startLineNumber,re=this._isMovingDown?W+1:W-1;e.getLineMaxColumn(re)===1?t.addEditOperation(new St.Q(1,1,1,1),null):(t.addEditOperation(new St.Q(W,1,W,1),e.getLineContent(re)),t.addEditOperation(new St.Q(re,1,re,e.getLineMaxColumn(re)),null)),s=new ki.L(re,1,re,1)}else{let W,re;if(this._isMovingDown){W=s.endLineNumber+1,re=e.getLineContent(W),t.addEditOperation(new St.Q(W-1,e.getLineMaxColumn(W-1),W,e.getLineMaxColumn(W)),null);let Se=re;if(this.shouldAutoIndent(e,s)){const Be=this.matchEnterRule(e,A,o,W,s.startLineNumber-1);if(Be!==null){const tt=xi.UU(e.getLineContent(W)),vt=Be+qo(tt,o);Se=xu(vt,o,m)+this.trimLeft(re)}else{U.getLineContent=vt=>vt===s.startLineNumber?e.getLineContent(W):e.getLineContent(vt);const tt=(0,Ud.$f)(this._autoIndent,U,e.getLanguageIdAtPosition(W,1),s.startLineNumber,A,this._languageConfigurationService);if(tt!==null){const vt=xi.UU(e.getLineContent(W)),Ht=qo(tt,o),ci=qo(vt,o);Ht!==ci&&(Se=xu(Ht,o,m)+this.trimLeft(re))}}t.addEditOperation(new St.Q(s.startLineNumber,1,s.startLineNumber,1),Se+` `);const Qe=this.matchEnterRuleMovingDown(e,A,o,s.startLineNumber,W,Se);if(Qe!==null)Qe!==0&&this.getIndentEditsOfMovingBlock(e,t,s,o,m,Qe);else{U.getLineContent=vt=>vt===s.startLineNumber?Se:vt>=s.startLineNumber+1&&vt<=s.endLineNumber+1?e.getLineContent(vt-1):e.getLineContent(vt);const tt=(0,Ud.$f)(this._autoIndent,U,e.getLanguageIdAtPosition(W,1),s.startLineNumber+1,A,this._languageConfigurationService);if(tt!==null){const vt=xi.UU(e.getLineContent(s.startLineNumber)),Ht=qo(tt,o),ci=qo(vt,o);if(Ht!==ci){const gi=Ht-ci;this.getIndentEditsOfMovingBlock(e,t,s,o,m,gi)}}}}else t.addEditOperation(new St.Q(s.startLineNumber,1,s.startLineNumber,1),Se+` `)}else if(W=s.startLineNumber-1,re=e.getLineContent(W),t.addEditOperation(new St.Q(W,1,W+1,1),null),t.addEditOperation(new St.Q(s.endLineNumber,e.getLineMaxColumn(s.endLineNumber),s.endLineNumber,e.getLineMaxColumn(s.endLineNumber)),` `+re),this.shouldAutoIndent(e,s)){U.getLineContent=Be=>Be===W?e.getLineContent(s.startLineNumber):e.getLineContent(Be);const Se=this.matchEnterRule(e,A,o,s.startLineNumber,s.startLineNumber-2);if(Se!==null)Se!==0&&this.getIndentEditsOfMovingBlock(e,t,s,o,m,Se);else{const Be=(0,Ud.$f)(this._autoIndent,U,e.getLanguageIdAtPosition(s.startLineNumber,1),W,A,this._languageConfigurationService);if(Be!==null){const Qe=xi.UU(e.getLineContent(s.startLineNumber)),tt=qo(Be,o),vt=qo(Qe,o);if(tt!==vt){const Ht=tt-vt;this.getIndentEditsOfMovingBlock(e,t,s,o,m,Ht)}}}}}this._selectionId=t.trackSelection(s)}buildIndentConverter(e,t,i){return{shiftIndent:s=>oh.Y.shiftIndent(s,s.length+1,e,t,i),unshiftIndent:s=>oh.Y.unshiftIndent(s,s.length+1,e,t,i)}}parseEnterResult(e,t,i,s,o){if(o){let c=o.indentation;o.indentAction===Nf.l.None||o.indentAction===Nf.l.Indent?c=o.indentation+o.appendText:o.indentAction===Nf.l.IndentOutdent?c=o.indentation:o.indentAction===Nf.l.Outdent&&(c=t.unshiftIndent(o.indentation)+o.appendText);const m=e.getLineContent(s);if(this.trimLeft(m).indexOf(this.trimLeft(c))>=0){const A=xi.UU(e.getLineContent(s));let U=xi.UU(c);const W=(0,Ud.Yb)(e,s,this._languageConfigurationService);W!==null&&W&2&&(U=t.unshiftIndent(U));const re=qo(U,i),Se=qo(A,i);return re-Se}}return null}matchEnterRuleMovingDown(e,t,i,s,o,c){if(xi.lT(c)>=0){const m=e.getLineMaxColumn(o),A=(0,Fp.h)(this._autoIndent,e,new St.Q(o,m,o,m),this._languageConfigurationService);return this.parseEnterResult(e,t,i,s,A)}else{let m=s-1;for(;m>=1;){const W=e.getLineContent(m);if(xi.lT(W)>=0)break;m--}if(m<1||s>e.getLineCount())return null;const A=e.getLineMaxColumn(m),U=(0,Fp.h)(this._autoIndent,e,new St.Q(m,A,m,A),this._languageConfigurationService);return this.parseEnterResult(e,t,i,s,U)}}matchEnterRule(e,t,i,s,o,c){let m=o;for(;m>=1;){let W;if(m===o&&c!==void 0?W=c:W=e.getLineContent(m),xi.lT(W)>=0)break;m--}if(m<1||s>e.getLineCount())return null;const A=e.getLineMaxColumn(m),U=(0,Fp.h)(this._autoIndent,e,new St.Q(m,A,m,A),this._languageConfigurationService);return this.parseEnterResult(e,t,i,s,U)}trimLeft(e){return e.replace(/^\s+/,"")}shouldAutoIndent(e,t){if(this._autoIndent<4||!e.tokenization.isCheapToTokenize(t.startLineNumber))return!1;const i=e.getLanguageIdAtPosition(t.startLineNumber,1),s=e.getLanguageIdAtPosition(t.endLineNumber,1);return!(i!==s||this._languageConfigurationService.getLanguageConfiguration(i).indentRulesSupport===null)}getIndentEditsOfMovingBlock(e,t,i,s,o,c){for(let m=i.startLineNumber;m<=i.endLineNumber;m++){const A=e.getLineContent(m),U=xi.UU(A),re=qo(U,s)+c,Se=xu(re,s,o);Se!==U&&(t.addEditOperation(new St.Q(m,1,m,U.length+1),Se),m===i.endLineNumber&&i.endColumn<=U.length+1&&Se===""&&(this._moveEndLineSelectionShrink=!0))}}computeCursorState(e,t){let i=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(i=i.setEndPosition(i.endLineNumber+1,1)),this._moveEndLineSelectionShrink&&i.startLineNumber<i.endLineNumber&&(i=i.setEndPosition(i.endLineNumber,2)),i}};Bp=JS([qS(3,ao.JZ)],Bp);class ql{constructor(e,t){this.selection=e,this.descending=t,this.selectionId=null}static getCollator(){return ql._COLLATOR||(ql._COLLATOR=new Intl.Collator),ql._COLLATOR}getEditOperations(e,t){const i=ey(e,this.selection,this.descending);i&&t.addEditOperation(i.range,i.text),this.selectionId=t.trackSelection(this.selection)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}static canRun(e,t,i){if(e===null)return!1;const s=$0(e,t,i);if(!s)return!1;for(let o=0,c=s.before.length;o<c;o++)if(s.before[o]!==s.after[o])return!0;return!1}}ql._COLLATOR=null;function $0(u,e,t){const i=e.startLineNumber;let s=e.endLineNumber;if(e.endColumn===1&&s--,i>=s)return null;const o=[];for(let m=i;m<=s;m++)o.push(u.getLineContent(m));let c=o.slice(0);return c.sort(ql.getCollator().compare),t===!0&&(c=c.reverse()),{startLineNumber:i,endLineNumber:s,before:o,after:c}}function ey(u,e,t){const i=$0(u,e,t);return i?Sn.k.replace(new St.Q(i.startLineNumber,1,i.endLineNumber,u.getLineMaxColumn(i.endLineNumber)),i.after.join(` `)):null}class G0 extends Te.ks{constructor(e,t){super(t),this.down=e}run(e,t){if(!t.hasModel())return;const i=t.getSelections().map((c,m)=>({selection:c,index:m,ignore:!1}));i.sort((c,m)=>St.Q.compareRangesUsingStarts(c.selection,m.selection));let s=i[0];for(let c=1;c<i.length;c++){const m=i[c];s.selection.endLineNumber===m.selection.startLineNumber&&(s.index<m.index?m.ignore=!0:(s.ignore=!0,s=m))}const o=[];for(const c of i)o.push(new K0(c.selection,this.down,c.ignore));t.pushUndoStop(),t.executeCommands(this.id,o),t.pushUndoStop()}}class ty extends G0{constructor(){super(!1,{id:"editor.action.copyLinesUpAction",label:we.kg("lines.copyUp","Copy Line Up"),alias:"Copy Line Up",precondition:ze.R.writable,kbOpts:{kbExpr:ze.R.editorTextFocus,primary:1552,linux:{primary:3600},weight:100},menuOpts:{menuId:xe.D8.MenubarSelectionMenu,group:"2_line",title:we.kg({key:"miCopyLinesUp",comment:["&& denotes a mnemonic"]},"&&Copy Line Up"),order:1}})}}class iy extends G0{constructor(){super(!0,{id:"editor.action.copyLinesDownAction",label:we.kg("lines.copyDown","Copy Line Down"),alias:"Copy Line Down",precondition:ze.R.writable,kbOpts:{kbExpr:ze.R.editorTextFocus,primary:1554,linux:{primary:3602},weight:100},menuOpts:{menuId:xe.D8.MenubarSelectionMenu,group:"2_line",title:we.kg({key:"miCopyLinesDown",comment:["&& denotes a mnemonic"]},"Co&&py Line Down"),order:2}})}}class ny extends Te.ks{constructor(){super({id:"editor.action.duplicateSelection",label:we.kg("duplicateSelection","Duplicate Selection"),alias:"Duplicate Selection",precondition:ze.R.writable,menuOpts:{menuId:xe.D8.MenubarSelectionMenu,group:"2_line",title:we.kg({key:"miDuplicateSelection",comment:["&& denotes a mnemonic"]},"&&Duplicate Selection"),order:5}})}run(e,t,i){if(!t.hasModel())return;const s=[],o=t.getSelections(),c=t.getModel();for(const m of o)if(m.isEmpty())s.push(new K0(m,!0));else{const A=new ki.L(m.endLineNumber,m.endColumn,m.endLineNumber,m.endColumn);s.push(new wi.tA(A,c.getValueInRange(m)))}t.pushUndoStop(),t.executeCommands(this.id,s),t.pushUndoStop()}}class Q0 extends Te.ks{constructor(e,t){super(t),this.down=e}run(e,t){const i=e.get(ao.JZ),s=[],o=t.getSelections()||[],c=t.getOption(9);for(const m of o)s.push(new Bp(m,this.down,c,i));t.pushUndoStop(),t.executeCommands(this.id,s),t.pushUndoStop()}}class sy extends Q0{constructor(){super(!1,{id:"editor.action.moveLinesUpAction",label:we.kg("lines.moveUp","Move Line Up"),alias:"Move Line Up",precondition:ze.R.writable,kbOpts:{kbExpr:ze.R.editorTextFocus,primary:528,linux:{primary:528},weight:100},menuOpts:{menuId:xe.D8.MenubarSelectionMenu,group:"2_line",title:we.kg({key:"miMoveLinesUp",comment:["&& denotes a mnemonic"]},"Mo&&ve Line Up"),order:3}})}}class oy extends Q0{constructor(){super(!0,{id:"editor.action.moveLinesDownAction",label:we.kg("lines.moveDown","Move Line Down"),alias:"Move Line Down",precondition:ze.R.writable,kbOpts:{kbExpr:ze.R.editorTextFocus,primary:530,linux:{primary:530},weight:100},menuOpts:{menuId:xe.D8.MenubarSelectionMenu,group:"2_line",title:we.kg({key:"miMoveLinesDown",comment:["&& denotes a mnemonic"]},"Move &&Line Down"),order:4}})}}class Z0 extends Te.ks{constructor(e,t){super(t),this.descending=e}run(e,t){const i=t.getSelections()||[];for(const o of i)if(!ql.canRun(t.getModel(),o,this.descending))return;const s=[];for(let o=0,c=i.length;o<c;o++)s[o]=new ql(i[o],this.descending);t.pushUndoStop(),t.executeCommands(this.id,s),t.pushUndoStop()}}class ry extends Z0{constructor(){super(!1,{id:"editor.action.sortLinesAscending",label:we.kg("lines.sortAscending","Sort Lines Ascending"),alias:"Sort Lines Ascending",precondition:ze.R.writable})}}class ay extends Z0{constructor(){super(!0,{id:"editor.action.sortLinesDescending",label:we.kg("lines.sortDescending","Sort Lines Descending"),alias:"Sort Lines Descending",precondition:ze.R.writable})}}class ly extends Te.ks{constructor(){super({id:"editor.action.removeDuplicateLines",label:we.kg("lines.deleteDuplicates","Delete Duplicate Lines"),alias:"Delete Duplicate Lines",precondition:ze.R.writable})}run(e,t){if(!t.hasModel())return;const i=t.getModel();if(i.getLineCount()===1&&i.getLineMaxColumn(1)===1)return;const s=[],o=[];let c=0;for(const m of t.getSelections()){const A=new Set,U=[];for(let Be=m.startLineNumber;Be<=m.endLineNumber;Be++){const Qe=i.getLineContent(Be);A.has(Qe)||(U.push(Qe),A.add(Qe))}const W=new ki.L(m.startLineNumber,1,m.endLineNumber,i.getLineMaxColumn(m.endLineNumber)),re=m.startLineNumber-c,Se=new ki.L(re,1,re+U.length-1,U[U.length-1].length);s.push(Sn.k.replace(W,U.join(` `))),o.push(Se),c+=m.endLineNumber-m.startLineNumber+1-U.length}t.pushUndoStop(),t.executeEdits(this.id,s,o),t.pushUndoStop()}}class Mf extends Te.ks{constructor(){super({id:Mf.ID,label:we.kg("lines.trimTrailingWhitespace","Trim Trailing Whitespace"),alias:"Trim Trailing Whitespace",precondition:ze.R.writable,kbOpts:{kbExpr:ze.R.editorTextFocus,primary:(0,zi.m5)(2089,2102),weight:100}})}run(e,t,i){let s=[];i.reason==="auto-save"&&(s=(t.getSelections()||[]).map(m=>new bi.y(m.positionLineNumber,m.positionColumn)));const o=t.getSelection();if(o===null)return;const c=new YS(o,s);t.pushUndoStop(),t.executeCommands(this.id,[c]),t.pushUndoStop()}}Mf.ID="editor.action.trimTrailingWhitespace";class dy extends Te.ks{constructor(){super({id:"editor.action.deleteLines",label:we.kg("lines.delete","Delete Line"),alias:"Delete Line",precondition:ze.R.writable,kbOpts:{kbExpr:ze.R.textInputFocus,primary:3113,weight:100}})}run(e,t){if(!t.hasModel())return;const i=this._getLinesToRemove(t),s=t.getModel();if(s.getLineCount()===1&&s.getLineMaxColumn(1)===1)return;let o=0;const c=[],m=[];for(let A=0,U=i.length;A<U;A++){const W=i[A];let re=W.startLineNumber,Se=W.endLineNumber,Be=1,Qe=s.getLineMaxColumn(Se);Se<s.getLineCount()?(Se+=1,Qe=1):re>1&&(re-=1,Be=s.getLineMaxColumn(re)),c.push(Sn.k.replace(new ki.L(re,Be,Se,Qe),"")),m.push(new ki.L(re-o,W.positionColumn,re-o,W.positionColumn)),o+=W.endLineNumber-W.startLineNumber+1}t.pushUndoStop(),t.executeEdits(this.id,c,m),t.pushUndoStop()}_getLinesToRemove(e){const t=e.getSelections().map(o=>{let c=o.endLineNumber;return o.startLineNumber<o.endLineNumber&&o.endColumn===1&&(c-=1),{startLineNumber:o.startLineNumber,selectionStartColumn:o.selectionStartColumn,endLineNumber:c,positionColumn:o.positionColumn}});t.sort((o,c)=>o.startLineNumber===c.startLineNumber?o.endLineNumber-c.endLineNumber:o.startLineNumber-c.startLineNumber);const i=[];let s=t[0];for(let o=1;o<t.length;o++)s.endLineNumber+1>=t[o].startLineNumber?s.endLineNumber=t[o].endLineNumber:(i.push(s),s=t[o]);return i.push(s),i}}class cy extends Te.ks{constructor(){super({id:"editor.action.indentLines",label:we.kg("lines.indent","Indent Line"),alias:"Indent Line",precondition:ze.R.writable,kbOpts:{kbExpr:ze.R.editorTextFocus,primary:2137,weight:100}})}run(e,t){const i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,Pp.TK.indent(i.cursorConfig,t.getModel(),t.getSelections())),t.pushUndoStop())}}class hy extends Te.ks{constructor(){super({id:"editor.action.outdentLines",label:we.kg("lines.outdent","Outdent Line"),alias:"Outdent Line",precondition:ze.R.writable,kbOpts:{kbExpr:ze.R.editorTextFocus,primary:2135,weight:100}})}run(e,t){Ze.Yh.Outdent.runEditorCommand(e,t,null)}}class uy extends Te.ks{constructor(){super({id:"editor.action.insertLineBefore",label:we.kg("lines.insertBefore","Insert Line Above"),alias:"Insert Line Above",precondition:ze.R.writable,kbOpts:{kbExpr:ze.R.editorTextFocus,primary:3075,weight:100}})}run(e,t){const i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,Pp.TK.lineInsertBefore(i.cursorConfig,t.getModel(),t.getSelections())))}}class gy extends Te.ks{constructor(){super({id:"editor.action.insertLineAfter",label:we.kg("lines.insertAfter","Insert Line Below"),alias:"Insert Line Below",precondition:ze.R.writable,kbOpts:{kbExpr:ze.R.editorTextFocus,primary:2051,weight:100}})}run(e,t){const i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,Pp.TK.lineInsertAfter(i.cursorConfig,t.getModel(),t.getSelections())))}}class Y0 extends Te.ks{run(e,t){if(!t.hasModel())return;const i=t.getSelection(),s=this._getRangesToDelete(t),o=[];for(let A=0,U=s.length-1;A<U;A++){const W=s[A],re=s[A+1];St.Q.intersectRanges(W,re)===null?o.push(W):s[A+1]=St.Q.plusRange(W,re)}o.push(s[s.length-1]);const c=this._getEndCursorState(i,o),m=o.map(A=>Sn.k.replace(A,""));t.pushUndoStop(),t.executeEdits(this.id,m,c),t.pushUndoStop()}}class fy extends Y0{constructor(){super({id:"deleteAllLeft",label:we.kg("lines.deleteAllLeft","Delete All Left"),alias:"Delete All Left",precondition:ze.R.writable,kbOpts:{kbExpr:ze.R.textInputFocus,primary:0,mac:{primary:2049},weight:100}})}_getEndCursorState(e,t){let i=null;const s=[];let o=0;return t.forEach(c=>{let m;if(c.endColumn===1&&o>0){const A=c.startLineNumber-o;m=new ki.L(A,c.startColumn,A,c.startColumn)}else m=new ki.L(c.startLineNumber,c.startColumn,c.startLineNumber,c.startColumn);o+=c.endLineNumber-c.startLineNumber,c.intersectRanges(e)?i=m:s.push(m)}),i&&s.unshift(i),s}_getRangesToDelete(e){const t=e.getSelections();if(t===null)return[];let i=t;const s=e.getModel();return s===null?[]:(i.sort(St.Q.compareRangesUsingStarts),i=i.map(o=>{if(o.isEmpty())if(o.startColumn===1){const c=Math.max(1,o.startLineNumber-1),m=o.startLineNumber===1?1:s.getLineContent(c).length+1;return new St.Q(c,m,o.startLineNumber,1)}else return new St.Q(o.startLineNumber,1,o.startLineNumber,o.startColumn);else return new St.Q(o.startLineNumber,1,o.endLineNumber,o.endColumn)}),i)}}class my extends Y0{constructor(){super({id:"deleteAllRight",label:we.kg("lines.deleteAllRight","Delete All Right"),alias:"Delete All Right",precondition:ze.R.writable,kbOpts:{kbExpr:ze.R.textInputFocus,primary:0,mac:{primary:297,secondary:[2068]},weight:100}})}_getEndCursorState(e,t){let i=null;const s=[];for(let o=0,c=t.length,m=0;o<c;o++){const A=t[o],U=new ki.L(A.startLineNumber-m,A.startColumn,A.startLineNumber-m,A.startColumn);A.intersectRanges(e)?i=U:s.push(U)}return i&&s.unshift(i),s}_getRangesToDelete(e){const t=e.getModel();if(t===null)return[];const i=e.getSelections();if(i===null)return[];const s=i.map(o=>{if(o.isEmpty()){const c=t.getLineMaxColumn(o.startLineNumber);return o.startColumn===c?new St.Q(o.startLineNumber,o.startColumn,o.startLineNumber+1,1):new St.Q(o.startLineNumber,o.startColumn,o.startLineNumber,c)}return o});return s.sort(St.Q.compareRangesUsingStarts),s}}class py extends Te.ks{constructor(){super({id:"editor.action.joinLines",label:we.kg("lines.joinLines","Join Lines"),alias:"Join Lines",precondition:ze.R.writable,kbOpts:{kbExpr:ze.R.editorTextFocus,primary:0,mac:{primary:296},weight:100}})}run(e,t){const i=t.getSelections();if(i===null)return;let s=t.getSelection();if(s===null)return;i.sort(St.Q.compareRangesUsingStarts);const o=[],c=i.reduce((Se,Be)=>Se.isEmpty()?Se.endLineNumber===Be.startLineNumber?(s.equalsSelection(Se)&&(s=Be),Be):Be.startLineNumber>Se.endLineNumber+1?(o.push(Se),Be):new ki.L(Se.startLineNumber,Se.startColumn,Be.endLineNumber,Be.endColumn):Be.startLineNumber>Se.endLineNumber?(o.push(Se),Be):new ki.L(Se.startLineNumber,Se.startColumn,Be.endLineNumber,Be.endColumn));o.push(c);const m=t.getModel();if(m===null)return;const A=[],U=[];let W=s,re=0;for(let Se=0,Be=o.length;Se<Be;Se++){const Qe=o[Se],tt=Qe.startLineNumber,vt=1;let Ht=0,ci,gi;const Ui=m.getLineContent(Qe.endLineNumber).length-Qe.endColumn;if(Qe.isEmpty()||Qe.startLineNumber===Qe.endLineNumber){const An=Qe.getStartPosition();An.lineNumber<m.getLineCount()?(ci=tt+1,gi=m.getLineMaxColumn(ci)):(ci=An.lineNumber,gi=m.getLineMaxColumn(An.lineNumber))}else ci=Qe.endLineNumber,gi=m.getLineMaxColumn(ci);let dn=m.getLineContent(tt);for(let An=tt+1;An<=ci;An++){const vo=m.getLineContent(An),Po=m.getLineFirstNonWhitespaceColumn(An);if(Po>=1){let Uo=!0;dn===""&&(Uo=!1),Uo&&(dn.charAt(dn.length-1)===" "||dn.charAt(dn.length-1)===" ")&&(Uo=!1,dn=dn.replace(/[\s\uFEFF\xA0]+$/g," "));const Ea=vo.substr(Po-1);dn+=(Uo?" ":"")+Ea,Uo?Ht=Ea.length+1:Ht=Ea.length}else Ht=0}const hs=new St.Q(tt,vt,ci,gi);if(!hs.isEmpty()){let An;Qe.isEmpty()?(A.push(Sn.k.replace(hs,dn)),An=new ki.L(hs.startLineNumber-re,dn.length-Ht+1,tt-re,dn.length-Ht+1)):Qe.startLineNumber===Qe.endLineNumber?(A.push(Sn.k.replace(hs,dn)),An=new ki.L(Qe.startLineNumber-re,Qe.startColumn,Qe.endLineNumber-re,Qe.endColumn)):(A.push(Sn.k.replace(hs,dn)),An=new ki.L(Qe.startLineNumber-re,Qe.startColumn,Qe.startLineNumber-re,dn.length-Ui)),St.Q.intersectRanges(hs,s)!==null?W=An:U.push(An)}re+=hs.endLineNumber-hs.startLineNumber}U.unshift(W),t.pushUndoStop(),t.executeEdits(this.id,A,U),t.pushUndoStop()}}class _y extends Te.ks{constructor(){super({id:"editor.action.transpose",label:we.kg("editor.transpose","Transpose characters around the cursor"),alias:"Transpose characters around the cursor",precondition:ze.R.writable})}run(e,t){const i=t.getSelections();if(i===null)return;const s=t.getModel();if(s===null)return;const o=[];for(let c=0,m=i.length;c<m;c++){const A=i[c];if(!A.isEmpty())continue;const U=A.getStartPosition(),W=s.getLineMaxColumn(U.lineNumber);if(U.column>=W){if(U.lineNumber===s.getLineCount())continue;const re=new St.Q(U.lineNumber,Math.max(1,U.column-1),U.lineNumber+1,1),Se=s.getValueInRange(re).split("").reverse().join("");o.push(new wi.iu(new ki.L(U.lineNumber,Math.max(1,U.column-1),U.lineNumber+1,1),Se))}else{const re=new St.Q(U.lineNumber,Math.max(1,U.column-1),U.lineNumber,U.column+1),Se=s.getValueInRange(re).split("").reverse().join("");o.push(new wi.ui(re,Se,new ki.L(U.lineNumber,U.column+1,U.lineNumber,U.column+1)))}}t.pushUndoStop(),t.executeCommands(this.id,o),t.pushUndoStop()}}class Ru extends Te.ks{run(e,t){const i=t.getSelections();if(i===null)return;const s=t.getModel();if(s===null)return;const o=t.getOption(119),c=[];for(const m of i)if(m.isEmpty()){const A=m.getStartPosition(),U=t.getConfiguredWordAtPosition(A);if(!U)continue;const W=new St.Q(A.lineNumber,U.startColumn,A.lineNumber,U.endColumn),re=s.getValueInRange(W);c.push(Sn.k.replace(W,this._modifyText(re,o)))}else{const A=s.getValueInRange(m);c.push(Sn.k.replace(m,this._modifyText(A,o)))}t.pushUndoStop(),t.executeEdits(this.id,c),t.pushUndoStop()}}class vy extends Ru{constructor(){super({id:"editor.action.transformToUppercase",label:we.kg("editor.transformToUppercase","Transform to Uppercase"),alias:"Transform to Uppercase",precondition:ze.R.writable})}_modifyText(e,t){return e.toLocaleUpperCase()}}class Cy extends Ru{constructor(){super({id:"editor.action.transformToLowercase",label:we.kg("editor.transformToLowercase","Transform to Lowercase"),alias:"Transform to Lowercase",precondition:ze.R.writable})}_modifyText(e,t){return e.toLocaleLowerCase()}}class lh{constructor(e,t){this._pattern=e,this._flags=t,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}}class Au extends Ru{constructor(){super({id:"editor.action.transformToTitlecase",label:we.kg("editor.transformToTitlecase","Transform to Title Case"),alias:"Transform to Title Case",precondition:ze.R.writable})}_modifyText(e,t){const i=Au.titleBoundary.get();return i?e.toLocaleLowerCase().replace(i,s=>s.toLocaleUpperCase()):e}}Au.titleBoundary=new lh("(^|[^\\p{L}\\p{N}']|((^|\\P{L})'))\\p{L}","gmu");class ed extends Ru{constructor(){super({id:"editor.action.transformToSnakecase",label:we.kg("editor.transformToSnakecase","Transform to Snake Case"),alias:"Transform to Snake Case",precondition:ze.R.writable})}_modifyText(e,t){const i=ed.caseBoundary.get(),s=ed.singleLetters.get();return!i||!s?e:e.replace(i,"$1_$2").replace(s,"$1_$2$3").toLocaleLowerCase()}}ed.caseBoundary=new lh("(\\p{Ll})(\\p{Lu})","gmu"),ed.singleLetters=new lh("(\\p{Lu}|\\p{N})(\\p{Lu})(\\p{Ll})","gmu");class ll extends Ru{constructor(){super({id:"editor.action.transformToKebabcase",label:we.kg("editor.transformToKebabcase","Transform to Kebab Case"),alias:"Transform to Kebab Case",precondition:ze.R.writable})}static isSupported(){return[this.caseBoundary,this.singleLetters,this.underscoreBoundary].every(t=>t.isSupported())}_modifyText(e,t){const i=ll.caseBoundary.get(),s=ll.singleLetters.get(),o=ll.underscoreBoundary.get();return!i||!s||!o?e:e.replace(o,"$1-$3").replace(i,"$1-$2").replace(s,"$1-$2").toLocaleLowerCase()}}ll.caseBoundary=new lh("(\\p{Ll})(\\p{Lu})","gmu"),ll.singleLetters=new lh("(\\p{Lu}|\\p{N})(\\p{Lu}\\p{Ll})","gmu"),ll.underscoreBoundary=new lh("(\\S)(_)(\\S)","gm"),(0,Te.Fl)(ty),(0,Te.Fl)(iy),(0,Te.Fl)(ny),(0,Te.Fl)(sy),(0,Te.Fl)(oy),(0,Te.Fl)(ry),(0,Te.Fl)(ay),(0,Te.Fl)(ly),(0,Te.Fl)(Mf),(0,Te.Fl)(dy),(0,Te.Fl)(cy),(0,Te.Fl)(hy),(0,Te.Fl)(uy),(0,Te.Fl)(gy),(0,Te.Fl)(fy),(0,Te.Fl)(my),(0,Te.Fl)(py),(0,Te.Fl)(_y),(0,Te.Fl)(vy),(0,Te.Fl)(Cy),ed.caseBoundary.isSupported()&&ed.singleLetters.isSupported()&&(0,Te.Fl)(ed),Au.titleBoundary.isSupported()&&(0,Te.Fl)(Au),ll.isSupported()&&(0,Te.Fl)(ll);var by=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},Tf=function(u,e){return function(t,i){e(t,i,u)}},Wp=function(u,e,t,i){function s(o){return o instanceof t?o:new t(function(c){c(o)})}return new(t||(t=Promise))(function(o,c){function m(W){try{U(i.next(W))}catch(re){c(re)}}function A(W){try{U(i.throw(W))}catch(re){c(re)}}function U(W){W.done?o(W.value):s(W.value).then(m,A)}U((i=i.apply(u,e||[])).next())})};const X0=new ct.N1("LinkedEditingInputVisible",!1),J0="linked-editing-decoration";let td=class R_ extends at.jG{constructor(e,t,i,s,o){super(),this.languageConfigurationService=s,this._syncRangesToken=0,this._localToDispose=this._register(new at.Cm),this._editor=e,this._providers=i.linkedEditingRangeProvider,this._enabled=!1,this._visibleContextKey=X0.bindTo(t),this._debounceInformation=o.for(this._providers,"Linked Editing",{min:200}),this._currentDecorations=this._editor.createDecorationsCollection(),this._languageWordPattern=null,this._currentWordPattern=null,this._ignoreChangeEvent=!1,this._localToDispose=this._register(new at.Cm),this._rangeUpdateTriggerPromise=null,this._rangeSyncTriggerPromise=null,this._currentRequest=null,this._currentRequestPosition=null,this._currentRequestModelVersion=null,this._register(this._editor.onDidChangeModel(()=>this.reinitialize(!0))),this._register(this._editor.onDidChangeConfiguration(c=>{(c.hasChanged(64)||c.hasChanged(84))&&this.reinitialize(!1)})),this._register(this._providers.onDidChange(()=>this.reinitialize(!1))),this._register(this._editor.onDidChangeModelLanguage(()=>this.reinitialize(!0))),this.reinitialize(!0)}static get(e){return e.getContribution(R_.ID)}reinitialize(e){const t=this._editor.getModel(),i=t!==null&&(this._editor.getOption(64)||this._editor.getOption(84))&&this._providers.has(t);if(i===this._enabled&&!e||(this._enabled=i,this.clearRanges(),this._localToDispose.clear(),!i||t===null))return;this._localToDispose.add(Vi.Jh.runAndSubscribe(t.onDidChangeLanguageConfiguration,()=>{this._languageWordPattern=this.languageConfigurationService.getLanguageConfiguration(t.getLanguageId()).getWordDefinition()}));const s=new Ot.ve(this._debounceInformation.get(t)),o=()=>{var A;this._rangeUpdateTriggerPromise=s.trigger(()=>this.updateRanges(),(A=this._debounceDuration)!==null&&A!==void 0?A:this._debounceInformation.get(t))},c=new Ot.ve(0),m=A=>{this._rangeSyncTriggerPromise=c.trigger(()=>this._syncRanges(A))};this._localToDispose.add(this._editor.onDidChangeCursorPosition(()=>{o()})),this._localToDispose.add(this._editor.onDidChangeModelContent(A=>{if(!this._ignoreChangeEvent&&this._currentDecorations.length>0){const U=this._currentDecorations.getRange(0);if(U&&A.changes.every(W=>U.intersectRanges(W.range))){m(this._syncRangesToken);return}}o()})),this._localToDispose.add({dispose:()=>{s.dispose(),c.dispose()}}),this.updateRanges()}_syncRanges(e){if(!this._editor.hasModel()||e!==this._syncRangesToken||this._currentDecorations.length===0)return;const t=this._editor.getModel(),i=this._currentDecorations.getRange(0);if(!i||i.startLineNumber!==i.endLineNumber)return this.clearRanges();const s=t.getValueInRange(i);if(this._currentWordPattern){const c=s.match(this._currentWordPattern);if((c?c[0].length:0)!==s.length)return this.clearRanges()}const o=[];for(let c=1,m=this._currentDecorations.length;c<m;c++){const A=this._currentDecorations.getRange(c);if(A)if(A.startLineNumber!==A.endLineNumber)o.push({range:A,text:s});else{let U=t.getValueInRange(A),W=s,re=A.startColumn,Se=A.endColumn;const Be=xi.Qp(U,W);re+=Be,U=U.substr(Be),W=W.substr(Be);const Qe=xi.Vi(U,W);Se-=Qe,U=U.substr(0,U.length-Qe),W=W.substr(0,W.length-Qe),(re!==Se||W.length!==0)&&o.push({range:new St.Q(A.startLineNumber,re,A.endLineNumber,Se),text:W})}}if(o.length!==0)try{this._editor.popUndoStop(),this._ignoreChangeEvent=!0;const c=this._editor._getViewModel().getPrevEditOperationType();this._editor.executeEdits("linkedEditing",o),this._editor._getViewModel().setPrevEditOperationType(c)}finally{this._ignoreChangeEvent=!1}}dispose(){this.clearRanges(),super.dispose()}clearRanges(){this._visibleContextKey.set(!1),this._currentDecorations.clear(),this._currentRequest&&(this._currentRequest.cancel(),this._currentRequest=null,this._currentRequestPosition=null)}updateRanges(e=!1){return Wp(this,void 0,void 0,function*(){if(!this._editor.hasModel()){this.clearRanges();return}const t=this._editor.getPosition();if(!this._enabled&&!e||this._editor.getSelections().length>1){this.clearRanges();return}const i=this._editor.getModel(),s=i.getVersionId();if(this._currentRequestPosition&&this._currentRequestModelVersion===s){if(t.equals(this._currentRequestPosition))return;if(this._currentDecorations.length>0){const c=this._currentDecorations.getRange(0);if(c&&c.containsPosition(t))return}}this._currentRequestPosition=t,this._currentRequestModelVersion=s;const o=(0,Ot.SS)(c=>Wp(this,void 0,void 0,function*(){try{const m=new Ys.W(!1),A=yield q0(this._providers,i,t,c);if(this._debounceInformation.update(i,m.elapsed()),o!==this._currentRequest||(this._currentRequest=null,s!==i.getVersionId()))return;let U=[];A?.ranges&&(U=A.ranges),this._currentWordPattern=A?.wordPattern||this._languageWordPattern;let W=!1;for(let Se=0,Be=U.length;Se<Be;Se++)if(St.Q.containsPosition(U[Se],t)){if(W=!0,Se!==0){const Qe=U[Se];U.splice(Se,1),U.unshift(Qe)}break}if(!W){this.clearRanges();return}const re=U.map(Se=>({range:Se,options:R_.DECORATION}));this._visibleContextKey.set(!0),this._currentDecorations.set(re),this._syncRangesToken++}catch(m){(0,Wi.MB)(m)||(0,Wi.dz)(m),(this._currentRequest===o||!this._currentRequest)&&this.clearRanges()}}));return this._currentRequest=o,o})}};td.ID="editor.contrib.linkedEditing",td.DECORATION=sn.kI.register({description:"linked-editing",stickiness:0,className:J0}),td=by([Tf(1,ct.fN),Tf(2,Zi.u),Tf(3,ao.JZ),Tf(4,Lo.U)],td);class wy extends Te.ks{constructor(){super({id:"editor.action.linkedEditing",label:we.kg("linkedEditing.label","Start Linked Editing"),alias:"Start Linked Editing",precondition:ct.M$.and(ze.R.writable,ze.R.hasRenameProvider),kbOpts:{kbExpr:ze.R.editorTextFocus,primary:3132,weight:100}})}runCommand(e,t){const i=e.get(Gi.T),[s,o]=Array.isArray(t)&&t||[void 0,void 0];return vn.r.isUri(s)&&bi.y.isIPosition(o)?i.openCodeEditor({resource:s},i.getActiveCodeEditor()).then(c=>{c&&(c.setPosition(o),c.invokeWithinContext(m=>(this.reportTelemetry(m,c),this.run(m,c))))},Wi.dz):super.runCommand(e,t)}run(e,t){const i=td.get(t);return i?Promise.resolve(i.updateRanges(!0)):Promise.resolve()}}const Sy=Te.DX.bindToContribution(td.get);(0,Te.E_)(new Sy({id:"cancelLinkedEditingInput",precondition:X0,handler:u=>u.clearRanges(),kbOpts:{kbExpr:ze.R.editorTextFocus,weight:100+99,primary:9,secondary:[1033]}}));function q0(u,e,t,i){const s=u.ordered(e);return(0,Ot.$1)(s.map(o=>()=>Wp(this,void 0,void 0,function*(){try{return yield o.provideLinkedEditingRanges(e,t,i)}catch(c){(0,Wi.M_)(c);return}})),o=>!!o&&cn.EI(o?.ranges))}const yy=(0,Ce.x1A)("editor.linkedEditingBackground",{dark:Dn.Q1.fromHex("#f00").transparent(.3),light:Dn.Q1.fromHex("#f00").transparent(.3),hcDark:Dn.Q1.fromHex("#f00").transparent(.3),hcLight:Dn.Q1.white},we.kg("editorLinkedEditingBackground","Background color when the editor auto renames on type."));(0,Ye.zy)((u,e)=>{const t=u.getColor(yy);t&&e.addRule(`.monaco-editor .${J0} { background: ${t}; border-left-color: ${t}; }`)}),(0,Te.ke)("_executeLinkedEditingProvider",(u,e,t)=>{const{linkedEditingRangeProvider:i}=u.get(Zi.u);return q0(i,e,t,Ti.X.None)}),(0,Te.HW)(td.ID,td),(0,Te.Fl)(wy);var Tk=f(89532),ev=function(u,e,t,i){function s(o){return o instanceof t?o:new t(function(c){c(o)})}return new(t||(t=Promise))(function(o,c){function m(W){try{U(i.next(W))}catch(re){c(re)}}function A(W){try{U(i.throw(W))}catch(re){c(re)}}function U(W){W.done?o(W.value):s(W.value).then(m,A)}U((i=i.apply(u,e||[])).next())})};class Ly{constructor(e,t){this._link=e,this._provider=t}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}resolve(e){return ev(this,void 0,void 0,function*(){return this._link.url?this._link.url:typeof this._provider.resolveLink=="function"?Promise.resolve(this._provider.resolveLink(this._link,e)).then(t=>(this._link=t||this._link,this._link.url?this.resolve(e):Promise.reject(new Error("missing")))):Promise.reject(new Error("missing"))})}}class Rf{constructor(e){this._disposables=new at.Cm;let t=[];for(const[i,s]of e){const o=i.links.map(c=>new Ly(c,s));t=Rf._union(t,o),(0,at.Xm)(i)&&this._disposables.add(i)}this.links=t}dispose(){this._disposables.dispose(),this.links.length=0}static _union(e,t){const i=[];let s,o,c,m;for(s=0,c=0,o=e.length,m=t.length;s<o&&c<m;){const A=e[s],U=t[c];if(St.Q.areIntersectingOrTouching(A.range,U.range)){s++;continue}St.Q.compareRangesUsingStarts(A.range,U.range)<0?(i.push(A),s++):(i.push(U),c++)}for(;s<o;s++)i.push(e[s]);for(;c<m;c++)i.push(t[c]);return i}}function tv(u,e,t){const i=[],s=u.ordered(e).reverse().map((o,c)=>Promise.resolve(o.provideLinks(e,t)).then(m=>{m&&(i[c]=[m,o])},Wi.M_));return Promise.all(s).then(()=>{const o=new Rf((0,cn.Yc)(i));return t.isCancellationRequested?(o.dispose(),new Rf([])):o})}fn.wb.registerCommand("_executeLinkProvider",(u,...e)=>ev(void 0,void 0,void 0,function*(){let[t,i]=e;(0,pi.j)(t instanceof vn.r),typeof i!="number"&&(i=0);const{linkProvider:s}=u.get(Zi.u),o=u.get(ws.S).getModel(t);if(!o)return[];const c=yield tv(s,o,Ti.X.None);if(!c)return[];for(let A=0;A<Math.min(i,c.links.length);A++)yield c.links[A].resolve(Ti.X.None);const m=c.links.slice(0);return c.dispose(),m}));var Dy=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},Af=function(u,e){return function(t,i){e(t,i,u)}},ky=function(u,e,t,i){function s(o){return o instanceof t?o:new t(function(c){c(o)})}return new(t||(t=Promise))(function(o,c){function m(W){try{U(i.next(W))}catch(re){c(re)}}function A(W){try{U(i.throw(W))}catch(re){c(re)}}function U(W){W.done?o(W.value):s(W.value).then(m,A)}U((i=i.apply(u,e||[])).next())})};let dh=class DC extends at.jG{constructor(e,t,i,s,o){super(),this.editor=e,this.openerService=t,this.notificationService=i,this.languageFeaturesService=s,this.providers=this.languageFeaturesService.linkProvider,this.debounceInformation=o.for(this.providers,"Links",{min:1e3,max:4e3}),this.computeLinks=this._register(new Ot.uC(()=>this.computeLinksNow(),1e3)),this.computePromise=null,this.activeLinksList=null,this.currentOccurrences={},this.activeLinkDecorationId=null;const c=this._register(new wl(e));this._register(c.onMouseMoveOrRelevantKeyDown(([m,A])=>{this._onEditorMouseMove(m,A)})),this._register(c.onExecute(m=>{this.onEditorMouseUp(m)})),this._register(c.onCancel(m=>{this.cleanUpActiveLinkDecoration()})),this._register(e.onDidChangeConfiguration(m=>{m.hasChanged(65)&&(this.updateDecorations([]),this.stop(),this.computeLinks.schedule(0))})),this._register(e.onDidChangeModelContent(m=>{this.editor.hasModel()&&this.computeLinks.schedule(this.debounceInformation.get(this.editor.getModel()))})),this._register(e.onDidChangeModel(m=>{this.currentOccurrences={},this.activeLinkDecorationId=null,this.stop(),this.computeLinks.schedule(0)})),this._register(e.onDidChangeModelLanguage(m=>{this.stop(),this.computeLinks.schedule(0)})),this._register(this.providers.onDidChange(m=>{this.stop(),this.computeLinks.schedule(0)})),this.computeLinks.schedule(0)}static get(e){return e.getContribution(DC.ID)}computeLinksNow(){return ky(this,void 0,void 0,function*(){if(!this.editor.hasModel()||!this.editor.getOption(65))return;const e=this.editor.getModel();if(this.providers.has(e)){this.activeLinksList&&(this.activeLinksList.dispose(),this.activeLinksList=null),this.computePromise=(0,Ot.SS)(t=>tv(this.providers,e,t));try{const t=new Ys.W(!1);if(this.activeLinksList=yield this.computePromise,this.debounceInformation.update(e,t.elapsed()),e.isDisposed())return;this.updateDecorations(this.activeLinksList.links)}catch(t){(0,Wi.dz)(t)}finally{this.computePromise=null}}})}updateDecorations(e){const t=this.editor.getOption(72)==="altKey",i=[],s=Object.keys(this.currentOccurrences);for(const c of s){const m=this.currentOccurrences[c];i.push(m.decorationId)}const o=[];if(e)for(const c of e)o.push(ch.decoration(c,t));this.editor.changeDecorations(c=>{const m=c.deltaDecorations(i,o);this.currentOccurrences={},this.activeLinkDecorationId=null;for(let A=0,U=m.length;A<U;A++){const W=new ch(e[A],m[A]);this.currentOccurrences[W.decorationId]=W}})}_onEditorMouseMove(e,t){const i=this.editor.getOption(72)==="altKey";if(this.isEnabled(e,t)){this.cleanUpActiveLinkDecoration();const s=this.getLinkOccurrence(e.target.position);s&&this.editor.changeDecorations(o=>{s.activate(o,i),this.activeLinkDecorationId=s.decorationId})}else this.cleanUpActiveLinkDecoration()}cleanUpActiveLinkDecoration(){const e=this.editor.getOption(72)==="altKey";if(this.activeLinkDecorationId){const t=this.currentOccurrences[this.activeLinkDecorationId];t&&this.editor.changeDecorations(i=>{t.deactivate(i,e)}),this.activeLinkDecorationId=null}}onEditorMouseUp(e){if(!this.isEnabled(e))return;const t=this.getLinkOccurrence(e.target.position);t&&this.openLinkOccurrence(t,e.hasSideBySideModifier,!0)}openLinkOccurrence(e,t,i=!1){if(!this.openerService)return;const{link:s}=e;s.resolve(Ti.X.None).then(o=>{if(typeof o=="string"&&this.editor.hasModel()){const c=this.editor.getModel().uri;if(c.scheme===li.ny.file&&o.startsWith(`${li.ny.file}:`)){const m=vn.r.parse(o);if(m.scheme===li.ny.file){const A=hn.su(m);let U=null;A.startsWith("/./")?U=`.${A.substr(1)}`:A.startsWith("//./")&&(U=`.${A.substr(2)}`),U&&(o=hn.uJ(c,U))}}}return this.openerService.open(o,{openToSide:t,fromUserGesture:i,allowContributedOpeners:!0,allowCommands:!0,fromWorkspace:!0})},o=>{const c=o instanceof Error?o.message:o;c==="invalid"?this.notificationService.warn(we.kg("invalid.url","Failed to open this link because it is not well-formed: {0}",s.url.toString())):c==="missing"?this.notificationService.warn(we.kg("missing.url","Failed to open this link because its target is missing.")):(0,Wi.dz)(o)})}getLinkOccurrence(e){if(!this.editor.hasModel()||!e)return null;const t=this.editor.getModel().getDecorationsInRange({startLineNumber:e.lineNumber,startColumn:e.column,endLineNumber:e.lineNumber,endColumn:e.column},0,!0);for(const i of t){const s=this.currentOccurrences[i.id];if(s)return s}return null}isEnabled(e,t){return!!(e.target.type===6&&(e.hasTriggerModifier||t&&t.keyCodeIsTriggerKey))}stop(){var e;this.computeLinks.cancel(),this.activeLinksList&&((e=this.activeLinksList)===null||e===void 0||e.dispose(),this.activeLinksList=null),this.computePromise&&(this.computePromise.cancel(),this.computePromise=null)}dispose(){super.dispose(),this.stop()}};dh.ID="editor.linkDetector",dh=Dy([Af(1,Ho.Cr),Af(2,Cs.Ot),Af(3,Zi.u),Af(4,Lo.U)],dh);const iv={general:sn.kI.register({description:"detected-link",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link"}),active:sn.kI.register({description:"detected-link-active",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link-active"})};class ch{constructor(e,t){this.link=e,this.decorationId=t}static decoration(e,t){return{range:e.range,options:ch._getOptions(e,t,!1)}}static _getOptions(e,t,i){const s=Object.assign({},i?iv.active:iv.general);return s.hoverMessage=Ey(e,t),s}activate(e,t){e.changeDecorationOptions(this.decorationId,ch._getOptions(this.link,t,!0))}deactivate(e,t){e.changeDecorationOptions(this.decorationId,ch._getOptions(this.link,t,!1))}}function Ey(u,e){const t=u.url&&/^command:/i.test(u.url.toString()),i=u.tooltip?u.tooltip:t?we.kg("links.navigate.executeCmd","Execute command"):we.kg("links.navigate.follow","Follow link"),s=e?Pi.zx?we.kg("links.navigate.kb.meta.mac","cmd + click"):we.kg("links.navigate.kb.meta","ctrl + click"):Pi.zx?we.kg("links.navigate.kb.alt.mac","option + click"):we.kg("links.navigate.kb.alt","alt + click");if(u.url){let o="";if(/^command:/i.test(u.url.toString())){const m=u.url.toString().match(/^command:([^?#]+)/);if(m){const A=m[1];o=we.kg("tooltip.explanation","Execute command {0}",A)}}return new Li.Bc("",!0).appendLink(u.url.toString(!0).replace(/ /g,"%20"),i,o).appendMarkdown(` (${s})`)}else return new Li.Bc().appendText(`${i} (${s})`)}class xy extends Te.ks{constructor(){super({id:"editor.action.openLink",label:we.kg("label","Open Link"),alias:"Open Link",precondition:void 0})}run(e,t){const i=dh.get(t);if(!i||!t.hasModel())return;const s=t.getSelections();for(const o of s){const c=i.getLinkOccurrence(o.getEndPosition());c&&i.openLinkOccurrence(c,!1)}}}(0,Te.HW)(dh.ID,dh),(0,Te.Fl)(xy),(0,Ye.zy)((u,e)=>{const t=u.getColor(Ce.Ztu);t&&e.addRule(`.monaco-editor .detected-link-active { color: ${t} !important; }`)});var Iy=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},Ny=function(u,e){return function(t,i){e(t,i,u)}};function id(u,e){const t=e.filter(i=>!u.find(s=>s.equals(i)));if(t.length>=1){const i=t.map(o=>`line ${o.viewState.position.lineNumber} column ${o.viewState.position.column}`).join(", "),s=t.length===1?we.kg("cursorAdded","Cursor added: {0}",i):we.kg("cursorsAdded","Cursors added: {0}",i);(0,oi.h5)(s)}}class My extends Te.ks{constructor(){super({id:"editor.action.insertCursorAbove",label:we.kg("mutlicursor.insertAbove","Add Cursor Above"),alias:"Add Cursor Above",precondition:void 0,kbOpts:{kbExpr:ze.R.editorTextFocus,primary:2576,linux:{primary:1552,secondary:[3088]},weight:100},menuOpts:{menuId:xe.D8.MenubarSelectionMenu,group:"3_multi",title:we.kg({key:"miInsertCursorAbove",comment:["&& denotes a mnemonic"]},"&&Add Cursor Above"),order:2}})}run(e,t,i){if(!t.hasModel())return;let s=!0;i&&i.logicalLine===!1&&(s=!1);const o=t._getViewModel();if(o.cursorConfig.readOnly)return;o.model.pushStackElement();const c=o.getCursorStates();o.setCursorStates(i.source,3,Op.c.addCursorUp(o,c,s)),o.revealTopMostCursor(i.source),id(c,o.getCursorStates())}}class Ty extends Te.ks{constructor(){super({id:"editor.action.insertCursorBelow",label:we.kg("mutlicursor.insertBelow","Add Cursor Below"),alias:"Add Cursor Below",precondition:void 0,kbOpts:{kbExpr:ze.R.editorTextFocus,primary:2578,linux:{primary:1554,secondary:[3090]},weight:100},menuOpts:{menuId:xe.D8.MenubarSelectionMenu,group:"3_multi",title:we.kg({key:"miInsertCursorBelow",comment:["&& denotes a mnemonic"]},"A&&dd Cursor Below"),order:3}})}run(e,t,i){if(!t.hasModel())return;let s=!0;i&&i.logicalLine===!1&&(s=!1);const o=t._getViewModel();if(o.cursorConfig.readOnly)return;o.model.pushStackElement();const c=o.getCursorStates();o.setCursorStates(i.source,3,Op.c.addCursorDown(o,c,s)),o.revealBottomMostCursor(i.source),id(c,o.getCursorStates())}}class Ry extends Te.ks{constructor(){super({id:"editor.action.insertCursorAtEndOfEachLineSelected",label:we.kg("mutlicursor.insertAtEndOfEachLineSelected","Add Cursors to Line Ends"),alias:"Add Cursors to Line Ends",precondition:void 0,kbOpts:{kbExpr:ze.R.editorTextFocus,primary:1575,weight:100},menuOpts:{menuId:xe.D8.MenubarSelectionMenu,group:"3_multi",title:we.kg({key:"miInsertCursorAtEndOfEachLineSelected",comment:["&& denotes a mnemonic"]},"Add C&&ursors to Line Ends"),order:4}})}getCursorsForSelection(e,t,i){if(!e.isEmpty()){for(let s=e.startLineNumber;s<e.endLineNumber;s++){const o=t.getLineMaxColumn(s);i.push(new ki.L(s,o,s,o))}e.endColumn>1&&i.push(new ki.L(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn))}}run(e,t){if(!t.hasModel())return;const i=t.getModel(),s=t.getSelections(),o=t._getViewModel(),c=o.getCursorStates(),m=[];s.forEach(A=>this.getCursorsForSelection(A,i,m)),m.length>0&&t.setSelections(m),id(c,o.getCursorStates())}}class Ay extends Te.ks{constructor(){super({id:"editor.action.addCursorsToBottom",label:we.kg("mutlicursor.addCursorsToBottom","Add Cursors To Bottom"),alias:"Add Cursors To Bottom",precondition:void 0})}run(e,t){if(!t.hasModel())return;const i=t.getSelections(),s=t.getModel().getLineCount(),o=[];for(let A=i[0].startLineNumber;A<=s;A++)o.push(new ki.L(A,i[0].startColumn,A,i[0].endColumn));const c=t._getViewModel(),m=c.getCursorStates();o.length>0&&t.setSelections(o),id(m,c.getCursorStates())}}class Oy extends Te.ks{constructor(){super({id:"editor.action.addCursorsToTop",label:we.kg("mutlicursor.addCursorsToTop","Add Cursors To Top"),alias:"Add Cursors To Top",precondition:void 0})}run(e,t){if(!t.hasModel())return;const i=t.getSelections(),s=[];for(let m=i[0].startLineNumber;m>=1;m--)s.push(new ki.L(m,i[0].startColumn,m,i[0].endColumn));const o=t._getViewModel(),c=o.getCursorStates();s.length>0&&t.setSelections(s),id(c,o.getCursorStates())}}class Of{constructor(e,t,i){this.selections=e,this.revealRange=t,this.revealScrollType=i}}class Ou{constructor(e,t,i,s,o,c,m){this._editor=e,this.findController=t,this.isDisconnectedFromFindController=i,this.searchText=s,this.wholeWord=o,this.matchCase=c,this.currentMatch=m}static create(e,t){if(!e.hasModel())return null;const i=t.getState();if(!e.hasTextFocus()&&i.isRevealed&&i.searchString.length>0)return new Ou(e,t,!1,i.searchString,i.wholeWord,i.matchCase,null);let s=!1,o,c;const m=e.getSelections();m.length===1&&m[0].isEmpty()?(s=!0,o=!0,c=!0):(o=i.wholeWord,c=i.matchCase);const A=e.getSelection();let U,W=null;if(A.isEmpty()){const re=e.getConfiguredWordAtPosition(A.getStartPosition());if(!re)return null;U=re.word,W=new ki.L(A.startLineNumber,re.startColumn,A.startLineNumber,re.endColumn)}else U=e.getModel().getValueInRange(A).replace(/\r\n/g,` `);return new Ou(e,t,s,U,o,c,W)}addSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const e=this._getNextMatch();if(!e)return null;const t=this._editor.getSelections();return new Of(t.concat(e),e,0)}moveSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const e=this._getNextMatch();if(!e)return null;const t=this._editor.getSelections();return new Of(t.slice(0,t.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(),t=e[e.length-1],i=this._editor.getModel().findNextMatch(this.searchText,t.getEndPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(119):null,!1);return i?new ki.L(i.range.startLineNumber,i.range.startColumn,i.range.endLineNumber,i.range.endColumn):null}addSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const e=this._getPreviousMatch();if(!e)return null;const t=this._editor.getSelections();return new Of(t.concat(e),e,0)}moveSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const e=this._getPreviousMatch();if(!e)return null;const t=this._editor.getSelections();return new Of(t.slice(0,t.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(),t=e[e.length-1],i=this._editor.getModel().findPreviousMatch(this.searchText,t.getStartPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(119):null,!1);return i?new ki.L(i.range.startLineNumber,i.range.startColumn,i.range.endLineNumber,i.range.endColumn):null}selectAll(e){if(!this._editor.hasModel())return[];this.findController.highlightFindOptions();const t=this._editor.getModel();return e?t.findMatches(this.searchText,e,!1,this.matchCase,this.wholeWord?this._editor.getOption(119):null,!1,1073741824):t.findMatches(this.searchText,!0,!1,this.matchCase,this.wholeWord?this._editor.getOption(119):null,!1,1073741824)}}class Kd extends at.jG{constructor(e){super(),this._sessionDispose=this._register(new at.Cm),this._editor=e,this._ignoreSelectionChange=!1,this._session=null}static get(e){return e.getContribution(Kd.ID)}dispose(){this._endSession(),super.dispose()}_beginSessionIfNeeded(e){if(!this._session){const t=Ou.create(this._editor,e);if(!t)return;this._session=t;const i={searchString:this._session.searchText};this._session.isDisconnectedFromFindController&&(i.wholeWordOverride=1,i.matchCaseOverride=1,i.isRegexOverride=2),e.getState().change(i,!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,t){if(!t.isEmpty())return t;const i=this._editor.getConfiguredWordAtPosition(t.getStartPosition());return i?new ki.L(t.startLineNumber,i.startColumn,t.startLineNumber,i.endColumn):t}_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 t=this._editor.getSelections();if(t.length>1){const s=e.getState().matchCase;if(!nv(this._editor.getModel(),t,s)){const c=this._editor.getModel(),m=[];for(let A=0,U=t.length;A<U;A++)m[A]=this._expandEmptyToWord(c,t[A]);this._editor.setSelections(m);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 t=null;const i=e.getState();if(i.isRevealed&&i.searchString.length>0&&i.isRegex){const s=this._editor.getModel();i.searchScope?t=s.findMatches(i.searchString,i.searchScope,i.isRegex,i.matchCase,i.wholeWord?this._editor.getOption(119):null,!1,1073741824):t=s.findMatches(i.searchString,!0,i.isRegex,i.matchCase,i.wholeWord?this._editor.getOption(119):null,!1,1073741824)}else{if(this._beginSessionIfNeeded(e),!this._session)return;t=this._session.selectAll(i.searchScope)}if(t.length>0){const s=this._editor.getSelection();for(let o=0,c=t.length;o<c;o++){const m=t[o];if(m.range.intersectRanges(s)){t[o]=t[0],t[0]=m;break}}this._setSelections(t.map(o=>new ki.L(o.range.startLineNumber,o.range.startColumn,o.range.endLineNumber,o.range.endColumn)))}}}Kd.ID="editor.contrib.multiCursorController";class hh extends Te.ks{run(e,t){const i=Kd.get(t);if(!i)return;const s=Xo.get(t);if(!s)return;const o=t._getViewModel();if(o){const c=o.getCursorStates();this._run(i,s),id(c,o.getCursorStates())}}}class Py extends hh{constructor(){super({id:"editor.action.addSelectionToNextFindMatch",label:we.kg("addSelectionToNextFindMatch","Add Selection To Next Find Match"),alias:"Add Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:ze.R.focus,primary:2082,weight:100},menuOpts:{menuId:xe.D8.MenubarSelectionMenu,group:"3_multi",title:we.kg({key:"miAddSelectionToNextFindMatch",comment:["&& denotes a mnemonic"]},"Add &&Next Occurrence"),order:5}})}_run(e,t){e.addSelectionToNextFindMatch(t)}}class Fy extends hh{constructor(){super({id:"editor.action.addSelectionToPreviousFindMatch",label:we.kg("addSelectionToPreviousFindMatch","Add Selection To Previous Find Match"),alias:"Add Selection To Previous Find Match",precondition:void 0,menuOpts:{menuId:xe.D8.MenubarSelectionMenu,group:"3_multi",title:we.kg({key:"miAddSelectionToPreviousFindMatch",comment:["&& denotes a mnemonic"]},"Add P&&revious Occurrence"),order:6}})}_run(e,t){e.addSelectionToPreviousFindMatch(t)}}class By extends hh{constructor(){super({id:"editor.action.moveSelectionToNextFindMatch",label:we.kg("moveSelectionToNextFindMatch","Move Last Selection To Next Find Match"),alias:"Move Last Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:ze.R.focus,primary:(0,zi.m5)(2089,2082),weight:100}})}_run(e,t){e.moveSelectionToNextFindMatch(t)}}class Wy extends hh{constructor(){super({id:"editor.action.moveSelectionToPreviousFindMatch",label:we.kg("moveSelectionToPreviousFindMatch","Move Last Selection To Previous Find Match"),alias:"Move Last Selection To Previous Find Match",precondition:void 0})}_run(e,t){e.moveSelectionToPreviousFindMatch(t)}}class Vy extends hh{constructor(){super({id:"editor.action.selectHighlights",label:we.kg("selectAllOccurrencesOfFindMatch","Select All Occurrences of Find Match"),alias:"Select All Occurrences of Find Match",precondition:void 0,kbOpts:{kbExpr:ze.R.focus,primary:3114,weight:100},menuOpts:{menuId:xe.D8.MenubarSelectionMenu,group:"3_multi",title:we.kg({key:"miSelectHighlights",comment:["&& denotes a mnemonic"]},"Select All &&Occurrences"),order:7}})}_run(e,t){e.selectAll(t)}}class Hy extends hh{constructor(){super({id:"editor.action.changeAll",label:we.kg("changeAll.label","Change All Occurrences"),alias:"Change All Occurrences",precondition:ct.M$.and(ze.R.writable,ze.R.editorTextFocus),kbOpts:{kbExpr:ze.R.editorTextFocus,primary:2108,weight:100},contextMenuOpts:{group:"1_modification",order:1.2}})}_run(e,t){e.selectAll(t)}}class zy{constructor(e,t,i,s,o){this._model=e,this._searchText=t,this._matchCase=i,this._wordSeparators=s,this._modelVersionId=this._model.getVersionId(),this._cachedFindMatches=null,o&&this._model===o._model&&this._searchText===o._searchText&&this._matchCase===o._matchCase&&this._wordSeparators===o._wordSeparators&&this._modelVersionId===o._modelVersionId&&(this._cachedFindMatches=o._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(St.Q.compareRangesUsingStarts)),this._cachedFindMatches}}let $d=class hm extends at.jG{constructor(e,t){super(),this._languageFeaturesService=t,this.editor=e,this._isEnabled=e.getOption(99),this._decorations=e.createDecorationsCollection(),this.updateSoon=this._register(new Ot.uC(()=>this._update(),300)),this.state=null,this._register(e.onDidChangeConfiguration(s=>{this._isEnabled=e.getOption(99)})),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 i=Xo.get(e);i&&this._register(i.getState().onFindReplaceStateChange(s=>{this._update()}))}_update(){this._setState(hm._createState(this.state,this._isEnabled,this.editor))}static _createState(e,t,i){if(!t||!i.hasModel())return null;const s=i.getSelection();if(s.startLineNumber!==s.endLineNumber)return null;const o=Kd.get(i);if(!o)return null;const c=Xo.get(i);if(!c)return null;let m=o.getSession(c);if(!m){const W=i.getSelections();if(W.length>1){const Se=c.getState().matchCase;if(!nv(i.getModel(),W,Se))return null}m=Ou.create(i,c)}if(!m||m.currentMatch||/^[ \t]+$/.test(m.searchText)||m.searchText.length>200)return null;const A=c.getState(),U=A.matchCase;if(A.isRevealed){let W=A.searchString;U||(W=W.toLowerCase());let re=m.searchText;if(U||(re=re.toLowerCase()),W===re&&m.matchCase===A.matchCase&&m.wholeWord===A.wholeWord&&!A.isRegex)return null}return new zy(i.getModel(),m.searchText,m.matchCase,m.wholeWord?i.getOption(119):null,e)}_setState(e){if(this.state=e,!this.state){this._decorations.clear();return}if(!this.editor.hasModel())return;const t=this.editor.getModel();if(t.isTooLargeForTokenization())return;const i=this.state.findMatches(),s=this.editor.getSelections();s.sort(St.Q.compareRangesUsingStarts);const o=[];for(let A=0,U=0,W=i.length,re=s.length;A<W;){const Se=i[A];if(U>=re)o.push(Se),A++;else{const Be=St.Q.compareRangesUsingStarts(Se,s[U]);Be<0?((s[U].isEmpty()||!St.Q.areIntersecting(Se,s[U]))&&o.push(Se),A++):(Be>0||A++,U++)}}const c=this._languageFeaturesService.documentHighlightProvider.has(t)&&this.editor.getOption(74),m=o.map(A=>({range:A,options:c?hm._SELECTION_HIGHLIGHT:hm._SELECTION_HIGHLIGHT_OVERVIEW}));this._decorations.set(m)}dispose(){this._setState(null),super.dispose()}};$d.ID="editor.contrib.selectionHighlighter",$d._SELECTION_HIGHLIGHT_OVERVIEW=sn.kI.register({description:"selection-highlight-overview",stickiness:1,className:"selectionHighlight",minimap:{color:(0,Ye.Yf)(Ce.Xp1),position:bn.R3.Inline},overviewRuler:{color:(0,Ye.Yf)(Ce.z5H),position:bn.A5.Center}}),$d._SELECTION_HIGHLIGHT=sn.kI.register({description:"selection-highlight",stickiness:1,className:"selectionHighlight"}),$d=Iy([Ny(1,Zi.u)],$d);function nv(u,e,t){const i=sv(u,e[0],!t);for(let s=1,o=e.length;s<o;s++){const c=e[s];if(c.isEmpty())return!1;const m=sv(u,c,!t);if(i!==m)return!1}return!0}function sv(u,e,t){const i=u.getValueInRange(e);return t?i.toLowerCase():i}class Uy extends Te.ks{constructor(){super({id:"editor.action.focusNextCursor",label:we.kg("mutlicursor.focusNextCursor","Focus Next Cursor"),description:{description:we.kg("mutlicursor.focusNextCursor.description","Focuses the next cursor"),args:[]},alias:"Focus Next Cursor",precondition:void 0})}run(e,t,i){if(!t.hasModel())return;const s=t._getViewModel();if(s.cursorConfig.readOnly)return;s.model.pushStackElement();const o=Array.from(s.getCursorStates()),c=o.shift();c&&(o.push(c),s.setCursorStates(i.source,3,o),s.revealPrimaryCursor(i.source,!0),id(o,s.getCursorStates()))}}class jy extends Te.ks{constructor(){super({id:"editor.action.focusPreviousCursor",label:we.kg("mutlicursor.focusPreviousCursor","Focus Previous Cursor"),description:{description:we.kg("mutlicursor.focusPreviousCursor.description","Focuses the previous cursor"),args:[]},alias:"Focus Previous Cursor",precondition:void 0})}run(e,t,i){if(!t.hasModel())return;const s=t._getViewModel();if(s.cursorConfig.readOnly)return;s.model.pushStackElement();const o=Array.from(s.getCursorStates()),c=o.pop();c&&(o.unshift(c),s.setCursorStates(i.source,3,o),s.revealPrimaryCursor(i.source,!0),id(o,s.getCursorStates()))}}(0,Te.HW)(Kd.ID,Kd),(0,Te.HW)($d.ID,$d),(0,Te.Fl)(My),(0,Te.Fl)(Ty),(0,Te.Fl)(Ry),(0,Te.Fl)(Py),(0,Te.Fl)(Fy),(0,Te.Fl)(By),(0,Te.Fl)(Wy),(0,Te.Fl)(Vy),(0,Te.Fl)(Hy),(0,Te.Fl)(Ay),(0,Te.Fl)(Oy),(0,Te.Fl)(Uy),(0,Te.Fl)(jy);var ov=function(u,e,t,i){function s(o){return o instanceof t?o:new t(function(c){c(o)})}return new(t||(t=Promise))(function(o,c){function m(W){try{U(i.next(W))}catch(re){c(re)}}function A(W){try{U(i.throw(W))}catch(re){c(re)}}function U(W){W.done?o(W.value):s(W.value).then(m,A)}U((i=i.apply(u,e||[])).next())})};const Gd={Visible:new ct.N1("parameterHintsVisible",!1),MultipleSignatures:new ct.N1("parameterHintsMultipleSignatures",!1)};function rv(u,e,t,i,s){return ov(this,void 0,void 0,function*(){const o=u.ordered(e);for(const c of o)try{const m=yield c.provideSignatureHelp(e,t,s,i);if(m)return m}catch(m){(0,Wi.M_)(m)}})}fn.wb.registerCommand("_executeSignatureHelpProvider",(u,...e)=>ov(void 0,void 0,void 0,function*(){const[t,i,s]=e;(0,pi.j)(vn.r.isUri(t)),(0,pi.j)(bi.y.isIPosition(i)),(0,pi.j)(typeof s=="string"||!s);const o=u.get(Zi.u),c=yield u.get(Hs.b).createModelReference(t);try{const m=yield rv(o.signatureHelpProvider,c.object.textEditorModel,bi.y.lift(i),{triggerKind:Xe.WA.Invoke,isRetrigger:!1,triggerCharacter:s},Ti.X.None);return m?(setTimeout(()=>m.dispose(),0),m.value):void 0}finally{c.dispose()}}));var Rk=f(21862),Ky=function(u,e,t,i){function s(o){return o instanceof t?o:new t(function(c){c(o)})}return new(t||(t=Promise))(function(o,c){function m(W){try{U(i.next(W))}catch(re){c(re)}}function A(W){try{U(i.throw(W))}catch(re){c(re)}}function U(W){W.done?o(W.value):s(W.value).then(m,A)}U((i=i.apply(u,e||[])).next())})},nd;(function(u){u.Default={type:0};class e{constructor(s,o){this.request=s,this.previouslyActiveHints=o,this.type=2}}u.Pending=e;class t{constructor(s){this.hints=s,this.type=1}}u.Active=t})(nd||(nd={}));class Pf extends at.jG{constructor(e,t,i=Pf.DEFAULT_DELAY){super(),this._onChangedHints=this._register(new Vi.vl),this.onChangedHints=this._onChangedHints.event,this.triggerOnType=!1,this._state=nd.Default,this._pendingTriggers=[],this._lastSignatureHelpResult=this._register(new at.HE),this.triggerChars=new Jc.y,this.retriggerChars=new Jc.y,this.triggerId=0,this.editor=e,this.providers=t,this.throttledDelayer=new Ot.ve(i),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=nd.Default,this.throttledDelayer.cancel(),e||this._onChangedHints.fire(void 0)}trigger(e,t){const i=this.editor.getModel();if(!i||!this.providers.has(i))return;const s=++this.triggerId;this._pendingTriggers.push(e),this.throttledDelayer.trigger(()=>this.doTrigger(s),t).catch(Wi.dz)}next(){if(this.state.type!==1)return;const e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,i=t%e===e-1,s=this.editor.getOption(78).cycle;if((e<2||i)&&!s){this.cancel();return}this.updateActiveSignature(i&&s?0:t+1)}previous(){if(this.state.type!==1)return;const e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,i=t===0,s=this.editor.getOption(78).cycle;if((e<2||i)&&!s){this.cancel();return}this.updateActiveSignature(i&&s?e-1:t-1)}updateActiveSignature(e){this.state.type===1&&(this.state=new nd.Active(Object.assign(Object.assign({},this.state.hints),{activeSignature:e})),this._onChangedHints.fire(this.state.hints))}doTrigger(e){return Ky(this,void 0,void 0,function*(){const t=this.state.type===1||this.state.type===2,i=this.getLastActiveHints();if(this.cancel(!0),this._pendingTriggers.length===0)return!1;const s=this._pendingTriggers.reduce($y);this._pendingTriggers=[];const o={triggerKind:s.triggerKind,triggerCharacter:s.triggerCharacter,isRetrigger:t,activeSignatureHelp:i};if(!this.editor.hasModel())return!1;const c=this.editor.getModel(),m=this.editor.getPosition();this.state=new nd.Pending((0,Ot.SS)(A=>rv(this.providers,c,m,o,A)),i);try{const A=yield this.state.request;return e!==this.triggerId?(A?.dispose(),!1):!A||!A.value.signatures||A.value.signatures.length===0?(A?.dispose(),this._lastSignatureHelpResult.clear(),this.cancel(),!1):(this.state=new nd.Active(A.value),this._lastSignatureHelpResult.value=A,this._onChangedHints.fire(this.state.hints),!0)}catch(A){return e===this.triggerId&&(this.state=nd.Default),(0,Wi.dz)(A),!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=new Jc.y,this.retriggerChars=new Jc.y;const e=this.editor.getModel();if(e)for(const t of this.providers.ordered(e)){for(const i of t.signatureHelpTriggerCharacters||[])this.triggerChars.add(i.charCodeAt(0)),this.retriggerChars.add(i.charCodeAt(0));for(const i of t.signatureHelpRetriggerCharacters||[])this.retriggerChars.add(i.charCodeAt(0))}}onDidType(e){if(!this.triggerOnType)return;const t=e.length-1,i=e.charCodeAt(t);(this.triggerChars.has(i)||this.isTriggered&&this.retriggerChars.has(i))&&this.trigger({triggerKind:Xe.WA.TriggerCharacter,triggerCharacter:e.charAt(t)})}onCursorChange(e){e.source==="mouse"?this.cancel():this.isTriggered&&this.trigger({triggerKind:Xe.WA.ContentChange})}onModelContentChange(){this.isTriggered&&this.trigger({triggerKind:Xe.WA.ContentChange})}onEditorConfigurationChange(){this.triggerOnType=this.editor.getOption(78).enabled,this.triggerOnType||this.cancel()}dispose(){this.cancel(!0),super.dispose()}}Pf.DEFAULT_DELAY=120;function $y(u,e){switch(e.triggerKind){case Xe.WA.Invoke:return e;case Xe.WA.ContentChange:return u;case Xe.WA.TriggerCharacter:default:return e}}var Gy=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},Ff=function(u,e){return function(t,i){e(t,i,u)}};const fr=M.$,Qy=(0,ho.pU)("parameter-hints-next",Mi.W6.chevronDown,we.kg("parameterHintsNextIcon","Icon for show next parameter hint.")),Zy=(0,ho.pU)("parameter-hints-previous",Mi.W6.chevronUp,we.kg("parameterHintsPreviousIcon","Icon for show previous parameter hint."));let Bf=class kC extends at.jG{constructor(e,t,i,s,o){super(),this.editor=e,this.renderDisposeables=this._register(new at.Cm),this.visible=!1,this.announcedLabel=null,this.allowEditorOverflow=!0,this.markdownRenderer=this._register(new Br({editor:e},s,i)),this.model=this._register(new Pf(e,o.signatureHelpProvider)),this.keyVisible=Gd.Visible.bindTo(t),this.keyMultipleSignatures=Gd.MultipleSignatures.bindTo(t),this._register(this.model.onChangedHints(c=>{c?(this.show(),this.render(c)):this.hide()}))}createParameterHintDOMNodes(){const e=fr(".editor-widget.parameter-hints-widget"),t=M.BC(e,fr(".phwrapper"));t.tabIndex=-1;const i=M.BC(t,fr(".controls")),s=M.BC(i,fr(".button"+Ye.L0.asCSSSelector(Zy))),o=M.BC(i,fr(".overloads")),c=M.BC(i,fr(".button"+Ye.L0.asCSSSelector(Qy)));this._register(M.ko(s,"click",Se=>{M.fs.stop(Se),this.previous()})),this._register(M.ko(c,"click",Se=>{M.fs.stop(Se),this.next()}));const m=fr(".body"),A=new ko.MU(m,{alwaysConsumeMouseWheel:!0});this._register(A),t.appendChild(A.getDomNode());const U=M.BC(m,fr(".signature")),W=M.BC(m,fr(".docs"));e.style.userSelect="text",this.domNodes={element:e,signature:U,overloads:o,docs:W,scrollbar:A},this.editor.addContentWidget(this),this.hide(),this._register(this.editor.onDidChangeCursorSelection(Se=>{this.visible&&this.editor.layoutContentWidget(this)}));const re=()=>{if(!this.domNodes)return;const Se=this.editor.getOption(46);this.domNodes.element.style.fontSize=`${Se.fontSize}px`,this.domNodes.element.style.lineHeight=`${Se.lineHeight/Se.fontSize}`};re(),this._register(Vi.Jh.chain(this.editor.onDidChangeConfiguration.bind(this.editor)).filter(Se=>Se.hasChanged(46)).on(re,null)),this._register(this.editor.onDidLayoutChange(Se=>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===void 0||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===void 0||e.element.classList.remove("visible"),this.editor.layoutContentWidget(this))}getPosition(){return this.visible?{position:this.editor.getPosition(),preference:[1,2]}:null}render(e){var t;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 s=e.signatures[e.activeSignature];if(!s)return;const o=M.BC(this.domNodes.signature,fr(".code")),c=this.editor.getOption(46);o.style.fontSize=`${c.fontSize}px`,o.style.fontFamily=c.fontFamily;const m=s.parameters.length>0,A=(t=s.activeParameter)!==null&&t!==void 0?t:e.activeParameter;if(m)this.renderParameters(o,s,A);else{const re=M.BC(o,fr("span"));re.textContent=s.label}const U=s.parameters[A];if(U?.documentation){const re=fr("span.documentation");if(typeof U.documentation=="string")re.textContent=U.documentation;else{const Se=this.renderMarkdownDocs(U.documentation);re.appendChild(Se.element)}M.BC(this.domNodes.docs,fr("p",{},re))}if(s.documentation!==void 0)if(typeof s.documentation=="string")M.BC(this.domNodes.docs,fr("p",{},s.documentation));else{const re=this.renderMarkdownDocs(s.documentation);M.BC(this.domNodes.docs,re.element)}const W=this.hasDocs(s,U);if(this.domNodes.signature.classList.toggle("has-docs",W),this.domNodes.docs.classList.toggle("empty",!W),this.domNodes.overloads.textContent=String(e.activeSignature+1).padStart(e.signatures.length.toString().length,"0")+"/"+e.signatures.length,U){let re="";const Se=s.parameters[A];Array.isArray(Se.label)?re=s.label.substring(Se.label[0],Se.label[1]):re=Se.label,Se.documentation&&(re+=typeof Se.documentation=="string"?`, ${Se.documentation}`:`, ${Se.documentation.value}`),s.documentation&&(re+=typeof s.documentation=="string"?`, ${s.documentation}`:`, ${s.documentation.value}`),this.announcedLabel!==re&&(oi.xE(we.kg("hint","{0}, hint",re)),this.announcedLabel=re)}this.editor.layoutContentWidget(this),this.domNodes.scrollbar.scanDomNode()}renderMarkdownDocs(e){const t=this.renderDisposeables.add(this.markdownRenderer.render(e,{asyncRenderCallback:()=>{var i;(i=this.domNodes)===null||i===void 0||i.scrollbar.scanDomNode()}}));return t.element.classList.add("markdown-docs"),t}hasDocs(e,t){return!!(t&&typeof t.documentation=="string"&&(0,pi.eU)(t.documentation).length>0||t&&typeof t.documentation=="object"&&(0,pi.eU)(t.documentation).value.length>0||e.documentation&&typeof e.documentation=="string"&&(0,pi.eU)(e.documentation).length>0||e.documentation&&typeof e.documentation=="object"&&(0,pi.eU)(e.documentation.value).length>0)}renderParameters(e,t,i){const[s,o]=this.getParameterLabelOffsets(t,i),c=document.createElement("span");c.textContent=t.label.substring(0,s);const m=document.createElement("span");m.textContent=t.label.substring(s,o),m.className="parameter active";const A=document.createElement("span");A.textContent=t.label.substring(o),M.BC(e,c,m,A)}getParameterLabelOffsets(e,t){const i=e.parameters[t];if(i){if(Array.isArray(i.label))return i.label;if(i.label.length){const s=new RegExp(`(\\W|^)${(0,xi.bm)(i.label)}(?=\\W|$)`,"g");s.test(e.label);const o=s.lastIndex-i.label.length;return o>=0?[o,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()}cancel(){this.model.cancel()}getDomNode(){return this.domNodes||this.createParameterHintDOMNodes(),this.domNodes.element}getId(){return kC.ID}trigger(e){this.model.trigger(e,0)}updateMaxHeight(){if(!this.domNodes)return;const t=`${Math.max(this.editor.getLayoutInfo().height/4,250)}px`;this.domNodes.element.style.maxHeight=t;const i=this.domNodes.element.getElementsByClassName("phwrapper");i.length&&(i[0].style.maxHeight=t)}};Bf.ID="editor.widget.parameterHintsWidget",Bf=Gy([Ff(1,ct.fN),Ff(2,Ho.Cr),Ff(3,Fs.L),Ff(4,Zi.u)],Bf);const Yy=(0,Ce.x1A)("editorHoverWidget.highlightForeground",{dark:Ce.QI5,light:Ce.QI5,hcDark:Ce.QI5,hcLight:Ce.QI5},we.kg("editorHoverWidgetHighlightForeground","Foreground color of the active item in the parameter hint."));(0,Ye.zy)((u,e)=>{const t=u.getColor(Ce.oZ8);if(t){const U=(0,Ro.Bb)(u.type)?2:1;e.addRule(`.monaco-editor .parameter-hints-widget { border: ${U}px solid ${t}; }`),e.addRule(`.monaco-editor .parameter-hints-widget.multiple .body { border-left: 1px solid ${t.transparent(.5)}; }`),e.addRule(`.monaco-editor .parameter-hints-widget .signature.has-docs { border-bottom: 1px solid ${t.transparent(.5)}; }`)}const i=u.getColor(Ce.WfR);i&&e.addRule(`.monaco-editor .parameter-hints-widget { background-color: ${i}; }`);const s=u.getColor(Ce.vwp);s&&e.addRule(`.monaco-editor .parameter-hints-widget a { color: ${s}; }`);const o=u.getColor(Ce.FEE);o&&e.addRule(`.monaco-editor .parameter-hints-widget a:hover { color: ${o}; }`);const c=u.getColor(Ce.Xo2);c&&e.addRule(`.monaco-editor .parameter-hints-widget { color: ${c}; }`);const m=u.getColor(Ce.S6W);m&&e.addRule(`.monaco-editor .parameter-hints-widget code { background-color: ${m}; }`);const A=u.getColor(Yy);A&&e.addRule(`.monaco-editor .parameter-hints-widget .parameter.active { color: ${A}}`)});var Xy=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},Jy=function(u,e){return function(t,i){e(t,i,u)}};let Qd=class EC extends at.jG{constructor(e,t){super(),this.editor=e,this.widget=this._register(t.createInstance(Bf,this.editor))}static get(e){return e.getContribution(EC.ID)}cancel(){this.widget.cancel()}previous(){this.widget.previous()}next(){this.widget.next()}trigger(e){this.widget.trigger(e)}};Qd.ID="editor.controller.parameterHints",Qd=Xy([Jy(1,P._Y)],Qd);class qy extends Te.ks{constructor(){super({id:"editor.action.triggerParameterHints",label:we.kg("parameterHints.trigger.label","Trigger Parameter Hints"),alias:"Trigger Parameter Hints",precondition:ze.R.hasSignatureHelpProvider,kbOpts:{kbExpr:ze.R.editorTextFocus,primary:3082,weight:100}})}run(e,t){const i=Qd.get(t);i&&i.trigger({triggerKind:Xe.WA.Invoke})}}(0,Te.HW)(Qd.ID,Qd),(0,Te.Fl)(qy);const Vp=100+75,Hp=Te.DX.bindToContribution(Qd.get);(0,Te.E_)(new Hp({id:"closeParameterHints",precondition:Gd.Visible,handler:u=>u.cancel(),kbOpts:{weight:Vp,kbExpr:ze.R.focus,primary:9,secondary:[1033]}})),(0,Te.E_)(new Hp({id:"showPrevParameterHint",precondition:ct.M$.and(Gd.Visible,Gd.MultipleSignatures),handler:u=>u.previous(),kbOpts:{weight:Vp,kbExpr:ze.R.focus,primary:16,secondary:[528],mac:{primary:16,secondary:[528,302]}}})),(0,Te.E_)(new Hp({id:"showNextParameterHint",precondition:ct.M$.and(Gd.Visible,Gd.MultipleSignatures),handler:u=>u.next(),kbOpts:{weight:Vp,kbExpr:ze.R.focus,primary:18,secondary:[530],mac:{primary:18,secondary:[530,300]}}}));var eL=f(41504),Ak=f(57136),tL=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},zp=function(u,e){return function(t,i){e(t,i,u)}};const Wf=new ct.N1("renameInputVisible",!1,(0,we.kg)("renameInputVisible","Whether the rename input widget is visible"));let Up=class{constructor(e,t,i,s,o){this._editor=e,this._acceptKeybindings=t,this._themeService=i,this._keybindingService=s,this._disposables=new at.Cm,this.allowEditorOverflow=!0,this._visibleContextKey=Wf.bindTo(o),this._editor.addContentWidget(this),this._disposables.add(this._editor.onDidChangeConfiguration(c=>{c.hasChanged(46)&&this._updateFont()})),this._disposables.add(i.onDidColorThemeChange(this._updateStyles,this))}dispose(){this._disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return"__renameInputWidget"}getDomNode(){if(!this._domNode){this._domNode=document.createElement("div"),this._domNode.className="monaco-editor rename-box",this._input=document.createElement("input"),this._input.className="rename-input",this._input.type="text",this._input.setAttribute("aria-label",(0,we.kg)("renameAriaLabel","Rename input. Type new name and press Enter to commit.")),this._domNode.appendChild(this._input),this._label=document.createElement("div"),this._label.className="rename-label",this._domNode.appendChild(this._label);const e=()=>{var t,i;const[s,o]=this._acceptKeybindings;this._keybindingService.lookupKeybinding(s),this._label.innerText=(0,we.kg)({key:"label",comment:['placeholders are keybindings, e.g "F2 to Rename, Shift+F2 to Preview"']},"{0} to Rename, {1} to Preview",(t=this._keybindingService.lookupKeybinding(s))===null||t===void 0?void 0:t.getLabel(),(i=this._keybindingService.lookupKeybinding(o))===null||i===void 0?void 0:i.getLabel())};e(),this._disposables.add(this._keybindingService.onDidUpdateKeybindings(e)),this._updateFont(),this._updateStyles(this._themeService.getColorTheme())}return this._domNode}_updateStyles(e){var t,i,s,o;if(!this._input||!this._domNode)return;const c=e.getColor(Ce.f9l);this._domNode.style.backgroundColor=String((t=e.getColor(Ce.CgL))!==null&&t!==void 0?t:""),this._domNode.style.boxShadow=c?` 0 0 8px 2px ${c}`:"",this._domNode.style.color=String((i=e.getColor(Ce.cws))!==null&&i!==void 0?i:""),this._input.style.backgroundColor=String((s=e.getColor(Ce.L4c))!==null&&s!==void 0?s:"");const m=e.getColor(Ce.Zgs);this._input.style.borderWidth=m?"1px":"0px",this._input.style.borderStyle=m?"solid":"none",this._input.style.borderColor=(o=m?.toString())!==null&&o!==void 0?o:"none"}_updateFont(){if(!this._input||!this._label)return;const e=this._editor.getOption(46);this._input.style.fontFamily=e.fontFamily,this._input.style.fontWeight=e.fontWeight,this._input.style.fontSize=`${e.fontSize}px`,this._label.style.fontSize=`${e.fontSize*.8}px`}getPosition(){return this._visible?{position:this._position,preference:[2,1]}:null}afterRender(e){e||this.cancelInput(!0)}acceptInput(e){var t;(t=this._currentAcceptInput)===null||t===void 0||t.call(this,e)}cancelInput(e){var t;(t=this._currentCancelInput)===null||t===void 0||t.call(this,e)}getInput(e,t,i,s,o,c){this._domNode.classList.toggle("preview",o),this._position=new bi.y(e.startLineNumber,e.startColumn),this._input.value=t,this._input.setAttribute("selectionStart",i.toString()),this._input.setAttribute("selectionEnd",s.toString()),this._input.size=Math.max((e.endColumn-e.startColumn)*1.1,20);const m=new at.Cm;return new Promise(A=>{this._currentCancelInput=U=>(this._currentAcceptInput=void 0,this._currentCancelInput=void 0,A(U),!0),this._currentAcceptInput=U=>{if(this._input.value.trim().length===0||this._input.value===t){this.cancelInput(!0);return}this._currentAcceptInput=void 0,this._currentCancelInput=void 0,A({newName:this._input.value,wantsPreview:o&&U})},m.add(c.onCancellationRequested(()=>this.cancelInput(!0))),m.add(this._editor.onDidBlurEditorWidget(()=>this.cancelInput(!1))),this._show()}).finally(()=>{m.dispose(),this._hide()})}_show(){this._editor.revealLineInCenterIfOutsideViewport(this._position.lineNumber,0),this._visible=!0,this._visibleContextKey.set(!0),this._editor.layoutContentWidget(this),setTimeout(()=>{this._input.focus(),this._input.setSelectionRange(parseInt(this._input.getAttribute("selectionStart")),parseInt(this._input.getAttribute("selectionEnd")))},100)}_hide(){this._visible=!1,this._visibleContextKey.reset(),this._editor.layoutContentWidget(this)}};Up=tL([zp(2,Ye.Gy),zp(3,ye.b),zp(4,ct.fN)],Up);var iL=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},Zd=function(u,e){return function(t,i){e(t,i,u)}},Yd=function(u,e,t,i){function s(o){return o instanceof t?o:new t(function(c){c(o)})}return new(t||(t=Promise))(function(o,c){function m(W){try{U(i.next(W))}catch(re){c(re)}}function A(W){try{U(i.throw(W))}catch(re){c(re)}}function U(W){W.done?o(W.value):s(W.value).then(m,A)}U((i=i.apply(u,e||[])).next())})};class jp{constructor(e,t,i){this.model=e,this.position=t,this._providerRenameIdx=0,this._providers=i.ordered(e)}hasProvider(){return this._providers.length>0}resolveRenameLocation(e){return Yd(this,void 0,void 0,function*(){const t=[];for(this._providerRenameIdx=0;this._providerRenameIdx<this._providers.length;this._providerRenameIdx++){const s=this._providers[this._providerRenameIdx];if(!s.resolveRenameLocation)break;const o=yield s.resolveRenameLocation(this.model,this.position,e);if(o){if(o.rejectReason){t.push(o.rejectReason);continue}return o}}const i=this.model.getWordAtPosition(this.position);return i?{range:new St.Q(this.position.lineNumber,i.startColumn,this.position.lineNumber,i.endColumn),text:i.word,rejectReason:t.length>0?t.join(` `):void 0}:{range:St.Q.fromPositions(this.position),text:"",rejectReason:t.length>0?t.join(` `):void 0}})}provideRenameEdits(e,t){return Yd(this,void 0,void 0,function*(){return this._provideRenameEdits(e,this._providerRenameIdx,[],t)})}_provideRenameEdits(e,t,i,s){return Yd(this,void 0,void 0,function*(){const o=this._providers[t];if(!o)return{edits:[],rejectReason:i.join(` `)};const c=yield o.provideRenameEdits(this.model,this.position,e,s);if(c){if(c.rejectReason)return this._provideRenameEdits(e,t+1,i.concat(c.rejectReason),s)}else return this._provideRenameEdits(e,t+1,i.concat(we.kg("no result","No result.")),s);return c})}}function nL(u,e,t,i){return Yd(this,void 0,void 0,function*(){const s=new jp(e,t,u),o=yield s.resolveRenameLocation(Ti.X.None);return o?.rejectReason?{edits:[],rejectReason:o.rejectReason}:s.provideRenameEdits(i,Ti.X.None)})}let Xd=class xC{constructor(e,t,i,s,o,c,m,A){this.editor=e,this._instaService=t,this._notificationService=i,this._bulkEditService=s,this._progressService=o,this._logService=c,this._configService=m,this._languageFeaturesService=A,this._disposableStore=new at.Cm,this._cts=new Ti.Q,this._renameInputField=this._disposableStore.add(new Ot.kb(()=>this._disposableStore.add(this._instaService.createInstance(Up,this.editor,["acceptRenameInput","acceptRenameInputWithPreview"]))))}static get(e){return e.getContribution(xC.ID)}dispose(){this._disposableStore.dispose(),this._cts.dispose(!0)}run(){var e,t;return Yd(this,void 0,void 0,function*(){if(this._cts.dispose(!0),!this.editor.hasModel())return;const i=this.editor.getPosition(),s=new jp(this.editor.getModel(),i,this._languageFeaturesService.renameProvider);if(!s.hasProvider())return;this._cts=new Gn.gI(this.editor,5);let o;try{const Se=s.resolveRenameLocation(this._cts.token);this._progressService.showWhile(Se,250),o=yield Se}catch(Se){(e=is.get(this.editor))===null||e===void 0||e.showMessage(Se||we.kg("resolveRenameLocationFailed","An unknown error occurred while resolving rename location"),i);return}if(!o)return;if(o.rejectReason){(t=is.get(this.editor))===null||t===void 0||t.showMessage(o.rejectReason,i);return}if(this._cts.token.isCancellationRequested)return;this._cts.dispose(),this._cts=new Gn.gI(this.editor,5,o.range);const c=this.editor.getSelection();let m=0,A=o.text.length;!St.Q.isEmpty(c)&&!St.Q.spansMultipleLines(c)&&St.Q.containsRange(o.range,c)&&(m=Math.max(0,c.startColumn-o.range.startColumn),A=Math.min(o.range.endColumn,c.endColumn)-o.range.startColumn);const U=this._bulkEditService.hasPreviewHandler()&&this._configService.getValue(this.editor.getModel().uri,"editor.rename.enablePreview"),W=yield this._renameInputField.value.getInput(o.range,o.text,m,A,U,this._cts.token);if(typeof W=="boolean"){W&&this.editor.focus();return}this.editor.focus();const re=(0,Ot.PK)(s.provideRenameEdits(W.newName,this._cts.token),this._cts.token).then(Se=>Yd(this,void 0,void 0,function*(){if(!(!Se||!this.editor.hasModel())){if(Se.rejectReason){this._notificationService.info(Se.rejectReason);return}this.editor.setSelection(St.Q.fromPositions(this.editor.getSelection().getPosition())),this._bulkEditService.apply(os.jN.convert(Se),{editor:this.editor,showPreview:W.wantsPreview,label:we.kg("label","Renaming '{0}' to '{1}'",o?.text,W.newName),code:"undoredo.rename",quotableLabel:we.kg("quotableLabel","Renaming {0} to {1}",o?.text,W.newName),respectAutoSaveConfig:!0}).then(Be=>{Be.ariaSummary&&(0,oi.xE)(we.kg("aria","Successfully renamed '{0}' to '{1}'. Summary: {2}",o.text,W.newName,Be.ariaSummary))}).catch(Be=>{this._notificationService.error(we.kg("rename.failedApply","Rename failed to apply edits")),this._logService.error(Be)})}}),Se=>{this._notificationService.error(we.kg("rename.failed","Rename failed to compute edits")),this._logService.error(Se)});return this._progressService.showWhile(re,250),re})}acceptRenameInput(e){this._renameInputField.value.acceptInput(e)}cancelRenameInput(){this._renameInputField.value.cancelInput(!0)}};Xd.ID="editor.contrib.renameController",Xd=iL([Zd(1,P._Y),Zd(2,Cs.Ot),Zd(3,os.nu),Zd(4,ks.N8),Zd(5,xs.rr),Zd(6,eL.U),Zd(7,Zi.u)],Xd);class sL extends Te.ks{constructor(){super({id:"editor.action.rename",label:we.kg("rename.label","Rename Symbol"),alias:"Rename Symbol",precondition:ct.M$.and(ze.R.writable,ze.R.hasRenameProvider),kbOpts:{kbExpr:ze.R.editorTextFocus,primary:60,weight:100},contextMenuOpts:{group:"1_modification",order:1.1}})}runCommand(e,t){const i=e.get(Gi.T),[s,o]=Array.isArray(t)&&t||[void 0,void 0];return vn.r.isUri(s)&&bi.y.isIPosition(o)?i.openCodeEditor({resource:s},i.getActiveCodeEditor()).then(c=>{c&&(c.setPosition(o),c.invokeWithinContext(m=>(this.reportTelemetry(m,c),this.run(m,c))))},Wi.dz):super.runCommand(e,t)}run(e,t){const i=Xd.get(t);return i?i.run():Promise.resolve()}}(0,Te.HW)(Xd.ID,Xd),(0,Te.Fl)(sL);const Kp=Te.DX.bindToContribution(Xd.get);(0,Te.E_)(new Kp({id:"acceptRenameInput",precondition:Wf,handler:u=>u.acceptRenameInput(!1),kbOpts:{weight:100+99,kbExpr:ze.R.focus,primary:3}})),(0,Te.E_)(new Kp({id:"acceptRenameInputWithPreview",precondition:ct.M$.and(Wf,ct.M$.has("config.editor.rename.enablePreview")),handler:u=>u.acceptRenameInput(!0),kbOpts:{weight:100+99,kbExpr:ze.R.focus,primary:1024+3}})),(0,Te.E_)(new Kp({id:"cancelRenameInput",precondition:Wf,handler:u=>u.cancelRenameInput(),kbOpts:{weight:100+99,kbExpr:ze.R.focus,primary:9,secondary:[1033]}})),(0,Te.ke)("_executeDocumentRenameProvider",function(u,e,t,...i){const[s]=i;(0,pi.j)(typeof s=="string");const{renameProvider:o}=u.get(Zi.u);return nL(o,e,t,s)}),(0,Te.ke)("_executePrepareRename",function(u,e,t){return Yd(this,void 0,void 0,function*(){const{renameProvider:i}=u.get(Zi.u),o=yield new jp(e,t,i).resolveRenameLocation(Ti.X.None);if(o?.rejectReason)throw new Error(o.rejectReason);return o})}),So.O.as(Rr.Fd.Configuration).registerConfiguration({id:"editor",properties:{"editor.rename.enablePreview":{scope:5,description:we.kg("enablePreview","Enable/disable the ability to preview changes before renaming"),default:!0,type:"boolean"}}});var oL=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},rL=function(u,e){return function(t,i){e(t,i,u)}},av=function(u,e,t,i){function s(o){return o instanceof t?o:new t(function(c){c(o)})}return new(t||(t=Promise))(function(o,c){function m(W){try{U(i.next(W))}catch(re){c(re)}}function A(W){try{U(i.throw(W))}catch(re){c(re)}}function U(W){W.done?o(W.value):s(W.value).then(m,A)}U((i=i.apply(u,e||[])).next())})},$p;let Pu=class extends at.jG{constructor(e,t){super(),this._sessionStore=new at.Cm,this._ranges=[],this._rangesVersionId=0,this._editor=e,this._languageFeaturesService=t,this.stickyScrollWidget=new aL(this._editor),this._register(this._editor.onDidChangeConfiguration(i=>{i.hasChanged(34)&&this.onConfigurationChange()})),this._updateSoon=this._register(new Ot.uC(()=>this._update(!0),50)),this.onConfigurationChange()}onConfigurationChange(){if(this._editor.getOption(34).stickyScroll.enabled===!1){this.stickyScrollWidget.emptyRootNode(),this._editor.removeOverlayWidget(this.stickyScrollWidget),this._sessionStore.clear();return}else this._editor.addOverlayWidget(this.stickyScrollWidget),this._sessionStore.add(this._editor.onDidChangeModel(()=>this._update(!0))),this._sessionStore.add(this._editor.onDidScrollChange(()=>this._update(!1))),this._sessionStore.add(this._editor.onDidChangeHiddenAreas(()=>this._update(!0))),this._sessionStore.add(this._editor.onDidChangeModelTokens(t=>this._onTokensChange(t))),this._sessionStore.add(this._editor.onDidChangeModelContent(()=>this._updateSoon.schedule())),this._sessionStore.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(()=>this._update(!0))),this._update(!0)}_needsUpdate(e){const t=this.stickyScrollWidget.getCurrentLines();for(const i of t)for(const s of e.ranges)if(i>=s.fromLineNumber&&i<=s.toLineNumber)return!0;return!1}_onTokensChange(e){this._needsUpdate(e)&&this._update(!1)}_update(e=!1){var t,i;return av(this,void 0,void 0,function*(){e&&((t=this._cts)===null||t===void 0||t.dispose(!0),this._cts=new Ti.Q,yield this._updateOutlineModel(this._cts.token));const s=(i=this._editor._getViewModel())===null||i===void 0?void 0:i.getHiddenAreas();if(s)for(const o of s)this._ranges=this._ranges.filter(c=>!(c[0]>=o.startLineNumber&&c[1]<=o.endLineNumber+1));this._renderStickyScroll()})}_findLineRanges(e,t){if(e?.children.size){let i=!1;for(const s of e?.children.values()){const o=s.symbol.kind;(o===4||o===8||o===11||o===10||o===5||o===1)&&(i=!0,this._findLineRanges(s,t+1))}i||this._addOutlineRanges(e,t)}else this._addOutlineRanges(e,t)}_addOutlineRanges(e,t){let i=0,s=0;for(;e;){const o=e.symbol.kind;if((o===4||o===8||o===11||o===10||o===5||o===1)&&(i=e?.symbol.range.startLineNumber,s=e?.symbol.range.endLineNumber,this._ranges.push([i,s,t]),t--),e.parent instanceof hf)e=e.parent;else break}}_updateOutlineModel(e){return av(this,void 0,void 0,function*(){if(this._editor.hasModel()){const t=this._editor.getModel(),i=t.getVersionId(),s=yield ol.create(this._languageFeaturesService.documentSymbolProvider,t,e);if(e.isCancellationRequested)return;this._ranges=[],this._rangesVersionId=i;for(const o of s.children.values()){if(o instanceof hf){const m=o.symbol.kind;m===4||m===8||m===11||m===10||m===5||m===1?this._findLineRanges(o,1):this._findLineRanges(o,0)}this._ranges=this._ranges.sort(function(m,A){return m[0]!==A[0]?m[0]-A[0]:m[1]!==A[1]?A[1]-m[1]:m[2]-A[2]});let c=[];for(const[m,A]of this._ranges.entries()){const[U,W,re]=A;c[0]===U&&c[1]===W?this._ranges.splice(m,1):c=A}}}})}_renderStickyScroll(){if(!this._editor.hasModel())return;const e=this._editor.getOption(61),t=this._editor.getModel();if(this._rangesVersionId!==t.getVersionId())return;const i=this._editor.getScrollTop();this.stickyScrollWidget.emptyRootNode();const s=new Set;for(const[o,c]of this._ranges.entries()){const[m,A,U]=c;if(A-m>0&&t.getLineContent(m)!==""){const W=(U-1)*e,re=U*e,Se=this._editor.getBottomForLineNumber(m)-i,Be=this._editor.getTopForLineNumber(A)-i,Qe=this._editor.getBottomForLineNumber(A)-i;if(s.has(m))this._ranges.splice(o,1);else if(W>=Be-1&&W<Qe-2){s.add(m),this.stickyScrollWidget.pushCodeLine(new dv(m,U,this._editor,-1,Qe-re));break}else re>Se&&re<Qe-1&&(s.add(m),this.stickyScrollWidget.pushCodeLine(new dv(m,U,this._editor,0,0)))}}this.stickyScrollWidget.updateRootNode()}dispose(){super.dispose(),this._sessionStore.dispose()}};Pu.ID="store.contrib.stickyScrollController",Pu=oL([rL(1,Zi.u)],Pu);const lv=($p=window.trustedTypes)===null||$p===void 0?void 0:$p.createPolicy("stickyScrollViewLayer",{createHTML:u=>u});class dv{constructor(e,t,i,s,o){this._lineNumber=e,this._depth=t,this._editor=i,this._zIndex=s,this._relativePosition=o,this.effectiveLineHeight=0,this.effectiveLineHeight=this._editor.getOption(61)+this._relativePosition}get lineNumber(){return this._lineNumber}getDomNode(){const e=document.createElement("div"),t=this._editor._getViewModel(),i=t.coordinatesConverter.convertModelPositionToViewPosition(new bi.y(this._lineNumber,1)).lineNumber,s=t.getViewLineRenderingData(i);let o;try{o=Dp.d.filter(s.inlineDecorations,i,s.minColumn,s.maxColumn)}catch{o=[]}const c=new wf.zL(!0,!0,s.content,s.continuesWithWrappedLine,s.isBasicASCII,s.containsRTL,0,s.tokens,o,s.tabSize,s.startVisibleColumn,1,1,1,100,"none",!0,!0,null),m=(0,T0.Du)(400);(0,wf.UW)(c,m);let A;lv?A=lv.createHTML(m.build()):A=m.build();const U=document.createElement("span");U.style.backgroundColor="var(--vscode-editorStickyScroll-background)",U.style.overflow="hidden",U.style.whiteSpace="nowrap",U.style.display="inline-block",U.style.lineHeight=this._editor.getOption(61).toString()+"px",U.innerHTML=A;const W=document.createElement("span");W.style.width=this._editor.getLayoutInfo().contentLeft.toString()+"px",W.style.backgroundColor="var(--vscode-editorStickyScroll-background)",W.style.color="var(--vscode-editorLineNumber-foreground)",W.style.display="inline-block",W.style.lineHeight=this._editor.getOption(61).toString()+"px";const re=document.createElement("span");return re.innerText=this._lineNumber.toString(),re.style.paddingLeft=this._editor.getLayoutInfo().lineNumbersLeft.toString()+"px",re.style.width=this._editor.getLayoutInfo().lineNumbersWidth.toString()+"px",re.style.backgroundColor="var(--vscode-editorStickyScroll-background)",re.style.textAlign="right",re.style.float="left",re.style.lineHeight=this._editor.getOption(61).toString()+"px",W.appendChild(re),e.onclick=Se=>{Se.stopPropagation(),Se.preventDefault(),this._editor.revealPosition({lineNumber:this._lineNumber-this._depth+1,column:1})},e.onmouseover=Se=>{re.style.background="var(--vscode-editorStickyScrollHover-background)",U.style.backgroundColor="var(--vscode-editorStickyScrollHover-background)",W.style.backgroundColor="var(--vscode-editorStickyScrollHover-background)",e.style.backgroundColor="var(--vscode-editorStickyScrollHover-background)",re.style.cursor="pointer",U.style.cursor="pointer",e.style.cursor="pointer",W.style.cursor="pointer"},e.onmouseleave=Se=>{re.style.background="var(--vscode-editorStickyScroll-background)",U.style.backgroundColor="var(--vscode-editorStickyScroll-background)",W.style.backgroundColor="var(--vscode-editorStickyScroll-background)",e.style.backgroundColor="var(--vscode-editorStickyScroll-background)"},this._editor.applyFontInfo(U),this._editor.applyFontInfo(re),e.appendChild(W),e.appendChild(U),e.style.zIndex=this._zIndex.toString(),e.style.backgroundColor="var(--vscode-editorStickyScroll-background)",e.style.overflow="hidden",e.style.whiteSpace="nowrap",e.style.width="100%",e.style.lineHeight=this._editor.getOption(61).toString()+"px",e.style.height=this._editor.getOption(61).toString()+"px",this._relativePosition&&(e.style.position="relative",e.style.top=this._relativePosition+"px",e.style.width="100%"),e}}class aL{constructor(e){this._editor=e,this.arrayOfCodeLines=[],this.rootDomNode=document.createElement("div"),this.rootDomNode=document.createElement("div"),this.rootDomNode.style.width="100%",this.rootDomNode.style.boxShadow="var(--vscode-scrollbar-shadow) 0 6px 6px -6px"}getCurrentLines(){const e=[];for(const t of this.arrayOfCodeLines)e.push(t.lineNumber);return e}pushCodeLine(e){this.arrayOfCodeLines.push(e)}updateRootNode(){let e=0;for(const t of this.arrayOfCodeLines)e+=t.effectiveLineHeight,this.rootDomNode.appendChild(t.getDomNode());this.rootDomNode.style.height=e.toString()+"px"}emptyRootNode(){this.arrayOfCodeLines.length=0,M.w_(this.rootDomNode)}getId(){return"editor.contrib.stickyScrollWidget"}getDomNode(){return this.rootDomNode.style.zIndex="2",this.rootDomNode.style.backgroundColor="var(--vscode-editorStickyScroll-background)",this.rootDomNode}getPosition(){return{preference:null}}}(0,Te.HW)(Pu.ID,Pu);class lL{provideSelectionRanges(e,t){const i=[];for(const s of t){const o=[];i.push(o),this._addInWordRanges(o,e,s),this._addWordRanges(o,e,s),this._addWhitespaceLine(o,e,s),o.push({range:e.getFullModelRange()})}return i}_addInWordRanges(e,t,i){const s=t.getWordAtPosition(i);if(!s)return;const{word:o,startColumn:c}=s,m=i.column-c;let A=m,U=m,W=0;for(;A>=0;A--){const re=o.charCodeAt(A);if(A!==m&&(re===95||re===45))break;if((0,xi.Lv)(re)&&(0,xi.Wv)(W))break;W=re}for(A+=1;U<o.length;U++){const re=o.charCodeAt(U);if((0,xi.Wv)(re)&&(0,xi.Lv)(W))break;if(re===95||re===45)break;W=re}A<U&&e.push({range:new St.Q(i.lineNumber,c+A,i.lineNumber,c+U)})}_addWordRanges(e,t,i){const s=t.getWordAtPosition(i);s&&e.push({range:new St.Q(i.lineNumber,s.startColumn,i.lineNumber,s.endColumn)})}_addWhitespaceLine(e,t,i){t.getLineLength(i.lineNumber)>0&&t.getLineFirstNonWhitespaceColumn(i.lineNumber)===0&&t.getLineLastNonWhitespaceColumn(i.lineNumber)===0&&e.push({range:new St.Q(i.lineNumber,1,i.lineNumber,t.getLineMaxColumn(i.lineNumber))})}}var dL=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},cL=function(u,e){return function(t,i){e(t,i,u)}},Vf=function(u,e,t,i){function s(o){return o instanceof t?o:new t(function(c){c(o)})}return new(t||(t=Promise))(function(o,c){function m(W){try{U(i.next(W))}catch(re){c(re)}}function A(W){try{U(i.throw(W))}catch(re){c(re)}}function U(W){W.done?o(W.value):s(W.value).then(m,A)}U((i=i.apply(u,e||[])).next())})};class Gp{constructor(e,t){this.index=e,this.ranges=t}mov(e){const t=this.index+(e?1:-1);if(t<0||t>=this.ranges.length)return this;const i=new Gp(t,this.ranges);return i.ranges[t].equalsRange(this.ranges[this.index])?i.mov(e):i}}let uh=class IC{constructor(e,t){this._editor=e,this._languageFeaturesService=t,this._ignoreSelection=!1}static get(e){return e.getContribution(IC.ID)}dispose(){var e;(e=this._selectionListener)===null||e===void 0||e.dispose()}run(e){return Vf(this,void 0,void 0,function*(){if(!this._editor.hasModel())return;const t=this._editor.getSelections(),i=this._editor.getModel();if(this._state||(yield hv(this._languageFeaturesService.selectionRangeProvider,i,t.map(o=>o.getPosition()),this._editor.getOption(104),Ti.X.None).then(o=>{var c;if(!(!cn.EI(o)||o.length!==t.length)&&!(!this._editor.hasModel()||!cn.aI(this._editor.getSelections(),t,(m,A)=>m.equalsSelection(A)))){for(let m=0;m<o.length;m++)o[m]=o[m].filter(A=>A.containsPosition(t[m].getStartPosition())&&A.containsPosition(t[m].getEndPosition())),o[m].unshift(t[m]);this._state=o.map(m=>new Gp(0,m)),(c=this._selectionListener)===null||c===void 0||c.dispose(),this._selectionListener=this._editor.onDidChangeCursorPosition(()=>{var m;this._ignoreSelection||((m=this._selectionListener)===null||m===void 0||m.dispose(),this._state=void 0)})}})),!this._state)return;this._state=this._state.map(o=>o.mov(e));const s=this._state.map(o=>ki.L.fromPositions(o.ranges[o.index].getStartPosition(),o.ranges[o.index].getEndPosition()));this._ignoreSelection=!0;try{this._editor.setSelections(s)}finally{this._ignoreSelection=!1}})}};uh.ID="editor.contrib.smartSelectController",uh=dL([cL(1,Zi.u)],uh);class cv extends Te.ks{constructor(e,t){super(t),this._forward=e}run(e,t){return Vf(this,void 0,void 0,function*(){const i=uh.get(t);i&&(yield i.run(this._forward))})}}class hL extends cv{constructor(){super(!0,{id:"editor.action.smartSelect.expand",label:we.kg("smartSelect.expand","Expand Selection"),alias:"Expand Selection",precondition:void 0,kbOpts:{kbExpr:ze.R.editorTextFocus,primary:1553,mac:{primary:3345,secondary:[1297]},weight:100},menuOpts:{menuId:xe.D8.MenubarSelectionMenu,group:"1_basic",title:we.kg({key:"miSmartSelectGrow",comment:["&& denotes a mnemonic"]},"&&Expand Selection"),order:2}})}}fn.wb.registerCommandAlias("editor.action.smartSelect.grow","editor.action.smartSelect.expand");class uL extends cv{constructor(){super(!1,{id:"editor.action.smartSelect.shrink",label:we.kg("smartSelect.shrink","Shrink Selection"),alias:"Shrink Selection",precondition:void 0,kbOpts:{kbExpr:ze.R.editorTextFocus,primary:1551,mac:{primary:3343,secondary:[1295]},weight:100},menuOpts:{menuId:xe.D8.MenubarSelectionMenu,group:"1_basic",title:we.kg({key:"miSmartSelectShrink",comment:["&& denotes a mnemonic"]},"&&Shrink Selection"),order:3}})}}(0,Te.HW)(uh.ID,uh),(0,Te.Fl)(hL),(0,Te.Fl)(uL);function hv(u,e,t,i,s){return Vf(this,void 0,void 0,function*(){const o=u.all(e).concat(new lL);o.length===1&&o.unshift(new gr);const c=[],m=[];for(const A of o)c.push(Promise.resolve(A.provideSelectionRanges(e,t,s)).then(U=>{if(cn.EI(U)&&U.length===t.length)for(let W=0;W<t.length;W++){m[W]||(m[W]=[]);for(const re of U[W])St.Q.isIRange(re.range)&&St.Q.containsPosition(re.range,t[W])&&m[W].push(St.Q.lift(re.range))}},Wi.M_));return yield Promise.all(c),m.map(A=>{if(A.length===0)return[];A.sort((Se,Be)=>bi.y.isBefore(Se.getStartPosition(),Be.getStartPosition())?1:bi.y.isBefore(Be.getStartPosition(),Se.getStartPosition())||bi.y.isBefore(Se.getEndPosition(),Be.getEndPosition())?-1:bi.y.isBefore(Be.getEndPosition(),Se.getEndPosition())?1:0);const U=[];let W;for(const Se of A)(!W||St.Q.containsRange(Se,W)&&!St.Q.equalsRange(Se,W))&&(U.push(Se),W=Se);if(!i.selectLeadingAndTrailingWhitespace)return U;const re=[U[0]];for(let Se=1;Se<U.length;Se++){const Be=U[Se-1],Qe=U[Se];if(Qe.startLineNumber!==Be.startLineNumber||Qe.endLineNumber!==Be.endLineNumber){const tt=new St.Q(Be.startLineNumber,e.getLineFirstNonWhitespaceColumn(Be.startLineNumber),Be.endLineNumber,e.getLineLastNonWhitespaceColumn(Be.endLineNumber));tt.containsRange(Be)&&!tt.equalsRange(Be)&&Qe.containsRange(tt)&&!Qe.equalsRange(tt)&&re.push(tt);const vt=new St.Q(Be.startLineNumber,1,Be.endLineNumber,e.getLineMaxColumn(Be.endLineNumber));vt.containsRange(Be)&&!vt.equalsRange(tt)&&Qe.containsRange(vt)&&!Qe.equalsRange(vt)&&re.push(vt)}re.push(Qe)}return re})})}fn.wb.registerCommand("_executeSelectionRangeProvider",function(u,...e){return Vf(this,void 0,void 0,function*(){const[t,i]=e;(0,pi.j)(vn.r.isUri(t));const s=u.get(Zi.u).selectionRangeProvider,o=yield u.get(Hs.b).createModelReference(t);try{return hv(s,o.object.textEditorModel,i,{selectLeadingAndTrailingWhitespace:!0},Ti.X.None)}finally{o.dispose()}})});var gL=f(42783),Qp=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},Jd=function(u,e){return function(t,i){e(t,i,u)}},fL=function(u,e,t,i){function s(o){return o instanceof t?o:new t(function(c){c(o)})}return new(t||(t=Promise))(function(o,c){function m(W){try{U(i.next(W))}catch(re){c(re)}}function A(W){try{U(i.throw(W))}catch(re){c(re)}}function U(W){W.done?o(W.value):s(W.value).then(m,A)}U((i=i.apply(u,e||[])).next())})};class mL{constructor(e,t,i,s,o,c){this.range=e,this.insertText=t,this.filterText=i,this.additionalTextEdits=s,this.command=o,this.completion=c}}let Zp=class extends at.mp{constructor(e,t,i,s,o,c){super(o.disposable),this.model=e,this.line=t,this.word=i,this.completionModel=s,this._suggestMemoryService=c}canBeReused(e,t,i){return this.model===e&&this.line===t&&this.word.word.length>0&&this.word.startColumn===i.startColumn&&this.word.endColumn<i.endColumn&&this.completionModel.incomplete.size===0}get items(){var e;const t=[],{items:i}=this.completionModel,s=this._suggestMemoryService.select(this.model,{lineNumber:this.line,column:this.word.endColumn+this.completionModel.lineContext.characterCountDelta},i),o=wu.f.slice(i,s),c=wu.f.slice(i,0,s);let m=5;for(const A of wu.f.concat(o,c)){if(A.score===Qi.ne.Default)continue;const U=new St.Q(A.editStart.lineNumber,A.editStart.column,A.editInsertEnd.lineNumber,A.editInsertEnd.column+this.completionModel.lineContext.characterCountDelta),W=A.completion.insertTextRules&&A.completion.insertTextRules&gL._E.InsertAsSnippet?{snippet:A.completion.insertText}:A.completion.insertText;t.push(new mL(U,W,(e=A.filterTextLow)!==null&&e!==void 0?e:A.labelLow,A.completion.additionalTextEdits,A.completion.command,A)),m-->=0&&A.resolve(Ti.X.None)}return t}};Zp=Qp([Jd(5,mf)],Zp);let Yp=class{constructor(e,t,i,s){this._getEditorOption=e,this._languageFeatureService=t,this._clipboardService=i,this._suggestMemoryService=s}provideInlineCompletions(e,t,i,s){var o;return fL(this,void 0,void 0,function*(){if(i.selectedSuggestionInfo)return;const c=this._getEditorOption(81,e);if(Hl.isAllOff(c))return;e.tokenization.tokenizeIfCheap(t.lineNumber);const m=e.tokenization.getLineTokens(t.lineNumber),A=m.getStandardTokenType(m.findTokenIndexAtOffset(Math.max(t.column-1-1,0)));if(Hl.valueFor(c,A)!=="inline")return;let U=e.getWordAtPosition(t),W;if(U?.word||(W=this._getTriggerCharacterInfo(e,t)),!U?.word&&!W||(U||(U=e.getWordUntilPosition(t)),U.endColumn!==t.column))return;let re;const Se=e.getValueInRange(new St.Q(t.lineNumber,1,t.lineNumber,t.column));if(!W&&(!((o=this._lastResult)===null||o===void 0)&&o.canBeReused(e,t.lineNumber,U))){const Be=new E0(Se,t.column-this._lastResult.word.endColumn);this._lastResult.completionModel.lineContext=Be,this._lastResult.acquire(),re=this._lastResult}else{const Be=yield Gh(this._languageFeatureService.completionProvider,e,t,new Id(void 0,void 0,W?.providers),W&&{triggerKind:1,triggerCharacter:W.ch},s);let Qe;Be.needsClipboard&&(Qe=yield this._clipboardService.readText());const tt=new Xl(Be.items,t.column,new E0(Se,0),aa.None,this._getEditorOption(108,e),this._getEditorOption(103,e),{boostFullMatch:!1,firstMatchCanBeWeak:!1},Qe);re=new Zp(e,t.lineNumber,U,tt,Be,this._suggestMemoryService)}return this._lastResult=re,re})}handleItemDidShow(e,t){t.completion.resolve(Ti.X.None)}freeInlineCompletions(e){e.release()}_getTriggerCharacterInfo(e,t){var i;const s=e.getValueInRange(St.Q.fromPositions({lineNumber:t.lineNumber,column:t.column-1},t)),o=new Set;for(const c of this._languageFeatureService.completionProvider.all(e))!((i=c.triggerCharacters)===null||i===void 0)&&i.includes(s)&&o.add(c);if(o.size!==0)return{providers:o,ch:s}}};Yp=Qp([Jd(1,Zi.u),Jd(2,Oi.h),Jd(3,mf)],Yp);let Hf=class Ih{constructor(e,t,i,s){if(++Ih._counter===1){const o=s.createInstance(Yp,(c,m)=>{var A;return((A=i.listCodeEditors().find(W=>W.getModel()===m))!==null&&A!==void 0?A:e).getOption(c)});Ih._disposable=t.inlineCompletionsProvider.register("*",o)}}dispose(){var e;--Ih._counter===0&&((e=Ih._disposable)===null||e===void 0||e.dispose(),Ih._disposable=void 0)}};Hf._counter=0,Hf=Qp([Jd(1,Zi.u),Jd(2,Gi.T),Jd(3,P._Y)],Hf),(0,Te.HW)("suggest.inlineCompletionsProvider",Hf);class pL extends Te.ks{constructor(){super({id:"editor.action.forceRetokenize",label:we.kg("forceRetokenize","Developer: Force Retokenize"),alias:"Developer: Force Retokenize",precondition:void 0})}run(e,t){if(!t.hasModel())return;const i=t.getModel();i.tokenization.resetTokenization();const s=new Ys.W(!0);i.tokenization.forceTokenization(i.getLineCount()),s.stop(),console.log(`tokenization took ${s.elapsed()}`)}}(0,Te.Fl)(pL);var uv=f(25155);class gh extends Te.ks{constructor(){super({id:gh.ID,label:we.kg({key:"toggle.tabMovesFocus",comment:["Turn on/off use of tab key for moving focus around VS Code"]},"Toggle Tab Key Moves Focus"),alias:"Toggle Tab Key Moves Focus",precondition:void 0,kbOpts:{kbExpr:null,primary:2091,mac:{primary:1323},weight:100}})}run(e,t){const s=!uv.M.getTabFocusMode();uv.M.setTabFocusMode(s),s?(0,oi.xE)(we.kg("toggle.tabMovesFocus.on","Pressing Tab will now move focus to the next focusable element")):(0,oi.xE)(we.kg("toggle.tabMovesFocus.off","Pressing Tab will now insert the tab character"))}}gh.ID="editor.action.toggleTabFocusMode",(0,Te.Fl)(gh);var Ok=f(91856),gv=f(49887),fh=f(31430),Pk=f(82788),_L=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},vL=function(u,e){return function(t,i){e(t,i,u)}};let Xp=class extends at.jG{constructor(e,t,i={},s){var o;super(),this._link=t,this._enabled=!0,this.el=(0,M.BC)(e,(0,M.$)("a.monaco-link",{tabIndex:(o=t.tabIndex)!==null&&o!==void 0?o:0,href:t.href,title:t.title},t.label)),this.el.setAttribute("role","button");const c=this._register(new Md.f(this.el,"click")),m=this._register(new Md.f(this.el,"keypress")),A=Vi.Jh.chain(m.event).map(re=>new yr.Z(re)).filter(re=>re.keyCode===3).event,U=this._register(new Md.f(this.el,In.B.Tap)).event;this._register(In.q.addTarget(this.el));const W=Vi.Jh.any(c.event,A,U);this._register(W(re=>{this.enabled&&(M.fs.stop(re,!0),i?.opener?i.opener(this._link.href):s.open(this._link.href,{allowCommands:!0}))})),this.enabled=!0}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}};Xp=_L([vL(3,Ho.Cr)],Xp),(0,Ye.zy)((u,e)=>{const t=u.getColor(Ce.vwp);t&&e.addRule(`.monaco-link { color: ${t}; }`);const i=u.getColor(Ce.FEE);i&&e.addRule(`.monaco-link:hover { color: ${i}; }`)});var fv=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},mv=function(u,e){return function(t,i){e(t,i,u)}};const CL=26;let Jp=class extends at.jG{constructor(e,t){super(),this._editor=e,this.instantiationService=t,this.banner=this._register(this.instantiationService.createInstance(qp))}hide(){this._editor.setBanner(null,0),this.banner.clear()}show(e){this.banner.show(Object.assign(Object.assign({},e),{onClose:()=>{var t;this.hide(),(t=e.onClose)===null||t===void 0||t.call(e)}})),this._editor.setBanner(this.banner.element,CL)}};Jp=fv([mv(1,P._Y)],Jp);let qp=class extends at.jG{constructor(e){super(),this.instantiationService=e,this.markdownRenderer=this.instantiationService.createInstance(Br,{}),this.element=(0,M.$)("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 t=(0,M.$)("span");return t.innerText=e,t}return this.markdownRenderer.render(e).element}clear(){(0,M.w_)(this.element)}show(e){(0,M.w_)(this.element);const t=this.getAriaLabel(e);t&&this.element.setAttribute("aria-label",t);const i=(0,M.BC)(this.element,(0,M.$)("div.icon-container"));i.setAttribute("aria-hidden","true"),e.icon&&i.appendChild((0,M.$)(`div${Ye.L0.asCSSSelector(e.icon)}`));const s=(0,M.BC)(this.element,(0,M.$)("div.message-container"));if(s.setAttribute("aria-hidden","true"),s.appendChild(this.getBannerMessage(e.message)),this.messageActionsContainer=(0,M.BC)(this.element,(0,M.$)("div.message-actions-container")),e.actions)for(const c of e.actions)this._register(this.instantiationService.createInstance(Xp,this.messageActionsContainer,Object.assign(Object.assign({},c),{tabIndex:-1}),{}));const o=(0,M.BC)(this.element,(0,M.$)("div.action-container"));this.actionBar=this._register(new Zr.E(o)),this.actionBar.push(this._register(new p.rc("banner.close","Close Banner",Ye.L0.asClassName(ho.$_),!0,()=>{typeof e.onClose=="function"&&e.onClose()})),{icon:!0,label:!1}),this.actionBar.setFocusable(!1)}};qp=fv([mv(0,P._Y)],qp);var bL=f(84657),e_=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},mh=function(u,e){return function(t,i){e(t,i,u)}},xo=function(u,e,t,i){function s(o){return o instanceof t?o:new t(function(c){c(o)})}return new(t||(t=Promise))(function(o,c){function m(W){try{U(i.next(W))}catch(re){c(re)}}function A(W){try{U(i.throw(W))}catch(re){c(re)}}function U(W){W.done?o(W.value):s(W.value).then(m,A)}U((i=i.apply(u,e||[])).next())})};const wL=(0,ho.pU)("extensions-warning-message",Mi.W6.warning,we.kg("warningIcon","Icon shown with a warning message in the extensions editor."));let ph=class extends at.jG{constructor(e,t,i,s){super(),this._editor=e,this._editorWorkerService=t,this._workspaceTrustService=i,this._highlighter=null,this._bannerClosed=!1,this._updateState=o=>{if(o&&o.hasMore){if(this._bannerClosed)return;const c=Math.max(o.ambiguousCharacterCount,o.nonBasicAsciiCharacterCount,o.invisibleCharacterCount);let m;if(o.nonBasicAsciiCharacterCount>=c)m={message:we.kg("unicodeHighlighting.thisDocumentHasManyNonBasicAsciiUnicodeCharacters","This document contains many non-basic ASCII unicode characters"),command:new vh};else if(o.ambiguousCharacterCount>=c)m={message:we.kg("unicodeHighlighting.thisDocumentHasManyAmbiguousUnicodeCharacters","This document contains many ambiguous unicode characters"),command:new sd};else if(o.invisibleCharacterCount>=c)m={message:we.kg("unicodeHighlighting.thisDocumentHasManyInvisibleUnicodeCharacters","This document contains many invisible unicode characters"),command:new _h};else throw new Error("Unreachable");this._bannerController.show({id:"unicodeHighlightBanner",message:m.message,icon:wL,actions:[{label:m.command.shortLabel,href:`command:${m.command.id}`}],onClose:()=>{this._bannerClosed=!0}})}else this._bannerController.hide()},this._bannerController=this._register(s.createInstance(Jp,e)),this._register(this._editor.onDidChangeModel(()=>{this._bannerClosed=!1,this._updateHighlighter()})),this._options=e.getOption(115),this._register(i.onDidChangeTrust(o=>{this._updateHighlighter()})),this._register(e.onDidChangeConfiguration(o=>{o.hasChanged(115)&&(this._options=e.getOption(115),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=SL(this._workspaceTrustService.isWorkspaceTrusted(),this._options);if([e.nonBasicASCII,e.ambiguousCharacters,e.invisibleCharacters].every(i=>i===!1))return;const t={nonBasicASCII:e.nonBasicASCII,ambiguousCharacters:e.ambiguousCharacters,invisibleCharacters:e.invisibleCharacters,includeComments:e.includeComments,includeStrings:e.includeStrings,allowedCodePoints:Object.keys(e.allowedCharacters).map(i=>i.codePointAt(0)),allowedLocales:Object.keys(e.allowedLocales).map(i=>i==="_os"?new Intl.NumberFormat().resolvedOptions().locale:i==="_vscode"?Pi.BH:i)};this._editorWorkerService.canComputeUnicodeHighlights(this._editor.getModel().uri)?this._highlighter=new t_(this._editor,t,this._updateState,this._editorWorkerService):this._highlighter=new yL(this._editor,t,this._updateState)}getDecorationInfo(e){return this._highlighter?this._highlighter.getDecorationInfo(e):null}};ph.ID="editor.contrib.unicodeHighlighter",ph=e_([mh(1,_u.w),mh(2,bL.L),mh(3,P._Y)],ph);function SL(u,e){return{nonBasicASCII:e.nonBasicASCII===ds.XR?!u:e.nonBasicASCII,ambiguousCharacters:e.ambiguousCharacters,invisibleCharacters:e.invisibleCharacters,includeComments:e.includeComments===ds.XR?!u:e.includeComments,includeStrings:e.includeStrings===ds.XR?!u:e.includeStrings,allowedCharacters:e.allowedCharacters,allowedLocales:e.allowedLocales}}let t_=class extends at.jG{constructor(e,t,i,s){super(),this._editor=e,this._options=t,this._updateState=i,this._editorWorkerService=s,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new Ot.uC(()=>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(t=>{if(this._model.isDisposed()||this._model.getVersionId()!==e)return;this._updateState(t);const i=[];if(!t.hasMore)for(const s of t.ranges)i.push({range:s,options:zf.instance.getDecorationFromOptions(this._options)});this._decorations.set(i)})}getDecorationInfo(e){if(!this._decorations.has(e))return null;const t=this._editor.getModel();if(!(0,fh.GN)(t,e))return null;const i=t.getValueInRange(e.range);return{reason:_v(i,this._options),inComment:(0,fh.a6)(t,e),inString:(0,fh.wc)(t,e)}}};t_=e_([mh(3,_u.w)],t_);class yL extends at.jG{constructor(e,t,i){super(),this._editor=e,this._options=t,this._updateState=i,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new Ot.uC(()=>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(),t=[],i={ranges:[],ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0,hasMore:!1};for(const s of e){const o=gv.P.computeUnicodeHighlights(this._model,this._options,s);for(const c of o.ranges)i.ranges.push(c);i.ambiguousCharacterCount+=i.ambiguousCharacterCount,i.invisibleCharacterCount+=i.invisibleCharacterCount,i.nonBasicAsciiCharacterCount+=i.nonBasicAsciiCharacterCount,i.hasMore=i.hasMore||o.hasMore}if(!i.hasMore)for(const s of i.ranges)t.push({range:s,options:zf.instance.getDecorationFromOptions(this._options)});this._updateState(i),this._decorations.set(t)}getDecorationInfo(e){if(!this._decorations.has(e))return null;const t=this._editor.getModel(),i=t.getValueInRange(e.range);return(0,fh.GN)(t,e)?{reason:_v(i,this._options),inComment:(0,fh.a6)(t,e),inString:(0,fh.wc)(t,e)}:null}}let i_=class{constructor(e,t,i){this._editor=e,this._languageService=t,this._openerService=i,this.hoverOrdinal=4}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1)return[];const i=this._editor.getModel(),s=this._editor.getContribution(ph.ID);if(!s)return[];const o=[];let c=300;for(const m of t){const A=s.getDecorationInfo(m);if(!A)continue;const W=i.getValueInRange(m.range).codePointAt(0),re=pv(W);let Se;switch(A.reason.kind){case 0:Se=we.kg("unicodeHighlight.characterIsAmbiguous","The character {0} could be confused with the character {1}, which is more common in source code.",re,pv(A.reason.confusableWith.codePointAt(0)));break;case 1:Se=we.kg("unicodeHighlight.characterIsInvisible","The character {0} is invisible.",re);break;case 2:Se=we.kg("unicodeHighlight.characterIsNonBasicAscii","The character {0} is not a basic ASCII character.",re);break}const Be={codePoint:W,reason:A.reason,inComment:A.inComment,inString:A.inString},Qe=we.kg("unicodeHighlight.adjustSettings","Adjust settings"),tt=`command:${Fu.ID}?${encodeURIComponent(JSON.stringify(Be))}`,vt=new Li.Bc("",!0).appendMarkdown(Se).appendText(" ").appendLink(tt,Qe);o.push(new kr(this,m.range,[vt],c++))}return o}renderHoverParts(e,t){return Pg(e,t,this._editor,this._languageService,this._openerService)}};i_=e_([mh(1,Fs.L),mh(2,Ho.Cr)],i_);function n_(u){return`U+${u.toString(16).padStart(4,"0")}`}function pv(u){let e=`\`${n_(u)}\``;return xi.y_.isInvisibleCharacter(u)||(e+=` "${`${LL(u)}`}"`),e}function LL(u){return u===96?"`` ` ``":"`"+String.fromCodePoint(u)+"`"}function _v(u,e){return gv.P.computeUnicodeHighlightReason(u,e)}class zf{constructor(){this.map=new Map}getDecorationFromOptions(e){return this.getDecoration(!e.includeComments,!e.includeStrings)}getDecoration(e,t){const i=`${e}${t}`;let s=this.map.get(i);return s||(s=sn.kI.createDynamic({description:"unicode-highlight",stickiness:1,className:"unicode-highlight",showIfCollapsed:!0,overviewRuler:null,minimap:null,hideInCommentTokens:e,hideInStringTokens:t}),this.map.set(i,s)),s}}zf.instance=new zf;class DL extends Te.ks{constructor(){super({id:sd.ID,label:we.kg("action.unicodeHighlight.disableHighlightingInComments","Disable highlighting of characters in comments"),alias:"Disable highlighting of characters in comments",precondition:void 0}),this.shortLabel=we.kg("unicodeHighlight.disableHighlightingInComments.shortLabel","Disable Highlight In Comments")}run(e,t,i){return xo(this,void 0,void 0,function*(){const s=e?.get(de.pG);s&&this.runAction(s)})}runAction(e){return xo(this,void 0,void 0,function*(){yield e.updateValue(ds.Of.includeComments,!1,2)})}}class kL extends Te.ks{constructor(){super({id:sd.ID,label:we.kg("action.unicodeHighlight.disableHighlightingInStrings","Disable highlighting of characters in strings"),alias:"Disable highlighting of characters in strings",precondition:void 0}),this.shortLabel=we.kg("unicodeHighlight.disableHighlightingInStrings.shortLabel","Disable Highlight In Strings")}run(e,t,i){return xo(this,void 0,void 0,function*(){const s=e?.get(de.pG);s&&this.runAction(s)})}runAction(e){return xo(this,void 0,void 0,function*(){yield e.updateValue(ds.Of.includeStrings,!1,2)})}}class sd extends Te.ks{constructor(){super({id:sd.ID,label:we.kg("action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters","Disable highlighting of ambiguous characters"),alias:"Disable highlighting of ambiguous characters",precondition:void 0}),this.shortLabel=we.kg("unicodeHighlight.disableHighlightingOfAmbiguousCharacters.shortLabel","Disable Ambiguous Highlight")}run(e,t,i){return xo(this,void 0,void 0,function*(){const s=e?.get(de.pG);s&&this.runAction(s)})}runAction(e){return xo(this,void 0,void 0,function*(){yield e.updateValue(ds.Of.ambiguousCharacters,!1,2)})}}sd.ID="editor.action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters";class _h extends Te.ks{constructor(){super({id:_h.ID,label:we.kg("action.unicodeHighlight.disableHighlightingOfInvisibleCharacters","Disable highlighting of invisible characters"),alias:"Disable highlighting of invisible characters",precondition:void 0}),this.shortLabel=we.kg("unicodeHighlight.disableHighlightingOfInvisibleCharacters.shortLabel","Disable Invisible Highlight")}run(e,t,i){return xo(this,void 0,void 0,function*(){const s=e?.get(de.pG);s&&this.runAction(s)})}runAction(e){return xo(this,void 0,void 0,function*(){yield e.updateValue(ds.Of.invisibleCharacters,!1,2)})}}_h.ID="editor.action.unicodeHighlight.disableHighlightingOfInvisibleCharacters";class vh extends Te.ks{constructor(){super({id:vh.ID,label:we.kg("action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters","Disable highlighting of non basic ASCII characters"),alias:"Disable highlighting of non basic ASCII characters",precondition:void 0}),this.shortLabel=we.kg("unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters.shortLabel","Disable Non ASCII Highlight")}run(e,t,i){return xo(this,void 0,void 0,function*(){const s=e?.get(de.pG);s&&this.runAction(s)})}runAction(e){return xo(this,void 0,void 0,function*(){yield e.updateValue(ds.Of.nonBasicASCII,!1,2)})}}vh.ID="editor.action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters";class Fu extends Te.ks{constructor(){super({id:Fu.ID,label:we.kg("action.unicodeHighlight.showExcludeOptions","Show Exclude Options"),alias:"Show Exclude Options",precondition:void 0})}run(e,t,i){return xo(this,void 0,void 0,function*(){const{codePoint:s,reason:o,inString:c,inComment:m}=i,A=String.fromCodePoint(s),U=e.get($r.GK),W=e.get(de.pG);function re(Qe){return xi.y_.isInvisibleCharacter(Qe)?we.kg("unicodeHighlight.excludeInvisibleCharFromBeingHighlighted","Exclude {0} (invisible character) from being highlighted",n_(Qe)):we.kg("unicodeHighlight.excludeCharFromBeingHighlighted","Exclude {0} from being highlighted",`${n_(Qe)} "${A}"`)}const Se=[];if(o.kind===0)for(const Qe of o.notAmbiguousInLocales)Se.push({label:we.kg("unicodeHighlight.allowCommonCharactersInLanguage",'Allow unicode characters that are more common in the language "{0}".',Qe),run:()=>xo(this,void 0,void 0,function*(){xL(W,[Qe])})});if(Se.push({label:re(s),run:()=>EL(W,[s])}),m){const Qe=new DL;Se.push({label:Qe.label,run:()=>xo(this,void 0,void 0,function*(){return Qe.runAction(W)})})}else if(c){const Qe=new kL;Se.push({label:Qe.label,run:()=>xo(this,void 0,void 0,function*(){return Qe.runAction(W)})})}if(o.kind===0){const Qe=new sd;Se.push({label:Qe.label,run:()=>xo(this,void 0,void 0,function*(){return Qe.runAction(W)})})}else if(o.kind===1){const Qe=new _h;Se.push({label:Qe.label,run:()=>xo(this,void 0,void 0,function*(){return Qe.runAction(W)})})}else if(o.kind===2){const Qe=new vh;Se.push({label:Qe.label,run:()=>xo(this,void 0,void 0,function*(){return Qe.runAction(W)})})}else IL(o);const Be=yield U.pick(Se,{title:we.kg("unicodeHighlight.configureUnicodeHighlightOptions","Configure Unicode Highlight Options")});Be&&(yield Be.run())})}}Fu.ID="editor.action.unicodeHighlight.showExcludeOptions";function EL(u,e){return xo(this,void 0,void 0,function*(){const t=u.getValue(ds.Of.allowedCharacters);let i;typeof t=="object"&&t?i=t:i={};for(const s of e)i[String.fromCodePoint(s)]=!0;yield u.updateValue(ds.Of.allowedCharacters,i,2)})}function xL(u,e){var t;return xo(this,void 0,void 0,function*(){const i=(t=u.inspect(ds.Of.allowedLocales).user)===null||t===void 0?void 0:t.value;let s;typeof i=="object"&&i?s=Object.assign({},i):s={};for(const o of e)s[o]=!0;yield u.updateValue(ds.Of.allowedLocales,s,2)})}function IL(u){throw new Error(`Unexpected value: ${u}`)}(0,Te.Fl)(sd),(0,Te.Fl)(_h),(0,Te.Fl)(vh),(0,Te.Fl)(Fu),(0,Te.HW)(ph.ID,ph),Bs.register(i_);var s_=f(94535),NL=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},vv=function(u,e){return function(t,i){e(t,i,u)}},ML=function(u,e,t,i){function s(o){return o instanceof t?o:new t(function(c){c(o)})}return new(t||(t=Promise))(function(o,c){function m(W){try{U(i.next(W))}catch(re){c(re)}}function A(W){try{U(i.throw(W))}catch(re){c(re)}}function U(W){W.done?o(W.value):s(W.value).then(m,A)}U((i=i.apply(u,e||[])).next())})};const Cv="ignoreUnusualLineTerminators";function TL(u,e,t){u.setModelProperty(e.uri,Cv,t)}function RL(u,e){return u.getModelProperty(e.uri,Cv)}let Bu=class extends at.jG{constructor(e,t,i){super(),this._editor=e,this._dialogService=t,this._codeEditorService=i,this._config=this._editor.getOption(116),this._register(this._editor.onDidChangeConfiguration(s=>{s.hasChanged(116)&&(this._config=this._editor.getOption(116),this._checkForUnusualLineTerminators())})),this._register(this._editor.onDidChangeModel(()=>{this._checkForUnusualLineTerminators()})),this._register(this._editor.onDidChangeModelContent(s=>{s.isUndoing||this._checkForUnusualLineTerminators()}))}_checkForUnusualLineTerminators(){return ML(this,void 0,void 0,function*(){if(this._config==="off"||!this._editor.hasModel())return;const e=this._editor.getModel();if(!e.mightContainUnusualLineTerminators()||RL(this._codeEditorService,e)===!0||this._editor.getOption(83))return;if(this._config==="auto"){e.removeUnusualLineTerminators(this._editor.getSelections());return}if(!(yield this._dialogService.confirm({title:we.kg("unusualLineTerminators.title","Unusual Line Terminators"),message:we.kg("unusualLineTerminators.message","Detected unusual line terminators"),detail:we.kg("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`.",(0,hn.P8)(e.uri)),primaryButton:we.kg("unusualLineTerminators.fix","Remove Unusual Line Terminators"),secondaryButton:we.kg("unusualLineTerminators.ignore","Ignore")})).confirmed){TL(this._codeEditorService,e,!0);return}e.removeUnusualLineTerminators(this._editor.getSelections())})}};Bu.ID="editor.contrib.unusualLineTerminatorsDetector",Bu=NL([vv(1,s_.X),vv(2,Gi.T)],Bu),(0,Te.HW)(Bu.ID,Bu);var bv=f(52677),wv=f(40931),AL=f(9520),OL=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},Wu=function(u,e){return function(t,i){e(t,i,u)}};let Vu=class extends at.jG{constructor(e,t,i,s,o,c){super(),this._modelService=t,this._themeService=i,this._configurationService=s,this._editor=e,this._provider=c.documentRangeSemanticTokensProvider,this._debounceInformation=o.for(this._provider,"DocumentRangeSemanticTokens",{min:100,max:500}),this._tokenizeViewport=this._register(new Ot.uC(()=>this._tokenizeViewportNow(),100)),this._outstandingRequests=[];const m=()=>{this._editor.hasModel()&&this._tokenizeViewport.schedule(this._debounceInformation.get(this._editor.getModel()))};this._register(this._editor.onDidScrollChange(()=>{m()})),this._register(this._editor.onDidChangeModel(()=>{this._cancelAll(),m()})),this._register(this._editor.onDidChangeModelContent(A=>{this._cancelAll(),m()})),this._register(this._provider.onDidChange(()=>{this._cancelAll(),m()})),this._register(this._configurationService.onDidChangeConfiguration(A=>{A.affectsConfiguration(wv.r8)&&(this._cancelAll(),m())})),this._register(this._themeService.onDidColorThemeChange(()=>{this._cancelAll(),m()}))}_cancelAll(){for(const e of this._outstandingRequests)e.cancel();this._outstandingRequests=[]}_removeOutstandingRequest(e){for(let t=0,i=this._outstandingRequests.length;t<i;t++)if(this._outstandingRequests[t]===e){this._outstandingRequests.splice(t,1);return}}_tokenizeViewportNow(){if(!this._editor.hasModel())return;const e=this._editor.getModel();if(e.tokenization.hasCompleteSemanticTokens())return;if(!(0,wv.rT)(e,this._themeService,this._configurationService)){e.tokenization.hasSomeSemanticTokens()&&e.tokenization.setSemanticTokens(null,!1);return}if(!(0,bv.WG)(this._provider,e)){e.tokenization.hasSomeSemanticTokens()&&e.tokenization.setSemanticTokens(null,!1);return}const t=this._editor.getVisibleRangesPlusViewportAboveBelow();this._outstandingRequests=this._outstandingRequests.concat(t.map(i=>this._requestRange(e,i)))}_requestRange(e,t){const i=e.getVersionId(),s=(0,Ot.SS)(c=>Promise.resolve((0,bv.nZ)(this._provider,e,t,c))),o=new Ys.W(!1);return s.then(c=>{if(this._debounceInformation.update(e,o.elapsed()),!c||!c.tokens||e.isDisposed()||e.getVersionId()!==i)return;const{provider:m,tokens:A}=c,U=this._modelService.getSemanticTokensProviderStyling(m);e.tokenization.setPartialSemanticTokens(t,(0,AL.b)(A,U,e.getLanguageId()))}).then(()=>this._removeOutstandingRequest(s),()=>this._removeOutstandingRequest(s)),s}};Vu.ID="editor.contrib.viewportSemanticTokens",Vu=OL([Wu(1,ws.S),Wu(2,Ye.Gy),Wu(3,de.pG),Wu(4,Lo.U),Wu(5,Zi.u)],Vu),(0,Te.HW)(Vu.ID,Vu);var PL=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},Sv=function(u,e){return function(t,i){e(t,i,u)}};const FL=(0,Ce.x1A)("editor.wordHighlightBackground",{dark:"#575757B8",light:"#57575740",hcDark:null,hcLight:null},we.kg("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),BL=(0,Ce.x1A)("editor.wordHighlightStrongBackground",{dark:"#004972B8",light:"#0e639c40",hcDark:null,hcLight:null},we.kg("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),WL=(0,Ce.x1A)("editor.wordHighlightBorder",{light:null,dark:null,hcDark:Ce.buw,hcLight:Ce.buw},we.kg("wordHighlightBorder","Border color of a symbol during read-access, like reading a variable.")),VL=(0,Ce.x1A)("editor.wordHighlightStrongBorder",{light:null,dark:null,hcDark:Ce.buw,hcLight:Ce.buw},we.kg("wordHighlightStrongBorder","Border color of a symbol during write-access, like writing to a variable.")),HL=(0,Ce.x1A)("editorOverviewRuler.wordHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hcDark:"#A0A0A0CC",hcLight:"#A0A0A0CC"},we.kg("overviewRulerWordHighlightForeground","Overview ruler marker color for symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),zL=(0,Ce.x1A)("editorOverviewRuler.wordHighlightStrongForeground",{dark:"#C0A0C0CC",light:"#C0A0C0CC",hcDark:"#C0A0C0CC",hcLight:"#C0A0C0CC"},we.kg("overviewRulerWordHighlightStrongForeground","Overview ruler marker color for write-access symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),Uf=new ct.N1("hasWordHighlights",!1);function yv(u,e,t,i){const s=u.ordered(e);return(0,Ot.$1)(s.map(o=>()=>Promise.resolve(o.provideDocumentHighlights(e,t,i)).then(void 0,Wi.M_)),cn.EI)}class Lv{constructor(e,t,i){this._model=e,this._selection=t,this._wordSeparators=i,this._wordRange=this._getCurrentWordRange(e,t),this._result=null}get result(){return this._result||(this._result=(0,Ot.SS)(e=>this._compute(this._model,this._selection,this._wordSeparators,e))),this._result}_getCurrentWordRange(e,t){const i=e.getWordAtPosition(t.getPosition());return i?new St.Q(t.startLineNumber,i.startColumn,t.startLineNumber,i.endColumn):null}isValid(e,t,i){const s=t.startLineNumber,o=t.startColumn,c=t.endColumn,m=this._getCurrentWordRange(e,t);let A=!!(this._wordRange&&this._wordRange.equalsRange(m));for(let U=0,W=i.length;!A&&U<W;U++){const re=i.getRange(U);re&&re.startLineNumber===s&&re.startColumn<=o&&re.endColumn>=c&&(A=!0)}return A}cancel(){this.result.cancel()}}class UL extends Lv{constructor(e,t,i,s){super(e,t,i),this._providers=s}_compute(e,t,i,s){return yv(this._providers,e,t.getPosition(),s).then(o=>o||[])}}class jL extends Lv{constructor(e,t,i){super(e,t,i),this._selectionIsEmpty=t.isEmpty()}_compute(e,t,i,s){return(0,Ot.wR)(250,s).then(()=>{if(!t.isEmpty())return[];const o=e.getWordAtPosition(t.getPosition());return!o||o.word.length>1e3?[]:e.findMatches(o.word,!0,!1,!0,i,!1).map(m=>({range:m.range,kind:Xe.Kb.Text}))})}isValid(e,t,i){const s=t.isEmpty();return this._selectionIsEmpty!==s?!1:super.isValid(e,t,i)}}function KL(u,e,t,i){return u.has(e)?new UL(e,t,i,u):new jL(e,t,i)}(0,Te.ke)("_executeDocumentHighlights",(u,e,t)=>{const i=u.get(Zi.u);return yv(i.documentHighlightProvider,e,t,Ti.X.None)});class Ch{constructor(e,t,i){this.toUnhook=new at.Cm,this.workerRequestTokenId=0,this.workerRequestCompleted=!1,this.workerRequestValue=[],this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,this.editor=e,this.providers=t,this._hasWordHighlights=Uf.bindTo(i),this._ignorePositionChangeEvent=!1,this.occurrencesHighlight=this.editor.getOption(74),this.model=this.editor.getModel(),this.toUnhook.add(e.onDidChangeCursorPosition(s=>{this._ignorePositionChangeEvent||this.occurrencesHighlight&&this._onPositionChanged(s)})),this.toUnhook.add(e.onDidChangeModelContent(s=>{this._stopAll()})),this.toUnhook.add(e.onDidChangeConfiguration(s=>{const o=this.editor.getOption(74);this.occurrencesHighlight!==o&&(this.occurrencesHighlight=o,this._stopAll())})),this.decorations=this.editor.createDecorationsCollection(),this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1}hasDecorations(){return this.decorations.length>0}restore(){this.occurrencesHighlight&&this._run()}_getSortedHighlights(){return this.decorations.getRanges().sort(St.Q.compareRangesUsingStarts)}moveNext(){const e=this._getSortedHighlights(),i=(e.findIndex(o=>o.containsPosition(this.editor.getPosition()))+1)%e.length,s=e[i];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(s.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(s);const o=this._getWord();if(o){const c=this.editor.getModel().getLineContent(s.startLineNumber);(0,oi.xE)(`${c}, ${i+1} of ${e.length} for '${o.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}moveBack(){const e=this._getSortedHighlights(),i=(e.findIndex(o=>o.containsPosition(this.editor.getPosition()))-1+e.length)%e.length,s=e[i];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(s.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(s);const o=this._getWord();if(o){const c=this.editor.getModel().getLineContent(s.startLineNumber);(0,oi.xE)(`${c}, ${i+1} of ${e.length} for '${o.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}_removeDecorations(){this.decorations.length>0&&(this.decorations.clear(),this._hasWordHighlights.set(!1))}_stopAll(){this._removeDecorations(),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){if(!this.occurrencesHighlight){this._stopAll();return}if(e.reason!==3){this._stopAll();return}this._run()}_getWord(){const e=this.editor.getSelection(),t=e.startLineNumber,i=e.startColumn;return this.model.getWordAtPosition({lineNumber:t,column:i})}_run(){const e=this.editor.getSelection();if(e.startLineNumber!==e.endLineNumber){this._stopAll();return}const t=e.startColumn,i=e.endColumn,s=this._getWord();if(!s||s.startColumn>t||s.endColumn<i){this._stopAll();return}const o=this.workerRequest&&this.workerRequest.isValid(this.model,e,this.decorations);if(this.lastCursorPositionChangeTime=new Date().getTime(),o)this.workerRequestCompleted&&this.renderDecorationsTimer!==-1&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1,this._beginRenderDecorations());else{this._stopAll();const c=++this.workerRequestTokenId;this.workerRequestCompleted=!1,this.workerRequest=KL(this.providers,this.model,this.editor.getSelection(),this.editor.getOption(119)),this.workerRequest.result.then(m=>{c===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=m||[],this._beginRenderDecorations())},Wi.dz)}}_beginRenderDecorations(){const e=new Date().getTime(),t=this.lastCursorPositionChangeTime+250;e>=t?(this.renderDecorationsTimer=-1,this.renderDecorations()):this.renderDecorationsTimer=setTimeout(()=>{this.renderDecorations()},t-e)}renderDecorations(){this.renderDecorationsTimer=-1;const e=[];for(const t of this.workerRequestValue)t.range&&e.push({range:t.range,options:Ch._getDecorationOptions(t.kind)});this.decorations.set(e),this._hasWordHighlights.set(this.hasDecorations())}static _getDecorationOptions(e){return e===Xe.Kb.Write?this._WRITE_OPTIONS:e===Xe.Kb.Text?this._TEXT_OPTIONS:this._REGULAR_OPTIONS}dispose(){this._stopAll(),this.toUnhook.dispose()}}Ch._WRITE_OPTIONS=sn.kI.register({description:"word-highlight-strong",stickiness:1,className:"wordHighlightStrong",overviewRuler:{color:(0,Ye.Yf)(zL),position:bn.A5.Center},minimap:{color:(0,Ye.Yf)(Ce.Xp1),position:bn.R3.Inline}}),Ch._TEXT_OPTIONS=sn.kI.register({description:"selection-highlight",stickiness:1,className:"selectionHighlight",overviewRuler:{color:(0,Ye.Yf)(Ce.z5H),position:bn.A5.Center},minimap:{color:(0,Ye.Yf)(Ce.Xp1),position:bn.R3.Inline}}),Ch._REGULAR_OPTIONS=sn.kI.register({description:"word-highlight",stickiness:1,className:"wordHighlight",overviewRuler:{color:(0,Ye.Yf)(HL),position:bn.A5.Center},minimap:{color:(0,Ye.Yf)(Ce.Xp1),position:bn.R3.Inline}});let qd=class NC extends at.jG{constructor(e,t,i){super(),this.wordHighlighter=null;const s=()=>{e.hasModel()&&(this.wordHighlighter=new Ch(e,i.documentHighlightProvider,t))};this._register(e.onDidChangeModel(o=>{this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),s()})),s()}static get(e){return e.getContribution(NC.ID)}saveViewState(){return!!(this.wordHighlighter&&this.wordHighlighter.hasDecorations())}moveNext(){this.wordHighlighter&&this.wordHighlighter.moveNext()}moveBack(){this.wordHighlighter&&this.wordHighlighter.moveBack()}restoreViewState(e){this.wordHighlighter&&e&&this.wordHighlighter.restore()}dispose(){this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),super.dispose()}};qd.ID="editor.contrib.wordHighlighter",qd=PL([Sv(1,ct.fN),Sv(2,Zi.u)],qd);class Dv extends Te.ks{constructor(e,t){super(t),this._isNext=e}run(e,t){const i=qd.get(t);i&&(this._isNext?i.moveNext():i.moveBack())}}class $L extends Dv{constructor(){super(!0,{id:"editor.action.wordHighlight.next",label:we.kg("wordHighlight.next.label","Go to Next Symbol Highlight"),alias:"Go to Next Symbol Highlight",precondition:Uf,kbOpts:{kbExpr:ze.R.editorTextFocus,primary:65,weight:100}})}}class GL extends Dv{constructor(){super(!1,{id:"editor.action.wordHighlight.prev",label:we.kg("wordHighlight.previous.label","Go to Previous Symbol Highlight"),alias:"Go to Previous Symbol Highlight",precondition:Uf,kbOpts:{kbExpr:ze.R.editorTextFocus,primary:1089,weight:100}})}}class QL extends Te.ks{constructor(){super({id:"editor.action.wordHighlight.trigger",label:we.kg("wordHighlight.trigger.label","Trigger Symbol Highlight"),alias:"Trigger Symbol Highlight",precondition:Uf.toNegated(),kbOpts:{kbExpr:ze.R.editorTextFocus,primary:0,weight:100}})}run(e,t,i){const s=qd.get(t);s&&s.restoreViewState(!0)}}(0,Te.HW)(qd.ID,qd),(0,Te.Fl)($L),(0,Te.Fl)(GL),(0,Te.Fl)(QL),(0,Ye.zy)((u,e)=>{const t=u.getColor(Ce.QwA);t&&(e.addRule(`.monaco-editor .focused .selectionHighlight { background-color: ${t}; }`),e.addRule(`.monaco-editor .selectionHighlight { background-color: ${t.transparent(.5)}; }`));const i=u.getColor(FL);i&&e.addRule(`.monaco-editor .wordHighlight { background-color: ${i}; }`);const s=u.getColor(BL);s&&e.addRule(`.monaco-editor .wordHighlightStrong { background-color: ${s}; }`);const o=u.getColor(Ce.CMg);o&&e.addRule(`.monaco-editor .selectionHighlight { border: 1px ${(0,Ro.Bb)(u.type)?"dotted":"solid"} ${o}; box-sizing: border-box; }`);const c=u.getColor(WL);c&&e.addRule(`.monaco-editor .wordHighlight { border: 1px ${(0,Ro.Bb)(u.type)?"dashed":"solid"} ${c}; box-sizing: border-box; }`);const m=u.getColor(VL);m&&e.addRule(`.monaco-editor .wordHighlightStrong { border: 1px ${(0,Ro.Bb)(u.type)?"dashed":"solid"} ${m}; box-sizing: border-box; }`)});var ZL=f(29895),dl=f(89673),ec=f(82862),jf=f(13034);class Kf extends Te.DX{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,i){if(!t.hasModel())return;const s=(0,ec.i)(t.getOption(119)),o=t.getModel(),m=t.getSelections().map(A=>{const U=new bi.y(A.positionLineNumber,A.positionColumn),W=this._move(s,o,U,this._wordNavigationType);return this._moveTo(A,W,this._inSelectionMode)});if(o.pushStackElement(),t._getViewModel().setCursorStates("moveWordCommand",3,m.map(A=>ZL.MF.fromModelSelection(A))),m.length===1){const A=new bi.y(m[0].positionLineNumber,m[0].positionColumn);t.revealPosition(A,0)}}_moveTo(e,t,i){return i?new ki.L(e.selectionStartLineNumber,e.selectionStartColumn,t.lineNumber,t.column):new ki.L(t.lineNumber,t.column,t.lineNumber,t.column)}}class od extends Kf{_move(e,t,i,s){return dl.z.moveWordLeft(e,t,i,s)}}class rd extends Kf{_move(e,t,i,s){return dl.z.moveWordRight(e,t,i,s)}}class YL extends od{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}}class XL extends od{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}}class JL extends od{constructor(){var e;super({inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:ct.M$.and(ze.R.textInputFocus,(e=ct.M$.and(Fo.f,jf.nd))===null||e===void 0?void 0:e.negate()),primary:2063,mac:{primary:527},weight:100}})}}class qL extends od{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:void 0})}}class eD extends od{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndLeftSelect",precondition:void 0})}}class tD extends od{constructor(){var e;super({inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:ct.M$.and(ze.R.textInputFocus,(e=ct.M$.and(Fo.f,jf.nd))===null||e===void 0?void 0:e.negate()),primary:3087,mac:{primary:1551},weight:100}})}}class iD extends od{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0})}_move(e,t,i,s){return super._move((0,ec.i)(ds.qB.wordSeparators.defaultValue),t,i,s)}}class nD extends od{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0})}_move(e,t,i,s){return super._move((0,ec.i)(ds.qB.wordSeparators.defaultValue),t,i,s)}}class sD extends rd{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}}class oD extends rd{constructor(){var e;super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{kbExpr:ct.M$.and(ze.R.textInputFocus,(e=ct.M$.and(Fo.f,jf.nd))===null||e===void 0?void 0:e.negate()),primary:2065,mac:{primary:529},weight:100}})}}class rD extends rd{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}}class aD extends rd{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}}class lD extends rd{constructor(){var e;super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:ct.M$.and(ze.R.textInputFocus,(e=ct.M$.and(Fo.f,jf.nd))===null||e===void 0?void 0:e.negate()),primary:3089,mac:{primary:1553},weight:100}})}}class dD extends rd{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}}class cD extends rd{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0})}_move(e,t,i,s){return super._move((0,ec.i)(ds.qB.wordSeparators.defaultValue),t,i,s)}}class hD extends rd{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0})}_move(e,t,i,s){return super._move((0,ec.i)(ds.qB.wordSeparators.defaultValue),t,i,s)}}class $f extends Te.DX{constructor(e){super(e),this._whitespaceHeuristics=e.whitespaceHeuristics,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,i){const s=e.get(ao.JZ);if(!t.hasModel())return;const o=(0,ec.i)(t.getOption(119)),c=t.getModel(),m=t.getSelections(),A=t.getOption(5),U=t.getOption(8),W=s.getLanguageConfiguration(c.getLanguageId()).getAutoClosingPairs(),re=t._getViewModel(),Se=m.map(Be=>{const Qe=this._delete({wordSeparators:o,model:c,selection:Be,whitespaceHeuristics:this._whitespaceHeuristics,autoClosingDelete:t.getOption(6),autoClosingBrackets:A,autoClosingQuotes:U,autoClosingPairs:W,autoClosedCharacters:re.getCursorAutoClosedCharacters()},this._wordNavigationType);return new wi.iu(Qe,"")});t.pushUndoStop(),t.executeCommands(this.id,Se),t.pushUndoStop()}}class o_ extends $f{_delete(e,t){const i=dl.z.deleteWordLeft(e,t);return i||new St.Q(1,1,1,1)}}class r_ extends $f{_delete(e,t){const i=dl.z.deleteWordRight(e,t);if(i)return i;const s=e.model.getLineCount(),o=e.model.getLineMaxColumn(s);return new St.Q(s,o,s,o)}}class uD extends o_{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:ze.R.writable})}}class gD extends o_{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:ze.R.writable})}}class fD extends o_{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:ze.R.writable,kbOpts:{kbExpr:ze.R.textInputFocus,primary:2049,mac:{primary:513},weight:100}})}}class mD extends r_{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:ze.R.writable})}}class pD extends r_{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:ze.R.writable})}}class _D extends r_{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:ze.R.writable,kbOpts:{kbExpr:ze.R.textInputFocus,primary:2068,mac:{primary:532},weight:100}})}}class vD extends Te.ks{constructor(){super({id:"deleteInsideWord",precondition:ze.R.writable,label:we.kg("deleteInsideWord","Delete Word"),alias:"Delete Word"})}run(e,t,i){if(!t.hasModel())return;const s=(0,ec.i)(t.getOption(119)),o=t.getModel(),m=t.getSelections().map(A=>{const U=dl.z.deleteInsideWord(s,o,A);return new wi.iu(U,"")});t.pushUndoStop(),t.executeCommands(this.id,m),t.pushUndoStop()}}(0,Te.E_)(new YL),(0,Te.E_)(new XL),(0,Te.E_)(new JL),(0,Te.E_)(new qL),(0,Te.E_)(new eD),(0,Te.E_)(new tD),(0,Te.E_)(new sD),(0,Te.E_)(new oD),(0,Te.E_)(new rD),(0,Te.E_)(new aD),(0,Te.E_)(new lD),(0,Te.E_)(new dD),(0,Te.E_)(new iD),(0,Te.E_)(new nD),(0,Te.E_)(new cD),(0,Te.E_)(new hD),(0,Te.E_)(new uD),(0,Te.E_)(new gD),(0,Te.E_)(new fD),(0,Te.E_)(new mD),(0,Te.E_)(new pD),(0,Te.E_)(new _D),(0,Te.Fl)(vD);class CD extends $f{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:ze.R.writable,kbOpts:{kbExpr:ze.R.textInputFocus,primary:0,mac:{primary:769},weight:100}})}_delete(e,t){const i=dl.c.deleteWordPartLeft(e);return i||new St.Q(1,1,1,1)}}class bD extends $f{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordPartRight",precondition:ze.R.writable,kbOpts:{kbExpr:ze.R.textInputFocus,primary:0,mac:{primary:788},weight:100}})}_delete(e,t){const i=dl.c.deleteWordPartRight(e);if(i)return i;const s=e.model.getLineCount(),o=e.model.getLineMaxColumn(s);return new St.Q(s,o,s,o)}}class kv extends Kf{_move(e,t,i,s){return dl.c.moveWordPartLeft(e,t,i)}}class wD extends kv{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:void 0,kbOpts:{kbExpr:ze.R.textInputFocus,primary:0,mac:{primary:783},weight:100}})}}fn.wb.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft");class SD extends kv{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:void 0,kbOpts:{kbExpr:ze.R.textInputFocus,primary:0,mac:{primary:1807},weight:100}})}}fn.wb.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");class Ev extends Kf{_move(e,t,i,s){return dl.c.moveWordPartRight(e,t,i)}}class yD extends Ev{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordPartRight",precondition:void 0,kbOpts:{kbExpr:ze.R.textInputFocus,primary:0,mac:{primary:785},weight:100}})}}class LD extends Ev{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordPartRightSelect",precondition:void 0,kbOpts:{kbExpr:ze.R.textInputFocus,primary:0,mac:{primary:1809},weight:100}})}}(0,Te.E_)(new CD),(0,Te.E_)(new bD),(0,Te.E_)(new wD),(0,Te.E_)(new SD),(0,Te.E_)(new yD),(0,Te.E_)(new LD);class a_ extends at.jG{constructor(e){super(),this.editor=e,this._register(this.editor.onDidAttemptReadOnlyEdit(()=>this._onDidAttemptReadOnlyEdit()))}_onDidAttemptReadOnlyEdit(){const e=is.get(this.editor);e&&this.editor.hasModel()&&(this.editor.isSimpleWidget?e.showMessage(we.kg("editor.simple.readonly","Cannot edit in read-only input"),this.editor.getPosition()):e.showMessage(we.kg("editor.readonly","Cannot edit in read-only editor"),this.editor.getPosition()))}}a_.ID="editor.contrib.readOnlyMessageController",(0,Te.HW)(a_.ID,a_);var bs=f(45933),Fk=f(34908),xv=f(5043),Iv=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},Gf=function(u,e){return function(t,i){e(t,i,u)}};const Nv=new ct.N1("accessibilityHelpWidgetVisible",!1);let tc=class MC extends at.jG{constructor(e,t){super(),this._editor=e,this._widget=this._register(t.createInstance(bh,this._editor))}static get(e){return e.getContribution(MC.ID)}show(){this._widget.show()}hide(){this._widget.hide()}};tc.ID="editor.contrib.accessibilityHelpController",tc=Iv([Gf(1,P._Y)],tc);function DD(u,e){return!u||u.length===0?bs.b2.noSelection:u.length===1?e?xi.GP(bs.b2.singleSelectionRange,u[0].positionLineNumber,u[0].positionColumn,e):xi.GP(bs.b2.singleSelection,u[0].positionLineNumber,u[0].positionColumn):e?xi.GP(bs.b2.multiSelectionRange,u.length,e):u.length>0?xi.GP(bs.b2.multiSelection,u.length):""}let bh=class um extends Cr.x{constructor(e,t,i,s){super(),this._contextKeyService=t,this._keybindingService=i,this._openerService=s,this._editor=e,this._isVisibleKey=Nv.bindTo(this._contextKeyService),this._domNode=(0,xv.Z)(document.createElement("div")),this._domNode.setClassName("accessibilityHelpWidget"),this._domNode.setDisplay("none"),this._domNode.setAttribute("role","dialog"),this._domNode.setAttribute("aria-hidden","true"),this._contentDomNode=(0,xv.Z)(document.createElement("div")),this._contentDomNode.setAttribute("role","document"),this._domNode.appendChild(this._contentDomNode),this._isVisible=!1,this._register(this._editor.onDidLayoutChange(()=>{this._isVisible&&this._layout()})),this._register(M.b2(this._contentDomNode.domNode,"keydown",o=>{if(this._isVisible&&(o.equals(2083)&&((0,oi.xE)(bs.b2.emergencyConfOn),this._editor.updateOptions({accessibilitySupport:"on"}),M.w_(this._contentDomNode.domNode),this._buildContent(),this._contentDomNode.domNode.focus(),o.preventDefault(),o.stopPropagation()),o.equals(2086))){(0,oi.xE)(bs.b2.openingDocs);let c=this._editor.getRawOptions().accessibilityHelpUrl;typeof c>"u"&&(c="https://go.microsoft.com/fwlink/?linkid=852450"),this._openerService.open(vn.r.parse(c)),o.preventDefault(),o.stopPropagation()}})),this.onblur(this._contentDomNode.domNode,()=>{this.hide()}),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return um.ID}getDomNode(){return this._domNode.domNode}getPosition(){return{preference:null}}show(){this._isVisible||(this._isVisible=!0,this._isVisibleKey.set(!0),this._layout(),this._domNode.setDisplay("block"),this._domNode.setAttribute("aria-hidden","false"),this._contentDomNode.domNode.tabIndex=0,this._buildContent(),this._contentDomNode.domNode.focus())}_descriptionForCommand(e,t,i){const s=this._keybindingService.lookupKeybinding(e);return s?xi.GP(t,s.getAriaLabel()):xi.GP(i,e)}_buildContent(){const e=this._editor.getOptions(),t=this._editor.getSelections();let i=0;if(t){const m=this._editor.getModel();m&&t.forEach(A=>{i+=m.getValueLengthInRange(A)})}let s=DD(t,i);e.get(56)?e.get(83)?s+=bs.b2.readonlyDiffEditor:s+=bs.b2.editableDiffEditor:e.get(83)?s+=bs.b2.readonlyEditor:s+=bs.b2.editableEditor;const o=Pi.zx?bs.b2.changeConfigToOnMac:bs.b2.changeConfigToOnWinLinux;switch(e.get(2)){case 0:s+=` - `+o;break;case 2:s+=` - `+bs.b2.auto_on;break;case 1:s+=` - `+bs.b2.auto_off,s+=" "+o;break}e.get(132)?s+=` - `+this._descriptionForCommand(gh.ID,bs.b2.tabFocusModeOnMsg,bs.b2.tabFocusModeOnMsgNoKb):s+=` - `+this._descriptionForCommand(gh.ID,bs.b2.tabFocusModeOffMsg,bs.b2.tabFocusModeOffMsgNoKb);const c=Pi.zx?bs.b2.openDocMac:bs.b2.openDocWinLinux;s+=` - `+c,s+=` `+bs.b2.outroMsg,this._contentDomNode.domNode.appendChild((0,kg.yk)(s)),this._contentDomNode.domNode.setAttribute("aria-label",s)}hide(){this._isVisible&&(this._isVisible=!1,this._isVisibleKey.reset(),this._domNode.setDisplay("none"),this._domNode.setAttribute("aria-hidden","true"),this._contentDomNode.domNode.tabIndex=-1,M.w_(this._contentDomNode.domNode),this._editor.focus())}_layout(){const e=this._editor.getLayoutInfo(),t=Math.max(5,Math.min(um.WIDTH,e.width-40)),i=Math.max(5,Math.min(um.HEIGHT,e.height-40));this._domNode.setWidth(t),this._domNode.setHeight(i);const s=Math.round((e.height-i)/2);this._domNode.setTop(s);const o=Math.round((e.width-t)/2);this._domNode.setLeft(o)}};bh.ID="editor.contrib.accessibilityHelpWidget",bh.WIDTH=500,bh.HEIGHT=300,bh=Iv([Gf(1,ct.fN),Gf(2,ye.b),Gf(3,Ho.Cr)],bh);class kD extends Te.ks{constructor(){super({id:"editor.action.showAccessibilityHelp",label:bs.b2.showAccessibilityHelpAction,alias:"Show Accessibility Help",precondition:void 0,kbOpts:{primary:571,weight:100,linux:{primary:1595,secondary:[571]}}})}run(e,t){const i=tc.get(t);i&&i.show()}}(0,Te.HW)(tc.ID,tc),(0,Te.Fl)(kD);const ED=Te.DX.bindToContribution(tc.get);(0,Te.E_)(new ED({id:"closeAccessibilityHelp",precondition:Nv,handler:u=>u.hide(),kbOpts:{weight:100+100,kbExpr:ze.R.focus,primary:9,secondary:[1033]}})),(0,Ye.zy)((u,e)=>{const t=u.getColor(Ce.CgL);t&&e.addRule(`.monaco-editor .accessibilityHelpWidget { background-color: ${t}; }`);const i=u.getColor(Ce.FiB);i&&e.addRule(`.monaco-editor .accessibilityHelpWidget { color: ${i}; }`);const s=u.getColor(Ce.f9l);s&&e.addRule(`.monaco-editor .accessibilityHelpWidget { box-shadow: 0 2px 8px ${s}; }`);const o=u.getColor(Ce.b1q);o&&e.addRule(`.monaco-editor .accessibilityHelpWidget { border: 2px solid ${o}; }`)});var Bk=f(778);class l_ extends at.jG{constructor(e){super(),this.editor=e,this.widget=null,Pi.un&&(this._register(e.onDidChangeConfiguration(()=>this.update())),this.update())}update(){const e=!this.editor.getOption(83);!this.widget&&e?this.widget=new Qf(this.editor):this.widget&&!e&&(this.widget.dispose(),this.widget=null)}dispose(){super.dispose(),this.widget&&(this.widget.dispose(),this.widget=null)}}l_.ID="editor.contrib.iPadShowKeyboard";class Qf extends at.jG{constructor(e){super(),this.editor=e,this._domNode=document.createElement("textarea"),this._domNode.className="iPadShowKeyboard",this._register(M.ko(this._domNode,"touchstart",t=>{this.editor.focus()})),this._register(M.ko(this._domNode,"focus",t=>{this.editor.focus()})),this.editor.addOverlayWidget(this)}dispose(){this.editor.removeOverlayWidget(this),super.dispose()}getId(){return Qf.ID}getDomNode(){return this._domNode}getPosition(){return{preference:1}}}Qf.ID="editor.contrib.ShowKeyboardWidget",(0,Te.HW)(l_.ID,l_);var Wk=f(43152),Hu=f(15910),d_=f(97036),Mv=f(83616),xD=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},Tv=function(u,e){return function(t,i){e(t,i,u)}};let wh=class TC extends at.jG{constructor(e,t,i){super(),this._editor=e,this._languageService=i,this._widget=null,this._register(this._editor.onDidChangeModel(s=>this.stop())),this._register(this._editor.onDidChangeModelLanguage(s=>this.stop())),this._register(Xe.dG.onDidChange(s=>this.stop())),this._register(this._editor.onKeyUp(s=>s.keyCode===9&&this.stop()))}static get(e){return e.getContribution(TC.ID)}dispose(){this.stop(),super.dispose()}launch(){this._widget||this._editor.hasModel()&&(this._widget=new Zf(this._editor,this._languageService))}stop(){this._widget&&(this._widget.dispose(),this._widget=null)}};wh.ID="editor.contrib.inspectTokens",wh=xD([Tv(1,Mv.L),Tv(2,Fs.L)],wh);class ID extends Te.ks{constructor(){super({id:"editor.action.inspectTokens",label:bs.YN.inspectTokensAction,alias:"Developer: Inspect Tokens",precondition:void 0})}run(e,t){const i=wh.get(t);i&&i.launch()}}function ND(u){let e="";for(let t=0,i=u.length;t<i;t++){const s=u.charCodeAt(t);switch(s){case 9:e+="\u2192";break;case 32:e+="\xB7";break;default:e+=String.fromCharCode(s)}}return e}function MD(u,e){const t=Xe.dG.get(e);if(t)return t;const i=u.encodeLanguageId(e);return{getInitialState:()=>d_.r3,tokenize:(s,o,c)=>(0,d_.$H)(e,c),tokenizeEncoded:(s,o,c)=>(0,d_.Lh)(i,c)}}class Zf extends at.jG{constructor(e,t){super(),this.allowEditorOverflow=!0,this._editor=e,this._languageService=t,this._model=this._editor.getModel(),this._domNode=document.createElement("div"),this._domNode.className="tokens-inspect-widget",this._tokenizationSupport=MD(this._languageService.languageIdCodec,this._model.getLanguageId()),this._compute(this._editor.getPosition()),this._register(this._editor.onDidChangeCursorPosition(i=>this._compute(this._editor.getPosition()))),this._editor.addContentWidget(this)}dispose(){this._editor.removeContentWidget(this),super.dispose()}getId(){return Zf._ID}_compute(e){const t=this._getTokensAtLine(e.lineNumber);let i=0;for(let A=t.tokens1.length-1;A>=0;A--){const U=t.tokens1[A];if(e.column-1>=U.offset){i=A;break}}let s=0;for(let A=t.tokens2.length>>>1;A>=0;A--)if(e.column-1>=t.tokens2[A<<1]){s=A;break}const o=this._model.getLineContent(e.lineNumber);let c="";if(i<t.tokens1.length){const A=t.tokens1[i].offset,U=i+1<t.tokens1.length?t.tokens1[i+1].offset:o.length;c=o.substring(A,U)}(0,M.Ln)(this._domNode,(0,M.$)("h2.tm-token",void 0,ND(c),(0,M.$)("span.tm-token-length",void 0,`${c.length} ${c.length===1?"char":"chars"}`))),(0,M.BC)(this._domNode,(0,M.$)("hr.tokens-inspect-separator",{style:"clear:both"}));const m=(s<<1)+1<t.tokens2.length?this._decodeMetadata(t.tokens2[(s<<1)+1]):null;(0,M.BC)(this._domNode,(0,M.$)("table.tm-metadata-table",void 0,(0,M.$)("tbody",void 0,(0,M.$)("tr",void 0,(0,M.$)("td.tm-metadata-key",void 0,"language"),(0,M.$)("td.tm-metadata-value",void 0,`${m?m.languageId:"-?-"}`)),(0,M.$)("tr",void 0,(0,M.$)("td.tm-metadata-key",void 0,"token type"),(0,M.$)("td.tm-metadata-value",void 0,`${m?this._tokenTypeToString(m.tokenType):"-?-"}`)),(0,M.$)("tr",void 0,(0,M.$)("td.tm-metadata-key",void 0,"font style"),(0,M.$)("td.tm-metadata-value",void 0,`${m?this._fontStyleToString(m.fontStyle):"-?-"}`)),(0,M.$)("tr",void 0,(0,M.$)("td.tm-metadata-key",void 0,"foreground"),(0,M.$)("td.tm-metadata-value",void 0,`${m?Dn.Q1.Format.CSS.formatHex(m.foreground):"-?-"}`)),(0,M.$)("tr",void 0,(0,M.$)("td.tm-metadata-key",void 0,"background"),(0,M.$)("td.tm-metadata-value",void 0,`${m?Dn.Q1.Format.CSS.formatHex(m.background):"-?-"}`))))),(0,M.BC)(this._domNode,(0,M.$)("hr.tokens-inspect-separator")),i<t.tokens1.length&&(0,M.BC)(this._domNode,(0,M.$)("span.tm-token-type",void 0,t.tokens1[i].type)),this._editor.layoutContentWidget(this)}_decodeMetadata(e){const t=Xe.dG.getColorMap(),i=Hu.x.getLanguageId(e),s=Hu.x.getTokenType(e),o=Hu.x.getFontStyle(e),c=Hu.x.getForeground(e),m=Hu.x.getBackground(e);return{languageId:this._languageService.languageIdCodec.decodeLanguageId(i),tokenType:s,fontStyle:o,foreground:t[c],background:t[m]}}_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 t="";return e&1&&(t+="italic "),e&2&&(t+="bold "),e&4&&(t+="underline "),e&8&&(t+="strikethrough "),t.length===0&&(t="---"),t}_getTokensAtLine(e){const t=this._getStateBeforeLine(e),i=this._tokenizationSupport.tokenize(this._model.getLineContent(e),!0,t),s=this._tokenizationSupport.tokenizeEncoded(this._model.getLineContent(e),!0,t);return{startState:t,tokens1:i.tokens,tokens2:s.tokens,endState:i.endState}}_getStateBeforeLine(e){let t=this._tokenizationSupport.getInitialState();for(let i=1;i<e;i++)t=this._tokenizationSupport.tokenize(this._model.getLineContent(i),!0,t).endState;return t}getDomNode(){return this._domNode}getPosition(){return{position:this._editor.getPosition(),preference:[2,1]}}}Zf._ID="editor.contrib.inspectTokensWidget",(0,Te.HW)(wh.ID,wh),(0,Te.Fl)(ID),(0,Ye.zy)((u,e)=>{const t=u.getColor(Ce.oZ8);if(t){const o=(0,Ro.Bb)(u.type)?2:1;e.addRule(`.monaco-editor .tokens-inspect-widget { border: ${o}px solid ${t}; }`),e.addRule(`.monaco-editor .tokens-inspect-widget .tokens-inspect-separator { background-color: ${t}; }`)}const i=u.getColor(Ce.WfR);i&&e.addRule(`.monaco-editor .tokens-inspect-widget { background-color: ${i}; }`);const s=u.getColor(Ce.Xo2);s&&e.addRule(`.monaco-editor .tokens-inspect-widget { color: ${s}; }`)});var zu=f(19381),TD=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},Rv=function(u,e){return function(t,i){e(t,i,u)}};let Yf=class gm{constructor(e,t){this.quickInputService=e,this.keybindingService=t,this.registry=So.O.as(zu.Fd.Quickaccess)}provide(e){const t=new at.Cm;return t.add(e.onDidAccept(()=>{const[i]=e.selectedItems;i&&this.quickInputService.quickAccess.show(i.prefix,{preserveValue:!0})})),t.add(e.onDidChangeValue(i=>{const s=this.registry.getQuickAccessProvider(i.substr(gm.PREFIX.length));s&&s.prefix&&s.prefix!==gm.PREFIX&&this.quickInputService.quickAccess.show(s.prefix,{preserveValue:!0})})),e.items=this.getQuickAccessProviders(),t}getQuickAccessProviders(){const e=[];for(const t of this.registry.getQuickAccessProviders().sort((i,s)=>i.prefix.localeCompare(s.prefix)))if(t.prefix!==gm.PREFIX)for(const i of t.helpEntries){const s=i.prefix||t.prefix,o=s||"\u2026";e.push({prefix:s,label:o,keybinding:i.commandId?this.keybindingService.lookupKeybinding(i.commandId):void 0,ariaLabel:(0,we.kg)("helpPickAriaLabel","{0}, {1}",o,i.description),description:i.description})}return e}};Yf.PREFIX="?",Yf=TD([Rv(0,$r.GK),Rv(1,ye.b)],Yf),So.O.as(zu.Fd.Quickaccess).registerQuickAccessProvider({ctor:Yf,prefix:"",helpEntries:[{description:bs.oq.helpQuickAccessActionLabel}]});class Av{constructor(e){this.options=e,this.rangeHighlightDecorationId=void 0}provide(e,t){var i;const s=new at.Cm;e.canAcceptInBackground=!!(!((i=this.options)===null||i===void 0)&&i.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;const o=s.add(new at.HE);return o.value=this.doProvide(e,t),s.add(this.onDidActiveTextEditorControlChange(()=>{o.value=void 0,o.value=this.doProvide(e,t)})),s}doProvide(e,t){const i=new at.Cm,s=this.activeTextEditorControl;if(s&&this.canProvideWithTextEditor(s)){const o={editor:s},c=(0,je.jA)(s);if(c){let m=(0,pi.UH)(s.saveViewState());i.add(c.onDidChangeCursorPosition(()=>{m=(0,pi.UH)(s.saveViewState())})),o.restoreViewState=()=>{m&&s===this.activeTextEditorControl&&s.restoreViewState(m)},i.add((0,Vo.O)(t.onCancellationRequested)(()=>{var A;return(A=o.restoreViewState)===null||A===void 0?void 0:A.call(o)}))}i.add((0,at.s)(()=>this.clearDecorations(s))),i.add(this.provideWithTextEditor(o,e,t))}else i.add(this.provideWithoutTextEditor(e,t));return i}canProvideWithTextEditor(e){return!0}gotoLocation({editor:e},t){e.setSelection(t.range),e.revealRangeInCenter(t.range,0),t.preserveFocus||e.focus()}getModel(e){var t;return(0,je.Np)(e)?(t=e.getModel())===null||t===void 0?void 0:t.modified:e.getModel()}addDecorations(e,t){e.changeDecorations(i=>{const s=[];this.rangeHighlightDecorationId&&(s.push(this.rangeHighlightDecorationId.overviewRulerDecorationId),s.push(this.rangeHighlightDecorationId.rangeHighlightId),this.rangeHighlightDecorationId=void 0);const o=[{range:t,options:{description:"quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:t,options:{description:"quick-access-range-highlight-overview",overviewRuler:{color:(0,Ye.Yf)(ni.vp),position:bn.A5.Full}}}],[c,m]=i.deltaDecorations(s,o);this.rangeHighlightDecorationId={rangeHighlightId:c,overviewRulerDecorationId:m}})}clearDecorations(e){const t=this.rangeHighlightDecorationId;t&&(e.changeDecorations(i=>{i.deltaDecorations([t.overviewRulerDecorationId,t.rangeHighlightId],[])}),this.rangeHighlightDecorationId=void 0)}}class Xf extends Av{constructor(){super({canAcceptInBackground:!0})}provideWithoutTextEditor(e){const t=(0,we.kg)("cannotRunGotoLine","Open a text editor first to go to a line.");return e.items=[{label:t}],e.ariaLabel=t,at.jG.None}provideWithTextEditor(e,t,i){const s=e.editor,o=new at.Cm;o.add(t.onDidAccept(A=>{const[U]=t.selectedItems;if(U){if(!this.isValidLineNumber(s,U.lineNumber))return;this.gotoLocation(e,{range:this.toRange(U.lineNumber,U.column),keyMods:t.keyMods,preserveFocus:A.inBackground}),A.inBackground||t.hide()}}));const c=()=>{const A=this.parsePosition(s,t.value.trim().substr(Xf.PREFIX.length)),U=this.getPickLabel(s,A.lineNumber,A.column);if(t.items=[{lineNumber:A.lineNumber,column:A.column,label:U}],t.ariaLabel=U,!this.isValidLineNumber(s,A.lineNumber)){this.clearDecorations(s);return}const W=this.toRange(A.lineNumber,A.column);s.revealRangeInCenter(W,0),this.addDecorations(s,W)};c(),o.add(t.onDidChangeValue(()=>c()));const m=(0,je.jA)(s);return m&&m.getOptions().get(62).renderType===2&&(m.updateOptions({lineNumbers:"on"}),o.add((0,at.s)(()=>m.updateOptions({lineNumbers:"relative"})))),o}toRange(e=1,t=1){return{startLineNumber:e,startColumn:t,endLineNumber:e,endColumn:t}}parsePosition(e,t){const i=t.split(/,|:|#/).map(o=>parseInt(o,10)).filter(o=>!isNaN(o)),s=this.lineCount(e)+1;return{lineNumber:i[0]>0?i[0]:s+i[0],column:i[1]}}getPickLabel(e,t,i){if(this.isValidLineNumber(e,t))return this.isValidColumn(e,t,i)?(0,we.kg)("gotoLineColumnLabel","Go to line {0} and character {1}.",t,i):(0,we.kg)("gotoLineLabel","Go to line {0}.",t);const s=e.getPosition()||{lineNumber:1,column:1},o=this.lineCount(e);return o>1?(0,we.kg)("gotoLineLabelEmptyWithLimit","Current Line: {0}, Character: {1}. Type a line number between 1 and {2} to navigate to.",s.lineNumber,s.column,o):(0,we.kg)("gotoLineLabelEmpty","Current Line: {0}, Character: {1}. Type a line number to navigate to.",s.lineNumber,s.column)}isValidLineNumber(e,t){return!t||typeof t!="number"?!1:t>0&&t<=this.lineCount(e)}isValidColumn(e,t,i){if(!i||typeof i!="number")return!1;const s=this.getModel(e);if(!s)return!1;const o={lineNumber:t,column:i};return s.validatePosition(o).equals(o)}lineCount(e){var t,i;return(i=(t=this.getModel(e))===null||t===void 0?void 0:t.getLineCount())!==null&&i!==void 0?i:0}}Xf.PREFIX=":";var RD=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},AD=function(u,e){return function(t,i){e(t,i,u)}};let Uu=class extends Xf{constructor(e){super(),this.editorService=e,this.onDidActiveTextEditorControlChange=Vi.Jh.None}get activeTextEditorControl(){return(0,pi.UH)(this.editorService.getFocusedCodeEditor())}};Uu=RD([AD(0,Gi.T)],Uu);class ju extends Te.ks{constructor(){super({id:ju.ID,label:bs.Hw.gotoLineActionLabel,alias:"Go to Line/Column...",precondition:void 0,kbOpts:{kbExpr:ze.R.focus,primary:2085,mac:{primary:293},weight:100}})}run(e){e.get($r.GK).quickAccess.show(Uu.PREFIX)}}ju.ID="editor.action.gotoLine",(0,Te.Fl)(ju),So.O.as(zu.Fd.Quickaccess).registerQuickAccessProvider({ctor:Uu,prefix:Uu.PREFIX,helpEntries:[{description:bs.Hw.gotoLineActionLabel,commandId:ju.ID}]});const Ov=[void 0,[]];function c_(u,e,t=0,i=0){const s=e;return s.values&&s.values.length>1?OD(u,s.values,t,i):Pv(u,e,t,i)}function OD(u,e,t,i){let s=0;const o=[];for(const c of e){const[m,A]=Pv(u,c,t,i);if(typeof m!="number")return Ov;s+=m,o.push(...A)}return[s,PD(o)]}function Pv(u,e,t,i){const s=(0,Qi.dt)(e.original,e.originalLowercase,t,u,u.toLowerCase(),i,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return s?[s[0],(0,Qi.WJ)(s)]:Ov}const Vk=Object.freeze({score:0});function PD(u){const e=u.sort((s,o)=>s.start-o.start),t=[];let i;for(const s of e)!i||!FD(i,s)?(i=s,t.push(s)):(i.start=Math.min(i.start,s.start),i.end=Math.max(i.end,s.end));return t}function FD(u,e){return!(u.end<e.start||e.end<u.start)}function Fv(u){return u.startsWith('"')&&u.endsWith('"')}const Bv=" ";function h_(u){typeof u!="string"&&(u="");const e=u.toLowerCase(),{pathNormalized:t,normalized:i,normalizedLowercase:s}=Wv(u),o=t.indexOf(il.Vn)>=0,c=Fv(u);let m;const A=u.split(Bv);if(A.length>1)for(const U of A){const W=Fv(U),{pathNormalized:re,normalized:Se,normalizedLowercase:Be}=Wv(U);Se&&(m||(m=[]),m.push({original:U,originalLowercase:U.toLowerCase(),pathNormalized:re,normalized:Se,normalizedLowercase:Be,expectContiguousMatch:W}))}return{original:u,originalLowercase:e,pathNormalized:t,normalized:i,normalizedLowercase:s,values:m,containsPathSeparator:o,expectContiguousMatch:c}}function Wv(u){let e;Pi.uF?e=u.replace(/\//g,il.Vn):e=u.replace(/\\/g,il.Vn);const t=(0,xi.wB)(e).replace(/\s|"/g,"");return{pathNormalized:e,normalized:t,normalizedLowercase:t.toLowerCase()}}function Vv(u){return Array.isArray(u)?h_(u.map(e=>e.original).join(Bv)):h_(u.original)}var BD=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},Hv=function(u,e){return function(t,i){e(t,i,u)}},Ku=function(u,e,t,i){function s(o){return o instanceof t?o:new t(function(c){c(o)})}return new(t||(t=Promise))(function(o,c){function m(W){try{U(i.next(W))}catch(re){c(re)}}function A(W){try{U(i.throw(W))}catch(re){c(re)}}function U(W){W.done?o(W.value):s(W.value).then(m,A)}U((i=i.apply(u,e||[])).next())})};let Vr=class A_ extends Av{constructor(e,t,i=Object.create(null)){super(i),this._languageFeaturesService=e,this._outlineModelService=t,this.options=i,this.options.canAcceptInBackground=!0}provideWithoutTextEditor(e){return this.provideLabelPick(e,(0,we.kg)("cannotRunGotoSymbolWithoutEditor","To go to a symbol, first open a text editor with symbol information.")),at.jG.None}provideWithTextEditor(e,t,i){const s=e.editor,o=this.getModel(s);return o?this._languageFeaturesService.documentSymbolProvider.has(o)?this.doProvideWithEditorSymbols(e,o,t,i):this.doProvideWithoutEditorSymbols(e,o,t,i):at.jG.None}doProvideWithoutEditorSymbols(e,t,i,s){const o=new at.Cm;return this.provideLabelPick(i,(0,we.kg)("cannotRunGotoSymbolWithoutSymbolProvider","The active text editor does not provide symbol information.")),Ku(this,void 0,void 0,function*(){!(yield this.waitForLanguageSymbolRegistry(t,o))||s.isCancellationRequested||o.add(this.doProvideWithEditorSymbols(e,t,i,s))}),o}provideLabelPick(e,t){e.items=[{label:t,index:0,kind:14}],e.ariaLabel=t}waitForLanguageSymbolRegistry(e,t){return Ku(this,void 0,void 0,function*(){if(this._languageFeaturesService.documentSymbolProvider.has(e))return!0;const i=new Ot.Zv,s=t.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(()=>{this._languageFeaturesService.documentSymbolProvider.has(e)&&(s.dispose(),i.complete(!0))}));return t.add((0,at.s)(()=>i.complete(!1))),i.p})}doProvideWithEditorSymbols(e,t,i,s){var o;const c=e.editor,m=new at.Cm;m.add(i.onDidAccept(Se=>{const[Be]=i.selectedItems;Be&&Be.range&&(this.gotoLocation(e,{range:Be.range.selection,keyMods:i.keyMods,preserveFocus:Se.inBackground}),Se.inBackground||i.hide())})),m.add(i.onDidTriggerItemButton(({item:Se})=>{Se&&Se.range&&(this.gotoLocation(e,{range:Se.range.selection,keyMods:i.keyMods,forceSideBySide:!0}),i.hide())}));const A=this.getDocumentSymbols(t,s);let U;const W=Se=>Ku(this,void 0,void 0,function*(){U?.dispose(!0),i.busy=!1,U=new Ti.Q(s),i.busy=!0;try{const Be=h_(i.value.substr(A_.PREFIX.length).trim()),Qe=yield this.doGetSymbolPicks(A,Be,void 0,U.token);if(s.isCancellationRequested)return;if(Qe.length>0){if(i.items=Qe,Se&&Be.original.length===0){const tt=(0,cn.Uk)(Qe,vt=>!!(vt.type!=="separator"&&vt.range&&St.Q.containsPosition(vt.range.decoration,Se)));tt&&(i.activeItems=[tt])}}else Be.original.length>0?this.provideLabelPick(i,(0,we.kg)("noMatchingSymbolResults","No matching editor symbols")):this.provideLabelPick(i,(0,we.kg)("noSymbolResults","No editor symbols"))}finally{s.isCancellationRequested||(i.busy=!1)}});m.add(i.onDidChangeValue(()=>W(void 0))),W((o=c.getSelection())===null||o===void 0?void 0:o.getPosition());let re=2;return m.add(i.onDidChangeActive(()=>{const[Se]=i.activeItems;if(Se&&Se.range){if(re-- >0)return;c.revealRangeInCenter(Se.range.selection,0),this.addDecorations(c,Se.range.decoration)}})),m}doGetSymbolPicks(e,t,i,s){return Ku(this,void 0,void 0,function*(){const o=yield e;if(s.isCancellationRequested)return[];const c=t.original.indexOf(A_.SCOPE_PREFIX)===0,m=c?1:0;let A,U;t.values&&t.values.length>1?(A=Vv(t.values[0]),U=Vv(t.values.slice(1))):A=t;const W=[];for(let Be=0;Be<o.length;Be++){const Qe=o[Be],tt=(0,xi.Bq)(Qe.name),vt=`$(${Xe.gP.toIcon(Qe.kind).id}) ${tt}`,Ht=vt.length-tt.length;let ci=Qe.containerName;i?.extraContainerLabel&&(ci?ci=`${i.extraContainerLabel} \u2022 ${ci}`:ci=i.extraContainerLabel);let gi,Ui,dn,hs;if(t.original.length>m){let vo=!1;if(A!==t&&([gi,Ui]=c_(vt,Object.assign(Object.assign({},t),{values:void 0}),m,Ht),typeof gi=="number"&&(vo=!0)),typeof gi!="number"&&([gi,Ui]=c_(vt,A,m,Ht),typeof gi!="number"))continue;if(!vo&&U){if(ci&&U.original.length>0&&([dn,hs]=c_(ci,U)),typeof dn!="number")continue;typeof gi=="number"&&(gi+=dn)}}const An=Qe.tags&&Qe.tags.indexOf(1)>=0;W.push({index:Be,kind:Qe.kind,score:gi,label:vt,ariaLabel:tt,description:ci,highlights:An?void 0:{label:Ui,description:hs},range:{selection:St.Q.collapseToStart(Qe.selectionRange),decoration:Qe.range},strikethrough:An,buttons:(()=>{var vo,Po;const Uo=!((vo=this.options)===null||vo===void 0)&&vo.openSideBySideDirection?(Po=this.options)===null||Po===void 0?void 0:Po.openSideBySideDirection():void 0;if(Uo)return[{iconClass:Uo==="right"?Mi.W6.splitHorizontal.classNames:Mi.W6.splitVertical.classNames,tooltip:Uo==="right"?(0,we.kg)("openToSide","Open to the Side"):(0,we.kg)("openToBottom","Open to the Bottom")}]})()})}const re=W.sort((Be,Qe)=>c?this.compareByKindAndScore(Be,Qe):this.compareByScore(Be,Qe));let Se=[];if(c){let vt=function(){Qe&&typeof Be=="number"&&tt>0&&(Qe.label=(0,xi.GP)(g_[Be]||u_,tt))},Be,Qe,tt=0;for(const Ht of re)Be!==Ht.kind?(vt(),Be=Ht.kind,tt=1,Qe={type:"separator"},Se.push(Qe)):tt++,Se.push(Ht);vt()}else re.length>0&&(Se=[{label:(0,we.kg)("symbols","symbols ({0})",W.length),type:"separator"},...re]);return Se})}compareByScore(e,t){if(typeof e.score!="number"&&typeof t.score=="number")return 1;if(typeof e.score=="number"&&typeof t.score!="number")return-1;if(typeof e.score=="number"&&typeof t.score=="number"){if(e.score>t.score)return-1;if(e.score<t.score)return 1}return e.index<t.index?-1:e.index>t.index?1:0}compareByKindAndScore(e,t){const i=g_[e.kind]||u_,s=g_[t.kind]||u_,o=i.localeCompare(s);return o===0?this.compareByScore(e,t):o}getDocumentSymbols(e,t){return Ku(this,void 0,void 0,function*(){const i=yield this._outlineModelService.getOrCreate(e,t);return t.isCancellationRequested?[]:i.asListOfDocumentSymbols()})}};Vr.PREFIX="@",Vr.SCOPE_PREFIX=":",Vr.PREFIX_BY_CATEGORY=`${Vr.PREFIX}${Vr.SCOPE_PREFIX}`,Vr=BD([Hv(0,Zi.u),Hv(1,uf)],Vr);const u_=(0,we.kg)("property","properties ({0})"),g_={[5]:(0,we.kg)("method","methods ({0})"),[11]:(0,we.kg)("function","functions ({0})"),[8]:(0,we.kg)("_constructor","constructors ({0})"),[12]:(0,we.kg)("variable","variables ({0})"),[4]:(0,we.kg)("class","classes ({0})"),[22]:(0,we.kg)("struct","structs ({0})"),[23]:(0,we.kg)("event","events ({0})"),[24]:(0,we.kg)("operator","operators ({0})"),[10]:(0,we.kg)("interface","interfaces ({0})"),[2]:(0,we.kg)("namespace","namespaces ({0})"),[3]:(0,we.kg)("package","packages ({0})"),[25]:(0,we.kg)("typeParameter","type parameters ({0})"),[1]:(0,we.kg)("modules","modules ({0})"),[6]:(0,we.kg)("property","properties ({0})"),[9]:(0,we.kg)("enum","enumerations ({0})"),[21]:(0,we.kg)("enumMember","enumeration members ({0})"),[14]:(0,we.kg)("string","strings ({0})"),[0]:(0,we.kg)("file","files ({0})"),[17]:(0,we.kg)("array","arrays ({0})"),[15]:(0,we.kg)("number","numbers ({0})"),[16]:(0,we.kg)("boolean","booleans ({0})"),[18]:(0,we.kg)("object","objects ({0})"),[19]:(0,we.kg)("key","keys ({0})"),[7]:(0,we.kg)("field","fields ({0})"),[13]:(0,we.kg)("constant","constants ({0})")};var WD=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},f_=function(u,e){return function(t,i){e(t,i,u)}};let m_=class extends Vr{constructor(e,t,i){super(t,i),this.editorService=e,this.onDidActiveTextEditorControlChange=Vi.Jh.None}get activeTextEditorControl(){return(0,pi.UH)(this.editorService.getFocusedCodeEditor())}};m_=WD([f_(0,Gi.T),f_(1,Zi.u),f_(2,uf)],m_);class $u extends Te.ks{constructor(){super({id:$u.ID,label:bs.n9.quickOutlineActionLabel,alias:"Go to Symbol...",precondition:ze.R.hasDocumentSymbolProvider,kbOpts:{kbExpr:ze.R.focus,primary:3117,weight:100},contextMenuOpts:{group:"navigation",order:3}})}run(e){e.get($r.GK).quickAccess.show(Vr.PREFIX)}}$u.ID="editor.action.quickOutline",(0,Te.Fl)($u),So.O.as(zu.Fd.Quickaccess).registerQuickAccessProvider({ctor:m_,prefix:Vr.PREFIX,helpEntries:[{description:bs.n9.quickOutlineActionLabel,prefix:Vr.PREFIX,commandId:$u.ID},{description:bs.n9.quickOutlineByCategoryActionLabel,prefix:Vr.PREFIX_BY_CATEGORY}]});function p_(u,e){return e&&(u.stack||u.stacktrace)?we.kg("stackTrace.format","{0}: {1}",Uv(u),zv(u.stack)||zv(u.stacktrace)):Uv(u)}function zv(u){return Array.isArray(u)?u.join(` `):u}function Uv(u){return typeof u.code=="string"&&typeof u.errno=="number"&&typeof u.syscall=="string"?we.kg("nodeExceptionMessage","A system error occurred ({0})",u.message):u.message||we.kg("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}function jv(u=null,e=!1){if(!u)return we.kg("error.defaultMessage","An unknown error occurred. Please consult the log for more details.");if(Array.isArray(u)){const t=cn.Yc(u),i=jv(t[0],e);return t.length>1?we.kg("error.moreErrors","{0} ({1} errors in total)",i,t.length):i}if(pi.Kg(u))return u;if(u.detail){const t=u.detail;if(t.error)return p_(t.error,e);if(t.exception)return p_(t.exception,e)}return u.stack?p_(u,e):u.message?u.message:we.kg("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}var Jf=function(u,e,t,i){function s(o){return o instanceof t?o:new t(function(c){c(o)})}return new(t||(t=Promise))(function(o,c){function m(W){try{U(i.next(W))}catch(re){c(re)}}function A(W){try{U(i.throw(W))}catch(re){c(re)}}function U(W){W.done?o(W.value):s(W.value).then(m,A)}U((i=i.apply(u,e||[])).next())})},Sh;(function(u){u[u.NO_ACTION=0]="NO_ACTION",u[u.CLOSE_PICKER=1]="CLOSE_PICKER",u[u.REFRESH_PICKER=2]="REFRESH_PICKER",u[u.REMOVE_ITEM=3]="REMOVE_ITEM"})(Sh||(Sh={}));function __(u){const e=u;return Array.isArray(e.items)}function VD(u){const e=u;return!!e.picks&&e.additionalPicks instanceof Promise}class qf extends at.jG{constructor(e,t){super(),this.prefix=e,this.options=t}provide(e,t){var i;const s=new at.Cm;e.canAcceptInBackground=!!(!((i=this.options)===null||i===void 0)&&i.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;let o;const c=s.add(new at.HE),m=()=>Jf(this,void 0,void 0,function*(){const A=c.value=new at.Cm;o?.dispose(!0),e.busy=!1,o=new Ti.Q(t);const U=o.token,W=e.value.substr(this.prefix.length).trim(),re=this._getPicks(W,A,U),Se=(Be,Qe)=>{var tt;let vt,Ht;if(__(Be)?(vt=Be.items,Ht=Be.active):vt=Be,vt.length===0){if(Qe)return!1;W.length>0&&(!((tt=this.options)===null||tt===void 0)&&tt.noResultsPick)&&(vt=[this.options.noResultsPick])}return e.items=vt,Ht&&(e.activeItems=[Ht]),!0};if(re!==null)if(VD(re)){let Be=!1,Qe=!1;yield Promise.all([(()=>Jf(this,void 0,void 0,function*(){yield(0,Ot.wR)(qf.FAST_PICKS_RACE_DELAY),!U.isCancellationRequested&&(Qe||(Be=Se(re.picks,!0)))}))(),(()=>Jf(this,void 0,void 0,function*(){e.busy=!0;try{const tt=yield re.additionalPicks;if(U.isCancellationRequested)return;let vt,Ht;__(re.picks)?(vt=re.picks.items,Ht=re.picks.active):vt=re.picks;let ci,gi;if(__(tt)?(ci=tt.items,gi=tt.active):ci=tt,ci.length>0||!Be){let Ui;if(!Ht&&!gi){const dn=e.activeItems[0];dn&&vt.indexOf(dn)!==-1&&(Ui=dn)}Se({items:[...vt,...ci],active:Ht||gi||Ui})}}finally{U.isCancellationRequested||(e.busy=!1),Qe=!0}}))()])}else if(!(re instanceof Promise))Se(re);else{e.busy=!0;try{const Be=yield re;if(U.isCancellationRequested)return;Se(Be)}finally{U.isCancellationRequested||(e.busy=!1)}}});return s.add(e.onDidChangeValue(()=>m())),m(),s.add(e.onDidAccept(A=>{const[U]=e.selectedItems;typeof U?.accept=="function"&&(A.inBackground||e.hide(),U.accept(e.keyMods,A))})),s.add(e.onDidTriggerItemButton(({button:A,item:U})=>Jf(this,void 0,void 0,function*(){var W,re;if(typeof U.trigger=="function"){const Se=(re=(W=U.buttons)===null||W===void 0?void 0:W.indexOf(A))!==null&&re!==void 0?re:-1;if(Se>=0){const Be=U.trigger(Se,e.keyMods),Qe=typeof Be=="number"?Be:yield Be;if(t.isCancellationRequested)return;switch(Qe){case Sh.NO_ACTION:break;case Sh.CLOSE_PICKER:e.hide();break;case Sh.REFRESH_PICKER:m();break;case Sh.REMOVE_ITEM:{const tt=e.items.indexOf(U);if(tt!==-1){const vt=e.items.slice(),Ht=vt.splice(tt,1),ci=e.activeItems.filter(Ui=>Ui!==Ht[0]),gi=e.keepScrollPosition;e.keepScrollPosition=!0,e.items=vt,ci&&(e.activeItems=ci),e.keepScrollPosition=gi}break}}}}}))),s}}qf.FAST_PICKS_RACE_DELAY=200;var Kv=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},ic=function(u,e){return function(t,i){e(t,i,u)}},$v=function(u,e,t,i){function s(o){return o instanceof t?o:new t(function(c){c(o)})}return new(t||(t=Promise))(function(o,c){function m(W){try{U(i.next(W))}catch(re){c(re)}}function A(W){try{U(i.throw(W))}catch(re){c(re)}}function U(W){W.done?o(W.value):s(W.value).then(m,A)}U((i=i.apply(u,e||[])).next())})};let Gu=class fm extends qf{constructor(e,t,i,s,o,c){super(fm.PREFIX,e),this.instantiationService=t,this.keybindingService=i,this.commandService=s,this.telemetryService=o,this.dialogService=c,this.commandsHistory=this._register(this.instantiationService.createInstance(nc)),this.options=e}_getPicks(e,t,i){return $v(this,void 0,void 0,function*(){const s=yield this.getCommandPicks(t,i);if(i.isCancellationRequested)return[];const o=[];for(const U of s){const W=(0,pi.UH)(fm.WORD_FILTER(e,U.label)),re=U.commandAlias?(0,pi.UH)(fm.WORD_FILTER(e,U.commandAlias)):void 0;W||re?(U.highlights={label:W,detail:this.options.showAlias?re:void 0},o.push(U)):e===U.commandId&&o.push(U)}const c=new Map;for(const U of o){const W=c.get(U.label);W?(U.description=U.commandId,W.description=W.commandId):c.set(U.label,U)}o.sort((U,W)=>{const re=this.commandsHistory.peek(U.commandId),Se=this.commandsHistory.peek(W.commandId);return re&&Se?re>Se?-1:1:re?-1:Se?1:U.label.localeCompare(W.label)});const m=[];let A=!1;for(let U=0;U<o.length;U++){const W=o[U],re=this.keybindingService.lookupKeybinding(W.commandId),Se=re?(0,we.kg)("commandPickAriaLabelWithKeybinding","{0}, {1}",W.label,re.getAriaLabel()):W.label;U===0&&this.commandsHistory.peek(W.commandId)&&(m.push({type:"separator",label:(0,we.kg)("recentlyUsed","recently used")}),A=!0),U!==0&&A&&!this.commandsHistory.peek(W.commandId)&&(m.push({type:"separator",label:(0,we.kg)("morecCommands","other commands")}),A=!1),m.push(Object.assign(Object.assign({},W),{ariaLabel:Se,detail:this.options.showAlias&&W.commandAlias!==W.label?W.commandAlias:void 0,keybinding:re,accept:()=>$v(this,void 0,void 0,function*(){this.commandsHistory.push(W.commandId),this.telemetryService.publicLog2("workbenchActionExecuted",{id:W.commandId,from:"quick open"});try{yield this.commandService.executeCommand(W.commandId)}catch(Be){(0,Wi.MB)(Be)||this.dialogService.show(jl.A.Error,(0,we.kg)("canNotRun","Command '{0}' resulted in an error ({1})",W.label,jv(Be)))}})}))}return m})}};Gu.PREFIX=">",Gu.WORD_FILTER=(0,Qi.or)(Qi.WP,Qi.J1,Qi.Tt),Gu=Kv([ic(1,P._Y),ic(2,ye.b),ic(3,fn.wT),ic(4,Me.k),ic(5,s_.X)],Gu);let nc=class so extends at.jG{constructor(e,t){super(),this.storageService=e,this.configurationService=t,this.configuredCommandsHistoryLength=0,this.updateConfiguration(),this.load(),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(()=>this.updateConfiguration()))}updateConfiguration(){this.configuredCommandsHistoryLength=so.getConfiguredCommandHistoryLength(this.configurationService),so.cache&&so.cache.limit!==this.configuredCommandsHistoryLength&&(so.cache.limit=this.configuredCommandsHistoryLength,so.saveState(this.storageService))}load(){const e=this.storageService.get(so.PREF_KEY_CACHE,0);let t;if(e)try{t=JSON.parse(e)}catch{}const i=so.cache=new ir.qK(this.configuredCommandsHistoryLength,1);if(t){let s;t.usesLRU?s=t.entries:s=t.entries.sort((o,c)=>o.value-c.value),s.forEach(o=>i.set(o.key,o.value))}so.counter=this.storageService.getNumber(so.PREF_KEY_COUNTER,0,so.counter)}push(e){so.cache&&(so.cache.set(e,so.counter++),so.saveState(this.storageService))}peek(e){var t;return(t=so.cache)===null||t===void 0?void 0:t.peek(e)}static saveState(e){if(!so.cache)return;const t={usesLRU:!0,entries:[]};so.cache.forEach((i,s)=>t.entries.push({key:s,value:i})),e.store(so.PREF_KEY_CACHE,JSON.stringify(t),0,0),e.store(so.PREF_KEY_COUNTER,so.counter,0,0)}static getConfiguredCommandHistoryLength(e){var t,i;const o=(i=(t=e.getValue().workbench)===null||t===void 0?void 0:t.commandPalette)===null||i===void 0?void 0:i.history;return typeof o=="number"?o:so.DEFAULT_COMMANDS_HISTORY_LENGTH}};nc.DEFAULT_COMMANDS_HISTORY_LENGTH=50,nc.PREF_KEY_CACHE="commandPalette.mru.cache",nc.PREF_KEY_COUNTER="commandPalette.mru.counter",nc.counter=1,nc=Kv([ic(0,fo.CS),ic(1,de.pG)],nc);class HD extends Gu{constructor(e,t,i,s,o,c){super(e,t,i,s,o,c)}getCodeEditorCommandPicks(){const e=this.activeTextEditorControl;if(!e)return[];const t=[];for(const i of e.getSupportedActions())t.push({commandId:i.id,commandAlias:i.alias,label:(0,Eg.pS)(i.label)||i.id});return t}}var zD=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},yh=function(u,e){return function(t,i){e(t,i,u)}},UD=function(u,e,t,i){function s(o){return o instanceof t?o:new t(function(c){c(o)})}return new(t||(t=Promise))(function(o,c){function m(W){try{U(i.next(W))}catch(re){c(re)}}function A(W){try{U(i.throw(W))}catch(re){c(re)}}function U(W){W.done?o(W.value):s(W.value).then(m,A)}U((i=i.apply(u,e||[])).next())})};let Qu=class extends HD{constructor(e,t,i,s,o,c){super({showAlias:!1},e,i,s,o,c),this.codeEditorService=t}get activeTextEditorControl(){return(0,pi.UH)(this.codeEditorService.getFocusedCodeEditor())}getCommandPicks(){return UD(this,void 0,void 0,function*(){return this.getCodeEditorCommandPicks()})}};Qu=zD([yh(0,P._Y),yh(1,Gi.T),yh(2,ye.b),yh(3,fn.wT),yh(4,Me.k),yh(5,s_.X)],Qu);class Zu extends Te.ks{constructor(){super({id:Zu.ID,label:bs.gf.quickCommandActionLabel,alias:"Command Palette",precondition:void 0,kbOpts:{kbExpr:ze.R.focus,primary:59,weight:100},contextMenuOpts:{group:"z_commands",order:1}})}run(e){e.get($r.GK).quickAccess.show(Qu.PREFIX)}}Zu.ID="editor.action.quickCommand",(0,Te.Fl)(Zu),So.O.as(zu.Fd.Quickaccess).registerQuickAccessProvider({ctor:Qu,prefix:Qu.PREFIX,helpEntries:[{description:bs.gf.quickCommandHelp,commandId:Zu.ID}]});var jD=function(u,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(u,e,t,i);else for(var m=u.length-1;m>=0;m--)(c=u[m])&&(o=(s<3?c(o):s>3?c(e,t,o):c(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},Lh=function(u,e){return function(t,i){e(t,i,u)}};let v_=class extends Pr{constructor(e,t,i,s,o,c,m){super(!0,e,t,i,s,o,c,m)}};v_=jD([Lh(1,ct.fN),Lh(2,Gi.T),Lh(3,Cs.Ot),Lh(4,P._Y),Lh(5,fo.CS),Lh(6,de.pG)],v_),(0,Te.HW)(Pr.ID,v_);var em=f(93582);class KD extends Te.ks{constructor(){super({id:"editor.action.toggleHighContrast",label:bs.E6.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0}),this._originalThemeName=null}run(e,t){const i=e.get(Mv.L),s=i.getColorTheme();(0,Ro.Bb)(s.type)?(i.setTheme(this._originalThemeName||((0,Ro.HD)(s.type)?em.po:em.tj)),this._originalThemeName=null):(i.setTheme((0,Ro.HD)(s.type)?em.aQ:em.nr),this._originalThemeName=s.themeName)}}(0,Te.Fl)(KD);for(var $D={wordPattern:/(-?\d*\.\d\w*)|([^`~!#%^&*()\-=+\[{\]}\\|;:'",.<>\/?\s]+)/g,comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"<",close:">"}],folding:{}},Gv=["sum","min","max","avg","group","stddev","stdvar","count","count_values","bottomk","topk","quantile"],GD=["abs","absent","ceil","changes","clamp_max","clamp_min","day_of_month","day_of_week","days_in_month","delta","deriv","exp","floor","histogram_quantile","holt_winters","hour","idelta","increase","irate","label_join","label_replace","ln","log2","log10","minute","month","predict_linear","rate","resets","round","scalar","sort","sort_desc","sqrt","time","timestamp","vector","year"],Qv=[],C_=0,Zv=Gv;C_<Zv.length;C_++){var QD=Zv[C_];Qv.push(QD+"_over_time")}var Yv=["on","ignoring","group_right","group_left","by","without"],ZD="("+Yv.reduce(function(u,e){return u+"|"+e})+")",YD=["+","-","*","/","%","^","==","!=",">","<",">=","<=","and","or","unless"],XD=["offset"],Xv=Gv.concat(GD).concat(Qv).concat(Yv).concat(XD),JD={ignoreCase:!1,defaultToken:"",tokenPostfix:".promql",keywords:Xv,operators:YD,vectorMatching:ZD,symbols:/[=><!~?:&|+\-*\/^%]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,digits:/\d+(_+\d+)*/,octaldigits:/[0-7]+(_+[0-7]+)*/,binarydigits:/[0-1]+(_+[0-1]+)*/,hexdigits:/[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,integersuffix:/(ll|LL|u|U|l|L)?(ll|LL|u|U|l|L)?/,floatsuffix:/[fFlL]?/,tokenizer:{root:[[/@vectorMatching\s*(?=\()/,"type","@clauses"],[/[a-z_]\w*(?=\s*(=|!=|=~|!~))/,"tag"],[/(^#.*$)/,"comment"],[/[a-zA-Z_]\w*/,{cases:{"@keywords":"type","@default":"identifier"}}],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string_double"],[/'/,"string","@string_single"],[/`/,"string","@string_backtick"],{include:"@whitespace"},[/[{}()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/\d+[smhdwy]/,"number"],[/\d*\d+[eE]([\-+]?\d+)?(@floatsuffix)/,"number.float"],[/\d*\.\d+([eE][\-+]?\d+)?(@floatsuffix)/,"number.float"],[/0[xX][0-9a-fA-F']*[0-9a-fA-F](@integersuffix)/,"number.hex"],[/0[0-7']*[0-7](@integersuffix)/,"number.octal"],[/0[bB][0-1']*[0-1](@integersuffix)/,"number.binary"],[/\d[\d']*\d(@integersuffix)/,"number"],[/\d(@integersuffix)/,"number"]],string_double:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],string_single:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"]],string_backtick:[[/[^\\`$]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/`/,"string","@pop"]],clauses:[[/[^(,)]/,"tag"],[/\)/,"identifier","@pop"]],whitespace:[[/[ \t\r\n]+/,"white"]]}},qD={provideCompletionItems:function(){var u=Xv.map(function(e){return{label:e,kind:I.languages.CompletionItemKind.Keyword,insertText:e,insertTextRules:I.languages.CompletionItemInsertTextRule.InsertAsSnippet}});return{suggestions:u}}}}}]); //# sourceMappingURL=5807.f05d997ece5811bbc849.js.map
Edit
Rename
Chmod
Delete
FILE
FOLDER
INFO
Name
Size
Permission
Action
static
---
0755
0.c88fc16b6533c8976681.js
11857 bytes
0644
0.c88fc16b6533c8976681.js.map
46011 bytes
0644
1118.6d1cbbd2070e00a7483d.js
9459 bytes
0644
1118.6d1cbbd2070e00a7483d.js.map
22012 bytes
0644
1121.6c31bf81768d3312b0d4.js
11557 bytes
0644
1121.6c31bf81768d3312b0d4.js.map
40274 bytes
0644
1122.1b3b5a9bdf4a2fc70a83.js
4310 bytes
0644
1122.1b3b5a9bdf4a2fc70a83.js.map
9301 bytes
0644
1133.cd705902767ed2e9bf55.js
107191 bytes
0644
1133.cd705902767ed2e9bf55.js.map
459177 bytes
0644
1216.ddb58ad09e0c4e3f4079.js
12860 bytes
0644
1216.ddb58ad09e0c4e3f4079.js.map
47906 bytes
0644
1282.2347f27d5b3a18a42a1e.js
2965 bytes
0644
1282.2347f27d5b3a18a42a1e.js.map
6699 bytes
0644
1345.8570fef914aafab94513.js
2223 bytes
0644
1345.8570fef914aafab94513.js.map
5201 bytes
0644
1347.8ad23b870a6e21306189.js
32035 bytes
0644
1347.8ad23b870a6e21306189.js.map
89851 bytes
0644
1420.f2553cafc235b7c32261.js
14576 bytes
0644
1420.f2553cafc235b7c32261.js.map
32839 bytes
0644
1438.897db349b7f48a15b9eb.js
2830 bytes
0644
1438.897db349b7f48a15b9eb.js.map
6911 bytes
0644
1446.babd36e7134aac1046c4.js
1832 bytes
0644
1446.babd36e7134aac1046c4.js.map
3282 bytes
0644
1488.ff35935a06f41b02b6cc.js
316 bytes
0644
1488.ff35935a06f41b02b6cc.js.map
1206 bytes
0644
1560.30962127c91e5eae9982.js
8916 bytes
0644
1560.30962127c91e5eae9982.js.map
20515 bytes
0644
1660.e1f66118fb028d12074f.js
21866 bytes
0644
1660.e1f66118fb028d12074f.js.map
71039 bytes
0644
1698.68ff1ef08e94a87836b3.js
12570 bytes
0644
1698.68ff1ef08e94a87836b3.js.map
46006 bytes
0644
1708.f42a783c0f6c7a317d49.js
2249 bytes
0644
1708.f42a783c0f6c7a317d49.js.map
2954 bytes
0644
1710.d96221051fceaf8c89dd.js
10172 bytes
0644
1710.d96221051fceaf8c89dd.js.map
22097 bytes
0644
1740.e57d920c47a11759ade4.js
6204 bytes
0644
1740.e57d920c47a11759ade4.js.map
13740 bytes
0644
1888.0ede69d3190c536744b9.js
6822 bytes
0644
1888.0ede69d3190c536744b9.js.map
15421 bytes
0644
1914.58113477b565d57e8bfe.js
10710 bytes
0644
1914.58113477b565d57e8bfe.js.map
23555 bytes
0644
198.b84c0e4f5759344ae05a.js
8267 bytes
0644
198.b84c0e4f5759344ae05a.js.map
19446 bytes
0644
205.6c51b5e35c8147226738.js
3542 bytes
0644
205.6c51b5e35c8147226738.js.map
8376 bytes
0644
2058.0e5df44647184aaf02e2.js
1252 bytes
0644
2058.0e5df44647184aaf02e2.js.map
4744 bytes
0644
2077.12b2df3682085a92a810.js
34133 bytes
0644
2077.12b2df3682085a92a810.js.map
122011 bytes
0644
2094.259625d8acf28b9c7361.js
16518 bytes
0644
2094.259625d8acf28b9c7361.js.map
41269 bytes
0644
21.afca69f2d336e287a655.js
6172 bytes
0644
21.afca69f2d336e287a655.js.map
17305 bytes
0644
2136.9c8dcd43d3af327f51f5.js
498667 bytes
0644
2136.9c8dcd43d3af327f51f5.js.map
1908011 bytes
0644
2228.cf629cf4a83c5b6c2671.js
269 bytes
0644
2228.cf629cf4a83c5b6c2671.js.map
457 bytes
0644
2244.9324c28eca7d2ffb7568.js
3396 bytes
0644
2244.9324c28eca7d2ffb7568.js.map
7683 bytes
0644
2261.ac6a26854d5acee00776.js
106373 bytes
0644
2261.ac6a26854d5acee00776.js.map
478562 bytes
0644
2278.bdd73b14b6337c6b14e4.js
5754 bytes
0644
2278.bdd73b14b6337c6b14e4.js.map
13399 bytes
0644
2398.3de0e7aa3057b7dcf9da.js
8016 bytes
0644
2398.3de0e7aa3057b7dcf9da.js.map
18383 bytes
0644
2514.c86950e9813e27962050.js
1983 bytes
0644
2514.c86950e9813e27962050.js.map
4863 bytes
0644
2571.345ecfd2b82551018f2e.js
162139 bytes
0644
2571.345ecfd2b82551018f2e.js.map
2046 bytes
0644
2586.972e9a7d564398afee76.js
6385 bytes
0644
2586.972e9a7d564398afee76.js.map
14676 bytes
0644
2658.f4100815829c4d37d35c.js
5432 bytes
0644
2658.f4100815829c4d37d35c.js.map
13650 bytes
0644
2686.2fbaa7db9c01d59cad8d.js
2815 bytes
0644
2686.2fbaa7db9c01d59cad8d.js.map
6564 bytes
0644
2692.20098ad0182743d98d62.js
2282 bytes
0644
2692.20098ad0182743d98d62.js.map
5680 bytes
0644
2694.a31d749361a36eb167da.js
2726 bytes
0644
2694.a31d749361a36eb167da.js.map
3618 bytes
0644
2745.2e5ec1fdf377d2940fb4.js
33584 bytes
0644
2745.2e5ec1fdf377d2940fb4.js.map
120277 bytes
0644
2962.4c3147d8ee365fe296ef.js
7640 bytes
0644
2962.4c3147d8ee365fe296ef.js.map
17621 bytes
0644
3042.248a4194805a8500fd28.js
19010 bytes
0644
3042.248a4194805a8500fd28.js.map
38148 bytes
0644
3062.4e9a427c2a59d53f902e.js
4663 bytes
0644
3062.4e9a427c2a59d53f902e.js.map
10650 bytes
0644
3082.c09cff56c35d736ee8b6.js
52872 bytes
0644
3082.c09cff56c35d736ee8b6.js.map
56822 bytes
0644
3096.8d41728a4f5010bc56a2.js
4378 bytes
0644
3096.8d41728a4f5010bc56a2.js.map
10739 bytes
0644
3098.f22ad6dab13d06477be0.js
31462 bytes
0644
3098.f22ad6dab13d06477be0.js.map
85588 bytes
0644
3182.1d531f28507c00e391fc.js
13817 bytes
0644
3182.1d531f28507c00e391fc.js.map
26653 bytes
0644
3407.666eb88a718e66b93f72.js
34425 bytes
0644
3407.666eb88a718e66b93f72.js.map
103716 bytes
0644
3418.d31d882b87bd5a2ef66f.js
33061 bytes
0644
3418.d31d882b87bd5a2ef66f.js.map
114234 bytes
0644
3541.8d063e3d43d55745d89b.js
20582 bytes
0644
3541.8d063e3d43d55745d89b.js.map
67154 bytes
0644
3543.eecef49ce94da5ee0418.js
136752 bytes
0644
3543.eecef49ce94da5ee0418.js.map
446118 bytes
0644
3622.976b1aef94b333e450b9.js
1260 bytes
0644
3622.976b1aef94b333e450b9.js.map
2819 bytes
0644
3686.102abfc00452299017bb.js
87 bytes
0644
3718.3993946b7a0eb8f64b4d.js
23620 bytes
0644
3718.3993946b7a0eb8f64b4d.js.map
92024 bytes
0644
3726.3adfe210678d2cd26969.js
31765 bytes
0644
3726.3adfe210678d2cd26969.js.map
118227 bytes
0644
398.4e93ffb675609ea7a9c6.js
2990 bytes
0644
398.4e93ffb675609ea7a9c6.js.map
7145 bytes
0644
4114.953b39a9ce57caa0e87a.js
2536 bytes
0644
4114.953b39a9ce57caa0e87a.js.map
6028 bytes
0644
4120.67bf5d203ed4a2eb5f1b.js
3229 bytes
0644
4120.67bf5d203ed4a2eb5f1b.js.map
7533 bytes
0644
4209.c7060d489834063658f5.js
17352 bytes
0644
4209.c7060d489834063658f5.js.map
30980 bytes
0644
4254.c5f4a5512b252e3a5796.js
71716 bytes
0644
4254.c5f4a5512b252e3a5796.js.map
237783 bytes
0644
4289.d5662b0904798ff437e9.js
16496 bytes
0644
4289.d5662b0904798ff437e9.js.map
32015 bytes
0644
4334.bc078c368a20ed3257b6.js
2598 bytes
0644
4334.bc078c368a20ed3257b6.js.map
6308 bytes
0644
4630.b604ea691184ba563d59.js
5585 bytes
0644
4630.b604ea691184ba563d59.js.map
11866 bytes
0644
4680.358dfdd92851f69ecc97.js
4573 bytes
0644
4680.358dfdd92851f69ecc97.js.map
10841 bytes
0644
4698.696713071ff5d9929a11.js
3682 bytes
0644
4698.696713071ff5d9929a11.js.map
8967 bytes
0644
4787.bd938ea7cb58d64ee246.js
738 bytes
0644
4787.bd938ea7cb58d64ee246.js.map
2168 bytes
0644
4839.17a10e0ceca3eb8954b4.js
39585 bytes
0644
4839.17a10e0ceca3eb8954b4.js.map
145699 bytes
0644
494.8cf705bc1ea509187c88.js
3796 bytes
0644
494.8cf705bc1ea509187c88.js.map
8987 bytes
0644
4958.cd447d877778fc5af081.js
4923 bytes
0644
4958.cd447d877778fc5af081.js.map
11000 bytes
0644
4962.0da526ad79f816a15985.js
2242 bytes
0644
4962.0da526ad79f816a15985.js.map
4978 bytes
0644
50.7b1e44d5b9dbbed566be.js
617497 bytes
0644
50.7b1e44d5b9dbbed566be.js.map
2271464 bytes
0644
5017.003cacead1bba1cba035.js
3567142 bytes
0644
5017.003cacead1bba1cba035.js.map
13214665 bytes
0644
5130.4d31108de97088a3b014.js
2850 bytes
0644
5130.4d31108de97088a3b014.js.map
6536 bytes
0644
5196.064b914693b6a5591a48.js
4035 bytes
0644
5196.064b914693b6a5591a48.js.map
10273 bytes
0644
5240.eceb5f73f807ac22d800.js
704 bytes
0644
5240.eceb5f73f807ac22d800.js.map
2618 bytes
0644
5277.ce6608b6f47246e32767.js
269 bytes
0644
5277.ce6608b6f47246e32767.js.map
457 bytes
0644
5280.4348c762594edebf7d0e.js
16657 bytes
0644
5280.4348c762594edebf7d0e.js.map
89146 bytes
0644
5356.eabc0dc2021a3814a65f.js
10156 bytes
0644
5356.eabc0dc2021a3814a65f.js.map
25249 bytes
0644
5358.7c5e9e1b192582f3082d.js
6173 bytes
0644
5358.7c5e9e1b192582f3082d.js.map
19652 bytes
0644
5364.ac21c32fd45a27bc998a.js
3070 bytes
0644
5364.ac21c32fd45a27bc998a.js.map
7368 bytes
0644
5398.d0c11aa7c1232f4afe44.js
81872 bytes
0644
5398.d0c11aa7c1232f4afe44.js.map
769414 bytes
0644
5428.e85b0800b30feca9d7dc.js
330175 bytes
0644
5428.e85b0800b30feca9d7dc.js.map
530929 bytes
0644
5511.93023985e5c5efe49ae2.js
21275 bytes
0644
5511.93023985e5c5efe49ae2.js.map
93188 bytes
0644
5550.9284e42acc3f2bbdfc9d.js
7039 bytes
0644
5550.9284e42acc3f2bbdfc9d.js.map
16382 bytes
0644
558.701e8b4db7b852c4a10d.js
12211 bytes
0644
558.701e8b4db7b852c4a10d.js.map
24505 bytes
0644
5618.638c32d58d896f3f7261.js
3348 bytes
0644
5618.638c32d58d896f3f7261.js.map
8181 bytes
0644
5648.cb3fd92dbbc06f7d45d2.js
57392 bytes
0644
5648.cb3fd92dbbc06f7d45d2.js.map
60585 bytes
0644
5786.db7abc3b8e4f474a8f7b.js
5325 bytes
0644
5786.db7abc3b8e4f474a8f7b.js.map
11885 bytes
0644
5807.f05d997ece5811bbc849.js
2922915 bytes
0644
5807.f05d997ece5811bbc849.js.map
10524334 bytes
0644
5950.30ec6aaa9dcece6c3b3c.js
4616249 bytes
0644
5950.30ec6aaa9dcece6c3b3c.js.map
19277501 bytes
0644
6018.f4de7ac19ac8f0c774e6.js
5861 bytes
0644
6018.f4de7ac19ac8f0c774e6.js.map
13314 bytes
0644
6029.0549a3fcb50e73c4b256.js
409895 bytes
0644
6029.0549a3fcb50e73c4b256.js.map
998408 bytes
0644
6185.883629fcc773b4968b24.js
2258 bytes
0644
6185.883629fcc773b4968b24.js.map
4788 bytes
0644
6263.e4ef9aaa3073ebacc3a5.js
54594 bytes
0644
6263.e4ef9aaa3073ebacc3a5.js.map
242030 bytes
0644
6302.257b2eb06c25ee74090e.js
8440 bytes
0644
6302.257b2eb06c25ee74090e.js.map
19322 bytes
0644
6359.f824c85233ec703f8cea.js
11411 bytes
0644
6359.f824c85233ec703f8cea.js.map
41881 bytes
0644
6377.45d36c143a694fc45bd3.js
20571 bytes
0644
6377.45d36c143a694fc45bd3.js.map
79590 bytes
0644
6378.27b1e6d863a0a3b85962.js
977993 bytes
0644
6378.27b1e6d863a0a3b85962.js.map
3865587 bytes
0644
6414.192cf271de6ecbbbcb11.js
3984 bytes
0644
6414.192cf271de6ecbbbcb11.js.map
9134 bytes
0644
6446.b4b93ee91aa1bb57ea93.js
7731 bytes
0644
6446.b4b93ee91aa1bb57ea93.js.map
17485 bytes
0644
6464.f379e014f9909e621de6.js
34429 bytes
0644
6464.f379e014f9909e621de6.js.map
113303 bytes
0644
6499.9f52e0855fd4782a8b45.js
78297 bytes
0644
6499.9f52e0855fd4782a8b45.js.map
273155 bytes
0644
6587.bfb1ca0c32c6f325b0df.js
135004 bytes
0644
6587.bfb1ca0c32c6f325b0df.js.map
541974 bytes
0644
660.838743295c2108f3492d.js
43101 bytes
0644
660.838743295c2108f3492d.js.map
100340 bytes
0644
6678.a615dbe07b8a3e591e66.js
14725 bytes
0644
6678.a615dbe07b8a3e591e66.js.map
51145 bytes
0644
680.1a328432fae403eacab3.js
53846 bytes
0644
680.1a328432fae403eacab3.js.map
57615 bytes
0644
6830.0c200fec1efc2be388e2.js
5811 bytes
0644
6830.0c200fec1efc2be388e2.js.map
13972 bytes
0644
6934.fa19d392db34411fb300.js
168944 bytes
0644
6934.fa19d392db34411fb300.js.map
540337 bytes
0644
6940.9c5d3a2dcf9d7d58fa2c.js
3408 bytes
0644
6940.9c5d3a2dcf9d7d58fa2c.js.map
8039 bytes
0644
6969.f8f153735314f9426000.js
1119 bytes
0644
6969.f8f153735314f9426000.js.map
4230 bytes
0644
6990.cc2f5674128929a3f870.js
4418 bytes
0644
6990.cc2f5674128929a3f870.js.map
10503 bytes
0644
7048.117de444b1e1cb5a1360.js
4365 bytes
0644
7048.117de444b1e1cb5a1360.js.map
10316 bytes
0644
7166.480da6892ee84ee8bb53.js
593985 bytes
0644
7166.480da6892ee84ee8bb53.js.map
2430098 bytes
0644
7200.dc60128b9d612fc7b5b0.js
3634 bytes
0644
7200.dc60128b9d612fc7b5b0.js.map
8184 bytes
0644
7246.3adf293a34fa2043387b.js
4306 bytes
0644
7246.3adf293a34fa2043387b.js.map
9084 bytes
0644
7400.024c96bd5b99b8b47a63.js
14112 bytes
0644
7400.024c96bd5b99b8b47a63.js.map
64001 bytes
0644
7409.24316c87d08c1053c46a.js
3287 bytes
0644
7409.24316c87d08c1053c46a.js.map
11649 bytes
0644
7455.845968885abe369e6479.js
19801 bytes
0644
7455.845968885abe369e6479.js.map
77213 bytes
0644
7466.09e6e197d2507f62097d.js
11670 bytes
0644
7466.09e6e197d2507f62097d.js.map
24830 bytes
0644
7515.95323f0dfbd0de010e5c.js
1083 bytes
0644
7515.95323f0dfbd0de010e5c.js.map
1321 bytes
0644
7613.6334cff4df12cc157522.js
808779 bytes
0644
7613.6334cff4df12cc157522.js.map
991378 bytes
0644
7836.6a7e4207e70fc2dc235f.js
7192 bytes
0644
7836.6a7e4207e70fc2dc235f.js.map
17613 bytes
0644
7882.1a3cc418752c83396970.js
3743 bytes
0644
7882.1a3cc418752c83396970.js.map
14950 bytes
0644
7886.485c46f14540aa23cf70.js
8668 bytes
0644
7886.485c46f14540aa23cf70.js.map
20124 bytes
0644
7914.2b1a06c504df18e20fe4.js
2390 bytes
0644
7914.2b1a06c504df18e20fe4.js.map
6418 bytes
0644
7982.6761217193d3060dbf0e.js
188973 bytes
0644
7982.6761217193d3060dbf0e.js.map
1737667 bytes
0644
8054.094788468423bb88ee68.js
38124 bytes
0644
8054.094788468423bb88ee68.js.map
132296 bytes
0644
8107.92bd414247a1d05c014f.js
5144 bytes
0644
8107.92bd414247a1d05c014f.js.map
15320 bytes
0644
8230.2eedae6021a4715c6dea.js
2413 bytes
0644
8230.2eedae6021a4715c6dea.js.map
5812 bytes
0644
8332.f4b05d2f028641445650.js
3177 bytes
0644
8332.f4b05d2f028641445650.js.map
7186 bytes
0644
8334.c95ec0eb6900c0cf7e89.js
7803 bytes
0644
8334.c95ec0eb6900c0cf7e89.js.map
17714 bytes
0644
8390.1fd9505094c8cf8830ab.js
2096 bytes
0644
8390.1fd9505094c8cf8830ab.js.map
5157 bytes
0644
84.a6f8658e6a033d642231.js
30608 bytes
0644
84.a6f8658e6a033d642231.js.map
142543 bytes
0644
8494.4470c87b7093ddf70db7.js
2180 bytes
0644
8494.4470c87b7093ddf70db7.js.map
4863 bytes
0644
8542.1391ab96a455b01963a7.js
1514 bytes
0644
8542.1391ab96a455b01963a7.js.map
3249 bytes
0644
8566.e05562713181c6ca30fe.js
3852 bytes
0644
8566.e05562713181c6ca30fe.js.map
8781 bytes
0644
8730.3dcdd8cbf22c63b45d78.js
2109 bytes
0644
8730.3dcdd8cbf22c63b45d78.js.map
2893 bytes
0644
8786.1b0e43b80c82c73e2096.js
1535 bytes
0644
8786.1b0e43b80c82c73e2096.js.map
4055 bytes
0644
8902.37d0b14aa6ef24687b7b.js
2673 bytes
0644
8902.37d0b14aa6ef24687b7b.js.map
5993 bytes
0644
8990.5a822b8788ebf0bdba81.js
3969 bytes
0644
8990.5a822b8788ebf0bdba81.js.map
9161 bytes
0644
9034.200fc7a09b466256c9a9.js
3486 bytes
0644
9034.200fc7a09b466256c9a9.js.map
8180 bytes
0644
9038.7ae2448b9cc5c423aeca.js
4937 bytes
0644
9038.7ae2448b9cc5c423aeca.js.map
11973 bytes
0644
9118.3121c6b96ec7dc211973.js
48311 bytes
0644
9118.3121c6b96ec7dc211973.js.map
62149 bytes
0644
9150.9eb62d45f9b21cb38850.js
10056 bytes
0644
9150.9eb62d45f9b21cb38850.js.map
21143 bytes
0644
9199.9897e268d6d13e834d4c.js
2307 bytes
0644
9199.9897e268d6d13e834d4c.js.map
8853 bytes
0644
9320.c403e78b78aa6df1d0bd.js
336139 bytes
0644
9320.c403e78b78aa6df1d0bd.js.map
1624993 bytes
0644
9355.421530b20c759bb75633.js
22098 bytes
0644
9355.421530b20c759bb75633.js.map
66961 bytes
0644
9384.a0d5fc49f1b15b3e311e.js
2855 bytes
0644
9384.a0d5fc49f1b15b3e311e.js.map
3717 bytes
0644
9390.fa2af7f3d3d9600c08ee.js
4201 bytes
0644
9390.fa2af7f3d3d9600c08ee.js.map
9682 bytes
0644
946.f2494c0c39a9590349b9.js
9194 bytes
0644
946.f2494c0c39a9590349b9.js.map
22193 bytes
0644
9510.4cfa85a51931dc20573a.js
2949 bytes
0644
9510.4cfa85a51931dc20573a.js.map
6939 bytes
0644
9521.de2a74ca5eb365810ca5.js
46306 bytes
0644
9521.de2a74ca5eb365810ca5.js.map
51040 bytes
0644
9538.996ade7a03ccdb01942d.js
64493 bytes
0644
9538.996ade7a03ccdb01942d.js.map
49212 bytes
0644
9569.a8d60b39654a160cb917.js
27965 bytes
0644
9569.a8d60b39654a160cb917.js.map
99160 bytes
0644
9643.b408884004ca73c102bc.js
627 bytes
0644
9643.b408884004ca73c102bc.js.map
2195 bytes
0644
968.22e079d28acb4131d34c.js
4001 bytes
0644
968.22e079d28acb4131d34c.js.map
9740 bytes
0644
970.a61e37b9b897c8098261.js
5239 bytes
0644
970.a61e37b9b897c8098261.js.map
13858 bytes
0644
9711.d6e977bd60f0e5ba673d.js
13555 bytes
0644
9711.d6e977bd60f0e5ba673d.js.map
43973 bytes
0644
9737.3340c89ea96d33307cc7.js
1001 bytes
0644
9737.3340c89ea96d33307cc7.js.map
3504 bytes
0644
9739.5a801055fcf72bf4d06f.js
1147 bytes
0644
9739.5a801055fcf72bf4d06f.js.map
4390 bytes
0644
9772.49e918c9331237552c0b.js
141 bytes
0644
9772.49e918c9331237552c0b.js.map
416 bytes
0644
9838.b8f01dc360f0c2151291.js
4003 bytes
0644
9838.b8f01dc360f0c2151291.js.map
8118 bytes
0644
AdminAuthentication.b7044adf53b669e61a87.js
22504 bytes
0644
AdminAuthentication.b7044adf53b669e61a87.js.map
67352 bytes
0644
AdminEditOrgPage.96fb6c37346641f44246.js
6369 bytes
0644
AdminEditOrgPage.96fb6c37346641f44246.js.map
20602 bytes
0644
AdminFeatureTogglesPage.22157fe31f358f1c4f09.js
4939 bytes
0644
AdminFeatureTogglesPage.22157fe31f358f1c4f09.js.map
16531 bytes
0644
AdminListOrgsPage.f01c8496fd635e20124b.js
2702 bytes
0644
AdminListOrgsPage.f01c8496fd635e20124b.js.map
7735 bytes
0644
AdminSettings.845c6def917892a0c1f9.js
1903 bytes
0644
AdminSettings.845c6def917892a0c1f9.js.map
5580 bytes
0644
AlertAmRoutes.10a0d9a23a082caf12c8.js
54554 bytes
0644
AlertAmRoutes.10a0d9a23a082caf12c8.js.map
208792 bytes
0644
AlertGroups.efd523dc41621f9f7935.js
10088 bytes
0644
AlertGroups.efd523dc41621f9f7935.js.map
39108 bytes
0644
AlertRuleListIndex.f0b17a6119cc5ea575ed.js
44623 bytes
0644
AlertRuleListIndex.f0b17a6119cc5ea575ed.js.map
156842 bytes
0644
AlertRuleListLegacy.8e675db4469232c87308.js
6270 bytes
0644
AlertRuleListLegacy.8e675db4469232c87308.js.map
18086 bytes
0644
AlertSilences.4ff252ad4c0057124d5d.js
24687 bytes
0644
AlertSilences.4ff252ad4c0057124d5d.js.map
83377 bytes
0644
AlertTabCtrl.d3377d127a336a69beb5.js
9844 bytes
0644
AlertTabCtrl.d3377d127a336a69beb5.js.map
27934 bytes
0644
AlertingAdmin.e62f9c73a69abe6a1ac0.js
10523 bytes
0644
AlertingAdmin.e62f9c73a69abe6a1ac0.js.map
37393 bytes
0644
AlertingFeatureTogglePage.f971bb7b2ad4ceb0acbd.js
672 bytes
0644
AlertingFeatureTogglePage.f971bb7b2ad4ceb0acbd.js.map
1220 bytes
0644
AlertingHome.0d6be993ef4a3df37345.js
33492 bytes
0644
AlertingHome.0d6be993ef4a3df37345.js.map
106868 bytes
0644
AlertingRedirectToRule.37a0040f89e20b99b751.js
3648 bytes
0644
AlertingRedirectToRule.37a0040f89e20b99b751.js.map
10875 bytes
0644
AlertingRuleForm.66bb5b2724b31ae6a5a4.js
79931 bytes
0644
AlertingRuleForm.66bb5b2724b31ae6a5a4.js.map
292923 bytes
0644
AlertingUpgrade.c757b99e306db50cdb16.js
31333 bytes
0644
AlertingUpgrade.c757b99e306db50cdb16.js.map
98330 bytes
0644
AngularApp.7e72879caebef22a5217.js
72809 bytes
0644
AngularApp.7e72879caebef22a5217.js.map
102853 bytes
0644
ApiKeysPage.12b0cd511f7b1e9c50dc.js
8422 bytes
0644
ApiKeysPage.12b0cd511f7b1e9c50dc.js.map
23375 bytes
0644
BenchmarksPage.3a183df3d44714f9a96a.js
2941 bytes
0644
BenchmarksPage.3a183df3d44714f9a96a.js.map
9749 bytes
0644
ChangePasswordPage.5e0562f6a9674bd95cfe.js
470 bytes
0644
ChangePasswordPage.5e0562f6a9674bd95cfe.js.map
1195 bytes
0644
Connections.b53c715b9b9a782d8647.js
32448 bytes
0644
Connections.b53c715b9b9a782d8647.js.map
112998 bytes
0644
CorrelationsFeatureToggle.71addced22f59948b708.js
674 bytes
0644
CorrelationsFeatureToggle.71addced22f59948b708.js.map
1149 bytes
0644
CorrelationsPage.4e02feddf752bdf7cfe6.js
22725 bytes
0644
CorrelationsPage.4e02feddf752bdf7cfe6.js.map
69262 bytes
0644
CreateTeam.dbde5b87278cf087cc5e.js
3046 bytes
0644
CreateTeam.dbde5b87278cf087cc5e.js.map
9594 bytes
0644
DashboardImport.06e6c4c03113061aae6c.js
18153 bytes
0644
DashboardImport.06e6c4c03113061aae6c.js.map
58242 bytes
0644
DashboardListPage.dac1fe75fbaa4f9b1c23.js
30967 bytes
0644
DashboardListPage.dac1fe75fbaa4f9b1c23.js.map
108517 bytes
0644
DashboardPage.5e50193556ad6b828f5d.js
2786 bytes
0644
DashboardPage.5e50193556ad6b828f5d.js.map
8754 bytes
0644
DashboardPageProxy.9a6d60e5cac89c11c71c.js
65136 bytes
0644
DashboardPageProxy.9a6d60e5cac89c11c71c.js.map
226791 bytes
0644
DataTrailsPage.aa19ca6750eb3f91ac5d.js
331 bytes
0644
DataTrailsPage.aa19ca6750eb3f91ac5d.js.map
582 bytes
0644
EditNotificationChannelLegacy.75122e6dbfb215d89d81.js
10507 bytes
0644
EditNotificationChannelLegacy.75122e6dbfb215d89d81.js.map
37444 bytes
0644
EmbeddedDashboard.3856404d3d608c739864.js
1768 bytes
0644
EmbeddedDashboard.3856404d3d608c739864.js.map
5917 bytes
0644
FolderAlerting.a0fe69e3574320c8a74a.js
9633 bytes
0644
FolderAlerting.a0fe69e3574320c8a74a.js.map
29985 bytes
0644
FolderLibraryPanelsPage.95dd7bf6735e202a79d2.js
8599 bytes
0644
FolderLibraryPanelsPage.95dd7bf6735e202a79d2.js.map
25919 bytes
0644
LibraryPanelsPage.4a952d4aa9c21984995a.js
2704 bytes
0644
LibraryPanelsPage.4a952d4aa9c21984995a.js.map
7623 bytes
0644
ListPublicDashboardPage.469a693c4011a5193fcd.js
4713 bytes
0644
ListPublicDashboardPage.469a693c4011a5193fcd.js.map
14309 bytes
0644
MuteTimings.cb66b37f52c9ee3ce1da.js
20855 bytes
0644
MuteTimings.cb66b37f52c9ee3ce1da.js.map
58932 bytes
0644
NewNotificationChannelLegacy.1d57814bc534bb1a3681.js
9785 bytes
0644
NewNotificationChannelLegacy.1d57814bc534bb1a3681.js.map
32951 bytes
0644
NewOrgPage.2bb0e1cab09f0cbd0310.js
1325 bytes
0644
NewOrgPage.2bb0e1cab09f0cbd0310.js.map
3158 bytes
0644
NotificationsListLegacyPage.33212668898a6db361a8.js
2547 bytes
0644
NotificationsListLegacyPage.33212668898a6db361a8.js.map
6671 bytes
0644
NotificationsListPage.1eb9cb05bf88eee08291.js
1620 bytes
0644
NotificationsListPage.1eb9cb05bf88eee08291.js.map
3378 bytes
0644
NotificationsPage.d26b90d7348139106351.js
4646 bytes
0644
NotificationsPage.d26b90d7348139106351.js.map
25381 bytes
0644
OrgDetailsPage.2d5c98f188683c2e1d3b.js
6742 bytes
0644
OrgDetailsPage.2d5c98f188683c2e1d3b.js.map
17850 bytes
0644
PlaylistEditPage.d14b3673a1bb03ca0dbb.js
6892 bytes
0644
PlaylistEditPage.d14b3673a1bb03ca0dbb.js.map
19989 bytes
0644
PlaylistNewPage.13696f39b95b8416ede2.js
6583 bytes
0644
PlaylistNewPage.13696f39b95b8416ede2.js.map
19084 bytes
0644
PlaylistPage.8f45dcc09add615f90e8.js
7895 bytes
0644
PlaylistPage.8f45dcc09add615f90e8.js.map
25502 bytes
0644
PlaylistStartPage.8be462b13a24cddee188.js
275 bytes
0644
PlaylistStartPage.8be462b13a24cddee188.js.map
698 bytes
0644
PluginListPage.815b65d32380d0a800f7.js
12167 bytes
0644
PluginListPage.815b65d32380d0a800f7.js.map
43537 bytes
0644
PluginPage.c790de5e17a0b728dd3a.js
314 bytes
0644
PluginPage.c790de5e17a0b728dd3a.js.map
668 bytes
0644
ProfileFeatureTogglePage.a14257ebc5da1e8c85e0.js
552 bytes
0644
ProfileFeatureTogglePage.a14257ebc5da1e8c85e0.js.map
1012 bytes
0644
PublicDashboardPage.51c7c24941781e091898.js
4295 bytes
0644
PublicDashboardPage.51c7c24941781e091898.js.map
14393 bytes
0644
SelectOrgPage.695c19a5101a3a03ee28.js
1124 bytes
0644
SelectOrgPage.695c19a5101a3a03ee28.js.map
2993 bytes
0644
SendResetMailPage.f16b7172a87070f57227.js
1736 bytes
0644
SendResetMailPage.f16b7172a87070f57227.js.map
4350 bytes
0644
ServerStats.3fbd2493deb8f4598755.js
3863 bytes
0644
ServerStats.3fbd2493deb8f4598755.js.map
11534 bytes
0644
ServiceAccountCreatePage.4f989fb6cd2a41193ff0.js
2440 bytes
0644
ServiceAccountCreatePage.4f989fb6cd2a41193ff0.js.map
7939 bytes
0644
ServiceAccountPage.bc7c35b63b03ccc89628.js
14806 bytes
0644
ServiceAccountPage.bc7c35b63b03ccc89628.js.map
51593 bytes
0644
ServiceAccountsPage.baaa08c045390c05e276.js
14565 bytes
0644
ServiceAccountsPage.baaa08c045390c05e276.js.map
46399 bytes
0644
SignupInvited.81ad56aceb8dd1839e15.js
2360 bytes
0644
SignupInvited.81ad56aceb8dd1839e15.js.map
6096 bytes
0644
SnapshotListPage.519c760ed66124a771ff.js
3061 bytes
0644
SnapshotListPage.519c760ed66124a771ff.js.map
9043 bytes
0644
SoloPanelPage.c729750a88c3fa90d1cc.js
3229 bytes
0644
SoloPanelPage.c729750a88c3fa90d1cc.js.map
12316 bytes
0644
SoloPanelPageOld.6518c21ccaf29701fa97.js
1727 bytes
0644
SoloPanelPageOld.6518c21ccaf29701fa97.js.map
5509 bytes
0644
StoragePage.9b93a99e75f7f2842c11.js
14081 bytes
0644
StoragePage.9b93a99e75f7f2842c11.js.map
48740 bytes
0644
SupportBundles.567d512b3f919b8112e4.js
3058 bytes
0644
SupportBundles.567d512b3f919b8112e4.js.map
8751 bytes
0644
SupportBundlesCreate.fc6b6e4cf6366f751081.js
2779 bytes
0644
SupportBundlesCreate.fc6b6e4cf6366f751081.js.map
8882 bytes
0644
TeamList.2e23d37c91734f608f09.js
9019 bytes
0644
TeamList.2e23d37c91734f608f09.js.map
30348 bytes
0644
TeamPages.4f6177b4c6ec769c72d8.js
22839 bytes
0644
TeamPages.4f6177b4c6ec769c72d8.js.map
66001 bytes
0644
TestStuffPage.8ddabdd17d265b771b17.js
2654 bytes
0644
TestStuffPage.8ddabdd17d265b771b17.js.map
8058 bytes
0644
UserCreatePage.72e86cf2c9a3ce50cff3.js
1470 bytes
0644
UserCreatePage.72e86cf2c9a3ce50cff3.js.map
3788 bytes
0644
UserInvitePage.c8243c9cee4b06e10222.js
2576 bytes
0644
UserInvitePage.c8243c9cee4b06e10222.js.map
6594 bytes
0644
UserListPage.acbb5778a782ca90c7ba.js
25463 bytes
0644
UserListPage.acbb5778a782ca90c7ba.js.map
79671 bytes
0644
UserProfileEditPage.7cc4c218d9e4664250e3.js
14593 bytes
0644
UserProfileEditPage.7cc4c218d9e4664250e3.js.map
42901 bytes
0644
UsersListPage.1b61c82d62ca416b6f2f.js
8800 bytes
0644
UsersListPage.1b61c82d62ca416b6f2f.js.map
30059 bytes
0644
alert-rules-drawer-content.1fd9de3b496d077a5f3a.js
957 bytes
0644
alert-rules-drawer-content.1fd9de3b496d077a5f3a.js.map
3199 bytes
0644
alert-rules-toolbar-button.6f275f0d03748b6c297d.js
1429 bytes
0644
alert-rules-toolbar-button.6f275f0d03748b6c297d.js.map
4041 bytes
0644
alertmanagerPlugin.d13ca72afb3f996bb284.js
3810 bytes
0644
alertmanagerPlugin.d13ca72afb3f996bb284.js.map
10753 bytes
0644
app.b11fde05d43f9632a473.js
920821 bytes
0644
app.b11fde05d43f9632a473.js.map
69088 bytes
0644
assets-manifest.json
280835 bytes
0644
azureMonitorPlugin.0bc37a9d4e3bd8421cc0.js
232 bytes
0644
azureMonitorPlugin.0bc37a9d4e3bd8421cc0.js.map
600 bytes
0644
brace.fcd4b1c7e8b9264ab02c.js
371235 bytes
0644
brace.fcd4b1c7e8b9264ab02c.js.map
1132097 bytes
0644
canvasPanel.a46aa5e57d26b1fcc380.js
485254 bytes
0644
canvasPanel.a46aa5e57d26b1fcc380.js.map
2136916 bytes
0644
cloudMonitoringPlugin.c6ea431eae8e9ad2c7b1.js
198 bytes
0644
cloudMonitoringPlugin.c6ea431eae8e9ad2c7b1.js.map
555 bytes
0644
cloudwatchPlugin.06ef34f60000c4f7ea37.js
192 bytes
0644
cloudwatchPlugin.06ef34f60000c4f7ea37.js.map
544 bytes
0644
dark.7fa24d1908c1c96e6fcc.js
134 bytes
0644
elasticsearchPlugin.3f2edb012f5162b48903.js
214 bytes
0644
elasticsearchPlugin.3f2edb012f5162b48903.js.map
583 bytes
0644
explore-feature-toggle-page.897d9f08c342ad4c0702.js
612 bytes
0644
explore-feature-toggle-page.897d9f08c342ad4c0702.js.map
1280 bytes
0644
explore.476912733278e2a99729.js
165810 bytes
0644
explore.476912733278e2a99729.js.map
579148 bytes
0644
geomapPanel.14b9605971a38c51d262.js
417078 bytes
0644
geomapPanel.14b9605971a38c51d262.js.map
540371 bytes
0644
grafana.dark.8c716fbcf630eae84ced.css
209089 bytes
0644
grafana.light.b8b3904788f25480f4a1.css
209047 bytes
0644
grafanaPlugin.1cb208185a89de28dc3a.js
8654 bytes
0644
grafanaPlugin.1cb208185a89de28dc3a.js.map
28174 bytes
0644
graphPlugin.f47f722cdfc0ceb85136.js
70277 bytes
0644
graphPlugin.f47f722cdfc0ceb85136.js.map
243430 bytes
0644
graphitePlugin.d59175976346917781fe.js
75305 bytes
0644
graphitePlugin.d59175976346917781fe.js.map
272016 bytes
0644
heatmapPanel.f6f29a53ed0f682b4404.js
37545 bytes
0644
heatmapPanel.f6f29a53ed0f682b4404.js.map
158066 bytes
0644
influxdbPlugin.140a7777089f9559c11c.js
68843 bytes
0644
influxdbPlugin.140a7777089f9559c11c.js.map
265085 bytes
0644
jaegerPlugin.d254fd4a19ef0cb5b4f5.js
19727 bytes
0644
jaegerPlugin.d254fd4a19ef0cb5b4f5.js.map
65603 bytes
0644
light.af65e5ce03b9ed0aa2b1.js
134 bytes
0644
loki-query-field.a588d587d9d762b18f22.js
191 bytes
0644
loki-query-field.a588d587d9d762b18f22.js.map
548 bytes
0644
lokiPlugin.77364509de280321b6f8.js
185 bytes
0644
lokiPlugin.77364509de280321b6f8.js.map
536 bytes
0644
mixedPlugin.f36bd557a883d9a67538.js
180 bytes
0644
mssqlPlugin.88775f59ced74c2283c5.js
20457 bytes
0644
mssqlPlugin.88775f59ced74c2283c5.js.map
61420 bytes
0644
mysqlPlugin.72fb44411afd8165d201.js
17323 bytes
0644
mysqlPlugin.72fb44411afd8165d201.js.map
45415 bytes
0644
nodeGraphPanel.9a7cdd8efdae281cbe28.js
2107 bytes
0644
nodeGraphPanel.9a7cdd8efdae281cbe28.js.map
7132 bytes
0644
opentsdbPlugin.418b8c8ea0d97ed99edb.js
22866 bytes
0644
opentsdbPlugin.418b8c8ea0d97ed99edb.js.map
82180 bytes
0644
parcaPlugin.7f2e6dde7161b08ceed2.js
11184 bytes
0644
parcaPlugin.7f2e6dde7161b08ceed2.js.map
42340 bytes
0644
postgresPlugin.f88c598bae2653ae177b.js
18902 bytes
0644
postgresPlugin.f88c598bae2653ae177b.js.map
54304 bytes
0644
prom-query-field.ff217c474ea457bdd65e.js
14104 bytes
0644
prom-query-field.ff217c474ea457bdd65e.js.map
76811 bytes
0644
prometheusPlugin.2ba02c28d3f7293e903e.js
224 bytes
0644
prometheusPlugin.2ba02c28d3f7293e903e.js.map
699 bytes
0644
pyroscopePlugin.eb14b78419d619d90dca.js
22269 bytes
0644
pyroscopePlugin.eb14b78419d619d90dca.js.map
86896 bytes
0644
react-monaco-editor.988b1aa5e90b11f9941a.js
15759 bytes
0644
react-monaco-editor.988b1aa5e90b11f9941a.js.map
51544 bytes
0644
runtime.4b7e1b5735d2ed64b824.js
13640 bytes
0644
runtime.4b7e1b5735d2ed64b824.js.map
35122 bytes
0644
tableOldPlugin.8c72b8399d197aeebe16.js
25242 bytes
0644
tableOldPlugin.8c72b8399d197aeebe16.js.map
80497 bytes
0644
tempoPlugin.efa8c2a55984263b4b61.js
182 bytes
0644
tempoPlugin.efa8c2a55984263b4b61.js.map
529 bytes
0644
testDataDSPlugin.9717509b124d754e4f35.js
120550 bytes
0644
testDataDSPlugin.9717509b124d754e4f35.js.map
303302 bytes
0644
visjs-network.d93b3aa71ac24c8cde84.js
459653 bytes
0644
visjs-network.d93b3aa71ac24c8cde84.js.map
1951742 bytes
0644
zipkinPlugin.70f0f24b6d0b6e673ccb.js
13172 bytes
0644
zipkinPlugin.70f0f24b6d0b6e673ccb.js.map
46861 bytes
0644
N4ST4R_ID | Naxtarrr