PageSourceSearch

https://hades88rtp-203.com/static/js/ma-codeEditor-BerLa4GY.js

js hades88rtp-203.com collected 2026-10-07 18:00:49 UTC 1,866,308 bytes, 618 lines download raw bytes

1import{r as ny}from"./rolldown-runtime-BNNRdYrd.js";import{At as xD,Ct as ID,E as ED,L as DD,Q as ND,Y as TD,Yt as MD,mn as RD,pt as AD}from"./vue.runtime.esm-bundler-BXOQDxND.js";import{t as yh}from"./preload-helper-DjMZykf2.js";import{t as OD}from"./_plugin-vue_export-helper-K9rsuiWd.js";import{b as Ja,o as B0,y as PD}from"./index-DbIsMhdV.js";function FD(t,e){let i;return e.length===0?i=t:i=t.replace(/\{(\d+)\}/g,function(n,s){const r=s[0];return typeof e[r]<"u"?e[r]:n}),i}function p(t,e,...i){return FD(e,i)}var vf,zc="en",Md=!1,Rd=!1,Uc=!1,sy=!1,j1=!1,q1=!1,Gh=void 0,Cf=zc,Ns=void 0,Ve=typeof self=="object"?self:typeof global=="object"?global:{},Ot=void 0;typeof Ve.vscode<"u"&&typeof Ve.vscode.process<"u"?Ot=Ve.vscode.process:typeof process<"u"&&(Ot=process);var BD=typeof((vf=Ot?.versions)===null||vf===void 0?void 0:vf.electron)=="string"&&Ot?.type==="renderer";if(typeof navigator=="object"&&!BD)Ns=navigator.userAgent,Md=Ns.indexOf("Windows")>=0,Rd=Ns.indexOf("Macintosh")>=0,q1=(Ns.indexOf("Macintosh")>=0||Ns.indexOf("iPad")>=0||Ns.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,Uc=Ns.indexOf("Linux")>=0,j1=!0,Gh=navigator.language,Cf=Gh;else if(typeof Ot=="object"){Md=Ot.platform==="win32",Rd=Ot.platform==="darwin",Uc=Ot.platform==="linux",Uc&&Ot.env.SNAP&&Ot.env.SNAP_REVISION,Ot.env.CI||Ot.env.BUILD_ARTIFACTSTAGINGDIRECTORY,Gh=zc,Cf=zc;const t=Ot.env.VSCODE_NLS_CONFIG;if(t)try{const e=JSON.parse(t),i=e.availableLanguages["*"];Gh=e.locale,Cf=i||zc,e._translationsConfigFile}catch{}sy=!0}var ei=Md,fe=Rd,Bt=Uc,ia=sy,Pa=j1,VD=j1&&typeof Ve.importScripts=="function",Xr=q1,Bn=Ns,ry=(()=>{if(typeof Ve.postMessage=="function"&&!Ve.importScripts){let t=[];Ve.addEventListener("message",i=>{if(i.data&&i.data.vscodeScheduleAsyncWork)for(let n=0,s=t.length;n<s;n++){const r=t[n];if(r.id===i.data.vscodeScheduleAsyncWork){t.splice(n,1),r.callback();return}}});let e=0;return i=>{const n=++e;t.push({id:n,callback:i}),Ve.postMessage({vscodeScheduleAsyncWork:n},"*")}}return t=>setTimeout(t)})(),Hi=Rd||q1?2:Md?1:3,V0=!0,W0=!1;function oy(){if(!W0){W0=!0;const t=new Uint8Array(2);t[0]=1,t[1]=2,V0=new Uint16Array(t.buffer)[0]===513}return V0}var ay=!!(Bn&&Bn.indexOf("Chrome")>=0),WD=!!(Bn&&Bn.indexOf("Firefox")>=0),HD=!!(!ay&&Bn&&Bn.indexOf("Safari")>=0),zD=!!(Bn&&Bn.indexOf("Edg/")>=0),Fz=!!(Bn&&Bn.indexOf("Android")>=0),ly="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function UD(t=""){let e="(-?\\d*\\.\\d\\w*)|([^";for(const i of ly)t.indexOf(i)>=0||(e+="\\"+i);return e+="\\s]+)",new RegExp(e,"g")}var G1=UD();function hy(t){let e=G1;if(t&&t instanceof RegExp)if(t.global)e=t;else{let i="g";t.ignoreCase&&(i+="i"),t.multiline&&(i+="m"),t.unicode&&(i+="u"),e=new RegExp(t.source,i)}return e.lastIndex=0,e}var $D={maxLen:1e3,windowSize:15,timeBudget:150};function ih(t,e,i,n,s=$D){if(i.length>s.maxLen){let h=t-s.maxLen/2;return h<0?h=0:n+=h,i=i.substring(h,t+s.maxLen/2),ih(t,e,i,n,s)}const r=Date.now(),o=t-1-n;let a=-1,l=null;for(let h=1;!(Date.now()-r>=s.timeBudget);h++){const c=o-s.windowSize*h;e.lastIndex=Math.max(0,c);const d=KD(e,i,o,a);if(!d&&l||(l=d,c<=0))break;a=c}if(l){const h={word:l[0],startColumn:n+1+l.index,endColumn:n+1+l.index+l[0].length};return e.lastIndex=0,h}return null}function KD(t,e,i,n){let s;for(;s=t.exec(e);){const r=s.index||0;if(r<=i&&t.lastIndex>=i)return s;if(n>0&&r>n)return null}return null}function Ci(t,e=0){return t[t.length-(1+e)]}function jD(t){if(t.length===0)throw new Error("Invalid tail call");return[t.slice(0,t.length-1),t[t.length-1]]}function Rn(t,e,i=(n,s)=>n===s){if(t===e)return!0;if(!t||!e||t.length!==e.length)return!1;for(let n=0,s=t.length;n<s;n++)if(!i(t[n],e[n]))return!1;return!0}function qD(t,e,i){let n=0,s=t.length-1;for(;n<=s;){const r=(n+s)/2|0,o=i(t[r],e);if(o<0)n=r+1;else if(o>0)s=r-1;else return r}return-(n+1)}function GD(t,e){let i=0,n=t.length;if(n===0)return 0;for(;i<n;){const s=Math.floor((i+n)/2);e(t[s])?n=s:i=s+1}return i}function cy(t){return t.filter(e=>!!e)}function ZD(t){return!Array.isArray(t)||t.length===0}function Z1(t){return Array.isArray(t)&&t.length>0}function tr(t,e=i=>i){const i=new Set;return t.filter(n=>{const s=e(n);return i.has(s)?!1:(i.add(s),!0)})}function YD(t,e){const i=XD(t,e);if(i!==-1)return t[i]}function XD(t,e){for(let i=t.length-1;i>=0;i--){const n=t[i];if(e(n))return i}return-1}function dy(t,e){return t.length>0?t[0]:e}function QD(t){return[].concat(...t)}function At(t,e){let i=typeof e=="number"?t:0;typeof e=="number"?i=t:(i=0,e=t);const n=[];if(i<=e)for(let s=i;s<e;s++)n.push(s);else for(let s=i;s>e;s--)n.push(s);return n}function Vu(t,e,i){const n=t.slice(0,e),s=t.slice(e);return n.concat(i,s)}function bf(t,e){const i=t.indexOf(e);i>-1&&(t.splice(i,1),t.unshift(e))}function Zh(t,e){const i=t.indexOf(e);i>-1&&(t.splice(i,1),t.push(e))}function JD(t,e,i){const n=uy(t,e),s=t.length,r=i.length;t.length=s+r;for(let o=s-1;o>=n;o--)t[o+r]=t[o];for(let o=0;o<r;o++)t[o+n]=i[o]}
1function H0(t,e,i,n){const s=uy(t,e),r=t.splice(s,i);return JD(t,s,n),r}function uy(t,e){return e<0?Math.max(e+t.length,0):Math.min(e,t.length)}function wf(t,e){return(i,n)=>e(t(i),t(n))}function eN(t,e){if(t.length===0)return;let i=t[0];for(let n=1;n<t.length;n++){const s=t[n];e(s,i)>0&&(i=s)}return i}function tN(t,e){if(t.length===0)return;let i=t[0];for(let n=1;n<t.length;n++){const s=t[n];e(s,i)>=0&&(i=s)}return i}function iN(t,e){return eN(t,(i,n)=>-e(i,n))}var ba=class{constructor(t){this.items=t,this.firstIdx=0,this.lastIdx=this.items.length-1}takeWhile(t){let e=this.firstIdx;for(;e<this.items.length&&t(this.items[e]);)e++;const i=e===this.firstIdx?null:this.items.slice(this.firstIdx,e);return this.firstIdx=e,i}takeFromEndWhile(t){let e=this.lastIdx;for(;e>=0&&t(this.items[e]);)e--;const i=e===this.lastIdx?null:this.items.slice(e+1,this.lastIdx+1);return this.lastIdx=e,i}peek(){return this.items[this.firstIdx]}dequeue(){const t=this.items[this.firstIdx];return this.firstIdx++,t}takeCount(t){const e=this.items.slice(this.firstIdx,this.firstIdx+t);return this.firstIdx+=t,e}};function _n(t){return typeof t=="string"}function Li(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)&&!(t instanceof RegExp)&&!(t instanceof Date)}function Lh(t){return typeof t=="number"&&!isNaN(t)}function z0(t){return!!t&&typeof t[Symbol.iterator]=="function"}function fy(t){return t===!0||t===!1}function gn(t){return typeof t>"u"}function nN(t){return!zi(t)}function zi(t){return gn(t)||t===null}function mn(t,e){if(!t)throw new Error(e?`Unexpected type, expected '${e}'`:"Unexpected type")}function Ad(t){return typeof t=="function"}function sN(t,e){const i=Math.min(t.length,e.length);for(let n=0;n<i;n++)rN(t[n],e[n])}function rN(t,e){if(_n(e)){if(typeof t!==e)throw new Error(`argument does not match constraint: typeof ${e}`)}else if(Ad(e)){try{if(t instanceof e)return}catch{}if(!zi(t)&&t.constructor===e||e.length===1&&e.call(void 0,t)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function oN(t){let e=[],i=Object.getPrototypeOf(t);for(;Object.prototype!==i;)e=e.concat(Object.getOwnPropertyNames(i)),i=Object.getPrototypeOf(i);return e}function Y1(t){const e=[];for(const i of oN(t))typeof t[i]=="function"&&e.push(i);return e}function aN(t,e){const i=s=>function(){return e(s,Array.prototype.slice.call(arguments,0))};let n={};for(const s of t)n[s]=i(s);return n}function Br(t){return t===null?void 0:t}function X1(t,e="Unreachable"){throw new Error(e)}function As(t){if(!t||typeof t!="object"||t instanceof RegExp)return t;const e=Array.isArray(t)?[]:{};return Object.keys(t).forEach(i=>{t[i]&&typeof t[i]=="object"?e[i]=As(t[i]):e[i]=t[i]}),e}function lN(t){if(!t||typeof t!="object")return t;const e=[t];for(;e.length>0;){const i=e.shift();Object.freeze(i);for(const n in i)if(hN.call(i,n)){const s=i[n];typeof s=="object"&&!Object.isFrozen(s)&&e.push(s)}}return t}var hN=Object.prototype.hasOwnProperty;function ao(t,e,i=!0){return Li(t)?(Li(e)&&Object.keys(e).forEach(n=>{n in t?i&&(Li(t[n])&&Li(e[n])?ao(t[n],e[n],i):t[n]=e[n]):t[n]=e[n]}),t):e}function ki(t,e){if(t===e)return!0;if(t==null||e===null||e===void 0||typeof t!=typeof e||typeof t!="object"||Array.isArray(t)!==Array.isArray(e))return!1;let i,n;if(Array.isArray(t)){if(t.length!==e.length)return!1;for(i=0;i<t.length;i++)if(!ki(t[i],e[i]))return!1}else{const s=[];for(n in t)s.push(n);s.sort();const r=[];for(n in e)r.push(n);if(r.sort(),!ki(s,r))return!1;for(i=0;i<s.length;i++)if(!ki(t[s[i]],e[s[i]]))return!1}return!0}function yn(t,e,i){const n=e(t);return typeof n>"u"?i:n}var Et={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0,bracketPairColorizationOptions:{enabled:!1}};var gy=class{constructor(t){this._values=t}hasChanged(t){return this._values[t]}},my=class{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}},nt=class{constructor(t,e,i,n){this.id=t,this.name=e,this.defaultValue=i,this.schema=n}applyUpdate(t,e){return Wu(t,e)}compute(t,e,i){return i}},Fl=class{constructor(t,e){this.newValue=t,this.didChange=e}};function Wu(t,e){if(typeof t!="object"||typeof e!="object"||!t||!e)return new Fl(e,t!==e);if(Array.isArray(t)||Array.isArray(e)){const n=Array.isArray(t)&&Array.isArray(e)&&Rn(t,e);return new Fl(e,n)}let i=!1;for(const n in e)if(e.hasOwnProperty(n)){const s=Wu(t[n],e[n]);s.didChange&&(t[n]=s.newValue,i=!0)}return new Fl(t,i)}var Fa=class{constructor(t){this.schema=void 0,this.id=t,this.name="_never_",this.defaultValue=void 0}applyUpdate(t,e){return Wu(t,e)}validate(t){return this.defaultValue}},lo=class{constructor(t,e,i,n){this.id=t,this.name=e,this.defaultValue=i,this.schema=n}applyUpdate(t,e){return Wu(t,e)}validate(t){return typeof t>"u"?this.defaultValue:t}compute(t,e,i){return i}};function U(t,e){return typeof t>"u"?e:t==="false"?!1:!!t}var oe=class extends lo{constructor(t,e,i,n=void 0){typeof n<"u"&&(n.type="boolean",n.default=i),super(t,e,i,n)}validate(t){return U(t,this.defaultValue)}};function Zg(t,e,i,n){if(typeof t>"u")return e;let s=parseInt(t,10);return isNaN(s)?e:(s=Math.max(i,s),s=Math.min(n,s),s|0)}var Te=class py extends lo{constructor(e,i,n,s,r,o=void 0){typeof o<"u"&&(o.type="integer",o.default=n,o.minimum=s,o.maximum=r),super(e,i,n,o),this.minimum=s,this.maximum=r}static clampedInt(e,i,n,s){return Zg(e,i,n,s)}validate(e){return py.clampedInt(e,this.defaultValue,this.minimum,this.maximum)}},Us=class _y extends lo{constructor(e,i,n,s,r){typeof r<"u"&&(r.type="number",r.default=n),super(e,i,n,r),this.validationFn=s}static clamp(e,i,n){return e<i?i:e>n?n:e}static float(e,i){if(typeof e=="number")return e;if(typeof e>"u")return i;const n=parseFloat(e);return isNaN(n)?i:n}validate(e){return this.validationFn(_y.float(e,this.defaultValue))}},wi=class vy extends lo{static string(e,i){return typeof e!="string"?i:e}constructor(e,i,n,s=void 0){typeof s<"u"&&(s.type="string",s.default=n),super(e,i,n,s)}validate(e){return vy.string(e,this.defaultValue)}};function jt(t,e,i){return typeof t!="string"||i.indexOf(t)===-1?e:t}var Xe=class extends lo{constructor(t,e,i,n,s=void 0){typeof s<"u"&&(s.type="string",s.enum=n,s.default=i),super(t,e,i,s),this._allowedValues=n}validate(t){return jt(t,this.defaultValue,this._allowedValues)}},el=class extends nt{constructor(t,e,i,n,s,r,o=void 0){typeof o<"u"&&(o.type="string",o.enum=s,o.default=n),super(t,e,i,o),this._allowedValues=s,this._convert=r}validate(t){return typeof t!="string"?this.defaultValue:this._allowedValues.indexOf(t)===-1?this.defaultValue:this._convert(t)}};function cN(t){switch(t){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}var dN=class extends nt{constructor(){super(2,"accessibilitySupport",0,{t
1ype:"string",enum:["auto","on","off"],enumDescriptions:[p("accessibilitySupport.auto","The editor will use platform APIs to detect when a Screen Reader is attached."),p("accessibilitySupport.on","The editor will be permanently optimized for usage with a Screen Reader. Word wrapping will be disabled."),p("accessibilitySupport.off","The editor will never be optimized for usage with a Screen Reader.")],default:"auto",description:p("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(t){switch(t){case"auto":return 0;case"off":return 1;case"on":return 2}return this.defaultValue}compute(t,e,i){return i===0?t.accessibilitySupport:i}},uN=class extends nt{constructor(){const t={insertSpace:!0,ignoreEmptyLines:!0};super(19,"comments",t,{"editor.comments.insertSpace":{type:"boolean",default:t.insertSpace,description:p("comments.insertSpace","Controls whether a space character is inserted when commenting.")},"editor.comments.ignoreEmptyLines":{type:"boolean",default:t.ignoreEmptyLines,description:p("comments.ignoreEmptyLines","Controls if empty lines should be ignored with toggle, add or remove actions for line comments.")}})}validate(t){if(!t||typeof t!="object")return this.defaultValue;const e=t;return{insertSpace:U(e.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:U(e.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}};function fN(t){switch(t){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}var ht;(function(t){t[t.Line=1]="Line",t[t.Block=2]="Block",t[t.Underline=3]="Underline",t[t.LineThin=4]="LineThin",t[t.BlockOutline=5]="BlockOutline",t[t.UnderlineThin=6]="UnderlineThin"})(ht||(ht={}));function gN(t){switch(t){case"line":return ht.Line;case"block":return ht.Block;case"underline":return ht.Underline;case"line-thin":return ht.LineThin;case"block-outline":return ht.BlockOutline;case"underline-thin":return ht.UnderlineThin}}var mN=class extends Fa{constructor(){super(128)}compute(t,e,i){const n=["monaco-editor"];return e.get(33)&&n.push(e.get(33)),t.extraEditorClassName&&n.push(t.extraEditorClassName),e.get(66)==="default"?n.push("mouse-default"):e.get(66)==="copy"&&n.push("mouse-copy"),e.get(100)&&n.push("showUnused"),e.get(126)&&n.push("showDeprecated"),n.join(" ")}},pN=class extends oe{constructor(){super(32,"emptySelectionClipboard",!0,{description:p("emptySelectionClipboard","Controls whether copying without a selection copies the current line.")})}compute(t,e,i){return i&&t.emptySelectionClipboard}},_N=class extends nt{constructor(){const t={cursorMoveOnType:!0,seedSearchStringFromSelection:"always",autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(35,"find",t,{"editor.find.cursorMoveOnType":{type:"boolean",default:t.cursorMoveOnType,description:p("find.cursorMoveOnType","Controls whether the cursor should jump to find matches while typing.")},"editor.find.seedSearchStringFromSelection":{type:"string",enum:["never","always","selection"],default:t.seedSearchStringFromSelection,enumDescriptions:[p("editor.find.seedSearchStringFromSelection.never","Never seed search string from the editor selection."),p("editor.find.seedSearchStringFromSelection.always","Always seed search string from the editor selection, including word at cursor position."),p("editor.find.seedSearchStringFromSelection.selection","Only seed search string from the editor selection.")],description:p("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:t.autoFindInSelection,enumDescriptions:[p("editor.find.autoFindInSelection.never","Never turn on Find in Selection automatically (default)."),p("editor.find.autoFindInSelection.always","Always turn on Find in Selection automatically."),p("editor.find.autoFindInSelection.multiline","Turn on Find in Selection automatically when multiple lines of content are selected.")],description:p("find.autoFind
1InSelection","Controls the condition for turning on Find in Selection automatically.")},"editor.find.globalFindClipboard":{type:"boolean",default:t.globalFindClipboard,description:p("find.globalFindClipboard","Controls whether the Find Widget should read or modify the shared find clipboard on macOS."),included:fe},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:t.addExtraSpaceOnTop,description:p("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:t.loop,description:p("find.loop","Controls whether the search automatically restarts from the beginning (or the end) when no further matches can be found.")}})}validate(t){if(!t||typeof t!="object")return this.defaultValue;const e=t;return{cursorMoveOnType:U(e.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:typeof t.seedSearchStringFromSelection=="boolean"?t.seedSearchStringFromSelection?"always":"never":jt(e.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection,["never","always","selection"]),autoFindInSelection:typeof t.autoFindInSelection=="boolean"?t.autoFindInSelection?"always":"never":jt(e.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:U(e.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:U(e.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:U(e.loop,this.defaultValue.loop)}}},ho=class Mo extends nt{constructor(){super(45,"fontLigatures",Mo.OFF,{anyOf:[{type:"boolean",description:p("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:p("fontFeatureSettings","Explicit 'font-feature-settings' CSS property. A boolean can be passed instead if one only needs to turn on/off ligatures.")}],description:p("fontLigaturesGeneral","Configures font ligatures or font features. Can be either a boolean to enable/disable ligatures or a string for the value of the CSS 'font-feature-settings' property."),default:!1})}validate(e){return typeof e>"u"?this.defaultValue:typeof e=="string"?e==="false"?Mo.OFF:e==="true"?Mo.ON:e:e?Mo.ON:Mo.OFF}};ho.OFF='"liga" off, "calt" off';ho.ON='"liga" on, "calt" on';var vN=class extends Fa{constructor(){super(44)}compute(t,e,i){return t.fontInfo}},CN=class extends lo{constructor(){super(46,"fontSize",di.fontSize,{type:"number",minimum:6,maximum:100,default:di.fontSize,description:p("fontSize","Controls the font size in pixels.")})}validate(t){const e=Us.float(t,this.defaultValue);return e===0?di.fontSize:Us.clamp(e,6,100)}compute(t,e,i){return t.fontInfo.fontSize}},Hu=class Ro extends nt{constructor(){super(47,"fontWeight",di.fontWeight,{anyOf:[{type:"number",minimum:Ro.MINIMUM_VALUE,maximum:Ro.MAXIMUM_VALUE,errorMessage:p("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:Ro.SUGGESTION_VALUES}],default:di.fontWeight,description:p("fontWeight",'Controls the font weight. Accepts "normal" and "bold" keywords or numbers between 1 and 1000.')})}validate(e){return e==="normal"||e==="bold"?e:String(Te.clampedInt(e,di.fontWeight,Ro.MINIMUM_VALUE,Ro.MAX
1IMUM_VALUE))}};Hu.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"];Hu.MINIMUM_VALUE=1;Hu.MAXIMUM_VALUE=1e3;var bN=class extends nt{constructor(){const t={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:""},e={type:"string",enum:["peek","gotoAndPeek","goto"],default:t.multiple,enumDescriptions:[p("editor.gotoLocation.multiple.peek","Show peek view of the results (default)"),p("editor.gotoLocation.multiple.gotoAndPeek","Go to the primary result and show a peek view"),p("editor.gotoLocation.multiple.goto","Go to the primary result and enable peek-less navigation to others")]},i=["","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(51,"gotoLocation",t,{"editor.gotoLocation.multiple":{deprecationMessage:p("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:p("editor.editor.gotoLocation.multipleDefinitions","Controls the behavior the 'Go to Definition'-command when multiple target locations exist.")},e),"editor.gotoLocation.multipleTypeDefinitions":Object.assign({description:p("editor.editor.gotoLocation.multipleTypeDefinitions","Controls the behavior the 'Go to Type Definition'-command when multiple target locations exist.")},e),"editor.gotoLocation.multipleDeclarations":Object.assign({description:p("editor.editor.gotoLocation.multipleDeclarations","Controls the behavior the 'Go to Declaration'-command when multiple target locations exist.")},e),"editor.gotoLocation.multipleImplementations":Object.assign({description:p("editor.editor.gotoLocation.multipleImplemenattions","Controls the behavior the 'Go to Implementations'-command when multiple target locations exist.")},e),"editor.gotoLocation.multipleReferences":Object.assign({description:p("editor.editor.gotoLocation.multipleReferences","Controls the behavior the 'Go to References'-command when multiple target locations exist.")},e),"editor.gotoLocation.alternativeDefinitionCommand":{type:"string",default:t.alternativeDefinitionCommand,enum:i,description:p("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:t.alternativeTypeDefinitionCommand,enum:i,description:p("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:t.alternativeDeclarationCommand,enum:i,description:p("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:t.alternativeImplementationCommand,enum:i,description:p("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:t.alternativeReferenceCommand,enum:i,description:p("alternativeReferenceCommand","Alternative command id that is being executed when the result of 'Go to Reference' is the current location.")}})}validate(t){var e,i,n,s,r;if(!t||typeof t!="object")return this.defaultValue;const o=t;return{multiple:jt(o.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:(e=o.multipleDefinitions)!==null&&e!==void 0?e:jt(o.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:(i=o.multipleTypeDefinitions)!==null&&i!==void 0?i:jt(o.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:(n=o.multipleDeclarations)!==null&&n!==void 0?n:jt(o.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:(s=o.multipleImplementations)!==null&&s!==void 0?s:jt(o.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:(r=o.multipleReferences)!==null&&r!==void 0?r:jt(o.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:wi.string(o.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:wi.string(o.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:wi.string(o.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:wi.string(o.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:wi.string(o.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand)}}},wN=class extends nt{constructor(){const t={enabled:!0,delay:300,sticky:!0,above:!0};super(53,"hover",t,{"editor.hover.enabled":{type:"boolean",default:t.enabled,description:p("hover.enabled","Controls whether the hover is shown.")},"editor.hover.delay":{type:"number",default:t.delay,minimum:0,maximum:1e4,description:p("hover.delay","Controls the delay in milliseconds after which the hover is shown.")},"editor.hover.sticky":{type:"boolean",default:t.sticky,description:p("hover.sticky","Controls whether the hover should remain visible when mouse is moved over it.")},"editor.hover.above":{type:"boolean",default:t.above,description:p("hover.above","Prefer showing hovers above the line, if there's space.")}})}validate(t){if(!t||typeof t!="object")return this.defaultValue;const e=t;return{enabled:U(e.enabled,this.defaultValue.enabled),delay:Te.clampedInt(e.delay,this.defaultValue.delay,0,1e4),sticky:U(e.sticky,this.defaultValue.sticky),above:U(e.above,this.defaultValue.above)}}},Cy=class $c extends Fa{constructor(){super(131)}compute(e,i,n){return $c.computeLayout(i,{memory:e.memory,outerWidth:e.outerWidth,outerHeight:e.outerHeight,isDominatedByLongLines:e.isDominatedByLongLines,lineHeight:e.fontInfo.lineHeight,viewLineCount:e.viewLineCount,lineNumbersDigitCount:e.lineNumbersDigitCount,typicalHalfwidthCharacterWidth:e.fontInfo.typicalHalfwidthCharacterWidth,maxDigitWidth:e.fontInfo.maxDigitWidth,pixelRatio:e.pixelRatio})}static computeContainedMinimapLineCount(e){const i=e.height/e.lineHeight,n=e.scrollBeyondLastLine?i-1:0,s=(e.viewLineCount+n)/(e.pixelRatio*e.height);return{typicalViewportLineCount:i,extraLinesBeyondLastLine:n,desiredRatio:s,minimapLineCount:Math.floor(e.viewLineCount/s)}}static _computeMinimapLayout(e,i){const n=e.outerWidth,s=e.outerHeight,r=e.pixelRatio;if(!e.minimap.enabled)return{renderMinimap:0,minimapLeft:0,minimapWidth:0,minimapHeightIsEditorHeight:!1,minimapIsSampling:!1,minimapScale:1,minimapLineHeight:1,minimapCanvasInnerWidth:0,minimapCanvasInnerHeight:Math.floor(r*s),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:s};const o=i.stableMinimapLayoutInput,a=o&&e.outerHeight===o.outerHeight&&e.lineHeight===o.lineHeight&&e.typicalHalfwidthCharacterWidth===o.typicalHalfwidthCharacterWidth&&e.pixelRatio===o.pixelRatio&&e.scrollBeyondLastLine===o.scrollBeyondLastLine&&e.minimap.enabled===o.minimap.enabled&&e.minimap.side===o.minimap.side&&e.minimap.size===o.minimap.size&&e.minimap.showSlider===o.minimap.showSlider&&e.minimap.renderCharacters===o.minimap.renderCharacters&&e.minimap.maxColumn===o.minimap.maxColumn&&e.minimap.scale===o.minimap.scale&&e.verticalScrollbarWidth===o.verticalScrollbarWidth&&e.isViewportWrapping===o.isViewportWrapping,l=e.lineHeight,h=e.typicalHalfwidthCharacterWidth,c=e.scrollBeyondLastLine,d=e.minimap.renderCharacters;let u=r>=2?Math.round(e.minimap.scale*2):e.minimap.scale;const g=e.minimap.maxColumn,m=e.minimap.size,_=e.minimap.side,C=e.verticalScrollbarWidth,w=e.viewLineCount,v=e.remainingWidth,b=e.isViewportWrapping,y=d?2:3;let k=Math.floor(r*s);const S=k/r;let L=!1,x=!1,E=y*u,R=u/r,D=1;if(m==="fill"||m==="fit"){const{typicalViewportLineCount:ie,extraLinesBeyondLastLine:J,desiredRatio:ae,minimapLineCount:le}=$c.computeContainedMinimapLineCount({viewLineCount:w,scrollBeyondLastLine:c,height:s,lineHeight:l,pixelRatio:r});if(w/le>1)L=!0,x=!0,u=1,E=1,R=u/r;else{let Ue=!1,He=u+1;if(m==="fit"){const Ri=Math.ceil((w+J)*E);b&&a&&v<=i.stableFitRemainingWidth?(Ue=!0,He=i.stableFitMaxMinimapScale):Ue=Ri>k}if(m==="fill"||Ue){L=!0;const Ri=u;E=Math.min(l*r,Math.max(1,Math.floor(1/ae))),b&&a&&v<=i.stableFitRemainingWidth&&(He=i.stableFitMaxMinimapScale),u=Math.min(He,Math.max(1,Math.floor(E/y))),u>Ri&&(D=Math.min(2,u/Ri)),R=u/r/D,k=Math.ceil(Math.max(ie,w+J)*E),b?(i.stableMinimapLayoutInput=e,i.stableFitRemainingWidth=v,i.stableFitMaxMinimapScale=u):(i.stableMinimapLayoutInput=null,i.stableFitRemainingWidth=0)}}}const W=Math.floor(g*R),P=Math.min(W,Math.max(0,Math.floor((v-C-2)*R/(h+R)))+8);let K=Math.floor(r*P);const j=K/r;return K=Math.floor(K*D),{renderMinimap:d?1:2,minimapLeft:_==="left"?0:n-P-C,minimapWidth:P,minimapHeightIsEditorHeight:L,minimapIsSampling:x,minimapScale:u,minimapLineHeight:E,minimapCanvasInnerWidth:K,minimapCanvasInnerHeight:k,minimapCanvasOuterWidth:j,minimapCanvasOuterHeight:S}}static computeLayout(e,i){const n=i.outerWidth|0,s=i.outerHeight|0,r=i.lineHeight|0,o=i.lineNumbersDigitCount|0,a=i.t
1ypicalHalfwidthCharacterWidth,l=i.maxDigitWidth,h=i.pixelRatio,c=i.viewLineCount,d=e.get(123),u=d==="inherit"?e.get(122):d,g=u==="inherit"?e.get(118):u,m=e.get(121),_=e.get(2),C=i.isDominatedByLongLines,w=e.get(50),v=e.get(60).renderType!==0,b=e.get(61),y=e.get(94),k=e.get(65),S=e.get(92),L=S.verticalScrollbarSize,x=S.verticalHasArrows,E=S.arrowSize,R=S.horizontalScrollbarSize,D=e.get(58),W=e.get(37);let P;if(typeof D=="string"&&/^\d+(\.\d+)?ch$/.test(D)){const kD=parseFloat(D.substr(0,D.length-2));P=Te.clampedInt(kD*a,0,0,1e3)}else P=Te.clampedInt(D,0,0,1e3);W&&(P+=16);let K=0;v&&(K=Math.round(Math.max(o,b)*l));let j=0;w&&(j=r);let ie=0,J=ie+j,ae=J+K,le=ae+P;const Ue=n-j-K-P;let He=!1,Ri=!1,mr=-1;_!==2&&(u==="inherit"&&C?(He=!0,Ri=!0):g==="on"||g==="bounded"?Ri=!0:g==="wordWrapColumn"&&(mr=m));const ys=$c._computeMinimapLayout({outerWidth:n,outerHeight:s,lineHeight:r,typicalHalfwidthCharacterWidth:a,pixelRatio:h,scrollBeyondLastLine:y,minimap:k,verticalScrollbarWidth:L,viewLineCount:c,remainingWidth:Ue,isViewportWrapping:Ri},i.memory||new my);ys.renderMinimap!==0&&ys.minimapLeft===0&&(ie+=ys.minimapWidth,J+=ys.minimapWidth,ae+=ys.minimapWidth,le+=ys.minimapWidth);const O0=Ue-ys.minimapWidth,P0=Math.max(1,Math.floor((O0-L-2)/a)),F0=x?E:0;return Ri&&(mr=Math.max(1,P0),g==="bounded"&&(mr=Math.min(mr,m))),{width:n,height:s,glyphMarginLeft:ie,glyphMarginWidth:j,lineNumbersLeft:J,lineNumbersWidth:K,decorationsLeft:ae,decorationsWidth:P,contentLeft:le,contentWidth:O0,minimap:ys,viewportColumn:P0,isWordWrapMinified:He,isViewportWrapping:Ri,wrappingColumn:mr,verticalScrollbarWidth:L,horizontalScrollbarHeight:R,overviewRuler:{top:F0,width:L,height:s-2*F0,right:0}}}},SN=class extends nt{constructor(){const t={enabled:!0};super(57,"lightbulb",t,{"editor.lightbulb.enabled":{type:"boolean",default:t.enabled,description:p("codeActions","Enables the code action lightbulb in the editor.")}})}validate(t){return!t||typeof t!="object"?this.defaultValue:{enabled:U(t.enabled,this.defaultValue.enabled)}}},yN=class extends nt{constructor(){const t={enabled:!0,fontSize:0,fontFamily:""};super(127,"inlayHints",t,{"editor.inlayHints.enabled":{type:"boolean",default:t.enabled,description:p("inlayHints.enable","Enables the inlay hints in the editor.")},"editor.inlayHints.fontSize":{type:"number",default:t.fontSize,markdownDescription:p("inlayHints.fontSize","Controls font size of inlay hints in the editor. A default of 90% of `#editor.fontSize#` is used when the configured value is less than `5` or greater than the editor font size.")},"editor.inlayHints.fontFamily":{type:"string",default:t.fontFamily,markdownDescription:p("inlayHints.fontFamily","Controls font family of inlay hints in the editor. When set to empty, the `#editor.fontFamily#` is used.")}})}validate(t){if(!t||typeof t!="object")return this.defaultValue;const e=t;return{enabled:U(e.enabled,this.defaultValue.enabled),fontSize:Te.clampedInt(e.fontSize,this.defaultValue.fontSize,0,100),fontFamily:wi.string(e.fontFamily,this.defaultValue.fontFamily)}}},LN=class extends Us{constructor(){super(59,"lineHeight",di.lineHeight,t=>Us.clamp(t,0,150),{markdownDescription:p("lineHeight",`Controls the line height. 
2 - Use 0 to automatically compute the line height from the font size.
3 - Values between 0 and 8 will be used as a multiplier with the font size.
4 - Values greater than or equal to 8 will be used as effective values.`)})}compute(t,e,i){return t.fontInfo.lineHeight}},kN=class extends nt{constructor(){const t={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",renderCharacters:!0,maxColumn:120,scale:1};super(65,"minimap",t,{"editor.minimap.enabled":{type:"boolean",default:t.enabled,description:p("minimap.enabled","Controls whether the minimap is shown.")},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[p("minimap.size.proportional","The minimap has the same size as the editor contents (and might scroll)."),p("minimap.size.fill","The minimap will stretch or shrink as necessary to fill the height of the editor (no scrolling)."),p("minimap.size.fit","The minimap will shrink as necessary to never be larger than the editor (no scrolling).")],default:t.size,description:p("minimap.size","Controls the size of the minimap.")},"editor.minimap.side":{type:"string",enum:["left","right"],default:t.side,description:p("minimap.side","Controls the side where to render the minimap.")},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:t.showSlider,description:p("minimap.showSlider","Controls when the minimap slider is shown.")},"editor.minimap.scale":{type:"number",default:t.scale,minimum:1,maximum:3,enum:[1,2,3],description:p("minimap.scale","Scale of content drawn in the minimap: 1, 2 or 3.")},"editor.minimap.renderCharacters":{type:"boolean",default:t.renderCharacters,description:p("minimap.renderCharacters","Render the actual characters on a line as opposed to color blocks.")},"editor.minimap.maxColumn":{type:"number",default:t.maxColumn,description:p("minimap.maxColumn","Limit the width of the minimap to render at most a certain 
4number of columns.")}})}validate(t){if(!t||typeof t!="object")return this.defaultValue;const e=t;return{enabled:U(e.enabled,this.defaultValue.enabled),size:jt(e.size,this.defaultValue.size,["proportional","fill","fit"]),side:jt(e.side,this.defaultValue.side,["right","left"]),showSlider:jt(e.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:U(e.renderCharacters,this.defaultValue.renderCharacters),scale:Te.clampedInt(e.scale,1,1,3),maxColumn:Te.clampedInt(e.maxColumn,this.defaultValue.maxColumn,1,1e4)}}};function xN(t){return t==="ctrlCmd"?fe?"metaKey":"ctrlKey":"altKey"}var IN=class extends nt{constructor(){super(75,"padding",{top:0,bottom:0},{"editor.padding.top":{type:"number",default:0,minimum:0,maximum:1e3,description:p("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:p("padding.bottom","Controls the amount of space between the bottom edge of the editor and the last line.")}})}validate(t){if(!t||typeof t!="object")return this.defaultValue;const e=t;return{top:Te.clampedInt(e.top,0,0,1e3),bottom:Te.clampedInt(e.bottom,0,0,1e3)}}},EN=class extends nt{constructor(){const t={enabled:!0,cycle:!1};super(76,"parameterHints",t,{"editor.parameterHints.enabled":{type:"boolean",default:t.enabled,description:p("parameterHints.enabled","Enables a pop-up that shows parameter documentation and type information as you type.")},"editor.parameterHints.cycle":{type:"boolean",default:t.cycle,description:p("parameterHints.cycle","Controls whether the parameter hints menu cycles or closes when reaching the end of the list.")}})}validate(t){if(!t||typeof t!="object")return this.defaultValue;const e=t;return{enabled:U(e.enabled,this.defaultValue.enabled),cycle:U(e.cycle,this.defaultValue.cycle)}}},DN=class extends Fa{constructor(){super(129)}compute(t,e,i){return t.pixelRatio}},NN=class extends nt{constructor(){const t={other:!0,comments:!1,strings:!1};super(79,"quickSuggestions",t,{anyOf:[{type:"boolean"},{type:"object",properties:{strings:{type:"boolean",default:t.strings,description:p("quickSuggestions.strings","Enable quick suggestions inside strings.")},comments:{type:"boolean",default:t.comments,description:p("quickSuggestions.comments","Enable quick suggestions inside comments.")},other:{type:"boolean",default:t.other,description:p("quickSuggestions.other","Enable quick suggestions outside of strings and comments.")}}}],default:t,description:p("quickSuggestions","Controls whether suggestions should automatically show up while typing.")}),this.defaultValue=t}validate(t){if(typeof t=="boolean")return t;if(t&&typeof t=="object"){const e=t,i={other:U(e.other,this.defaultValue.other),comments:U(e.comments,this.defaultValue.comments),strings:U(e.strings,this.defaultValue.strings)};return i.other&&i.comments&&i.strings?!0:!i.other&&!i.comments&&!i.strings?!1:i}return this.defaultValue}},TN=class extends nt{constructor(){super(60,"lineNumbers",{renderType:1,renderFn:null},{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[p("lineNumbers.off","Line numbers are not rendered."),p("lineNumbers.on","Line numbers are rendered as absolute number."),p("lineNumbers.relative","Line numbers are rendered as distance in lines to cursor position."),p("lineNumbers.interval","Line numbers are rendered every 10 lines.")],default:"on",description:p("lineNumbers","Controls the display of line numbers.")})}validate(t){let e=this.defaultValue.renderType,i=this.defaultValue.renderFn;return typeof t<"u"&&(typeof t=="function"?(e=4,i=t):t==="interval"?e=3:t==="relative"?e=2:t==="on"?e=1:e=0),{renderType:e,renderFn:i}}};function Od(t){const e=t.get(87);return e==="editable"?t.get(81):e!=="on"}var MN=class extends nt{constructor(){const t=[],e={type:"number",description:p("rulers.size","Number of monospace characters at which this editor ruler will render.")};super(91,"rulers",t,{type:"array",items:{anyOf:[e,{type:["object"],properties:{column:e,color:{type:"string",description:p("rulers.color","Color of this editor ruler."),format:"color-hex"}}}]},default:t,description:p("rulers","Render vertical rulers after a certain 
4number of monospace characters. Use multiple values for multiple rulers. No rulers are drawn if array is empty.")})}validate(t){if(Array.isArray(t)){const e=[];for(let i of t)if(typeof i=="number")e.push({column:Te.clampedInt(i,0,0,1e4),color:null});else if(i&&typeof i=="object"){const n=i;e.push({column:Te.clampedInt(n.column,0,0,1e4),color:n.color})}return e.sort((i,n)=>i.column-n.column),e}return this.defaultValue}};function U0(t,e){if(typeof t!="string")return e;switch(t){case"hidden":return 2;case"visible":return 3;default:return 1}}var RN=class extends nt{constructor(){const t={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(92,"scrollbar",t,{"editor.scrollbar.vertical":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[p("scrollbar.vertical.auto","The vertical scrollbar will be visible only when necessary."),p("scrollbar.vertical.visible","The vertical scrollbar will always be visible."),p("scrollbar.vertical.fit","The vertical scrollbar will always be hidden.")],default:"auto",description:p("scrollbar.vertical","Controls the visibility of the vertical scrollbar.")},"editor.scrollbar.horizontal":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[p("scrollbar.horizontal.auto","The horizontal scrollbar will be visible only when necessary."),p("scrollbar.horizontal.visible","The horizontal scrollbar will always be visible."),p("scrollbar.horizontal.fit","The horizontal scrollbar will always be hidden.")],default:"auto",description:p("scrollbar.horizontal","Controls the visibility of the horizontal scrollbar.")},"editor.scrollbar.verticalScrollbarSize":{type:"number",default:t.verticalScrollbarSize,description:p("scrollbar.verticalScrollbarSize","The width of the vertical scrollbar.")},"editor.scrollbar.horizontalScrollbarSize":{type:"number",default:t.horizontalScrollbarSize,description:p("scrollbar.horizontalScrollbarSize","The height of the horizontal scrollbar.")},"editor.scrollbar.scrollByPage":{type:"boolean",default:t.scrollByPage,description:p("scrollbar.scrollByPage","Controls whether clicks scroll by page or jump to click position.")}})}validate(t){if(!t||typeof t!="object")return this.defaultValue;const e=t,i=Te.clampedInt(e.horizontalScrollbarSize,this.defaultValue.horizontalScrollbarSize,0,1e3),n=Te.clampedInt(e.verticalScrollbarSize,this.defaultValue.verticalScrollbarSize,0,1e3);return{arrowSize:Te.clampedInt(e.arrowSize,this.defaultValue.arrowSize,0,1e3),vertical:U0(e.vertical,this.defaultValue.vertical),horizontal:U0(e.horizontal,this.defaultValue.horizontal),useShadows:U(e.useShadows,this.defaultValue.useShadows),verticalHasArrows:U(e.verticalHasArrows,this.defaultValue.verticalHasArrows),horizontalHasArrows:U(e.horizontalHasArrows,this.defaultValue.horizontalHasArrows),handleMouseWheel:U(e.handleMouseWheel,this.defaultValue.handleMouseWheel),alwaysConsumeMouseWheel:U(e.alwaysConsumeMouseWheel,this.defaultValue.alwaysConsumeMouseWheel),horizontalScrollbarSize:i,horizontalSliderSize:Te.clampedInt(e.horizontalSliderSize,i,0,1e3),verticalScrollbarSize:n,verticalSliderSize:Te.clampedInt(e.verticalSliderSize,n,0,1e3),scrollByPage:U(e.scrollByPage,this.defaultValue.scrollByPage)}}},en="inUntrustedWorkspace",pr={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"},AN=class extends nt{constructor(){const t={nonBasicASCII:en,invisibleCharacters:!0,ambiguousCharacters:!0,includeComments:en,includeStrings:!0,allowedCharacters:{},allowedLocales:{_os:!0,_vscode:!0}};super(113,"unicodeHighlight",t,{[pr.nonBasicASCII]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,en],default:t.nonBasicASCII,description:p("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.")},[pr.invisibleCharacters]:{restricted:!0,type:"boolean",default:t.invisibleCharacters,description:p("unicodeHighlight.invisibleCharacters","Controls whether characters that just reserve space or have no width at all are highlighted.")},[pr.ambiguousCharacters]:{restricted:!0,type:"boolean",default:t.ambiguousCharacters,description:p("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.")},[pr.includeComments]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,en],default:t.includeComments,description:p("unicodeHighlight.includeComments","Controls whether characters in comments should also be subject to unicode highlighting.")},[pr.includeStrings]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,en],default:t.includeStrings,description:p("unicodeHighlight.includeStrings","Controls whether characters in strings should also be subject to unicode highlighting.")},[pr.allowedCharacters]:{restricted:!0,type:"object",default:t.allowedCharacters,description:p("unicodeHighlight.allowedCharacters","Defines allowed characters that are not being highlighted."),additionalProperties:{type:"boolean"}},[pr.allowedLocales]:{restricted:!0,type:"object",additionalProperties:{type:"boolean"},default:t.allowedLocales,description:p("unicodeHighlight.allowedLocales","Unicode characters that are common in allowed locales are not being highlighted.")}})}applyUpdate(t,e){let i=!1;e.allowedCharacters&&(ki(t.allowedCharacters,e.allowedCharacters)||(t=Object.assign(Object.assign({},t),{allowedCharacters:e.allowedCharacters}),i=!0)),e.allowedLocales&&(ki(t.allowedLocales,e.allowedLocales)||
4(t=Object.assign(Object.assign({},t),{allowedLocales:e.allowedLocales}),i=!0));const n=super.applyUpdate(t,e);return i?new Fl(n.newValue,!0):n}validate(t){if(!t||typeof t!="object")return this.defaultValue;const e=t;return{nonBasicASCII:Bl(e.nonBasicASCII,en,[!0,!1,en]),invisibleCharacters:U(e.invisibleCharacters,this.defaultValue.invisibleCharacters),ambiguousCharacters:U(e.ambiguousCharacters,this.defaultValue.ambiguousCharacters),includeComments:Bl(e.includeComments,en,[!0,!1,en]),includeStrings:Bl(e.includeStrings,en,[!0,!1,en]),allowedCharacters:this.validateBooleanMap(t.allowedCharacters,this.defaultValue.allowedCharacters),allowedLocales:this.validateBooleanMap(t.allowedLocales,this.defaultValue.allowedLocales)}}validateBooleanMap(t,e){if(typeof t!="object"||!t)return e;const i={};for(const[n,s]of Object.entries(t))s===!0&&(i[n]=!0);return i}},ON=class extends nt{constructor(){const t={enabled:!0,mode:"subwordSmart"};super(55,"inlineSuggest",t,{"editor.inlineSuggest.enabled":{type:"boolean",default:t.enabled,description:p("inlineSuggest.enabled","Controls whether to automatically show inline suggestions in the editor.")}})}validate(t){if(!t||typeof t!="object")return this.defaultValue;const e=t;return{enabled:U(e.enabled,this.defaultValue.enabled),mode:jt(e.mode,this.defaultValue.mode,["prefix","subword","subwordSmart"])}}},PN=class extends nt{constructor(){const t={enabled:Et.bracketPairColorizationOptions.enabled};super(12,"bracketPairColorization",t,{"editor.bracketPairColorization.enabled":{type:"boolean",default:t.enabled,description:p("bracketPairColorization.enabled","Controls whether bracket pair colorization is enabled or not. Use 'workbench.colorCustomizations' to override the bracket highlight colors.")}})}validate(t){return!t||typeof t!="object"?this.defaultValue:{enabled:U(t.enabled,this.defaultValue.enabled)}}},FN=class extends nt{constructor(){const t={bracketPairs:!1,bracketPairsHorizontal:"active",highlightActiveBracketPair:!0,indentation:!0,highlightActiveIndentation:!0};super(13,"guides",t,{"editor.guides.bracketPairs":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[p("editor.guides.bracketPairs.true","Enables bracket pair guides."),p("editor.guides.bracketPairs.active","Enables bracket pair guides only for the active bracket pair."),p("editor.guides.bracketPairs.false","Disables bracket pair guides.")],default:t.bracketPairs,description:p("editor.guides.bracketPairs","Controls whether bracket pair guides are enabled or not.")},"editor.guides.bracketPairsHorizontal":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[p("editor.guides.bracketPairsHorizontal.true","Enables horizontal guides as addition to vertical bracket pair guides."),p("editor.guides.bracketPairsHorizontal.active","Enables horizontal guides only for the active bracket pair."),p("editor.guides.bracketPairsHorizontal.false","Disables horizontal bracket pair guides.")],default:t.bracketPairsHorizontal,description:p("editor.guides.bracketPairsHorizontal","Controls whether horizontal bracket pair guides are enabled or not.")},"editor.guides.highlightActiveBracketPair":{type:"boolean",default:t.highlightActiveBracketPair,description:p("editor.guides.highlightActiveBracketPair","Controls whether the editor should highlight the active bracket pair.")},"editor.guides.indentation":{type:"boolean",default:t.indentation,description:p("editor.guides.indentation","Controls whether the editor should render indent guides.")},"editor.guides.highlightActiveIndentation":{type:"boolean",default:t.highlightActiveIndentation,description:p("editor.guides.highlightActiveIndentation","Controls whether the editor should highlight the active indent guide.")}})}validate(t){if(!t||typeof t!="object")return this.defaultValue;const e=t;return{bracketPairs:Bl(e.bracketPairs,this.defaultValue.bracketPairs,[!0,!1,"active"]),bracketPairsHorizontal:Bl(e.bracketPairsHorizontal,this.defaultValue.bracketPairsHorizontal,[!0,!1,"active"]),highlightActiveBracketPair:U(e.highlightActiveBracketPair,this.defaultValue.highlightActiveBracketPair),indentation:U(e.indentation,this.defaultValue.indentation),highlightActiveIndentation:U(e.highlightActiveIndentation,this.defaultValue.highlightActiveIndentation)}}};function Bl(t,e,i){const n=i.indexOf(t);return n===-1?e:i[n]}var BN=class extends nt{constructor(){const t={insertMode:"insert",filterGraceful:!0,snippetsPreventQuickSuggestions:!0,localityBonus:!1,shareSuggestSelections:!1,showIcons:!0,showStatusBar:!1,preview:!1,previewMode:"subwordSmart",showInlineDetails:!0,showMethods:!0,show
4Functions:!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(106,"suggest",t,{"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[p("suggest.insertMode.insert","Insert suggestion without overwriting text right of the cursor."),p("suggest.insertMode.replace","Insert suggestion and overwrite text right of the cursor.")],default:t.insertMode,description:p("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:t.filterGraceful,description:p("suggest.filterGraceful","Controls whether filtering and sorting suggestions accounts for small typos.")},"editor.suggest.localityBonus":{type:"boolean",default:t.localityBonus,description:p("suggest.localityBonus","Controls whether sorting favors words that appear close to the cursor.")},"editor.suggest.shareSuggestSelections":{type:"boolean",default:t.shareSuggestSelections,markdownDescription:p("suggest.shareSuggestSelections","Controls whether remembered suggestion selections are shared between multiple workspaces and windows (needs `#editor.suggestSelection#`).")},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:t.snippetsPreventQuickSuggestions,description:p("suggest.snippetsPreventQuickSuggestions","Controls whether an active snippet prevents quick suggestions.")},"editor.suggest.showIcons":{type:"boolean",default:t.showIcons,description:p("suggest.showIcons","Controls whether to show or hide icons in suggestions.")},"editor.suggest.showStatusBar":{type:"boolean",default:t.showStatusBar,description:p("suggest.showStatusBar","Controls the visibility of the status bar at the bottom of the suggest widget.")},"editor.suggest.preview":{type:"boolean",default:t.preview,description:p("suggest.preview","Controls whether to preview the suggestion outcome in the editor.")},"editor.suggest.showInlineDetails":{type:"boolean",default:t.showInlineDetails,description:p("suggest.showInlineDetails","Controls whether suggest details show inline with the label or only in the details widget")},"editor.suggest.maxVisibleSuggestions":{type:"number",deprecationMessage:p("suggest.maxVisibleSuggestions.dep","This setting is deprecated. The suggest widget can now be resized.")},"editor.suggest.filteredTypes":{type:"object",deprecationMessage:p("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:p("editor.suggest.showMethods","When enabled IntelliSense shows `method`-suggestions.")},"editor.suggest.showFunctions":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showFunctions","When enabled IntelliSense shows `function`-suggestions.")},"editor.suggest.showConstructors":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showConstructors","When enabled IntelliSense shows `constructor`-suggestions.")},"editor.suggest.showDeprecated":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showDeprecated","When enabled IntelliSense shows `deprecated`-suggestions.")},"editor.suggest.showFields":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showFields","When enabled IntelliSense shows `field`-suggestions.")},"editor.suggest.showVariables":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showVariables","When enabled IntelliSense shows `variable`-suggestions.")},"editor.suggest.showClasses":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showClasss","When enabled IntelliSense shows `class`-suggestions.")},"editor.suggest.showStructs":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showStructs","When enabled IntelliSense shows `struct`-suggestions.")},"editor.suggest.showInterfaces":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showInterfaces","When enabled IntelliSense shows `interface`-suggestions.")},"editor.suggest.showModules":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showModules","When enabled IntelliSense shows `module`-suggestions.")},"editor.suggest.showProperties":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showPropertys","When enabled IntelliSense shows `property`-suggestions.")},"editor.suggest.showEvents":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showEvents","When enabled IntelliSense shows `event`-suggestions.")},"editor.suggest.showOperators":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showOperators","When enabled IntelliSense shows `operator`-suggestions.")},"editor.suggest.showUnits":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showUnits","When enabled IntelliSense shows `unit`-suggestions.")},"editor.suggest.showValues":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showValues","When enabled IntelliSense shows `value`-suggestions.")},"editor.suggest.showConstants":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showConstants","When enabled IntelliSense shows `constant`-suggestions.")},"editor.suggest.showEnums":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showEnums","When enabled IntelliSense shows `enum`-suggestions.")},"editor.suggest.showEnumMembers":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showEnumMembers","When enabled IntelliSense shows `enumMember`-suggestions.")},"editor.suggest.showKeywords":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showKeywords","When enabled IntelliSense shows `keyword`-suggestions.")},"editor.suggest.showWords":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showTexts","When enabled IntelliSense shows `text`-suggestions.")},"editor.suggest.showColors":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showColors","When enabled IntelliSense shows `color`-suggestions.")},"editor.suggest.showFiles":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showFiles","When enabled IntelliSense shows `file`-suggestions.")},"editor.suggest.showReferences":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showReferences","When enabled IntelliSense shows `reference`-suggestions.")},"editor.suggest.showCustomcolors":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showCustomcolors","When enabled IntelliSense shows `customcolor`-suggestions.")},"editor.suggest.showFolders":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showFolders","When enabled IntelliSense shows `folder`-suggestions.")},"editor.suggest.showTypeParameters":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showTypeParameters","When enabled IntelliSense shows `typeParameter`-suggestions.")},"editor.suggest.showSnippets":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showSnippets","When enabled IntelliSense shows `snippet`-suggestions.")},"editor.suggest.showUsers":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showUsers","When enabled IntelliSense shows `user`-suggestions.")},"editor.suggest.showIssues":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showIssues","When enabled IntelliSense shows `issues`-suggestions.")}})}validate(t){if(!t||typeof t!="object")return this.defaultValue;const e=t;return{insertMode:jt(e.insertMode,this.defaultValue.insertMode,["insert","replace"]),filterGraceful:U(e.filterGraceful,this.defaultValue.filterGraceful),snippetsPreventQuickSuggestions:U(e.snippetsPreventQuickSuggestions,this.defaultValue.filterGraceful),localityBonus:U(e.localityBonus,this.defaultValue.localityBonus),shareSuggestSelections:U(e.shareSuggestSelections,this.defaultValue.shareSuggestSelections),showIcons:U(e.showIcons,this.defaultValue.showIcons),showStatusBar:U(e.showStatusBar,this.defaultValue.showStatusBar),preview:U(e.preview,this.defaultValue.preview),previewMode:jt(e.previewMode,this.defaultValue.previewMode,["prefix","subword","subwordSmart"]),showInlineDetails:U(e.showInlineDetails,this.defaultValue.showInlineDetails),showMethods:U(e.showMethods,this.defaultValue.showMethods),showFunctions:U(e.showFunctions,this.defaultValue.showFunctions),showConstructors:U(e.showConstructors,this.defaultValue.showConstructors),showDeprecated:U(e.showDeprecated,this.defaultValue.showDeprecated),showFields:U(e.showFields,this.defaultValue.showFields),showVariables:U(e.showVariables,this.defaultValue.showVariables),showClasses:U(e.showClasses,this.defaultValue.showClasses),showStructs:U(e.showStructs,this.defaultValue.showStructs),showInterfaces:U(e.showInterfaces,this.defaultValue.showInterfaces),showModules:U(e.showModules,this.defaultValue.showModules),showProperties:U(e.showProperties,this.defaultValue.showProperties),showEvents:U(e.showEvents,this.defaultValue.showEvents),showOperators:U(e.showOperators,this.defaultValue.showOperators),showUnits:U(e.showUnits,this.defaultValue.showUnits),showValues:U(e.showValues,this.defaultValue.showValues),showConstants:U(e.showConstants,this.defaultValue.showConstants),showEnums:U(e.showEnums,this.defaultValue.showEnums),showEnumMembers:U(e.showEnumMembers,this.defaultValue.showEnumMembers),showKeywords:U(e.showKeywords,this.defaultValue.showKeywords),showWords:U(e.showWords,this.defaultValue.showWords),showColors:U(e.showColors,this.defaultValue.showColors),showFiles:U(e.showFiles,this.defaultValue.showFiles),showReferences:U(e.showReferences,this.defaultValue.showReferences),showFolders:U(e.showFolders,this.defaultValue.showFolders),showTypeParameters:U(e.showTypeParameters,this.defaultValue.showTypeParameters),showSnippets:U(e.showSnippets,this.defaultValue.showSnippets),showUsers:U(e.showUsers,this.defaultValue.showUsers),showIssues:U(e.showIssues,this.defaultValue.showIssues)}}},VN=class extends nt{constructor(){super(102,"smartSelect",{selectLeadingAndTrailingWhitespace:!0},{"editor.smartSelect.selectLeadingAndTrailingWhitespace":{description:p("selectLeadingAndTrailingWhitespace","Whether leading and trailing whitespace should always be selected."),default:!0,type:"boolean"}})}validate(t){return!t||typeof t!="object"?this.defaultValue:{selectLeadingAndTrailingWhitespace:U(t.selectLeadingAndTrailingWhitespace,this.defaultValue.selectLeadingAndTrailingWhitespace)}}},WN=class extends Fa{constructor(){super(130)}compute(t,e,i){return e.get(81)?!0:t.tabFocusMode}};function HN(t){switch(t){case"none":return 0;case"same":return 1;case"indent":return 2;case"deepIndent":return 3}}var zN=class extends Fa{constructor(){super(132)}compute(t,e,i){const n=e.get(131);
vendor: 5,220 bytes, line 4
4return{isDominatedByLongLines:t.isDominatedByLongLines,isWordWrapMinified:n.isWordWrapMinified,isViewportWrapping:n.isViewportWrapping,wrappingColumn:n.wrappingColumn}}},UN="Consolas, 'Courier New', monospace",$N="Menlo, Monaco, 'Courier New', monospace",KN="'Droid Sans Mono', 'monospace', monospace",di={fontFamily:fe?$N:Bt?KN:UN,fontWeight:"normal",fontSize:fe?12:14,lineHeight:0,letterSpacing:0},$o=[];function F(t){return $o[t.id]=t,t}var co={acceptSuggestionOnCommitCharacter:F(new oe(0,"acceptSuggestionOnCommitCharacter",!0,{markdownDescription:p("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:F(new Xe(1,"acceptSuggestionOnEnter","on",["on","smart","off"],{markdownEnumDescriptions:["",p("acceptSuggestionOnEnterSmart","Only accept a suggestion with `Enter` when it makes a textual change."),""],markdownDescription:p("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:F(new dN),accessibilityPageSize:F(new Te(3,"accessibilityPageSize",10,1,1073741824,{description:p("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:F(new wi(4,"ariaLabel",p("editorViewAccessibleLabel","Editor content"))),autoClosingBrackets:F(new Xe(5,"autoClosingBrackets","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",p("editor.autoClosingBrackets.languageDefined","Use language configurations to determine when to autoclose brackets."),p("editor.autoClosingBrackets.beforeWhitespace","Autoclose brackets only when the cursor is to the left of whitespace."),""],description:p("autoClosingBrackets","Controls whether the editor should automatically close brackets after the user adds an opening bracket.")})),autoClosingDelete:F(new Xe(6,"autoClosingDelete","auto",["always","auto","never"],{enumDescriptions:["",p("editor.autoClosingDelete.auto","Remove adjacent closing quotes or brackets only if they were automatically inserted."),""],description:p("autoClosingDelete","Controls whether the editor should remove adjacent closing quotes or brackets when deleting.")})),autoClosingOvertype:F(new Xe(7,"autoClosingOvertype","auto",["always","auto","never"],{enumDescriptions:["",p("editor.autoClosingOvertype.auto","Type over closing quotes or brackets only if they were automatically inserted."),""],description:p("autoClosingOvertype","Controls whether the editor should type over closing quotes or brackets.")})),autoClosingQuotes:F(new Xe(8,"autoClosingQuotes","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",p("editor.autoClosingQuotes.languageDefined","Use language configurations to determine when to autoclose quotes."),p("editor.autoClosingQuotes.beforeWhitespace","Autoclose quotes only when the cursor is to the left of whitespace."),""],description:p("autoClosingQuotes","Controls whether the editor should automatically close quotes after the user adds an opening quote.")})),autoIndent:F(new el(9,"autoIndent",4,"full",["none","keep","brackets","advanced","full"],cN,{enumDescriptions:[p("editor.autoIndent.none","The editor will not insert indentation automatically."),p("editor.autoIndent.keep","The editor will keep the current line's indentation."),p("editor.autoIndent.brackets","The editor will keep the current line's indentation and honor language defined brackets."),p("editor.autoIndent.advanced","The editor will keep the current line's indentation, honor language defined brackets and invoke special onEnterRules defined by languages."),p("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:p("autoIndent","Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines.")})),automaticLayout:F(new oe(10,"automaticLayout",!1)),autoSurround:F(new Xe(11,"autoSurround","languageDefined",["languageDefined","quotes","brackets","never"],{enumDescriptions:[p("editor.autoSurround.languageDefined","Use language configurations to determine when to automatically surround selections."),p("editor.autoSurround.quotes","Surround with quotes but not brackets."),p("editor.autoSurround.brackets","Surround with brackets but not quotes."),""],description:p("autoSurround","Controls whether the editor should automatically surround selections when typing quotes or brackets.")})),bracketPairColorization:F(new PN),bracketPairGuides:F(new FN),stickyTabStops:F(new oe(104,"stickyTabStops",!1,{description:p("stickyTabStops","Emulate selection behavior of tab characters when using space
4s for indentation. Selection will stick to tab stops.")})),codeLens:F(new oe(14,"codeLens",!0,{description:p("codeLens","Controls whether the editor shows CodeLens.")})),codeLensFontFamily:F(new wi(15,"codeLensFontFamily","",{description:p("codeLensFontFamily","Controls the font family for CodeLens.")})),codeLensFontSize:F(new Te(16,"codeLensFontSize",0,0,100,{type:"number",default:0,minimum:0,maximum:100,markdownDescription:p("codeLensFontSize","Controls the font size in pixels for CodeLens. When set to `0`, 90% of `#editor.fontSize#` is used.")})),colorDecorators:F(new oe(17,"colorDecorators",!0,{description:p("colorDecorators","Controls whether the editor should render the inline color decorators and color picker.")})),columnSelection:F(new oe(18,"columnSelection",!1,{description:p("columnSelection","Enable that the selection with the mouse and keys is doing column selection.")})),comments:F(new uN),contextmenu:F(new oe(20,"contextmenu",!0)),copyWithSyntaxHighlighting:F(new oe(21,"copyWithSyntaxHighlighting",!0,{description:p("copyWithSyntaxHighlighting","Controls whether syntax highlighting should be copied into the clipboard.")})),cursorBlinking:F(new el(22,"cursorBlinking",1,"blink",["blink","smooth","phase","expand","solid"],fN,{description:p("cursorBlinking","Control the cursor animation style.")})),cursorSmoothCaretAnimation:F(new oe(23,"cursorSmoothCaretAnimation",!1,{description:p("cursorSmoothCaretAnimation","Controls whether the smooth caret animation should be enabled.")})),cursorStyle:F(new el(24,"cursorStyle",ht.Line,"line",["line","block","underline","line-thin","block-outline","underline-thin"],gN,{description:p("cursorStyle","Controls the cursor style.")})),cursorSurroundingLines:F(new Te(25,"cursorSurroundingLines",0,0,1073741824,{description:p("cursorSurroundingLines","Controls the minimal number of visible leading and trailing lines surrounding the cursor. Known as 'scrollOff' or 'scrollOffset' in some other editors.")})),cursorSurroundingLinesStyle:F(new Xe(26,"cursorSurroundingLinesStyle","default",["default","all"],{enumDescriptions:[p("cursorSurroundingLinesStyle.default","`cursorSurroundingLines` is enforced only when triggered via the keyboard or API."),p("cursorSurroundingLinesStyle.all","`cursorSurroundingLines` is enforced always.")],description:p("cursorSurroundingLinesStyle","Controls when `cursorSurroundingLines` should be enforced.")})),cursorWidth:F(new Te(27,"cursorWidth",0,0,1073741824,{markdownDescription:p("cursorWidth","Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.")})),disableLayerHinting:F(new oe(28,"disableLayerHinting",!1)),disableMonospaceOptimizations:F(new oe(29,"disableMonospaceOptimizations",!1)),domReadOnly:F(new oe(30,"domReadOnly",!1)),dragAndDrop:F(new oe(31,"dragAndDrop",!0,{description:p("dragAndDrop","Controls whether the editor should allow moving selections via drag and drop.")})),emptySelectionClipboard:F(new pN),extraEditorClassName:F(new wi(33,"extraEditorClassName","")),fastScrollSensitivity:F(new Us(34,"fastScrollSensitivity",5,t=>t<=0?5:t,{markdownDescription:p("fastScrollSensitivity","Scrolling speed multiplier when pressing `Alt`.")})),find:F(new _N),fixedOverflowWidgets:F(new oe(36,"fixedOverflowWidgets",!1)),folding:F(new oe(37,"folding",!0,{description:p("folding","Controls whether the editor has code folding enabled.")})),foldingStrategy:F(new Xe(38,"foldingStrategy","auto",["auto","indentation"],{enumDescriptions:[p("foldingStrategy.auto","Use a language-specific folding strategy if available, else the indentation-based one."),p("foldingStrategy.indentation","Use the indentation-based folding strategy.")],description:p("foldingStrategy","Controls the strategy for computing folding ranges.")})),foldingHighlight:F(new oe(39,"foldingHighlight",!0,{description:p("foldingHighlight","Controls whether the editor should highlight folded ranges.")})),foldingImportsByDefault:F(new oe(40,"foldingImportsByDefault",!1,{description:p("foldingImportsByDefault","Controls whether the editor automatically collapses import ranges.")})),foldingMaximumRegions:F(new Te(41,"foldingMaximumRegions",5e3,10,65e3,{description:p("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:F(new oe(42,"unfoldOnClickAfterEndOfLine",!1,{description:p("unfoldOnClickAfterEndOfLine","Controls whether clicking on the empty content after a folded line will unfold the line.")})),fontFamily:F(new wi(43,"fontFamily",di.fontFamily,{description:p("fontFamily","Controls the font family.")})),fontInfo:F(new vN),fontLigatures2:F(new ho),fontSize:F(new CN),fontWeight:F(new Hu),formatOnPaste:F(new oe(48,"formatOnPaste",!1,{description:p("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:F(new oe(49,"formatOnType",!1,{description:p("formatOnType","Controls whether the editor should automatically format the line after typing.")})),glyphMargin:F(new oe(50,"glyphMargin",!0,{description:p("glyphMargin","Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.")})),gotoLocation:F(new bN),hideCursorInOverviewRuler:F(new oe(52,"hideCursorInOverviewRuler",!1,{description:p("hideCursorInOverviewRuler","Controls whether the cursor should be hidden in the overview ruler.")})),hover:F(new wN),inDiffEditor:F(new oe(54,"inDiffEditor",!1)),letterSpacing:F(new Us(56,"letterSpacing",di.letterSpacing,t=>
vendor: 5,367 bytes, line 4
4Us.clamp(t,-5,20),{description:p("letterSpacing","Controls the letter spacing in pixels.")})),lightbulb:F(new SN),lineDecorationsWidth:F(new lo(58,"lineDecorationsWidth",10)),lineHeight:F(new LN),lineNumbers:F(new TN),lineNumbersMinChars:F(new Te(61,"lineNumbersMinChars",5,1,300)),linkedEditing:F(new oe(62,"linkedEditing",!1,{description:p("linkedEditing","Controls whether the editor has linked editing enabled. Depending on the language, related symbols, e.g. HTML tags, are updated while editing.")})),links:F(new oe(63,"links",!0,{description:p("links","Controls whether the editor should detect links and make them clickable.")})),matchBrackets:F(new Xe(64,"matchBrackets","always",["always","near","never"],{description:p("matchBrackets","Highlight matching brackets.")})),minimap:F(new kN),mouseStyle:F(new Xe(66,"mouseStyle","text",["text","default","copy"])),mouseWheelScrollSensitivity:F(new Us(67,"mouseWheelScrollSensitivity",1,t=>t===0?1:t,{markdownDescription:p("mouseWheelScrollSensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")})),mouseWheelZoom:F(new oe(68,"mouseWheelZoom",!1,{markdownDescription:p("mouseWheelZoom","Zoom the font of the editor when using mouse wheel and holding `Ctrl`.")})),multiCursorMergeOverlapping:F(new oe(69,"multiCursorMergeOverlapping",!0,{description:p("multiCursorMergeOverlapping","Merge multiple cursors when they are overlapping.")})),multiCursorModifier:F(new el(70,"multiCursorModifier","altKey","alt",["ctrlCmd","alt"],xN,{markdownEnumDescriptions:[p("multiCursorModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),p("multiCursorModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],markdownDescription:p({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. [Read more](https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier).")})),multiCursorPaste:F(new Xe(71,"multiCursorPaste","spread",["spread","full"],{markdownEnumDescriptions:[p("multiCursorPaste.spread","Each cursor pastes a single line of the text."),p("multiCursorPaste.full","Each cursor pastes the full text.")],markdownDescription:p("multiCursorPaste","Controls pasting when the line count of the pasted text matches the cursor count.")})),occurrencesHighlight:F(new oe(72,"occurrencesHighlight",!0,{description:p("occurrencesHighlight","Controls whether the editor should highlight semantic symbol occurrences.")})),overviewRulerBorder:F(new oe(73,"overviewRulerBorder",!0,{description:p("overviewRulerBorder","Controls whether a border should be drawn around the overview ruler.")})),overviewRulerLanes:F(new Te(74,"overviewRulerLanes",3,0,3)),padding:F(new IN),parameterHints:F(new EN),peekWidgetDefaultFocus:F(new Xe(77,"peekWidgetDefaultFocus","tree",["tree","editor"],{enumDescriptions:[p("peekWidgetDefaultFocus.tree","Focus the tree when opening peek"),p("peekWidgetDefaultFocus.editor","Focus the editor when opening peek")],description:p("peekWidgetDefaultFocus","Controls whether to focus the inline editor or the tree in the peek widget.")})),definitionLinkOpensInPeek:F(new oe(78,"definitionLinkOpensInPeek",!1,{description:p("definitionLinkOpensInPeek","Controls whether the Go to Definition mouse gesture always opens the peek widget.")})),quickSuggestions:F(new NN),quickSuggestionsDelay:F(new Te(80,"quickSuggestionsDelay",10,0,1073741824,{description:p("quickSuggestionsDelay","Controls the delay in milliseconds after which quick suggestions will show up.")})),readOnly:F(new oe(81,"readOnly",!1)),renameOnType:F(new oe(82,"renameOnType",!1,{description:p("renameOnType","Controls whether the editor auto renames on type."),markdownDeprecationMessage:p("renameOnTypeDeprecate","Deprecated, use `editor.linkedEditing` instead.")})),renderControlCharacters:F(new oe(83,"renderControlCharacters",!0,{description:p("renderControlCharacters","Controls whether the editor should render control characters."),restricted:!0})),renderFinalNewline:F(new oe(84,"renderFinalNewline",!0,{description:p("renderFinalNewline","Render last line number when the file ends with a newline.")})),renderLineHighlight:F(new Xe(85,"renderLineHighlight","line",["none","gutter","line","all"],{enumDescriptions:["","","",p("renderLineHighlight.all","Highlights both the gutter and the current line.")],description:p("renderLineHighlight","Controls how the editor should render the current line highlight.")})),renderLineHighlightOnlyWhenFocus:F(new oe(86,"renderLineHighlightOnlyWhenFocus",!1,{description:p("renderLineHighlightOnlyWhenFocus","Controls if the editor should render the current line highlight only when the editor is focused.")})),renderValidationDecorations:F(new Xe(87,"renderValidationDecorations","editable",["editable","on","off"])),renderWhitespace:F(new Xe(88,"renderWhitespace","selection",["none","boundary","selection","trailing","all"],{enumDescriptions:["",p("renderWhitespace.boundary","Render whitespace characters except for single space
4s between words."),p("renderWhitespace.selection","Render whitespace characters only on selected text."),p("renderWhitespace.trailing","Render only trailing whitespace characters."),""],description:p("renderWhitespace","Controls how the editor should render whitespace characters.")})),revealHorizontalRightPadding:F(new Te(89,"revealHorizontalRightPadding",30,0,1e3)),roundedSelection:F(new oe(90,"roundedSelection",!0,{description:p("roundedSelection","Controls whether selections should have rounded corners.")})),rulers:F(new MN),scrollbar:F(new RN),scrollBeyondLastColumn:F(new Te(93,"scrollBeyondLastColumn",5,0,1073741824,{description:p("scrollBeyondLastColumn","Controls the number of extra characters beyond which the editor will scroll horizontally.")})),scrollBeyondLastLine:F(new oe(94,"scrollBeyondLastLine",!0,{description:p("scrollBeyondLastLine","Controls whether the editor will scroll beyond the last line.")})),scrollPredominantAxis:F(new oe(95,"scrollPredominantAxis",!0,{description:p("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:F(new oe(96,"selectionClipboard",!0,{description:p("selectionClipboard","Controls whether the Linux primary clipboard should be supported."),included:Bt})),selectionHighlight:F(new oe(97,"selectionHighlight",!0,{description:p("selectionHighlight","Controls whether the editor should highlight matches similar to the selection.")})),selectOnLineNumbers:F(new oe(98,"selectOnLineNumbers",!0)),showFoldingControls:F(new Xe(99,"showFoldingControls","mouseover",["always","mouseover"],{enumDescriptions:[p("showFoldingControls.always","Always show the folding controls."),p("showFoldingControls.mouseover","Only show the folding controls when the mouse is over the gutter.")],description:p("showFoldingControls","Controls when the folding controls on the gutter are shown.")})),showUnused:F(new oe(100,"showUnused",!0,{description:p("showUnused","Controls fading out of unused code.")})),showDeprecated:F(new oe(126,"showDeprecated",!0,{description:p("showDeprecated","Controls strikethrough deprecated variables.")})),inlayHints:F(new yN),snippetSuggestions:F(new Xe(101,"snippetSuggestions","inline",["top","bottom","inline","none"],{enumDescriptions:[p("snippetSuggestions.top","Show snippet suggestions on top of other suggestions."),p("snippetSuggestions.bottom","Show snippet suggestions below other suggestions."),p("snippetSuggestions.inline","Show snippets suggestions with other suggestions."),p("snippetSuggestions.none","Do not show snippet suggestions.")],description:p("snippetSuggestions","Controls whether snippets are shown with other suggestions and how they are sorted.")})),smartSelect:F(new VN),smoothScrolling:F(new oe(103,"smoothScrolling",!1,{description:p("smoothScrolling","Controls whether the editor will scroll using an animation.")})),stopRenderingLineAfter:F(new Te(105,"stopRenderingLineAfter",1e4,-1,1073741824)),suggest:F(new BN),inlineSuggest:F(new ON),suggestFontSize:F(new Te(107,"suggestFontSize",0,0,1e3,{markdownDescription:p("suggestFontSize","Font size for the suggest widget. When set to `0`, the value of `#editor.fontSize#` is used.")})),suggestLineHeight:F(new Te(108,"suggestLineHeight",0,0,1e3,{markdownDescription:p("suggestLineHeight","Line height for the suggest widget. When set to `0`, the value of `#editor.lineHeight#` is used. The minimum value is 8.")})),suggestOnTriggerCharacters:F(new oe(109,"suggestOnTriggerCharacters",!0,{description:p("suggestOnTriggerCharacters","Controls whether suggestions should automatically show up when typing trigger characters.")})),suggestSelection:F(new Xe(110,"suggestSelection","first",["first","recentlyUsed","recentlyUsedByPrefix"],{markdownEnumDescriptions:[p("suggestSelection.first","Always select the first suggestion."),p("suggestSelection.recentlyUsed","Select recent suggestions unless further typing selects one, e.g. `console.| -> console.log` because `log` has been completed recently."),p("suggestSelection.recentlyUsedByPrefix","Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.")],description:p("suggestSelection","Controls how suggestions are pre-selected when showing the suggest list.")})),tabCompletion:F(new Xe(111,"tabCompletion","off",["on","off","onlySnippets"],{enumDescriptions:[p("tabCompletion.on","Tab complete will insert the best matching suggestion when pressing tab."),p("tabCompletion.off","Disable tab completions."),p("tabCompletion.onlySnippets","Tab complete snippets when their prefix match. Works best when 'quickSuggestions' aren't enabled.")],description:p("tabCompletion","Enables tab completions.")})),tabIndex:F(new Te(112,"tabIndex",0,-1,1073741824)),unicodeHighlight:F(new AN),unusualLineTerminators:F(new Xe(114,"unusualLineTerminators","prompt",["auto","off","prompt"],{enumDescriptions:[p("unusualLineTerminators.auto","Unusual line terminators are automatically removed."),p("unusualLineTerminators.off","Unusual line terminators are ignored."),p("unusualLineTerminators.prompt","Unusual line terminators prompt to be removed.")],description:p("unusualLineTerminators","Remove unusual line terminators that might cause problems.")})),useShadowDOM:F(new oe(115,"useShadowDOM",!0)),useTabStops:F(new oe(116,"useTabStops",!0,{description:p("useTabStops","Inserting and deleting whitespace follows tab stops.")})),wordSeparators:F(new wi(117,"wordSeparators",ly,{description:p("wordSeparators","Characters that will be used as word separators when doing word related navigations or operations.")})),wordWrap:F(new Xe(118,"wordWrap","off",["off","on","wordWrapColumn","boun
4ded"],{markdownEnumDescriptions:[p("wordWrap.off","Lines will never wrap."),p("wordWrap.on","Lines will wrap at the viewport width."),p({key:"wordWrap.wordWrapColumn",comment:["- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at `#editor.wordWrapColumn#`."),p({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:p({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:F(new wi(119,"wordWrapBreakAfterCharacters"," 	})]?|/&.,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー”〉》」』】〕)]}」")),wordWrapBreakBeforeCharacters:F(new wi(120,"wordWrapBreakBeforeCharacters","([{‘“〈《「『【〔([{「£¥$£¥++")),wordWrapColumn:F(new Te(121,"wordWrapColumn",80,1,1073741824,{markdownDescription:p({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:F(new Xe(122,"wordWrapOverride1","inherit",["off","on","inherit"])),wordWrapOverride2:F(new Xe(123,"wordWrapOverride2","inherit",["off","on","inherit"])),wrappingIndent:F(new el(124,"wrappingIndent",1,"same",["none","same","indent","deepIndent"],HN,{enumDescriptions:[p("wrappingIndent.none","No indentation. Wrapped lines begin at column 1."),p("wrappingIndent.same","Wrapped lines get the same indentation as the parent."),p("wrappingIndent.indent","Wrapped lines get +1 indentation toward the parent."),p("wrappingIndent.deepIndent","Wrapped lines get +2 indentation toward the parent.")],description:p("wrappingIndent","Controls the indentation of wrapped lines.")})),wrappingStrategy:F(new Xe(125,"wrappingStrategy","simple",["simple","advanced"],{enumDescriptions:[p("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."),p("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:p("wrappingStrategy","Controls the algorithm that computes wrapping points.")})),editorClassName:F(new mN),pixelRatio:F(new DN),tabFocusMode:F(new WN),layoutInfo:F(new Cy),wrappingInfo:F(new zN)},jN=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(t){setTimeout(()=>{throw t.stack?new Error(t.message+`
5
6`+t.stack):t},0)}}emit(t){this.listeners.forEach(e=>{e(t)})}onUnexpectedError(t){this.unexpectedErrorHandler(t),this.emit(t)}onUnexpectedExternalError(t){this.unexpectedErrorHandler(t)}},by=new jN;function We(t){kh(t)||by.onUnexpectedError(t)}function zu(t){kh(t)||by.onUnexpectedExternalError(t)}function $0(t){if(t instanceof Error){let{name:e,message:i}=t;return{$isError:!0,name:e,message:i,stack:t.stacktrace||t.stack}}return t}var Pd="Canceled";function kh(t){return t instanceof xh?!0:t instanceof Error&&t.name===Pd&&t.message===Pd}var xh=class extends Error{constructor(){super(Pd),this.name=this.message}};function qN(){const t=new Error(Pd);return t.name=t.message,t}function Q1(t){return t?new Error(`Illegal argument: ${t}`):new Error("Illegal argument")}function GN(t){return t?new Error(`Illegal state: ${t}`):new Error("Illegal state")}
6var ZN=class extends Error{constructor(t){super("NotSupported"),t&&(this.message=t)}};function Qr(t){const e=this;let i=!1,n;return function(){return i||(i=!0,n=t.apply(e,arguments)),n}}var he;(function(t){function e(v){return v&&typeof v=="object"&&typeof v[Symbol.iterator]=="function"}t.is=e;const i=Object.freeze([]);function n(){return i}t.empty=n;function*s(v){yield v}t.single=s;function r(v){return v||i}t.from=r;function o(v){return!v||v[Symbol.iterator]().next().done===!0}t.isEmpty=o;function a(v){return v[Symbol.iterator]().next().value}t.first=a;function l(v,b){for(const y of v)if(b(y))return!0;return!1}t.some=l;function h(v,b){for(const y of v)if(b(y))return y}t.find=h;function*c(v,b){for(const y of v)b(y)&&(yield y)}t.filter=c;function*d(v,b){let y=0;for(const k of v)yield b(k,y++)}t.map=d;function*u(...v){for(const b of v)for(const y of b)yield y}t.concat=u;function*g(v){for(const b of v)for(const y of b)yield y}t.concatNested=g;function m(v,b,y){let k=y;for(const S of v)k=b(k,S);return k}t.reduce=m;function*_(v,b,y=v.length){for(b<0&&(b+=v.length),y<0?y+=v.length:y>v.length&&(y=v.length);b<y;b++)yield v[b]}t.slice=_;function C(v,b=Number.POSITIVE_INFINITY){const y=[];if(b===0)return[y,v];const k=v[Symbol.iterator]();for(let S=0;S<b;S++){const L=k.next();if(L.done)return[y,t.empty()];
6y.push(L.value)}return[y,{[Symbol.iterator](){return k}}]}t.consume=C;function w(v,b,y=(k,S)=>k===S){const k=v[Symbol.iterator](),S=b[Symbol.iterator]();for(;;){const L=k.next(),x=S.next();if(L.done!==x.done)return!1;if(L.done)return!0;if(!y(L.value,x.value))return!1}}t.equals=w})(he||(he={}));var ui=null;function Ih(t){return ui?.trackDisposable(t),t}function Eh(t){ui?.markAsDisposed(t)}function Fd(t,e){ui?.setParent(t,e)}function YN(t,e){if(ui)for(const i of t)ui.setParent(i,e)}function XN(t){return ui?.markAsSingleton(t),t}var QN=class extends Error{constructor(t){super(`Encountered errors while disposing of store. Errors: [${t.join(", ")}]`),this.errors=t}};function JN(t){return typeof t.dispose=="function"&&t.dispose.length===0}function De(t){if(he.is(t)){let e=[];for(const i of t)if(i)try{i.dispose()}catch(n){e.push(n)}if(e.length===1)throw e[0];if(e.length>1)throw new QN(e);return Array.isArray(t)?[]:t}else if(t)return t.dispose(),t}function Ur(...t){const e=Ae(()=>De(t));return YN(t,e),e}function Ae(t){const e=Ih({dispose:Qr(()=>{Eh(e),t()})});return e}var ne=class wy{constructor(){this._toDispose=new Set,this._isDisposed=!1,Ih(this)}dispose(){this._isDisposed||(Eh(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){try{De(this._toDispose.values())}finally{this._toDispose.clear()}}add(e){if(!e)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return Fd(e,this),this._isDisposed?wy.DISABLE_DISPOSED_WARNING:this._toDispose.add(e),e}};ne.DISABLE_DISPOSED_WARNING=!1;var V=class{constructor(){this._store=new ne,Ih(this),Fd(this._store,this)}dispose(){Eh(this),this._store.dispose()}_register(t){if(t===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(t)}};V.None=Object.freeze({dispose(){}});var Sy=class{constructor(){this._isDisposed=!1,Ih(this)}get value(){return this._isDisposed?void 0:this._value}set value(t){var e;this._isDisposed||t===this._value||((e=this._value)===null||e===void 0||e.dispose(),t&&Fd(t,this),this._value=t)}clear(){this.value=void 0}dispose(){var t;this._isDisposed=!0,Eh(this),(t=this._value)===null||t===void 0||t.dispose(),this._value=void 0}clearAndLeak(){const t=this._value;return this._value=void 0,t&&Fd(t,null),t}},e4=class{constructor(){this.dispose=()=>{},this.unset=()=>{},this.isset=()=>!1,Ih(this)}set(t){let e=t;return this.unset=()=>e=void 0,this.isset=()=>e!==void 0,this.dispose=()=>{e&&(e(),e=void 0,Eh(this))},this}},t4=class{constructor(t){this.object=t}dispose(){}},qe=class Yg{constructor(e){this.element=e,this.next=Yg.Undefined,this.prev=Yg.Undefined}};qe.Undefined=new qe(void 0);var Ki=class{constructor(){this._first=qe.Undefined,this._last=qe.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===qe.Undefined}clear(){let t=this._first;for(;t!==qe.Undefined;){const e=t.next;t.prev=qe.Undefined,t.next=qe.Undefined,t=e}this._first=qe.Undefined,this._last=qe.Undefined,this._size=0}unshift(t){return this._insert(t,!1)}push(t){return this._insert(t,!0)}_insert(t,e){const i=new qe(t);if(this._first===qe.Undefined)this._first=i,this._last=i;else if(e){const s=this._last;this._last=i,i.prev=s,s.next=i}else{const s=this._first;this._first=i,i.next=s,s.prev=i}this._size+=1;let n=!1;return()=>{n||(n=!0,this._remove(i))}}shift(){if(this._first!==qe.Undefined){const t=this._first.element;return this._remove(this._first),t}}pop(){if(this._last!==qe.Undefined){const t=this._last.element;return this._remove(this._last),t}}_remove(t){if(t.prev!==qe.Undefined&&t.next!==qe.Undefined){const e=t.prev;e.next=t.next,t.next.prev=e}else t.prev===qe.Undefined&&t.next===qe.Undefined?(this._first=qe.Undefined,this._last=qe.Undefined):t.next===qe.Undefined?(this._last=this._last.prev,this._last.next=qe.Undefined):t.prev===qe.Undefined&&(this._first=this._first.next,this._first.prev=qe.Undefined);this._size-=1}*[Symbol.iterator](){let t=this._first;for(;t!==qe.Undefined;)yield t.element,t=t.next}},i4=Ve.performance&&typeof Ve.performance.now=="function",Dh=class yy{constructor(e){this._highResolution=i4&&e,this._startTime=this._now(),this._stopTime=-1}static create(e=!0){return new yy(e)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?Ve.performance.now():Date.now()}},$;(function(t){t.None=()=>V.None;function e(y){return(k,S=null,L)=>{let x=!1,E;return E=y(R=>
6{if(!x)return E?E.dispose():x=!0,k.call(S,R)},null,L),x&&E.dispose(),E}}t.once=e;function i(y,k,S){return l((L,x=null,E)=>y(R=>L.call(x,k(R)),null,E),S)}t.map=i;function n(y,k,S){return l((L,x=null,E)=>y(R=>{k(R),L.call(x,R)},null,E),S)}t.forEach=n;function s(y,k,S){return l((L,x=null,E)=>y(R=>k(R)&&L.call(x,R),null,E),S)}t.filter=s;function r(y){return y}t.signal=r;function o(...y){return(k,S=null,L)=>Ur(...y.map(x=>x(E=>k.call(S,E),null,L)))}t.any=o;function a(y,k,S,L){let x=S;return i(y,E=>(x=k(x,E),x),L)}t.reduce=a;function l(y,k){let S;const L={onFirstListenerAdd(){S=y(x.fire,x)},onLastListenerRemove(){S.dispose()}},x=new M(L);return k&&k.add(x),x.event}function h(y,k,S=100,L=!1,x,E){let R,D,W,P=0;const K={leakWarningThreshold:x,onFirstListenerAdd(){R=y(ie=>{P++,D=k(D,ie),L&&!W&&(j.fire(D),D=void 0),clearTimeout(W),W=setTimeout(()=>{const J=D;D=void 0,W=void 0,(!L||P>1)&&j.fire(J),P=0},S)})},onLastListenerRemove(){R.dispose()}},j=new M(K);return E&&E.add(j),j.event}t.debounce=h;function c(y,k=(L,x)=>L===x,S){let L=!0,x;return s(y,E=>{const R=L||!k(E,x);return L=!1,x=E,R},S)}t.latch=c;function d(y,k,S){return[t.filter(y,k,S),t.filter(y,L=>!k(L),S)]}t.split=d;function u(y,k=!1,S=[]){let L=S.slice(),x=y(D=>{L?L.push(D):R.fire(D)});const E=()=>{L&&L.forEach(D=>R.fire(D)),L=null},R=new M({onFirstListenerAdd(){x||(x=y(D=>R.fire(D)))},onFirstListenerDidAdd(){L&&(k?setTimeout(E):E())},onLastListenerRemove(){x&&x.dispose(),x=null}});return R.event}t.buffer=u;class g{constructor(k){this.event=k}map(k){return new g(i(this.event,k))}forEach(k){return new g(n(this.event,k))}filter(k){return new g(s(this.event,k))}reduce(k,S){return new g(a(this.event,k,S))}latch(){return new g(c(this.event))}debounce(k,S=100,L=!1,x){return new g(h(this.event,k,S,L,x))}on(k,S,L){return this.event(k,S,L)}once(k,S,L){return e(this.event)(k,S,L)}}function m(y){return new g(y)}t.chain=m;function _(y,k,S=L=>L){const L=(...D)=>R.fire(S(...D)),x=()=>y.on(k,L),E=()=>y.removeListener(k,L),R=new M({onFirstListenerAdd:x,onLastListenerRemove:E});return R.event}t.fromNodeEventEmitter=_;function C(y,k,S=L=>L){const L=(...D)=>R.fire(S(...D)),x=()=>y.addEventListener(k,L),E=()=>y.removeEventListener(k,L),R=new M({onFirstListenerAdd:x,onLastListenerRemove:E});return R.event}t.fromDOMEventEmitter=C;function w(y){return new Promise(k=>e(y)(k))}t.toPromise=w;function v(y,k){return k(void 0),y(S=>k(S))}t.runAndSubscribe=v;function b(y,k){let S=null;function L(E){S?.dispose(),S=new ne,k(E,S)}L(void 0);const x=y(E=>L(E));return Ae(()=>{x.dispose(),S?.dispose()})}t.runAndSubscribeWithStore=b})($||($={}));var Ly=class ky{constructor(e){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${e}_${ky._idPool++}`}start(e){this._stopWatch=new Dh(!0),this._listenerCount=e}stop(){if(this._stopWatch){const e=this._stopWatch.elapsed();this._elapsedOverall+=e,this._invocationCount+=1,this._stopWatch=void 0}}};Ly._idPool=0;var n4=class xy{constructor(e){this.value=e}static create(){var e;return new xy((e=new Error().stack)!==null&&e!==void 0?e:"")}print(){}},s4=class{constructor(t,e,i){this.callback=t,this.callbackThis=e,this.stack=i,this.subscription=new e4}invoke(t){this.callback.call(this.callbackThis,t)}},M=class{constructor(t){var e;this._disposed=!1,this._options=t,this._leakageMon=void 0,this._perfMon=!((e=this._options)===null||e===void 0)&&e._profName?new Ly(this._options._profName):void 0}dispose(){var t,e,i,n;this._disposed||(this._disposed=!0,this._listeners&&this._listeners.clear(),(t=this._deliveryQueue)===null||t===void 0||t.clear(),(i=(e=this._options)===null||e===void 0?void 0:e.onLastListenerRemove)===null||i===void 0||i.call(e),(n=this._leakageMon)===null||n===void 0||n.dispose())}get event(){return this._event||(this._event=(t,e,i)=>{var n,s,r;this._listeners||(this._listeners=new Ki);const o=this._listeners.isEmpty();o&&(!((n=this._options)===null||n===void 0)&&n.onFirstListenerAdd)&&this._options.onFirstListenerAdd(this);let a,l;this._leakageMon&&this._listeners.size>=30&&(l=n4.create(),a=this._leakageMon.check(l,this._listeners.size+1));const h=new s4(t,e,l),c=this._listeners.push(h);o&&(!((s=this._options)===null||s===void 0)&&s.onFirstListenerDidAdd)&&this._options.onFirstListenerDidAdd(this),!((r=this._options)===null||r===void 0)&&r.onListenerDidAdd&&this._options.onListenerDidAdd(this,t,e);const d=h.subscription.set(()=>{a&&a(),this._disposed||(c(),this._options&&this._options.onLastListenerRemove&&(this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this)))});return i instanceof ne?i.add(d):Array.isArray(i)&&i.push(d),d}),this._event}fire(t){var e,i;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new Ki);for(let n of this._listeners)this._deliveryQueue.push([n,t]);for((e=this._perfMon)===null||e===void 0||e.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[n,s]=this._deliveryQueue.shift();try{n.invoke(s)}catch(r){We(r)}}(i=this._perfMon)===null||i===void 0||i.stop()}}},Bd=class extends M{constructor(t){super(t),this._isPaused=0,this._eventQueue=new Ki,this._mergeFn=t?.merge}
6pause(){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))}},r4=class extends Bd{constructor(t){var e;super(t),this._delay=(e=t.delay)!==null&&e!==void 0?e:100}fire(t){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(t)}},J1=class{constructor(){this.buffers=[]}wrapEvent(t){return(e,i,n)=>t(s=>{const r=this.buffers[this.buffers.length-1];r?r.push(()=>e.call(i,s)):e.call(i,s)},void 0,n)}bufferEvents(t){const e=[];this.buffers.push(e);const i=t();return this.buffers.pop(),e.forEach(n=>n()),i}},K0=class{constructor(){this.listening=!1,this.inputEvent=$.None,this.inputEventListener=V.None,this.emitter=new M({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()}},Iy=Object.freeze(function(t,e){const i=setTimeout(t.bind(e),0);return{dispose(){clearTimeout(i)}}}),ti;(function(t){function e(i){return i===t.None||i===t.Cancelled||i instanceof Kc?!0:!i||typeof i!="object"?!1:typeof i.isCancellationRequested=="boolean"&&typeof i.onCancellationRequested=="function"}t.isCancellationToken=e,t.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:$.None}),t.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:Iy})})(ti||(ti={}));var Kc=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?Iy:(this._emitter||(this._emitter=new M),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}},Ba=class{constructor(t){this._token=void 0,this._parentListener=void 0,this._parentListener=t&&t.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new Kc),this._token}cancel(){this._token?this._token instanceof Kc&&this._token.cancel():this._token=ti.Cancelled}dispose(t=!1){t&&this.cancel(),this._parentListener&&this._parentListener.dispose(),this._token?this._token instanceof Kc&&this._token.dispose():this._token=ti.None}},ev=class{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(t,e){this._keyCodeToStr[t]=e,this._strToKeyCode[e.toLowerCase()]=t}keyCodeToStr(t){return this._keyCodeToStr[t]}strToKeyCode(t){return this._strToKeyCode[t.toLowerCase()]||0}},jc=new ev,Xg=new ev,Qg=new ev,Ey=new Array(230),o4={},a4=[],l4=Object.create(null),h4=Object.create(null),tv=[],Jg=[];for(let t=0;t<=193;t++)tv[t]=-1;for(let t=0;t<=127;t++)Jg[t]=-1;(function(){const e=[[0,1,0,"None",0,"unknown",0,"VK_UNKNOWN","",""],[0,1,1,"Hyper",0,"",0,"","",""],[0,1,2,"Super",0,"",0,"","",""],[0,1,3,"Fn",0,"",0,"","",""],[0,1,4,"FnLock",0,"",0,"","",""],[0,1,5,"Suspend",0,"",0,"","",""],[0,1,6,"Resume",0,"",0,"","",""],[0,1,7,"Turbo",0,"",0,"","",""],[0,1,8,"Sleep",0,"",0,"VK_SLEEP","",""],[0,1,9,"WakeUp",0,"",0,"","",""],[31,0,10,"KeyA",31,"A",65,"VK_A","",""],[32,0,11,"KeyB",32,"B",66,"VK_B","",""],[33,0,12,"KeyC",33,"C",67,"VK_C","",""],[34,0,13,"KeyD",34,"D",68,"VK_D","",""],[35,0,14,"KeyE",35,"E",69,"VK_E","",""],[36,0,15,"KeyF",36,"F",70,"VK_F","",""],[37,0,16,"KeyG",37,"G",71,"VK_G","",""],[38,0,17,"KeyH",38,"H",72,"VK_H","",""],[39,0,18,"KeyI",39,"I",73,"VK_I","",""],[40,0,19,"KeyJ",40,"J",74,"VK_J","",""],[41,0,20,"KeyK",41,"K",75,"VK_K","",""],[42,0,21,"KeyL",42,"L",76,"VK_L","",""],[43,0,22,"KeyM",43,"M",77,"VK_M","",""],[44,0,23,"KeyN",44,"N",78,"VK_N","",""],[45,0,24,"KeyO",45,"O",79,"VK_O","",""],[46,0,25,"KeyP",46,"P",80,"VK_P","",""],[47,0,26,"KeyQ",47,"Q",81,"VK_Q","",""],[48,0,27,"KeyR",48,"R",82,"VK_R","",""],[49,0,28,"KeyS",49,"S",83,"VK_S","",""],[50,0,29,"KeyT",50,"T",84,"VK_T","",""],[51,
60,30,"KeyU",51,"U",85,"VK_U","",""],[52,0,31,"KeyV",52,"V",86,"VK_V","",""],[53,0,32,"KeyW",53,"W",87,"VK_W","",""],[54,0,33,"KeyX",54,"X",88,"VK_X","",""],[55,0,34,"KeyY",55,"Y",89,"VK_Y","",""],[56,0,35,"KeyZ",56,"Z",90,"VK_Z","",""],[22,0,36,"Digit1",22,"1",49,"VK_1","",""],[23,0,37,"Digit2",23,"2",50,"VK_2","",""],[24,0,38,"Digit3",24,"3",51,"VK_3","",""],[25,0,39,"Digit4",25,"4",52,"VK_4","",""],[26,0,40,"Digit5",26,"5",53,"VK_5","",""],[27,0,41,"Digit6",27,"6",54,"VK_6","",""],[28,0,42,"Digit7",28,"7",55,"VK_7","",""],[29,0,43,"Digit8",29,"8",56,"VK_8","",""],[30,0,44,"Digit9",30,"9",57,"VK_9","",""],[21,0,45,"Digit0",21,"0",48,"VK_0","",""],[3,1,46,"Enter",3,"Enter",13,"VK_RETURN","",""],[9,1,47,"Escape",9,"Escape",27,"VK_ESCAPE","",""],[1,1,48,"Backspace",1,"Backspace",8,"VK_BACK","",""],[2,1,49,"Tab",2,"Tab",9,"VK_TAB","",""],[10,1,50,"Space",10,"Space",32,"VK_SPACE","",""],[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,"",0,"","",""],[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","",""],[59,1,64,"F1",59,"F1",112,"VK_F1","",""],[60,1,65,"F2",60,"F2",113,"VK_F2","",""],[61,1,66,"F3",61,"F3",114,"VK_F3","",""],[62,1,67,"F4",62,"F4",115,"VK_F4","",""],[63,1,68,"F5",63,"F5",116,"VK_F5","",""],[64,1,69,"F6",64,"F6",117,"VK_F6","",""],[65,1,70,"F7",65,"F7",118,"VK_F7","",""],[66,1,71,"F8",66,"F8",119,"VK_F8","",""],[67,1,72,"F9",67,"F9",120,"VK_F9","",""],[68,1,73,"F10",68,"F10",121,"VK_F10","",""],[69,1,74,"F11",69,"F11",122,"VK_F11","",""],[70,1,75,"F12",70,"F12",123,"VK_F12","",""],[0,1,76,"PrintScreen",0,"",0,"","",""],[79,1,77,"ScrollLock",79,"ScrollLock",145,"VK_SCROLL","",""],[7,1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE","",""],[19,1,79,"Insert",19,"Insert",45,"VK_INSERT","",""],[14,1,80,"Home",14,"Home",36,"VK_HOME","",""],[11,1,81,"PageUp",11,"PageUp",33,"VK_PRIOR","",""],[20,1,82,"Delete",20,"Delete",46,"VK_DELETE","",""],[13,1,83,"End",13,"End",35,"VK_END","",""],[12,1,84,"PageDown",12,"PageDown",34,"VK_NEXT","",""],[17,1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",""],[15,1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",""],[18,1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",""],[16,1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",""],[78,1,89,"NumLock",78,"NumLock",144,"VK_NUMLOCK","",""],[108,1,90,"NumpadDivide",108,"NumPad_Divide",111,"VK_DIVIDE","",""],[103,1,91,"NumpadMultiply",103,"NumPad_Multiply",106,"VK_MULTIPLY","",""],[106,1,92,"NumpadSubtract",106,"NumPad_Subtract",109,"VK_SUBTRACT","",""],[104,1,93,"NumpadAdd",104,"NumPad_Add",107,"VK_ADD","",""],[3,1,94,"NumpadEnter",3,"",0,"","",""],[94,1,95,"Numpad1",94,"NumPad1",97,"VK_NUMPAD1","",""],[95,1,96,"Numpad2",95,"NumPad2",98,"VK_NUMPAD2","",""],[96,1,97,"Numpad3",96,"NumPad3",99,"VK_NUMPAD3","",""],[97,1,98,"Numpad4",97,"NumPad4",100,"VK_NUMPAD4","",""],[98,1,99,"Numpad5",98,"NumPad5",101,"VK_NUMPAD5","",""],[99,1,100,"Numpad6",99,"NumPad6",102,"VK_NUMPAD6","",""],[100,1,101,"Numpad7",100,"NumPad7",103,"VK_NUMPAD7","",""],[101,1,102,"Numpad8",101,"NumPad8",104,"VK_NUMPAD8","",""],[102,1,103,"Numpad9",102,"NumPad9",105,"VK_NUMPAD9","",""],[93,1,104,"Numpad0",93,"NumPad0",96,"VK_NUMPAD0","",""],[107,1,105,"NumpadDecimal",107,"NumPad_Decimal",110,"VK_DECIMAL","",""],[92,0,106,"IntlBackslash",92,"OEM_102",226,"VK_OEM_102","",""],[58,1,107,"ContextMenu",58,"ContextMenu",93,"","",""],[0,1,108,"Power",0,"",0,"","",""],[0,1,109,"NumpadEqual",0,"",0,"","",""],[71,1,110,"F13",71,"F13",124,"VK_F13","",""],[72,1,111,"F14",72,"F14",125,"VK_F14","",""],[73,1,112,"F15",73,"F15",126,"VK_F15","",""],[74,1,113,"F16",74,"F16",127,"VK_F16","",""],[75,1,114,"F17",75,"F17",128,"VK_F17","",""],[76,1,115,"F18",76,"F18",129,"VK_F18","",""],[77,1,116,"F19",77,"F19",130,"VK_F19","",""],[0,1,117,"F20",0,"",0,"VK_F20","",""],[0,1,118,"F21",0,"",0,"VK_F21","",""],[0,1,119,"F22",0,"",0,"VK_F22","",""],[0,1,120,"F23",0,"",0,"VK_F23","",""],[0,1,121,"F24",0,"",0,"VK_F24","",""],[0,1,122,"Open",0,"",0,"","",""],[0,1,123,"Help",0,"",0,"","",""],[0,1,124,"Select",0,"",0,"","",""],[0,1,125,"Again",0,"",0,"","",""],[0,1,126,"Undo",0,"",0,"","",""],[0,1,127,"Cut",0,"",0,"","",""],[0,1,128,"Copy",0,"",0,"","",""],[0,1,129,"Paste",0,"",0,"","",""],[0,1,130,"Find",0,"",0,"","",""],[0,1,131,"AudioVolumeMute",112,"AudioVolumeMute",173,"VK_VOLUME_MUTE","",""],[0,1,132,"AudioVolumeUp",113,"AudioVolumeUp",175,"VK_VOLUME_UP","",""],[0,1,133,"AudioVolumeDown",114,"AudioVolumeDown",174,"VK_VOLUME_DOWN","",""],[105,1,134,"NumpadComma",105,"NumPad_Separator",108,"VK_SEPARATOR","",""],[110,0,135,"IntlRo",110,"ABNT_C1",193,"VK_ABNT_C1","",""],[0,1,136,"KanaMode",0,"",0,"","",""],[0,0,137,"IntlYen",0,"",0,"","",""],[0,1,138,"Convert",0,"",0,"","",""],[0,1,139,"NonConvert",0,"",0,"","",""],[0,1,140,"Lang1",0,"",0,"","",""],[0,1,141,"Lang2",0,"",0,"","",""],[0,1,142,"Lang3",0,"",0,"","",""],[0,1,143,"Lang4",0,"",0,"","",""],[0,1,144,"Lang5",0,"",0,"","",""],[0,1,145,"Abort",0,"",0,"","",""],[0,1,146,"Props",0,"",0,"","",""],[0,1,147,"NumpadParenLeft",0,"",0,"","",""],[0,1,148,"NumpadParenRight",0,"",0,"","",""],[0,1,149,"NumpadBackspace",0,"",0,"","",""],[0,1,150,"NumpadMemoryStore",0,"",0,"","",""],[0,1,151,"NumpadMemoryRecall",0,"",0,"","",""],[0,1,152,"NumpadMemoryClear",0,"",0,"","",""],[0,1,153,"NumpadMemoryAdd",0,"",0,"","",""],[0,1,154,"NumpadMemorySubtract",0,"",0,"","",""],[0,1,155,"NumpadClear",126,"Clear",12,"VK_CLEAR","",""],[0,1,156,"NumpadClearEntry",0,"",0,"","",""],[5,1,0,"",5,"Ctrl",17,"VK_CONTROL","",""],[4,1,0,"",4,"Shift",16,"VK_SHIFT","",""],[6,1,0,"",6,"Alt",18,"VK_MENU","",""],[57,1,0,"",57,"Meta",0,"VK_COMMAND","",""],[5,1,157,"ControlLeft",5,"",0,"VK_LCONTROL","",""],[4,1,158,"ShiftLeft",4,"",0,"VK_LSHIFT","",""],[6,1,159,"AltLeft",6,"",0,"VK_LMENU","",""],[57,1,160,"MetaLeft",57,"",0,"VK_LWIN","",""],[5,1,161,"ControlRight",5,"",0,"VK_RCONTROL","",""],[4,1,162,"ShiftRight",4,"",0,"VK_RSHIFT","",""],[6,1,163,"AltRight",6,"",0,"VK_RMENU","",""],[57,1,164,"MetaRight",57,"",0,"VK_RWIN","",""],[0,1,165,"BrightnessUp",0,"",0,"","",""],[0,1,166,"BrightnessDown",0,"",0,"","",""],[0,1,167,"MediaPlay",0,"",0,"","",""],[0,1,168,"MediaRecord",0,"",0,"","",""],[0,1,169,"MediaFastForward",0,"",0,"","",""],[0,1,170,"MediaRewind",0,"",0,"","",""],[114,1,171,"MediaTrackNext",119,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK","",""],[115,1,172,"MediaTrackPrevious",120,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK","",""],[116,1,173,"MediaStop",121,"MediaStop",178,"VK_MEDIA_STOP","",""],[0,1,174,"Eject",0,"",0,"","",""],[117,1,175,"MediaPlayPause",122,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE","",""],[0,1,176,"MediaSelect",123,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT","",""],[0,1,177,"LaunchMail",124,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL","",""],[0,1,178,"LaunchApp2",125,"Launc
6hApp2",183,"VK_MEDIA_LAUNCH_APP2","",""],[0,1,179,"LaunchApp1",0,"",0,"VK_MEDIA_LAUNCH_APP1","",""],[0,1,180,"SelectTask",0,"",0,"","",""],[0,1,181,"LaunchScreenSaver",0,"",0,"","",""],[0,1,182,"BrowserSearch",115,"BrowserSearch",170,"VK_BROWSER_SEARCH","",""],[0,1,183,"BrowserHome",116,"BrowserHome",172,"VK_BROWSER_HOME","",""],[112,1,184,"BrowserBack",117,"BrowserBack",166,"VK_BROWSER_BACK","",""],[113,1,185,"BrowserForward",118,"BrowserForward",167,"VK_BROWSER_FORWARD","",""],[0,1,186,"BrowserStop",0,"",0,"VK_BROWSER_STOP","",""],[0,1,187,"BrowserRefresh",0,"",0,"VK_BROWSER_REFRESH","",""],[0,1,188,"BrowserFavorites",0,"",0,"VK_BROWSER_FAVORITES","",""],[0,1,189,"ZoomToggle",0,"",0,"","",""],[0,1,190,"MailReply",0,"",0,"","",""],[0,1,191,"MailForward",0,"",0,"","",""],[0,1,192,"MailSend",0,"",0,"","",""],[109,1,0,"",109,"KeyInComposition",229,"","",""],[111,1,0,"",111,"ABNT_C2",194,"VK_ABNT_C2","",""],[91,1,0,"",91,"OEM_8",223,"VK_OEM_8","",""],[0,1,0,"",0,"",0,"VK_KANA","",""],[0,1,0,"",0,"",0,"VK_HANGUL","",""],[0,1,0,"",0,"",0,"VK_JUNJA","",""],[0,1,0,"",0,"",0,"VK_FINAL","",""],[0,1,0,"",0,"",0,"VK_HANJA","",""],[0,1,0,"",0,"",0,"VK_KANJI","",""],[0,1,0,"",0,"",0,"VK_CONVERT","",""],[0,1,0,"",0,"",0,"VK_NONCONVERT","",""],[0,1,0,"",0,"",0,"VK_ACCEPT","",""],[0,1,0,"",0,"",0,"VK_MODECHANGE","",""],[0,1,0,"",0,"",0,"VK_SELECT","",""],[0,1,0,"",0,"",0,"VK_PRINT","",""],[0,1,0,"",0,"",0,"VK_EXECUTE","",""],[0,1,0,"",0,"",0,"VK_SNAPSHOT","",""],[0,1,0,"",0,"",0,"VK_HELP","",""],[0,1,0,"",0,"",0,"VK_APPS","",""],[0,1,0,"",0,"",0,"VK_PROCESSKEY","",""],[0,1,0,"",0,"",0,"VK_PACKET","",""],[0,1,0,"",0,"",0,"VK_DBE_SBCSCHAR","",""],[0,1,0,"",0,"",0,"VK_DBE_DBCSCHAR","",""],[0,1,0,"",0,"",0,"VK_ATTN","",""],[0,1,0,"",0,"",0,"VK_CRSEL","",""],[0,1,0,"",0,"",0,"VK_EXSEL","",""],[0,1,0,"",0,"",0,"VK_EREOF","",""],[0,1,0,"",0,"",0,"VK_PLAY","",""],[0,1,0,"",0,"",0,"VK_ZOOM","",""],[0,1,0,"",0,"",0,"VK_NONAME","",""],[0,1,0,"",0,"",0,"VK_PA1","",""],[0,1,0,"",0,"",0,"VK_OEM_CLEAR","",""]];let i=[],n=[];for(const s of e){const[r,o,a,l,h,c,d,u,g,m]=s;if(n[a]||(n[a]=!0,a4[a]=l,l4[l]=a,h4[l.toLowerCase()]=a,o&&(tv[a]=h,h!==0&&h!==3&&h!==5&&h!==4&&h!==6&&h!==57&&(Jg[h]=a))),!i[h]){if(i[h]=!0,!c)throw new Error(`String representation missing for key code ${h} around scan code ${l}`);jc.define(h,c),Xg.define(h,g||c),Qg.define(h,m||g||c)}d&&(Ey[d]=h),u&&(o4[u]=h)}Jg[3]=46})();var Vr;(function(t){function e(a){return jc.keyCodeToStr(a)}t.toString=e;function i(a){return jc.strToKeyCode(a)}t.fromString=i;function n(a){return Xg.keyCodeToStr(a)}t.toUserSettingsUS=n;function s(a){return Qg.keyCodeToStr(a)}t.toUserSettingsGeneral=s;function r(a){return Xg.strToKeyCode(a)||Qg.strToKeyCode(a)}t.fromUserSettings=r;function o(a){if(a>=93&&a<=108)return null;switch(a){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return jc.keyCodeToStr(a)}t.toElectronAccelerator=o})(Vr||(Vr={}));function c4(t,e){return(t|(e&65535)<<16>>>0)>>>0}var na;if(typeof Ve.vscode<"u"&&typeof Ve.vscode.process<"u"){const t=Ve.vscode.process;na={get platform(){return t.platform},get arch(){return t.arch},get env(){return t.env},cwd(){return t.cwd()}}}else typeof process<"u"?na={get platform(){return process.platform},get arch(){return process.arch},get env(){return{}},cwd(){return{}.VSCODE_CWD||process.cwd()}}:na={get platform(){return ei?"win32":fe?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};var em=na.cwd,d4=na.env,uo=na.platform,u4=65,f4=97,g4=90,m4=122,Ks=46,It=47,ri=92,Ls=58,p4=63,Dy=class extends Error{constructor(t,e,i){let n;typeof e=="string"&&e.indexOf("not ")===0?(n="must not be",e=e.replace(/^not /,"")):n="must be";let s=`The "${t}" ${t.indexOf(".")!==-1?"property":"argument"} ${n} of type ${e}`;s+=`. Received type ${typeof i}`,super(s),this.code="ERR_INVALID_ARG_TYPE"}};function ot(t,e){if(typeof t!="string")throw new Dy(e,"string",t)}function ue(t){return t===It||t===ri}function tm(t){return t===It}function ks(t){return t>=u4&&t<=g4||t>=f4&&t<=m4}function Vd(t,e,i,n){let s="",r=0,o=-1,a=0,l=0;for(let h=0;h<=t.length;++h){if(h<t.length)l=t.charCodeAt(h);else{if(n(l))break;l=It}
vendor: 22,585 bytes, line 6
6if(n(l)){if(!(o===h-1||a===1))if(a===2){if(s.length<2||r!==2||s.charCodeAt(s.length-1)!==Ks||s.charCodeAt(s.length-2)!==Ks){if(s.length>2){const c=s.lastIndexOf(i);c===-1?(s="",r=0):(s=s.slice(0,c),r=s.length-1-s.lastIndexOf(i)),o=h,a=0;continue}else if(s.length!==0){s="",r=0,o=h,a=0;continue}}e&&(s+=s.length>0?`${i}..`:"..",r=2)}else s.length>0?s+=`${i}${t.slice(o+1,h)}`:s=t.slice(o+1,h),r=h-o-1;o=h,a=0}else l===Ks&&a!==-1?++a:a=-1}return s}function Ny(t,e){if(e===null||typeof e!="object")throw new Dy("pathObject","Object",e);const i=e.dir||e.root,n=e.base||`${e.name||""}${e.ext||""}`;return i?i===e.root?`${i}${n}`:`${i}${t}${n}`:n}var Jt={resolve(...t){let e="",i="",n=!1;for(let s=t.length-1;s>=-1;s--){let r;if(s>=0){if(r=t[s],ot(r,"path"),r.length===0)continue}else e.length===0?r=em():(r=d4[`=${e}`]||em(),(r===void 0||r.slice(0,2).toLowerCase()!==e.toLowerCase()&&r.charCodeAt(2)===ri)&&(r=`${e}\\`));const o=r.length;let a=0,l="",h=!1;const c=r.charCodeAt(0);if(o===1)ue(c)&&(a=1,h=!0);else if(ue(c))if(h=!0,ue(r.charCodeAt(1))){let d=2,u=d;for(;d<o&&!ue(r.charCodeAt(d));)d++;if(d<o&&d!==u){const g=r.slice(u,d);for(u=d;d<o&&ue(r.charCodeAt(d));)d++;if(d<o&&d!==u){for(u=d;d<o&&!ue(r.charCodeAt(d));)d++;(d===o||d!==u)&&(l=`\\\\${g}\\${r.slice(u,d)}`,a=d)}}}else a=1;else ks(c)&&r.charCodeAt(1)===Ls&&(l=r.slice(0,2),a=2,o>2&&ue(r.charCodeAt(2))&&(h=!0,a=3));if(l.length>0)if(e.length>0){if(l.toLowerCase()!==e.toLowerCase())continue}else e=l;if(n){if(e.length>0)break}else if(i=`${r.slice(a)}\\${i}`,n=h,h&&e.length>0)break}return i=Vd(i,!n,"\\",ue),n?`${e}\\${i}`:`${e}${i}`||"."},normalize(t){ot(t,"path");const e=t.length;if(e===0)return".";let i=0,n,s=!1;const r=t.charCodeAt(0);if(e===1)return tm(r)?"\\":t;if(ue(r))if(s=!0,ue(t.charCodeAt(1))){let a=2,l=a;for(;a<e&&!ue(t.charCodeAt(a));)a++;if(a<e&&a!==l){const h=t.slice(l,a);for(l=a;a<e&&ue(t.charCodeAt(a));)a++;if(a<e&&a!==l){for(l=a;a<e&&!ue(t.charCodeAt(a));)a++;if(a===e)return`\\\\${h}\\${t.slice(l)}\\`;a!==l&&(n=`\\\\${h}\\${t.slice(l,a)}`,i=a)}}}else i=1;else ks(r)&&t.charCodeAt(1)===Ls&&(n=t.slice(0,2),i=2,e>2&&ue(t.charCodeAt(2))&&(s=!0,i=3));let o=i<e?Vd(t.slice(i),!s,"\\",ue):"";return o.length===0&&!s&&(o="."),o.length>0&&ue(t.charCodeAt(e-1))&&(o+="\\"),n===void 0?s?`\\${o}`:o:s?`${n}\\${o}`:`${n}${o}`},isAbsolute(t){ot(t,"path");const e=t.length;if(e===0)return!1;const i=t.charCodeAt(0);return ue(i)||e>2&&ks(i)&&t.charCodeAt(1)===Ls&&ue(t.charCodeAt(2))},join(...t){if(t.length===0)return".";let e,i;for(let r=0;r<t.length;++r){const o=t[r];ot(o,"path"),o.length>0&&(e===void 0?e=i=o:e+=`\\${o}`)}if(e===void 0)return".";let n=!0,s=0;if(typeof i=="string"&&ue(i.charCodeAt(0))){++s;const r=i.length;r>1&&ue(i.charCodeAt(1))&&(++s,r>2&&(ue(i.charCodeAt(2))?++s:n=!1))}if(n){for(;s<e.length&&ue(e.charCodeAt(s));)s++;s>=2&&(e=`\\${e.slice(s)}`)}return Jt.normalize(e)},relative(t,e){if(ot(t,"from"),ot(e,"to"),t===e)return"";const i=Jt.resolve(t),n=Jt.resolve(e);if(i===n||(t=i.toLowerCase(),e=n.toLowerCase(),t===e))return"";let s=0;for(;s<t.length&&t.charCodeAt(s)===ri;)s++;let r=t.length;for(;r-1>s&&t.charCodeAt(r-1)===ri;)r--;const o=r-s;let a=0;for(;a<e.length&&e.charCodeAt(a)===ri;)a++;let l=e.length;for(;l-1>a&&e.charCodeAt(l-1)===ri;)l--;const h=l-a,c=o<h?o:h;let d=-1,u=0;for(;u<c;u++){const m=t.charCodeAt(s+u);if(m!==e.charCodeAt(a+u))break;m===ri&&(d=u)}if(u!==c){if(d===-1)return n}else{if(h>c){if(e.charCodeAt(a+u)===ri)return n.slice(a+u+1);if(u===2)return n.slice(a+u)}o>c&&(t.charCodeAt(s+u)===ri?d=u:u===2&&(d=3)),d===-1&&(d=0)}let g="";for(u=s+d+1;u<=r;++u)(u===r||t.charCodeAt(u)===ri)&&(g+=g.length===0?"..":"\\..");return a+=d,g.length>0?`${g}${n.slice(a,l)}`:(n.charCodeAt(a)===ri&&++a,n.slice(a,l))},toNamespacedPath(t){if(typeof t!="string")return t;if(t.length===0)return"";const e=Jt.resolve(t);if(e.length<=2)return t;if(e.charCodeAt(0)===ri){if(e.charCodeAt(1)===ri){const i=e.charCodeAt(2);if(i!==p4&&i!==Ks)return`\\\\?\\UNC\\${e.slice(2)}`}}else if(ks(e.charCodeAt(0))&&e.charCodeAt(1)===Ls&&e.charCodeAt(2)===ri)return`\\\\?\\${e}`;return t},dirname(t){ot(t,"path");const e=t.length;if(e===0)return".";let i=-1,n=0;const s=t.charCodeAt(0);if(e===1)return ue(s)?t:".";if(ue(s)){if(i=n=1,ue(t.charCodeAt(1))){let a=2,l=a;for(;a<e&&!ue(t.charCodeAt(a));)a++;if(a<e&&a!==l){for(l=a;a<e&&ue(t.charCodeAt(a));)a++;if(a<e&&a!==l){for(l=a;a<e&&!ue(t.charCodeAt(a));)a++;if(a===e)return t;a!==l&&(i=n=a+1)}}}}else ks(s)&&t.charCodeAt(1)===Ls&&(i=e>2&&ue(t.charCodeAt(2))?3:2,n=i);let r=-1,o=!0;for(let a=e-1;a>=n;--a)if(ue(t.charCodeAt(a))){if(!o){r=a;break}}else o=!1;if(r===-1){if(i===-1)return".";r=i}return t.slice(0,r)},basename(t,e){e!==void 0&&ot(e,"ext"),ot(t,"path");let i=0,n=-1,s=!0,r;if(t.length>=2&&ks(t.charCodeAt(0))&&t.charCodeAt(1)===Ls&&(i=2),e!==void 0&&e.length>0&&e.length<=t.length){if(e===t)return"";let o=e.length-1,a=-1;for(r=t.length-1;r>=i;--r){const l=t.charCodeAt(r);if(ue(l)){if(!s){i=r+1;break}}else a===-1&&(s=!1,a=r+1),o>=0&&(l===e.charCodeAt(o)?--o===-1&&(n=r):(o=-1,n=a))}return i===n?n=a:n===-1&&(n=t.length),t.slice(i,n)}for(r=t.length-1;r>=i;--r)if(ue(t.charCodeAt(r))){if(!s){i=r+1;break}}else n===-1&&(s=!1,n=r+1);return n===-1?"":t.slice(i,n)},extname(t){ot(t,"path");let e=0,i=-1,n=0,s=-1,r=!0,o=0;t.length>=2&&t.charCodeAt(1)===Ls&&ks(t.charCodeAt(0))&&(e=n=2);for(let a=t.length-1;a>=e;--a){const l=t.charCodeAt(a);if(ue(l)){if(!r){n=a+1;break}continue}s===-1&&(r=!1,s=a+1),l===Ks?i===-1?i=a:o!==1&&(o=1):i!==-1&&(o=-1)}return i===-1||s===-1||o===0||o===1&&i===s-1&&i===n+1?"":t.slice(i,s)},format:Ny.bind(null,"\\"),parse(t){ot(t,"path");const e={root:"",dir:"",base:"",ext:"",name:""};if(t.length===0)return e;const i=t.length;let n=0,s=t.charCodeAt(0);if(i===1)return ue(s)?(e.root=e.dir=t,e):(e.base=e.name=t,e);if(ue(s)){if(n=1,ue(t.charCodeAt(1))){let d=2,u=d;for(;d<i&&!ue(t.charCodeAt(d));)d++;if(d<i&&d!==u){for(u=d;d<i&&ue(t.charCodeAt(d));)d++;if(d<i&&d!==u){for(u=d;d<i&&!ue(t.charCodeAt(d));)d++;d===i?n=d:d!==u&&(n=d+1)}}}}else if(ks(s)&&t.charCodeAt(1)===Ls){if(i<=2)return e.root=e.dir=t,e;if(n=2,ue(t.charCodeAt(2))){if(i===3)return e.root=e.dir=t,e;n=3}}n>0&&(e.root=t.slice(0,n));let r=-1,o=n,a=-1,l=!0,h=t.length-1,c=0;for(;h>=n;--h){if(s=t.charCodeAt(h),ue(s)){if(!l){o=h+1;break}continue}a===-1&&(l=!1,a=h+1),s===Ks?r===-1?r=h:c!==1&&(c=1):r!==-1&&(c=-1)}return a!==-1&&(r===-1||c===0||c===1&&r===a-1&&r===o+1?e.base=e.name=t.slice(o,a):(e.name=t.slice(o,r),e.base=t.slice(o,a),e.ext=t.slice(r,a))),o>0&&o!==n?e.dir=t.slice(0,o-1):e.dir=e.root,e},sep:"\\",delimiter:";",win32:null,posix:null},Ze={resolve(...t){let e="",i=!1;for(let n=t.length-1;n>=-1&&!i;n--){const s=n>=0?t[n]:em();ot(s,"path"),s.length!==0&&(e=`${s}/${e}`,i=s.charCodeAt(0)===It)}return e=Vd(e,!i,"/",tm),i?`/${e}`:e.length>0?e:"."},normalize(t){if(ot(t,"path"),t.length===0)return".";const e=t.charCodeAt(0)===It,i=t.charCodeAt(t.length-1)===It;return t=Vd(t,!e,"/",tm),t.length===0?e?"/":i?"./":".":(i&&(t+="/"),e?`/${t}`:t)},isAbsolute(t){return ot(t,"path"),t.length>0&&t.charCodeAt(0)===It},join(...t){if(t.length===0)return".";let e;for(let i=0;i<t.length;++i){const n=t[i];ot(n,"path"),n.length>0&&(e===void 0?e=n:e+=`/${n}`)}return e===void 0?".":Ze.normalize(e)},relative(t,e){if(ot(t,"from"),ot(e,"to"),t===e||(t=Ze.resolve(t),e=Ze.resolve(e),t===e))return"";const i=1,n=t.length,s=n-i,r=1,o=e.length-r,a=s<o?s:o;let l=-1,h=0;for(;h<a;h++){const d=t.charCodeAt(i+h);if(d!==e.charCodeAt(r+h))break;d===It&&(l=h)}if(h===a)if(o>a){if(e.charCodeAt(r+h)===It)return e.slice(r+h+1);if(h===0)return e.slice(r+h)}else s>a&&(t.charCodeAt(i+h)===It?l=h:h===0&&(l=0));let c="";for(h=i+l+1;h<=n;++h)(h===n||t.charCodeAt(h)===It)&&(c+=c.length===0?"..":"/..");return`${c}${e.slice(r+l)}`},toNamespacedPath(t){return t},dirname(t){if(ot(t,"path"),t.length===0)return".";const e=t.charCodeAt(0)===It;let i=-1,n=!0;for(let s=t.length-1;s>=1;--s)if(t.charCodeAt(s)===It){if(!n){i=s;break}}else n=!1;return i===-1?e?"/":".":e&&i===1?"//":t.slice(0,i)},basename(t,e){e!==void 0&&ot(e,"ext"),ot(t,"path");let i=0,n=-1,s=!0,r;if(e!==void 0&&e.length>0&&e.length<=t.length){if(e===t)return"";let o=e.length-1,a=-1;for(r=t.length-1;r>=0;--r){const l=t.charCodeAt(r);if(l===It){if(!s){i=r+1;break}}else a===-1&&(s=!1,a=r+1),o>=0&&(l===e.charCodeAt(o)?--o===-1&&(n=r):(o=-1,n=a))}return i===n?n=a:n===-1&&(n=t.length),t.slice(i,n)}for(r=t.length-1;r>=0;--r)if(t.charCodeAt(r)===It){if(!s){i=r+1;break}}else n===-1&&(s=!1,n=r+1);return n===-1?"":t.slice(i,n)},extname(t){ot(t,"path");let e=-1,i=0,n=-1,s=!0,r=0;for(let o=t.length-1;o>=0;--o){const a=t.charCodeAt(o);if(a===It){if(!s){i=o+1;break}continue}n===-1&&(s=!1,n=o+1),a===Ks?e===-1?e=o:r!==1&&(r=1):e!==-1&&(r=-1)}return e===-1||n===-1||r===0||r===1&&e===n-1&&e===i+1?"":t.slice(e,n)},format:Ny.bind(null,"/"),parse(t){ot(t,"path");const e={root:"",dir:"",base:"",ext:"",name:""};if(t.length===0)return e;const i=t.charCodeAt(0)===It;let n;i?(e.root="/",n=1):n=0;let s=-1,r=0,o=-1,a=!0,l=t.length-1,h=0;for(;l>=n;--l){const c=t.charCodeAt(l);if(c===It){if(!a){r=l+1;break}continue}o===-1&&(a=!1,o=l+1),c===Ks?s===-1?s=l:h!==1&&(h=1):s!==-1&&(h=-1)}if(o!==-1){const c=r===0&&i?1:r;s===-1||h===0||h===1&&s===o-1&&s===r+1?e.base=e.name=t.slice(c,o):(e.name=t.slice(c,s),e.base=t.slice(c,o),e.ext=t.slice(s,o))}return r>0?e.dir=t.slice(0,r-1):i&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};Ze.win32=Jt.win32=Jt;Ze.posix=Jt.posix=Ze;var Ty=uo==="win32"?Jt.normalize:Ze.normalize,_4=uo==="win32"?Jt.resolve:Ze.resolve,v4=uo==="win32"?Jt.relative:Ze.relative,C4=uo==="win32"?Jt.dirname:Ze.dirname,My=uo==="win32"?Jt.basename:Ze.basename,b4=uo==="win32"?Jt.extname:Ze.extname,$r=uo==="win32"?Jt.sep:Ze.sep,w4=/^\w[\w\d+.-]*$/,S4=/^\//,y4=/^\/\//;function j0(t,e){if(!t.scheme&&e)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${t.authority}", path: "${t.path}", query: "${t.query}", fragment: "${t.fragment}"}`);if(t.scheme&&!w4.test(t.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(t.path){if(t.authority){if(!S4.test(t.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(y4.test(t.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function L4(t,e){return!t&&!e?"file":t}function k4(t,e){switch(t){case"https":case"http":case"file":e?e[0]!==hn&&(e=hn+e):e=hn}return e}var Fe="",hn="/",x4=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,Le=class qc{constructor(e,i,n,s,r,o=!1){typeof e=="object"?(this.scheme=e.scheme||Fe,this.authority=e.authority||Fe,this.path=e.path||Fe,this.query=e.query||Fe,this.fragment=e.fragment||Fe):(this.scheme=L4(e,o),this.authority=i||Fe,this.path=k4(this.scheme,n||Fe),this.query=s||Fe,this.fragment=r||Fe,j0(this,o))}static isUri(e){return e instanceof qc?!0:e?typeof e.authority=="string"&&typeof e.fragment=="string"&&typeof e.path=="string"&&typeof e.query=="string"&&typeof e.scheme=="string"&&typeof e.fsPath=="string"&&typeof e.with=="function"&&typeof e.toString=="function":!1}get fsPath(){return Wd(this,!1)}with(e){if(!e)return this;let{scheme:i,authority:n,path:s,query:r,fragment:o}=e;return i===void 0?i=this.scheme:i===null&&(i=Fe),n===void 0?n=this.authority:n===null&&(n=Fe),s===void 0?s=this.path:s===null&&(s=Fe),r===void 0?r=this.query:r===null&&(r=Fe),o===void 0?o=this.fragment:o===null&&(o=Fe),i===this.scheme&&n===this.authority&&s===this.path&&r===this.query&&o===this.fragment?this:new wo(i,n,s,r,o)}static parse(e,i=!1){const n=x4.exec(e);return n?new wo(n[2]||Fe,Yh(n[4]||Fe),Yh(n[5]||Fe),Yh(n[7]||Fe),Yh(n[9]||Fe),i):new wo(Fe,Fe,Fe,Fe,Fe)}static file(e){let i=Fe;if(ei&&(e=e.replace(/\\/g,hn)),e[0]===hn&&e[1]===hn){const n=e.indexOf(hn,2);n===-1?(i=e.substring(2),e=hn):(i=e.substring(2,n),e=e.substring(n)||hn)}return new wo("file",i,e,Fe,Fe)}static from(e){const i=new wo(e.scheme,e.authority,e.path,e.query,e.fragment);return j0(i,!0),i}static joinPath(e,...i){if(!e.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let n;return ei&&e.scheme==="file"?n=qc.file(Jt.join(Wd(e,!0),...i)).path:n=Ze.join(e.path,...i),e.with({path:n})}toString(e=!1){return im(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof qc)return e;{const i=new wo(e);return i._formatted=e.external,i._fsPath=e._sep===Ry?e.fsPath:null,i}}else return e}},Ry=ei?1:void 0,wo=class extends Le{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=Wd(this,!1)),this._fsPath}toString(t=!1){return t?im(this,!0):(this._formatted||(this._formatted=im(this,!1)),this._formatted)}toJSON(){const t={$mid:1};return this._fsPath&&(t.fsPath=this._fsPath,t._sep=Ry),this._formatted&&(t.external=this._formatted),this.path&&(t.path=this.path),this.scheme&&(t.scheme=this.scheme),this.authority&&(t.authority=this.authority),this.query&&(t.query=this.query),this.fragment&&(t.fragment=this.fragment),t}},Ay={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 q0(t,e){let i,n=-1;for(let s=0;s<t.length;s++){const r=t.charCodeAt(s);if(r>=97&&r<=122||r>=65&&r<=90||r>=48&&r<=57||r===45||r===46||r===95||r===126||e&&r===47)n!==-1&&(i+=encodeURIComponent(t.substring(n,s)),n=-1),i!==void 0&&(i+=t.charAt(s));else{i===void 0&&(i=t.substr(0,s));const o=Ay[r];o!==void 0?(n!==-1&&(i+=encodeURIComponent(t.substring(n,s)),n=-1),i+=o):n===-1&&(n=s)}}return n!==-1&&(i+=encodeURIComponent(t.substring(n))),i!==void 0?i:t}function I4(t){let e;for(let i=0;i<t.length;i++){const n=t.charCodeAt(i);n===35||n===63?(e===void 0&&(e=t.substr(0,i)),e+=Ay[n]):e!==void 0&&(e+=t[i])}return e!==void 0?e:t}function Wd(t,e){let i;return t.authority&&t.path.length>1&&t.scheme==="file"?i=`//${t.authority}${t.path}`:t.path.charCodeAt(0)===47&&(t.path.charCodeAt(1)>=65&&t.path.charCodeAt(1)<=90||t.path.charCodeAt(1)>=97&&t.path.charCodeAt(1)<=122)&&t.path.charCodeAt(2)===58?e?i=t.path.substr(1):i=t.path[1].toLowerCase()+t.path.substr(2):i=t.path,ei&&(i=i.replace(/\//g,"\\")),i}function im(t,e){const i=e?I4:q0;let n="",{scheme:s,authority:r,path:o,query:a,fragment:l}=t;if(s&&(n+=s,n+=":"),(r||s==="file")&&(n+=hn,n+=hn),r){let h=r.indexOf("@");if(h!==-1){const c=r.substr(0,h);r=r.substr(h+1),h=c.indexOf(":"),h===-1?n+=i(c,!1):(n+=i(c.substr(0,h),!1),n+=":",n+=i(c.substr(h+1),!1)),n+="@"}r=r.toLowerCase(),h=r.indexOf(":"),h===-1?n+=i(r,!1):(n+=i(r.substr(0,h),!1),n+=r.substr(h))}if(o){if(o.length>=3&&o.charCodeAt(0)===47&&o.charCodeAt(2)===58){const h=o.charCodeAt(1);h>=65&&h<=90&&(o=`/${String.fromCharCode(h+32)}:${o.substr(3)}`)}else if(o.length>=2&&o.charCodeAt(1)===58){const h=o.charCodeAt(0);h>=65&&h<=90&&(o=`${String.fromCharCode(h+32)}:${o.substr(2)}`)}n+=i(o,!0)}return a&&(n+="?",n+=i(a,!1)),l&&(n+="#",n+=e?l:q0(l,!1)),n}function Oy(t){try{return decodeURIComponent(t)}catch{return t.length>3?t.substr(0,3)+Oy(t.substr(3)):t}}var G0=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function Yh(t){return t.match(G0)?t.replace(G0,e=>Oy(e)):t}var A=class yr{constructor(e,i){this.lineNumber=e,this.column=i}with(e=this.lineNumber,i=this.column){return e===this.lineNumber&&i===this.column?this:new yr(e,i)}delta(e=0,i=0){return this.with(this.lineNumber+e,this.column+i)}equals(e){return yr.equals(this,e)}static equals(e,i){return!e&&!i?!0:!!e&&!!i&&e.lineNumber===i.lineNumber&&e.column===i.column}isBefore(e){return yr.isBefore(this,e)}static isBefore(e,i){return e.lineNumber<i.lineNumber?!0:i.lineNumber<e.lineNumber?!1:e.column<i.column}isBeforeOrEqual(e){return yr.isBeforeOrEqual(this,e)}static isBeforeOrEqual(e,i){return e.lineNumber<i.lineNumber?!0:i.lineNumber<e.lineNumber?!1:e.column<=i.column}static compare(e,i){const n=e.lineNumber|0,s=i.lineNumber|0;return n===s?(e.column|0)-(i.column|0):n-s}clone(){return new yr(this.lineNumber,this.column)}toString(){return"("+this.lineNumber+","+this.column+")"}static lift(e){return new yr(e.lineNumber,e.column)}static isIPosition(e){return e&&typeof e.lineNumber=="number"&&typeof e.column=="number"}},T=class xt{constructor(e,i,n,s){e>n||e===n&&i>s?(this.startLineNumber=n,this.startColumn=s,this.endLineNumber=e,this.endColumn=i):(this.startLineNumber=e,this.startColumn=i,this.endLineNumber=n,this.endColumn=s)}isEmpty(){return xt.isEmpty(this)}static isEmpty(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}containsPosition(e){return xt.containsPosition(this,e)}static containsPosition(e,i){return!(i.lineNumber<e.startLineNumber||i.lineNumber>e.endLineNumber||i.lineNumber===e.startLineNumber&&i.column<e.startColumn||i.lineNumber===e.endLineNumber&&i.column>e.endColumn)}static strictContainsPosition(e,i){return!(i.lineNumber<e.startLineNumber||i.lineNumber>e.endLineNumber||i.lineNumber===e.startLineNumber&&i.column<=e.startColumn||i.lineNumber===e.endLineNumber&&i.column>=e.endColumn)}containsRange(e){return xt.containsRange(this,e)}static containsRange(e,i){return!(i.startLineNumber<e.startLineNumber||i.endLineNumber<e.startLineNumber||i.startLineNumber>e.endLineNumber||i.endLineNumber>e.endLineNumber||i.startLineNumber===e.startLineNumber&&i.startColumn<e.startColumn||i.endLineNumber===e.endLineNumber&&i.endColumn>e.endColumn)}strictContainsRange(e){return xt.strictContainsRange(this,e)}static strictContainsRange(e,i){return!(i.startLineNumber<e.startLineNumber||i.endLineNumber<e.startLineNumber||i.startLineNumber>e.endLineNumber||i.endLineNumber>e.endLineNumber||i.startLineNumber===e.startLineNumber&&i.startColumn<=e.startColumn||i.endLineNumber===e.endLineNumber&&i.endColumn>=e.endColumn)}plusRange(e){return xt.plusRange(this,e)}static plusRange(e,i){let n,s,r,o;return i.startLineNumber<e.startLineNumber?(n=i.startLineNumber,s=i.startColumn):i.startLineNumber===e.startLineNumber?(n=i.startLineNumber,s=Math.min(i.startColumn,e.startColumn)):(n=e.startLineNumber,s=e.startColumn),i.endLineNumber>e.endLineNumber?(r=i.endLineNumber,o=i.endColumn):i.endLineNumber===e.endLineNumber?(r=i.endLineNumber,o=Math.max(i.endColumn,e.endColumn)):(r=e.endLineNumber,o=e.endColumn),new xt(n,s,r,o)}intersectRanges(e){return xt.intersectRanges(this,e)}static intersectRanges(e,i){let n=e.startLineNumber,s=e.startColumn,r=e.endLineNumber,o=e.endColumn,a=i.startLineNumber,l=i.startColumn,h=i.endLineNumber,c=i.endColumn;return n<a?(n=a,s=l):n===a&&(s=Math.max(s,l)),r>h?(r=h,o=c):r===h&&(o=Math.min(o,c)),n>r||n===r&&s>o?null:new xt(n,s,r,o)}equalsRange(e){return xt.equalsRange(this,e)}static equalsRange(e,i){return!!e&&!!i&&e.startLineNumber===i.startLineNumber&&e.startColumn===i.startColumn&&e.endLineNumber===i.endLineNumber&&e.endColumn===i.endColumn}getEndPosition(){return xt.getEndPosition(this)}static getEndPosition(e){return new A(e.endLineNumber,e.endColumn)}getStartPosition(){return xt.getStartPosition(this)}static getStartPosition(e){return new A(e.startLineNumber,e.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(e,i){return new xt(this.startLineNumber,this.startColumn,e,i)}setStartPosition(e,i){return new xt(e,i,this.endLineNumber,this.endColumn)}collapseToStart(){return xt.collapseToStart(this)}static collapseToStart(e){return new xt(e.startLineNumber,e.startColumn,e.startLineNumber,e.startColumn)}static fromPositions(e,i=e){return new xt(e.lineNumber,e.column,i.lineNumber,i.column)}static lift(e){return e?new xt(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):null}static isIRange(e){return e&&typeof e.startLineNumber=="number"&&typeof e.startColumn=="number"&&typeof e.endLineNumber=="number"&&typeof e.endColumn=="number"}static areIntersectingOrTouching(e,i){return!(e.endLineNumber<i.startLineNumber||e.endLineNumber===i.startLineNumber&&e.endColumn<i.startColumn||i.endLineNumber<e.startLineNumber||i.endLineNumber===e.startLineNumber&&i.endColumn<e.startColumn)}static areIntersecting(e,i){return!(e.endLineNumber<i.startLineNumber||e.endLineNumber===i.startLineNumber&&e.endColumn<=i.startColumn||i.endLineNumber<e.startLineNumber||i.endLineNumber===e.startLineNumber&&i.endColumn<=e.startColumn)}static compareRangesUsingStarts(e,i){if(e&&i){const n=e.startLineNumber|0,s=i.startLineNumber|0;if(n===s){const r=e.startColumn|0,o=i.startColumn|0;if(r===o){const a=e.endLineNumber|0,l=i.endLineNumber|0;return a===l?(e.endColumn|0)-(i.endColumn|0):a-l}return r-o}return n-s}return(e?1:0)-(i?1:0)}static compareRangesUsingEnds(e,i){return e.endLineNumber===i.endLineNumber?e.endColumn===i.endColumn?e.startLineNumber===i.startLineNumber?e.startColumn-i.startColumn:e.startLineNumber-i.startLineNumber:e.endColumn-i.endColumn:e.endLineNumber-i.endLineNumber}static spansMultipleLines(e){return e.endLineNumber>e.startLineNumber}toJSON(){return this}},xe=class Oi extends T{constructor(e,i,n,s){super(e,i,n,s),this.selectionStartLineNumber=e,this.selectionStartColumn=i,this.positionLineNumber=n,this.positionColumn=s}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(e){return Oi.selectionsEqual(this,e)}static selectionsEqual(e,i){return e.selectionStartLineNumber===i.selectionStartLineNumber&&e.selectionStartColumn===i.selectionStartColumn&&e.positionLineNumber===i.positionLineNumber&&e.positionColumn===i.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(e,i){return this.getDirection()===0?new Oi(this.startLineNumber,this.startColumn,e,i):new Oi(e,i,this.startLineNumber,this.startColumn)}getPosition(){return new A(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new A(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(e,i){return this.getDirection()===0?new Oi(e,i,this.endLineNumber,this.endColumn):new Oi(this.endLineNumber,this.endColumn,e,i)}static fromPositions(e,i=e){return new Oi(e.lineNumber,e.column,i.lineNumber,i.column)}static fromRange(e,i){return i===0?new Oi(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):new Oi(e.endLineNumber,e.endColumn,e.startLineNumber,e.startColumn)}static liftSelection(e){return new Oi(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)}
6static selectionsArrEqual(e,i){if(e&&!i||!e&&i)return!1;if(!e&&!i)return!0;if(e.length!==i.length)return!1;for(let n=0,s=e.length;n<s;n++)if(!this.selectionsEqual(e[n],i[n]))return!1;return!0}static isISelection(e){return e&&typeof e.selectionStartLineNumber=="number"&&typeof e.selectionStartColumn=="number"&&typeof e.positionLineNumber=="number"&&typeof e.positionColumn=="number"}static createWithDirection(e,i,n,s,r){return r===0?new Oi(e,i,n,s):new Oi(n,s,e,i)}},nm=function(t,e,i,n){function s(r){return r instanceof i?r:new i(function(o){o(r)})}return new(i||(i=Promise))(function(r,o){function a(c){try{h(n.next(c))}catch(d){o(d)}}function l(c){try{h(n.throw(c))}catch(d){o(d)}}function h(c){c.done?r(c.value):s(c.value).then(a,l)}h((n=n.apply(t,e||[])).next())})},E4=class{constructor(){this._map=new Map,this._factories=new Map,this._onDidChange=new M,this.onDidChange=this._onDidChange.event,this._colorMap=null}fire(t){this._onDidChange.fire({changedLanguages:t,changedColorMap:!1})}register(t,e){return this._map.set(t,e),this.fire([t]),Ae(()=>{this._map.get(t)===e&&(this._map.delete(t),this.fire([t]))})}registerFactory(t,e){var i;(i=this._factories.get(t))===null||i===void 0||i.dispose();const n=new D4(this,t,e);return this._factories.set(t,n),Ae(()=>{const s=this._factories.get(t);!s||s!==n||(this._factories.delete(t),s.dispose())})}getOrCreate(t){return nm(this,void 0,void 0,function*(){const e=this.get(t);if(e)return e;const i=this._factories.get(t);return!i||i.isResolved?null:(yield i.resolve(),this.get(t))})}get(t){return this._map.get(t)||null}isResolved(t){if(this.get(t))return!0;const e=this._factories.get(t);return!!(!e||e.isResolved)}setColorMap(t){this._colorMap=t,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}},D4=class extends V{constructor(t,e,i){super(),this._registry=t,this._languageId=e,this._factory=i,this._isDisposed=!1,this._resolvePromise=null,this._isResolved=!1}get isResolved(){return this._isResolved}dispose(){this._isDisposed=!0,super.dispose()}resolve(){return nm(this,void 0,void 0,function*(){return this._resolvePromise||(this._resolvePromise=this._create()),this._resolvePromise})}_create(){return nm(this,void 0,void 0,function*(){const t=yield Promise.resolve(this._factory.createTokenizationSupport());this._isResolved=!0,t&&!this._isDisposed&&this._register(this._registry.register(this._languageId,t))})}};function N4(t){return t?t.replace(/\$\((.*?)\)/g,(e,i)=>` ${i} `).trim():""}var f=class sm{constructor(e,i,n){this.id=e,this.definition=i,this.description=n,sm._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 sm._allCodicons}};f._allCodicons=[];f.add=new f("add",{fontCharacter:"\\ea60"});f.plus=new f("plus",f.add.definition);f.gistNew=new f("gist-new",f.add.definition);f.repoCreate=new f("repo-create",f.add.definition);f.lightbulb=new f("lightbulb",{fontCharacter:"\\ea61"});f.lightBulb=new f("light-bulb",{fontCharacter:"\\ea61"});f.repo=new f("repo",{fontCharacter:"\\ea62"});f.repoDelete=new f("repo-delete",{fontCharacter:"\\ea62"});f.gistFork=new f("gist-fork",{fontCharacter:"\\ea63"});f.repoForked=new f("repo-forked",{fontCharacter:"\\ea63"});f.gitPullRequest=new f("git-pull-request",{fontCharacter:"\\ea64"});f.gitPullRequestAbandoned=new f("git-pull-request-abandoned",{fontCharacter:"\\ea64"});f.recordKeys=new f("record-keys",{fontCharacter:"\\ea65"});f.keyboard=new f("keyboard",{fontCharacter:"\\ea65"});f.tag=new f("tag",{fontCharacter:"\\ea66"});f.tagAdd=new f("tag-add",{fontCharacter:"\\ea66"});f.tagRemove=new f("tag-remove",{fontCharacter:"\\ea66"});f.person=new f("person",{fontCharacter:"\\ea67"});f.personFollow=new f("person-follow",{fontCharacter:"\\ea67"});f.personOutline=new f("person-outline",{fontCharacter:"\\ea67"});f.personFilled=new f("person-filled",{fontCharacter:"\\ea67"});f.gitBranch=new f("git-branch",{fontCharacter:"\\ea68"});f.gitBranchCreate=new f("git-branch-create",{fontCharacter:"\\ea68"});f.gitBranchDelete=new f("git-branch-delete",{fontCharacter:"\\ea68"});f.sourceControl=new f("source-control",{fontCharacter:"\\ea68"});f.mirror=new f("mirror",{fontCharacter:"\\ea69"});f.mirrorPublic=new f("mirror-public",{fontCharacter:"\\ea69"});f.star=new f("star",{fontCharacter:"\\ea6a"});f.starAdd=new f("star-add",{fontCharacter:"\\ea6a"});f.starDelete=new f("star-delete",{fontCharacter:"\\ea6a"});f.starEmpty=new f("star-empty",{fontCharacter:"\\ea6a"});f.comment=new f("comment",{fontCharacter:"\\ea6b"});f.commentAdd=new f("comment-add",{fontCharacter:"\\ea6b"});f.alert=new f("alert",{fontCharacter:"\\ea6c"});f.warning=new f("warning",{fontCharacter:"\\ea6c"});f.search=new f("search",{fontCharacter:"\\ea6d"});f.searchSave=new f("search-save",{fontCharacter:"\\ea6d"});f.logOut=new f("log-out",{fontCharacter:"\\ea6e"});f.signOut=new f("sign-out",{fontCharacter:"\\ea6e"});f.logIn=new f("log-in",{fontCharacter:"\\ea6f"});f.signIn=new f("sign-in",{fontCharacter:"\\ea6f"});f.eye=new f("eye",{fontCharacter:"\\ea70"});f.eyeUnwatch=new f("eye-unwatch",{fontCharacter:"\\ea70"});f.eyeWatch=new f("eye-watch",{fontCharacter:"\\ea70"});f.circleFilled=new f("circle-filled",{fontCharacter:"\\ea71"});f.primitiveDot=new f("primitive-dot",{fontCharacter:"\\ea71"});f.closeDirty=new f("close-dirty",{fontCharacter:"\\ea71"});
6f.debugBreakpoint=new f("debug-breakpoint",{fontCharacter:"\\ea71"});f.debugBreakpointDisabled=new f("debug-breakpoint-disabled",{fontCharacter:"\\ea71"});f.debugHint=new f("debug-hint",{fontCharacter:"\\ea71"});f.primitiveSquare=new f("primitive-square",{fontCharacter:"\\ea72"});f.edit=new f("edit",{fontCharacter:"\\ea73"});f.pencil=new f("pencil",{fontCharacter:"\\ea73"});f.info=new f("info",{fontCharacter:"\\ea74"});f.issueOpened=new f("issue-opened",{fontCharacter:"\\ea74"});f.gistPrivate=new f("gist-private",{fontCharacter:"\\ea75"});f.gitForkPrivate=new f("git-fork-private",{fontCharacter:"\\ea75"});f.lock=new f("lock",{fontCharacter:"\\ea75"});f.mirrorPrivate=new f("mirror-private",{fontCharacter:"\\ea75"});f.close=new f("close",{fontCharacter:"\\ea76"});f.removeClose=new f("remove-close",{fontCharacter:"\\ea76"});f.x=new f("x",{fontCharacter:"\\ea76"});f.repoSync=new f("repo-sync",{fontCharacter:"\\ea77"});f.sync=new f("sync",{fontCharacter:"\\ea77"});f.clone=new f("clone",{fontCharacter:"\\ea78"});f.desktopDownload=new f("desktop-download",{fontCharacter:"\\ea78"});f.beaker=new f("beaker",{fontCharacter:"\\ea79"});f.microscope=new f("microscope",{fontCharacter:"\\ea79"});f.vm=new f("vm",{fontCharacter:"\\ea7a"});f.deviceDesktop=new f("device-desktop",{fontCharacter:"\\ea7a"});f.file=new f("file",{fontCharacter:"\\ea7b"});f.fileText=new f("file-text",{fontCharacter:"\\ea7b"});f.more=new f("more",{fontCharacter:"\\ea7c"});f.ellipsis=new f("ellipsis",{fontCharacter:"\\ea7c"});f.kebabHorizontal=new f("kebab-horizontal",{fontCharacter:"\\ea7c"});f.mailReply=new f("mail-reply",{fontCharacter:"\\ea7d"});f.reply=new f("reply",{fontCharacter:"\\ea7d"});f.organization=new f("organization",{fontCharacter:"\\ea7e"});f.organizationFilled=new f("organization-filled",{fontCharacter:"\\ea7e"});f.organizationOutline=new f("organization-outline",{fontCharacter:"\\ea7e"});f.newFile=new f("new-file",{fontCharacter:"\\ea7f"});f.fileAdd=new f("file-add",{fontCharacter:"\\ea7f"});f.newFolder=new f("new-folder",{fontCharacter:"\\ea80"});f.fileDirectoryCreate=new f("file-directory-create",{fontCharacter:"\\ea80"});f.trash=new f("trash",{fontCharacter:"\\ea81"});f.trashcan=new f("trashcan",{fontCharacter:"\\ea81"});f.history=new f("history",{fontCharacter:"\\ea82"});f.clock=new f("clock",{fontCharacter:"\\ea82"});f.folder=new f("folder",{fontCharacter:"\\ea83"});f.fileDirectory=new f("file-directory",{fontCharacter:"\\ea83"});f.symbolFolder=new f("symbol-folder",{fontCharacter:"\\ea83"});f.logoGithub=new f("logo-github",{fontCharacter:"\\ea84"});f.markGithub=new f("mark-github",{fontCharacter:"\\ea84"});f.github=new f("github",{fontCharacter:"\\ea84"});f.terminal=new f("terminal",{fontCharacter:"\\ea85"});f.console=new f("console",{fontCharacter:"\\ea85"});f.repl=new f("repl",{fontCharacter:"\\ea85"});f.zap=new f("zap",{fontCharacter:"\\ea86"});f.symbolEvent=new f("symbol-event",{fontCharacter:"\\ea86"});f.error=new f("error",{fontCharacter:"\\ea87"});f.stop=new f("stop",{fontCharacter:"\\ea87"});f.variable=new f("variable",{fontCharacter:"\\ea88"});f.symbolVariable=new f("symbol-variable",{fontCharacter:"\\ea88"});f.array=new f("array",{fontCharacter:"\\ea8a"});f.symbolArray=new f("symbol-array",{fontCharacter:"\\ea8a"});f.symbolModule=new f("symbol-module",{fontCharacter:"\\ea8b"});f.symbolPackage=new f("symbol-package",{fontCharacter:"\\ea8b"});f.symbolNamespace=new f("symbol-namespace",{fontCharacter:"\\ea8b"});f.symbolObject=new f("symbol-object",{fontCharacter:"\\ea8b"});f.symbolMethod=new f("symbol-method",{fontCharacter:"\\ea8c"});f.symbolFunction=new f("symbol-function",{fontCharacter:"\\ea8c"});f.symbolConstructor=new f("symbol-constructor",{fontCharacter:"\\ea8c"});f.symbolBoolean=new f("symbol-boolean",{fontCharacter:"\\ea8f"});f.symbolNull=new f("symbol-null",{fontCharacter:"\\ea8f"});f.symbolNumeric=new f("symbol-numeric",{fontCharacter:"\\ea90"});f.symbolNumber=new f("symbol-number",{fontCharacter:"\\ea90"});f.symbolStructure=new f("symbol-structure",{fontCharacter:"\\ea91"});f.symbolStruct=new f("symbol-struct",{fontCharacter:"\\ea91"});f.symbolParameter=new f("symbol-parameter",{fontCharacter:"\\ea92"});f.symbolTypeParameter=new f("symbol-type-parameter",{fontCharacter:"\\ea92"});f.symbolKey=new f("symbol-key",{fontCharacter:"\\ea93"});f.symbolText=new f("symbol-text",{fontCharacter:"\\ea93"});f.symbolReference=new f("symbol-reference",{fontCharacter:"\\ea94"});f.goToFile=new f("go-to-file",{fontCharacter:"\\ea94"});f.symbolEnum=new f("symbol-enum",{fontCharacter:"\\ea95"});f.symbolValue=new f("symbol-value",{fontCharacter:"\\ea95"});f.symbolRuler=new f("symbol-ruler",{fontCharacter:"\\ea96"});f.symbolUnit=new f("symbol-unit",{fontCharacter:"\\ea96"});f.activateBreakpoints=new f("activate-breakpoints",{fontCharacter:"\\ea97"});
6f.archive=new f("archive",{fontCharacter:"\\ea98"});f.arrowBoth=new f("arrow-both",{fontCharacter:"\\ea99"});f.arrowDown=new f("arrow-down",{fontCharacter:"\\ea9a"});f.arrowLeft=new f("arrow-left",{fontCharacter:"\\ea9b"});f.arrowRight=new f("arrow-right",{fontCharacter:"\\ea9c"});f.arrowSmallDown=new f("arrow-small-down",{fontCharacter:"\\ea9d"});f.arrowSmallLeft=new f("arrow-small-left",{fontCharacter:"\\ea9e"});f.arrowSmallRight=new f("arrow-small-right",{fontCharacter:"\\ea9f"});f.arrowSmallUp=new f("arrow-small-up",{fontCharacter:"\\eaa0"});f.arrowUp=new f("arrow-up",{fontCharacter:"\\eaa1"});f.bell=new f("bell",{fontCharacter:"\\eaa2"});f.bold=new f("bold",{fontCharacter:"\\eaa3"});f.book=new f("book",{fontCharacter:"\\eaa4"});f.bookmark=new f("bookmark",{fontCharacter:"\\eaa5"});f.debugBreakpointConditionalUnverified=new f("debug-breakpoint-conditional-unverified",{fontCharacter:"\\eaa6"});f.debugBreakpointConditional=new f("debug-breakpoint-conditional",{fontCharacter:"\\eaa7"});f.debugBreakpointConditionalDisabled=new f("debug-breakpoint-conditional-disabled",{fontCharacter:"\\eaa7"});f.debugBreakpointDataUnverified=new f("debug-breakpoint-data-unverified",{fontCharacter:"\\eaa8"});f.debugBreakpointData=new f("debug-breakpoint-data",{fontCharacter:"\\eaa9"});f.debugBreakpointDataDisabled=new f("debug-breakpoint-data-disabled",{fontCharacter:"\\eaa9"});f.debugBreakpointLogUnverified=new f("debug-breakpoint-log-unverified",{fontCharacter:"\\eaaa"});f.debugBreakpointLog=new f("debug-breakpoint-log",{fontCharacter:"\\eaab"});f.debugBreakpointLogDisabled=new f("debug-breakpoint-log-disabled",{fontCharacter:"\\eaab"});f.briefcase=new f("briefcase",{fontCharacter:"\\eaac"});f.broadcast=new f("broadcast",{fontCharacter:"\\eaad"});f.browser=new f("browser",{fontCharacter:"\\eaae"});f.bug=new f("bug",{fontCharacter:"\\eaaf"});f.calendar=new f("calendar",{fontCharacter:"\\eab0"});f.caseSensitive=new f("case-sensitive",{fontCharacter:"\\eab1"});f.check=new f("check",{fontCharacter:"\\eab2"});f.checklist=new f("checklist",{fontCharacter:"\\eab3"});f.chevronDown=new f("chevron-down",{fontCharacter:"\\eab4"});f.dropDownButton=new f("drop-down-button",f.chevronDown.definition);f.chevronLeft=new f("chevron-left",{fontCharacter:"\\eab5"});f.chevronRight=new f("chevron-right",{fontCharacter:"\\eab6"});f.chevronUp=new f("chevron-up",{fontCharacter:"\\eab7"});f.chromeClose=new f("chrome-close",{fontCharacter:"\\eab8"});f.chromeMaximize=new f("chrome-maximize",{fontCharacter:"\\eab9"});f.chromeMinimize=new f("chrome-minimize",{fontCharacter:"\\eaba"});f.chromeRestore=new f("chrome-restore",{fontCharacter:"\\eabb"});f.circleOutline=new f("circle-outline",{fontCharacter:"\\eabc"});f.debugBreakpointUnverified=new f("debug-breakpoint-unverified",{fontCharacter:"\\eabc"});f.circleSlash=new f("circle-slash",{fontCharacter:"\\eabd"});f.circuitBoard=new f("circuit-board",{fontCharacter:"\\eabe"});f.clearAll=new f("clear-all",{fontCharacter:"\\eabf"});f.clippy=new f("clippy",{fontCharacter:"\\eac0"});f.closeAll=new f("close-all",{fontCharacter:"\\eac1"});f.cloudDownload=new f("cloud-download",{fontCharacter:"\\eac2"});f.cloudUpload=new f("cloud-upload",{fontCharacter:"\\eac3"});f.code=new f("code",{fontCharacter:"\\eac4"});f.collapseAll=new f("collapse-all",{fontCharacter:"\\eac5"});f.colorMode=new f("color-mode",{fontCharacter:"\\eac6"});f.commentDiscussion=new f("comment-discussion",{fontCharacter:"\\eac7"});f.compareChanges=new f("compare-changes",{fontCharacter:"\\eafd"});f.creditCard=new f("credit-card",{fontCharacter:"\\eac9"});f.dash=new f("dash",{fontCharacter:"\\eacc"});f.dashboard=new f("dashboard",{fontCharacter:"\\eacd"});f.database=new f("database",{fontCharacter:"\\eace"});f.debugContinue=new f("debug-continue",{fontCharacter:"\\eacf"});f.debugDisconnect=new f("debug-disconnect",{fontCharacter:"\\ead0"});f.debugPause=new f("debug-pause",{fontCharacter:"\\ead1"});f.debugRestart=new f("debug-restart",{fontCharacter:"\\ead2"});f.debugStart=new f("debug-start",{fontCharacter:"\\ead3"});f.debugStepInto=new f("debug-step-into",{fontCharacter:"\\ead4"});f.debugStepOut=new f("debug-step-out",{fontCharacter:"\\ead5"});f.debugStepOver=new f("debug-step-over",{fontCharacter:"\\ead6"});f.debugStop=new f("debug-stop",{fontCharacter:"\\ead7"});f.debug=new f("debug",{fontCharacter:"\\ead8"});f.deviceCameraVideo=new f("device-camera-video",{fontCharacter:"\\ead9"});f.deviceCamera=new f("device-camera",{fontCharacter:"\\eada"});f.deviceMobile=new f("device-mobile",{fontCharacter:"\\eadb"});f.diffAdded=new f("diff-added",{fontCharacter:"\\eadc"});f.diffIgnored=new f("diff-ignored",{fontCharacter:"\\eadd"});f.diffModified=new f("diff-modified",{fontCharacter:"\\eade"});f.diffRemoved=new f("diff-removed",{fontCharacter:"\\eadf"});f.diffRenamed=new f("diff-renamed",{fontCharacter:"\\eae0"});f.diff=new f("diff",{fontCharacter:"\\eae1"});f.discard=new f("discard",{fontCharacter:"\\eae2"});f.editorLayout=new f("editor-layout",{fontCharacter:"\\eae3"});f.emptyWindow=new f("empty-window",{fontCharacter:"\\eae4"});f.exclude=new f("exclude",{fontCharacter:"\\eae5"});f.extensions=new f("extensions",{fontCharacter:"\\eae6"});f.eyeClosed=new f("eye-closed",{fontCharacter:"\\eae7"});f.fileBinary=new f("file-binary",{fontCharacter:"\\eae8"});f.fileCode=new f("file-code",{fontCharacter:"\\eae9"});f.fileMedia=new f("file-media",{fontCharacter:"\\eaea"});f.filePdf=new f("file-pdf",{fontCharacter:"\\eaeb"});f.fileSubmodule=new f("file-submodule",{fontCharacter:"\\eaec"});f.fileSymlinkDirectory=new f("file-symlink-directory",{fontCharacter:"\\eaed"});f.fileSymlinkFile=new f("file-symlink-file",{fontCharacter:"\\eaee"});f.fileZip=new f("file-zip",{fontCharacter:"\\eaef"});f.files=new f("files",{fontCharacter:"\\eaf0"});f.filter=new f("filter",{fontCharacter:"\\eaf1"});f.flame=new f("flame",{fontCharacter:"\\eaf2"});f.foldDown=new f("fold-down",{fontCharacter:"\\eaf3"});f.foldUp=new f("fold-up",{fontCharacter:"\\eaf4"});f.fold=new f("fold",{fontCharacter:"\\eaf5"});f.folderActive=new f("folder-active",{fontCharacter:"\\eaf6"});f.folderOpened=new f("folder-opened",{fontCharacter:"\\eaf7"});f.gear=new f("gear",{fontCharacter:"\\eaf8"});f.gift=new f("gift",{fontCharacter:"\\eaf9"});f.gistSecret=new f("gist-secret",{fontCharacter:"\\eafa"});f.gist=new f("gist",{fontCharacter:"\\eafb"});
6f.gitCommit=new f("git-commit",{fontCharacter:"\\eafc"});f.gitCompare=new f("git-compare",{fontCharacter:"\\eafd"});f.gitMerge=new f("git-merge",{fontCharacter:"\\eafe"});f.githubAction=new f("github-action",{fontCharacter:"\\eaff"});f.githubAlt=new f("github-alt",{fontCharacter:"\\eb00"});f.globe=new f("globe",{fontCharacter:"\\eb01"});f.grabber=new f("grabber",{fontCharacter:"\\eb02"});f.graph=new f("graph",{fontCharacter:"\\eb03"});f.gripper=new f("gripper",{fontCharacter:"\\eb04"});f.heart=new f("heart",{fontCharacter:"\\eb05"});f.home=new f("home",{fontCharacter:"\\eb06"});f.horizontalRule=new f("horizontal-rule",{fontCharacter:"\\eb07"});f.hubot=new f("hubot",{fontCharacter:"\\eb08"});f.inbox=new f("inbox",{fontCharacter:"\\eb09"});f.issueClosed=new f("issue-closed",{fontCharacter:"\\eba4"});f.issueReopened=new f("issue-reopened",{fontCharacter:"\\eb0b"});f.issues=new f("issues",{fontCharacter:"\\eb0c"});f.italic=new f("italic",{fontCharacter:"\\eb0d"});f.jersey=new f("jersey",{fontCharacter:"\\eb0e"});f.json=new f("json",{fontCharacter:"\\eb0f"});f.kebabVertical=new f("kebab-vertical",{fontCharacter:"\\eb10"});f.key=new f("key",{fontCharacter:"\\eb11"});f.law=new f("law",{fontCharacter:"\\eb12"});f.lightbulbAutofix=new f("lightbulb-autofix",{fontCharacter:"\\eb13"});f.linkExternal=new f("link-external",{fontCharacter:"\\eb14"});f.link=new f("link",{fontCharacter:"\\eb15"});f.listOrdered=new f("list-ordered",{fontCharacter:"\\eb16"});f.listUnordered=new f("list-unordered",{fontCharacter:"\\eb17"});f.liveShare=new f("live-share",{fontCharacter:"\\eb18"});f.loading=new f("loading",{fontCharacter:"\\eb19"});f.location=new f("location",{fontCharacter:"\\eb1a"});f.mailRead=new f("mail-read",{fontCharacter:"\\eb1b"});f.mail=new f("mail",{fontCharacter:"\\eb1c"});f.markdown=new f("markdown",{fontCharacter:"\\eb1d"});f.megaphone=new f("megaphone",{fontCharacter:"\\eb1e"});f.mention=new f("mention",{fontCharacter:"\\eb1f"});f.milestone=new f("milestone",{fontCharacter:"\\eb20"});f.mortarBoard=new f("mortar-board",{fontCharacter:"\\eb21"});f.move=new f("move",{fontCharacter:"\\eb22"});f.multipleWindows=new f("multiple-windows",{fontCharacter:"\\eb23"});f.mute=new f("mute",{fontCharacter:"\\eb24"});f.noNewline=new f("no-newline",{fontCharacter:"\\eb25"});f.note=new f("note",{fontCharacter:"\\eb26"});f.octoface=new f("octoface",{fontCharacter:"\\eb27"});f.openPreview=new f("open-preview",{fontCharacter:"\\eb28"});f.package_=new f("package",{fontCharacter:"\\eb29"});f.paintcan=new f("paintcan",{fontCharacter:"\\eb2a"});f.pin=new f("pin",{fontCharacter:"\\eb2b"});f.play=new f("play",{fontCharacter:"\\eb2c"});f.run=new f("run",{fontCharacter:"\\eb2c"});f.plug=new f("plug",{fontCharacter:"\\eb2d"});f.preserveCase=new f("preserve-case",{fontCharacter:"\\eb2e"});f.preview=new f("preview",{fontCharacter:"\\eb2f"});f.project=new f("project",{fontCharacter:"\\eb30"});f.pulse=new f("pulse",{fontCharacter:"\\eb31"});f.question=new f("question",{fontCharacter:"\\eb32"});f.quote=new f("quote",{fontCharacter:"\\eb33"});f.radioTower=new f("radio-tower",{fontCharacter:"\\eb34"});f.reactions=new f("reactions",{fontCharacter:"\\eb35"});f.references=new f("references",{fontCharacter:"\\eb36"});f.refresh=new f("refresh",{fontCharacter:"\\eb37"});f.regex=new f("regex",{fontCharacter:"\\eb38"});f.remoteExplorer=new f("remote-explorer",{fontCharacter:"\\eb39"});f.remote=new f("remote",{fontCharacter:"\\eb3a"});f.remove=new f("remove",{fontCharacter:"\\eb3b"});f.replaceAll=new f("replace-all",{fontCharacter:"\\eb3c"});f.replace=new f("replace",{fontCharacter:"\\eb3d"});f.repoClone=new f("repo-clone",{fontCharacter:"\\eb3e"});f.repoForcePush=new f("repo-force-push",{fontCharacter:"\\eb3f"});f.repoPull=new f("repo-pull",{fontCharacter:"\\eb40"});f.repoPush=new f("repo-push",{fontCharacter:"\\eb41"});f.report=new f("report",{fontCharacter:"\\eb42"});f.requestChanges=new f("request-changes",{fontCharacter:"\\eb43"});f.rocket=new f("rocket",{fontCharacter:"\\eb44"});f.rootFolderOpened=new f("root-folder-opened",{fontCharacter:"\\eb45"});f.rootFolder=new f("root-folder",{fontCharacter:"\\eb46"});f.rss=new f("rss",{fontCharacter:"\\eb47"});f.ruby=new f("ruby",{fontCharacter:"\\eb48"});f.saveAll=new f("save-all",{fontCharacter:"\\eb49"});f.saveAs=new f("save-as",{fontCharacter:"\\eb4a"});f.save=new f("save",{fontCharacter:"\\eb4b"});f.screenFull=new f("screen-full",{fontCharacter:"\\eb4c"});f.screenNormal=new f("screen-normal",{fontCharacter:"\\eb4d"});f.searchStop=new f("search-stop",{fontCharacter:"\\eb4e"});f.server=new f("server",{fontCharacter:"\\eb50"});f.settingsGear=new f("settings-gear",{fontCharacter:"\\eb51"});f.settings=new f("settings",{fontCharacter:"\\eb52"});f.shield=new f("shield",{fontCharacter:"\\eb53"});f.smiley=new f("smiley",{fontCharacter:"\\eb54"});f.sortPrecedence=new f("sort-precedence",{fontCharacter:"\\eb55"});f.splitHorizontal=new f("split-horizontal",{fontCharacter:"\\eb56"});f.splitVertical=new f("split-vertical",{fontCharacter:"\\eb57"});f.squirrel=new f("squirrel",{fontCharacter:"\\eb58"});f.starFull=new f("star-full",{fontCharacter:"\\eb59"});f.starHalf=new f("star-half",{fontCharacter:"\\eb5a"});f.symbolClass=new f("symbol-class",{fontCharacter:"\\eb5b"});f.symbolColor=new f("symbol-color",{fontCharacter:"\\eb5c"});f.symbolCustomColor=new f("symbol-customcolor",{fontCharacter:"\\eb5c"});f.symbolConstant=new f("symbol-constant",{fontCharacter:"\\eb5d"});f.symbolEnumMember=new f("symbol-enum-member",{fontCharacter:"\\eb5e"});f.symbolField=new f("symbol-field",{fontCharacter:"\\eb5f"});f.symbolFile=new f("symbol-file",{fontCharacter:"\\eb60"});f.symbolInterface=new f("symbol-interface",{fontCharacter:"\\eb61"});f.symbolKeyword=new f("symbol-keyword",{fontCharacter:"\\eb62"});f.symbolMisc=new f("symbol-misc",{fontCharacter:"\\eb63"});f.symbolOperator=new f("symbol-operator",{fontCharacter:"\\eb64"});f.symbolProperty=new f("symbol-property",{fontCharacter:"\\eb65"});f.wrench=new f("wrench",{fontCharacter:"\\eb65"});f.wrenchSubaction=new f("wrench-subaction",{fontCharacter:"\\eb65"});f.symbolSnippet=new f("symbol-snippet",{fontCharacter:"\\eb66"});f.tasklist=new f("tasklist",{fontCharacter:"\\eb67"});f.telescope=new f("telescope",{fontCharacter:"\\eb68"});f.textSize=new f("text-size",{fontCharacter:"\\eb69"});f.threeBars=new f("three-bars",{fontCharacter:"\\eb6a"});f.thumbsdown=new f("thumbsdown",{fontCharacter:"\\eb6b"});f.thumbsup=new f("thumbsup",{fontCharacter:"\\eb6c"});f.tools=new f("tools",{fontCharacter:"\\eb6d"});f.triangleDown=new f("triangle-down",{fontCharacter:"\\eb6e"});f.triangleLeft=new f("triangle-left",{fontCharacter:"\\eb6f"});f.triangleRight=new f("triangle-right",{fontCharacter:"\\eb70"});f.triangleUp=new f("triangle-up",{fontCharacter:"\\eb71"});f.twitter=new f("twitter",{fontCharacter:"\\eb72"});f.unfold=new f("unfold",{fontCharacter:"\\eb73"});f.unlock=new f("unlock",{fontCharacter:"\\eb74"});f.unmute=new f("unmute",{fontCharacter:"\\eb75"});f.unverified=new f("unverified",{fontCharacter:"\\eb76"});f.verified=new f("verified",{fontCharacter:"\\eb77"});f.versions=new f("versions",{fontCharacter:"\\eb78"});f.vmActive=new f("vm-active",{fontCharacter:"\\eb79"});f.vmOutline=new f("vm-outline",{fontCharacter:"\\eb7a"});f.vmRunning=new f("vm-running",{fontCharacter:"\\eb7b"});f.watch=new f("watch",{fontCharacter:"\\eb7c"});f.whitespace=new f("whitespace",{fontCharacter:"\\eb7d"});f.wholeWord=new f("whole-word",{fontCharacter:"\\eb7e"});f.window=new f("window",{fontCharacter:"\\eb7f"});f.wordWrap=new f("word-wrap",{fontCharacter:"\\eb80"});f.zoomIn=new f("zoom-in",{fontCharacter:"\\eb81"});f.zoomOut=new f("zoom-out",{fontCharacter:"\\eb82"});f.listFilter=new f("list-filter",{fontCharacter:"\\eb83"});f.listFlat=new f("list-flat",{fontCharacter:"\\eb84"});f.listSelection=new f("list-selection",{fontCharacter:"\\eb85"});f.selection=new f("selection",{fontCharacter:"\\eb85"});f.listTree=new f("list-tree",{fontCharacter:"\\eb86"});
6f.debugBreakpointFunctionUnverified=new f("debug-breakpoint-function-unverified",{fontCharacter:"\\eb87"});f.debugBreakpointFunction=new f("debug-breakpoint-function",{fontCharacter:"\\eb88"});f.debugBreakpointFunctionDisabled=new f("debug-breakpoint-function-disabled",{fontCharacter:"\\eb88"});f.debugStackframeActive=new f("debug-stackframe-active",{fontCharacter:"\\eb89"});f.debugStackframeDot=new f("debug-stackframe-dot",{fontCharacter:"\\eb8a"});f.debugStackframe=new f("debug-stackframe",{fontCharacter:"\\eb8b"});f.debugStackframeFocused=new f("debug-stackframe-focused",{fontCharacter:"\\eb8b"});f.debugBreakpointUnsupported=new f("debug-breakpoint-unsupported",{fontCharacter:"\\eb8c"});f.symbolString=new f("symbol-string",{fontCharacter:"\\eb8d"});f.debugReverseContinue=new f("debug-reverse-continue",{fontCharacter:"\\eb8e"});f.debugStepBack=new f("debug-step-back",{fontCharacter:"\\eb8f"});f.debugRestartFrame=new f("debug-restart-frame",{fontCharacter:"\\eb90"});f.callIncoming=new f("call-incoming",{fontCharacter:"\\eb92"});f.callOutgoing=new f("call-outgoing",{fontCharacter:"\\eb93"});f.menu=new f("menu",{fontCharacter:"\\eb94"});f.expandAll=new f("expand-all",{fontCharacter:"\\eb95"});f.feedback=new f("feedback",{fontCharacter:"\\eb96"});f.groupByRefType=new f("group-by-ref-type",{fontCharacter:"\\eb97"});f.ungroupByRefType=new f("ungroup-by-ref-type",{fontCharacter:"\\eb98"});f.account=new f("account",{fontCharacter:"\\eb99"});f.bellDot=new f("bell-dot",{fontCharacter:"\\eb9a"});f.debugConsole=new f("debug-console",{fontCharacter:"\\eb9b"});f.library=new f("library",{fontCharacter:"\\eb9c"});f.output=new f("output",{fontCharacter:"\\eb9d"});f.runAll=new f("run-all",{fontCharacter:"\\eb9e"});f.syncIgnored=new f("sync-ignored",{fontCharacter:"\\eb9f"});f.pinned=new f("pinned",{fontCharacter:"\\eba0"});f.githubInverted=new f("github-inverted",{fontCharacter:"\\eba1"});f.debugAlt=new f("debug-alt",{fontCharacter:"\\eb91"});f.serverProcess=new f("server-process",{fontCharacter:"\\eba2"});f.serverEnvironment=new f("server-environment",{fontCharacter:"\\eba3"});f.pass=new f("pass",{fontCharacter:"\\eba4"});f.stopCircle=new f("stop-circle",{fontCharacter:"\\eba5"});f.playCircle=new f("play-circle",{fontCharacter:"\\eba6"});f.record=new f("record",{fontCharacter:"\\eba7"});f.debugAltSmall=new f("debug-alt-small",{fontCharacter:"\\eba8"});f.vmConnect=new f("vm-connect",{fontCharacter:"\\eba9"});f.cloud=new f("cloud",{fontCharacter:"\\ebaa"});f.merge=new f("merge",{fontCharacter:"\\ebab"});f.exportIcon=new f("export",{fontCharacter:"\\ebac"});f.graphLeft=new f("graph-left",{fontCharacter:"\\ebad"});f.magnet=new f("magnet",{fontCharacter:"\\ebae"});f.notebook=new f("notebook",{fontCharacter:"\\ebaf"});f.redo=new f("redo",{fontCharacter:"\\ebb0"});f.checkAll=new f("check-all",{fontCharacter:"\\ebb1"});f.pinnedDirty=new f("pinned-dirty",{fontCharacter:"\\ebb2"});f.passFilled=new f("pass-filled",{fontCharacter:"\\ebb3"});f.circleLargeFilled=new f("circle-large-filled",{fontCharacter:"\\ebb4"});f.circleLargeOutline=new f("circle-large-outline",{fontCharacter:"\\ebb5"});f.combine=new f("combine",{fontCharacter:"\\ebb6"});f.gather=new f("gather",{fontCharacter:"\\ebb6"});f.table=new f("table",{fontCharacter:"\\ebb7"});f.variableGroup=new f("variable-group",{fontCharacter:"\\ebb8"});f.typeHierarchy=new f("type-hierarchy",{fontCharacter:"\\ebb9"});f.typeHierarchySub=new f("type-hierarchy-sub",{fontCharacter:"\\ebba"});f.typeHierarchySuper=new f("type-hierarchy-super",{fontCharacter:"\\ebbb"});f.gitPullRequestCreate=new f("git-pull-request-create",{fontCharacter:"\\ebbc"});f.runAbove=new f("run-above",{fontCharacter:"\\ebbd"});f.runBelow=new f("run-below",{fontCharacter:"\\ebbe"});f.notebookTemplate=new f("notebook-template",{fontCharacter:"\\ebbf"});f.debugRerun=new f("debug-rerun",{fontCharacter:"\\ebc0"});f.workspaceTrusted=new f("workspace-trusted",{fontCharacter:"\\ebc1"});f.workspaceUntrusted=new f("workspace-untrusted",{fontCharacter:"\\ebc2"});f.workspaceUnspecified=new f("workspace-unspecified",{fontCharacter:"\\ebc3"});f.terminalCmd=new f("terminal-cmd",{fontCharacter:"\\ebc4"});f.terminalDebian=new f("terminal-debian",{fontCharacter:"\\ebc5"});f.terminalLinux=new f("terminal-linux",{fontCharacter:"\\ebc6"});f.terminalPowershell=new f("terminal-powershell",{fontCharacter:"\\ebc7"});f.terminalTmux=new f("terminal-tmux",{fontCharacter:"\\ebc8"});f.terminalUbuntu=new f("terminal-ubuntu",{fontCharacter:"\\ebc9"});f.terminalBash=new f("terminal-bash",{fontCharacter:"\\ebca"});f.arrowSwap=new f("arrow-swap",{fontCharacter:"\\ebcb"});f.copy=new f("copy",{fontCharacter:"\\ebcc"});f.personAdd=new f("person-add",{fontCharacter:"\\ebcd"});f.filterFilled=new f("filter-filled",{fontCharacter:"\\ebce"});f.wand=new f("wand",{fontCharacter:"\\ebcf"});f.debugLineByLine=new f("debug-line-by-line",{fontCharacter:"\\ebd0"});
6f.inspect=new f("inspect",{fontCharacter:"\\ebd1"});f.layers=new f("layers",{fontCharacter:"\\ebd2"});f.layersDot=new f("layers-dot",{fontCharacter:"\\ebd3"});f.layersActive=new f("layers-active",{fontCharacter:"\\ebd4"});f.compass=new f("compass",{fontCharacter:"\\ebd5"});f.compassDot=new f("compass-dot",{fontCharacter:"\\ebd6"});f.compassActive=new f("compass-active",{fontCharacter:"\\ebd7"});f.azure=new f("azure",{fontCharacter:"\\ebd8"});f.issueDraft=new f("issue-draft",{fontCharacter:"\\ebd9"});f.gitPullRequestClosed=new f("git-pull-request-closed",{fontCharacter:"\\ebda"});f.gitPullRequestDraft=new f("git-pull-request-draft",{fontCharacter:"\\ebdb"});f.debugAll=new f("debug-all",{fontCharacter:"\\ebdc"});f.debugCoverage=new f("debug-coverage",{fontCharacter:"\\ebdd"});f.runErrors=new f("run-errors",{fontCharacter:"\\ebde"});f.folderLibrary=new f("folder-library",{fontCharacter:"\\ebdf"});f.debugContinueSmall=new f("debug-continue-small",{fontCharacter:"\\ebe0"});f.beakerStop=new f("beaker-stop",{fontCharacter:"\\ebe1"});f.graphLine=new f("graph-line",{fontCharacter:"\\ebe2"});f.graphScatter=new f("graph-scatter",{fontCharacter:"\\ebe3"});f.pieChart=new f("pie-chart",{fontCharacter:"\\ebe4"});f.bracket=new f("bracket",f.json.definition);f.bracketDot=new f("bracket-dot",{fontCharacter:"\\ebe5"});f.bracketError=new f("bracket-error",{fontCharacter:"\\ebe6"});f.lockSmall=new f("lock-small",{fontCharacter:"\\ebe7"});f.azureDevops=new f("azure-devops",{fontCharacter:"\\ebe8"});f.verifiedFilled=new f("verified-filled",{fontCharacter:"\\ebe9"});f.newLine=new f("newline",{fontCharacter:"\\ebea"});f.layout=new f("layout",{fontCharacter:"\\ebeb"});f.layoutActivitybarLeft=new f("layout-activitybar-left",{fontCharacter:"\\ebec"});f.layoutActivitybarRight=new f("layout-activitybar-right",{fontCharacter:"\\ebed"});f.layoutPanelLeft=new f("layout-panel-left",{fontCharacter:"\\ebee"});f.layoutPanelCenter=new f("layout-panel-center",{fontCharacter:"\\ebef"});f.layoutPanelJustify=new f("layout-panel-justify",{fontCharacter:"\\ebf0"});f.layoutPanelRight=new f("layout-panel-right",{fontCharacter:"\\ebf1"});f.layoutPanel=new f("layout-panel",{fontCharacter:"\\ebf2"});f.layoutSidebarLeft=new f("layout-sidebar-left",{fontCharacter:"\\ebf3"});f.layoutSidebarRight=new f("layout-sidebar-right",{fontCharacter:"\\ebf4"});f.layoutStatusbar=new f("layout-statusbar",{fontCharacter:"\\ebf5"});f.layoutMenubar=new f("layout-menubar",{fontCharacter:"\\ebf6"});f.layoutCentered=new f("layout-centered",{fontCharacter:"\\ebf7"});f.target=new f("target",{fontCharacter:"\\ebf8"});f.indent=new f("indent",{fontCharacter:"\\ebf9"});f.recordSmall=new f("record-small",{fontCharacter:"\\ebfa"});f.errorSmall=new f("error-small",{fontCharacter:"\\ebfb"});f.arrowCircleDown=new f("arrow-circle-down",{fontCharacter:"\\ebfc"});f.arrowCircleLeft=new f("arrow-circle-left",{fontCharacter:"\\ebfd"});f.arrowCircleRight=new f("arrow-circle-right",{fontCharacter:"\\ebfe"});f.arrowCircleUp=new f("arrow-circle-up",{fontCharacter:"\\ebff"});f.dialogError=new f("dialog-error",f.error.definition);f.dialogWarning=new f("dialog-warning",f.warning.definition);f.dialogInfo=new f("dialog-info",f.info.definition);f.dialogClose=new f("dialog-close",f.close.definition);f.treeItemExpanded=new f("tree-item-expanded",f.chevronDown.definition);f.treeFilterOnTypeOn=new f("tree-filter-on-type-on",f.listFilter.definition);f.treeFilterOnTypeOff=new f("tree-filter-on-type-off",f.listSelection.definition);f.treeFilterClear=new f("tree-filter-clear",f.close.definition);f.treeItemLoading=new f("tree-item-loading",f.loading.definition);f.menuSelection=new f("menu-selection",f.check.definition);f.menuSubmenu=new f("menu-submenu",f.chevronRight.definition);f.menuBarMore=new f("menubar-more",f.more.definition);f.scrollbarButtonLeft=new f("scrollbar-button-left",f.triangleLeft.definition);f.scrollbarButtonRight=new f("scrollbar-button-right",f.triangleRight.definition);f.scrollbarButtonUp=new f("scrollbar-button-up",f.triangleUp.definition);f.scrollbarButtonDown=new f("scrollbar-button-down",f.triangleDown.definition);f.toolBarMore=new f("toolbar-more",f.more.definition);f.quickInputBack=new f("quick-input-back",f.arrowLeft.definition);var qt;(function(t){t.iconNameSegment="[A-Za-z0-9]+",t.iconNameExpression="[A-Za-z0-9-]+",t.iconModifierExpression="~[A-Za-z]+",t.iconNameCharacter="[A-Za-z0-9~-]";const e=new RegExp(`^(${t.iconNameExpression})(${t.iconModifierExpression})?$`);function i(r){if(r instanceof f)return["codicon","codicon-"+r.id];const o=e.exec(r.id);if(!o)return i(f.error);let[,a,l]=o;const h=["codicon","codicon-"+a];return l&&h.push("codicon-modifier-"+l.substr(1)),h}t.asClassNameArray=i;function n(r){return i(r).join(" ")}t.asClassName=n;function s(r){return"."+i(r).join(".")}t.asCSSSelector=s})(qt||(qt={}));var li=class{static getLanguageId(t){return(t&255)>>>0}static getTokenType(t){return(t&768)>>>8}static getFontStyle(t){return(t&15360)>>>10}static getForeground(t){return(t&8372224)>>>14}
6static getBackground(t){return(t&4286578688)>>>23}static getClassNameFromMetadata(t){let e="mtk"+this.getForeground(t);const i=this.getFontStyle(t);return i&1&&(e+=" mtki"),i&2&&(e+=" mtkb"),i&4&&(e+=" mtku"),i&8&&(e+=" mtks"),e}static getInlineStyleFromMetadata(t,e){const i=this.getForeground(t),n=this.getFontStyle(t);let s=`color: ${e[i]};`;n&1&&(s+="font-style: italic;"),n&2&&(s+="font-weight: bold;");let r="";return n&4&&(r+=" underline"),n&8&&(r+=" line-through"),r&&(s+=`text-decoration:${r};`),s}static getPresentationFromMetadata(t){const e=this.getForeground(t),i=this.getFontStyle(t);return{foreground:e,italic:!!(i&1),bold:!!(i&2),underline:!!(i&4),strikethrough:!!(i&8)}}},nh=class{constructor(t,e,i){this._tokenBrand=void 0,this.offset=t,this.type=e,this.language=i}toString(){return"("+this.offset+", "+this.type+")"}},iv=class{constructor(t,e){this._tokenizationResultBrand=void 0,this.tokens=t,this.endState=e}},Uu=class{constructor(t,e){this._encodedTokenizationResultBrand=void 0,this.tokens=t,this.endState=e}},Z0;(function(t){const e=new Map;e.set(0,f.symbolMethod),e.set(1,f.symbolFunction),e.set(2,f.symbolConstructor),e.set(3,f.symbolField),e.set(4,f.symbolVariable),e.set(5,f.symbolClass),e.set(6,f.symbolStruct),e.set(7,f.symbolInterface),e.set(8,f.symbolModule),e.set(9,f.symbolProperty),e.set(10,f.symbolEvent),e.set(11,f.symbolOperator),e.set(12,f.symbolUnit),e.set(13,f.symbolValue),e.set(15,f.symbolEnum),e.set(14,f.symbolConstant),e.set(15,f.symbolEnum),e.set(16,f.symbolEnumMember),e.set(17,f.symbolKeyword),e.set(27,f.symbolSnippet),e.set(18,f.symbolText),e.set(19,f.symbolColor),e.set(20,f.symbolFile),e.set(21,f.symbolReference),e.set(22,f.symbolCustomColor),e.set(23,f.symbolFolder),e.set(24,f.symbolTypeParameter),e.set(25,f.account),e.set(26,f.issues);function i(r){let o=e.get(r);return o||(o=f.symbolProperty),o}t.toIcon=i;const n=new Map;n.set("method",0),n.set("function",1),n.set("constructor",2),n.set("field",3),n.set("variable",4),n.set("class",5),n.set("struct",6),n.set("interface",7),n.set("module",8),n.set("property",9),n.set("event",10),n.set("operator",11),n.set("unit",12),n.set("value",13),n.set("constant",14),n.set("enum",15),n.set("enum-member",16),n.set("enumMember",16),n.set("keyword",17),n.set("snippet",27),n.set("text",18),n.set("color",19),n.set("file",20),n.set("reference",21),n.set("customcolor",22),n.set("folder",23),n.set("type-parameter",24),n.set("typeParameter",24),n.set("account",25),n.set("issue",26);function s(r,o){let a=n.get(r);return typeof a>"u"&&!o&&(a=9),a}t.fromString=s})(Z0||(Z0={}));var Y0;(function(t){t[t.Automatic=0]="Automatic",t[t.Explicit=1]="Explicit"})(Y0||(Y0={}));var X0;(function(t){t[t.Invoke=1]="Invoke",t[t.TriggerCharacter=2]="TriggerCharacter",t[t.ContentChange=3]="ContentChange"})(X0||(X0={}));var Q0;(function(t){t[t.Text=0]="Text",t[t.Read=1]="Read",t[t.Write=2]="Write"})(Q0||(Q0={}));var J0;(function(t){const e=new Map;e.set(0,f.symbolFile),e.set(1,f.symbolModule),e.set(2,f.symbolNamespace),e.set(3,f.symbolPackage),e.set(4,f.symbolClass),e.set(5,f.symbolMethod),e.set(6,f.symbolProperty),e.set(7,f.symbolField),e.set(8,f.symbolConstructor),e.set(9,f.symbolEnum),e.set(10,f.symbolInterface),e.set(11,f.symbolFunction),e.set(12,f.symbolVariable),e.set(13,f.symbolConstant),e.set(14,f.symbolString),e.set(15,f.symbolNumber),e.set(16,f.symbolBoolean),e.set(17,f.symbolArray),e.set(18,f.symbolObject),e.set(19,f.symbolKey),e.set(20,f.symbolNull),e.set(21,f.symbolEnumMember),e.set(22,f.symbolStruct),e.set(23,f.symbolEvent),e.set(24,f.symbolOperator),e.set(25,f.symbolTypeParameter);function i(n){let s=e.get(n);return s||(s=f.symbolProperty),s}t.toIcon=i})(J0||(J0={}));var Jr=class{constructor(t){this.value=t}};Jr.Comment=new Jr("comment");Jr.Imports=new Jr("imports");Jr.Region=new Jr("region");var eC;(function(t){function e(i){return!i||typeof i!="object"?!1:typeof i.id=="string"&&typeof i.title=="string"}t.is=e})(eC||(eC={}));var tC;(function(t){t[t.Type=1]="Type",t[t.Parameter=2]="Parameter"})(tC||(tC={}));var Ge=new E4,rm;(function(t){t[t.Unknown=0]="Unknown",t[t.Disabled=1]="Disabled",t[t.Enabled=2]="Enabled"})(rm||(rm={}));var om;(function(t){t[t.KeepWhitespace=1]="KeepWhitespace",t[t.InsertAsSnippet=4]="InsertAsSnippet"})(om||(om={}));var am;(function(t){t[t.Method=0]="Method",t[t.Function=1]="Function",t[t.Constructor=2]="Constructor",t[t.Field=3]="Field",t[t.Variable=4]="Variable",t[t.Class=5]="Class",t[t.Struct=6]="Struct",t[t.Interface=7]="Interface",t[t.Module=8]="Module",t[t.Property=9]="Property",t[t.Event=10]="Event",t[t.Operator=11]="Operator",t[t.Unit=12]="Unit",t[t.Value=13]="Value",t[t.Constant=14]="Constant",t[t.Enum=15]="Enum",t[t.EnumMember=16]="EnumMember",t[t.Keyword=17]="Keyword",t[t.Text=18]="Text",t[t.Color=19]="Color",t[t.File=20]="File",t[t.Reference=21]="Reference",t[t.Customcolor=22]="Customcolor",t[t.Folder=23]="Folder",t[t.TypeParameter=24]="TypeParameter",t[t.User=25]="User",t[t.Issue=26]="Issue",t[t.Snippet=27]="Snippet"})(am||(am={}));var lm;(function(t){t[t.Deprecated=1]="Deprecated"})(lm||(lm={}));var hm;(function(t){t[t.Invoke=0]="Invoke",t[t.TriggerCharacter=1]="TriggerCharacter",t[t.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"})(hm||(hm={}));var cm;(function(t){t[t.EXACT=0]="EXACT",t[t.ABOVE=1]="ABOVE",t[t.BELOW=2]="BELOW"})(cm||(cm={}));var dm;(function(t){t[t.NotSet=0]="NotSet",t[t.ContentFlush=1]="ContentFlush",t[t.RecoverFromMarkers=2]="RecoverFromMarkers",t[t.Explicit=3]="Explicit",t[t.Paste=4]="Paste",t[t.Undo=5]="Undo",t[t.Redo=6]="Redo"})(dm||(dm={}));var um;(function(t){t[t.LF=1]="LF",t[t.CRLF=2]="CRLF"})(um||(um={}));var fm;(function(t){t[t.Text=0]="Text",t[t.Read=1]="Read",t[t.Write=2]="Write"})(fm||(fm={}));var gm;(function(t){t[t.None=0]="None",t[t.Keep=1]="Keep",t[t.Brackets=2]="Brackets",t[t.Advanced=3]="Advanced",t[t.Full=4]="Full"})(gm||(gm={}));var mm;(function(t){t[t.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",t[t.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",t[t.accessibilitySupport=2]="accessibilitySupport",t[t.accessibilityPageSize=3]="accessibilityPageSize",t[t.ariaLabel=4]="ariaLabel",t[t.autoClosingBrackets=5]="autoClosingBrackets",t[t.autoClosingDelete=6]="autoClosingDelete",t[t.autoClosingOvertype=7]="autoClosingOvertype",t[t.autoClosingQuotes=8]="autoClosingQuotes",t[t.autoIndent=9]="autoIndent",t[t.automaticLayout=10]="automaticLayout",t[t.autoSurround=11]="autoSurround",t[t.bracketPairColorization=12]="bracketPairColorization",t[t.guides=13]="guides",t[t.codeLens=14]="codeLens",t[t.codeLensFontFamily=15]="codeLensFontFamily",t[t.codeLensFontSize=16]="codeLensFontSize",t[t.colorDecorators=17]="colorDecorators",t[t.columnSelection=18]="columnSelection",t[t.comments=19]="comments",t[t.contextmenu=20]="contextmenu",t[t.copyWithSyntaxHighlighting=21]="copyWithSyntaxHighlighting",t[t.cursorBlinking=22]="cursorBlinking",t[t.cursorSmoothCaretAnimation=23]="cursorSmoothCaretAnimation",t[t.cursorStyle=24]="cursorStyle",t[t.cursorSurroundingLines=25]="cursorSurroundingLines",t[t.cursorSurroundingLinesStyle=26]="cursorSurroundingLinesStyle",t[t.cursorWidth=27]="cursorWidth",t[t.disableLayerHinting=28]="disableLayerHinting",t[t.disableMonospaceOptimizations=29]="disableMonospaceOptimizations",t[t.domReadOnly=30]="domReadOnly",t[t.dragAndDrop=31]="dragAndDrop",t[t.emptySelectionClipboard=32]="emptySelectionClipboard",t[t.extraEditorClassName=33]="extraEditorClassName",t[t.fastScrollSensitivity=34]="fastScrollSensitivity",t[t.find=35]="find",t[t.fixedOverflowWidgets=36]="fixedOverflowWidgets",t[t.folding=37]="folding",t[t.foldingStrategy=38]="foldingStrategy",t[t.foldingHighlight=39]="foldingHighlight",t[t.foldingImportsByDefault=40]="foldingImportsByDefault",t[t.foldingMaximumRegions=41]="foldingMaximumRegions",t[t.unfoldOnClickAfterEndOfLine=42]="unfoldOnClickAfterEndOfLine",t[t.fontFamily=43]="fontFamily",t[t.fontInfo=44]="fontInfo",t[t.fontLigatures=45]="fontLigatures",t[t.fontSize=46]="fontSize",t[t.fontWeight=47]="fontWeight",t[t.formatOnPaste=48]="formatOnPaste",t[t.formatOnType=49]="formatOnType",t[t.glyphMargin=50]="glyphMargin",t[t.gotoLocation=51]="gotoLocation",t[t.hideCursorInOverviewRuler=52]="hideCursorInOverviewRuler",t[t.hover=53]="hover",t[t.inDiffEditor=54]="inDiffEditor",t[t.inlineSuggest=55]="inlineSuggest",t[t.letterSpacing=56]="letterSpacing",t[t.lightbulb=57]="lightbulb",t[t.lineDecorationsWidth=58]="lineDecorationsWidth",t[t.lineHeight=59]="lineHeight",t[t.lineNumbers=60]="lineNumbers",t[t.lineNumbersMinChars=61]="lineNumbersMinChars",t[t.linkedEditing=62]="linkedEditing",t[t.links=63]="links",t[t.matchBrackets=64]="matchBrackets",t[t.minimap=65]="minimap",t[t.mouseStyle=66]="mouseStyle",t[t.mouseWheelScrollSensitivity=67]="mouseWheelScrollSensitivity",t[t.mouseWheelZoom=68]="mouseWheelZoom",t[t.multiCursorMergeOverlapping=69]="multiCursorMergeOverlapping",t[t.multiCursorModifier=70]="multiCursorModifier",t[t.multiCursorPaste=71]="multiCursorPaste",t[t.occurrencesHighlight=72]="occurrencesHighlight",t[t.overviewRulerBorder=73]="overviewRulerBorder",t[t.overviewRulerLanes=74]="overviewRulerLanes",t[t.padding=75]="padding",t[t.parameterHints=76]="parameterHints",t[t.peekWidgetDefaultFocus=77]="peekWidgetDefaultFocus",t[t.definitionLinkOpensInPeek=78]="definitionLinkOpensInPeek",t[t.quickSuggestions=79]="quickSuggestions",t[t.quickSuggestionsDelay=80]="quickSuggestionsDelay",t[t.readOnly=81]="readOnly",t[t.renameOnType=82]="renameOnType",t[t.renderControlCharacters=83]="renderControlCharacters",t[t.renderFinalNewline=84]="renderFinalNewline",t[t.renderLineHighlight=85]="renderLineHighlight",t[t.renderLineHighlightOnlyWhenFocus=86]="renderLineHighlightOnlyWhenFocus",t[t.renderValidationDecorations=87]="renderValidationDecorations",t[t.renderWhitespace=88]="renderWhitespace",t[t.revealHorizontalRightPadding=89]="revealHorizontalRightPadding",t[t.roundedSelection=90]="roundedSelection",t[t.rulers=91]="rulers",t[t.scrollbar=92]="scrollbar",t[t.scrollBeyondLastColumn=93]="scrollBeyondLastColumn",t[t.scrollBeyondLastLine=94]="scrollBeyondLastLine",t[t.scrollPredominantAxis=95]="scrollPredominantAxis",t[t.selectionClipboard=96]="selectionClipboard",t[t.selectionHighlight=97]="selectionHighlight",t[t.selectOnLineNumbers=98]="selectOnLineNumbers",t[t.showFoldingControls=99]="showFoldingControls",t[t.showUnused=100]="showUnused",t[t.snippetSuggestions=101]="snippetSuggestions",t[t.smartSelect=102]="smartSelect",t[t.smoothScrolling=103]="smoothScrolling",t[t.stickyTabStops=104]="stickyTabStops",t[t.stopRenderingLineAfter=105]="stopRenderingLineAfter",t[t.suggest=106]="suggest",t[t.suggestFontSize=107]="suggestFontSize",t[t.suggestLineHeight=108]="suggestLineHeight",t[t.suggestOnTriggerCharacters=109]="suggestOnTriggerCharacters",t[t.suggestSelection=110]="suggestSelection",t[t.tabCompletion=111]="tabCompletion",t[t.tabIndex=112]="tabIndex",t[t.unicodeHighlighting=113]="unicodeHighlighting",t[t.unusualLineTerminators=114]="unusualLineTerminators",t[t.useShadowDOM=115]="useShadowDOM",t[t.useTabStops=116]="useTabStops",t[t.wordSeparators=117]="wordSeparators",t[t.wordWrap=118]="wordWrap",t[t.wordWrapBreakAfterCharacters=119]="wordWrapBreakAfterCharacters",t[t.wordWrapBreakBeforeCharacters=120]="wordWrapBreakBeforeCharacters",t[t.wordWrapColumn=121]="wordWrapColumn",t[t.wordWrapOverride1=122]="wordWrapOverride1",t[t.wordWrapOverride2=123]="wordWrapOverride2",t[t.wrappingIndent=124]="wrappingIndent",t[t.wrappingStrategy=125]="wrappingStrategy",t[t.showDeprecated=126]="showDeprecated",t[t.inlayHints=127]="inlayHints",t[t.editorClassName=128]="editorClassName",t[t.pixelRatio=129]="pixelRatio",t[t.tabFocusMode=130]="tabFocusMode",t[t.layoutInfo=131]="layoutInfo",t[t.wrappingInfo=132]="wrappingInfo"})(mm||(mm={}));var pm;(function(t){t[t.TextDefined=0]="TextDefined",t[t.LF=1]="LF",t[t.CRLF=2]="CRLF"})(pm||(pm={}));var _m;(function(t){t[t.LF=0]="LF",t[t.CRLF=1]="CRLF"})(_m||(_m={}));var vm;(function(t){t[t.None=0]="None",t[t.Indent=1]="Indent",t[t.IndentOutdent=2]="IndentOutdent",t[t.Outdent=3]="Outdent"})(vm||(vm={}));var Cm;(function(t){t[t.Both=0]="Both",t[t.Right=1]="Right",t[t.Left=2]="Left",t[t.None=3]="None"})(Cm||(Cm={}));var bm;(function(t){t[t.Type=1]="Type",t[t.Parameter=2]="Parameter"})(bm||(bm={}));var wm;(function(t){t[t.Automatic=0]="Automatic",t[t.Explicit=1]="Explicit"})(wm||(wm={}));var Sm;(function(t){t[t.DependsOnKbLayout=-1]="DependsOnKbLayout",t[t.Unknown=0]="Unknown",t[t.Backspace=1]="Backspace",t[t.Tab=2]="Tab",t[t.Enter=3]="Enter",t[t.Shift=4]="Shift",t[t.Ctrl=5]="Ctrl",t[t.Alt=6]="Alt",t[t.PauseBreak=7]="PauseBreak",t[t.CapsLock=8]="CapsLock",t[t.Escape=9]="Escape",t[t.Space=10]="Space",t[t.PageUp=11]="PageUp",t[t.PageDown=12]="PageDown",t[t.End=13]="End",t[t.Home=14]="Home",t[t.LeftArrow=15]="LeftArrow",t[t.UpArrow=16]="UpArrow",t[t.RightArrow=17]="RightArrow",t[t.DownArrow=18]="DownArrow",t[t.Insert=19]="Insert",t[t.Delete=20]="Delete",t[t.Digit0=21]="Digit0",t[t.Digit1=22]="Digit1",t[t.Digit2=23]="Digit2",t[t.Digit3=24]="Digit3",t[t.Digit4=25]="Digit4",t[t.Digit5=26]="Digit5",t[t.Digit6=27]="Digit6",t[t.Digit7=28]="Digit7",t[t.Digit8=29]="Digit8",t[t.Digit9=30]="Digit9",t[t.KeyA=31]="KeyA",t[t.KeyB=32]="KeyB",t[t.KeyC=33]="KeyC",t[t.KeyD=34]="KeyD",t[t.KeyE=35]="KeyE",t[t.KeyF=36]="KeyF",t[t.KeyG=37]="KeyG",t[t.KeyH=38]="KeyH",t[t.KeyI=39]="KeyI",t[t.KeyJ=40]="KeyJ",t[t.KeyK=41]="KeyK",t[t.KeyL=42]="KeyL",t[t.KeyM=43]="KeyM",t[t.KeyN=44]="KeyN",t[t.KeyO=45]="KeyO",t[t.KeyP=46]="KeyP",t[t.KeyQ=47]="KeyQ",t[t.KeyR=48]="KeyR",t[t.KeyS=49]="KeyS",t[t.KeyT=50]="KeyT",t[t.KeyU=51]="KeyU",t[t.KeyV=52]="KeyV",t[t.KeyW=53]="KeyW",t[t.KeyX=54]="KeyX",t[t.KeyY=55]="KeyY",t[t.KeyZ=56]="KeyZ",t[t.Meta=57]="Meta",t[t.ContextMenu=58]="ContextMenu",t[t.F1=59]="F1",t[t.F2=60]="F2",t[t.F3=61]="F3",t[t.F4=62]="F4",t[t.F5=63]="F5",t[t.F6=64]="F6",t[t.F7=65]="F7",t[t.F8=66]="F8",t[t.F9=67]="F9",t[t.F10=68]="F10",t[t.F11=69]="F11",t[t.F12=70]="F12",t[t.F13=71]="F13",t[t.F14=72]="F14",t[t.F15=73]="F15",t[t.F16=74]="F16",t[t.F17=75]="F17",t[t.F18=76]="F18",t[t.F19=77]="F19",t[t.NumLock=78]="NumLock",t[t.ScrollLock=79]="ScrollLock",t[t.Semicolon=80]="Semicolon",t[t.Equal=81]="Equal",t[t.Comma=82]="Comma",t[t.Minus=83]="Minus",t[t.Period=84]="Perio
6d",t[t.Slash=85]="Slash",t[t.Backquote=86]="Backquote",t[t.BracketLeft=87]="BracketLeft",t[t.Backslash=88]="Backslash",t[t.BracketRight=89]="BracketRight",t[t.Quote=90]="Quote",t[t.OEM_8=91]="OEM_8",t[t.IntlBackslash=92]="IntlBackslash",t[t.Numpad0=93]="Numpad0",t[t.Numpad1=94]="Numpad1",t[t.Numpad2=95]="Numpad2",t[t.Numpad3=96]="Numpad3",t[t.Numpad4=97]="Numpad4",t[t.Numpad5=98]="Numpad5",t[t.Numpad6=99]="Numpad6",t[t.Numpad7=100]="Numpad7",t[t.Numpad8=101]="Numpad8",t[t.Numpad9=102]="Numpad9",t[t.NumpadMultiply=103]="NumpadMultiply",t[t.NumpadAdd=104]="NumpadAdd",t[t.NUMPAD_SEPARATOR=105]="NUMPAD_SEPARATOR",t[t.NumpadSubtract=106]="NumpadSubtract",t[t.NumpadDecimal=107]="NumpadDecimal",t[t.NumpadDivide=108]="NumpadDivide",t[t.KEY_IN_COMPOSITION=109]="KEY_IN_COMPOSITION",t[t.ABNT_C1=110]="ABNT_C1",t[t.ABNT_C2=111]="ABNT_C2",t[t.AudioVolumeMute=112]="AudioVolumeMute",t[t.AudioVolumeUp=113]="AudioVolumeUp",t[t.AudioVolumeDown=114]="AudioVolumeDown",t[t.BrowserSearch=115]="BrowserSearch",t[t.BrowserHome=116]="BrowserHome",t[t.BrowserBack=117]="BrowserBack",t[t.BrowserForward=118]="BrowserForward",t[t.MediaTrackNext=119]="MediaTrackNext",t[t.MediaTrackPrevious=120]="MediaTrackPrevious",t[t.MediaStop=121]="MediaStop",t[t.MediaPlayPause=122]="MediaPlayPause",t[t.LaunchMediaPlayer=123]="LaunchMediaPlayer",t[t.LaunchMail=124]="LaunchMail",t[t.LaunchApp2=125]="LaunchApp2",t[t.Clear=126]="Clear",t[t.MAX_VALUE=127]="MAX_VALUE"})(Sm||(Sm={}));var ym;(function(t){t[t.Hint=1]="Hint",t[t.Info=2]="Info",t[t.Warning=4]="Warning",t[t.Error=8]="Error"})(ym||(ym={}));var Lm;(function(t){t[t.Unnecessary=1]="Unnecessary",t[t.Deprecated=2]="Deprecated"})(Lm||(Lm={}));var km;(function(t){t[t.Inline=1]="Inline",t[t.Gutter=2]="Gutter"})(km||(km={}));var xm;(function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.TEXTAREA=1]="TEXTAREA",t[t.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",t[t.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",t[t.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",t[t.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",t[t.CONTENT_TEXT=6]="CONTENT_TEXT",t[t.CONTENT_EMPTY=7]="CONTENT_EMPTY",t[t.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",t[t.CONTENT_WIDGET=9]="CONTENT_WIDGET",t[t.OVERVIEW_RULER=10]="OVERVIEW_RULER",t[t.SCROLLBAR=11]="SCROLLBAR",t[t.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",t[t.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"})(xm||(xm={}));var Im;(function(t){t[t.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",t[t.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",t[t.TOP_CENTER=2]="TOP_CENTER"})(Im||(Im={}));var Em;(function(t){t[t.Left=1]="Left",t[t.Center=2]="Center",t[t.Right=4]="Right",t[t.Full=7]="Full"})(Em||(Em={}));var Dm;(function(t){t[t.Left=0]="Left",t[t.Right=1]="Right",t[t.None=2]="None"})(Dm||(Dm={}));var Nm;(function(t){t[t.Off=0]="Off",t[t.On=1]="On",t[t.Relative=2]="Relative",t[t.Interval=3]="Interval",t[t.Custom=4]="Custom"})(Nm||(Nm={}));var Tm;(function(t){t[t.None=0]="None",t[t.Text=1]="Text",t[t.Blocks=2]="Blocks"})(Tm||(Tm={}));var Mm;(function(t){t[t.Smooth=0]="Smooth",t[t.Immediate=1]="Immediate"})(Mm||(Mm={}));var Rm;(function(t){t[t.Auto=1]="Auto",t[t.Hidden=2]="Hidden",t[t.Visible=3]="Visible"})(Rm||(Rm={}));var Am;(function(t){t[t.LTR=0]="LTR",t[t.RTL=1]="RTL"})(Am||(Am={}));var Om;(function(t){t[t.Invoke=1]="Invoke",t[t.TriggerCharacter=2]="TriggerCharacter",t[t.ContentChange=3]="ContentChange"})(Om||(Om={}));var Pm;(function(t){t[t.File=0]="File",t[t.Module=1]="Module",t[t.Namespace=2]="Namespace",t[t.Package=3]="Package",t[t.Class=4]="Class",t[t.Method=5]="Method",t[t.Property=6]="Property",t[t.Field=7]="Field",t[t.Constructor=8]="Constructor",t[t.Enum=9]="Enum",t[t.Interface=10]="Interface",t[t.Function=11]="Function",t[t.Variable=12]="Variable",t[t.Constant=13]="Constant",t[t.String=14]="String",t[t.Number=15]="Number",t[t.Boolean=16]="Boolean",t[t.Array=17]="Array",t[t.Object=18]="Object",t[t.Key=19]="Key",t[t.Null=20]="Null",t[t.EnumMember=21]="EnumMember",t[t.Struct=22]="Struct",t[t.Event=23]="Event",t[t.Operator=24]="Operator",t[t.TypeParameter=25]="TypeParameter"})(Pm||(Pm={}));var Fm;(function(t){t[t.Deprecated=1]="Deprecated"})(Fm||(Fm={}));var Bm;(function(t){t[t.Hidden=0]="Hidden",t[t.Blink=1]="Blink",t[t.Smooth=2]="Smooth",t[t.Phase=3]="Phase",t[t.Expand=4]="Expand",t[t.Solid=5]="Solid"})(Bm||(Bm={}));var Vm;(function(t){t[t.Line=1]="Line",t[t.Block=2]="Block",t[t.Underline=3]="Underline",t[t.LineThin=4]="LineThin",t[t.BlockOutline=5]="BlockOutline",t[t.UnderlineThin=6]="UnderlineThin"})(Vm||(Vm={}));var Wm;(function(t){t[t.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",t[t.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",t[t.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",t[t.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"})(Wm||(Wm={}));var Hm;(function(t){t[t.None=0]="None",t[t.Same=1]="Same",t[t.Indent=2]="Indent",t[t.DeepIndent=3]="DeepIndent"})(Hm||(Hm={}));var Nh=class{static chord(t,e){return c4(t,e)}};Nh.CtrlCmd=2048;Nh.Shift=1024;Nh.Alt=512;Nh.WinCtrl=256;function Py(){return{editor:void 0,languages:void 0,CancellationTokenSource:Ba,Emitter:M,KeyCode:Sm,KeyMod:Nh,Position:A,Range:T,Selection:xe,SelectionDirection:Am,MarkerSeverity:ym,Mar
6kerTag:Lm,Uri:Le,Token:nh}}var T4=class{constructor(t){this.computeFn=t,this.lastCache=void 0,this.lastArgKey=void 0}get(t){const e=JSON.stringify(t);return this.lastArgKey!==e&&(this.lastArgKey=e,this.lastCache=this.computeFn(t)),this.lastCache}},Fy=class{constructor(t){this.executor=t,this._didRun=!1}getValue(){if(!this._didRun)try{this._value=this.executor()}catch(t){this._error=t}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}},By;function M4(t){return!t||typeof t!="string"?!0:t.trim().length===0}var R4=/{(\d+)}/g;function Hd(t,...e){return e.length===0?t:t.replace(R4,function(i,n){const s=parseInt(n,10);return isNaN(s)||s<0||s>=e.length?i:e[s]})}function A4(t){return t.replace(/[<>&]/g,function(e){switch(e){case"<":return"&lt;";case">":return"&gt;";case"&":return"&amp;";default:return e}})}function Vn(t){return t.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function Vy(t,e){if(!t||!e)return t;const i=e.length;if(i===0||t.length===0)return t;let n=0;for(;t.indexOf(e,n)===n;)n=n+i;return t.substring(n)}function O4(t,e){if(!t||!e)return t;const i=e.length,n=t.length;if(i===0||n===0)return t;let s=n,r=-1;for(;r=t.lastIndexOf(e,s-1),!(r===-1||r+i!==s);){if(r===0)return"";s=r}return t.substring(0,s)}function P4(t){return t.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function Wy(t,e,i={}){if(!t)throw new Error("Cannot create regex from empty string");e||(t=Vn(t)),i.wholeWord&&(/\B/.test(t.charAt(0))||(t="\\b"+t),/\B/.test(t.charAt(t.length-1))||(t=t+"\\b"));let n="";return i.global&&(n+="g"),i.matchCase||(n+="i"),i.multiline&&(n+="m"),i.unicode&&(n+="u"),new RegExp(t,n)}function F4(t){return t.source==="^"||t.source==="^$"||t.source==="$"||t.source==="^\\s*$"?!1:!!(t.exec("")&&t.lastIndex===0)}function Sf(t){return(t.global?"g":"")+(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")}function Th(t){return t.split(/\r\n|\r|\n/)}function fi(t){for(let e=0,i=t.length;e<i;e++){const n=t.charCodeAt(e);if(n!==32&&n!==9)return e}return-1}function Rt(t,e=0,i=t.length){for(let n=e;n<i;n++){const s=t.charCodeAt(n);if(s!==32&&s!==9)return t.substring(e,n)}return t.substring(e,i)}function Va(t,e=t.length-1){for(let i=e;i>=0;i--){const n=t.charCodeAt(i);if(n!==32&&n!==9)return i}return-1}function zm(t,e){return t<e?-1:t>e?1:0}function nv(t,e,i=0,n=t.length,s=0,r=e.length){for(;i<n&&s<r;i++,s++){let l=t.charCodeAt(i),h=e.charCodeAt(s);if(l<h)return-1;if(l>h)return 1}const o=n-i,a=r-s;return o<a?-1:o>a?1:0}function iC(t,e){return Mh(t,e,0,t.length,0,e.length)}function Mh(t,e,i=0,n=t.length,s=0,r=e.length){for(;i<n&&s<r;i++,s++){let l=t.charCodeAt(i),h=e.charCodeAt(s);if(l===h)continue;if(l>=128||h>=128)return nv(t.toLowerCase(),e.toLowerCase(),i,n,s,r);Ko(l)&&(l-=32),Ko(h)&&(h-=32);const c=l-h;if(c!==0)return c}const o=n-i,a=r-s;return o<a?-1:o>a?1:0}function Ko(t){return t>=97&&t<=122}function Os(t){return t>=65&&t<=90}function jo(t,e){return t.length===e.length&&Mh(t,e)===0}function sv(t,e){const i=e.length;return e.length>t.length?!1:Mh(t,e,0,i)===0}function nC(t,e){let i,n=Math.min(t.length,e.length);for(i=0;i<n;i++)if(t.charCodeAt(i)!==e.charCodeAt(i))return i;return n}function sC(t,e){let i,n=Math.min(t.length,e.length);const s=t.length-1,r=e.length-1;for(i=0;i<n;i++)if(t.charCodeAt(s-i)!==e.charCodeAt(r-i))return i;return n}function at(t){return 55296<=t&&t<=56319}function wa(t){return 56320<=t&&t<=57343}function rv(t,e){return(t-55296<<10)+(e-56320)+65536}function zd(t,e,i){const n=t.charCodeAt(i);if(at(n)&&i+1<e){const s=t.charCodeAt(i+1);if(wa(s))return rv(n,s)}return n}function B4(t,e){const i=t.charCodeAt(e-1);if(wa(i)&&e>1){const n=t.charCodeAt(e-2);if(at(n))return rv(n,i)}return i}var ov=class{constructor(t,e=0){this._str=t,this._len=t.length,this._offset=e}get offset(){return this._offset}setOffset(t){this._offset=t}prevCodePoint(){const t=B4(this._str,this._offset);return this._offset-=t>=65536?2:1,t}nextCodePoint(){const t=zd(this._str,this._len,this._offset);return this._offset+=t>=65536?2:1,t}eol(){return this._offset>=this._len}},Ud=class{constructor(t,e=0){this._iterator=new ov(t,e)}get offset(){return this._iterator.offset}nextGraphemeLength(){const t=Um.getInstance(),e=this._iterator,i=e.offset;
6let n=t.getGraphemeBreakType(e.nextCodePoint());for(;!e.eol();){const s=e.offset,r=t.getGraphemeBreakType(e.nextCodePoint());if(rC(n,r)){e.setOffset(s);break}n=r}return e.offset-i}prevGraphemeLength(){const t=Um.getInstance(),e=this._iterator,i=e.offset;let n=t.getGraphemeBreakType(e.prevCodePoint());for(;e.offset>0;){const s=e.offset,r=t.getGraphemeBreakType(e.prevCodePoint());if(rC(r,n)){e.setOffset(s);break}n=r}return i-e.offset}eol(){return this._iterator.eol()}};function av(t,e){return new Ud(t,e).nextGraphemeLength()}function Hy(t,e){return new Ud(t,e).prevGraphemeLength()}function V4(t,e){e>0&&wa(t.charCodeAt(e))&&e--;const i=e+av(t,e);return[i-Hy(t,i),i]}var W4=/(?:[\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 lv(t){return W4.test(t)}var H4=/^[\t\n\r\x20-\x7E]*$/;function hv(t){return H4.test(t)}var zy=/[\u2028\u2029]/;function Uy(t){return zy.test(t)}function ir(t){return t>=11904&&t<=55215||t>=63744&&t<=64255||t>=65281&&t<=65374}function cv(t){return t>=127462&&t<=127487||t===8986||t===8987||t===9200||t===9203||t>=9728&&t<=10175||t===11088||t===11093||t>=127744&&t<=128591||t>=128640&&t<=128764||t>=128992&&t<=129008||t>=129280&&t<=129535||t>=129648&&t<=129782}function dv(t){return!!(t&&t.length>0&&t.charCodeAt(0)===65279)}function z4(t,e=!1){return t?(e&&(t=t.replace(/\\./g,"")),t.toLowerCase()!==t):!1}function $y(t){return t=t%52,t<26?String.fromCharCode(97+t):String.fromCharCode(65+t-26)}function rC(t,e){return t===0?e!==5&&e!==7:t===2&&e===3?!1:t===4||t===2||t===3||e===4||e===2||e===3?!0:!(t===8&&(e===8||e===9||e===11||e===12)||(t===11||t===9)&&(e===9||e===10)||(t===12||t===10)&&e===10||e===5||e===13||e===7||t===1||t===13&&e===14||t===6&&e===6)}var Um=class bl{constructor(){this._data=U4()}static getInstance(){return bl._INSTANCE||(bl._INSTANCE=new bl),bl._INSTANCE}getGraphemeBreakType(e){if(e<32)return e===10?3:e===13?2:4;if(e<127)return 0;const i=this._data,n=i.length/3;let s=1;for(;s<=n;)if(e<i[3*s])s=2*s;else if(e>i[3*s+1])s=2*s+1;else return i[3*s+2];return 0}};Um._INSTANCE=null;function U4
vendor: 27,536 bytes, line 6
6(){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]")}
6function $4(t,e){if(t===0)return 0;const i=K4(t,e);if(i!==void 0)return i;const n=new ov(e,t);return n.prevCodePoint(),n.offset}function K4(t,e){const i=new ov(e,t);let n=i.prevCodePoint();for(;j4(n)||n===65039||n===8419;){if(i.offset===0)return;n=i.prevCodePoint()}if(!cv(n))return;let s=i.offset;return s>0&&i.prevCodePoint()===8205&&(s=i.offset),s}function j4(t){return 127995<=t&&t<=127999}var bs=class $m{constructor(e){this.confusableDictionary=e}static getInstance(e){return $m.cache.get(Array.from(e))}static getLocales(){return $m._locales.getValue()}isAmbiguous(e){return this.confusableDictionary.has(e)}getPrimaryConfusable(e){return this.confusableDictionary.get(e)}getConfusableCodePoints(){return new Set(this.confusableDictionary.keys())}};By=bs;bs.ambiguousCharacterData=new Fy
vendor: 14,801 bytes, line 6
6(()=>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
6],"_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]}'));bs.cache=new T4(t=>{function e(l){const h=new Map;for(let c=0;c<l.length;c+=2)h.set(l[c],l[c+1]);return h}function i(l,h){const c=new Map(l);for(const[d,u]of h)c.set(d,u);return c}function n(l,h){if(!l)return h;const c=new Map;for(const[d,u]of l)h.has(d)&&c.set(d,u);return c}const s=By.ambiguousCharacterData.getValue();let r=t.filter(l=>!l.startsWith("_")&&l in s);r.length===0&&(r=["_default"]);let o;for(const l of r){const h=e(s[l]);o=n(o,h)}const a=i(e(s._common),o);return new bs(a)});bs._locales=new Fy(()=>Object.keys(bs.ambiguousCharacterData.getValue()).filter(t=>!t.startsWith("_")));var Gc=class Zc{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,9
617552,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(Zc.getRawData())),this._data}static isInvisibleCharacter(e){return Zc.getData().has(e)}static get codePoints(){return Zc.getData()}};Gc._data=void 0;var q4=ny({PixelRatio:()=>sh,getZoomFactor:()=>Ky,isAndroid:()=>jy,isChrome:()=>uv,isElectron:()=>X4,isFirefox:()=>Ii,isSafari:()=>Wn,isStandalone:()=>qy,isWebKit:()=>js,isWebkitWebView:()=>fv}),Km=class{constructor(){this._zoomFactor=1}getZoomFactor(){return this._zoomFactor}};Km.INSTANCE=new Km;var G4=class extends V{constructor(){super(),this._onDidChange=this._register(new M),this.onDidChange=this._onDidChange.event,this._listener=()=>this._handleChange(!0),this._mediaQueryList=null,this._handleChange(!1)}_handleChange(t){this._mediaQueryList&&this._mediaQueryList.removeEventListener("change",this._listener),this._mediaQueryList=matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`),this._mediaQueryList.addEventListener("change",this._listener),t&&this._onDidChange.fire()}},Z4=class extends V{constructor(){super(),this._onDidChange=this._register(new M),this.onDidChange=this._onDidChange.event,this._value=this._getPixelRatio();const t=this._register(new G4);this._register(t.onDidChange(()=>{this._value=this._getPixelRatio(),this._onDidChange.fire(this._value)}))}get value(){return this._value}_getPixelRatio(){const t=document.createElement("canvas").getContext("2d");return(window.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1)}},Y4=class{constructor(){this._pixelRatioMonitor=null}_getOrCreatePixelRatioMonitor(){return this._pixelRatioMonitor||(this._pixelRatioMonitor=new Z4),this._pixelRatioMonitor}get value(){return this._getOrCreatePixelRatioMonitor().value}get onDidChange(){return this._getOrCreatePixelRatioMonitor().onDidChange}},sh=new Y4;function Ky(){return Km.INSTANCE.getZoomFactor()}var Wa=navigator.userAgent,Ii=Wa.indexOf("Firefox")>=0,js=Wa.indexOf("AppleWebKit")>=0,uv=Wa.indexOf("Chrome")>=0,Wn=!uv&&Wa.indexOf("Safari")>=0,fv=!uv&&!Wn&&js,X4=Wa.indexOf("Electron/")>=0,jy=Wa.indexOf("Android")>=0,qy=window.matchMedia&&window.matchMedia("(display-mode: standalone)").matches,Gy=class{constructor(t){this.domNode=t,this._maxWidth=-1,this._width=-1,this._height=-1,this._top=-1,this._left=-1,this._bottom=-1,this._right=-1,this._fontFamily="",this._fontWeight="",this._fontSize=-1,this._fontStyle="",this._fontFeatureSettings="",this._textDecoration="",this._lineHeight=-1,this._letterSpacing=-100,this._className="",this._display="",this._position="",this._visibility="",this._color="",this._backgroundColor="",this._layerHint=!1,this._contain="none",this._boxSh
6adow=""}setMaxWidth(t){this._maxWidth!==t&&(this._maxWidth=t,this.domNode.style.maxWidth=this._maxWidth+"px")}setWidth(t){this._width!==t&&(this._width=t,this.domNode.style.width=this._width+"px")}setHeight(t){this._height!==t&&(this._height=t,this.domNode.style.height=this._height+"px")}setTop(t){this._top!==t&&(this._top=t,this.domNode.style.top=this._top+"px")}unsetTop(){this._top!==-1&&(this._top=-1,this.domNode.style.top="")}setLeft(t){this._left!==t&&(this._left=t,this.domNode.style.left=this._left+"px")}setBottom(t){this._bottom!==t&&(this._bottom=t,this.domNode.style.bottom=this._bottom+"px")}setRight(t){this._right!==t&&(this._right=t,this.domNode.style.right=this._right+"px")}setFontFamily(t){this._fontFamily!==t&&(this._fontFamily=t,this.domNode.style.fontFamily=this._fontFamily)}setFontWeight(t){this._fontWeight!==t&&(this._fontWeight=t,this.domNode.style.fontWeight=this._fontWeight)}setFontSize(t){this._fontSize!==t&&(this._fontSize=t,this.domNode.style.fontSize=this._fontSize+"px")}setFontStyle(t){this._fontStyle!==t&&(this._fontStyle=t,this.domNode.style.fontStyle=this._fontStyle)}setFontFeatureSettings(t){this._fontFeatureSettings!==t&&(this._fontFeatureSettings=t,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings)}setTextDecoration(t){this._textDecoration!==t&&(this._textDecoration=t,this.domNode.style.textDecoration=this._textDecoration)}setLineHeight(t){this._lineHeight!==t&&(this._lineHeight=t,this.domNode.style.lineHeight=this._lineHeight+"px")}setLetterSpacing(t){this._letterSpacing!==t&&(this._letterSpacing=t,this.domNode.style.letterSpacing=this._letterSpacing+"px")}setClassName(t){this._className!==t&&(this._className=t,this.domNode.className=this._className)}toggleClassName(t,e){this.domNode.classList.toggle(t,e),this._className=this.domNode.className}setDisplay(t){this._display!==t&&(this._display=t,this.domNode.style.display=this._display)}setPosition(t){this._position!==t&&(this._position=t,this.domNode.style.position=this._position)}setVisibility(t){this._visibility!==t&&(this._visibility=t,this.domNode.style.visibility=this._visibility)}setColor(t){this._color!==t&&(this._color=t,this.domNode.style.color=this._color)}setBackgroundColor(t){this._backgroundColor!==t&&(this._backgroundColor=t,this.domNode.style.backgroundColor=this._backgroundColor)}setLayerHinting(t){this._layerHint!==t&&(this._layerHint=t,this.domNode.style.transform=this._layerHint?"translate3d(0px, 0px, 0px)":"")}setBoxShadow(t){this._boxShadow!==t&&(this._boxShadow=t,this.domNode.style.boxShadow=t)}setContain(t){this._contain!==t&&(this._contain=t,this.domNode.style.contain=this._contain)}setAttribute(t,e){this.domNode.setAttribute(t,e)}removeAttribute(t){this.domNode.removeAttribute(t)}appendChild(t){this.domNode.appendChild(t.domNode)}removeChild(t){this.domNode.removeChild(t.domNode)}};function de(t){return new Gy(t)}function Zt(t,e){t instanceof Gy?(t.setFontFamily(e.getMassagedFontFamily(Wn?di.fontFamily:null)),t.setFontWeight(e.fontWeight),t.setFontSize(e.fontSize),t.setFontFeatureSettings(e.fontFeatureSettings),t.setLineHeight(e.lineHeight),t.setLetterSpacing(e.letterSpacing)):(t.style.fontFamily=e.getMassagedFontFamily(Wn?di.fontFamily:null),t.style.fontWeight=e.fontWeight,t.style.fontSize=e.fontSize+"px",t.style.fontFeatureSettings=e.fontFeatureSettings,t.style.lineHeight=e.lineHeight+"px",t.style.letterSpacing=e.letterSpacing+"px")}var Q4=class{constructor(t,e){this.chr=t,this.type=e,this.width=0}fulfill(t){this.width=t}},J4=class Zy{constructor(e,i){this._bareFontInfo=e,this._requests=i,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 e=document.createElement("div");e.style.position="absolute",e.style.top="-50000px",e.style.width="50000px";const i=document.createElement("div");Zt(i,this._bareFontInfo),e.appendChild(i);const n=document.createElement("div");Zt(n,this._bareFontInfo),n.style.fontWeight="bold",e.appendChild(n);const s=document.createElement("div");Zt(s,this._bareFontInfo),s.style.fontStyle="italic",e.appendChild(s);const r=[];for(const o of this._requests){let a;o.type===0&&(a=i),o.type===2&&(a=n),o.type===1&&(a=s),a.appendChild(document.createElement("br"));const l=document.createElement("span");Zy._render(l,o),a.appendChild(l),r.push(l)}this._container=e,this._testElements=r}static _render(e,i){if(i.chr===" "){let n=" ";for(let s=0;s<8;s++)n+=n;e.innerText=n}else{let n=i.chr;for(let s=0;s<8;s++)n+=n;e.textContent=n}}_readFromDomElements(){for(let e=0,i=this._requests.length;e<i;e++){const n=this._requests[e],s=this._testElements[e];n.fulfill(s.offsetWidth/256)}}};function eT(t,e){new J4(t,e).read()}var $d=new class{constructor(){this._zoomLevel=0,this._onDidChangeZoomLevel=new M,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event}getZoomLevel(){return this._zoomLevel}setZoomLevel(t){t=Math.min(Math.max(-5,t),20),this._zoomLevel!==t&&(this._zoomLevel=t,this._onDidChangeZoomLevel.fire(this._zoomLevel))}},tT=fe?1.5:1.35,yf=8,gv=class Yc{constructor(e){this._bareFontInfoBrand=void 0,this.pixelRatio=e.pixelRatio,this.fontFamily=String(e.fontFamily),this.fontWeight=String(e.fontWeight),this.fontSize=e.fontSize,this.fontFeatureSettings=e.fontFeatureSettings,this.lineHeight=e.lineHeight|0,this.letterSpacing=e.letterSpacing}static createFromValidatedSettings(e,i,n){const s=e.get(43),r=e.get(47),o=e.get(46),a=e.get(45),l=e.get(59),h=e.get(56);return Yc._create(s,r,o,a,l,h,i,n)}static _create(e,i,n,s,r,o,a,l){r===0?r=tT*n:r<yf&&(r=r*n),r=Math.round(r),r<yf&&(r=yf);const h=1+(l?0:$d.getZoomLevel()*.1);return n*=h,r*=h,new Yc({pixelRatio:a,fontFamily:e,fontWeight:i,fontSize:n,fontFeatureSettings:s,lineHeight:r,letterSpacing:o})}getId(){return`${this.pixelRatio}-${this.fontFamily}-${this.fontWeight}-${this.fontSize}-${this.fontFeatureSettings}-${this.lineHeight}-${this.letterSpacing}`}getMassagedFontFamily(e){const i=Yc._wrapInQuotes(this.fontFamily);return e&&this.fontFamily!==e?`${i}, ${e}`:i}static _wrapInQuotes(e){return/[,"']/.test(e)?e:/[+ ]/.test(e)?`"${e}"`:e}};var jm=class extends gv{constructor(t,e){super(t),this._editorStylingBrand=void 0,this.version=1,this.isTrusted=e,this.isMonospace=t.isMonospace,this.typicalHalfwidthCharacterWidth=t.typicalHalfwidthCharacterWidth,this.typicalFullwidthCharacterWidth=t.typicalFullwidthCharacterWidth,this.canUseHalfwidthRightwardsArrow=t.canUseHalfwidthRightwardsArrow,this.spaceWidth=t.spaceWi
6dth,this.middotWidth=t.middotWidth,this.wsmiddotWidth=t.wsmiddotWidth,this.maxDigitWidth=t.maxDigitWidth}equals(t){return this.fontFamily===t.fontFamily&&this.fontWeight===t.fontWeight&&this.fontSize===t.fontSize&&this.fontFeatureSettings===t.fontFeatureSettings&&this.lineHeight===t.lineHeight&&this.letterSpacing===t.letterSpacing&&this.typicalHalfwidthCharacterWidth===t.typicalHalfwidthCharacterWidth&&this.typicalFullwidthCharacterWidth===t.typicalFullwidthCharacterWidth&&this.canUseHalfwidthRightwardsArrow===t.canUseHalfwidthRightwardsArrow&&this.spaceWidth===t.spaceWidth&&this.middotWidth===t.middotWidth&&this.wsmiddotWidth===t.wsmiddotWidth&&this.maxDigitWidth===t.maxDigitWidth}},iT=class extends V{constructor(){super(),this._onDidChange=this._register(new M),this.onDidChange=this._onDidChange.event,this._cache=new oC,this._evictUntrustedReadingsTimeout=-1}dispose(){this._evictUntrustedReadingsTimeout!==-1&&(window.clearTimeout(this._evictUntrustedReadingsTimeout),this._evictUntrustedReadingsTimeout=-1),super.dispose()}clearAllFontInfos(){this._cache=new oC,this._onDidChange.fire()}_writeToCache(t,e){this._cache.put(t,e),!e.isTrusted&&this._evictUntrustedReadingsTimeout===-1&&(this._evictUntrustedReadingsTimeout=window.setTimeout(()=>{this._evictUntrustedReadingsTimeout=-1,this._evictUntrustedReadings()},5e3))}_evictUntrustedReadings(){const t=this._cache.getValues();let e=!1;for(const i of t)i.isTrusted||(e=!0,this._cache.remove(i));e&&this._onDidChange.fire()}readFontInfo(t){if(!this._cache.has(t)){let e=this._actualReadFontInfo(t);(e.typicalHalfwidthCharacterWidth<=2||e.typicalFullwidthCharacterWidth<=2||e.spaceWidth<=2||e.maxDigitWidth<=2)&&(e=new jm({pixelRatio:sh.value,fontFamily:e.fontFamily,fontWeight:e.fontWeight,fontSize:e.fontSize,fontFeatureSettings:e.fontFeatureSettings,lineHeight:e.lineHeight,letterSpacing:e.letterSpacing,isMonospace:e.isMonospace,typicalHalfwidthCharacterWidth:Math.max(e.typicalHalfwidthCharacterWidth,5),typicalFullwidthCharacterWidth:Math.max(e.typicalFullwidthCharacterWidth,5),canUseHalfwidthRightwardsArrow:e.canUseHalfwidthRightwardsArrow,spaceWidth:Math.max(e.spaceWidth,5),middotWidth:Math.max(e.middotWidth,5),wsmiddotWidth:Math.max(e.wsmiddotWidth,5),maxDigitWidth:Math.max(e.maxDigitWidth,5)},!1)),this._writeToCache(t,e)}return this._cache.get(t)}_createRequest(t,e,i,n){const s=new Q4(t,e);return i.push(s),n&&n.push(s),s}_actualReadFontInfo(t){const e=[],i=[],n=this._createRequest("n",0,e,i),s=this._createRequest("m",0,e,null),r=this._createRequest(" ",0,e,i),o=this._createRequest("0",0,e,i),a=this._createRequest("1",0,e,i),l=this._createRequest("2",0,e,i),h=this._createRequest("3",0,e,i),c=this._createRequest("4",0,e,i),d=this._createRequest("5",0,e,i),u=this._createRequest("6",0,e,i),g=this._createRequest("7",0,e,i),m=this._createRequest("8",0,e,i),_=this._createRequest("9",0,e,i),C=this._createRequest("→",0,e,i),w=this._createRequest("→",0,e,null),v=this._createRequest("·",0,e,i),b=this._createRequest("⸱",0,e,null),y="|/-_ilm%";for(let E=0,R=8;E<R;E++)this._createRequest(y.charAt(E),0,e,i),this._createRequest(y.charAt(E),1,e,i),this._createRequest(y.charAt(E),2,e,i);eT(t,e);const k=Math.max(o.width,a.width,l.width,h.width,c.width,d.width,u.width,g.width,m.width,_.width);let S=t.fontFeatureSettings===ho.OFF;const L=i[0].width;for(let E=1,R=i.length;S&&E<R;E++){const D=L-i[E].width;if(D<-.001||D>.001){S=!1;break}}let x=!0;return S&&w.width!==L&&(x=!1),w.width>C.width&&(x=!1),new jm({pixelRatio:sh.value,fontFamily:t.fontFamily,fontWeight:t.fontWeight,fontSize:t.fontSize,fontFeatureSettings:t.fontFeatureSettings,lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,isMonospace:S,typicalHalfwidthCharacterWidth:n.width,typicalFullwidthCharacterWidth:s.width,canUseHalfwidthRightwardsArrow:x,spaceWidth:r.width,middotWidth:v.width,wsmiddotWidth:b.width,maxDigitWidth:k},!0)}},oC=class{constructor(){this._keys=Object.create(null),this._values=Object.create(null)}has(t){const e=t.getId();return!!this._values[e]}get(t){const e=t.getId();return this._values[e]}put(t,e){const i=t.getId();this._keys[i]=t,this._values[i]=e}remove(t){const e=t.getId();delete this._keys[e],delete this._values[e]}getValues(){return Object.keys(this._keys).map(t=>this._values[t])}},qm=new iT,un;(function(t){t.serviceIds=new Map,t.DI_TARGET="$di$target",t.DI_DEPENDENCIES="$di$dependencies";function e(i){return i[t.DI_DEPENDENCIES]||[]}t.getServiceDependencies=e})(un||(un={}));var Qi=ge("instantiationService");function nT(t,e,i){e[un.DI_TARGET]===e?e[un.DI_DEPENDENCIES].push({id:t,index:i}):(e[un.DI_DEPENDENCIES]=[{id:t,index:i}],e[un.DI_TARGET]=e)}function ge(t){if(un.serviceIds.has(t))return un.serviceIds.get(t);const e=function(i,n,s){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");nT(e,i,s)};return e.toString=()=>t,un.serviceIds.set(t,e),e}var pt=ge("codeEditorService");function Xc(t,e){if(!t)throw new Error(e?`Assertion failed (${e})`:"Assertion Failed")}var sT={followsCaret:!0,ignoreCharChanges:!0,alwaysRevealFirst:!0},rT=class extends V{constructor(t,e={}){super(),this._onDidUpdate=this._register(new M),this._editor=t,this._options=ao(e,sT,!1),this.disposed=!1,this.nextIdx=-1,this.ranges=[],this.ignoreSelectionChange=!1,this.revealFirst=!!this._options.alwaysRevealFirst,this._register(this._editor.onDid
6Dispose(()=>this.dispose())),this._register(this._editor.onDidUpdateDiff(()=>this._onDiffUpdated())),this._options.followsCaret&&this._register(this._editor.getModifiedEditor().onDidChangeCursorPosition(i=>{this.ignoreSelectionChange||(this.nextIdx=-1)})),this._options.alwaysRevealFirst&&this._register(this._editor.getModifiedEditor().onDidChangeModel(i=>{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(t){this.ranges=[],t&&t.forEach(e=>{!this._options.ignoreCharChanges&&e.charChanges?e.charChanges.forEach(i=>{this.ranges.push({rhs:!0,range:new T(i.modifiedStartLineNumber,i.modifiedStartColumn,i.modifiedEndLineNumber,i.modifiedEndColumn)})}):e.modifiedEndLineNumber===0?this.ranges.push({rhs:!0,range:new T(e.modifiedStartLineNumber,1,e.modifiedStartLineNumber+1,1)}):this.ranges.push({rhs:!0,range:new T(e.modifiedStartLineNumber,1,e.modifiedEndLineNumber+1,1)})}),this.ranges.sort((e,i)=>T.compareRangesUsingStarts(e.range,i.range)),this._onDidUpdate.fire(this)}_initIdx(t){let e=!1;const i=this._editor.getPosition();if(!i){this.nextIdx=0;return}for(let n=0,s=this.ranges.length;n<s&&!e;n++){const r=this.ranges[n].range;i.isBeforeOrEqual(r.getStartPosition())&&(this.nextIdx=n+(t?0:-1),e=!0)}e||(this.nextIdx=t?0:this.ranges.length-1),this.nextIdx<0&&(this.nextIdx=this.ranges.length-1)}_move(t,e){if(Xc(!this.disposed,"Illegal State - diff navigator has been disposed"),!this.canNavigate())return;this.nextIdx===-1?this._initIdx(t):t?(this.nextIdx+=1,this.nextIdx>=this.ranges.length&&(this.nextIdx=0)):(this.nextIdx-=1,this.nextIdx<0&&(this.nextIdx=this.ranges.length-1));const i=this.ranges[this.nextIdx];this.ignoreSelectionChange=!0;try{const n=i.range.getStartPosition();this._editor.setPosition(n),this._editor.revealRangeInCenter(i.range,e)}finally{this.ignoreSelectionChange=!1}}canNavigate(){return this.ranges&&this.ranges.length>0}next(t=0){this._move(!0,t)}previous(t=0){this._move(!1,t)}dispose(){super.dispose(),this.ranges=[],this.disposed=!0}},mv={ICodeEditor:"vs.editor.ICodeEditor",IDiffEditor:"vs.editor.IDiffEditor"},eo;(function(t){t[t.Left=1]="Left",t[t.Center=2]="Center",t[t.Right=4]="Right",t[t.Full=7]="Full"})(eo||(eo={}));var ms;(function(t){t[t.Inline=1]="Inline",t[t.Gutter=2]="Gutter"})(ms||(ms={}));var Sa;(function(t){t[t.Both=0]="Both",t[t.Right=1]="Right",t[t.Left=2]="Left",t[t.None=3]="None"})(Sa||(Sa={}));var Qc=class{constructor(t){this._textModelResolvedOptionsBrand=void 0,this.tabSize=Math.max(1,t.tabSize|0),this.indentSize=t.tabSize|0,this.insertSpaces=!!t.insertSpaces,this.defaultEOL=t.defaultEOL|0,this.trimAutoWhitespace=!!t.trimAutoWhitespace,this.bracketPairColorizationOptions=t.bracketPairColorizationOptions}equals(t){return this.tabSize===t.tabSize&&this.indentSize===t.indentSize&&this.insertSpaces===t.insertSpaces&&this.defaultEOL===t.defaultEOL&&this.trimAutoWhitespace===t.trimAutoWhitespace&&ki(this.bracketPairColorizationOptions,t.bracketPairColorizationOptions)}createChangeEvent(t){return{tabSize:this.tabSize!==t.tabSize,indentSize:this.indentSize!==t.indentSize,insertSpaces:this.insertSpaces!==t.insertSpaces,trimAutoWhitespace:this.trimAutoWhitespace!==t.trimAutoWhitespace}}},rh=class{constructor(t,e){this._findMatchBrand=void 0,this.range=t,this.matches=e}},Lf=class{constructor(t,e,i,n,s,r){this.identifier=t,this.range=e,this.text=i,this.forceMoveMarkers=n,this.isAutoWhitespaceEdit=s,this._isTracked=r}},oT=class{constructor(t,e,i){this.regex=t,this.wordSeparators=e,this.simpleSearch=i}},aT=class{constructor(t,e,i){this.reverseEdits=t,this.changes=e,this.trimAutoWhitespaceLineNumbers=i}};function lT(t){return!t.isTooLargeForSyncing()&&!t.isForSimpleWidget}var rt;(function(t){t[t.None=0]="None",t[t.Indent=1]="Indent",t[t.IndentOutdent=2]="IndentOutdent",t[t.Outdent=3]="Outdent"})(rt||(rt={}));var kf=class{constructor(t){if(this._neutralCharacter=null,this._neutralCharacterSearched=!1,this.open=t.open,this.close=t.close,this._inString=!0,this._inComment=!0,this._inRegEx=!0,Array.isArray(t.notIn))for(let e=0,i=t.notIn.length;e<i;e++)switch(t.notIn[e]){case"string":this._inString=!1;break;case"comment":this._inComment=!1;break;case"regex":this._inRegEx=!1}}isOK(t){switch(t){case 0:return!0;case 1:return this._inComment;case 2:return this._inString;case 3:return this._inRegEx}}shouldAutoClose(t,e){if(t.getTokenCount()===0)return!0;const i=t.findTokenIndexAtOffset(e-2),n=t.getStandardTokenType(i);return this.isOK(n)}_findNeutralCharacterInRange(t,e){for(let i=t;i<=e;i++){const n=String.fromCharCode(i);if(!this.open.includes(n)&&!this.close.includes(n))return n}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}},hT=class{constructor(t){this.autoClosingPairsOpenByStart=new Map,this.autoClosingPairsOpenByEnd=new Map,this.autoClosingPairsCloseByStart=new Map,this.autoClosingPairsCloseByEnd=new Map,this.autoClosingPairsCloseSingleChar=new Map;for(const e of t)tl(this.autoClosingPairsOpenByStart,e.open.charAt(0),e),tl(this.autoClosingPairsOpenByEnd,e.open.charAt(e.open.length-1),e),tl(this.autoClosingPairsCloseByStart,e.close.charAt(0),e),tl(this.autoClosingPairsCloseByEnd,e.close.charAt(e.close.length-1),e),e.close.length===1&&e.open.length===1&&tl(this.autoClosingPairsCloseSingleChar,e.close,e)}};function tl(t,e,i){t.has(e)?t.get(e).push(i):t.set(e,[i])}function Kd(t,e){const i=t.getCount(),n=t.findTokenIndexAtOffset(e),s=t.getLanguageId(n);let r=n;for(;r+1<i&&t.getLanguageId(r+1)===s;)r++;let o=n;for(;o>0&&t.getLanguageId(o-1)===s;)o--;return new cT(t,s,o,r+1,t.getStartOffset(o),t.getEndOffset(r))}var cT=class{constructor(t,e,i,n,s,r){this._scopedLineTokensBrand=void 0,this._actual=t,this.languageId=e,this._firstTokenIndex=i,this._lastTokenIndex=n,this.firstCharOffset=s,this._lastCharOffset=r}getLineContent(){return this._actual.getLineContent().substring(this.firstCharOffset,this._lastCharOffset)}getActualLineContentBefore(t){return this._actual.getLineContent().substring(0,this.firstCharOffset+t)}getTokenCount(){return this._lastTokenIndex-this._firstTokenIndex}findTokenIndexAtOffset(t){return this._actual.findTokenIndexAtOffset(t+this.firstCharOffset)-this._firstTokenIndex}getStandardTokenType(t){return this._actual.getStandardTokenType(t+this._firstTokenIndex)}};function kn(t){return(t&3)!==0}var Yy=class Xy{constructor(e){if(e.autoClosingPairs?this._autoClosingPairs=e.autoClosingPairs.map(i=>new kf(i)):e.brackets?this._autoClosingPairs=e.brackets.map(i=>new kf({open:i[0],close:i[1]})):this._autoClosingPairs=[],e.colorizedBracketPairs?this._colorizedBracketPairs=aC(e.colorizedBracketPairs.map(i=>[i[0],i[1]])):e.brackets?this._colorizedBracketPairs=aC(e.brackets.map(i=>[i[0],i[1]]).filter(i=>!(i[0]==="<"&&i[1]===">"))):this._colorizedBracketPairs=[],e.__electricCharacterSupport&&e.__electricCharacterSupport.docComment){const i=e.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new kf({open:i.open,close:i.close||""}))}this._autoCloseBefore=typeof e.autoCloseBefore=="string"?e.autoCloseBefore:Xy.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED,this._surroundingPairs=e.surroundingPairs||this._autoClosingPairs}getAutoClosingPairs(){return this._autoClosingPairs}getAutoCloseBeforeSet(){return this._autoCloseBefore}getSurroundingPairs(){return this._surroundingPairs}getColorizedBrackets(){return this._colorizedBracketPairs}};Yy.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED=`;:.,=}])> 
7	`;function aC(t){return t.filter(([e,i])=>e!==""&&i!=="")}var lC=typeof Buffer<"u",xf,Qy=class Jy{constructor(e){this.buffer=e,this.byteLength=this.buffer.byteLength}static wrap(e){return lC&&!Buffer.isBuffer(e)&&(e=Buffer.from(e.buffer,e.byteOffset,e.byteLength)),new Jy(e)}toString(){return lC?this.buffer.toString():(xf||(xf=new TextDecoder),xf.decode(this.buffer))}};function dT(t,e){return t[e+0]<<0>>>0|t[e+1]<<8>>>0}function uT(t,e,i){t[i+0]=e&255,e=e>>>8,t[i+1]=e&255}function rn(t,e){return t[e]*Math.pow(2,24)+t[e+1]*Math.pow(2,16)+t[e+2]*Math.pow(2,8)+t[e+3]}function on(t,e,i){t[i+3]=e,e=e>>>8,t[i+2]=e,e=e>>>8,t[i+1]=e,e=e>>>8,t[i]=e}function hC(t,e){return t[e]}function cC(t,e,i){t[i]=e}var If;function eL(){return If||(If=new TextDecoder("UTF-16LE")),If}var Ef;function fT(){return Ef||(Ef=new TextDecoder("UTF-16BE")),Ef}var Df;function tL(){return Df||(Df=oy()?eL():fT()),Df}var iL=typeof TextDecoder<"u",ya,Gm;iL?(ya=t=>new mT(t),Gm=gT):(ya=t=>new pT,Gm=nL);function gT(t,e,i){const n=new Uint16Array(t.buffer,e,i);return i>
70&&(n[0]===65279||n[0]===65534)?nL(t,e,i):eL().decode(n)}function nL(t,e,i){const n=[];let s=0;for(let r=0;r<i;r++){const o=dT(t,e);e+=2,n[s++]=String.fromCharCode(o)}return n.join("")}var mT=class{constructor(t){this._capacity=t|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 t=new Uint16Array(this._buffer.buffer,0,this._bufferLength);return tL().decode(t)}_flushBuffer(){const t=this._buildBuffer();this._bufferLength=0,this._completedStrings===null?this._completedStrings=[t]:this._completedStrings[this._completedStrings.length]=t}write1(t){const e=this._capacity-this._bufferLength;e<=1&&(e===0||at(t))&&this._flushBuffer(),this._buffer[this._bufferLength++]=t}appendASCII(t){this._bufferLength===this._capacity&&this._flushBuffer(),this._buffer[this._bufferLength++]=t}appendASCIIString(t){const e=t.length;if(this._bufferLength+e>=this._capacity){this._flushBuffer(),this._completedStrings[this._completedStrings.length]=t;return}for(let i=0;i<e;i++)this._buffer[this._bufferLength++]=t.charCodeAt(i)}},pT=class{constructor(){this._pieces=[],this._piecesLen=0}reset(){this._pieces=[],this._piecesLen=0}build(){return this._pieces.join("")}write1(t){this._pieces[this._piecesLen++]=String.fromCharCode(t)}appendASCII(t){this._pieces[this._piecesLen++]=String.fromCharCode(t)}appendASCIIString(t){this._pieces[this._piecesLen++]=t}},_T=class Zm{constructor(e,i,n,s,r,o){this._richEditBracketBrand=void 0,this.languageId=e,this.index=i,this.open=n,this.close=s,this.forwardRegex=r,this.reversedRegex=o,this._openSet=Zm._toSet(this.open),this._closeSet=Zm._toSet(this.close)}isOpen(e){return this._openSet.has(e)}isClose(e){return this._closeSet.has(e)}static _toSet(e){const i=new Set;for(const n of e)i.add(n);return i}};function vT(t){const e=t.length;t=t.map(o=>[o[0].toLowerCase(),o[1].toLowerCase()]);const i=[];for(let o=0;o<e;o++)i[o]=o;const n=(o,a)=>{const[l,h]=o,[c,d]=a;return l===c||l===d||h===c||h===d},s=(o,a)=>{const l=Math.min(o,a),h=Math.max(o,a);for(let c=0;c<e;c++)i[c]===h&&(i[c]=l)};for(let o=0;o<e;o++){const a=t[o];for(let l=o+1;l<e;l++){const h=t[l];n(a,h)&&s(i[o],i[l])}}const r=[];for(let o=0;o<e;o++){const a=[],l=[];for(let h=0;h<e;h++)if(i[h]===o){const[c,d]=t[h];a.push(c),l.push(d)}a.length>0&&r.push({open:a,close:l})}return r}var CT=class{constructor(t,e){this._richEditBracketsBrand=void 0;const i=vT(e);this.brackets=i.map((n,s)=>new _T(t,s,n.open,n.close,bT(n.open,n.close,i,s),wT(n.open,n.close,i,s))),this.forwardRegex=ST(this.brackets),this.reversedRegex=yT(this.brackets),this.textIsBracket={},this.textIsOpenBracket={},this.maxBracketLength=0;for(const n of this.brackets){for(const s of n.open)this.textIsBracket[s]=n,this.textIsOpenBracket[s]=!0,this.maxBracketLength=Math.max(this.maxBracketLength,s.length);for(const s of n.close)this.textIsBracket[s]=n,this.textIsOpenBracket[s]=!1,this.maxBracketLength=Math.max(this.maxBracketLength,s.length)}}};
7function sL(t,e,i,n){for(let s=0,r=e.length;s<r;s++){if(s===i)continue;const o=e[s];for(const a of o.open)a.indexOf(t)>=0&&n.push(a);for(const a of o.close)a.indexOf(t)>=0&&n.push(a)}}function rL(t,e){return t.length-e.length}function $u(t){if(t.length<=1)return t;const e=[],i=new Set;for(const n of t)i.has(n)||(e.push(n),i.add(n));return e}function bT(t,e,i,n){let s=[];s=s.concat(t),s=s.concat(e);for(let r=0,o=s.length;r<o;r++)sL(s[r],i,n,s);return s=$u(s),s.sort(rL),s.reverse(),Ku(s)}function wT(t,e,i,n){let s=[];s=s.concat(t),s=s.concat(e);for(let r=0,o=s.length;r<o;r++)sL(s[r],i,n,s);return s=$u(s),s.sort(rL),s.reverse(),Ku(s.map(pv))}function ST(t){let e=[];for(const i of t){for(const n of i.open)e.push(n);for(const n of i.close)e.push(n)}return e=$u(e),Ku(e)}function yT(t){let e=[];for(const i of t){for(const n of i.open)e.push(n);for(const n of i.close)e.push(n)}return e=$u(e),Ku(e.map(pv))}function LT(t){const e=/^[\w ]+$/.test(t);return t=Vn(t),e?`\\b${t}\\b`:t}function Ku(t){const e=`(${t.map(LT).join(")|(")})`;return Wy(e,!0)}var pv=(function(){function t(n){if(iL){const s=new Uint16Array(n.length);let r=0;for(let o=n.length-1;o>=0;o--)s[r++]=n.charCodeAt(o);return tL().decode(s)}else{const s=[];let r=0;for(let o=n.length-1;o>=0;o--)s[r++]=n.charAt(o);return s.join("")}}let e=null,i=null;return function(s){return e!==s&&(e=s,i=t(e)),i}})(),Pi=class{static _findPrevBracketInText(t,e,i,n){const s=i.match(t);if(!s)return null;const r=i.length-(s.index||0),o=s[0].length,a=n+r;return new T(e,a-o+1,e,a+1)}static findPrevBracketInRange(t,e,i,n,s){const r=pv(i).substring(i.length-s,i.length-n);return this._findPrevBracketInText(t,e,r,n)}static findNextBracketInText(t,e,i,n){const s=i.match(t);if(!s)return null;const r=s.index||0,o=s[0].length;if(o===0)return null;const a=n+r;return new T(e,a+1,e,a+1+o)}static findNextBracketInRange(t,e,i,n,s){const r=i.substring(n,s);return this.findNextBracketInText(t,e,r,n)}},kT=class{constructor(t){this._richEditBrackets=t}getElectricCharacters(){const t=[];if(this._richEditBrackets)for(const e of this._richEditBrackets.brackets)for(const i of e.close){const n=i.charAt(i.length-1);t.push(n)}return tr(t)}onElectricCharacter(t,e,i){if(!this._richEditBrackets||this._richEditBrackets.brackets.length===0)return null;const n=e.findTokenIndexAtOffset(i-1);if(kn(e.getStandardTokenType(n)))return null;const s=this._richEditBrackets.reversedRegex,r=e.getLineContent().substring(0,i-1)+t,o=Pi.findPrevBracketInRange(s,1,r,0,r.length);if(!o)return null;const a=r.substring(o.startColumn-1,o.endColumn-1).toLowerCase();if(this._richEditBrackets.textIsOpenBracket[a])return null;const l=e.getActualLineContentBefore(o.startColumn-1);return/^\s*$/.test(l)?{matchOpenBracket:a}:null}};function Xh(t){return t.global&&(t.lastIndex=0),!0}var xT=class{constructor(t){this._indentationRules=t}shouldIncrease(t){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&Xh(this._indentationRules.increaseIndentPattern)&&this._indentationRules.increaseIndentPattern.test(t))}shouldDecrease(t){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&Xh(this._indentationRules.decreaseIndentPattern)&&this._indentationRules.decreaseIndentPattern.test(t))}shouldIndentNextLine(t){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&Xh(this._indentationRules.indentNextLinePattern)&&this._indentationRules.indentNextLinePattern.test(t))}shouldIgnore(t){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&Xh(this._indentationRules.unIndentedLinePattern)&&this._indentationRules.unIndentedLinePattern.test(t))}getIndentMetadata(t){let e=0;return this.shouldIncrease(t)&&(e+=1),this.shouldDecrease(t)&&(e+=2),this.shouldIndentNextLine(t)&&(e+=4),this.shouldIgnore(t)&&(e+=8),e}},IT=class wl{constructor(e){e=e||{},e.brackets=e.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],e.brackets.forEach(i=>{const n=wl._createOpenBracketRegExp(i[0]),s=wl._createCloseBracketRegExp(i[1]);n&&s&&this._brackets.push({open:i[0],openRegExp:n,close:i[1],closeRegExp:s})}),this._regExpRules=e.onEnterRules||[]}onEnter(e,i,n,s){if(e>=3)for(let r=0,o=this._regExpRules.length;r<o;r++){const a=this._regExpRules[r];if([{reg:a.beforeText,text:n},{reg:a.afterText,text:s},{reg:a.previousLineText,text:i}].every(l=>l.reg?(l.reg.lastIndex=0,l.reg.test(l.text)):!0))return a.action}if(e>=2&&n.length>0&&s.length>0)for(let r=0,o=this._brackets.length;r<o;r++){const a=this._brackets[r];if(a.openRegExp.test(n)&&a.closeRegExp.test(s))return{indentAction:rt.IndentOutdent}}if(e>=2&&n.length>0){for(let r=0,o=this._brackets.length;r<o;r++)if(this._brackets[r].openRegExp.test(n))return{indentAction:rt.Indent}}return null}static _createOpenBracketRegExp(e){let i=Vn(e);return/\B/.test(i.charAt(0))||(i="\\b"+i),i+="\\s*$",wl._safeRegExp(i)}static _createCloseBracketRegExp(e){let i=Vn(e);return/\B/.test(i.charAt(i.length-1))||(i=i+"\\b"),i="^\\s*"+i,wl._safeRegExp(i)}static _safeRegExp(e){try{return new RegExp(e)}catch(i){return We(i),null}}},yt=ge("configurationService");function oL(t,e){const i=Object.create(null);for(let n in t)_v(i,n,t[n],e);return i}function _v(t,e,i,n){const s=e.split("."),r=s.pop();let o=t;for(let a=0;a<s.length;a++){let l=s[a],h=o[l];switch(typeof h){case"undefined":h=o[l]=Object.create(null);break;case"object":break;default:n(`Ignoring ${e} as ${s.slice(0,a+1).join(".")} is ${JSON.stringify(h)}`);return}o=h}if(typeof o=="object"&&o!==null)try{o[r]=i}catch{n(`Ignoring ${e} as ${s.join(".")} is ${JSON.stringify(o)}`)}else n(`Ignoring ${e} as ${s.join(".")} is ${JSON.stringify(o)}`)}function ET(t,e){aL(t,e.split("."))}function aL(t,e){const i=e.shift();if(e.length===0){delete t[i];return}if(Object.keys(t).indexOf(i)!==-1){const n=t[i];typeof n=="object"&&!Array.isArray(n)&&(aL(n,e),Object.keys(n).length===0&&delete t[i])}}
7function dC(t,e,i){function n(r,o){let a=r;for(const l of o){if(typeof a!="object"||a===null)return;a=a[l]}return a}const s=n(t,e.split("."));return typeof s>"u"?i:s}var Nt=ge("languageService"),Mn=class{constructor(t,e=[],i=!1){this.ctor=t,this.staticArguments=e,this.supportsDelayedInstantiation=i}},lL=[];function ve(t,e,i){e instanceof Mn||(e=new Mn(e,[],i)),lL.push([t,e])}function uC(){return lL}var DT=function(t,e,i,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r},fC=function(t,e){return function(i,n){e(i,n,t)}},Nf=class{constructor(t){this.languageId=t}affects(t){return this.languageId?this.languageId===t:!0}},hr=ge("languageConfigurationService"),Ym=class extends V{constructor(e,i){super(),this.configurationService=e,this.languageService=i,this.onDidChangeEmitter=this._register(new M),this.onDidChange=this.onDidChangeEmitter.event,this.configurations=new Map;const n=new Set(Object.values(Xm));this._register(this.configurationService.onDidChangeConfiguration(s=>{const r=s.change.keys.some(a=>n.has(a)),o=s.change.overrides.filter(([a,l])=>l.some(h=>n.has(h))).map(([a])=>a);if(r)this.configurations.clear(),this.onDidChangeEmitter.fire(new Nf(void 0));else for(const a of o)this.languageService.isRegisteredLanguageId(a)&&(this.configurations.delete(a),this.onDidChangeEmitter.fire(new Nf(a)))})),this._register(Wi.onDidChange(s=>{this.configurations.delete(s.languageId),this.onDidChangeEmitter.fire(new Nf(s.languageId))}))}getLanguageConfiguration(e){let i=this.configurations.get(e);return i||(i=NT(e,this.configurationService,this.languageService),this.configurations.set(e,i)),i}};Ym=DT([fC(0,yt),fC(1,Nt)],Ym);function NT(t,e,i){let n=Wi.getLanguageConfiguration(t);if(!n){if(!i.isRegisteredLanguageId(t))throw new Error(`Language id "${t}" is not configured nor known`);n=new Qm(t,{})}const s=TT(n.languageId,e),r=hL([n.underlyingConfig,s]);return new Qm(n.languageId,r)}var Xm={brackets:"editor.language.brackets",colorizedBracketPairs:"editor.language.colorizedBracketPairs"};function TT(t,e){const i=e.getValue(Xm.brackets,{overrideIdentifier:t}),n=e.getValue(Xm.colorizedBracketPairs,{overrideIdentifier:t});return{brackets:gC(i),colorizedBracketPairs:gC(n)}}function gC(t){if(Array.isArray(t))return t.map(e=>{if(!(!Array.isArray(e)||e.length!==2))return[e[0],e[1]]}).filter(e=>!!e)}var mC=class{constructor(t){this.languageId=t}},MT=class{constructor(){this._entries=new Map,this._onDidChange=new M,this.onDidChange=this._onDidChange.event}register(t,e,i=0){let n=this._entries.get(t);n||(n=new RT(t),this._entries.set(t,n));const s=n.register(e,i);return this._onDidChange.fire(new mC(t)),Ae(()=>{s.dispose(),this._onDidChange.fire(new mC(t))})}getLanguageConfiguration(t){const e=this._entries.get(t);return e?.getResolvedConfiguration()||null}getComments(t){const e=this.getLanguageConfiguration(t);return e&&e.comments||null}getIndentRulesSupport(t){const e=this.getLanguageConfiguration(t);return e&&e.indentRulesSupport||null}getPrecedingValidLine(t,e,i){const n=t.getLanguageIdAtPosition(e,0);if(e>1){let s,r=-1;for(s=e-1;s>=1;s--){if(t.getLanguageIdAtPosition(s,0)!==n)return r;const o=t.getLineContent(s);if(i.shouldIgnore(o)||/^\s+$/.test(o)||o===""){r=s;continue}return s}}return-1}getInheritIndentForLine(t,e,i,n=!0){if(t<4)return null;const s=this.getIndentRulesSupport(e.getLanguageId());if(!s)return null;if(i<=1)return{indentation:"",action:null};const r=this.getPrecedingValidLine(e,i,s);if(r<0)return null;if(r<1)return{indentation:"",action:null};const o=e.getLineContent(r);if(s.shouldIncrease(o)||s.shouldIndentNextLine(o))return{indentation:Rt(o),action:rt.Indent,line:r};if(s.shouldDecrease(o))return{indentation:Rt(o),action:null,line:r};{if(r===1)return{indentation:Rt(e.getLineContent(r)),action:null,line:r};const a=r-1,l=s.getIndentMetadata(e.getLineContent(a));if(!(l&3)&&l&4){let h=0;for(let c=a-1;c>0;c--)if(!s.shouldIndentNextLine(e.getLineContent(c))){h=c;break}return{indentation:Rt(e.getLineContent(h+1)),action:null,line:h+1}}if(n)return{indentation:Rt(e.getLineContent(r)),action:null,line:r};for(let h=r;h>0;h--){const c=e.getLineContent(h);if(s.shouldIncrease(c))return{indentation:Rt(c),action:rt.Indent,line:h};if(s.shouldIndentNextLine(c)){let d=0;for(let u=h-1;u>0;u--)if(!s.shouldIndentNextLine(e.getLineContent(h))){d=u;break}return{indentation:Rt(e.getLineContent(d+1)),action:null,line:d+1}}else if(s.shouldDecrease(c))return{indentation:Rt(c),action:null,line:h}}return{indentation:Rt(e.getLineContent(1)),action:null,line:1}}}getGoodIndentForLine(t,e,i,n,s){if(t<4)return null;const r=this.getLanguageConfiguration(i);if(!r)return null;const o=this.getIndentRulesSupport(i);if(!o)return null;const a=this.getInheritIndentForLine(t,e,n),l=e.getLineContent(n);if(a){const h=a.line;if(h!==void 0){const c=r.onEnter(t,"",e.getLineContent(h),"");if(c){let d=Rt(e.getLineContent(h));return c.removeText&&(d=d.substring(0,d.length-c.removeText)),c.indentAction===rt.Indent||c.indentAction===rt.IndentOutdent?d=s.shiftIndent(d):c.indentAction===rt.Outdent&&(d=s.unshiftIndent(d)),o.shouldDecrease(l)&&(d=s.unshiftIndent(d)),c.appendText&&(d+=c.appendText),Rt(d)}}return o.shouldDecrease(l)?a.action===rt.Indent?a.indentation:s.unshiftIndent(a.indentation):a.action===rt.Indent?s.shiftIndent(a.indentation):a.indentation}return null}getIndentForEnter(t,e,i,n){if(t<4)return null;e.forceTokenization(i.startLineNumber);const s=e.getLineTokens(i.startLineNumber),r=Kd(s,i.startColumn-1),o=r.getLineContent();let a=!1,l;r.firstCharOffset>0&&s.getLanguageId(0)!==r.languageId?(a=!0,l=o.substr(0,i.startColumn-1-r.firstCharOffset)):l=s.getLineContent().substring(0,i.startColumn-1);let h;i.isEmpty()?h=o.substr(i.startColumn-1-r.firstCharOffset):h=this.getScopedLineTokens(e,i.endLineNumber,i.endColumn).getLineContent().substr(i.endColumn-1-r.firstCharOffset);const c=this.getIndentRulesSupport(r.languageId);if(!c)return null;const d=l,u=Rt(l),g={getLineTokens:w=>e.getLineTokens(w),getLanguageId:()=>e.getLanguageId(),getLanguageIdAtPosition:(w,v)=>e.getLanguageIdAtPosition(w,v),getLineContent:w=>w===i.startLineNumber?d:e.getLineContent(w)},m=Rt(s.getLineContent()),_=this.getInheritIndentForLine(t,g,i.startLineNumber+1);if(!_){const w=a?m:u;
7return{beforeEnter:w,afterEnter:w}}let C=a?m:_.indentation;return _.action===rt.Indent&&(C=n.shiftIndent(C)),c.shouldDecrease(h)&&(C=n.unshiftIndent(C)),{beforeEnter:a?m:u,afterEnter:C}}getIndentActionForType(t,e,i,n,s){if(t<4)return null;const r=this.getScopedLineTokens(e,i.startLineNumber,i.startColumn);if(r.firstCharOffset)return null;const o=this.getIndentRulesSupport(r.languageId);if(!o)return null;const a=r.getLineContent(),l=a.substr(0,i.startColumn-1-r.firstCharOffset);let h;if(i.isEmpty()?h=a.substr(i.startColumn-1-r.firstCharOffset):h=this.getScopedLineTokens(e,i.endLineNumber,i.endColumn).getLineContent().substr(i.endColumn-1-r.firstCharOffset),!o.shouldDecrease(l+h)&&o.shouldDecrease(l+n+h)){const c=this.getInheritIndentForLine(t,e,i.startLineNumber,!1);if(!c)return null;let d=c.indentation;return c.action!==rt.Indent&&(d=s.unshiftIndent(d)),d}return null}getIndentMetadata(t,e){const i=this.getIndentRulesSupport(t.getLanguageId());return!i||e<1||e>t.getLineCount()?null:i.getIndentMetadata(t.getLineContent(e))}getEnterAction(t,e,i){const n=this.getScopedLineTokens(e,i.startLineNumber,i.startColumn),s=this.getLanguageConfiguration(n.languageId);if(!s)return null;const r=n.getLineContent(),o=r.substr(0,i.startColumn-1-n.firstCharOffset);let a;i.isEmpty()?a=r.substr(i.startColumn-1-n.firstCharOffset):a=this.getScopedLineTokens(e,i.endLineNumber,i.endColumn).getLineContent().substr(i.endColumn-1-n.firstCharOffset);let l="";if(i.startLineNumber>1&&n.firstCharOffset===0){const m=this.getScopedLineTokens(e,i.startLineNumber-1);m.languageId===n.languageId&&(l=m.getLineContent())}const h=s.onEnter(t,l,o,a);if(!h)return null;const c=h.indentAction;let d=h.appendText;const u=h.removeText||0;d?c===rt.Indent&&(d="	"+d):c===rt.Indent||c===rt.IndentOutdent?d="	":d="";let g=this.getIndentationAtPosition(e,i.startLineNumber,i.startColumn);return u&&(g=g.substring(0,g.length-u)),{indentAction:c,appendText:d,removeText:u,indentation:g}}getIndentationAtPosition(t,e,i){const n=t.getLineContent(e);let s=Rt(n);return s.length>i-1&&(s=s.substring(0,i-1)),s}getScopedLineTokens(t,e,i){t.forceTokenization(e);const n=t.getLineTokens(e),s=typeof i>"u"?t.getLineMaxColumn(e)-1:i-1;return Kd(n,s)}},Wi=new MT,RT=class{constructor(t){this.languageId=t,this._resolved=null,this._entries=[],this._order=0,this._resolved=null}register(t,e){const i=new pC(t,e,++this._order);return this._entries.push(i),this._resolved=null,Ae(()=>{for(let n=0;n<this._entries.length;n++)if(this._entries[n]===i){this._entries.splice(n,1),this._resolved=null;break}})}getResolvedConfiguration(){if(!this._resolved){const t=this._resolve();t&&(this._resolved=new Qm(this.languageId,t))}return this._resolved}_resolve(){return this._entries.length===0?null:(this._entries.sort(pC.cmp),hL(this._entries.map(t=>t.configuration)))}};function hL(t){let e={comments:void 0,brackets:void 0,wordPattern:void 0,indentationRules:void 0,onEnterRules:void 0,autoClosingPairs:void 0,surroundingPairs:void 0,autoCloseBefore:void 0,folding:void 0,colorizedBracketPairs:void 0,__electricCharacterSupport:void 0};for(const i of t)e={comments:i.comments||e.comments,brackets:i.brackets||e.brackets,wordPattern:i.wordPattern||e.wordPattern,indentationRules:i.indentationRules||e.indentationRules,onEnterRules:i.onEnterRules||e.onEnterRules,autoClosingPairs:i.autoClosingPairs||e.autoClosingPairs,surroundingPairs:i.surroundingPairs||e.surroundingPairs,autoCloseBefore:i.autoCloseBefore||e.autoCloseBefore,folding:i.folding||e.folding,colorizedBracketPairs:i.colorizedBracketPairs||e.colorizedBracketPairs,__electricCharacterSupport:i.__electricCharacterSupport||e.__electricCharacterSupport};return e}var pC=class{constructor(t,e,i){this.configuration=t,this.priority=e,this.order=i}static cmp(t,e){return t.priority===e.priority?t.order-e.order:t.priority-e.priority}},Qm=class cL{constructor(e,i){this.languageId=e,this.underlyingConfig=i,this._brackets=null,this._electricCharacter=null,this._onEnterSupport=this.underlyingConfig.brackets||this.underlyingConfig.indentationRules||this.underlyingConfig.onEnterRules?new IT(this.underlyingConfig):null,this.comments=cL._handleComments(this.underlyingConfig),this.characterPair=new Yy(this.underlyingConfig),this.wordDefinition=this.underlyingConfig.wordPattern||G1,this.indentationRules=this.underlyingConfig.indentationRules,this.underlyingConfig.indentationRules?this.indentRulesSupport=new xT(this.underlyingConfig.indentationRules):this.indentRulesSupport=null,this.foldingRules=this.underlyingConfig.folding||{}}getWordDefinition(){return hy(this.wordDefinition)}get brackets(){return!this._brackets&&this.underlyingConfig.brackets&&(this._brackets=new CT(this.languageId,this.underlyingConfig.brackets)),this._brackets}get electricCharacter(){return this._electricCharacter||(this._electricCharacter=new kT(this.brackets)),this._electricCharacter}onEnter(e,i,n,s){return this._onEnterSupport?this._onEnterSupport.onEnter(e,i,n,s):null}getAutoClosingPairs(){return new hT(this.characterPair.getAutoClosingPairs())}getAutoCloseBeforeSet(){return this.characterPair.getAutoCloseBeforeSet()}getSurroundingPairs(){return this.characterPair.getSurroundingPairs()}static _handleComments(e){const i=e.comments;if(!i)return null;const n={};if(i.lineComment&&(n.lineCommentToken=i.lineComment),i.blockComment){const[s,r]=i.blockComment;n.blockCommentStartToken=s,n.blockCommentEndToken=r}return n}};ve(hr,Ym);var jd=new class{clone(){return this}equals(t){return this===t}};function AT(t,e){return new iv([new nh(0,"",t)],e)}function OT(t,e){const i=new Uint32Array(2);return i[0]=0,i[1]=(t<<0|16793600)>>>0,new Uu(i,e===null?jd:e)}
7var Lt=ge("modelService"),Bi=function(t,e,i,n){function s(r){return r instanceof i?r:new i(function(o){o(r)})}return new(i||(i=Promise))(function(r,o){function a(c){try{h(n.next(c))}catch(d){o(d)}}function l(c){try{h(n.throw(c))}catch(d){o(d)}}function h(c){c.done?r(c.value):s(c.value).then(a,l)}h((n=n.apply(t,e||[])).next())})},Qh=function(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],i;return e?e.call(t):(t=typeof __values=="function"?__values(t):t[Symbol.iterator](),i={},n("next"),n("throw"),n("return"),i[Symbol.asyncIterator]=function(){return this},i);function n(r){i[r]=t[r]&&function(o){return new Promise(function(a,l){o=t[r](o),s(a,l,o.done,o.value)})}}function s(r,o,a,l){Promise.resolve(l).then(function(h){r({value:h,done:a})},o)}};function PT(t){return!!t&&typeof t.then=="function"}function dL(t){const e=new Ba,i=t(e.token),n=new Promise((s,r)=>{const o=e.token.onCancellationRequested(()=>{o.dispose(),e.dispose(),r(new xh)});Promise.resolve(i).then(a=>{o.dispose(),e.dispose(),s(a)},a=>{o.dispose(),e.dispose(),r(a)})});return new class{cancel(){e.cancel()}then(s,r){return n.then(s,r)}catch(s){return this.then(void 0,s)}finally(s){return n.finally(s)}}}var FT=class{constructor(){this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}queue(t){if(this.activePromise){if(this.queuedPromiseFactory=t,!this.queuedPromise){const e=()=>{this.queuedPromise=null;const i=this.queue(this.queuedPromiseFactory);return this.queuedPromiseFactory=null,i};this.queuedPromise=new Promise(i=>{this.activePromise.then(e,e).then(i)})}return new Promise((e,i)=>{this.queuedPromise.then(e,i)})}return this.activePromise=t(),new Promise((e,i)=>{this.activePromise.then(n=>{this.activePromise=null,e(n)},n=>{this.activePromise=null,i(n)})})}},BT=(t,e)=>{let i=!0;const n=setTimeout(()=>{i=!1,e()},t);return{isTriggered:()=>i,dispose:()=>{clearTimeout(n),i=!1}}},VT=t=>{let e=!0;return queueMicrotask(()=>{e&&(e=!1,t())}),{isTriggered:()=>e,dispose:()=>{e=!1}}},uL=Symbol("MicrotaskDelay"),Ha=class{constructor(t){this.defaultDelay=t,this.deferred=null,this.completionPromise=null,this.doResolve=null,this.doReject=null,this.task=null}trigger(t,e=this.defaultDelay){this.task=t,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise((n,s)=>{this.doResolve=n,this.doReject=s}).then(()=>{if(this.completionPromise=null,this.doResolve=null,this.task){const n=this.task;return this.task=null,n()}}));const i=()=>{var n;this.deferred=null,(n=this.doResolve)===null||n===void 0||n.call(this,null)};return this.deferred=e===uL?VT(i):BT(e,i),this.completionPromise}isTriggered(){var t;return!!(!((t=this.deferred)===null||t===void 0)&&t.isTriggered())}cancel(){this.cancelTimeout(),this.completionPromise&&(this.doReject&&this.doReject(new xh),this.completionPromise=null)}cancelTimeout(){var t;(t=this.deferred)===null||t===void 0||t.dispose(),this.deferred=null}dispose(){this.cancel()}},WT=class{constructor(t){this.delayer=new Ha(t),this.throttler=new FT}trigger(t,e){return this.delayer.trigger(()=>this.throttler.queue(t),e)}dispose(){this.delayer.dispose()}};function oh(t,e){return e?new Promise((i,n)=>{const s=setTimeout(()=>{r.dispose(),i()},t),r=e.onCancellationRequested(()=>{clearTimeout(s),r.dispose(),n(new xh)})}):dL(i=>oh(t,i))}function Jm(t,e=0){const i=setTimeout(t,e);return Ae(()=>clearTimeout(i))}var jn=class{constructor(t,e){this._token=-1,typeof t=="function"&&typeof e=="number"&&this.setIfNotSet(t,e)}dispose(){this.cancel()}cancel(){this._token!==-1&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(t,e){this.cancel(),this._token=setTimeout(()=>{this._token=-1,t()},e)}setIfNotSet(t,e){this._token===-1&&(this._token=setTimeout(()=>{this._token=-1,t()},e))}},Rh=class{constructor(){this._token=-1}dispose(){this.cancel()}cancel(){this._token!==-1&&(clearInterval(this._token),this._token=-1)}cancelAndSet(t,e){this.cancel(),this._token=setInterval(()=>{t()},e)}},_t=class{constructor(t,e){this.timeoutToken=-1,this.runner=t,this.timeout=e,this.timeoutHandler=this.onTimeout.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1)}schedule(t=this.timeout){this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,t)}get delay(){return this.timeout}set delay(t){this.timeout=t}isScheduled(){return this.timeoutToken!==-1}onTimeout(){this.timeoutToken=-1,this.runner&&this.doRun()}doRun(){this.runner&&this.runner()}},qd;(function(){typeof requestIdleCallback!="function"||typeof cancelIdleCallback!="function"?qd=t=>{ry(()=>
7{if(e)return;const i=Date.now()+15;t(Object.freeze({didTimeout:!0,timeRemaining(){return Math.max(0,i-Date.now())}}))});let e=!1;return{dispose(){e||(e=!0)}}}:qd=(t,e)=>{const i=requestIdleCallback(t,typeof e=="number"?{timeout:e}:void 0);let n=!1;return{dispose(){n||(n=!0,cancelIdleCallback(i))}}}})();var ju=class{constructor(t){this._didRun=!1,this._executor=()=>{try{this._value=t()}catch(e){this._error=e}finally{this._didRun=!0}},this._handle=qd(()=>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}},fL=class{constructor(){this.rejected=!1,this.resolved=!1,this.p=new Promise((t,e)=>{this.completeCallback=t,this.errorCallback=e})}get isRejected(){return this.rejected}get isSettled(){return this.rejected||this.resolved}complete(t){return new Promise(e=>{this.completeCallback(t),this.resolved=!0,e()})}cancel(){new Promise(t=>{this.errorCallback(new xh),this.rejected=!0,t()})}},ep;(function(t){function e(n){return Bi(this,void 0,void 0,function*(){let s;const r=yield Promise.all(n.map(o=>o.then(a=>a,a=>{s||(s=a)})));if(typeof s<"u")throw s;return r})}t.settled=e;function i(n){return new Promise((s,r)=>Bi(this,void 0,void 0,function*(){try{yield n(s,r)}catch(o){r(o)}}))}t.withAsyncBody=i})(ep||(ep={}));var _C=class Fi{constructor(e){this._state=0,this._results=[],this._error=null,this._onStateChanged=new M,queueMicrotask(()=>Bi(this,void 0,void 0,function*(){const i={emitOne:n=>this.emitOne(n),emitMany:n=>this.emitMany(n),reject:n=>this.reject(n)};try{yield Promise.resolve(e(i)),this.resolve()}catch(n){this.reject(n)}finally{i.emitOne=void 0,i.emitMany=void 0,i.reject=void 0}}))}static fromArray(e){return new Fi(i=>{i.emitMany(e)})}static fromPromise(e){return new Fi(i=>Bi(this,void 0,void 0,function*(){i.emitMany(yield e)}))}static fromPromises(e){return new Fi(i=>Bi(this,void 0,void 0,function*(){yield Promise.all(e.map(n=>Bi(this,void 0,void 0,function*(){return i.emitOne(yield n)})))}))}static merge(e){return new Fi(i=>Bi(this,void 0,void 0,function*(){yield Promise.all(e.map(n=>{var s,r;return Bi(this,void 0,void 0,function*(){var o,a;try{for(s=Qh(n);r=yield s.next(),!r.done;){const l=r.value;i.emitOne(l)}}catch(l){o={error:l}}finally{try{r&&!r.done&&(a=s.return)&&(yield a.call(s))}finally{if(o)throw o.error}}})}))}))}[Symbol.asyncIterator](){let e=0;return{next:()=>Bi(this,void 0,void 0,function*(){do{if(this._state===2)throw this._error;if(e<this._results.length)return{done:!1,value:this._results[e++]};if(this._state===1)return{done:!0,value:void 0};yield $.toPromise(this._onStateChanged.event)}while(!0)})}}static map(e,i){return new Fi(n=>Bi(this,void 0,void 0,function*(){var s,r;try{for(var o=Qh(e),a;a=yield o.next(),!a.done;){const l=a.value;n.emitOne(i(l))}}catch(l){s={error:l}}finally{try{a&&!a.done&&(r=o.return)&&(yield r.call(o))}finally{if(s)throw s.error}}}))}map(e){return Fi.map(this,e)}static filter(e,i){return new Fi(n=>Bi(this,void 0,void 0,function*(){var s,r;try{for(var o=Qh(e),a;a=yield o.next(),!a.done;){const l=a.value;i(l)&&n.emitOne(l)}}catch(l){s={error:l}}finally{try{a&&!a.done&&(r=o.return)&&(yield r.call(o))}finally{if(s)throw s.error}}}))}filter(e){return Fi.filter(this,e)}static coalesce(e){return Fi.filter(e,i=>!!i)}coalesce(){return Fi.coalesce(this)}static toPromise(e){var i,n,s,r;return Bi(this,void 0,void 0,function*(){const o=[];try{for(i=Qh(e);n=yield i.next(),!n.done;){const a=n.value;o.push(a)}}catch(a){s={error:a}}finally{try{n&&!n.done&&(r=i.return)&&(yield r.call(i))}finally{if(s)throw s.error}}return o})}toPromise(){return Fi.toPromise(this)}emitOne(e){this._state===0&&(this._results.push(e),this._onStateChanged.fire())}emitMany(e){this._state===0&&(this._results=this._results.concat(e),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(e){this._state===0&&(this._state=2,this._error=e,this._onStateChanged.fire())}};_C.EMPTY=_C.fromArray([]);var HT="$initialize",vC=!1;function tp(t){Pa&&(vC||(vC=!0))}var zT=class{constructor(t,e,i,n){this.vsWorker=t,this.req=e,this.method=i,this.args=n,this.type=0}},CC=class{constructor(t,e,i,n){this.vsWorker=t,this.seq=e,this.res=i,this.err=n,this.type=1}},UT=class{constructor(t,e,i,n){this.vsWorker=t,this.req=e,this.eventName=i,this.arg=n,this.type=2}},$T=class{constructor(t,e,i){this.vsWorker=t,this.req=e,this.event=i,this.type=3}},KT=class{constructor(t,e){this.vsWorker=t,this.req=e,this.type=4}},jT=class{constructor(t){this._workerId=-1,this._handler=t,this._lastSentReq=0,this._pendingReplies=Object.create(null),this._pendingEmitters=new Map,this._pendingEvents=new Map}setWorkerId(t){this._workerId=t}
7sendMessage(t,e){const i=String(++this._lastSentReq);return new Promise((n,s)=>{this._pendingReplies[i]={resolve:n,reject:s},this._send(new zT(this._workerId,i,t,e))})}listen(t,e){let i=null;const n=new M({onFirstListenerAdd:()=>{i=String(++this._lastSentReq),this._pendingEmitters.set(i,n),this._send(new UT(this._workerId,i,t,e))},onLastListenerRemove:()=>{this._pendingEmitters.delete(i),this._send(new KT(this._workerId,i)),i=null}});return n.event}handleMessage(t){!t||!t.vsWorker||this._workerId!==-1&&t.vsWorker!==this._workerId||this._handleMessage(t)}_handleMessage(t){switch(t.type){case 1:return this._handleReplyMessage(t);case 0:return this._handleRequestMessage(t);case 2:return this._handleSubscribeEventMessage(t);case 3:return this._handleEventMessage(t);case 4:return this._handleUnsubscribeEventMessage(t)}}_handleReplyMessage(t){if(!this._pendingReplies[t.seq])return;let e=this._pendingReplies[t.seq];if(delete this._pendingReplies[t.seq],t.err){let i=t.err;t.err.$isError&&(i=new Error,i.name=t.err.name,i.message=t.err.message,i.stack=t.err.stack),e.reject(i);return}e.resolve(t.res)}_handleRequestMessage(t){let e=t.req;this._handler.handleMessage(t.method,t.args).then(i=>{this._send(new CC(this._workerId,e,i,void 0))},i=>{i.detail instanceof Error&&(i.detail=$0(i.detail)),this._send(new CC(this._workerId,e,void 0,$0(i)))})}_handleSubscribeEventMessage(t){const e=t.req,i=this._handler.handleEvent(t.eventName,t.arg)(n=>{this._send(new $T(this._workerId,e,n))});this._pendingEvents.set(e,i)}_handleEventMessage(t){this._pendingEmitters.has(t.req)&&this._pendingEmitters.get(t.req).fire(t.event)}_handleUnsubscribeEventMessage(t){this._pendingEvents.has(t.req)&&(this._pendingEvents.get(t.req).dispose(),this._pendingEvents.delete(t.req))}_send(t){let e=[];
7if(t.type===0)for(let i=0;i<t.args.length;i++)t.args[i]instanceof ArrayBuffer&&e.push(t.args[i]);else t.type===1&&t.res instanceof ArrayBuffer&&e.push(t.res);this._handler.sendMessage(t,e)}},qT=class extends V{constructor(t,e,i){super();let n=null;this._worker=this._register(t.create("vs/base/common/worker/simpleWorker",l=>{this._protocol.handleMessage(l)},l=>{n&&n(l)})),this._protocol=new jT({sendMessage:(l,h)=>{this._worker.postMessage(l,h)},handleMessage:(l,h)=>{if(typeof i[l]!="function")return Promise.reject(new Error("Missing method "+l+" on main thread host."));try{return Promise.resolve(i[l].apply(i,h))}catch(c){return Promise.reject(c)}},handleEvent:(l,h)=>{if(mL(l)){const c=i[l].call(i,h);if(typeof c!="function")throw new Error(`Missing dynamic event ${l} on main thread host.`);return c}if(gL(l)){const c=i[l];if(typeof c!="function")throw new Error(`Missing event ${l} on main thread host.`);return c}throw new Error(`Malformed event name ${l}`)}}),this._protocol.setWorkerId(this._worker.getId());let s=null;typeof Ve.require<"u"&&typeof Ve.require.getConfig=="function"?s=Ve.require.getConfig():typeof Ve.requirejs<"u"&&(s=Ve.requirejs.s.contexts._.config);const r=Y1(i);this._onModuleLoaded=this._protocol.sendMessage(HT,[this._worker.getId(),JSON.parse(JSON.stringify(s)),e,r]);const o=(l,h)=>this._request(l,h),a=(l,h)=>this._protocol.listen(l,h);this._lazyProxy=new Promise((l,h)=>{n=h,this._onModuleLoaded.then(c=>{l(GT(c,o,a))},c=>{h(c),this._onError("Worker failed to load "+e,c)})})}getProxyObject(){return this._lazyProxy}_request(t,e){return new Promise((i,n)=>{this._onModuleLoaded.then(()=>{this._protocol.sendMessage(t,e).then(i,n)},n)})}_onError(t,e){}};function gL(t){return t[0]==="o"&&t[1]==="n"&&Os(t.charCodeAt(2))}function mL(t){return/^onDynamic/.test(t)&&Os(t.charCodeAt(9))}function GT(t,e,i){const n=o=>function(){return e(o,Array.prototype.slice.call(arguments,0))},s=o=>function(a){return i(o,a)};let r={};for(const o of t){if(mL(o)){r[o]=s(o);continue}if(gL(o)){r[o]=i(o,void 0);continue}r[o]=n(o)}return r}var Tf,bC=(Tf=window.trustedTypes)===null||Tf===void 0?void 0:Tf.createPolicy("defaultWorkerFactory",{createScriptURL:t=>t});function ZT(t){if(Ve.MonacoEnvironment){if(typeof Ve.MonacoEnvironment.getWorker=="function")return Ve.MonacoEnvironment.getWorker("workerMain.js",t);if(typeof Ve.MonacoEnvironment.getWorkerUrl=="function"){const e=Ve.MonacoEnvironment.getWorkerUrl("workerMain.js",t);return new Worker(bC?bC.createScriptURL(e):e,{name:t})}}throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}function YT(t){return typeof t.then=="function"}var XT=class{constructor(t,e,i,n,s){this.id=e;const r=ZT(i);YT(r)?this.worker=r:this.worker=Promise.resolve(r),this.postMessage(t,[]),this.worker.then(o=>{o.onmessage=function(a){n(a.data)},o.onmessageerror=s,typeof o.addEventListener=="function"&&o.addEventListener("error",s)})}getId(){return this.id}postMessage(t,e){this.worker&&this.worker.then(i=>i.postMessage(t,e))}dispose(){this.worker&&this.worker.then(t=>t.terminate()),this.worker=null}},pL=class _L{constructor(e){this._label=e,this._webWorkerFailedBeforeError=!1}create(e,i,n){let s=++_L.LAST_WORKER_ID;if(this._webWorkerFailedBeforeError)throw this._webWorkerFailedBeforeError;return new XT(e,s,this._label||"anonymous"+s,i,r=>{tp(r),this._webWorkerFailedBeforeError=r,n(r)})}};pL.LAST_WORKER_ID=0;var Ts=class{constructor(t,e,i,n){this.originalStart=t,this.originalLength=e,this.modifiedStart=i,this.modifiedLength=n}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}};function vv(t,e){switch(typeof t){case"object":return t===null?gs(349,e):Array.isArray(t)?JT(t,e):e5(t,e);case"string":return Cv(t,e);case"boolean":return QT(t,e);case"number":return gs(t,e);case"undefined":return gs(937,e);default:return gs(617,e)}}function gs(t,e){return(e<<5)-e+t|0}function QT(t,e){return gs(t?433:863,e)}function Cv(t,e){e=gs(149417,e);for(let i=0,n=t.length;i<n;i++)e=gs(t.charCodeAt(i),e);return e}function JT(t,e){return e=gs(104579,e),t.reduce((i,n)=>vv(n,i),e)}function e5(t,e){return e=gs(181387,e),Object.keys(t).sort().reduce((i,n)=>(i=Cv(n,i),vv(t[n],i)),e)}function Mf(t,e,i=32){const n=i-e,s=~((1<<n)-1);return(t<<e|(s&t)>>>n)>>>0}function wC(t,e=0,i=t.byteLength,n=0){for(let s=0;s<i;s++)t[e+s]=n}function t5(t,e,i="0"){for(;t.length<e;)t=i+t;return t}function il(t,e=32){return t instanceof ArrayBuffer?Array.from(new Uint8Array(t)).map(i=>i.toString(16).padStart(2,"0")).join(""):t5((t>>
vendor: 4,413 bytes, line 7
7>0).toString(16),e/4)}var vL=class CL{constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(e){const i=e.length;if(i===0)return;const n=this._buff;let s=this._buffLen,r=this._leftoverHighSurrogate,o,a;for(r!==0?(o=r,a=-1,r=0):(o=e.charCodeAt(0),a=0);;){let l=o;if(at(o))if(a+1<i){const h=e.charCodeAt(a+1);wa(h)?(a++,l=rv(o,h)):l=65533}else{r=o;break}else wa(o)&&(l=65533);if(s=this._push(n,s,l),a++,a<i)o=e.charCodeAt(a);else break}this._buffLen=s,this._leftoverHighSurrogate=r}_push(e,i,n){return n<128?e[i++]=n:n<2048?(e[i++]=192|(n&1984)>>>6,e[i++]=128|(n&63)>>>0):n<65536?(e[i++]=224|(n&61440)>>>12,e[i++]=128|(n&4032)>>>6,e[i++]=128|(n&63)>>>0):(e[i++]=240|(n&1835008)>>>18,e[i++]=128|(n&258048)>>>12,e[i++]=128|(n&4032)>>>6,e[i++]=128|(n&63)>>>0),i>=64&&(this._step(),i-=64,this._totalLen+=64,e[0]=e[64],e[1]=e[65],e[2]=e[66]),i}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),il(this._h0)+il(this._h1)+il(this._h2)+il(this._h3)+il(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,wC(this._buff,this._buffLen),this._buffLen>56&&(this._step(),wC(this._buff));const e=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(e/4294967296),!1),this._buffDV.setUint32(60,e%4294967296,!1),this._step()}_step(){const e=CL._bigBlock32,i=this._buffDV;for(let d=0;d<64;d+=4)e.setUint32(d,i.getUint32(d,!1),!1);for(let d=64;d<320;d+=4)e.setUint32(d,Mf(e.getUint32(d-12,!1)^e.getUint32(d-32,!1)^e.getUint32(d-56,!1)^e.getUint32(d-64,!1),1),!1);let n=this._h0,s=this._h1,r=this._h2,o=this._h3,a=this._h4,l,h,c;for(let d=0;d<80;d++)d<20?(l=s&r|~s&o,h=1518500249):d<40?(l=s^r^o,h=1859775393):d<60?(l=s&r|s&o|r&o,h=2400959708):(l=s^r^o,h=3395469782),c=Mf(n,5)+l+a+h+e.getUint32(d*4,!1)&4294967295,a=o,o=r,r=Mf(s,30),s=n,n=c;this._h0=this._h0+n&4294967295,this._h1=this._h1+s&4294967295,this._h2=this._h2+r&4294967295,this._h3=this._h3+o&4294967295,this._h4=this._h4+a&4294967295}};vL._bigBlock32=new DataView(new ArrayBuffer(320));var SC=class{constructor(t){this.source=t}getElements(){const t=this.source,e=new Int32Array(t.length);for(let i=0,n=t.length;i<n;i++)e[i]=t.charCodeAt(i);return e}};function i5(t,e,i){return new bv(new SC(t),new SC(e)).ComputeDiff(i).changes}var So=class{static Assert(t,e){if(!t)throw new Error(e)}},yo=class{static Copy(t,e,i,n,s){for(let r=0;r<s;r++)i[n+r]=t[e+r]}static Copy2(t,e,i,n,s){for(let r=0;r<s;r++)i[n+r]=t[e+r]}},yC=class{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 Ts(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(t,e){this.m_originalStart=Math.min(this.m_originalStart,t),this.m_modifiedStart=Math.min(this.m_modifiedStart,e),this.m_originalCount++}AddModifiedElement(t,e){this.m_originalStart=Math.min(this.m_originalStart,t),this.m_modifiedStart=Math.min(this.m_modifiedStart,e),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}},bv=class Ao{constructor(e,i,n=null){this.ContinueProcessingPredicate=n,this._originalSequence=e,this._modifiedSequence=i;const[s,r,o]=Ao._getElements(e),[a,l,h]=Ao._getElements(i);this._hasStrings=o&&h,this._originalStringElements=s,this._originalElementsOrHash=r,this._modifiedStringElements=a,this._modifiedElementsOrHash=l,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(e){return e.length>0&&typeof e[0]=="string"}static _getElements(e){const i=e.getElements();if(Ao._isStringArray(i)){const n=new Int32Array(i.length);for(let s=0,r=i.length;s<r;s++)n[s]=Cv(i[s],0);return[i,n,!0]}return i instanceof Int32Array?[[],i,!1]:[[],new Int32Array(i),!1]}
vendor: 9,823 bytes, line 7
7ElementsAreEqual(e,i){return this._originalElementsOrHash[e]!==this._modifiedElementsOrHash[i]?!1:this._hasStrings?this._originalStringElements[e]===this._modifiedStringElements[i]:!0}ElementsAreStrictEqual(e,i){return this.ElementsAreEqual(e,i)?Ao._getStrictElement(this._originalSequence,e)===Ao._getStrictElement(this._modifiedSequence,i):!1}static _getStrictElement(e,i){return typeof e.getStrictElement=="function"?e.getStrictElement(i):null}OriginalElementsAreEqual(e,i){return this._originalElementsOrHash[e]!==this._originalElementsOrHash[i]?!1:this._hasStrings?this._originalStringElements[e]===this._originalStringElements[i]:!0}ModifiedElementsAreEqual(e,i){return this._modifiedElementsOrHash[e]!==this._modifiedElementsOrHash[i]?!1:this._hasStrings?this._modifiedStringElements[e]===this._modifiedStringElements[i]:!0}ComputeDiff(e){return this._ComputeDiff(0,this._originalElementsOrHash.length-1,0,this._modifiedElementsOrHash.length-1,e)}_ComputeDiff(e,i,n,s,r){const o=[!1];let a=this.ComputeDiffRecursive(e,i,n,s,o);return r&&(a=this.PrettifyChanges(a)),{quitEarly:o[0],changes:a}}ComputeDiffRecursive(e,i,n,s,r){for(r[0]=!1;e<=i&&n<=s&&this.ElementsAreEqual(e,n);)e++,n++;for(;i>=e&&s>=n&&this.ElementsAreEqual(i,s);)i--,s--;if(e>i||n>s){let d;return n<=s?(So.Assert(e===i+1,"originalStart should only be one more than originalEnd"),d=[new Ts(e,0,n,s-n+1)]):e<=i?(So.Assert(n===s+1,"modifiedStart should only be one more than modifiedEnd"),d=[new Ts(e,i-e+1,n,0)]):(So.Assert(e===i+1,"originalStart should only be one more than originalEnd"),So.Assert(n===s+1,"modifiedStart should only be one more than modifiedEnd"),d=[]),d}const o=[0],a=[0],l=this.ComputeRecursionPoint(e,i,n,s,o,a,r),h=o[0],c=a[0];if(l!==null)return l;if(!r[0]){const d=this.ComputeDiffRecursive(e,h,n,c,r);let u=[];return r[0]?u=[new Ts(h+1,i-(h+1)+1,c+1,s-(c+1)+1)]:u=this.ComputeDiffRecursive(h+1,i,c+1,s,r),this.ConcatenateChanges(d,u)}return[new Ts(e,i-e+1,n,s-n+1)]}WALKTRACE(e,i,n,s,r,o,a,l,h,c,d,u,g,m,_,C,w,v){let b=null,y=null,k=new yC,S=i,L=n,x=g[0]-C[0]-s,E=-1073741824,R=this.m_forwardHistory.length-1;do{const D=x+e;D===S||D<L&&h[D-1]<h[D+1]?(d=h[D+1],m=d-x-s,d<E&&k.MarkNextChange(),E=d,k.AddModifiedElement(d+1,m),x=D+1-e):(d=h[D-1]+1,m=d-x-s,d<E&&k.MarkNextChange(),E=d-1,k.AddOriginalElement(d,m+1),x=D-1-e),R>=0&&(h=this.m_forwardHistory[R],e=h[0],S=1,L=h.length-1)}while(--R>=-1);if(b=k.getReverseChanges(),v[0]){let D=g[0]+1,W=C[0]+1;if(b!==null&&b.length>0){const P=b[b.length-1];D=Math.max(D,P.getOriginalEnd()),W=Math.max(W,P.getModifiedEnd())}y=[new Ts(D,u-D+1,W,_-W+1)]}else{k=new yC,S=o,L=a,x=g[0]-C[0]-l,E=1073741824,R=w?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const D=x+r;D===S||D<L&&c[D-1]>=c[D+1]?(d=c[D+1]-1,m=d-x-l,d>E&&k.MarkNextChange(),E=d+1,k.AddOriginalElement(d+1,m+1),x=D+1-r):(d=c[D-1],m=d-x-l,d>E&&k.MarkNextChange(),E=d,k.AddModifiedElement(d+1,m+1),x=D-1-r),R>=0&&(c=this.m_reverseHistory[R],r=c[0],S=1,L=c.length-1)}while(--R>=-1);y=k.getChanges()}return this.ConcatenateChanges(b,y)}ComputeRecursionPoint(e,i,n,s,r,o,a){let l=0,h=0,c=0,d=0,u=0,g=0;e--,n--,r[0]=0,o[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const m=i-e+(s-n),_=m+1,C=new Int32Array(_),w=new Int32Array(_),v=s-n,b=i-e,y=e-n,k=i-s,S=(b-v)%2===0;C[v]=e,w[b]=i,a[0]=!1;for(let L=1;L<=m/2+1;L++){let x=0,E=0;c=this.ClipDiagonalBound(v-L,L,v,_),d=this.ClipDiagonalBound(v+L,L,v,_);for(let D=c;D<=d;D+=2){D===c||D<d&&C[D-1]<C[D+1]?l=C[D+1]:l=C[D-1]+1,h=l-(D-v)-y;const W=l;for(;l<i&&h<s&&this.ElementsAreEqual(l+1,h+1);)l++,h++;if(C[D]=l,l+h>x+E&&(x=l,E=h),!S&&Math.abs(D-b)<=L-1&&l>=w[D])return r[0]=l,o[0]=h,W<=w[D]&&L<=1448?this.WALKTRACE(v,c,d,y,b,u,g,k,C,w,l,i,r,h,s,o,S,a):null}const R=(x-e+(E-n)-L)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(x,R))return a[0]=!0,r[0]=x,o[0]=E,R>0&&L<=1448?this.WALKTRACE(v,c,d,y,b,u,g,k,C,w,l,i,r,h,s,o,S,a):(e++,n++,[new Ts(e,i-e+1,n,s-n+1)]);u=this.ClipDiagonalBound(b-L,L,b,_),g=this.ClipDiagonalBound(b+L,L,b,_);for(let D=u;D<=g;D+=2){D===u||D<g&&w[D-1]>=w[D+1]?l=w[D+1]-1:l=w[D-1],h=l-(D-b)-k;const W=l;for(;l>e&&h>n&&this.ElementsAreEqual(l,h);)l--,h--;if(w[D]=l,S&&Math.abs(D-v)<=L&&l<=C[D])return r[0]=l,o[0]=h,W>=C[D]&&L<=1448?this.WALKTRACE(v,c,d,y,b,u,g,k,C,w,l,i,r,h,s,o,S,a):null}if(L<=1447){let D=new Int32Array(d-c+2);D[0]=v-c+1,yo.Copy2(C,c,D,1,d-c+1),this.m_forwardHistory.push(D),D=new Int32Array(g-u+2),D[0]=b-u+1,yo.Copy2(w,u,D,1,g-u+1),this.m_reverseHistory.push(D)}}return this.WALKTRACE(v,c,d,y,b,u,g,k,C,w,l,i,r,h,s,o,S,a)}PrettifyChanges(e){for(let i=0;i<e.length;i++){const n=e[i],s=i<e.length-1?e[i+1].originalStart:this._originalElementsOrHash.length,r=i<e.length-1?e[i+1].modifiedStart:this._modifiedElementsOrHash.length,o=n.originalLength>0,a=n.modifiedLength>0;for(;n.originalStart+n.originalLength<s&&n.modifiedStart+n.modifiedLength<r&&(!o||this.OriginalElementsAreEqual(n.originalStart,n.originalStart+n.originalLength))&&(!a||this.ModifiedElementsAreEqual(n.modifiedStart,n.modifiedStart+n.modifiedLength));){const h=this.ElementsAreStrictEqual(n.originalStart,n.modifiedStart);if(this.ElementsAreStrictEqual(n.originalStart+n.originalLength,n.modifiedStart+n.modifiedLength)&&!h)break;n.originalStart++,n.modifiedStart++}let l=[null];if(i<e.length-1&&this.ChangesOverlap(e[i],e[i+1],l)){e[i]=l[0],e.splice(i+1,1),i--;continue}}for(let i=e.length-1;i>=0;i--){const n=e[i];let s=0,r=0;if(i>0){const d=e[i-1];s=d.originalStart+d.originalLength,r=d.modifiedStart+d.modifiedLength}const o=n.originalLength>0,a=n.modifiedLength>0;let l=0,h=this._boundaryScore(n.originalStart,n.originalLength,n.modifiedStart,n.modifiedLength);for(let d=1;;d++){const u=n.originalStart-d,g=n.modifiedStart-d;if(u<s||g<r||o&&!this.OriginalElementsAreEqual(u,u+n.originalLength)||a&&!this.ModifiedElementsAreEqual(g,g+n.modifiedLength))break;const m=(u===s&&g===r?5:0)+this._boundaryScore(u,n.originalLength,g,n.modifiedLength);m>h&&(h=m,l=d)}n.originalStart-=l,n.modifiedStart-=l;const c=[null];if(i>0&&this.ChangesOverlap(e[i-1],e[i],c)){e[i-1]=c[0],e.splice(i,1),i++;continue}}if(this._hasStrings)for(let i=1,n=e.length;i<n;i++){const s=e[i-1],r=e[i],o=r.originalStart-s.originalStart-s.originalLength,a=s.originalStart,l=r.originalStart+r.originalLength,h=l-a,c=s.modifiedStart,d=r.modifiedStart+r.modifiedLength,u=d-c;if(o<5&&h<20&&u<20){const g=this._findBetterContiguousSequence(a,h,c,u,o);if(g){const[m,_]=g;(m!==s.originalStart+s.originalLength||_!==s.modifiedStart+s.modifiedLength)&&(s.originalLength=m-s.originalStart,s.modifiedLength=_-s.modifiedStart,r.originalStart=m+o,r.modifiedStart=_+o,r.originalLength=l-r.originalStart,r.modifiedLength=d-r.modifiedStart)}}}return e}_findBetterContiguousSequence(e,i,n,s,r){if(i<r||s<r)return null;const o=e+i-r+1,a=n+s-r+1;let l=0,h=0,c=0;for(let d=e;d<o;d++)for(let u=n;u<a;u++){const g=this._contiguousSequenceScore(d,u,r);g>0&&g>l&&(l=g,h=d,c=u)}return l>0?[h,c]:null}_contiguousSequenceScore(e,i,n){let s=0;for(let r=0;r<n;r++){if(!this.ElementsAreEqual(e+r,i+r))return 0;s+=this._originalStringElements[e+r].length}return s}_OriginalIsBoundary(e){return e<=0||e>=this._originalElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._originalStringElements[e])}_OriginalRegionIsBoundary(e,i){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(i>0){const n=e+i;if(this._OriginalIsBoundary(n-1)||this._OriginalIsBoundary(n))return!0}return!1}_ModifiedIsBoundary(e){return e<=0||e>=this._modifiedElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[e])}_ModifiedRegionIsBoundary(e,i){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(i>0){const n=e+i;if(this._ModifiedIsBoundary(n-1)||this._ModifiedIsBoundary(n))return!0}return!1}_boundaryScore(e,i,n,s){return(this._OriginalRegionIsBoundary(e,i)?1:0)+(this._ModifiedRegionIsBoundary(n,s)?1:0)}ConcatenateChanges(e,i){let n=[];if(e.length===0||i.length===0)return i.length>0?i:e;if(this.ChangesOverlap(e[e.length-1],i[0],n)){const s=new Array(e.length+i.length-1);return yo.Copy(e,0,s,0,e.length-1),s[e.length-1]=n[0],yo.Copy(i,1,s,e.length,i.length-1),s}else{const s=new Array(e.length+i.length);return yo.Copy(e,0,s,0,e.length),yo.Copy(i,0,s,e.length,i.length),s}}ChangesOverlap(e,i,n){if(So.Assert(e.originalStart<=i.originalStart,"Left change is not less than or equal to right change"),So.Assert(e.modifiedStart<=i.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=i.originalStart||e.modifiedStart+e.modifiedLength>=i.modifiedStart){const s=e.originalStart;let r=e.originalLength;const o=e.modifiedStart;let a=e.modifiedLength;return e.originalStart+e.originalLength>=i.originalStart&&(r=i.originalStart+i.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=i.modifiedStart&&(a=i.modifiedStart+i.modifiedLength-e.modifiedStart),n[0]=new Ts(s,r,o,a),!0}else return n[0]=null,!1}ClipDiagonalBound(e,i,n,s){if(e>=0&&e<s)return e;const r=n,o=s-n-1,a=i%2===0;return e<0?a===(r%2===0)?0:1:a===(o%2===0)?s-1:s-2}},n5=3;function bL(t,e,i,n){return new bv(t,e,i).ComputeDiff(n)}var LC=class{constructor(t){const e=[],i=[];for(let n=0,s=t.length;n<s;n++)e[n]=np(t[n],1),i[n]=sp(t[n],1);this.lines=t,this._startColumns=e,this._endColumns=i}getElements(){const t=[];for(let e=0,i=this.lines.length;e<i;e++)t[e]=this.lines[e].substring(this._startColumns[e]-1,this._endColumns[e]-1);return t}getStrictElement(t){return this.lines[t]}getStartLineNumber(t){return t+1}getEndLineNumber(t){return t+1}createCharSequence(t,e,i){const n=[],s=[],r=[];let o=0;for(let a=e;a<=i;a++){const l=this.lines[a],h=t?this._startColumns[a]:1,c=t?this._endColumns[a]:l.length+1;for(let d=h;d<c;d++)n[o]=l.charCodeAt(d-1),s[o]=a+1,r[o]=d,o++}return new s5(n,s,r)}}
7,s5=class{constructor(t,e,i){this._charCodes=t,this._lineNumbers=e,this._columns=i}getElements(){return this._charCodes}getStartLineNumber(t){return this._lineNumbers[t]}getStartColumn(t){return this._columns[t]}getEndLineNumber(t){return this._lineNumbers[t]}getEndColumn(t){return this._columns[t]+1}},ip=class wL{constructor(e,i,n,s,r,o,a,l){this.originalStartLineNumber=e,this.originalStartColumn=i,this.originalEndLineNumber=n,this.originalEndColumn=s,this.modifiedStartLineNumber=r,this.modifiedStartColumn=o,this.modifiedEndLineNumber=a,this.modifiedEndColumn=l}static createFromDiffChange(e,i,n){let s,r,o,a,l,h,c,d;return e.originalLength===0?(s=0,r=0,o=0,a=0):(s=i.getStartLineNumber(e.originalStart),r=i.getStartColumn(e.originalStart),o=i.getEndLineNumber(e.originalStart+e.originalLength-1),a=i.getEndColumn(e.originalStart+e.originalLength-1)),e.modifiedLength===0?(l=0,h=0,c=0,d=0):(l=n.getStartLineNumber(e.modifiedStart),h=n.getStartColumn(e.modifiedStart),c=n.getEndLineNumber(e.modifiedStart+e.modifiedLength-1),d=n.getEndColumn(e.modifiedStart+e.modifiedLength-1)),new wL(s,r,o,a,l,h,c,d)}};function r5(t){if(t.length<=1)return t;const e=[t[0]];let i=e[0];for(let n=1,s=t.length;n<s;n++){const r=t[n],o=r.originalStart-(i.originalStart+i.originalLength),a=r.modifiedStart-(i.modifiedStart+i.modifiedLength);Math.min(o,a)<n5?(i.originalLength=r.originalStart+r.originalLength-i.originalStart,i.modifiedLength=r.modifiedStart+r.modifiedLength-i.modifiedStart):(e.push(r),i=r)}return e}var Rf=class SL{constructor(e,i,n,s,r){this.originalStartLineNumber=e,this.originalEndLineNumber=i,this.modifiedStartLineNumber=n,this.modifiedEndLineNumber=s,this.charChanges=r}static createFromDiffResult(e,i,n,s,r,o,a){let l,h,c,d,u;if(i.originalLength===0?(l=n.getStartLineNumber(i.originalStart)-1,h=0):(l=n.getStartLineNumber(i.originalStart),h=n.getEndLineNumber(i.originalStart+i.originalLength-1)),i.modifiedLength===0?(c=s.getStartLineNumber(i.modifiedStart)-1,d=0):(c=s.getStartLineNumber(i.modifiedStart),d=s.getEndLineNumber(i.modifiedStart+i.modifiedLength-1)),o&&i.originalLength>0&&i.originalLength<20&&i.modifiedLength>0&&i.modifiedLength<20&&r()){const g=n.createCharSequence(e,i.originalStart,i.originalStart+i.originalLength-1),m=s.createCharSequence(e,i.modifiedStart,i.modifiedStart+i.modifiedLength-1);let _=bL(g,m,r,!0).changes;a&&(_=r5(_)),u=[];for(let C=0,w=_.length;C<w;C++)u.push(ip.createFromDiffChange(_[C],g,m))}return new SL(l,h,c,d,u)}},o5=class{constructor(t,e,i){this.shouldComputeCharChanges=i.shouldComputeCharChanges,this.shouldPostProcessCharChanges=i.shouldPostProcessCharChanges,this.shouldIgnoreTrimWhitespace=i.shouldIgnoreTrimWhitespace,this.shouldMakePrettyDiff=i.shouldMakePrettyDiff,this.originalLines=t,this.modifiedLines=e,this.original=new LC(t),this.modified=new LC(e),this.continueLineDiff=kC(i.maxComputationTime),this.continueCharDiff=kC(i.maxComputationTime===0?0:Math.min(i.maxComputationTime,5e3))}
vendor: 9,106 bytes, line 7
7computeDiff(){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 t=bL(this.original,this.modified,this.continueLineDiff,this.shouldMakePrettyDiff),e=t.changes,i=t.quitEarly;if(this.shouldIgnoreTrimWhitespace){const o=[];for(let a=0,l=e.length;a<l;a++)o.push(Rf.createFromDiffResult(this.shouldIgnoreTrimWhitespace,e[a],this.original,this.modified,this.continueCharDiff,this.shouldComputeCharChanges,this.shouldPostProcessCharChanges));return{quitEarly:i,changes:o}}const n=[];let s=0,r=0;for(let o=-1,a=e.length;o<a;o++){const l=o+1<a?e[o+1]:null,h=l?l.originalStart:this.originalLines.length,c=l?l.modifiedStart:this.modifiedLines.length;for(;s<h&&r<c;){const d=this.originalLines[s],u=this.modifiedLines[r];if(d!==u){{let g=np(d,1),m=np(u,1);for(;g>1&&m>1&&d.charCodeAt(g-2)===u.charCodeAt(m-2);)g--,m--;(g>1||m>1)&&this._pushTrimWhitespaceCharChange(n,s+1,1,g,r+1,1,m)}{let g=sp(d,1),m=sp(u,1);const _=d.length+1,C=u.length+1;for(;g<_&&m<C&&d.charCodeAt(g-1)===d.charCodeAt(m-1);)g++,m++;(g<_||m<C)&&this._pushTrimWhitespaceCharChange(n,s+1,g,_,r+1,m,C)}}s++,r++}l&&(n.push(Rf.createFromDiffResult(this.shouldIgnoreTrimWhitespace,l,this.original,this.modified,this.continueCharDiff,this.shouldComputeCharChanges,this.shouldPostProcessCharChanges)),s+=l.originalLength,r+=l.modifiedLength)}return{quitEarly:i,changes:n}}_pushTrimWhitespaceCharChange(t,e,i,n,s,r,o){if(this._mergeTrimWhitespaceCharChange(t,e,i,n,s,r,o))return;let a;this.shouldComputeCharChanges&&(a=[new ip(e,i,e,n,s,r,s,o)]),t.push(new Rf(e,e,s,s,a))}_mergeTrimWhitespaceCharChange(t,e,i,n,s,r,o){const a=t.length;if(a===0)return!1;const l=t[a-1];return l.originalEndLineNumber===0||l.modifiedEndLineNumber===0?!1:l.originalEndLineNumber+1===e&&l.modifiedEndLineNumber+1===s?(l.originalEndLineNumber=e,l.modifiedEndLineNumber=s,this.shouldComputeCharChanges&&l.charChanges&&l.charChanges.push(new ip(e,i,e,n,s,r,s,o)),!0):!1}};function np(t,e){const i=fi(t);return i===-1?e:i+1}function sp(t,e){const i=Va(t);return i===-1?e:i+2}function kC(t){if(t===0)return()=>!0;const e=Date.now();return()=>Date.now()-e<t}function Gd(t){return t<0?0:t>255?255:t|0}function Lo(t){return t<0?0:t>4294967295?4294967295:t|0}var a5=class{constructor(t){this.values=t,this.prefixSum=new Uint32Array(t.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(t,e){t=Lo(t);const i=this.values,n=this.prefixSum,s=e.length;return s===0?!1:(this.values=new Uint32Array(i.length+s),this.values.set(i.subarray(0,t),0),this.values.set(i.subarray(t),t+s),this.values.set(e,t),t-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=t-1),this.prefixSum=new Uint32Array(this.values.length),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(n.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(t,e){return t=Lo(t),e=Lo(e),this.values[t]===e?!1:(this.values[t]=e,t-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=t-1),!0)}removeValues(t,e){t=Lo(t),e=Lo(e);const i=this.values,n=this.prefixSum;if(t>=i.length)return!1;const s=i.length-t;return e>=s&&(e=s),e===0?!1:(this.values=new Uint32Array(i.length-e),this.values.set(i.subarray(0,t),0),this.values.set(i.subarray(t+e),t),this.prefixSum=new Uint32Array(this.values.length),t-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=t-1),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(n.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return this.values.length===0?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(t){return t<0?0:(t=Lo(t),this._getPrefixSum(t))}_getPrefixSum(t){if(t<=this.prefixSumValidIndex[0])return this.prefixSum[t];let e=this.prefixSumValidIndex[0]+1;e===0&&(this.prefixSum[0]=this.values[0],e++),t>=this.values.length&&(t=this.values.length-1);for(let i=e;i<=t;i++)this.prefixSum[i]=this.prefixSum[i-1]+this.values[i];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],t),this.prefixSum[t]}getIndexOf(t){t=Math.floor(t),this.getTotalSum();let e=0,i=this.values.length-1,n=0,s=0,r=0;for(;e<=i;)if(n=e+(i-e)/2|0,s=this.prefixSum[n],r=s-this.values[n],t<r)i=n-1;else if(t>=s)e=n+1;else break;return new yL(n,t-r)}},l5=class{constructor(t){this._values=t,this._isValid=!1,this._validEndIndex=-1,this._prefixSum=[],this._indexBySum=[]}getTotalSum(){return this._ensureValid(),this._indexBySum.length}getPrefixSum(t){return this._ensureValid(),t===0?0:this._prefixSum[t-1]}getIndexOf(t){this._ensureValid();const e=this._indexBySum[t],i=e>0?this._prefixSum[e-1]:0;return new yL(e,t-i)}removeValues(t,e){this._values.splice(t,e),this._invalidate(t)}insertValues(t,e){this._values=Vu(this._values,t,e),this._invalidate(t)}_invalidate(t){this._isValid=!1,this._validEndIndex=Math.min(this._validEndIndex,t-1)}_ensureValid(){if(!this._isValid){for(let t=this._validEndIndex+1,e=this._values.length;t<e;t++){const i=this._values[t],n=t>0?this._prefixSum[t-1]:0;this._prefixSum[t]=n+i;for(let s=0;s<i;s++)this._indexBySum[n+s]=t}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(t,e){this._values[t]!==e&&(this._values[t]=e,this._invalidate(t))}},yL=class{constructor(t,e){this.index=t,this.remainder=e,this._prefixSumIndexOfResultBrand=void 0,this.index=t,this.remainder=e}},h5=class{constructor(t,e,i,n){this._uri=t,this._lines=e,this._eol=i,this._versionId=n,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(t){t.eol&&t.eol!==this._eol&&(this._eol=t.eol,this._lineStarts=null);const e=t.changes;for(const i of e)this._acceptDeleteRange(i.range),this._acceptInsertText(new A(i.range.startLineNumber,i.range.startColumn),i.text);this._versionId=t.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const t=this._eol.length,e=this._lines.length,i=new Uint32Array(e);for(let n=0;n<e;n++)i[n]=this._lines[n].length+t;this._lineStarts=new a5(i)}}_setLineText(t,e){this._lines[t]=e,this._lineStarts&&this._lineStarts.setValue(t,this._lines[t].length+this._eol.length)}_acceptDeleteRange(t){if(t.startLineNumber===t.endLineNumber){if(t.startColumn===t.endColumn)return;this._setLineText(t.startLineNumber-1,this._lines[t.startLineNumber-1].substring(0,t.startColumn-1)+this._lines[t.startLineNumber-1].substring(t.endColumn-1));return}this._setLineText(t.startLineNumber-1,this._lines[t.startLineNumber-1].substring(0,t.startColumn-1)+this._lines[t.endLineNumber-1].substring(t.endColumn-1)),this._lines.splice(t.startLineNumber,t.endLineNumber-t.startLineNumber),this._lineStarts&&this._lineStarts.removeValues(t.startLineNumber,t.endLineNumber-t.startLineNumber)}_acceptInsertText(t,e){if(e.length===0)return;const i=Th(e);if(i.length===1){this._setLineText(t.lineNumber-1,this._lines[t.lineNumber-1].substring(0,t.column-1)+i[0]+this._lines[t.lineNumber-1].substring(t.column-1));return}i[i.length-1]+=this._lines[t.lineNumber-1].substring(t.column-1),this._setLineText(t.lineNumber-1,this._lines[t.lineNumber-1].substring(0,t.column-1)+i[0]);const n=new Uint32Array(i.length-1);for(let s=1;s<i.length;s++)this._lines.splice(t.lineNumber+s-1,0,i[s]),n[s-1]=i[s].length+this._eol.length;this._lineStarts&&this._lineStarts.insertValues(t.lineNumber,n)}},wv=class LL{constructor(e){const i=Gd(e);this._defaultValue=i,this._asciiMap=LL._createAsciiMap(i),this._map=new Map}static _createAsciiMap(e){const i=new Uint8Array(256);for(let n=0;n<256;n++)i[n]=e;return i}set(e,i){const n=Gd(i);e>=0&&e<256?this._asciiMap[e]=n:this._map.set(e,n)}get(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue}},c5=class{constructor(t,e,i){const n=new Uint8Array(t*e);for(let s=0,r=t*e;s<r;s++)n[s]=i;this._data=n,this.rows=t,this.cols=e}get(t,e){return this._data[t*this.cols+e]}set(t,e,i){this._data[t*this.cols+e]=i}},d5=class{constructor(t){let e=0,i=0;for(let s=0,r=t.length;s<r;s++){const[o,a,l]=t[s];a>e&&(e=a),o>i&&(i=o),l>i&&(i=l)}e++,i++;const n=new c5(i,e,0);for(let s=0,r=t.length;s<r;s++){const[o,a,l]=t[s];n.set(o,a,l)}
7this._states=n,this._maxCharCode=e}nextState(t,e){return e<0||e>=this._maxCharCode?0:this._states.get(t,e)}},Af=null;function u5(){return Af===null&&(Af=new d5([[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]])),Af}var nl=null;function f5(){if(nl===null){nl=new wv(0);const t=` 	<>'"、。。、,.:;‘〈「『〔([{「」}])〕』」〉’`~…`;for(let i=0;i<35;i++)nl.set(t.charCodeAt(i),1);const e=".,;";for(let i=0;i<3;i++)nl.set(e.charCodeAt(i),2)}return nl}var g5=class rp{static _createLink(e,i,n,s,r){let o=r-1;do{const a=i.charCodeAt(o);if(e.get(a)!==2)break;o--}while(o>s);if(s>0){const a=i.charCodeAt(s-1),l=i.charCodeAt(o);(a===40&&l===41||a===91&&l===93||a===123&&l===125)&&o--}return{range:{startLineNumber:n,startColumn:s+1,endLineNumber:n,endColumn:o+2},url:i.substring(s,o+1)}}static computeLinks(e,i=u5()){const n=f5(),s=[];for(let r=1,o=e.getLineCount();r<=o;r++){const a=e.getLineContent(r),l=a.length;let h=0,c=0,d=0,u=1,g=!1,m=!1,_=!1,C=!1;for(;h<l;){let w=!1;const v=a.charCodeAt(h);if(u===13){let b;switch(v){case 40:g=!0,b=0;break;case 41:b=g?0:1;break;case 91:_=!0,m=!0,b=0;break;case 93:_=!1,b=m?0:1;break;case 123:C=!0,b=0;break;case 125:b=C?0:1;break;case 39:b=d===34||d===96?0:1;break;case 34:b=d===39||d===96?0:1;break;case 96:b=d===39||d===34?0:1;break;case 42:b=d===42?1:0;break;case 124:b=d===124?1:0;break;case 32:b=_?0:1;break;default:b=n.get(v)}b===1&&(s.push(rp._createLink(n,a,r,c,h)),w=!0)}else if(u===12){let b;v===91?(m=!0,b=0):b=n.get(v),b===1?w=!0:u=13}else u=i.nextState(u,v),u===0&&(w=!0);w&&(u=1,g=!1,m=!1,C=!1,c=h+1,d=v),h++}u===13&&s.push(rp._createLink(n,a,r,c,l))}return s}};function m5(t){return!t||typeof t.getLineCount!="function"||typeof t.getLineContent!="function"?[]:g5.computeLinks(t)}var op=class{constructor(){this._defaultValueSet=[["true","false"],["True","False"],["Private","Public","Friend","ReadOnly","Partial","Protected","WriteOnly"],["public","protected","private"]]}navigateValueSet(t,e,i,n,s){if(t&&e){const r=this.doNavigateValueSet(e,s);if(r)return{range:t,value:r}}if(i&&n){const r=this.doNavigateValueSet(n,s);if(r)return{range:i,value:r}}return null}doNavigateValueSet(t,e){const i=this.numberReplace(t,e);return i!==null?i:this.textReplace(t,e)}numberReplace(t,e){const i=Math.pow(10,t.length-(t.lastIndexOf(".")+1));let n=Number(t),s=parseFloat(t);return!isNaN(n)&&!isNaN(s)&&n===s?n===0&&!e?null:(n=Math.floor(n*i),n+=e?i:-i,String(n/i)):null}textReplace(t,e){return this.valueSetsReplace(this._defaultValueSet,t,e)}valueSetsReplace(t,e,i){let n=null;for(let s=0,r=t.length;n===null&&s<r;s++)n=this.valueSetReplace(t[s],e,i);return n}valueSetReplace(t,e,i){let n=t.indexOf(e);return n>=0?(n+=i?1:-1,n<0?n=t.length-1:n%=t.length,t[n]):null}};op.INSTANCE=new op;var p5=class extends wv{constructor(t){super(0);for(let e=0,i=t.length;e<i;e++)this.set(t.charCodeAt(e),2);this.set(32,1),this.set(9,1)}};function _5(t){const e={};return i=>(e.hasOwnProperty(i)||(e[i]=t(i)),e[i])}var La=_5(t=>new p5(t)),v5=999,Lr=class{constructor(t,e,i,n){this.searchString=t,this.isRegex=e,this.matchCase=i,this.wordSeparators=n}parseSearchRequest(){if(this.searchString==="")return null;let t;this.isRegex?t=C5(this.searchString):t=this.searchString.indexOf(`
8`)>=0;let e=null;try{e=Wy(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:t,global:!0,unicode:!0})}catch{return null}if(!e)return null;let i=!this.isRegex&&!t;return i&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(i=this.matchCase),new oT(e,this.wordSeparators?La(this.wordSeparators):null,i?this.searchString:null)}};function C5(t){if(!t||t.length===0)return!1;for(let e=0,i=t.length;e<i;e++)if(t.charCodeAt(e)===92){if(e++,e>=i)break;const n=t.charCodeAt(e);if(n===110||n===114||n===87)return!0}return!1}function Tr(t,e,i){if(!i)return new rh(t,null);const n=[];for(let s=0,r=e.length;s<r;s++)n[s]=e[s];return new rh(t,n)}var xC=class{constructor(t){const e=[];let i=0;for(let n=0,s=t.length;n<s;n++)t.charCodeAt(n)===10&&(e[i++]=n);this._lineFeedsOffsets=e}findLineFeedCountBeforeOffset(t){const e=this._lineFeedsOffsets;let i=0,n=e.length-1;if(n===-1||t<=e[0])return 0;for(;i<n;){const s=i+((n-i)/2>>0);e[s]>=t?n=s-1:e[s+1]>=t?(i=s,n=s):i=s+1}return i+1}},Jh=class{static findMatches(t,e,i,n,s){const r=e.parseSearchRequest();
vendor: 4,233 bytes, lines 8-10
8return r?r.regex.multiline?this._doFindMatchesMultiline(t,i,new qo(r.wordSeparators,r.regex),n,s):this._doFindMatchesLineByLine(t,i,r,n,s):[]}static _getMultilineMatchRange(t,e,i,n,s,r){let o,a=0;n?(a=n.findLineFeedCountBeforeOffset(s),o=e+s+a):o=e+s;let l;if(n){const d=n.findLineFeedCountBeforeOffset(s+r.length)-a;l=o+r.length+d}else l=o+r.length;const h=t.getPositionAt(o),c=t.getPositionAt(l);return new T(h.lineNumber,h.column,c.lineNumber,c.column)}static _doFindMatchesMultiline(t,e,i,n,s){const r=t.getOffsetAt(e.getStartPosition()),o=t.getValueInRange(e,1),a=t.getEOL()===`\r
9`?new xC(o):null,l=[];let h=0,c;for(i.reset(0);c=i.next(o);)if(l[h++]=Tr(this._getMultilineMatchRange(t,r,o,a,c.index,c[0]),c,n),h>=s)return l;return l}static _doFindMatchesLineByLine(t,e,i,n,s){const r=[];let o=0;if(e.startLineNumber===e.endLineNumber){const l=t.getLineContent(e.startLineNumber).substring(e.startColumn-1,e.endColumn-1);return o=this._findMatchesInLine(i,l,e.startLineNumber,e.startColumn-1,o,r,n,s),r}const a=t.getLineContent(e.startLineNumber).substring(e.startColumn-1);o=this._findMatchesInLine(i,a,e.startLineNumber,e.startColumn-1,o,r,n,s);for(let l=e.startLineNumber+1;l<e.endLineNumber&&o<s;l++)o=this._findMatchesInLine(i,t.getLineContent(l),l,0,o,r,n,s);if(o<s){const l=t.getLineContent(e.endLineNumber).substring(0,e.endColumn-1);o=this._findMatchesInLine(i,l,e.endLineNumber,0,o,r,n,s)}return r}static _findMatchesInLine(t,e,i,n,s,r,o,a){const l=t.wordSeparators;if(!o&&t.simpleSearch){const d=t.simpleSearch,u=d.length,g=e.length;let m=-u;for(;(m=e.indexOf(d,m+u))!==-1;)if((!l||Sv(l,e,g,m,u))&&(r[s++]=new rh(new T(i,m+1+n,i,m+1+u+n),null),s>=a))return s;return s}const h=new qo(t.wordSeparators,t.regex);let c;h.reset(0);do if(c=h.next(e),c&&(r[s++]=Tr(new T(i,c.index+1+n,i,c.index+1+c[0].length+n),c,o),s>=a))return s;while(c);return s}static findNextMatch(t,e,i,n){const s=e.parseSearchRequest();if(!s)return null;const r=new qo(s.wordSeparators,s.regex);return s.regex.multiline?this._doFindNextMatchMultiline(t,i,r,n):this._doFindNextMatchLineByLine(t,i,r,n)}static _doFindNextMatchMultiline(t,e,i,n){const s=new A(e.lineNumber,1),r=t.getOffsetAt(s),o=t.getLineCount(),a=t.getValueInRange(new T(s.lineNumber,s.column,o,t.getLineMaxColumn(o)),1),l=t.getEOL()===`\r
10`?new xC(a):null;i.reset(e.column-1);let h=i.next(a);return h?Tr(this._getMultilineMatchRange(t,r,a,l,h.index,h[0]),h,n):e.lineNumber!==1||e.column!==1?this._doFindNextMatchMultiline(t,new A(1,1),i,n):null}static _doFindNextMatchLineByLine(t,e,i,n){const s=t.getLineCount(),r=e.lineNumber,o=t.getLineContent(r),a=this._findFirstMatchInLine(i,o,r,e.column,n);if(a)return a;for(let l=1;l<=s;l++){const h=(r+l-1)%s,c=t.getLineContent(h+1),d=this._findFirstMatchInLine(i,c,h+1,1,n);if(d)return d}return null}static _findFirstMatchInLine(t,e,i,n,s){t.reset(n-1);const r=t.next(e);return r?Tr(new T(i,r.index+1,i,r.index+1+r[0].length),r,s):null}static findPreviousMatch(t,e,i,n){const s=e.parseSearchRequest();if(!s)return null;const r=new qo(s.wordSeparators,s.regex);return s.regex.multiline?this._doFindPreviousMatchMultiline(t,i,r,n):this._doFindPreviousMatchLineByLine(t,i,r,n)}static _doFindPreviousMatchMultiline(t,e,i,n){const s=this._doFindMatchesMultiline(t,new T(1,1,e.lineNumber,e.column),i,n,10*v5);if(s.length>0)return s[s.length-1];const r=t.getLineCount();return e.lineNumber!==r||e.column!==t.getLineMaxColumn(r)?this._doFindPreviousMatchMultiline(t,new A(r,t.getLineMaxColumn(r)),i,n):null}static _doFindPreviousMatchLineByLine(t,e,i,n){const s=t.getLineCount(),r=e.lineNumber,o=t.getLineContent(r).substring(0,e.column-1),a=this._findLastMatchInLine(i,o,r,n);if(a)return a;for(let l=1;l<=s;l++){const h=(s+r-l-1)%s,c=t.getLineContent(h+1),d=this._findLastMatchInLine(i,c,h+1,n);if(d)return d}return null}static _findLastMatchInLine(t,e,i,n){let s=null,r;for(t.reset(0);r=t.next(e);)s=Tr(new T(i,r.index+1,i,r.index+1+r[0].length),r,n);return s}};function b5(t,e,i,n,s){if(n===0)return!0;const r=e.charCodeAt(n-1);if(t.get(r)!==0||r===13||r===10)return!0;if(s>0){const o=e.charCodeAt(n);if(t.get(o)!==0)return!0}return!1}function w5(t,e,i,n,s){if(n+s===i)return!0;const r=e.charCodeAt(n+s);if(t.get(r)!==0||r===13||r===10)return!0;
10if(s>0){const o=e.charCodeAt(n+s-1);if(t.get(o)!==0)return!0}return!1}function Sv(t,e,i,n,s){return b5(t,e,i,n,s)&&w5(t,e,i,n,s)}var qo=class{constructor(t,e){this._wordSeparators=t,this._searchRegex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(t){this._searchRegex.lastIndex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(t){const e=t.length;let i;do{if(this._prevMatchStartIndex+this._prevMatchLength===e||(i=this._searchRegex.exec(t),!i))return null;const n=i.index,s=i[0].length;if(n===this._prevMatchStartIndex&&s===this._prevMatchLength){if(s===0){zd(t,e,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=n,this._prevMatchLength=s,!this._wordSeparators||Sv(this._wordSeparators,t,e,n,s))return i}while(i);return null}},S5=class{static computeUnicodeHighlights(t,e,i){const n=i?i.startLineNumber:1,s=i?i.endLineNumber:t.getLineCount(),r=new IC(e),o=r.getCandidateCodePoints();let a;o==="allNonBasicAscii"?a=new RegExp("[^\\t\\n\\r\\x20-\\x7E]","g"):a=new RegExp(`${y5(Array.from(o))}`,"g");const l=new qo(null,a),h=[];let c=!1,d,u=0,g=0,m=0;e:for(let _=n,C=s;_<=C;_++){const w=t.getLineContent(_),v=w.length;l.reset(0);do if(d=l.next(w),d){let b=d.index,y=d.index+d[0].length;if(b>0){const x=w.charCodeAt(b-1);at(x)&&b--}if(y+1<v){const x=w.charCodeAt(y-1);at(x)&&y++}const k=w.substring(b,y),S=ih(b+1,G1,w,0),L=r.shouldHighlightNonBasicASCII(k,S?S.word:null);if(L!==0){if(L===3?u++:L===2?g++:L===1?m++:X1(L),h.length>=1e3){c=!0;break e}h.push(new T(_,b+1,_,y+1))}}while(d)}return{ranges:h,hasMore:c,ambiguousCharacterCount:u,invisibleCharacterCount:g,nonBasicAsciiCharacterCount:m}}static computeUnicodeHighlightReason(t,e){const i=new IC(e);switch(i.shouldHighlightNonBasicASCII(t,null)){case 0:return null;case 2:return{kind:1};case 3:{const n=t.codePointAt(0),s=i.ambiguousCharacters.getPrimaryConfusable(n),r=bs.getLocales().filter(o=>!bs.getInstance(new Set([...e.allowedLocales,o])).isAmbiguous(n));return{kind:0,confusableWith:String.fromCodePoint(s),notAmbiguousInLocales:r}}case 1:return{kind:2}}}};function y5(t,e){return`[${Vn(t.map(i=>String.fromCodePoint(i)).join(""))}]`}var IC=class{constructor(t){this.options=t,this.allowedCodePoints=new Set(t.allowedCodePoints),this.ambiguousCharacters=bs.getInstance(new Set(t.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";const t=new Set;if(this.options.invisibleCharacters)for(const e of Gc.codePoints)EC(String.fromCodePoint(e))||t.add(e);if(this.options.ambiguousCharacters)for(const e of this.ambiguousCharacters.getConfusableCodePoints())t.add(e);for(const e of this.allowedCodePoints)t.delete(e);return t}shouldHighlightNonBasicASCII(t,e){const i=t.codePointAt(0);if(this.allowedCodePoints.has(i))return 0;if(this.options.nonBasicASCII)return 1;let n=!1,s=!1;if(e)for(let r of e){const o=r.codePointAt(0),a=hv(r);n=n||a,!a&&!this.ambiguousCharacters.isAmbiguous(o)&&!Gc.isInvisibleCharacter(o)&&(s=!0)}return!n&&s?0:this.options.invisibleCharacters&&!EC(t)&&Gc.isInvisibleCharacter(i)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(i)?3:0}};function EC(t){return t===" "||t===`
11`||t==="	"}var _r=function(t,e,i,n){function s(r){return r instanceof i?r:new i(function(o){o(r)})}return new(i||(i=Promise))(function(r,o){function a(c){try{h(n.next(c))}catch(d){o(d)}}function l(c){try{h(n.throw(c))}catch(d){o(d)}}function h(c){c.done?r(c.value):s(c.value).then(a,l)}h((n=n.apply(t,e||[])).next())})},L5=class extends h5{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(t){return this._lines[t-1]}getWordAtPosition(t,e){const i=ih(t.column,hy(e),this._lines[t.lineNumber-1],0);return i?new T(t.lineNumber,i.startColumn,t.lineNumber,i.endColumn):null}words(t){const e=this._lines,i=this._wordenize.bind(this);let n=0,s="",r=0,o=[];return{*[Symbol.iterator](){for(;;)if(r<o.length){const a=s.substring(o[r].start,o[r].end);r+=1,yield a}else if(n<e.length)s=e[n],o=i(s,t),r=0,n+=1;else break}}}getLineWords(t,e){const i=this._lines[t-1],n=this._wordenize(i,e),s=[];for(const r of n)s.push({word:i.substring(r.start,r.end),startColumn:r.start+1,endColumn:r.end+1});return s}_wordenize(t,e){const i=[];let n;for(e.lastIndex=0;(n=e.exec(t))&&n[0].length!==0;)i.push({start:n.index,end:n.index+n[0].length});return i}
11getValueInRange(t){if(t=this._validateRange(t),t.startLineNumber===t.endLineNumber)return this._lines[t.startLineNumber-1].substring(t.startColumn-1,t.endColumn-1);const e=this._eol,i=t.startLineNumber-1,n=t.endLineNumber-1,s=[];s.push(this._lines[i].substring(t.startColumn-1));for(let r=i+1;r<n;r++)s.push(this._lines[r]);return s.push(this._lines[n].substring(0,t.endColumn-1)),s.join(e)}offsetAt(t){return t=this._validatePosition(t),this._ensureLineStarts(),this._lineStarts.getPrefixSum(t.lineNumber-2)+(t.column-1)}positionAt(t){t=Math.floor(t),t=Math.max(0,t),this._ensureLineStarts();const e=this._lineStarts.getIndexOf(t),i=this._lines[e.index].length;return{lineNumber:1+e.index,column:1+Math.min(e.remainder,i)}}_validateRange(t){const e=this._validatePosition({lineNumber:t.startLineNumber,column:t.startColumn}),i=this._validatePosition({lineNumber:t.endLineNumber,column:t.endColumn});return e.lineNumber!==t.startLineNumber||e.column!==t.startColumn||i.lineNumber!==t.endLineNumber||i.column!==t.endColumn?{startLineNumber:e.lineNumber,startColumn:e.column,endLineNumber:i.lineNumber,endColumn:i.column}:t}_validatePosition(t){if(!A.isIPosition(t))throw new Error("bad position");let{lineNumber:e,column:i}=t,n=!1;if(e<1)e=1,i=1,n=!0;else if(e>this._lines.length)e=this._lines.length,i=this._lines[e-1].length+1,n=!0;else{const s=this._lines[e-1].length+1;i<1?(i=1,n=!0):i>s&&(i=s,n=!0)}return n?{lineNumber:e,column:i}:t}},Zd=class ap{constructor(e,i){this._host=e,this._models=Object.create(null),this._foreignModuleFactory=i,this._foreignModule=null}dispose(){this._models=Object.create(null)}_getModel(e){return this._models[e]}_getModels(){const e=[];return Object.keys(this._models).forEach(i=>e.push(this._models[i])),e}acceptNewModel(e){this._models[e.url]=new L5(Le.parse(e.url),e.lines,e.EOL,e.versionId)}acceptModelChanged(e,i){this._models[e]&&this._models[e].onEvents(i)}acceptRemovedModel(e){this._models[e]&&delete this._models[e]}computeUnicodeHighlights(e,i,n){return _r(this,void 0,void 0,function*(){const s=this._getModel(e);return s?S5.computeUnicodeHighlights(s,i,n):{ranges:[],hasMore:!1,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}})}computeDiff(e,i,n,s){return _r(this,void 0,void 0,function*(){const r=this._getModel(e),o=this._getModel(i);if(!r||!o)return null;const a=r.getLinesContent(),l=o.getLinesContent(),h=new o5(a,l,{shouldComputeCharChanges:!0,shouldPostProcessCharChanges:!0,shouldIgnoreTrimWhitespace:n,shouldMakePrettyDiff:!0,maxComputationTime:s}).computeDiff(),c=h.changes.length>0?!1:this._modelsAreIdentical(r,o);return{quitEarly:h.quitEarly,identical:c,changes:h.changes}})}_modelsAreIdentical(e,i){const n=e.getLineCount();if(n!==i.getLineCount())return!1;for(let s=1;s<=n;s++)if(e.getLineContent(s)!==i.getLineContent(s))return!1;return!0}computeMoreMinimalEdits(e,i){return _r(this,void 0,void 0,function*(){const n=this._getModel(e);if(!n)return i;const s=[];let r;i=i.slice(0).sort((o,a)=>o.range&&a.range?T.compareRangesUsingStarts(o.range,a.range):(o.range?0:1)-(a.range?0:1));for(let{range:o,text:a,eol:l}of i){if(typeof l=="number"&&(r=l),T.isEmpty(o)&&!a)continue;const h=n.getValueInRange(o);if(a=a.replace(/\r\n|\n|\r/g,n.eol),h===a)continue;if(Math.max(a.length,h.length)>ap._diffLimit){s.push({range:o,text:a});continue}const c=i5(h,a,!1),d=n.offsetAt(T.lift(o).getStartPosition());for(const u of c){const g=n.positionAt(d+u.originalStart),m=n.positionAt(d+u.originalStart+u.originalLength),_={text:a.substr(u.modifiedStart,u.modifiedLength),range:{startLineNumber:g.lineNumber,startColumn:g.column,endLineNumber:m.lineNumber,endColumn:m.column}};n.getValueInRange(_.range)!==_.text&&s.push(_)}}return typeof r=="number"&&s.push({eol:r,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),s})}computeLinks(e){return _r(this,void 0,void 0,function*(){const i=this._getModel(e);return i?m5(i):null})}textualSuggest(e,i,n,s){return _r(this,void 0,void 0,function*(){const r=new Dh(!0),o=new RegExp(n,s),a=new Set;e:for(let l of e){const h=this._getModel(l);if(h){for(let c of h.words(o))if(!(c===i||!isNaN(Number(c)))&&(a.add(c),a.size>ap._suggestionsLimit))break e}}return{words:Array.from(a),duration:r.elapsed()}})}computeWordRanges(e,i,n,s){return _r(this,void 0,void 0,function*(){const r=this._getModel(e);
11if(!r)return Object.create(null);const o=new RegExp(n,s),a=Object.create(null);for(let l=i.startLineNumber;l<i.endLineNumber;l++){const h=r.getLineWords(l,o);for(const c of h){if(!isNaN(Number(c.word)))continue;let d=a[c.word];d||(d=[],a[c.word]=d),d.push({startLineNumber:l,startColumn:c.startColumn,endLineNumber:l,endColumn:c.endColumn})}}return a})}navigateValueSet(e,i,n,s,r){return _r(this,void 0,void 0,function*(){const o=this._getModel(e);if(!o)return null;const a=new RegExp(s,r);i.startColumn===i.endColumn&&(i={startLineNumber:i.startLineNumber,startColumn:i.startColumn,endLineNumber:i.endLineNumber,endColumn:i.endColumn+1});const l=o.getValueInRange(i),h=o.getWordAtPosition({lineNumber:i.startLineNumber,column:i.startColumn},a);if(!h)return null;const c=o.getValueInRange(h);return op.INSTANCE.navigateValueSet(i,l,h,c,n)})}loadForeignModule(e,i,n){const r={host:aN(n,(o,a)=>this._host.fhr(o,a)),getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(r,i),Promise.resolve(Y1(this._foreignModule))):Promise.reject(new Error("Unexpected usage"))}fmr(e,i){if(!this._foreignModule||typeof this._foreignModule[e]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+e));try{return Promise.resolve(this._foreignModule[e].apply(this._foreignModule,i))}catch(n){return Promise.reject(n)}}};Zd._diffLimit=1e5;Zd._suggestionsLimit=1e4;typeof importScripts=="function"&&(Ve.monaco=Py());var kL=ge("textResourceConfigurationService"),xL=ge("textResourcePropertiesService"),cr=ge("logService"),fn;(function(t){t[t.Trace=0]="Trace",t[t.Debug=1]="Debug",t[t.Info=2]="Info",t[t.Warning=3]="Warning",t[t.Error=4]="Error",t[t.Critical=5]="Critical",t[t.Off=6]="Off"})(fn||(fn={}));var IL=fn.Info,k5=class extends V{constructor(){super(...arguments),this.level=IL,this._onDidChangeLogLevel=this._register(new M)}setLevel(t){this.level!==t&&(this.level=t,this._onDidChangeLogLevel.fire(this.level))}getLevel(){return this.level}},x5=class extends k5{constructor(t=IL){super(),this.setLevel(t)}trace(t,...e){this.getLevel()<=fn.Trace}debug(t,...e){this.getLevel()<=fn.Debug}info(t,...e){this.getLevel()<=fn.Info}error(t,...e){this.getLevel()<=fn.Error}dispose(){}},I5=class extends V{constructor(t){super(),this.logger=t,this._register(t)}getLevel(){return this.logger.getLevel()}trace(t,...e){this.logger.trace(t,...e)}debug(t,...e){this.logger.debug(t,...e)}info(t,...e){this.logger.info(t,...e)}error(t,...e){this.logger.error(t,...e)}},pe=ge("ILanguageFeaturesService"),E5=function(t,e,i,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r},sl=function(t,e){return function(i,n){e(i,n,t)}},lp=function(t,e,i,n){function s(r){return r instanceof i?r:new i(function(o){o(r)})}return new(i||(i=Promise))(function(r,o){function a(c){try{h(n.next(c))}catch(d){o(d)}}function l(c){try{h(n.throw(c))}catch(d){o(d)}}function h(c){c.done?r(c.value):s(c.value).then(a,l)}h((n=n.apply(t,e||[])).next())})},DC=6e4,NC=3e5;function Mr(t,e){const i=t.getModel(e);return!(!i||i.isTooLargeForSyncing())}var hp=class extends V{constructor(e,i,n,s,r){super(),this._modelService=e,this._workerManager=this._register(new N5(this._modelService,s)),this._logService=n,this._register(r.linkProvider.register({language:"*",hasAccessToAllModels:!0},{provideLinks:(o,a)=>Mr(this._modelService,o.uri)?this._workerManager.withWorker().then(l=>l.computeLinks(o.uri)).then(l=>l&&{links:l}):Promise.resolve({links:[]})})),this._register(r.completionProvider.register("*",new D5(this._workerManager,i,this._modelService,s)))}dispose(){super.dispose()}canComputeUnicodeHighlights(e){return Mr(this._modelService,e)}computedUnicodeHighlights(e,i,n){return this._workerManager.withWorker().then(s=>s.computedUnicodeHighlights(e,i,n))}computeDiff(e,i,n,s){return this._workerManager.withWorker().then(r=>r.computeDiff(e,i,n,s))}computeMoreMinimalEdits(e,i){if(Z1(i)){if(!Mr(this._modelService,e))return Promise.resolve(i);const n=Dh.create(!0),s=this._workerManager.withWorker().then(r=>r.computeMoreMinimalEdits(e,i));return s.finally(()=>this._logService.trace("FORMAT#computeMoreMinimalEdits",e.toString(!0),n.elapsed())),Promise.race([s,oh(1e3).then(()=>i)])}else return Promise.resolve(void 0)}canNavigateValueSet(e){return Mr(this._modelService,e)}navigateValueSet(e,i,n){return this._workerManager.withWorker().then(s=>s.navigateValueSet(e,i,n))}canComputeWordRanges(e){return Mr(this._modelService,e)}computeWordRanges(e,i){return this._workerManager.withWorker().then(n=>n.computeWordRanges(e,i))}};hp=E5([sl(0,Lt),sl(1,kL),sl(2,cr),sl(3,hr),sl(4,pe)],hp);var D5=class{constructor(t,e,i,n){this.languageConfigurationService=n,this._debugDisplayName="wordbasedCompletions",this._workerManager=t,this._configurationService=e,this._modelService=i}provideCompletionItems(t,e){return lp(this,void 0,void 0,function*(){const i=this._configurationService.getValue(t.uri,e,"editor");if(!i.wordBasedSuggestions)return;const n=[];if(i.wordBasedSuggestionsMode==="currentDocument")Mr(this._modelService,t.uri)&&n.push(t.uri);else for(const h of this._modelService.getModels())Mr(this._modelService,h.uri)&&(h===t?n.unshift(h.uri):(i.wordBasedSuggestionsMode==="allDocuments"||h.getLanguageId()===t.getLanguageId())&&n.push(h.uri));if(n.length===0)return;const s=this.languageConfigurationService.getLanguageConfiguration(t.getLanguageId()).getWordDefinition(),r=t.getWordAtPosition(e),o=r?new T(e.lineNumber,r.startColumn,e.lineNumber,r.endColumn):T.fromPositions(e),a=o.setEndPosition(e.lineNumber,e.column),l=yield(yield this._workerManager.withWorker()).textualSuggest(n,r?.word,s);if(l)return{duration:l.duration,suggestions:l.words.map(h=>({kind:18,label:h,insertText:h,range:{insert:a,replace:o}}))}})}},N5=class extends V{constructor(t,e){super(),this.languageConfigurationService=e,this._modelService=t,this._editorWorkerClient=null,this._lastWorkerUsedTime=new Date().getTime(),this._register(new Rh).cancelAndSet(()=>this._checkStopIdleWorker(),Math.round(NC/2)),this._register(this._modelService.onModelRemoved(i=>this._checkStopEmptyWorker()))}dispose(){this._editorWorkerClient&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null),super.dispose()}_checkStopEmptyWorker(){this._editorWorkerClient&&this._modelService.getModels().length===0&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}_checkStopIdleWorker(){this._editorWorkerClient&&new Date().getTime()-this._lastWorkerUsedTime>NC&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}withWorker(){return this._lastWorkerUsedTime=new Date().getTime(),this._editorWorkerClient||(this._editorWorkerClient=new EL(this._modelService,!1,"editorWorkerService",this.languageConfigurationService)),Promise.resolve(this._editorWorkerClient)}},T5=class extends V{constructor(t,e,i){if(super(),this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),this._proxy=t,this._modelService=e,!i){const n=new Rh;n.cancelAndSet(()=>this._checkStopModelSync(),Math.round(DC/2)),this._register(n)}}dispose(){for(let t in this._syncedModels)De(this._syncedModels[t]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),super.dispose()}ensureSyncedResources(t,e){for(const i of t){const n=i.toString();this._syncedModels[n]||this._beginModelSync(i,e),this._syncedModels[n]&&(this._syncedModelsLastUsedTime[n]=new Date().getTime())}}_checkStopModelSync(){const t=new Date().getTime(),e=[];for(let i in this._syncedModelsLastUsedTime)t-this._syncedModelsLastUsedTime[i]>DC&&e.push(i);for(const i of e)this._stopModelSync(i)}_beginModelSync(t,e){const i=this._modelService.getModel(t);if(!i||!e&&i.isTooLargeForSyncing())return;const n=t.toString();this._proxy.acceptNewModel({url:i.uri.toString(),lines:i.getLinesContent(),EOL:i.getEOL(),versionId:i.getVersionId()});const s=new ne;s.add(i.onDidChangeContent(r=>{this._proxy.acceptModelChanged(n.toString(),r)})),s.add(i.onWillDispose(()=>{this._stopModelSync(n)})),s.add(Ae(()=>{this._proxy.acceptRemovedModel(n)})),this._syncedModels[n]=s}_stopModelSync(t){const e=this._syncedModels[t];delete this._syncedModels[t],delete this._syncedModelsLastUsedTime[t],De(e)}},TC=class{constructor(t){this._instance=t,this._proxyObj=Promise.resolve(this._instance)}dispose(){this._instance.dispose()}getProxyObject(){return this._proxyObj}},Of=class{constructor(t){this._workerClient=t}fhr(t,e){return this._workerClient.fhr(t,e)}},EL=class extends V{constructor(t,e,i,n){super(),this.languageConfigurationService=n,this._disposed=!1,this._modelService=t,this._keepIdleModels=e,this._workerFactory=new pL(i),this._worker=null,this._modelManager=null}fhr(t,e){throw new Error("Not implemented!")}
11_getOrCreateWorker(){if(!this._worker)try{this._worker=this._register(new qT(this._workerFactory,"vs/editor/common/services/editorSimpleWorker",new Of(this)))}catch(t){tp(t),this._worker=new TC(new Zd(new Of(this),null))}return this._worker}_getProxy(){return this._getOrCreateWorker().getProxyObject().then(void 0,t=>(tp(t),this._worker=new TC(new Zd(new Of(this),null)),this._getOrCreateWorker().getProxyObject()))}_getOrCreateModelManager(t){return this._modelManager||(this._modelManager=this._register(new T5(t,this._modelService,this._keepIdleModels))),this._modelManager}_withSyncedResources(t,e=!1){return lp(this,void 0,void 0,function*(){return this._disposed?Promise.reject(qN()):this._getProxy().then(i=>(this._getOrCreateModelManager(i).ensureSyncedResources(t,e),i))})}computedUnicodeHighlights(t,e,i){return this._withSyncedResources([t]).then(n=>n.computeUnicodeHighlights(t.toString(),e,i))}computeDiff(t,e,i,n){return this._withSyncedResources([t,e],!0).then(s=>s.computeDiff(t.toString(),e.toString(),i,n))}computeMoreMinimalEdits(t,e){return this._withSyncedResources([t]).then(i=>i.computeMoreMinimalEdits(t.toString(),e))}computeLinks(t){return this._withSyncedResources([t]).then(e=>e.computeLinks(t.toString()))}textualSuggest(t,e,i){return lp(this,void 0,void 0,function*(){const n=yield this._withSyncedResources(t),s=i.source,r=Sf(i);return n.textualSuggest(t.map(o=>o.toString()),e,s,r)})}computeWordRanges(t,e){return this._withSyncedResources([t]).then(i=>{const n=this._modelService.getModel(t);if(!n)return Promise.resolve(null);const s=this.languageConfigurationService.getLanguageConfiguration(n.getLanguageId()).getWordDefinition(),r=s.source,o=Sf(s);return i.computeWordRanges(t.toString(),e,r,o)})}navigateValueSet(t,e,i){return this._withSyncedResources([t]).then(n=>{const s=this._modelService.getModel(t);if(!s)return null;const r=this.languageConfigurationService.getLanguageConfiguration(s.getLanguageId()).getWordDefinition(),o=r.source,a=Sf(r);return n.navigateValueSet(t.toString(),e,i,o,a)})}dispose(){super.dispose(),this._disposed=!0}};function M5(t,e,i){return new R5(t,e,i)}var R5=class extends EL{constructor(t,e,i){super(t,i.keepIdleModels||!1,i.label,e),this._foreignModuleId=i.moduleId,this._foreignModuleCreateData=i.createData||null,this._foreignModuleHost=i.host||null,this._foreignProxy=null}fhr(t,e){if(!this._foreignModuleHost||typeof this._foreignModuleHost[t]!="function")return Promise.reject(new Error("Missing method "+t+" or missing main thread foreign host."));try{return Promise.resolve(this._foreignModuleHost[t].apply(this._foreignModuleHost,e))}catch(i){return Promise.reject(i)}}_getForeignProxy(){return this._foreignProxy||(this._foreignProxy=this._getProxy().then(t=>{const e=this._foreignModuleHost?Y1(this._foreignModuleHost):[];return t.loadForeignModule(this._foreignModuleId,this._foreignModuleCreateData,e).then(i=>{this._foreignModuleCreateData=null;const n=(o,a)=>t.fmr(o,a),s=(o,a)=>function(){return a(o,Array.prototype.slice.call(arguments,0))},r={};for(const o of i)r[o]=s(o,n);return r})})),this._foreignProxy}getProxy(){return this._getForeignProxy()}withSyncedResources(t){return this._withSyncedResources(t).then(e=>this.getProxy())}},mi=class Oo{constructor(e,i,n){this._lineTokensBrand=void 0,this._tokens=e,this._tokensCount=this._tokens.length>>>1,this._text=i,this._languageIdCodec=n}static createEmpty(e,i){const n=Oo.defaultTokenMetadata,s=new Uint32Array(2);return s[0]=e.length,s[1]=n,new Oo(s,e,i)}equals(e){return e instanceof Oo?this.slicedEquals(e,0,this._tokensCount):!1}slicedEquals(e,i,n){if(this._text!==e._text||this._tokensCount!==e._tokensCount)return!1;const s=i<<1,r=s+(n<<1);for(let o=s;o<r;o++)if(this._tokens[o]!==e._tokens[o])return!1;return!0}getLineContent(){return this._text}getCount(){return this._tokensCount}getStartOffset(e){return e>0?this._tokens[e-1<<1]:0}getMetadata(e){return this._tokens[(e<<1)+1]}getLanguageId(e){const i=this._tokens[(e<<1)+1],n=li.getLanguageId(i);return this._languageIdCodec.decodeLanguageId(n)}getStandardTokenType(e){const i=this._tokens[(e<<1)+1];return li.getTokenType(i)}getForeground(e){const i=this._tokens[(e<<1)+1];return li.getForeground(i)}getClassName(e){const i=this._tokens[(e<<1)+1];return li.getClassNameFromMetadata(i)}getInlineStyle(e,i){const n=this._tokens[(e<<1)+1];return li.getInlineStyleFromMetadata(n,i)}getPresentation(e){const i=this._tokens[(e<<1)+1];return li.getPresentationFromMetadata(i)}getEndOffset(e){return this._tokens[e<<1]}findTokenIndexAtOffset(e){return Oo.findIndexInTokensArray(this._tokens,e)}inflate(){return this}sliceAndInflate(e,i,n){return new A5(this,e,i,n)}static convertToEndOffset(e,i){const n=(e.length>>>1)-1;for(let s=0;s<n;s++)e[s<<1]=e[s+1<<1];e[n<<1]=i}static findIndexInTokensArray(e,i){if(e.length<=2)return 0;let n=0,s=(e.length>>>1)-1;for(;n<s;){const r=n+Math.floor((s-n)/2),o=e[r<<1];if(o===i)return r+1;o<i?n=r+1:o>i&&(s=r)}return n}withInserted(e){if(e.length===0)return this;let i=0,n=0,s="";const r=new Array;let o=0;for(;;){const a=i<this._tokensCount?this._tokens[i<<1]:-1,l=n<e.length?e[n]:null;if(a!==-1&&(l===null||a<=l.offset)){s+=this._text.substring(o,a);const h=this._tokens[(i<<1)+1];r.push(s.length,h),i++,o=a}else if(l){if(l.offset>o){s+=this._text.substring(o,l.offset);const h=this._tokens[(i<<1)+1];r.push(s.length,h),o=l.offset}s+=l.text,r.push(s.length,l.tokenMetadata),n++}else break}return new Oo(new Uint32Array(r),s,this._languageIdCodec)}};mi.defaultTokenMetadata=16793600;var A5=class DL{constructor(e,i,n,s){this._source=e,this._startOffset=i,this._endOffset=n,this._deltaOffset=s,this._firstTokenIndex=e.findTokenIndexAtOffset(i),this._tokensCount=0;for(let r=this._firstTokenIndex,o=e.getCount();r<o&&!(e.getStartOffset(r)>=n);r++)this._tokensCount++}getMetadata(e){return this._source.getMetadata(this._firstTokenIndex+e)}getLanguageId(e){return this._source.getLanguageId(this._firstTokenIndex+e)}getLineContent(){return this._source.getLineContent().substring(this._startOffset,this._endOffset)}equals(e){return e instanceof DL?this._startOffset===e._startOffset&&this._endOffset===e._endOffset&&this._deltaOffset===e._deltaOffset&&this._source.slicedEquals(e._source,this._firstTokenIndex,this._tokensCount):!1}getCount(){return this._tokensCount}getForeground(e){return this._source.getForeground(this._firstTokenIndex+e)}getEndOffset(e){const i=this._source.getEndOffset(this._firstTokenIndex+e);return Math.min(this._endOffset,i)-this._startOffset+this._deltaOffset}getClassName(e){return this._source.getClassName(this._firstTokenIndex+e)}getInlineStyle(e,i){return this._source.getInlineStyle(this._firstTokenIndex+e,i)}getPresentation(e){return this._source.getPresentation(this._firstTokenIndex+e)}findTokenIndexAtOffset(e){return this._source.findTokenIndexAtOffset(e+this._startOffset-this._deltaOffset)-this._firstTokenIndex}},to=class Sl{constructor(e,i,n,s){this.startColumn=e,this.endColumn=i,this.className=n,this.type=s,this._lineDecorationBrand=void 0}static _equals(e,i){return e.startColumn===i.startColumn&&e.endColumn===i.endColumn&&e.className===i.className&&e.type===i.type}static equalsArr(e,i){const n=e.length;if(n!==i.length)return!1;for(let s=0;s<n;
vendor: 4,217 bytes, line 11
11s++)if(!Sl._equals(e[s],i[s]))return!1;return!0}static extractWrapped(e,i,n){if(e.length===0)return e;const s=i+1,r=n+1,o=n-i,a=[];let l=0;for(const h of e)h.endColumn<=s||h.startColumn>=r||(a[l++]=new Sl(Math.max(1,h.startColumn-s+1),Math.min(o+1,h.endColumn-s+1),h.className,h.type));return a}static filter(e,i,n,s){if(e.length===0)return[];const r=[];let o=0;for(let a=0,l=e.length;a<l;a++){const h=e[a],c=h.range;if(c.endLineNumber<i||c.startLineNumber>i||c.isEmpty()&&(h.type===0||h.type===3))continue;const d=c.startLineNumber===i?c.startColumn:n,u=c.endLineNumber===i?c.endColumn:s;r[o++]=new Sl(d,u,h.inlineClassName,h.type)}return r}static _typeCompare(e,i){const n=[2,0,1,3];return n[e]-n[i]}static compare(e,i){if(e.startColumn!==i.startColumn)return e.startColumn-i.startColumn;if(e.endColumn!==i.endColumn)return e.endColumn-i.endColumn;const n=Sl._typeCompare(e.type,i.type);return n!==0?n:e.className!==i.className?e.className<i.className?-1:1:0}},MC=class{constructor(t,e,i,n){this.startOffset=t,this.endOffset=e,this.className=i,this.metadata=n}},O5=class cp{constructor(){this.stopOffsets=[],this.classNames=[],this.metadata=[],this.count=0}static _metadata(e){let i=0;for(let n=0,s=e.length;n<s;n++)i|=e[n];return i}consumeLowerThan(e,i,n){for(;this.count>0&&this.stopOffsets[0]<e;){let s=0;for(;s+1<this.count&&this.stopOffsets[s]===this.stopOffsets[s+1];)s++;n.push(new MC(i,this.stopOffsets[s],this.classNames.join(" "),cp._metadata(this.metadata))),i=this.stopOffsets[s]+1,this.stopOffsets.splice(0,s+1),this.classNames.splice(0,s+1),this.metadata.splice(0,s+1),this.count-=s+1}return this.count>0&&i<e&&(n.push(new MC(i,e-1,this.classNames.join(" "),cp._metadata(this.metadata))),i=e),i}insert(e,i,n){if(this.count===0||this.stopOffsets[this.count-1]<=e)this.stopOffsets.push(e),this.classNames.push(i),this.metadata.push(n);else for(let s=0;s<this.count;s++)if(this.stopOffsets[s]>=e){this.stopOffsets.splice(s,0,e),this.classNames.splice(s,0,i),this.metadata.splice(s,0,n);break}this.count++}},P5=class{static normalize(t,e){if(e.length===0)return[];const i=[],n=new O5;let s=0;for(let r=0,o=e.length;r<o;r++){const a=e[r];let l=a.startColumn,h=a.endColumn;const c=a.className,d=a.type===1?2:a.type===2?4:0;if(l>1){const m=t.charCodeAt(l-2);at(m)&&l--}if(h>1){const m=t.charCodeAt(h-2);at(m)&&h--}const u=l-1,g=h-2;s=n.consumeLowerThan(u,s,i),n.count===0&&(s=u),n.insert(g,c,d)}return n.consumeLowerThan(1073741824,s,i),i}},lt=class{constructor(t,e,i){this._linePartBrand=void 0,this.endIndex=t,this.type=e,this.metadata=i}isWhitespace(){return!!(this.metadata&1)}isPseudoAfter(){return!!(this.metadata&4)}},F5=class{constructor(t,e){this.startOffset=t,this.endOffset=e}equals(t){return this.startOffset===t.startOffset&&this.endOffset===t.endOffset}},za=class{constructor(t,e,i,n,s,r,o,a,l,h,c,d,u,g,m,_,C,w,v){this.useMonospaceOptimizations=t,this.canUseHalfwidthRightwardsArrow=e,this.lineContent=i,this.continuesWithWrappedLine=n,this.isBasicASCII=s,this.containsRTL=r,this.fauxIndentLength=o,this.lineTokens=a,this.lineDecorations=l.sort(to.compare),this.tabSize=h,this.startVisibleColumn=c,this.spaceWidth=d,this.stopRenderingLineAfter=m,this.renderWhitespace=_==="all"?4:_==="boundary"?1:_==="selection"?2:_==="trailing"?3:0,this.renderControlCharacters=C,this.fontLigatures=w,this.selectionsOnLine=v&&v.sort((b,y)=>b.startOffset<y.startOffset?-1:1),Math.abs(g-d)<Math.abs(u-d)?(this.renderSpaceWidth=g,this.renderSpaceCharCode=11825):(this.renderSpaceWidth=u,this.renderSpaceCharCode=183)}sameSelection(t){if(this.selectionsOnLine===null)return t===null;if(t===null||t.length!==this.selectionsOnLine.length)return!1;for(let e=0;e<this.selectionsOnLine.length;e++)if(!this.selectionsOnLine[e].equals(t[e]))return!1;return!0}equals(t){return this.useMonospaceOptimizations===t.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===t.canUseHalfwidthRightwardsArrow&&this.lineContent===t.lineContent&&this.continuesWithWrappedLine===t.continuesWithWrappedLine&&this.isBasicASCII===t.isBasicASCII&&this.containsRTL===t.containsRTL&&this.fauxIndentLength===t.fauxIndentLength&&this.tabSize===t.tabSize&&this.startVisibleColumn===t.startVisibleColumn&&this.spaceWidth===t.spaceWi
11dth&&this.renderSpaceWidth===t.renderSpaceWidth&&this.renderSpaceCharCode===t.renderSpaceCharCode&&this.stopRenderingLineAfter===t.stopRenderingLineAfter&&this.renderWhitespace===t.renderWhitespace&&this.renderControlCharacters===t.renderControlCharacters&&this.fontLigatures===t.fontLigatures&&to.equalsArr(this.lineDecorations,t.lineDecorations)&&this.lineTokens.equals(t.lineTokens)&&this.sameSelection(t.selectionsOnLine)}},yv=class{constructor(t,e){this.partIndex=t,this.charIndex=e}},dp=class kr{constructor(e,i){this.length=e,this._data=new Uint32Array(this.length),this._absoluteOffsets=new Uint32Array(this.length)}static getPartIndex(e){return(e&4294901760)>>>16}static getCharIndex(e){return(e&65535)>>>0}setColumnInfo(e,i,n,s){const r=(i<<16|n<<0)>>>0;this._data[e-1]=r,this._absoluteOffsets[e-1]=s+n}getAbsoluteOffset(e){return this._absoluteOffsets.length===0?0:this._absoluteOffsets[e-1]}charOffsetToPartData(e){return this.length===0?0:e<0?this._data[0]:e>=this.length?this._data[this.length-1]:this._data[e]}getDomPosition(e){const i=this.charOffsetToPartData(e-1),n=kr.getPartIndex(i),s=kr.getCharIndex(i);return new yv(n,s)}getColumn(e,i){return this.partDataToCharOffset(e.partIndex,i,e.charIndex)+1}partDataToCharOffset(e,i,n){if(this.length===0)return 0;const s=(e<<16|n<<0)>>>0;let r=0,o=this.length-1;for(;r+1<o;){const g=r+o>>>1,m=this._data[g];if(m===s)return g;m>s?o=g:r=g}if(r===o)return r;const a=this._data[r],l=this._data[o];if(a===s)return r;if(l===s)return o;const h=kr.getPartIndex(a),c=kr.getCharIndex(a),d=kr.getPartIndex(l);let u;return h!==d?u=i:u=kr.getCharIndex(l),n-c<=u-n?r:o}},up=class{constructor(t,e,i){this._renderLineOutputBrand=void 0,this.characterMapping=t,this.containsRTL=e,this.containsForeignElements=i}};function Lv(t,e){if(t.lineContent.length===0){if(t.lineDecorations.length>0){e.appendASCIIString("<span>");let i=0,n=0,s=0;for(const o of t.lineDecorations)(o.type===1||o.type===2)&&(e.appendASCIIString('
11<span class="'),e.appendASCIIString(o.className),e.appendASCIIString('"></span>'),o.type===1&&(s|=1,i++),o.type===2&&(s|=2,n++));e.appendASCIIString("</span>");const r=new dp(1,i+n);return r.setColumnInfo(1,i,0,0),new up(r,!1,s)}return e.appendASCIIString("<span><span></span></span>"),new up(new dp(0,0),!1,0)}return j5(W5(t),e)}var B5=class{constructor(t,e,i,n){this.characterMapping=t,this.html=e,this.containsRTL=i,this.containsForeignElements=n}};function qu(t){const e=ya(1e4),i=Lv(t,e);return new B5(i.characterMapping,e.build(),i.containsRTL,i.containsForeignElements)}var V5=class{constructor(t,e,i,n,s,r,o,a,l,h,c,d,u,g,m){this.fontIsMonospace=t,this.canUseHalfwidthRightwardsArrow=e,this.lineContent=i,this.len=n,this.isOverflowing=s,this.parts=r,this.containsForeignElements=o,this.fauxIndentLength=a,this.tabSize=l,this.startVisibleColumn=h,this.containsRTL=c,this.spaceWidth=d,this.renderSpaceCharCode=u,this.renderWhitespace=g,this.renderControlCharacters=m}};function W5(t){const e=t.lineContent;let i,n;t.stopRenderingLineAfter!==-1&&t.stopRenderingLineAfter<e.length?(i=!0,n=t.stopRenderingLineAfter):(i=!1,n=e.length);let s=H5(t.lineTokens,t.fauxIndentLength,n);t.renderControlCharacters&&!t.isBasicASCII&&(s=U5(e,s)),(t.renderWhitespace===4||t.renderWhitespace===1||t.renderWhitespace===2&&t.selectionsOnLine||t.renderWhitespace===3)&&(s=$5(t,e,n,s));let r=0;if(t.lineDecorations.length>0){for(let o=0,a=t.lineDecorations.length;o<a;o++){const l=t.lineDecorations[o];l.type===3||l.type===1?r|=1:l.type===2&&(r|=2)}s=K5(e,n,s,t.lineDecorations)}return t.containsRTL||(s=z5(e,s,!t.isBasicASCII||t.fontLigatures)),new V5(t.useMonospaceOptimizations,t.canUseHalfwidthRightwardsArrow,e,n,i,s,r,t.fauxIndentLength,t.tabSize,t.startVisibleColumn,t.containsRTL,t.spaceWidth,t.renderSpaceCharCode,t.renderWhitespace,t.renderControlCharacters)}function H5(t,e,i){const n=[];let s=0;e>0&&(n[s++]=new lt(e,"",0));for(let r=0,o=t.getCount();r<o;r++){const a=t.getEndOffset(r);if(a<=e)continue;const l=t.getClassName(r);if(a>=i){n[s++]=new lt(i,l,0);break}n[s++]=new lt(a,l,0)}return n}function z5(t,e,i){let n=0;const s=[];let r=0;if(i)for(let o=0,a=e.length;o<a;o++){const l=e[o],h=l.endIndex;if(n+50<h){const c=l.type,d=l.metadata;let u=-1,g=n;for(let m=n;m<h;m++)t.charCodeAt(m)===32&&(u=m),u!==-1&&m-g>=50&&(s[r++]=new lt(u+1,c,d),g=u+1,u=-1);g!==h&&(s[r++]=new lt(h,c,d))}else s[r++]=l;n=h}else for(let o=0,a=e.length;o<a;o++){const l=e[o],h=l.endIndex,c=h-n;if(c>50){const d=l.type,u=l.metadata,g=Math.ceil(c/50);for(let m=1;m<g;m++){const _=n+m*50;s[r++]=new lt(_,d,u)}s[r++]=new lt(h,d,u)}else s[r++]=l;n=h}return s}function NL(t){return t<32?t!==9:t===127||t>=8234&&t<=8238||t>=8294&&t<=8297||t>=8206&&t<=8207||t===1564}function U5(t,e){const i=[];let n=new lt(0,"",0),s=0;for(const r of e){const o=r.endIndex;for(;s<o;s++)NL(t.charCodeAt(s))&&(s>n.endIndex&&(n=new lt(s,r.type,r.metadata),i.push(n)),n=new lt(s+1,"mtkcontrol",r.metadata),i.push(n));s>n.endIndex&&(n=new lt(o,r.type,r.metadata),i.push(n))}return i}function $5(t,e,i,n){const s=t.continuesWithWrappedLine,r=t.fauxIndentLength,o=t.tabSize,a=t.startVisibleColumn,l=t.useMonospaceOptimizations,h=t.selectionsOnLine,c=t.renderWhitespace===1,d=t.renderWhitespace===3,u=t.renderSpaceWidth!==t.spaceWidth,g=[];let m=0,_=0,C=n[_].type,w=n[_].endIndex;const v=n.length;let b=!1,y=fi(e),k;y===-1?(b=!0,y=i,k=i):k=Va(e);let S=!1,L=0,x=h&&h[L],E=a%o;for(let D=r;D<i;D++){const W=e.charCodeAt(D);x&&D>=x.endOffset&&(L++,x=h&&h[L]);let P;if(D<y||D>k)P=!0;else if(W===9)P=!0;else if(W===32)if(c)if(S)P=!0;else{const K=D+1<i?e.charCodeAt(D+1):0;P=K===32||K===9}else P=!0;else P=!1;if(P&&h&&(P=!!x&&x.startOffset<=D&&x.endOffset>D),P&&d&&(P=b||D>k),S){if(!P||!l&&E>=o){if(u){const K=m>0?g[m-1].endIndex:r;for(let j=K+1;j<=D;j++)g[m++]=new lt(j,"mtkw",1)}else g[m++]=new lt(D,"mtkw",1);E=E%o}}else(D===w||P&&D>r)&&(g[m++]=new lt(D,C,0),E=E%o);for(W===9?E=o:ir(W)?E+=2:E++,S=P;D===w&&(_++,_<v);)C=n[_].type,w=n[_].endIndex}let R=!1;if(S)if(s&&c){const D=i>0?e.charCodeAt(i-1):0,W=i>1?e.charCodeAt(i-2):0;D===32&&W!==32&&W!==9||(R=!0)}else R=!0;if(R)if(u){const D=m>0?g[m-1].endIndex:r;for(let W=D+1;W<=i;W++)g[m++]=new lt(W,"mtkw",1)}else g[m++]=new lt(i,"mtkw",1);else g[m++]=new lt(i,C,0);return g}function K5(t,e,i,n){n.sort(to.compare);const s=P5.normalize(t,n),r=s.length;let o=0;const a=[];let l=0,h=0;for(let d=0,u=i.length;d<u;d++){const g=i[d],m=g.endIndex,_=g.type,C=g.metadata;for(;o<r&&s[o].startOffset<m;){const w=s[o];if(w.startOffset>h&&(h=w.startOffset,a[l++]=new lt(h,_,C)),w.endOffset+1<=m)h=w.endOffset+1,a[l++]=new lt(h,_+" "+w.className,C|w.metadata),o++;else{h=m,a[l++]=new lt(h,_+" "+w.className,C|w.metadata);break}}m>h&&(h=m,a[l++]=new lt(h,_,C))}const c=i[i.length-1].endIndex;if(o<r&&s[o].startOffset===c)for(;o<r&&s[o].startOffset===c;){const d=s[o];a[l++]=new lt(h,d.className,d.metadata),o++}return a}function j5(t,e){const i=t.fontIsMonospace,n=t.canUseHalfwidthRightwardsArrow,s=t.containsForeignElements,r=t.lineContent,o=t.len,a=t.isOverflowing,l=t.parts,h=t.fauxIndentLength,c=t.tabSize,d=t.startVisibleColumn,u=t.containsRTL,g=t.spaceWi
11dth,m=t.renderSpaceCharCode,_=t.renderWhitespace,C=t.renderControlCharacters,w=new dp(o+1,l.length);let v=!1,b=0,y=d,k=0,S=0,L=0,x=0;u?e.appendASCIIString('<span dir="ltr">'):e.appendASCIIString("<span>");for(let E=0,R=l.length;E<R;E++){x+=L;const D=l[E],W=D.endIndex,P=D.type,K=_!==0&&D.isWhitespace(),j=K&&!i&&(P==="mtkw"||!s),ie=b===W&&D.isPseudoAfter();if(k=0,e.appendASCIIString('<span class="'),e.appendASCIIString(j?"mtkz":P),e.appendASCII(34),K){let J=0;{let ae=b,le=y;for(;ae<W;ae++){const Ue=(r.charCodeAt(ae)===9?c-le%c:1)|0;J+=Ue,ae>=h&&(le+=Ue)}}for(j&&(e.appendASCIIString(' style="width:'),e.appendASCIIString(String(g*J)),e.appendASCIIString('px"')),e.appendASCII(62);b<W;b++){w.setColumnInfo(b+1,E-S,k,x),S=0;const ae=r.charCodeAt(b);let le;if(ae===9){le=c-y%c|0,!n||le>1?e.write1(8594):e.write1(65515);for(let Ue=2;Ue<=le;Ue++)e.write1(160)}else le=1,e.write1(m);k+=le,b>=h&&(y+=le)}L=J}else{let J=0;for(e.appendASCII(62);b<W;b++){w.setColumnInfo(b+1,E-S,k,x),S=0;const ae=r.charCodeAt(b);let le=1,Ue=1;switch(ae){case 9:le=c-y%c,Ue=le;for(let He=1;He<=le;He++)e.write1(160);break;case 32:e.write1(160);break;case 60:e.appendASCIIString("&lt;");break;case 62:e.appendASCIIString("&gt;");break;case 38:e.appendASCIIString("&amp;");break;case 0:C?e.write1(9216):e.appendASCIIString("&#00;");break;case 65279:case 8232:case 8233:case 133:e.write1(65533);break;default:ir(ae)&&Ue++,C&&ae<32?e.write1(9216+ae):C&&ae===127?e.write1(9249):C&&NL(ae)?(e.appendASCIIString("[U+"),e.appendASCIIString(q5(ae)),e.appendASCIIString("]"),le=8):e.write1(ae)}k+=le,J+=le,b>=h&&(y+=Ue)}L=J}ie?S++:S=0,b>=o&&!v&&D.isPseudoAfter()&&(v=!0,w.setColumnInfo(b+1,E,k,x)),e.appendASCIIString("</span>")}return v||w.setColumnInfo(o+1,l.length-1,k,x),a&&e.appendASCIIString("<span>&hellip;</span>"),e.appendASCIIString("</span>"),new up(w,u,s)}function q5(t){return t.toString(16).toUpperCase().padStart(4,"0")}var RC=class{constructor(t,e,i,n){this._viewportBrand=void 0,this.top=t|0,this.left=e|0,this.width=i|0,this.height=n|0}},G5=class{constructor(t,e){this.tabSize=t,this.data=e}},kv=class{constructor(t,e,i,n,s,r,o){this._viewLineDataBrand=void 0,this.content=t,this.continuesWithWrappedLine=e,this.minColumn=i,this.maxColumn=n,this.startVisibleColumn=s,this.tokens=r,this.inlineDecorations=o}},vn=class fp{constructor(e,i,n,s,r,o,a,l,h,c){this.minColumn=e,this.maxColumn=i,this.content=n,this.continuesWithWrappedLine=s,this.isBasicASCII=fp.isBasicASCII(n,o),this.containsRTL=fp.containsRTL(n,this.isBasicASCII,r),this.tokens=a,this.inlineDecorations=l,this.tabSize=h,this.startVisibleColumn=c}static isBasicASCII(e,i){return i?hv(e):!0}static containsRTL(e,i,n){return!i&&n?lv(e):!1}},Vl=class{constructor(t,e,i){this.range=t,this.inlineClassName=e,this.type=i}},Z5=class{constructor(t,e,i,n){this.startOffset=t,this.endOffset=e,this.inlineClassName=i,this.inlineClassNameAffectsLetterSpacing=n}toInlineDecoration(t){return new Vl(new T(t,this.startOffset+1,t,this.endOffset+1),this.inlineClassName,this.inlineClassNameAffectsLetterSpacing?3:0)}},TL=class{constructor(t,e){this._viewModelDecorationBrand=void 0,this.range=t,this.options=e}},ML=class{constructor(t,e,i){this.color=t,this.zIndex=e,this.data=i}static cmp(t,e){return t.zIndex===e.zIndex?t.color<e.color?-1:t.color>e.color?1:0:t.zIndex-e.zIndex}};function Y5(t){return Array.isArray(t)}function X5(t){return!Y5(t)}function RL(t){return typeof t=="string"}function AC(t){return!RL(t)}function Po(t){return!t}function qs(t,e){return t.ignoreCase&&e?e.toLowerCase():e}function OC(t){return t.replace(/[&<>'"_]/g,"-")}function we(t,e){return new Error(`${t.languageId}: ${e}`)}function Fs(t,e,i,n,s){const r=/\$((\$)|(#)|(\d\d?)|[sS](\d\d?)|@(\w+))/g;let o=null;return e.replace(r,function(a,l,h,c,d,u,g,m,_){return Po(h)?Po(c)?!Po(d)&&d<n.length?qs(t,n[d]):!Po(g)&&t&&typeof t[g]=="string"?t[g]:(o===null&&(o=s.split("."),o.unshift(s)),!Po(u)&&u<o.length?qs(t,o[u]):""):qs(t,i):"$"})}function ec(t,e){let i=e;for(;i&&i.length>0;){const n=t.tokenizer[i];if(n)return n;const s=i.lastIndexOf(".");s<0?i=null:i=i.substr(0,s)}return null}function Q5(t,e){let i=e;for(;i&&i.length>0;){if(t.stateNames[i])return!0;const n=i.lastIndexOf(".");n<0?i=null:i=i.substr(0,n)}return!1}var AL=5,ah=class{constructor(t){this._maxCacheDepth=t,this._entries=Object.create(null)}static create(t,e){return this._INSTANCE.create(t,e)}create(t,e){if(t!==null&&t.depth>=this._maxCacheDepth)return new Jc(t,e);let i=Jc.getStackElementId(t);i.length>0&&(i+="|"),i+=e;let n=this._entries[i];return n||(n=new Jc(t,e),this._entries[i]=n,n)}};ah._INSTANCE=new ah(AL);var Jc=class OL{constructor(e,i){this.parent=e,this.state=i,this.depth=(this.parent?this.parent.depth:0)+1}static getStackElementId(e){let i="";for(;e!==null;)i.length>0&&(i+="|"),i+=e.state,e=e.parent;return i}static _equals(e,i){for(;e!==null&&i!==null;){if(e===i)return!0;
11if(e.state!==i.state)return!1;e=e.parent,i=i.parent}return e===null&&i===null}equals(e){return OL._equals(this,e)}push(e){return ah.create(this,e)}pop(){return this.parent}popall(){let e=this;for(;e.parent;)e=e.parent;return e}switchTo(e){return ah.create(this.parent,e)}},tc=class PL{constructor(e,i){this.languageId=e,this.state=i}equals(e){return this.languageId===e.languageId&&this.state.equals(e.state)}clone(){return this.state.clone()===this.state?this:new PL(this.languageId,this.state)}},Bs=class{constructor(t){this._maxCacheDepth=t,this._entries=Object.create(null)}static create(t,e){return this._INSTANCE.create(t,e)}create(t,e){if(e!==null)return new Pf(t,e);if(t!==null&&t.depth>=this._maxCacheDepth)return new Pf(t,e);const i=Jc.getStackElementId(t);let n=this._entries[i];return n||(n=new Pf(t,null),this._entries[i]=n,n)}};Bs._INSTANCE=new Bs(AL);var Pf=class FL{constructor(e,i){this.stack=e,this.embeddedLanguageData=i}clone(){return(this.embeddedLanguageData?this.embeddedLanguageData.clone():null)===this.embeddedLanguageData?this:Bs.create(this.stack,this.embeddedLanguageData)}equals(e){return!(e instanceof FL)||!this.stack.equals(e.stack)?!1:this.embeddedLanguageData===null&&e.embeddedLanguageData===null?!0:this.embeddedLanguageData===null||e.embeddedLanguageData===null?!1:this.embeddedLanguageData.equals(e.embeddedLanguageData)}},J5=class{constructor(){this._tokens=[],this._languageId=null,this._lastTokenType=null,this._lastTokenLanguage=null}enterLanguage(t){this._languageId=t}emit(t,e){this._lastTokenType===e&&this._lastTokenLanguage===this._languageId||(this._lastTokenType=e,this._lastTokenLanguage=this._languageId,this._tokens.push(new nh(t,e,this._languageId)))}nestedLanguageTokenize(t,e,i,n){const s=i.languageId,r=i.state,o=Ge.get(s);if(!o)return this.enterLanguage(s),this.emit(n,""),r;const a=o.tokenize(t,e,r);if(n!==0)for(const l of a.tokens)this._tokens.push(new nh(l.offset+n,l.type,l.language));else this._tokens=this._tokens.concat(a.tokens);return this._lastTokenType=null,this._lastTokenLanguage=null,this._languageId=null,a.endState}finalize(t){return new iv(this._tokens,t)}},eM=class gp{constructor(e,i){this._languageService=e,this._theme=i,this._prependTokens=null,this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0}enterLanguage(e){this._currentLanguageId=this._languageService.languageIdCodec.encodeLanguageId(e)}emit(e,i){const n=this._theme.match(this._currentLanguageId,i);this._lastTokenMetadata!==n&&(this._lastTokenMetadata=n,this._tokens.push(e),this._tokens.push(n))}static _merge(e,i,n){const s=e!==null?e.length:0,r=i.length,o=n!==null?n.length:0;if(s===0&&r===0&&o===0)return new Uint32Array(0);if(s===0&&r===0)return n;if(r===0&&o===0)return e;const a=new Uint32Array(s+r+o);e!==null&&a.set(e);for(let l=0;l<r;l++)a[s+l]=i[l];return n!==null&&a.set(n,s+r),a}nestedLanguageTokenize(e,i,n,s){const r=n.languageId,o=n.state,a=Ge.get(r);if(!a)return this.enterLanguage(r),this.emit(s,""),o;const l=a.tokenizeEncoded(e,i,o);if(s!==0)for(let h=0,c=l.tokens.length;h<c;h+=2)l.tokens[h]+=s;return this._prependTokens=gp._merge(this._prependTokens,this._tokens,l.tokens),this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0,l.endState}finalize(e){return new Uu(gp._merge(this._prependTokens,this._tokens,null),e)}},xv=class BL{constructor(e,i,n,s){this._languageService=e,this._standaloneThemeService=i,this._languageId=n,this._lexer=s,this._embeddedLanguages=Object.create(null),this.embeddedLoaded=Promise.resolve(void 0);let r=!1;this._tokenizationRegistryListener=Ge.onDidChange(o=>{if(r)return;let a=!1;for(let l=0,h=o.changedLanguages.length;l<h;l++){const c=o.changedLanguages[l];if(this._embeddedLanguages[c]){a=!0;break}}a&&(r=!0,Ge.fire([this._languageId]),r=!1)})}dispose(){this._tokenizationRegistryListener.dispose()}getLoadStatus(){const e=[];for(let i in this._embeddedLanguages){const n=Ge.get(i);if(n){if(n instanceof BL){const s=n.getLoadStatus();s.loaded===!1&&e.push(s.promise)}continue}Ge.isResolved(i)||e.push(Ge.getOrCreate(i))}return e.length===0?{loaded:!0}:{loaded:!1,promise:Promise.all(e).then(i=>{})}}getInitialState(){const e=ah.create(null,this._lexer.start);return Bs.create(e,null)}tokenize(e,i,n){const s=new J5,r=this._tokenize(e,i,n,s);return s.finalize(r)}tokenizeEncoded(e,i,n){const s=new eM(this._languageService,this._standaloneThemeService.getColorTheme(
vendor: 5,559 bytes, lines 11-12
11).tokenTheme),r=this._tokenize(e,i,n,s);return s.finalize(r)}_tokenize(e,i,n,s){return n.embeddedLanguageData?this._nestedTokenize(e,i,n,0,s):this._myTokenize(e,i,n,0,s)}_findLeavingNestedLanguageOffset(e,i){let n=this._lexer.tokenizer[i.stack.state];if(!n&&(n=ec(this._lexer,i.stack.state),!n))throw we(this._lexer,"tokenizer state is not defined: "+i.stack.state);let s=-1,r=!1;for(const o of n){if(!AC(o.action)||o.action.nextEmbedded!=="@pop")continue;r=!0;let a=o.regex;const l=o.regex.source;if(l.substr(0,4)==="^(?:"&&l.substr(l.length-1,1)===")"){const c=(a.ignoreCase?"i":"")+(a.unicode?"u":"");a=new RegExp(l.substr(4,l.length-5),c)}const h=e.search(a);h===-1||h!==0&&o.matchOnlyAtLineStart||(s===-1||h<s)&&(s=h)}if(!r)throw we(this._lexer,'no rule containing nextEmbedded: "@pop" in tokenizer embedded state: '+i.stack.state);return s}_nestedTokenize(e,i,n,s,r){const o=this._findLeavingNestedLanguageOffset(e,n);if(o===-1){const h=r.nestedLanguageTokenize(e,i,n.embeddedLanguageData,s);return Bs.create(n.stack,new tc(n.embeddedLanguageData.languageId,h))}const a=e.substring(0,o);a.length>0&&r.nestedLanguageTokenize(a,!1,n.embeddedLanguageData,s);const l=e.substring(o);return this._myTokenize(l,i,n,s+o,r)}_safeRuleName(e){return e?e.name:"(unknown)"}_myTokenize(e,i,n,s,r){r.enterLanguage(this._languageId);const o=e.length,a=i&&this._lexer.includeLF?e+`
12`:e,l=a.length;let h=n.embeddedLanguageData,c=n.stack,d=0,u=null,g=!0;for(;g||d<l;){const m=d,_=c.depth,C=u?u.groups.length:0,w=c.state;let v=null,b=null,y=null,k=null,S=null;if(u){v=u.matches;const E=u.groups.shift();b=E.matched,y=E.action,k=u.rule,u.groups.length===0&&(u=null)}else{if(!g&&d>=l)break;g=!1;let E=this._lexer.tokenizer[w];if(!E&&(E=ec(this._lexer,w),!E))throw we(this._lexer,"tokenizer state is not defined: "+w);let R=a.substr(d);for(const D of E)if((d===0||!D.matchOnlyAtLineStart)&&(v=R.match(D.regex),v)){b=v[0],y=D.action;break}}if(v||(v=[""],b=""),y||(d<l&&(v=[a.charAt(d)],b=v[0]),y=this._lexer.defaultToken),b===null)break;for(d+=b.length;X5(y)&&AC(y)&&y.test;)y=y.test(b,v,w,d===l);let L=null;if(typeof y=="string"||Array.isArray(y))L=y;else if(y.group)L=y.group;else if(y.token!==null&&y.token!==void 0){if(y.tokenSubst?L=Fs(this._lexer,y.token,b,v,w):L=y.token,y.nextEmbedded)if(y.nextEmbedded==="@pop"){if(!h)throw we(this._lexer,"cannot pop embedded language if not inside one");h=null}else{if(h)throw we(this._lexer,"cannot enter embedded language from within an embedded language");S=Fs(this._lexer,y.nextEmbedded,b,v,w)}if(y.goBack&&(d=Math.max(0,d-y.goBack)),y.switchTo&&typeof y.switchTo=="string"){let E=Fs(this._lexer,y.switchTo,b,v,w);if(E[0]==="@"&&(E=E.substr(1)),ec(this._lexer,E))c=c.switchTo(E);else throw we(this._lexer,"trying to switch to a state '"+E+"' that is undefined in rule: "+this._safeRuleName(k))}else{if(y.transform&&typeof y.transform=="function")throw we(this._lexer,"action.transform not supported");if(y.next)if(y.next==="@push"){if(c.depth>=this._lexer.maxStack)throw we(this._lexer,"maximum tokenizer stack size reached: ["+c.state+","+c.parent.state+",...]");c=c.push(w)}else if(y.next==="@pop"){if(c.depth<=1)throw we(this._lexer,"trying to pop an empty stack in rule: "+this._safeRuleName(k));c=c.pop()}else if(y.next==="@popall")c=c.popall();else{let E=Fs(this._lexer,y.next,b,v,w);if(E[0]==="@"&&(E=E.substr(1)),ec(this._lexer,E))c=c.push(E);else throw we(this._lexer,"trying to set a next state '"+E+"' that is undefined in rule: "+this._safeRuleName(k))}}y.log&&typeof y.log=="string"&&(this._lexer,this._lexer.languageId+""+Fs(this._lexer,y.log,b,v,w),void 0)}if(L===null)throw we(this._lexer,"lexer rule has no well-defined action in rule: "+this._safeRuleName(k));const x=E=>{const R=this._languageService.getLanguageIdByLanguageName(E)||this._languageService.getLanguageIdByMimeType(E)||E,D=this._getNestedEmbeddedLanguageData(R);if(d<l){const W=e.substr(d);return this._nestedTokenize(W,i,Bs.create(c,D),s+d,r)}else return Bs.create(c,D)};if(Array.isArray(L)){if(u&&u.groups.length>0)throw we(this._lexer,"groups cannot be nested: "+this._safeRuleName(k));if(v.length!==L.length+1)throw we(this._lexer,"matched number of groups does not match the number of actions in rule: "+this._safeRuleName(k));let E=0;for(let R=1;R<v.length;R++)E+=v[R].length;if(E!==b.length)throw we(this._lexer,"with groups, all characters should be matched in consecutive groups in rule: "+this._safeRuleName(k));u={rule:k,matches:v,groups:[]};for(let R=0;R<L.length;R++)u.groups[R]={action:L[R],matched:v[R+1]};d-=b.length;continue}else{if(L==="@rematch"&&(d-=b.length,b="",v=null,L="",S!==null))return x(S);if(b.length===0){if(l===0||_!==c.depth||w!==c.state||(u?u.groups.length:0)!==C)continue;throw we(this._lexer,"no progress in tokenizer in rule: "+this._safeRuleName(k))}let E=null;if(RL(L)&&L.indexOf("@brackets")===0){const R=L.substr(9),D=tM(this._lexer,b);if(!D)throw we(this._lexer,"@brackets token returned but no bracket defined as: "+b);E=OC(D.token+R)}else{const R=L===""?"":L+this._lexer.tokenPostfix;E=OC(R)}m<o&&r.emit(m+s,E)}if(S!==null)return x(S)}return Bs.create(c,h)}_getNestedEmbeddedLanguageData(e){if(!this._languageService.isRegisteredLanguageId(e))return new tc(e,jd);e!==this._languageId&&(Ge.getOrCreate(e),this._embeddedLanguages[e]=!0);const i=Ge.get(e);return i?new tc(e,i.getInitialState()):new tc(e,jd)}};function tM(t,e){if(!e)return null;e=qs(t,e);const i=t.brackets;for(const n of i){if(n.open===e)return{token:n.token,bracketType:1};if(n.close===e)return{token:n.token,bracketType:-1}}return null}
12var iM=function(t,e,i,n){function s(r){return r instanceof i?r:new i(function(o){o(r)})}return new(i||(i=Promise))(function(r,o){function a(c){try{h(n.next(c))}catch(d){o(d)}}function l(c){try{h(n.throw(c))}catch(d){o(d)}}function h(c){c.done?r(c.value):s(c.value).then(a,l)}h((n=n.apply(t,e||[])).next())})},Ff,Bf=(Ff=window.trustedTypes)===null||Ff===void 0?void 0:Ff.createPolicy("standaloneColorizer",{createHTML:t=>t}),Iv=class{static colorizeElement(t,e,i,n){n=n||{};const s=n.theme||"vs",r=n.mimeType||i.getAttribute("lang")||i.getAttribute("data-lang");if(!r)return Promise.resolve();const o=e.getLanguageIdByMimeType(r)||r;t.setTheme(s);const a=i.firstChild?i.firstChild.nodeValue:"";i.className+=" "+s;const l=h=>{var c;i.innerHTML=(c=Bf?.createHTML(h))!==null&&c!==void 0?c:h};return this.colorize(e,a||"",o,n).then(l,h=>{})}static colorize(t,e,i,n){return iM(this,void 0,void 0,function*(){const s=t.languageIdCodec;let r=4;n&&typeof n.tabSize=="number"&&(r=n.tabSize),dv(e)&&(e=e.substr(1));const o=Th(e);if(!t.isRegisteredLanguageId(i))return PC(o,r,s);const a=yield Ge.getOrCreate(i);return a?nM(o,r,a,s):PC(o,r,s)})}static colorizeLine(t,e,i,n,s=4){const r=vn.isBasicASCII(t,e),o=vn.containsRTL(t,r,i);return qu(new za(!1,!0,t,!1,r,o,0,n,[],s,0,0,0,0,-1,"none",!1,!1,null)).html}static colorizeModelLine(t,e,i=4){const n=t.getLineContent(e);t.forceTokenization(e);const s=t.getLineTokens(e).inflate();return this.colorizeLine(n,t.mightContainNonBasicASCII(),t.mightContainRTL(),s,i)}};function nM(t,e,i,n){return new Promise((s,r)=>{const o=()=>{const a=sM(t,e,i,n);if(i instanceof xv){const l=i.getLoadStatus();if(l.loaded===!1){l.promise.then(o,r);return}}s(a)};o()})}function PC(t,e,i){let n=[];const r=new Uint32Array(2);r[0]=0,r[1]=16793600;for(let o=0,a=t.length;o<a;o++){const l=t[o];r[0]=l.length;const h=new mi(r,l,i),c=vn.isBasicASCII(l,!0),d=vn.containsRTL(l,c,!0),u=qu(new za(!1,!0,l,!1,c,d,0,h,[],e,0,0,0,0,-1,"none",!1,!1,null));n=n.concat(u.html),n.push("<br/>")}return n.join("")}function sM(t,e,i,n){let s=[],r=i.getInitialState();for(let o=0,a=t.length;o<a;o++){const l=t[o],h=i.tokenizeEncoded(l,!0,r);mi.convertToEndOffset(h.tokens,l.length);const c=new mi(h.tokens,l,n),d=vn.isBasicASCII(l,!0),u=vn.containsRTL(l,d,!0),g=qu(new za(!1,!0,l,!1,d,u,0,c.inflate(),[],e,0,0,0,0,-1,"none",!1,!1,null));s=s.concat(g.html),s.push("<br/>"),r=h.endState}return s.join("")}var VL={clipboard:{writeText:ia||document.queryCommandSupported&&document.queryCommandSupported("copy")||!!(navigator&&navigator.clipboard&&navigator.clipboard.writeText),readText:ia||!!(navigator&&navigator.clipboard&&navigator.clipboard.readText)},keyboard:ia||qy?0:navigator.keyboard||Wn?1:2,touch:"ontouchstart"in window||navigator.maxTouchPoints>0,pointerEvents:window.PointerEvent&&("ontouchstart"in window||window.navigator.maxTouchPoints>0||navigator.maxTouchPoints>0)};function mp(t,e){if(t===0)return null;const i=(t&65535)>>>0,n=(t&4294901760)>>>16;return n!==0?new Yd([Vf(i,e),Vf(n,e)]):new Yd([Vf(i,e)])}function Vf(t,e){const i=!!(t&2048),n=!!(t&256),s=e===2?n:i,r=!!(t&1024),o=!!(t&512),a=e===2?i:n,l=t&255;return new lh(s,r,o,a,l)}var lh=class{constructor(t,e,i,n,s){this.ctrlKey=t,this.shiftKey=e,this.altKey=i,this.metaKey=n,this.keyCode=s}equals(t){return this.ctrlKey===t.ctrlKey&&this.shiftKey===t.shiftKey&&this.altKey===t.altKey&&this.metaKey===t.metaKey&&this.keyCode===t.keyCode}isModifierKey(){return this.keyCode===0||this.keyCode===5||this.keyCode===57||this.keyCode===6||this.keyCode===4}toChord(){return new Yd([this])}isDuplicateModifierCase(){return this.ctrlKey&&this.keyCode===5||this.shiftKey&&this.keyCode===4||this.altKey&&this.keyCode===6||this.metaKey&&this.keyCode===57}},Yd=class{constructor(t){if(t.length===0)throw Q1("parts");this.parts=t}},rM=class{constructor(t,e,i,n,s,r){this.ctrlKey=t,this.shiftKey=e,this.altKey=i,this.metaKey=n,this.keyLabel=s,this.keyAriaLabel=r}},oM=class{};function aM(t){if(t.charCode){let i=String.fromCharCode(t.charCode).toUpperCase();return Vr.fromString(i)}const e=t.keyCode;if(e===3)return 7;if(Ii){if(e===59)return 80;if(e===107)return 81;if(e===109)return 83;if(fe&&e===224)return 57}else if(js){if(e===91)return 57;if(fe&&e===93)return 57;if(!fe&&e===92)return 57}return Ey[e]||0}var lM=fe?256:2048,hM=512,cM=1024,dM=fe?2048:256,Pe=class{constructor(t){this._standardKeyboardEventBrand=!0;let e=t;this.browserEvent=e,this.target=e.target,this.ctrlKey=e.ctrlKey,this.shiftKey=e.shiftKey,this.altKey=e.altKey,this.metaKey=e.metaKey,this.keyCode=aM(e),this.code=e.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(t){return this._asKeybinding===t}_computeKeybinding(){let t=0;this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(t=this.keyCode);let e=0;
12return this.ctrlKey&&(e|=lM),this.altKey&&(e|=hM),this.shiftKey&&(e|=cM),this.metaKey&&(e|=dM),e|=t,e}_computeRuntimeKeybinding(){let t=0;return this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(t=this.keyCode),new lh(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,t)}},pp=!1,ko=null;function uM(t){if(!t.parent||t.parent===t)return null;try{let e=t.location,i=t.parent.location;if(e.origin!=="null"&&i.origin!=="null"&&e.origin!==i.origin)return pp=!0,null}catch{return pp=!0,null}return t.parent}var _p=class{static getSameOriginWindowChain(){if(!ko){ko=[];let t=window,e;do e=uM(t),e?ko.push({window:t,iframeElement:t.frameElement||null}):ko.push({window:t,iframeElement:null}),t=e;while(t)}return ko.slice(0)}static hasDifferentOriginAncestor(){return ko||this.getSameOriginWindowChain(),pp}static getPositionOfChildWindowRelativeToAncestorWindow(t,e){if(!e||t===e)return{top:0,left:0};let i=0,n=0,s=this.getSameOriginWindowChain();for(const r of s){if(i+=r.window.scrollY,n+=r.window.scrollX,r.window===e||!r.iframeElement)break;let o=r.iframeElement.getBoundingClientRect();i+=o.top,n+=o.left}return{top:i,left:n}}},ji=class{constructor(t){this.timestamp=Date.now(),this.browserEvent=t,this.leftButton=t.button===0,this.middleButton=t.button===1,this.rightButton=t.button===2,this.buttons=t.buttons,this.target=t.target,this.detail=t.detail||1,t.type==="dblclick"&&(this.detail=2),this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,typeof t.pageX=="number"?(this.posx=t.pageX,this.posy=t.pageY):(this.posx=t.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,this.posy=t.clientY+document.body.scrollTop+document.documentElement.scrollTop);let e=_p.getPositionOfChildWindowRelativeToAncestorWindow(self,t.view);this.posx-=e.left,this.posy-=e.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}},ka=class{constructor(t,e=0,i=0){if(this.browserEvent=t||null,this.target=t?t.target||t.targetNode||t.srcElement:null,this.deltaY=i,this.deltaX=e,t){let n=t,s=t;if(typeof n.wheelDeltaY<"u")this.deltaY=n.wheelDeltaY/120;else if(typeof s.VERTICAL_AXIS<"u"&&s.axis===s.VERTICAL_AXIS)this.deltaY=-s.detail/3;else if(t.type==="wheel"){const r=t;r.deltaMode===r.DOM_DELTA_LINE?Ii&&!fe?this.deltaY=-t.deltaY/3:this.deltaY=-t.deltaY:this.deltaY=-t.deltaY/40}if(typeof n.wheelDeltaX<"u")Wn&&ei?this.deltaX=-(n.wheelDeltaX/120):this.deltaX=n.wheelDeltaX/120;else if(typeof s.HORIZONTAL_AXIS<"u"&&s.axis===s.HORIZONTAL_AXIS)this.deltaX=-t.detail/3;else if(t.type==="wheel"){const r=t;r.deltaMode===r.DOM_DELTA_LINE?Ii&&!fe?this.deltaX=-t.deltaX/3:this.deltaX=-t.deltaX:this.deltaX=-t.deltaX/40}this.deltaY===0&&this.deltaX===0&&t.wheelDelta&&(this.deltaY=t.wheelDelta/120)}}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation()}},_e;(function(t){t.inMemory="inmemory",t.vscode="vscode",t.internal="private",t.walkThrough="walkThrough",t.walkThroughSnippet="walkThroughSnippet",t.http="http",t.https="https",t.file="file",t.mailto="mailto",t.untitled="untitled",t.data="data",t.command="command",t.vscodeRemote="vscode-remote",t.vscodeRemoteResource="vscode-remote-resource",t.userData="vscode-userdata",t.vscodeCustomEditor="vscode-custom-editor",t.vscodeNotebook="vscode-notebook",t.vscodeNotebookCell="vscode-notebook-cell",t.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",t.vscodeNotebookCellOutput="vscode-notebook-cell-output",t.vscodeInteractive="vscode-interactive",t.vscodeInteractiveInput="vscode-interactive-input",t.vscodeSettings="vscode-settings",t.vscodeWorkspaceTrust="vscode-workspace-trust",t.vscodeTerminal="vscode-terminal",t.webviewPanel="webview-panel",t.vscodeWebview="vscode-webview",t.extension="extension",t.vscodeFileResource="vscode-file",t.tmp="tmp",t.vsls="vsls"})(_e||(_e={}));var fM=class{constructor(){this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null}setPreferredWebSchema(t){this._preferredWebSchema=t}rewrite(t){if(this._delegate)return this._delegate(t);const e=t.authority;let i=this._hosts[e];i&&i.indexOf(":")!==-1&&(i=`[${i}]`);const n=this._ports[e],s=this._connectionTokens[e];let r=`path=${encodeURIComponent(t.path)}`;return typeof s=="string"&&(r+=`&tkn=${encodeURIComponent(s)}`),Le.from({scheme:Pa?this._preferredWebSchema:_e.vscodeRemoteResource,authority:`${i}:${n}`,path:"/vscode-remote-resource",query:r})}},WL=new fM,HL=class vp{asBrowserUri(e,i){const n=this.toUri(e,i);return n.scheme===_e.vscodeRemote?WL.rewrite(n):n.scheme===_e.file&&(ia||VD&&Ve.origin===`${_e.vscodeFileResource}://${vp.FALLBACK_AUTHORITY}`)?n.with({scheme:_e.vscodeFileResource,authority:n.authority||vp.FALLBACK_AUTHORITY,query:null,fragment:null}):n}toUri(e,i){return Le.isUri(e)?e:Le.parse(i.toUrl(e))}};HL.FALLBACK_AUTHORITY="vscode-app";var gM=new HL;function Ei(t){for(;t.firstChild;)t.firstChild.remove()}function Ev(t){var e;return(e=t?.isConnected)!==null&&e!==void 0?e:!1}var zL=class{constructor(t,e,i,n){this._node=t,this._type=e,this._handler=i,this._options=n||!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 B(t,e,i,n){return new zL(t,e,i,n)}function mM(t){return function(e){return t(new ji(e))}}function pM(t){return function(e){return t(new Pe(e))}}var gi=function(e,i,n,s){let r=n;return i==="click"||i==="mousedown"?r=mM(n):(i==="keydown"||i==="keypress"||i==="keyup")&&(r=pM(n)),B(e,i,r,s)};function Dv(t,e){return B(t,"mouseout",i=>{let n=i.relatedTarget;for(;n&&n!==t;)n=n.parentNode;n!==t&&e(i)})}function _M(t,e){return B(t,"pointerout",i=>{let n=i.relatedTarget;for(;n&&n!==t;)n=n.parentNode;n!==t&&e(i)})}function tn(t,e,i){let n=null;const s=l=>a.fire(l),r=()=>{n||(n=new zL(t,e,s,i))},o=()=>{n&&(n.dispose(),n=null)},a=new M({onFirstListenerAdd:r,onLastListenerRemove:o});return a}var Wf=null;function vM(t){if(!Wf){const e=i=>setTimeout(()=>i(new Date().getTime()),0);Wf=self.requestAnimationFrame||self.msRequestAnimationFrame||self.webkitRequestAnimationFrame||self.mozRequestAnimationFrame||self.oRequestAnimationFrame||e}return Wf.call(self,t)}var UL,Cn,Hf=class{constructor(t,e=0){this._runner=t,this.priority=e,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(t){We(t)}}static sort(t,e){return e.priority-t.priority}};(function(){let t=[],e=null,i=!1,n=!1,s=()=>{for(i=!1,e=t,t=[],n=!0;e.length>0;)e.sort(Hf.sort),e.shift().execute();n=!1};Cn=(r,o=0)=>{let a=new Hf(r,o);return t.push(a),i||(i=!0,vM(s)),a},UL=(r,o)=>{if(n){let a=new Hf(r,o);return e.push(a),a}else return Cn(r,o)}})();
12var CM=8,bM=function(t,e){return e},wM=class extends V{constructor(t,e,i,n=bM,s=CM){super();let r=null,o=0,a=this._register(new jn),l=()=>{o=new Date().getTime(),i(r),r=null};this._register(B(t,e,h=>{r=n(r,h);let c=new Date().getTime()-o;c>=s?(a.cancel(),l()):a.setIfNotSet(l,s-c)}))}};function Nv(t,e,i,n,s){return new wM(t,e,i,n,s)}function Tv(t){return document.defaultView.getComputedStyle(t,null)}function $L(t){if(t!==document.body)return new us(t.clientWidth,t.clientHeight);if(Xr&&window.visualViewport)return new us(window.visualViewport.width,window.visualViewport.height);if(window.innerWidth&&window.innerHeight)return new us(window.innerWidth,window.innerHeight);if(document.body&&document.body.clientWidth&&document.body.clientHeight)return new us(document.body.clientWidth,document.body.clientHeight);if(document.documentElement&&document.documentElement.clientWidth&&document.documentElement.clientHeight)return new us(document.documentElement.clientWidth,document.documentElement.clientHeight);throw new Error("Unable to figure out browser width and height")}var hi=class oi{static convertToPixels(e,i){return parseFloat(i)||0}static getDimension(e,i,n){let s=Tv(e),r="0";return s&&(s.getPropertyValue?r=s.getPropertyValue(i):r=s.getAttribute(n)),oi.convertToPixels(e,r)}static getBorderLeftWidth(e){return oi.getDimension(e,"border-left-width","borderLeftWidth")}static getBorderRightWidth(e){return oi.getDimension(e,"border-right-width","borderRightWidth")}static getBorderTopWidth(e){return oi.getDimension(e,"border-top-width","borderTopWidth")}static getBorderBottomWidth(e){return oi.getDimension(e,"border-bottom-width","borderBottomWidth")}static getPaddingLeft(e){return oi.getDimension(e,"padding-left","paddingLeft")}static getPaddingRight(e){return oi.getDimension(e,"padding-right","paddingRight")}static getPaddingTop(e){return oi.getDimension(e,"padding-top","paddingTop")}static getPaddingBottom(e){return oi.getDimension(e,"padding-bottom","paddingBottom")}static getMarginLeft(e){return oi.getDimension(e,"margin-left","marginLeft")}static getMarginTop(e){return oi.getDimension(e,"margin-top","marginTop")}static getMarginRight(e){return oi.getDimension(e,"margin-right","marginRight")}static getMarginBottom(e){return oi.getDimension(e,"margin-bottom","marginBottom")}},us=class ed{constructor(e,i){this.width=e,this.height=i}with(e=this.width,i=this.height){return e!==this.width||i!==this.height?new ed(e,i):this}static is(e){return typeof e=="object"&&typeof e.height=="number"&&typeof e.width=="number"}static lift(e){return e instanceof ed?e:new ed(e.width,e.height)}static equals(e,i){return e===i?!0:!e||!i?!1:e.width===i.width&&e.height===i.height}};us.None=new us(0,0);function KL(t){let e=t.offsetParent,i=t.offsetTop,n=t.offsetLeft;for(;(t=t.parentNode)!==null&&t!==document.body&&t!==document.documentElement;){i-=t.scrollTop;const s=qL(t)?null:Tv(t);s&&(n-=s.direction!=="rtl"?t.scrollLeft:-t.scrollLeft),t===e&&(n+=hi.getBorderLeftWidth(t),i+=hi.getBorderTopWidth(t),i+=t.offsetTop,n+=t.offsetLeft,e=t.offsetParent)}return{left:n,top:i}}function qi(t){let e=t.getBoundingClientRect();return{left:e.left+ps.scrollX,top:e.top+ps.scrollY,width:e.width,height:e.height}}var ps=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 Vi(t){let e=hi.getMarginLeft(t)+hi.getMarginRight(t);return t.offsetWidth+e}function zf(t){let e=hi.getBorderLeftWidth(t)+hi.getBorderRightWidth(t),i=hi.getPaddingLeft(t)+hi.getPaddingRight(t);return t.offsetWidth-e-i}function SM(t){let e=hi.getBorderTopWidth(t)+hi.getBorderBottomWidth(t),i=hi.getPaddingTop(t)+hi.getPaddingBottom(t);return t.offsetHeight-e-i}function Cp(t){let e=hi.getMarginTop(t)+hi.getMarginBottom(t);return t.offsetHeight+e}function _s(t,e){for(;t;){if(t===e)return!0;t=t.parentNode}return!1}function jL(t,e,i){for(;t&&t.nodeType===t.ELEMENT_NODE;){if(t.classList.contains(e))return t;if(i){if(typeof i=="string"){if(t.classList.contains(i))return null}else if(t===i)return null}t=t.parentNode}return null}function FC(t,e,i){return!!jL(t,e,i)}function qL(t){return t&&!!t.host&&!!t.mode}function Xd(t){return!!io(t)}function io(t){for(;t.parentNode;){if(t===document.body)return null;t=t.parentNode}return qL(t)?t:null}function sa(){let t=document.activeElement;for(;t?.shadowRoot;)t=t.shadowRoot.activeElement;return t}function Yi(t=document.getElementsByTagName("head")[0]){let e=document.createElement("style");return e.type="text/css",e.media="screen",t.appendChild(e),e}var Uf=null;function yM(){return Uf||(Uf=Yi()),Uf}
12function BC(t,e,i=yM()){!i||!e||i.sheet.insertRule(t+"{"+e+"}",0)}function GL(t){return typeof HTMLElement=="object"?t instanceof HTMLElement:t&&typeof t=="object"&&t.nodeType===1&&typeof t.nodeName=="string"}var Z={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",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:js?"webkitAnimationStart":"animationstart",ANIMATION_END:js?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:js?"webkitAnimationIteration":"animationiteration"},ye={stop:function(t,e){t.preventDefault?t.preventDefault():t.returnValue=!1,e&&(t.stopPropagation?t.stopPropagation():t.cancelBubble=!0)}};function LM(t){let e=[];for(let i=0;t&&t.nodeType===t.ELEMENT_NODE;i++)e[i]=t.scrollTop,t=t.parentNode;return e}function kM(t,e){for(let i=0;t&&t.nodeType===t.ELEMENT_NODE;
12i++)t.scrollTop!==e[i]&&(t.scrollTop=e[i]),t=t.parentNode}var xM=class bp extends V{constructor(e){super(),this._onDidFocus=this._register(new M),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new M),this.onDidBlur=this._onDidBlur.event;let i=bp.hasFocusWithin(e),n=!1;const s=()=>{n=!1,i||(i=!0,this._onDidFocus.fire())},r=()=>{i&&(n=!0,window.setTimeout(()=>{n&&(n=!1,i=!1,this._onDidBlur.fire())},0))};this._refreshStateHandler=()=>{bp.hasFocusWithin(e)!==i&&(i?r():s())},this._register(B(e,Z.FOCUS,s,!0)),this._register(B(e,Z.BLUR,r,!0)),this._register(B(e,Z.FOCUS_IN,()=>this._refreshStateHandler())),this._register(B(e,Z.FOCUS_OUT,()=>this._refreshStateHandler()))}static hasFocusWithin(e){const i=io(e);return _s(i?i.activeElement:document.activeElement,e)}};function xa(t){return new xM(t)}function z(t,...e){if(t.append(...e),e.length===1&&typeof e[0]!="string")return e[0]}function Gu(t,...e){t.innerText="",z(t,...e)}var IM=/([\w\-]+)?(#([\w\-]+))?((\.([\w\-]+))*)/,hh;(function(t){t.HTML="http://www.w3.org/1999/xhtml",t.SVG="http://www.w3.org/2000/svg"})(hh||(hh={}));function ZL(t,e,i,...n){let s=IM.exec(e);if(!s)throw new Error("Bad use of emmet");i=Object.assign({},i||{});let r=s[1]||"div",o;return t!==hh.HTML?o=document.createElementNS(t,r):o=document.createElement(r),s[3]&&(o.id=s[3]),s[4]&&(o.className=s[4].replace(/\./g," ").trim()),Object.keys(i).forEac
12h(a=>{const l=i[a];typeof l>"u"||(/^on\w+$/.test(a)?o[a]=l:a==="selected"?l&&o.setAttribute(a,"true"):o.setAttribute(a,l))}),o.append(...n),o}function Q(t,e,...i){return ZL(hh.HTML,t,e,...i)}Q.SVG=function(t,e,...i){return ZL(hh.SVG,t,e,...i)};function YL(...t){for(let e of t)e.style.display="",e.removeAttribute("aria-hidden")}function VC(...t){for(let e of t)e.style.display="none",e.setAttribute("aria-hidden","true")}function EM(t){return Array.prototype.slice.call(document.getElementsByTagName(t),0)}function WC(t){const e=window.devicePixelRatio*t;return Math.max(1,Math.floor(e))/window.devicePixelRatio}function XL(t){window.open(t,"_blank","noopener")}function DM(t){const e=()=>{t(),i=Cn(e)};let i=Cn(e);return Ae(()=>i.dispose())}WL.setPreferredWebSchema(/^https:/.test(window.location.href)?"https":"http");function wp(t){return t?`url('${gM.asBrowserUri(t).toString(!0).replace(/'/g,"%27")}')`:"url('')"}function HC(t){return`'${t.replace(/'/g,"%27")}'`}var NM=class yl extends M{constructor(){super(),this._subscriptions=new ne,this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1},this._subscriptions.add(B(window,"keydown",e=>{if(e.defaultPrevented)return;const i=new Pe(e);if(!(i.keyCode===6&&e.repeat)){if(e.altKey&&!this._keyStatus.altKey)this._keyStatus.lastKeyPressed="alt";else if(e.ctrlKey&&!this._keyStatus.ctrlKey)this._keyStatus.lastKeyPressed="ctrl";else if(e.metaKey&&!this._keyStatus.metaKey)this._keyStatus.lastKeyPressed="meta";else if(e.shiftKey&&!this._keyStatus.shiftKey)this._keyStatus.lastKeyPressed="shift";else if(i.keyCode!==6)this._keyStatus.lastKeyPressed=void 0;else return;this._keyStatus.altKey=e.altKey,this._keyStatus.ctrlKey=e.ctrlKey,this._keyStatus.metaKey=e.metaKey,this._keyStatus.shiftKey=e.shiftKey,this._keyStatus.lastKeyPressed&&(this._keyStatus.event=e,this.fire(this._keyStatus))}},!0)),this._subscriptions.add(B(window,"keyup",e=>{e.defaultPrevented||(!e.altKey&&this._keyStatus.altKey?this._keyStatus.lastKeyReleased="alt":!e.ctrlKey&&this._keyStatus.ctrlKey?this._keyStatus.lastKeyReleased="ctrl":!e.metaKey&&this._keyStatus.metaKey?this._keyStatus.lastKeyReleased="meta":!e.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=e.altKey,this._keyStatus.ctrlKey=e.ctrlKey,this._keyStatus.metaKey=e.metaKey,this._keyStatus.shiftKey=e.shiftKey,this._keyStatus.lastKeyReleased&&(this._keyStatus.event=e,this.fire(this._keyStatus)))},!0)),this._subscriptions.add(B(document.body,"mousedown",()=>{this._keyStatus.lastKeyPressed=void 0},!0)),this._subscriptions.add(B(document.body,"mouseup",()=>{this._keyStatus.lastKeyPressed=void 0},!0)),this._subscriptions.add(B(document.body,"mousemove",e=>{e.buttons&&(this._keyStatus.lastKeyPressed=void 0)},!0)),this._subscriptions.add(B(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 yl.instance||(yl.instance=new yl),yl.instance}dispose(){super.dispose(),this._subscriptions.dispose()}};function TM(t,e){window.matchMedia(t).addEventListener("change",e)}var zC=2e4,Rr,td,Sp,id,yp;function MM(t){Rr=document.createElement("div"),Rr.className="monaco-aria-container";const e=()=>{const n=document.createElement("div");return n.className="monaco-alert",n.setAttribute("role","alert"),n.setAttribute("aria-atomic","true"),Rr.appendChild(n),n};td=e(),Sp=e();const i=()=>{const n=document.createElement("div");return n.className="monaco-status",n.setAttribute("role","complementary"),n.setAttribute("aria-live","polite"),n.setAttribute("aria-atomic","true"),Rr.appendChild(n),n};id=i(),yp=i(),t.appendChild(Rr)}function Zu(t){Rr&&(td.textContent!==t?(Ei(Sp),Qd(td,t)):(Ei(td),Qd(Sp,t)))}function Lp(t){Rr&&(fe?Zu(t):id.textContent!==t?(Ei(yp),Qd(id,t)):(Ei(id),Qd(yp,t)))}function Qd(t,e){Ei(t),e.length>zC&&(e=e.substr(0,zC)),t.textContent=e,t.style.visibility="hidden",t.style.visibility="visible"}var QL=ge("markerDecorationsService"),Yu=ge("textModelService"),Jd=function(t,e,
12i,n){function s(r){return r instanceof i?r:new i(function(o){o(r)})}return new(i||(i=Promise))(function(r,o){function a(c){try{h(n.next(c))}catch(d){o(d)}}function l(c){try{h(n.throw(c))}catch(d){o(d)}}function h(c){c.done?r(c.value):s(c.value).then(a,l)}h((n=n.apply(t,e||[])).next())})},An=class extends V{constructor(t,e="",i="",n=!0,s){super(),this._onDidChange=this._register(new M),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=t,this._label=e,this._cssClass=i,this._enabled=n,this._actionCallback=s}get id(){return this._id}get label(){return this._label}set label(t){this._setLabel(t)}_setLabel(t){this._label!==t&&(this._label=t,this._onDidChange.fire({label:t}))}get tooltip(){return this._tooltip||""}set tooltip(t){this._setTooltip(t)}_setTooltip(t){this._tooltip!==t&&(this._tooltip=t,this._onDidChange.fire({tooltip:t}))}get class(){return this._cssClass}set class(t){this._setClass(t)}_setClass(t){this._cssClass!==t&&(this._cssClass=t,this._onDidChange.fire({class:t}))}get enabled(){return this._enabled}set enabled(t){this._setEnabled(t)}_setEnabled(t){this._enabled!==t&&(this._enabled=t,this._onDidChange.fire({enabled:t}))}get checked(){return this._checked}set checked(t){this._setChecked(t)}_setChecked(t){this._checked!==t&&(this._checked=t,this._onDidChange.fire({checked:t}))}run(t,e){return Jd(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(t))})}},Mv=class extends V{constructor(){super(...arguments),this._onBeforeRun=this._register(new M),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new M),this.onDidRun=this._onDidRun.event}run(t,e){return Jd(this,void 0,void 0,function*(){if(!t.enabled)return;this._onBeforeRun.fire({action:t});let i;try{yield this.runAction(t,e)}catch(n){i=n}this._onDidRun.fire({action:t,error:i})})}runAction(t,e){return Jd(this,void 0,void 0,function*(){yield t.run(e)})}},Ah=class JL extends An{constructor(e){super(JL.ID,e,e?"separator text":"separator"),this.checked=!1,this.enabled=!1}};Ah.ID="vs.actions.separator";var e2=class{constructor(t,e,i,n){this.tooltip="",this.enabled=!0,this.checked=void 0,this.id=t,this.label=e,this.class=n,this._actions=i}get actions(){return this._actions}dispose(){}run(){return Jd(this,void 0,void 0,function*(){})}},t2=class i2 extends An{constructor(){super(i2.ID,p("submenu.empty","(empty)"),void 0,!1)}};t2.ID="vs.actions.empty";var Ni=ge("commandService"),Tt=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new M,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(t,e){if(!t)throw new Error("invalid command");if(typeof t=="string"){if(!e)throw new Error("invalid command");return this.registerCommand({id:t,handler:e})}if(t.description){const o=[];for(let l of t.description.args)o.push(l.constraint);const a=t.handler;t.handler=function(l,...h){return sN(h,o),a(l,...h)}}const{id:i}=t;let n=this._commands.get(i);n||(n=new Ki,this._commands.set(i,n));let s=n.unshift(t),r=Ae(()=>{s();const o=this._commands.get(i);o?.isEmpty()&&this._commands.delete(i)});return this._onDidRegisterCommand.fire(i),r}registerCommandAlias(t,e){return Tt.registerCommand(t,(i,...n)=>i.get(Ni).executeCommand(e,...n))}getCommand(t){const e=this._commands.get(t);if(!(!e||e.isEmpty()))return he.first(e)}getCommands(){const t=new Map;for(const e of this._commands.keys()){const i=this.getCommand(e);i&&t.set(e,i)}return t}};Tt.registerCommand("noop",()=>{});var St=new Map;St.set("false",!1);St.set("true",!0);St.set("isMac",fe);St.set("isLinux",Bt);St.set("isWindows",ei);St.set("isWeb",Pa);St.set("isMacNative",fe&&!Pa);St.set("isEdge",zD);St.set("isFirefox",WD);St.set("isChrome",ay);St.set("isSafari",HD);var RM=Object.prototype.hasOwnProperty,Re=class{static has(t){return Ia.create(t)}static equals(t,e){return eu.create(t,e)}static regex(t,e){return UC.create(t,e)}static not(t){return ch.create(t)}static and(...t){return kp.create(t,null)}static or(...t){return tu.create(t,null,!0)}static deserialize(t,e=!1){if(t)return this._deserializeOrExpression(t,e)}static _deserializeOrExpression(t,e){let i=t.split("||");return tu.create(i.map(n=>this._deserializeAndExpression(n,e)),null,!0)}static _deserializeAndExpression(t,e){let i=t.split("&&");return kp.create(i.map(n=>this._deserializeOne(n,e)),null)}static _deserializeOne(t,e){if(t=t.trim(),t.indexOf("!=")>=0){let i=t.split("!=");return a2.create(i[0].trim(),this._deserializeValue(i[1],e))}if(t.indexOf("==")>=0){let i=t.split("==");return eu.create(i[0].trim(),this._deserializeValue(i[1],e))}if(t.indexOf("=~")>=0){let i=t.split("=~");return UC.create(i[0].trim(),this._deserializeRegexValue(i[1],e))}if(t.indexOf(" in ")>=0){let i=t.split(" in ");return OM.create(i[0].trim(),i[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(t)){const i=t.split(">=");return u2.create(i[0].trim(),i[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(t)){const i=t.split(">");return c2.create(i[0].trim(),i[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(t)){const i=t.split("<=");return p2.create(i[0].trim(),i[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(t)){const i=t.split("<");return g2.create(i[0].trim(),i[1].trim())}return/^\!\s*/.test(t)?ch.create(t.substr(1).trim()):Ia.create(t)}static _deserializeValue(t,e){if(t=t.trim(),t==="true")return!0;
12if(t==="false")return!1;let i=/^'([^']*)'$/.exec(t);return i?i[1].trim():t}static _deserializeRegexValue(t,e){if(M4(t)){if(e)throw new Error("missing regexp-value for =~-expression");return null}let i=t.indexOf("/"),n=t.lastIndexOf("/");if(i===n||i<0){if(e)throw new Error(`bad regexp-value '${t}', missing /-enclosure`);return null}let s=t.slice(i+1,n),r=t[n+1]==="i"?"i":"";try{return new RegExp(s,r)}catch(o){if(e)throw new Error(`bad regexp-value '${t}', parse error: ${o}`);return null}}};function AM(t,e){const i=t?t.substituteConstants():void 0,n=e?e.substituteConstants():void 0;return!i&&!n?!0:!i||!n?!1:i.equals(n)}function ra(t,e){return t.cmp(e)}var pi=class{constructor(){this.type=0}cmp(t){return this.type-t.type}equals(t){return t.type===this.type}substituteConstants(){return this}evaluate(t){return!1}serialize(){return"false"}keys(){return[]}negate(){return Di.INSTANCE}};pi.INSTANCE=new pi;var Di=class{constructor(){this.type=1}cmp(t){return this.type-t.type}equals(t){return t.type===this.type}substituteConstants(){return this}evaluate(t){return!0}serialize(){return"true"}keys(){return[]}negate(){return pi.INSTANCE}};Di.INSTANCE=new Di;var Ia=class n2{constructor(e,i){this.key=e,this.negated=i,this.type=2}static create(e,i=null){const n=St.get(e);return typeof n=="boolean"?n?Di.INSTANCE:pi.INSTANCE:new n2(e,i)}cmp(e){return e.type!==this.type?this.type-e.type:w2(this.key,e.key)}equals(e){return e.type===this.type?this.key===e.key:!1}substituteConstants(){const e=St.get(this.key);return typeof e=="boolean"?e?Di.INSTANCE:pi.INSTANCE:this}evaluate(e){return!!e.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=ch.create(this.key,this)),this.negated}},eu=class s2{constructor(e,i,n){this.key=e,this.value=i,this.negated=n,this.type=4}static create(e,i,n=null){if(typeof i=="boolean")return i?Ia.create(e,n):ch.create(e,n);const s=St.get(e);return typeof s=="boolean"?i===(s?"true":"false")?Di.INSTANCE:pi.INSTANCE:new s2(e,i,n)}cmp(e){return e.type!==this.type?this.type-e.type:fo(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){const e=St.get(this.key);if(typeof e=="boolean"){const i=e?"true":"false";return this.value===i?Di.INSTANCE:pi.INSTANCE}return this}evaluate(e){return e.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=a2.create(this.key,this.value,this)),this.negated}},OM=class r2{constructor(e,i){this.key=e,this.valueKey=i,this.type=10,this.negated=null}static create(e,i){return new r2(e,i)}cmp(e){return e.type!==this.type?this.type-e.type:fo(this.key,this.valueKey,e.key,e.valueKey)}equals(e){return e.type===this.type?this.key===e.key&&this.valueKey===e.valueKey:!1}substituteConstants(){return this}evaluate(e){const i=e.getValue(this.valueKey),n=e.getValue(this.key);return Array.isArray(i)?i.indexOf(n)>=0:typeof n=="string"&&typeof i=="object"&&i!==null?RM.call(i,n):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=PM.create(this)),this.negated}},PM=class o2{constructor(e){this._actual=e,this.type=11}static create(e){return new o2(e)}cmp(e){return e.type!==this.type?this.type-e.type:this._actual.cmp(e._actual)}equals(e){return e.type===this.type?this._actual.equals(e._actual):!1}substituteConstants(){return this}evaluate(e){return!this._actual.evaluate(e)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}},a2=class l2{constructor(e,i,n){this.key=e,this.value=i,this.negated=n,this.type=5}static create(e,i,n=null){if(typeof i=="boolean")return i?ch.create(e,n):Ia.create(e,n);const s=St.get(e);return typeof s=="boolean"?i===(s?"true":"false")?pi.INSTANCE:Di.INSTANCE:new l2(e,i,n)}cmp(e){return e.type!==this.type?this.type-e.type:fo(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}
12substituteConstants(){const e=St.get(this.key);if(typeof e=="boolean"){const i=e?"true":"false";return this.value===i?pi.INSTANCE:Di.INSTANCE}return this}evaluate(e){return e.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=eu.create(this.key,this.value,this)),this.negated}},ch=class h2{constructor(e,i){this.key=e,this.negated=i,this.type=3}static create(e,i=null){const n=St.get(e);return typeof n=="boolean"?n?pi.INSTANCE:Di.INSTANCE:new h2(e,i)}cmp(e){return e.type!==this.type?this.type-e.type:w2(this.key,e.key)}equals(e){return e.type===this.type?this.key===e.key:!1}substituteConstants(){const e=St.get(this.key);return typeof e=="boolean"?e?pi.INSTANCE:Di.INSTANCE:this}evaluate(e){return!e.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=Ia.create(this.key,this)),this.negated}};function Xu(t,e){if(typeof t=="string"){const i=parseFloat(t);isNaN(i)||(t=i)}return typeof t=="string"||typeof t=="number"?e(t):pi.INSTANCE}var c2=class d2{constructor(e,i,n){this.key=e,this.value=i,this.negated=n,this.type=12}static create(e,i,n=null){return Xu(i,s=>new d2(e,s,n))}cmp(e){return e.type!==this.type?this.type-e.type:fo(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){return this}evaluate(e){return typeof this.value=="string"?!1:parseFloat(e.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=p2.create(this.key,this.value,this)),this.negated}},u2=class f2{constructor(e,i,n){this.key=e,this.value=i,this.negated=n,this.type=13}static create(e,i,n=null){return Xu(i,s=>new f2(e,s,n))}cmp(e){return e.type!==this.type?this.type-e.type:fo(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){return this}evaluate(e){return typeof this.value=="string"?!1:parseFloat(e.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=g2.create(this.key,this.value,this)),this.negated}},g2=class m2{constructor(e,i,n){this.key=e,this.value=i,this.negated=n,this.type=14}static create(e,i,n=null){return Xu(i,s=>new m2(e,s,n))}cmp(e){return e.type!==this.type?this.type-e.type:fo(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){return this}evaluate(e){return typeof this.value=="string"?!1:parseFloat(e.getValue(this.key))<this.value}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=u2.create(this.key,this.value,this)),this.negated}},p2=class _2{constructor(e,i,n){this.key=e,this.value=i,this.negated=n,this.type=15}static create(e,i,n=null){return Xu(i,s=>new _2(e,s,n))}cmp(e){return e.type!==this.type?this.type-e.type:fo(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){return this}evaluate(e){return typeof this.value=="string"?!1:parseFloat(e.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=c2.create(this.key,this.value,this)),this.negated}},UC=class v2{constructor(e,i){this.key=e,this.regexp=i,this.type=7,this.negated=null}static create(e,i){return new v2(e,i)}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.key<e.key)return-1;if(this.key>e.key)return 1;const i=this.regexp?this.regexp.source:"",n=e.regexp?e.regexp.source:"";return i<n?-1:i>n?1:0}equals(e){if(e.type===this.type){const i=this.regexp?this.regexp.source:"",n=e.regexp?e.regexp.source:"";return this.key===e.key&&i===n}return!1}substituteConstants(){return this}evaluate(e){let i=e.getValue(this.key);return this.regexp?this.regexp.test(i):!1}serialize(){const e=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${e}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=FM.create(this)),this.negated}},FM=class C2{constructor(e){this._actual=e,this.type=8}static create(e){return new C2(e)}cmp(e){return e.type!==this.type?this.type-e.type:this._actual.cmp(e._actual)}equals(e){return e.type===this.type?this._actual.equals(e._actual):!1}
12substituteConstants(){return this}evaluate(e){return!this._actual.evaluate(e)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}};function b2(t){let e=null;for(let i=0,n=t.length;i<n;i++){const s=t[i].substituteConstants();if(t[i]!==s&&e===null){e=[];for(let r=0;r<i;r++)e[r]=t[r]}e!==null&&(e[i]=s)}return e===null?t:e}var kp=class Ll{constructor(e,i){this.expr=e,this.negated=i,this.type=6}static create(e,i){return Ll._normalizeArr(e,i)}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.expr.length<e.expr.length)return-1;if(this.expr.length>e.expr.length)return 1;for(let i=0,n=this.expr.length;i<n;i++){const s=ra(this.expr[i],e.expr[i]);if(s!==0)return s}return 0}equals(e){if(e.type===this.type){if(this.expr.length!==e.expr.length)return!1;for(let i=0,n=this.expr.length;i<n;i++)if(!this.expr[i].equals(e.expr[i]))return!1;return!0}return!1}substituteConstants(){const e=b2(this.expr);return e===this.expr?this:Ll.create(e,this.negated)}evaluate(e){for(let i=0,n=this.expr.length;i<n;i++)if(!this.expr[i].evaluate(e))return!1;return!0}static _normalizeArr(e,i){const n=[];let s=!1;for(const r of e)if(r){if(r.type===1){s=!0;continue}if(r.type===0)return pi.INSTANCE;if(r.type===6){n.push(...r.expr);continue}n.push(r)}if(n.length===0&&s)return Di.INSTANCE;if(n.length!==0){if(n.length===1)return n[0];n.sort(ra);for(let r=1;r<n.length;r++)n[r-1].equals(n[r])&&(n.splice(r,1),r--);if(n.length===1)return n[0];for(;n.length>1;){const r=n[n.length-1];if(r.type!==9)break;n.pop();const o=n.pop(),a=n.length===0,l=tu.create(r.expr.map(h=>Ll.create([h,o],null)),null,a);l&&(n.push(l),n.sort(ra))}return n.length===1?n[0]:new Ll(n,i)}}serialize(){return this.expr.map(e=>e.serialize()).join(" && ")}keys(){const e=[];for(let i of this.expr)e.push(...i.keys());return e}negate(){if(!this.negated){const e=[];for(let i of this.expr)e.push(i.negate());this.negated=tu.create(e,this,!0)}return this.negated}},tu=class kl{constructor(e,i){this.expr=e,this.negated=i,this.type=9}static create(e,i,n){return kl._normalizeArr(e,i,n)}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.expr.length<e.expr.length)return-1;if(this.expr.length>e.expr.length)return 1;for(let i=0,n=this.expr.length;i<n;i++){const s=ra(this.expr[i],e.expr[i]);if(s!==0)return s}return 0}equals(e){if(e.type===this.type){if(this.expr.length!==e.expr.length)return!1;for(let i=0,n=this.expr.length;i<n;i++)if(!this.expr[i].equals(e.expr[i]))return!1;return!0}return!1}substituteConstants(){const e=b2(this.expr);return e===this.expr?this:kl.create(e,this.negated,!1)}evaluate(e){for(let i=0,n=this.expr.length;i<n;i++)if(this.expr[i].evaluate(e))return!0;return!1}static _normalizeArr(e,i,n){let s=[],r=!1;if(e){for(let o=0,a=e.length;o<a;o++){const l=e[o];if(l){if(l.type===0){r=!0;continue}if(l.type===1)return Di.INSTANCE;if(l.type===9){s=s.concat(l.expr);continue}s.push(l)}}if(s.length===0&&r)return pi.INSTANCE;s.sort(ra)}if(s.length!==0){if(s.length===1)return s[0];for(let o=1;o<s.length;o++)s[o-1].equals(s[o])&&(s.splice(o,1),o--);if(s.length===1)return s[0];if(n){for(let o=0;o<s.length;o++)for(let a=o+1;a<s.length;a++)S2(s[o],s[a])&&(s.splice(a,1),a--);if(s.length===1)return s[0]}return new kl(s,i)}}serialize(){return this.expr.map(e=>e.serialize()).join(" || ")}keys(){const e=[];for(let i of this.expr)e.push(...i.keys());return e}negate(){if(!this.negated){let e=[];for(let i of this.expr)e.push(i.negate());for(;e.length>1;){const i=e.shift(),n=e.shift(),s=[];for(const o of iu(i))for(const a of iu(n))s.push(kp.create([o,a],null));const r=e.length===0;e.unshift(kl.create(s,null,r))}this.negated=e[0]}return this.negated}},Y=class nd extends Ia{constructor(e,i,n){super(e,null),this._defaultValue=i,typeof n=="object"?nd._info.push(Object.assign(Object.assign({},n),{key:e})):n!==!0&&nd._info.push({key:e,description:n,type:i!=null?typeof i:void 0})}static all(){return nd._info.values()}bindTo(e){return e.createKey(this.key,this._defaultValue)}getValue(e){return e.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(e){return eu.create(this.key,e)}};Y._info=[];var Ie=ge("contextKeyService"),BM="setContext";function w2(t,e){return t<e?-1:t>e?1:0}function fo(t,e,i,n){return t<i?-1:t>i?1:e<n?-1:e>n?1:0}function S2(t,e){if(e.type===6&&t.type!==9&&t.type!==6){for(const n of e.expr)if(t.equals(n))return!0}const i=iu(t.negate()).concat(iu(e));i.sort(ra);for(let n=0;n<i.length;n++){const s=i[n].negate();for(let r=n+1;r<i.length;r++){const o=i[r];if(s.equals(o))return!0}}return!1}function iu(t){return t.type===9?t.expr:[t]}var VM=class{constructor(){this.data=new Map}add(t,e){Xc(_n(t)),Xc(Li(e)),Xc(!this.data.has(t),"There is already an extension with this id"),this.data.set(t,e)}as(t){return this.data.get(t)||null}},vt=new VM,On;(function(t){t.DARK="dark",t.LIGHT="light",t.HIGH_CONTRAST="hc"})(On||(On={}));var et=ge("themeService"),xp;(function(t){function e(i){return i&&typeof i=="object"&&typeof i.id=="string"}t.isThemeColor=e})(xp||(xp={}));function cn(t){return{id:t}}var ft;(function(t){function e(h){return h&&typeof h=="object"&&typeof h.id=="string"&&(typeof h.color>"u"||xp.isThemeColor(h.color))}t.isThemeIcon=e;const i=new RegExp(`^\\$\\((${qt.iconNameExpression}(?:${qt.iconModifierExpression})?)\\)$`);function n(h){const c=i.exec(h);if(!c)return;let[,d]=c;return{id:d}}t.fromString=n;function s(h){return{id:h}}t.fromId=s;function r(h,c){let d=h.id;const u=d.lastIndexOf("~");return u!==-1&&(d=d.substring(0,u)),c&&(d=`${d}~${c}`),{id:d}}t.modify=r;function o(h){const c=h.id.lastIndexOf("~");if(c!==-1)return h.id.substring(c+1)}t.getModifier=o;function a(h,c){var d,u;return h.id===c.id&&((d=h.color)===null||d===void 0?void 0:d.id)===((u=c.color)===null||u===void 0?void 0:u.id)}t.isEqual=a;function l(h,c){return{id:h.id,color:c?cn(c):void 0}}t.asThemeIcon=l,t.asClassNameArray=qt.asClassNameArray,t.asClassName=qt.asClassName,t.asCSSSelector=qt.asCSSSelector})(ft||(ft={}));function nu(t){switch(t){case On.DARK:return"vs-dark";case On.HIGH_CONTRAST:return"hc-black";default:return"vs"}}var y2={ThemingContribution:"base.contributions.theming"},WM=class{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new M}onColorThemeChange(t){return this.themingParticipants.push(t),this.onThemingParticipantAddedEmitter.f
12ire(t),Ae(()=>{const e=this.themingParticipants.indexOf(t);this.themingParticipants.splice(e,1)})}getThemingParticipants(){return this.themingParticipants}},L2=new WM;vt.add(y2.ThemingContribution,L2);function Yt(t){return L2.onColorThemeChange(t)}var HM=class extends V{constructor(t){super(),this.themeService=t,this.theme=t.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(e=>this.onThemeChange(e)))}onThemeChange(t){this.theme=t,this.updateStyles()}updateStyles(){}},zM=function(t,e,i,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r},$C=function(t,e){return function(i,n){e(i,n,t)}};function xl(t){return t.command!==void 0}var N=class k2{constructor(e){this.id=k2._idPool++,this._debugName=e}};N._idPool=0;N.CommandPalette=new N("CommandPalette");N.DebugBreakpointsContext=new N("DebugBreakpointsContext");N.DebugCallStackContext=new N("DebugCallStackContext");N.DebugConsoleContext=new N("DebugConsoleContext");N.DebugVariablesContext=new N("DebugVariablesContext");N.DebugWatchContext=new N("DebugWatchContext");N.DebugToolBar=new N("DebugToolBar");N.EditorContext=new N("EditorContext");N.SimpleEditorContext=new N("SimpleEditorContext");N.EditorContextCopy=new N("EditorContextCopy");N.EditorContextPeek=new N("EditorContextPeek");N.EditorTitle=new N("EditorTitle");N.EditorTitleRun=new N("EditorTitleRun");N.EditorTitleContext=new N("EditorTitleContext");N.EmptyEditorGroup=new N("EmptyEditorGroup");N.EmptyEditorGroupContext=new N("EmptyEditorGroupContext");N.ExplorerContext=new N("ExplorerContext");N.ExtensionContext=new N("ExtensionContext");N.GlobalActivity=new N("GlobalActivity");N.LayoutControlMenuSubmenu=new N("LayoutControlMenuSubmenu");N.LayoutControlMenu=new N("LayoutControlMenu");N.MenubarMainMenu=new N("MenubarMainMenu");N.MenubarAppearanceMenu=new N("MenubarAppearanceMenu");N.MenubarDebugMenu=new N("MenubarDebugMenu");N.MenubarEditMenu=new N("MenubarEditMenu");N.MenubarCopy=new N("MenubarCopy");N.MenubarFileMenu=new N("MenubarFileMenu");N.MenubarGoMenu=new N("MenubarGoMenu");N.MenubarHelpMenu=new N("MenubarHelpMenu");N.MenubarLayoutMenu=new N("MenubarLayoutMenu");N.MenubarNewBreakpointMenu=new N("MenubarNewBreakpointMenu");N.MenubarPanelAlignmentMenu=new N("MenubarPanelAlignmentMenu");N.MenubarPanelPositionMenu=new N("MenubarPanelPositionMenu");N.MenubarPreferencesMenu=new N("MenubarPreferencesMenu");N.MenubarRecentMenu=new N("MenubarRecentMenu");N.MenubarSelectionMenu=new N("MenubarSelectionMenu");N.MenubarSwitchEditorMenu=new N("MenubarSwitchEditorMenu");N.MenubarSwitchGroupMenu=new N("MenubarSwitchGroupMenu");N.MenubarTerminalMenu=new N("MenubarTerminalMenu");N.MenubarViewMenu=new N("MenubarViewMenu");N.MenubarHomeMenu=new N("MenubarHomeMenu");N.OpenEditorsContext=new N("OpenEditorsContext");N.ProblemsPanelContext=new N("ProblemsPanelContext");N.SCMChangeContext=new N("SCMChangeContext");N.SCMResourceContext=new N("SCMResourceContext");N.SCMResourceFolderContext=new N("SCMResourceFolderContext");N.SCMResourceGroupContext=new N("SCMResourceGroupContext");N.SCMSourceControl=new N("SCMSourceControl");N.SCMTitle=new N("SCMTitle");N.SearchContext=new N("SearchContext");N.StatusBarWindowIndicatorMenu=new N("StatusBarWindowIndicatorMenu");N.StatusBarRemoteIndicatorMenu=new N("StatusBarRemoteIndicatorMenu");N.TestItem=new N("TestItem");N.TestItemGutter=new N("TestItemGutter");N.TestPeekElement=new N("TestPeekElement");N.TestPeekTitle=new N("TestPeekTitle");N.TouchBarContext=new N("TouchBarContext");N.TitleBarContext=new N("TitleBarContext");N.TunnelContext=new N("TunnelContext");N.TunnelPrivacy=new N("TunnelPrivacy");N.TunnelProtocol=new N("TunnelProtocol");N.TunnelPortInline=new N("TunnelInline");N.TunnelTitle=new N("TunnelTitle");N.TunnelLocalAddressInline=new N("TunnelLocalAddressInline");N.TunnelOriginInline=new N("TunnelOriginInline");N.ViewItemContext=new N("ViewItemContext");N.ViewContainerTitle=new N("ViewContainerTitle");N.ViewContainerTitleContext=new N("ViewContainerTitleContext");N.ViewTitle=new N("ViewTitle");N.ViewTitleContext=new N("ViewTitleContext");N.CommentThreadTitle=new N("CommentThreadTitle");N.CommentThreadActions=new N("CommentThreadActions");N.CommentTitle=new N("CommentTitle");N.CommentActions=new N("CommentActions");
12N.InteractiveToolbar=new N("InteractiveToolbar");N.InteractiveCellTitle=new N("InteractiveCellTitle");N.InteractiveCellExecute=new N("InteractiveCellExecute");N.InteractiveInputExecute=new N("InteractiveInputExecute");N.NotebookToolbar=new N("NotebookToolbar");N.NotebookCellTitle=new N("NotebookCellTitle");N.NotebookCellInsert=new N("NotebookCellInsert");N.NotebookCellBetween=new N("NotebookCellBetween");N.NotebookCellListTop=new N("NotebookCellTop");N.NotebookCellExecute=new N("NotebookCellExecute");N.NotebookCellExecutePrimary=new N("NotebookCellExecutePrimary");N.NotebookDiffCellInputTitle=new N("NotebookDiffCellInputTitle");N.NotebookDiffCellMetadataTitle=new N("NotebookDiffCellMetadataTitle");N.NotebookDiffCellOutputsTitle=new N("NotebookDiffCellOutputsTitle");N.NotebookOutputToolbar=new N("NotebookOutputToolbar");N.NotebookEditorLayoutConfigure=new N("NotebookEditorLayoutConfigure");N.BulkEditTitle=new N("BulkEditTitle");N.BulkEditContext=new N("BulkEditContext");N.TimelineItemContext=new N("TimelineItemContext");N.TimelineTitle=new N("TimelineTitle");N.TimelineTitleContext=new N("TimelineTitleContext");N.AccountsContext=new N("AccountsContext");N.PanelTitle=new N("PanelTitle");N.AuxiliaryBarTitle=new N("AuxiliaryBarTitle");N.TerminalInstanceContext=new N("TerminalInstanceContext");N.TerminalEditorInstanceContext=new N("TerminalEditorInstanceContext");N.TerminalNewDropdownContext=new N("TerminalNewDropdownContext");N.TerminalTabContext=new N("TerminalTabContext");N.TerminalTabEmptyAreaContext=new N("TerminalTabEmptyAreaContext");N.TerminalInlineTabContext=new N("TerminalInlineTabContext");N.WebviewContext=new N("WebviewContext");N.InlineCompletionsActions=new N("InlineCompletionsActions");N.NewFile=new N("NewFile");var x2=ge("menuService"),Wl=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new M,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:t=>t===N.CommandPalette}}addCommand(t){return this.addCommands(he.single(t))}addCommands(t){for(const e of t)this._commands.set(e.id,e);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),Ae(()=>{let e=!1;for(const i of t)e=this._commands.delete(i.id)||e;e&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(t){return this._commands.get(t)}getCommands(){const t=new Map;return this._commands.forEach((e,i)=>t.set(i,e)),t}appendMenuItem(t,e){return this.appendMenuItems(he.single({id:t,item:e}))}appendMenuItems(t){const e=new Set,i=new Ki;for(const{id:n,item:s}of t){let r=this._menuItems.get(n);r||(r=new Ki,this._menuItems.set(n,r)),i.push(r.push(s)),e.add(n)}return this._onDidChangeMenu.fire(e),Ae(()=>{if(i.size>0){for(let n of i)n();this._onDidChangeMenu.fire(e),i.clear()}})}getMenuItems(t){let e;return this._menuItems.has(t)?e=[...this._menuItems.get(t)]:e=[],t===N.CommandPalette&&this._appendImplicitItems(e),e}_appendImplicitItems(t){const e=new Set;for(const i of t)xl(i)&&(e.add(i.command.id),i.alt&&e.add(i.alt.id));this._commands.forEach((i,n)=>{e.has(n)||t.push({command:i})})}},UM=class extends e2{constructor(t,e,i,n){super(`submenuitem.${t.submenu.id}`,typeof t.title=="string"?t.title:t.title.value,[],"submenu"),this.item=t,this._menuService=e,this._contextKeyService=i,this._options=n}get actions(){const t=[],e=this._menuService.createMenu(this.item.submenu,this._contextKeyService),i=e.getActions(this._options);e.dispose();for(const[,n]of i)n.length>0&&(t.push(...n),t.push(new Ah));return t.length&&t.pop(),t}},Ip=class I2{constructor(e,i,n,s,r){var o,a;if(this._commandService=r,this.id=e.id,this.label=n?.renderShortTitle&&e.shortTitle?typeof e.shortTitle=="string"?e.shortTitle:e.shortTitle.value:typeof e.title=="string"?e.title:e.title.value,this.tooltip=(a=typeof e.tooltip=="string"?e.tooltip:(o=e.tooltip)===null||o===void 0?void 0:o.value)!==null&&a!==void 0?a:"",this.enabled=!e.precondition||s.contextMatchesRules(e.precondition),this.checked=void 0,e.toggled){const l=e.toggled.condition?e.toggled:{condition:e.toggled};this.checked=s.contextMatchesRules(l.condition),this.checked&&l.tooltip&&(this.tooltip=typeof l.tooltip=="string"?l.tooltip:l.tooltip.value),l.title&&(this.label=typeof l.t
12itle=="string"?l.title:l.title.value)}this.item=e,this.alt=i?new I2(i,void 0,n,s,r):void 0,this._options=n,ft.isThemeIcon(e.icon)&&(this.class=qt.asClassName(e.icon))}dispose(){}run(...e){var i,n;let s=[];return!((i=this._options)===null||i===void 0)&&i.arg&&(s=[...s,this._options.arg]),!((n=this._options)===null||n===void 0)&&n.shouldForwardArgs&&(s=[...s,...e]),this._commandService.executeCommand(this.id,...s)}};Ip=zM([$C(3,Ie),$C(4,Ni)],Ip);var $M=class Ep{constructor(){this._coreKeybindings=[],this._extensionKeybindings=[],this._cachedMergedKeybindings=null}static bindToCurrentPlatform(e){if(Hi===1){if(e&&e.win)return e.win}else if(Hi===2){if(e&&e.mac)return e.mac}else if(e&&e.linux)return e.linux;return e}registerKeybindingRule(e){const i=Ep.bindToCurrentPlatform(e);if(i&&i.primary){const n=mp(i.primary,Hi);n&&this._registerDefaultKeybinding(n,e.id,e.args,e.weight,0,e.when)}if(i&&Array.isArray(i.secondary))for(let n=0,s=i.secondary.length;n<s;n++){const r=i.secondary[n],o=mp(r,Hi);o&&this._registerDefaultKeybinding(o,e.id,e.args,e.weight,-n-1,e.when)}}registerCommandAndKeybindingRule(e){this.registerKeybindingRule(e),Tt.registerCommand(e)}static _mightProduceChar(e){return e>=21&&e<=30||e>=31&&e<=56?!0:e===80||e===81||e===82||e===83||e===84||e===85||e===86||e===110||e===111||e===87||e===88||e===89||e===90||e===91||e===92}_assertNoCtrlAlt(e,i){e.ctrlKey&&e.altKey&&!e.metaKey&&Ep._mightProduceChar(e.keyCode)}_registerDefaultKeybinding(e,i,n,s,r,o){Hi===1&&this._assertNoCtrlAlt(e.parts[0],i),this._coreKeybindings.push({keybinding:e.parts,command:i,commandArgs:n,when:o,weight1:s,weight2:r,extensionId:null,isBuiltinExtension:!1}),this._cachedMergedKeybindings=null}getDefaultKeybindings(){return this._cachedMergedKeybindings||(this._cachedMergedKeybindings=[].concat(this._coreKeybindings).concat(this._extensionKeybindings),this._cachedMergedKeybindings.sort(jM)),this._cachedMergedKeybindings.slice(0)}},Ua=new $M,KM={EditorModes:"platform.keybindingsRegistry"};vt.add(KM.EditorModes,Ua);function jM(t,e){return t.weight1!==e.weight1?t.weight1-e.weight1:t.command<e.command?-1:t.command>e.command?1:t.weight2-e.weight2}var Oh=ge("telemetryService"),Qu=class{constructor(t){this.id=t.id,this.prec
12ondition=t.precondition,this._kbOpts=t.kbOpts,this._menuOpts=t.menuOpts,this._description=t.description}register(){if(Array.isArray(this._menuOpts)?this._menuOpts.forEach(this._registerMenuItem,this):this._menuOpts&&this._registerMenuItem(this._menuOpts),this._kbOpts){const t=Array.isArray(this._kbOpts)?this._kbOpts:[this._kbOpts];for(const e of t){let i=e.kbExpr;this.precondition&&(i?i=Re.and(i,this.precondition):i=this.precondition);const n={id:this.id,weight:e.weight,args:e.args,when:i,primary:e.primary,secondary:e.secondary,win:e.win,linux:e.linux,mac:e.mac};Ua.registerKeybindingRule(n)}}Tt.registerCommand({id:this.id,handler:(t,e)=>this.runCommand(t,e),description:this._description})}_registerMenuItem(t){Wl.appendMenuItem(t.menuId,{group:t.group,command:{id:this.id,title:t.title,icon:t.icon,precondition:this.precondition},when:t.when,order:t.order})}},Rv=class extends Qu{constructor(){super(...arguments),this._implementations=[]}addImplementation(t,e,i){return this._implementations.push({priority:t,name:e,implementation:i}),this._implementations.sort((n,s)=>s.priority-n.priority),{dispose:()=>{for(let n=0;n<this._implementations.length;n++)if(this._implementations[n].implementation===i){this._implementations.splice(n,1);return}}}}runCommand(t,e){const i=t.get(cr);i.trace(`Executing Command '${this.id}' which has ${this._implementations.length} bound.`);for(const n of this._implementations){const s=n.implementation(t,e);if(s)return i.trace(`Command '${this.id}' was handled by '${n.name}'.`),typeof s=="boolean"?void 0:s}i.trace(`The Command '${this.id}' was not handled by any implementation.`)}},E2=class extends Qu{constructor(t,e){super(e),this.command=t}runCommand(t,e){return this.command.runCommand(t,e)}},Ph=class D2 extends Qu{static bindToContribution(e){return class extends D2{constructor(n){super(n),this._callback=n.handler}runEditorCommand(n,s,r){const o=e(s);o&&this._callback(o,r)}}}runCommand(e,i){const n=e.get(pt),s=n.getFocusedCodeEditor()||n.getActiveCodeEditor();if(s)return s.invokeWithinContext(r=>{if(r.get(Ie).contextMatchesRules(Br(this.precondition)))return this.runEditorCommand(r,s,i)})}},go=class N2 extends Ph{constructor(e){super(N2.convertOptions(e)),this.label=e.label,this.alias=e.alias}static convertOptions(e){let i;Array.isArray(e.menuOpts)?i=e.menuOpts:e.menuOpts?i=[e.menuOpts]:i=[];function n(s){return s.menuId||(s.menuId=N.EditorContext),s.title||(s.title=e.label),s.when=Re.and(e.precondition,s.when),s}return Array.isArray(e.contextMenuOpts)?i.push(...e.contextMenuOpts.map(n)):e.contextMenuOpts&&i.push(n(e.contextMenuOpts)),e.menuOpts=i,e}runEditorCommand(e,i,n){return this.reportTelemetry(e,i),this.run(e,i,n||{})}reportTelemetry(e,i){e.get(Oh).publicLog2("editorActionInvoked",{name:this.label,id:this.id})}},T2=class extends go{constructor(){super(...arguments),this._implementations=[]}addImplementation(t,e){return this._implementations.push([t,e]),this._implementations.sort((i,n)=>n[0]-i[0]),{dispose:()=>{for(let i=0;i<this._implementations.length;i++)if(this._implementations[i][1]===e){this._implementations.splice(i,1);return}}}}run(t,e,i){for(const n of this._implementations){const s=n[1](t,e,i);if(s)return typeof s=="boolean"?void 0:s}}};
12function q(t){return Ui.INSTANCE.registerEditorCommand(t),t}function dr(t){const e=new t;return Ui.INSTANCE.registerEditorAction(e),e}function M2(t){return Ui.INSTANCE.registerEditorAction(t),t}function Av(t,e){Ui.INSTANCE.registerEditorContribution(t,e)}var oa;(function(t){function e(o){return Ui.INSTANCE.getEditorCommand(o)}t.getEditorCommand=e;function i(){return Ui.INSTANCE.getEditorActions()}t.getEditorActions=i;function n(){return Ui.INSTANCE.getEditorContributions()}t.getEditorContributions=n;function s(o){return Ui.INSTANCE.getEditorContributions().filter(a=>o.indexOf(a.id)>=0)}t.getSomeEditorContributions=s;function r(){return Ui.INSTANCE.getDiffEditorContributions()}t.getDiffEditorContributions=r})(oa||(oa={}));var qM={EditorCommonContributions:"editor.contributions"},Ui=class{constructor(){this.editorContributions=[],this.diffEditorContributions=[],this.editorActions=[],this.editorCommands=Object.create(null)}registerEditorContribution(t,e){this.editorContributions.push({id:t,ctor:e})}getEditorContributions(){return this.editorContributions.slice(0)}getDiffEditorContributions(){return this.diffEditorContributions.slice(0)}registerEditorAction(t){t.register(),this.editorActions.push(t)}getEditorActions(){return this.editorActions.slice(0)}registerEditorCommand(t){t.register(),this.editorCommands[t.id]=t}getEditorCommand(t){return this.editorCommands[t]||null}};Ui.INSTANCE=new Ui;vt.add(qM.EditorCommonContributions,Ui.INSTANCE);function Fh(t){return t.register(),t}var R2=Fh(new Rv({id:"undo",precondition:void 0,kbOpts:{weight:0,primary:2104},menuOpts:[{menuId:N.MenubarEditMenu,group:"1_do",title:p({key:"miUndo",comment:["&& denotes a mnemonic"]},"&&Undo"),order:1},{menuId:N.CommandPalette,group:"",title:p("undo","Undo"),order:1}]}));Fh(new E2(R2,{id:"default:undo",precondition:void 0}));var A2=Fh(new Rv({id:"redo",precondition:void 0,kbOpts:{weight:0,primary:2103,secondary:[3128],mac:{primary:3128}},menuOpts:[{menuId:N.MenubarEditMenu,group:"1_do",title:p({key:"miRedo",comment:["&& denotes a mnemonic"]},"&&Redo"),order:2},{menuId:N.CommandPalette,group:"",title:p("redo","Redo"),order:1}]}));Fh(new E2(A2,{id:"default:redo",precondition:void 0}));var GM=Fh(new Rv({id:"editor.action.selectAll",precondition:void 0,kbOpts:{weight:0,kbExpr:null,primary:2079},menuOpts:[{menuId:N.MenubarSelectionMenu,group:"1_basic",title:p({key:"miSelectAll",comment:["&& denotes a mnemonic"]},"&&Select All"),order:1},{menuId:N.CommandPalette,group:"",title:p("selectAll","Select All"),order:1}]})),ZM=function(t,e,i,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r},YM=function(t,e){return function(i,n){e(i,n,t)}},dh=class{constructor(e,i){}dispose(){}};dh.ID="editor.contrib.markerDecorations";dh=ZM([YM(1,QL)],dh);Av(dh.ID,dh);var O2=class extends V{constructor(t,e){super(),this._onDidChange=this._register(new M),this.onDidChange=this._onDidChange.event,this._referenceDomElement=t,this._width=-1,this._height=-1,this._resizeObserver=null,this.measureReferenceDomElement(!1,e)}dispose(){this.stopObserving(),super.dispose()}getWidth(){return this._width}getHeight(){return this._height}startObserving(){!this._resizeObserver&&this._referenceDomElement&&(this._resizeObserver=new ResizeObserver(t=>{t&&t[0]&&t[0].contentRect?this.observe({width:t[0].contentRect.width,height:t[0].contentRect.height}):this.observe()}),this._resizeObserver.observe(this._referenceDomElement))}stopObserving(){this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null)}observe(t){this.measureReferenceDomElement(!0,t)}measureReferenceDomElement(t,e){let i=0,n=0;e?(i=e.width,n=e.height):this._referenceDomElement&&(i=this._referenceDomElement.clientWidth,n=this._referenceDomElement.clientHeight),i=Math.max(5,i),n=Math.max(5,n),(this._width!==i||this._height!==n)&&(this._width=i,this._height=n,t&&this._onDidChange.fire())}},XM=Object.prototype.hasOwnProperty;function QM(t,e){for(let i in t)if(XM.call(t,i)&&e({key:i,value:t[i]},function(){delete t[i]})===!1)return}var JM=class{constructor(){this.map=new Map}add(t,e){let i=this.map.get(t);i||(i=new Set,this.map.set(t,i)),i.add(e)}delete(t,e){const i=this.map.get(t);i&&(i.delete(e),i.size===0&&this.map.delete(t))}forEach(t,e){const i=this.map.get(t);
12i&&i.forEach(e)}};function eR(t){const e=t.wordWrap;e===!0?t.wordWrap="on":e===!1&&(t.wordWrap="off");const i=t.lineNumbers;i===!0?t.lineNumbers="on":i===!1&&(t.lineNumbers="off"),t.autoClosingBrackets===!1&&(t.autoClosingBrackets="never",t.autoClosingQuotes="never",t.autoSurround="never"),t.cursorBlinking==="visible"&&(t.cursorBlinking="solid");const n=t.renderWhitespace;n===!0?t.renderWhitespace="boundary":n===!1&&(t.renderWhitespace="none");const s=t.renderLineHighlight;s===!0?t.renderLineHighlight="line":s===!1&&(t.renderLineHighlight="none");const r=t.acceptSuggestionOnEnter;r===!0?t.acceptSuggestionOnEnter="on":r===!1&&(t.acceptSuggestionOnEnter="off");const o=t.tabCompletion;o===!1?t.tabCompletion="off":o===!0&&(t.tabCompletion="onlySnippets");const a=t.suggest;if(a&&typeof a.filteredTypes=="object"&&a.filteredTypes){const m={};m.method="showMethods",m.function="showFunctions",m.constructor="showConstructors",m.deprecated="showDeprecated",m.field="showFields",m.variable="showVariables",m.class="showClasses",m.struct="showStructs",m.interface="showInterfaces",m.module="showModules",m.property="showProperties",m.event="showEvents",m.operator="showOperators",m.unit="showUnits",m.value="showValues",m.constant="showConstants",m.enum="showEnums",m.enumMember="showEnumMembers",m.keyword="showKeywords",m.text="showWords",m.color="showColors",m.file="showFiles",m.reference="showReferences",m.folder="showFolders",m.typeParameter="showTypeParameters",m.snippet="showSnippets",QM(m,_=>{const C=a.filteredTypes[_.key];C===!1&&(a[_.value]=C)})}const l=t.hover;l===!0?t.hover={enabled:!0}:l===!1&&(t.hover={enabled:!1});const h=t.parameterHints;h===!0?t.parameterHints={enabled:!0}:h===!1&&(t.parameterHints={enabled:!1});const c=t.autoIndent;c===!0?t.autoIndent="full":c===!1&&(t.autoIndent="advanced");const d=t.matchBrackets;d===!0?t.matchBrackets="always":d===!1&&(t.matchBrackets="never");const{renderIndentGuides:u,highlightActiveIndentGuide:g}=t;t.guides||(t.guides={}),u!==void 0&&(t.guides.indentation=!!u),g!==void 0&&(t.guides.highlightActiveIndentation=!!g)}var tR=class{constructor(){this._tabFocus=!1,this._onDidChangeTabFocus=new M,this.onDidChangeTabFocus=this._onDidChangeTabFocus.event}getTabFocusMode(){return this._tabFocus}setTabFocusMode(t){this._tabFocus!==t&&(this._tabFocus=t,this._onDidChangeTabFocus.fire(this._tabFocus))}},KC=new tR,Ti=ge("accessibilityService"),iR=new Y("accessibilityModeEnabled",!1),nR=function(t,e,i,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r},sR=function(t,e){return function(i,n){e(i,n,t)}},Dp=class extends V{constructor(e,i,n,s){super(),this._accessibilityService=s,this._onDidChange=this._register(new M),this.onDidChange=this._onDidChange.event,this._onDidChangeFast=this._register(new M),this.onDidChangeFast=this._onDidChangeFast.event,this._isDominatedByLongLines=!1,this._viewLineCount=1,this._lineNumbersDigitCount=1,this._reservedHeight=0,this._computeOptionsMemory=new my,this.isSimpleWidget=e,this._containerObserver=this._register(new O2(n,i.dimension)),this._rawOptions=jC(i),this._validatedOptions=rl.validateOptions(this._rawOptions),this.options=this._computeOptions(),this.options.get(10)&&this._containerObserver.startObserving(),this._register($d.onDidChangeZoomLevel(()=>this._recomputeOptions())),this._register(KC.onDidChangeTabFocus(()=>this._recomputeOptions())),this._register(this._containerObserver.onDidChange(()=>this._recomputeOptions())),this._register(qm.onDidChange(()=>this._recomputeOptions())),this._register(sh.onDidChange(()=>this._recomputeOptions())),this._register(this._accessibilityService.onDidChangeScreenReaderOptimized(()=>this._recomputeOptions()))}_recomputeOptions(){const e=this._computeOptions(),i=rl.checkEquals(this.options,e);i!==null&&(this.options=e,this._onDidChangeFast.fire(i),this._onDidChange.fire(i))}_computeOptions(){const e=this._readEnvConfiguration(),i=gv.createFromValidatedSettings(this._val
12idatedOptions,e.pixelRatio,this.isSimpleWidget),n=this._readFontInfo(i),s={memory:this._computeOptionsMemory,outerWidth:e.outerWidth,outerHeight:e.outerHeight-this._reservedHeight,fontInfo:n,extraEditorClassName:e.extraEditorClassName,isDominatedByLongLines:this._isDominatedByLongLines,viewLineCount:this._viewLineCount,lineNumbersDigitCount:this._lineNumbersDigitCount,emptySelectionClipboard:e.emptySelectionClipboard,pixelRatio:e.pixelRatio,tabFocusMode:KC.getTabFocusMode(),accessibilitySupport:e.accessibilitySupport};return rl.computeOptions(this._validatedOptions,s)}_readEnvConfiguration(){return{extraEditorClassName:oR(),outerWidth:this._containerObserver.getWidth(),outerHeight:this._containerObserver.getHeight(),emptySelectionClipboard:js||Ii,pixelRatio:sh.value,accessibilitySupport:this._accessibilityService.isScreenReaderOptimized()?2:this._accessibilityService.getAccessibilitySupport()}}_readFontInfo(e){return qm.readFontInfo(e)}getRawOptions(){return this._rawOptions}updateOptions(e){const i=jC(e);rl.applyUpdate(this._rawOptions,i)&&(this._validatedOptions=rl.validateOptions(this._rawOptions),this._recomputeOptions())}observeContainer(e){this._containerObserver.observe(e)}setIsDominatedByLongLines(e){this._isDominatedByLongLines!==e&&(this._isDominatedByLongLines=e,this._recomputeOptions())}setModelLineCount(e){const i=rR(e);this._lineNumbersDigitCount!==i&&(this._lineNumbersDigitCount=i,this._recomputeOptions())}setViewLineCount(e){this._viewLineCount!==e&&(this._viewLineCount=e,this._recomputeOptions())}setReservedHeight(e){this._reservedHeight!==e&&(this._reservedHeight=e,this._recomputeOptions())}};Dp=nR([sR(3,Ti)],Dp);function rR(t){let e=0;for(;t;)t=Math.floor(t/10),e++;return e||1}function oR(){let t="";return!Wn&&!fv&&(t+="no-user-select "),Wn&&(t+="no-minimap-shadow "),fe&&(t+="mac "),t}var aR=class{constructor(){this._values=[]}_read(t){return this._values[t]}get(t){return this._values[t]}_write(t,e){this._values[t]=e}},lR=class{constructor(){this._values=[]}_read(t){if(t>=this._values.length)throw new Error("Cannot read uninitialized value");return this._values[t]}get(t){return this._read(t)}_write(t,e){this._values[t]=e}},rl=class Np{static validateOptions(e){const i=new aR;for(const n of $o){const s=n.name==="_never_"?void 0:e[n.name];i._write(n.id,n.validate(s))}return i}static computeOptions(e,i){const n=new lR;for(const s of $o)n._write(s.id,s.compute(i,n,e._read(s.id)));return n}static _deepEquals(e,i){if(typeof e!="object"||typeof i!="object"||!e||!i)return e===i;if(Array.isArray(e)||Array.isArray(i))return Array.isArray(e)&&Array.isArray(i)?Rn(e,i):!1;if(Object.keys(e).length!==Object.keys(i).length)return!1;for(const n in e)if(!Np._deepEquals(e[n],i[n]))return!1;return!0}static checkEquals(e,i){const n=[];let s=!1;for(const r of $o){const o=!Np._deepEquals(e._read(r.id),i._read(r.id));n[r.id]=o,o&&(s=!0)}return s?new gy(n):null}static applyUpdate(e,i){let n=!1;for(const s of $o)if(i.hasOwnProperty(s.name)){const r=s.applyUpdate(e[s.name],i[s.name]);e[s.name]=r.newValue,n=n||r.didChange}return n}};function jC(t){const e=As(t);return eR(e),e}function tt(t,e,i){let n=null,s=null;if(typeof i.value=="function"?(n="value",s=i.value,s.length):typeof i.get=="function"&&(n="get",s=i.get),!s)throw new Error("not supported");const r=`$memoize$${e}`;i[n]=function(...o){return this.hasOwnProperty(r)||Object.defineProperty(this,r,{configurable:!1,enumerable:!1,writable:!1,value:s.apply(this,o)}),this[r]}}var hR=function(t,e,i,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r},Me;(function(t){t.Tap="-monaco-gesturetap",t.Change="-monaco-gesturechange",t.Start="-monaco-gesturestart",t.End="-monaco-gesturesend",t.Contextmenu="-monaco-gesturecontextmenu"})(Me||(Me={}));var ii=class ct extends V{constructor(){super(),this.dispatched=!1,this.activeTouches={},this.handle=null,this.targets=[],this.ignoreTargets=[],this._lastSetTapCountTime=0,this._register(B(document,"touchstart",e=>this.onTouchStart(e),{passive:!1})),this._register(B(document,"touchend",e=>this.onTouchEnd(e))),this._register(B(document,"touchmove",e=>this.onTouchMove(e),{passive:!1}))}static addTarget(e){return ct.isTouchDevice()?(ct.INSTANCE||(ct.INSTANCE=new ct),ct.INSTANCE.targets.push(e),{dispose:()=>{ct.INSTANCE.targets=ct.INSTANCE.targets.filter(i=>i!==e)}}):V.None}static ignoreTarget(e){return ct.isTouchDevice()?(ct.INSTANCE||(ct.INSTANCE=new ct),ct.INSTANCE.ignoreTargets.push(e),{dispose:()=>{ct.INSTANCE.ignoreTargets=ct.INSTANCE.ignoreTargets.filter(i=>i!==e)}}):V.None}static isTouchDevice(){return"ontouchstart"in window||navigator.maxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(e){let i=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let n=0,s=e.targetTouches.length;n<s;n++){let r=e.targetTouches.item(n);this.activeTouches[r.identifier]={id:r.identifier,initialTarget:r.target,initialTimeStamp:i,initialPageX:r.pageX,initialPageY:r.pageY,rollingTimestamps:[i],rollingPageX:[r.pageX],rollingPageY:[r.pageY]};let o=this.newGestureEvent(Me.Start,r.target);o.pageX=r.pageX,o.pageY=r.pageY,this.dispatchEvent(o)}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}onTouchEnd(e){let i=Date.now(),n=Object.keys(this.activeTouches).length;for(let s=0,r=e.changedTouches.length;s<r;s++){let o=e.changedTouches.item(s);if(!this.activeTouches.hasOwnProperty(String(o.identifier)))continue;let a=this.activeTouches[o.identifier],l=Date.now()-a.initialTimeStamp;if(l<ct.HOLD_DELAY&&Math.abs(a.initialPageX-Ci(a.rollingPageX))<30&&Math.abs(a.initialPageY-Ci(a.rollingPageY))<30){let h=this.newGestureEvent(Me.Tap,a.initialTarget);h.pageX=Ci(a.rollingPageX),h.pageY=Ci(a.rollingPageY),this.dispatchEvent(h)}else if(l>=ct.HOLD_DELAY&&Math.abs(a.initialPageX-Ci(a.rollingPageX))<30&&Math.abs(a.initialPageY-Ci(a.rollingPageY))<30){let h=this.newGestureEvent(Me.Contextmenu,a.initialTarget);h.pageX=Ci(a.rollingPageX),h.pageY=Ci(a.rollingPageY),this.dispatchEvent(h)}else if(n===1){let h=Ci(a.rollingPageX),c=Ci(a.rollingPageY),d=Ci(a.rollingTimestamps)-a.rollingTimestamps[0],u=h-a.rollingPageX[0],g=c-a.rollingPageY[0];const m=this.targets.filter(_=>a.initialTarget instanceof Node&&_.contains(a.initialTarget));this.inertia(m,i,Math.abs(u)/d,u>0?1:-1,h,Math.abs(g)/d,g>0?1:-1,c)}this.dispatchEvent(this.newGestureEvent(Me.End,a.initialTarget)),delete this.activeTouches[o.identifier]}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}newGestureEvent(e,i){let n=document.createEvent("CustomEvent");return n.initEvent(e,!1,!0),n.initialTarget=i,n.tapCount=0,n}dispatchEvent(e){if(e.type===Me.Tap){const i=new Date().getTime();let n=0;i-this._lastSetTapCountTime>ct.CLEAR_TAP_COUNT_TIME?n=1:n=2,this._lastSetTapCountTime=i,e.tapCount=n}else(e.type===Me.Change||e.type===Me.Contextmenu)&&(this._lastSetTapCountTime=0);for(let i=0;i<this.ignoreTargets.length;i++)if(e.initialTarget instanceof Node&&this.ignoreTargets[i].contains(e.initialTarget))return;
12this.targets.forEach(i=>{e.initialTarget instanceof Node&&i.contains(e.initialTarget)&&(i.dispatchEvent(e),this.dispatched=!0)})}inertia(e,i,n,s,r,o,a,l){this.handle=Cn(()=>{let h=Date.now(),c=h-i,d=0,u=0,g=!0;n+=ct.SCROLL_FRICTION*c,o+=ct.SCROLL_FRICTION*c,n>0&&(g=!1,d=s*n*c),o>0&&(g=!1,u=a*o*c);let m=this.newGestureEvent(Me.Change);m.translationX=d,m.translationY=u,e.forEach(_=>_.dispatchEvent(m)),g||this.inertia(e,h,n,s,r+d,o,a,l+u)})}onTouchMove(e){let i=Date.now();for(let n=0,s=e.changedTouches.length;n<s;n++){let r=e.changedTouches.item(n);if(!this.activeTouches.hasOwnProperty(String(r.identifier)))continue;let o=this.activeTouches[r.identifier],a=this.newGestureEvent(Me.Change,o.initialTarget);a.translationX=r.pageX-Ci(o.rollingPageX),a.translationY=r.pageY-Ci(o.rollingPageY),a.pageX=r.pageX,a.pageY=r.pageY,this.dispatchEvent(a),o.rollingPageX.length>3&&(o.rollingPageX.shift(),o.rollingPageY.shift(),o.rollingTimestamps.shift()),o.rollingPageX.push(r.pageX),o.rollingPageY.push(r.pageY),o.rollingTimestamps.push(i)}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}};ii.SCROLL_FRICTION=-.005;ii.HOLD_DELAY=700;ii.CLEAR_TAP_COUNT_TIME=400;hR([tt],ii,"isTouchDevice",null);function Ov(t,e){let i=new ji(e);return i.preventDefault(),{leftButton:i.leftButton,buttons:i.buttons,posx:i.posx,posy:i.posy}}var Ju=class{constructor(){this._hooks=new ne,this._mouseMoveEventMerger=null,this._mouseMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(t,e){if(!this.isMonitoring())return;this._hooks.clear(),this._mouseMoveEventMerger=null,this._mouseMoveCallback=null;const i=this._onStopCallback;this._onStopCallback=null,t&&i&&i(e)}isMonitoring(){return!!this._mouseMoveEventMerger}startMonitoring(t,e,i,n,s){if(this.isMonitoring())return;this._mouseMoveEventMerger=i,this._mouseMoveCallback=n,this._onStopCallback=s;const r=_p.getSameOriginWindowChain(),o=Xr?"pointermove":"mousemove",a="mouseup",l=r.map(c=>c.window.document),h=io(t);h&&l.unshift(h);for(const c of l)this._hooks.add(Nv(c,o,d=>{if(d.buttons!==e){this.stopMonitoring(!0);return}this._mouseMoveCallback(d)},(d,u)=>this._mouseMoveEventMerger(d,u))),this._hooks.add(B(c,a,d=>this.stopMonitoring(!0)));if(_p.hasDifferentOriginAncestor()){let c=r[r.length-1];this._hooks.add(B(c.window.document,"mouseout",d=>{new ji(d).target.tagName.toLowerCase()==="html"&&this.stopMonitoring(!0)})),this._hooks.add(B(c.window.document,"mouseover",d=>{new ji(d).target.tagName.toLowerCase()==="html"&&this.stopMonitoring(!0)})),this._hooks.add(B(c.window.document.body,"mouseleave",d=>{this.stopMonitoring(!0)}))}}};function Gs(t,e){const i=Math.pow(10,e);return Math.round(t*i)/i}var ce=class{constructor(t,e,i,n=1){this._rgbaBrand=void 0,this.r=Math.min(255,Math.max(0,t))|0,this.g=Math.min(255,Math.max(0,e))|0,this.b=Math.min(255,Math.max(0,i))|0,this.a=Gs(Math.max(Math.min(1,n),0),3)}static equals(t,e){return t.r===e.r&&t.g===e.g&&t.b===e.b&&t.a===e.a}},xo=class Il{constructor(e,i,n,s){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=Gs(Math.max(Math.min(1,i),0),3),this.l=Gs(Math.max(Math.min(1,n),0),3),this.a=Gs(Math.max(Math.min(1,s),0),3)}static equals(e,i){return e.h===i.h&&e.s===i.s&&e.l===i.l&&e.a===i.a}static fromRGBA(e){const i=e.r/255,n=e.g/255,s=e.b/255,r=e.a,o=Math.max(i,n,s),a=Math.min(i,n,s);let l=0,h=0;const c=(a+o)/2,d=o-a;if(d>0){switch(h=Math.min(c<=.5?d/(2*c):d/(2-2*c),1),o){case i:l=(n-s)/d+(n<s?6:0);break;case n:l=(s-i)/d+2;break;case s:l=(i-n)/d+4}l*=60,l=Math.round(l)}return new Il(l,h,c,r)}static _hue2rgb(e,i,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(i-e)*6*n:n<1/2?i:n<2/3?e+(i-e)*(2/3-n)*6:e}static toRGBA(e){const i=e.h/360,{s:n,l:s,a:r}=e;let o,a,l;if(n===0)o=a=l=s;else{const h=s<.5?s*(1+n):s+n-s*n,c=2*s-h;o=Il._hue2rgb(c,h,i+1/3),a=Il._hue2rgb(c,h,i),l=Il._hue2rgb(c,h,i-1/3)}return new ce(Math.round(o*255),Math.round(a*255),Math.round(l*255),r)}},ic=class P2{constructor(e,i,n,s){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=Gs(Math.max(Math.min(1,i),0),3),this.v=Gs(Math.max(Math.min(1,n),0),3),this.a=Gs(Math.max(Math.min(1,s),0),3)}static equals(e,i){return e.h===i.h&&e.s===i.s&&e.v===i.v&&e.a===i.a}static fromRGBA(e){const i=e.r/255,n=e.g/255,s=e.b/255,r=Math.max(i,n,s),o=r-Math.min(i,n,s),a=r===0?0:o/r;let l;return o===0?l=0:r===i?l=((n-s)/o%6+6)%6:r===n?l=(s-i)/o+2:l=(i-n)/o+4,new P2(Math.round(l*60),a,r,e.a)}static toRGBA(e){const{h:i,s:n,v:s,a:r}=e,o=s*n,a=o*(1-Math.abs(i/60%2-1)),l=s-o;let[h,c,d]=[0,0,0];return i<60?(h=o,c=a):i<120?(h=a,c=o):i<180?(c=o,d=a):i<240?(c=a,d=o):i<300?(h=a,d=o):i<=360&&(h=o,d=a),h=Math.round((h+l)*255),c=Math.round((c+l)*255),d=Math.round((d+l)*255),new ce(h,c,d,r)}},O=class nn{constructor(e){if(e)if(e instanceof ce)this.rgba=e;else if(e instanceof xo)this._hsla=e,this.rgba=xo.toRGBA(e);else if(e instanceof ic)this._hsva=e,this.rgba=ic.toRGBA(e);else throw new Error("Invalid color ctor argument");else throw new Error("Color needs a value")}static fromHex(e){return nn.Format.CSS.parseHex(e)||nn.red}get hsla(){return this._hsla?this._hsla:xo.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:ic.fromRGBA(this.rgba)}equals(e){return!!e&&ce.equals(this.rgba,e.rgba)&&xo.equals(this.hsla,e.hsla)&&ic.equals(this.hsva,e.hsva)}getRelativeLuminance(){const e=nn._relativeLuminanceForComponent(this.rgba.r),i=nn._relativeLuminanceForComponent(this.rgba.g),n=nn._relativeLuminanceForComponent(this.rgba.b);return Gs(.2126*e+.7152*i+.0722*n,4)}static _relativeLuminanceForComponent(e){const i=e/255;return i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4)}isLighter(){return(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3>=128}isLighterThan(e){return this.getRelativeLuminance()>e.getRelativeLuminance()}isDarkerThan(e){return this.getRelativeLuminance()<e.getRelativeLuminance()}lighten(e){return new nn(new xo(this.hsla.h,this.hsla.s,this.hsla.l+this.hsla.l*e,this.hsla.a))}darken(e){return new nn(new xo(this.hsla.h,this.hsla.s,this.hsla.l-this.hsla.l*e,this.hsla.a))}
12transparent(e){const{r:i,g:n,b:s,a:r}=this.rgba;return new nn(new ce(i,n,s,r*e))}isTransparent(){return this.rgba.a===0}isOpaque(){return this.rgba.a===1}opposite(){return new nn(new ce(255-this.rgba.r,255-this.rgba.g,255-this.rgba.b,this.rgba.a))}toString(){return this._toString||(this._toString=nn.Format.CSS.format(this)),this._toString}static getLighterColor(e,i,n){if(e.isLighterThan(i))return e;n=n||.5;const s=e.getRelativeLuminance(),r=i.getRelativeLuminance();return n=n*(r-s)/r,e.lighten(n)}static getDarkerColor(e,i,n){if(e.isDarkerThan(i))return e;n=n||.5;const s=e.getRelativeLuminance(),r=i.getRelativeLuminance();return n=n*(s-r)/s,e.darken(n)}};O.white=new O(new ce(255,255,255,1));O.black=new O(new ce(0,0,0,1));O.red=new O(new ce(255,0,0,1));O.blue=new O(new ce(0,0,255,1));O.green=new O(new ce(0,255,0,1));O.cyan=new O(new ce(0,255,255,1));O.lightgrey=new O(new ce(211,211,211,1));O.transparent=new O(new ce(0,0,0,0));(function(t){(function(e){(function(i){function n(g){return g.rgba.a===1?`rgb(${g.rgba.r}, ${g.rgba.g}, ${g.rgba.b})`:t.Format.CSS.formatRGBA(g)}i.formatRGB=n;function s(g){return`rgba(${g.rgba.r}, ${g.rgba.g}, ${g.rgba.b}, ${+g.rgba.a.toFixed(2)})`}i.formatRGBA=s;function r(g){return g.hsla.a===1?`hsl(${g.hsla.h}, ${(g.hsla.s*100).toFixed(2)}%, ${(g.hsla.l*100).toFixed(2)}%)`:t.Format.CSS.formatHSLA(g)}i.formatHSL=r;function o(g){return`hsla(${g.hsla.h}, ${(g.hsla.s*100).toFixed(2)}%, ${(g.hsla.l*100).toFixed(2)}%, ${g.hsla.a.toFixed(2)})`}i.formatHSLA=o;function a(g){const m=g.toString(16);return m.length!==2?"0"+m:m}function l(g){return`#${a(g.rgba.r)}${a(g.rgba.g)}${a(g.rgba.b)}`}i.formatHex=l;function h(g,m=!1){return m&&g.rgba.a===1?t.Format.CSS.formatHex(g):`#${a(g.rgba.r)}${a(g.rgba.g)}${a(g.rgba.b)}${a(Math.round(g.rgba.a*255))}`}i.formatHexA=h;function c(g){return g.isOpaque()?t.Format.CSS.formatHex(g):t.Format.CSS.formatRGBA(g)}i.format=c;function d(g){const m=g.length;if(m===0||g.charCodeAt(0)!==35)return null;if(m===7){const _=16*u(g.charCodeAt(1))+u(g.charCodeAt(2)),C=16*u(g.charCodeAt(3))+u(g.charCodeAt(4)),w=16*u(g.charCodeAt(5))+u(g.charCodeAt(6));return new t(new ce(_,C,w,1))}if(m===9){const _=16*u(g.charCodeAt(1))+u(g.charCodeAt(2)),C=16*u(g.charCodeAt(3))+u(g.charCodeAt(4)),w=16*u(g.charCodeAt(5))+u(g.charCodeAt(6)),v=16*u(g.charCodeAt(7))+u(g.charCodeAt(8));return new t(new ce(_,C,w,v/255))}if(m===4){const _=u(g.charCodeAt(1)),C=u(g.charCodeAt(2)),w=u(g.charCodeAt(3));return new t(new ce(16*_+_,16*C+C,16*w+w))}if(m===5){const _=u(g.charCodeAt(1)),C=u(g.charCodeAt(2)),w=u(g.charCodeAt(3)),v=u(g.charCodeAt(4));return new t(new ce(16*_+_,16*C+C,16*w+w,(16*v+v)/255))}return null}i.parseHex=d;function u(g){switch(g){case 48:return 0;case 49:return 1;case 50:return 2;case 51:return 3;case 52:return 4;case 53:return 5;case 54:return 6;case 55:return 7;case 56:return 8;case 57:return 9;case 97:return 10;case 65:return 10;case 98:return 11;case 66:return 11;case 99:return 12;case 67:return 12;case 100:return 13;case 68:return 13;case 101:return 14;case 69:return 14;case 102:return 15;case 70:return 15}return 0}})(e.CSS||(e.CSS={}))})(t.Format||(t.Format={}))})(O||(O={}));var ef={JSONContribution:"base.contributions.json"};function cR(t){return t.length>0&&t.charAt(t.length-1)==="#"?t.substring(0,t.length-1):t}var dR=class{constructor(){this._onDidChangeSchema=new M,this.schemasById={}}registerSchema(t,e){this.schemasById[cR(t)]=e,this._onDidChangeSchema.fire(t)}notifySchemaChanged(t){this._onDidChangeSchema.fire(t)}},uR=new dR;vt.add(ef.JSONContribution,uR);function F2(t){return`--vscode-${t.replace(/\./g,"-")}`}var B2={ColorContribution:"base.contributions.colors"},fR=class{constructor(){this._onDidChangeSchema=new M,this.onDidChangeSchema=this._onDidChangeSchema.event,this.colorSchema={type:"object",properties:{}},this.colorReferenceSchema={type:"string",enum:[],enumDescriptions:[]},this.colorsById={}}registerColor(t,e,i,n=!1,s){let r={id:t,description:i,defaults:e,needsTransparency:n,deprecationMessage:s};this.colorsById[t]=r;let o={type:"string",description:i,format:"color-hex",defaultSnippets:[{body:"${1:#ff0000}"}]};return s&&(o.deprecationMessage=s),this.colorSchema.properties[t]=o,this.colorReferenceSchema.enum.push(t),this.colorReferenceSchema.enumDescriptions.push(i),this._onDidChangeSchema.fire(),t}getColors(){return Object.keys(this.colorsById).map(t=>this.colorsById[t])}resolveDefaultColor(t,e){const i=this.colorsById[t];if(i&&i.defaults){const n=i.defaults[e.type];return ss(n,e)}}getColorSchema(){return this.colorSchema}toString(){let t=(e,i)=>{let n=e.indexOf(".")===-1?0:1,s=i.indexOf(".")===-1?0:1;return n!==s?n-s:e.localeCompare(i)};return Object.keys(this.colorsById).sort(t).map(e=>`- \`${e}\`: ${this.colorsById[e].description}`).join(`
13`)}},tf=new fR;vt.add(B2.ColorContribution,tf);function I(t,e,i,n,s){return tf.registerColor(t,e,i,n,s)}var Oe=I("foreground",{dark:"#CCCCCC",light:"#616161",hc:"#FFFFFF"},p("foreground","Overall foreground color. This color is only used if not overridden by a component.")),gR=I("errorForeground",{dark:"#F48771",light:"#A1260D",hc:"#F48771"},p("errorForeground","Overall foreground color for error messages. This color is only used if not overridden by a component.")),Uz=I("descriptionForeground",{light:"#717171",dark:te(Oe,.7),hc:te(Oe,.7)},p("descriptionForeground","Foreground color for description text providing additional information, for example for a label.")),$z=I("icon.foreground",{dark:"#C5C5C5",light:"#424242",hc:"#FFFFFF"},p("iconForeground","The default color for icons in the workbench.")),Pn=I("focusBorder",{dark:"#007FD4",light:"#0090F1",hc:"#F38518"},p("focusBorder","Overall border color for focused elements. This color is only used if not overridden by a component.")),Ye=I("contrastBorder",{light:null,dark:null,hc:"#6FC3DF"},p("contrastBorder","An extra border around elements to separate them from others for greater contrast.")),_i=I("contrastActiveBorder",{light:null,dark:null,hc:Pn},p("activeContrastBorder","An extra border around active elements to separate them from others for greater contrast.")),Kz=I("selection.background",{light:null,dark:null,hc:null}
13,p("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.")),jz=I("textSeparator.foreground",{light:"#0000002e",dark:"#ffffff2e",hc:O.black},p("textSeparatorForeground","Color for text separators.")),qz=I("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hc:"#3794FF"},p("textLinkForeground","Foreground color for links in text.")),Gz=I("textLink.activeForeground",{light:"#006AB1",dark:"#3794FF",hc:"#3794FF"},p("textLinkActiveForeground","Foreground color for links in text when clicked on and on mouse hover.")),Zz=I("textPreformat.foreground",{light:"#A31515",dark:"#D7BA7D",hc:"#D7BA7D"},p("textPreformatForeground","Foreground color for preformatted text segments.")),Yz=I("textBlockQuote.background",{light:"#7f7f7f1a",dark:"#7f7f7f1a",hc:null},p("textBlockQuoteBackground","Background color for block quotes in text.")),Xz=I("textBlockQuote.border",{light:"#007acc80",dark:"#007acc80",hc:O.white},p("textBlockQuoteBorder","Border color for block quotes in text.")),Qz=I("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hc:O.black},p("textCodeBlockBackground","Background color for code blocks in text.")),Ea=I("widget.shadow",{dark:te(O.black,.36),light:te(O.black,.16),hc:null},p("widgetShadow","Shadow color of widgets such as find/replace inside the editor.")),V2=I("input.background",{dark:"#3C3C3C",light:O.white,hc:O.black},p("inputBoxBackground","Input box background.")),W2=I("input.foreground",{dark:Oe,light:Oe,hc:Oe},p("inputBoxForeground","Input box foreground.")),H2=I("input.border",{dark:null,light:null,hc:Ye},p("inputBoxBorder","Input box border.")),Tp=I("inputOption.activeBorder",{dark:"#007ACC00",light:"#007ACC00",hc:Ye},p("inputBoxActiveOptionBorder","Border color of activated options in input fields.")),Jz=I("inputOption.hoverBackground",{dark:"#5a5d5e80",light:"#b8b8b850",hc:null},p("inputOption.hoverBackground","Background color of activated options in input fields.")),Mp=I("inputOption.activeBackground",{dark:te(Pn,.4),light:te(Pn,.2),hc:O.transparent},p("inputOption.activeBackground","Background hover color of options in input fields.")),Rp=I("inputOption.activeForeground",{dark:O.white,light:O.black,hc:null},p("inputOption.activeForeground","Foreground color of activated options in input fields.")),eU=I("input.placeholderForeground",{light:te(Oe,.5),dark:te(Oe,.5),hc:te(Oe,.7)},p("inputPlaceholderForeground","Input box foreground color for placeholder text.")),z2=I("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hc:O.black},p("inputValidationInfoBackground","Input validation background color for information severity.")),U2=I("inputValidation.infoForeground",{dark:null,light:null,hc:null},p("inputValidationInfoForeground","Input validation foreground color for information severity.")),$2=I("inputValidation.infoBorder",{dark:"#007acc",light:"#007acc",hc:Ye},p("inputValidationInfoBorder","Input validation border color for information severity.")),K2=I("inputValidation.warningBackground",{dark:"#352A05",light:"#F6F5D2",hc:O.black},p("inputValidationWarningBackground","Input validation background color for warning severity.")),j2=I("inputValidation.warningForeground",{dark:null,light:null,hc:null},p("inputValidationWarningForeground","Input validation foreground color for warning severity.")),q2=I("inputValidation.warningBorder",{dark:"#B89500",light:"#B89500",hc:Ye},p("inputValidationWarningBorder","Input validation border color for warning severity.")),G2=I("inputValidation.errorBackground",{dark:"#5A1D1D",light:"#F2DEDE",hc:O.black},p("inputValidationErrorBackground","Input validation background color for error severity.")),Z2=I("inputValidation.errorForeground",{dark:null,light:null,hc:null},p("inputValidationErrorForeground","Input validation foreground color for error severity.")),Y2=I("inputValidation.errorBorder",{dark:"#BE1100",light:"#BE1100",hc:Ye},p("inputValidationErrorBorder","Input validation border color for error severity.")),Kr=I("dropdown.background",{dark:"#3C3C3C",light:O.white,hc:O.black}
13,p("dropdownBackground","Dropdown background.")),tU=I("dropdown.listBackground",{dark:null,light:null,hc:O.black},p("dropdownListBackground","Dropdown list background.")),Hl=I("dropdown.foreground",{dark:"#F0F0F0",light:null,hc:O.white},p("dropdownForeground","Dropdown foreground.")),$f=I("dropdown.border",{dark:Kr,light:"#CECECE",hc:Ye},p("dropdownBorder","Dropdown border.")),iU=I("checkbox.background",{dark:Kr,light:Kr,hc:Kr},p("checkbox.background","Background color of checkbox widget.")),nU=I("checkbox.foreground",{dark:Hl,light:Hl,hc:Hl},p("checkbox.foreground","Foreground color of checkbox widget.")),sU=I("checkbox.border",{dark:$f,light:$f,hc:$f},p("checkbox.border","Border color of checkbox widget.")),mR=I("button.foreground",{dark:O.white,light:O.white,hc:O.white},p("buttonForeground","Button foreground color.")),Ap=I("button.background",{dark:"#0E639C",light:"#007ACC",hc:null},p("buttonBackground","Button background color.")),pR=I("button.hoverBackground",{dark:nr(Ap,.2),light:Ka(Ap,.2),hc:null},p("buttonHoverBackground","Button background color when hovering.")),rU=I("button.border",{dark:Ye,light:Ye,hc:Ye},p("buttonBorder","Button border color.")),oU=I("button.secondaryForeground",{dark:O.white,light:O.white,hc:O.white},p("buttonSecondaryForeground","Secondary button foreground color.")),qC=I("button.secondaryBackground",{dark:"#3A3D41",light:"#5F6A79",hc:null},p("buttonSecondaryBackground","Secondary button background color.")),aU=I("button.secondaryHoverBackground",{dark:nr(qC,.2),light:Ka(qC,.2),hc:null},p("buttonSecondaryHoverBackground","Secondary button background color when hovering.")),sd=I("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hc:O.black}
13,p("badgeBackground","Badge background color. Badges are small information labels, e.g. for search results count.")),rd=I("badge.foreground",{dark:O.white,light:"#333",hc:O.white},p("badgeForeground","Badge foreground color. Badges are small information labels, e.g. for search results count.")),$a=I("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hc:null},p("scrollbarShadow","Scrollbar shadow to indicate that the view is scrolled.")),aa=I("scrollbarSlider.background",{dark:O.fromHex("#797979").transparent(.4),light:O.fromHex("#646464").transparent(.4),hc:te(Ye,.6)},p("scrollbarSliderBackground","Scrollbar slider background color.")),la=I("scrollbarSlider.hoverBackground",{dark:O.fromHex("#646464").transparent(.7),light:O.fromHex("#646464").transparent(.7),hc:te(Ye,.8)},p("scrollbarSliderHoverBackground","Scrollbar slider background color when hovering.")),ha=I("scrollbarSlider.activeBackground",{dark:O.fromHex("#BFBFBF").transparent(.4),light:O.fromHex("#000000").transparent(.6),hc:Ye},p("scrollbarSliderActiveBackground","Scrollbar slider background color when clicked on.")),_R=I("progressBar.background",{dark:O.fromHex("#0E70C0"),light:O.fromHex("#0E70C0"),hc:Ye}
vendor: 4,213 bytes, line 13
13,p("progressBarBackground","Background color of the progress bar that can show for long running operations.")),vR=I("editorError.background",{dark:null,light:null,hc:null},p("editorError.background","Background color of error text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),jr=I("editorError.foreground",{dark:"#F14C4C",light:"#E51400",hc:null},p("editorError.foreground","Foreground color of error squigglies in the editor.")),CR=I("editorError.border",{dark:null,light:null,hc:O.fromHex("#E47777").transparent(.8)},p("errorBorder","Border color of error boxes in the editor.")),bR=I("editorWarning.background",{dark:null,light:null,hc:null},p("editorWarning.background","Background color of warning text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),pn=I("editorWarning.foreground",{dark:"#CCA700",light:"#BF8803",hc:null},p("editorWarning.foreground","Foreground color of warning squigglies in the editor.")),Pv=I("editorWarning.border",{dark:null,light:null,hc:O.fromHex("#FFCC00").transparent(.8)},p("warningBorder","Border color of warning boxes in the editor.")),wR=I("editorInfo.background",{dark:null,light:null,hc:null},p("editorInfo.background","Background color of info text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),vs=I("editorInfo.foreground",{dark:"#3794FF",light:"#1a85ff",hc:"#3794FF"},p("editorInfo.foreground","Foreground color of info squigglies in the editor.")),X2=I("editorInfo.border",{dark:null,light:null,hc:O.fromHex("#3794FF").transparent(.8)},p("infoBorder","Border color of info boxes in the editor.")),SR=I("editorHint.foreground",{dark:O.fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hc:null},p("editorHint.foreground","Foreground color of hint squigglies in the editor.")),yR=I("editorHint.border",{dark:null,light:null,hc:O.fromHex("#eeeeee").transparent(.8)},p("hintBorder","Border color of hint boxes in the editor.")),lU=I("sash.hoverBorder",{dark:Pn,light:Pn,hc:Pn},p("sashActiveBorder","Border color of active sashes.")),Gi=I("editor.background",{light:"#fffffe",dark:"#1E1E1E",hc:O.black},p("editorBackground","Editor background color.")),Bh=I("editor.foreground",{light:"#333333",dark:"#BBBBBB",hc:O.white},p("editorForeground","Editor default foreground color.")),Zi=I("editorWidget.background",{dark:"#252526",light:"#F3F3F3",hc:"#0C141F"},p("editorWidgetBackground","Background color of editor widgets, such as find/replace.")),Zs=I("editorWidget.foreground",{dark:Oe,light:Oe,hc:Oe},p("editorWidgetForeground","Foreground color of editor widgets, such as find/replace.")),od=I("editorWidget.border",{dark:"#454545",light:"#C8C8C8",hc:Ye},p("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.")),LR=I("editorWidget.resizeBorder",{light:null,dark:null,hc:null},p("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.")),GC=I("quickInput.background",{dark:Zi,light:Zi,hc:Zi},p("pickerBackground","Quick picker background color. The quick picker widget is the container for pickers like the command palette.")),kR=I("quickInput.foreground",{dark:Zs,light:Zs,hc:Zs},p("pickerForeground","Quick picker foreground color. The quick picker widget is the container for pickers like the command palette.")),xR=I("quickInputTitle.background",{dark:new O(new ce(255,255,255,.105)),light:new O(new ce(0,0,0,.06)),hc:"#000000"},p("pickerTitleBackground","Quick picker title background color. The quick picker widget is the container for pickers like the command palette.")),IR=I("pickerGroup.foreground",{dark:"#3794FF",light:"#0066BF",hc:O.white},p("pickerGroupForeground","Quick picker color for grouping labels.")),ER=I("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hc:O.white},p("pickerGroupBorder","Quick picker color for grouping borders.")),DR=I("keybindingLabel.background",{dark:new O(new ce(128,128,128,.17)),light:new O(new ce(221,221,221,.4)),hc:O.transparent}
13,p("keybindingLabelBackground","Keybinding label background color. The keybinding label is used to represent a keyboard shortcut.")),NR=I("keybindingLabel.foreground",{dark:O.fromHex("#CCCCCC"),light:O.fromHex("#555555"),hc:O.white},p("keybindingLabelForeground","Keybinding label foreground color. The keybinding label is used to represent a keyboard shortcut.")),TR=I("keybindingLabel.border",{dark:new O(new ce(51,51,51,.6)),light:new O(new ce(204,204,204,.4)),hc:new O(new ce(111,195,223))},p("keybindingLabelBorder","Keybinding label border color. The keybinding label is used to represent a keyboard shortcut.")),MR=I("keybindingLabel.bottomBorder",{dark:new O(new ce(68,68,68,.6)),light:new O(new ce(187,187,187,.4)),hc:new O(new ce(111,195,223))},p("keybindingLabelBottomBorder","Keybinding label border bottom color. The keybinding label is used to represent a keyboard shortcut.")),ca=I("editor.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hc:"#f3f518"},p("editorSelectionBackground","Color of the editor selection.")),RR=I("editor.selectionForeground",{light:null,dark:null,hc:"#000000"},p("editorSelectionForeground","Color of the selected text for high contrast.")),Fv=I("editor.inactiveSelectionBackground",{light:te(ca,.5),dark:te(ca,.5),hc:te(ca,.5)},p("editorInactiveSelection","Color of the selection in an inactive editor. The color must not be opaque so as not to hide underlying decorations."),!0),Q2=I("editor.selectionHighlightBackgroun
13d",{light:ib(ca,Gi,.3,.6),dark:ib(ca,Gi,.3,.6),hc:null},p("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),hU=I("editor.selectionHighlightBorder",{light:null,dark:null,hc:_i},p("editorSelectionHighlightBorder","Border color for regions with the same content as the selection.")),AR=I("editor.findMatchBackground",{light:"#A8AC94",dark:"#515C6A",hc:null},p("editorFindMatch","Color of the current search match.")),Ys=I("editor.findMatchHighlightBackground",{light:"#EA5C0055",dark:"#EA5C0055",hc:null},p("findMatchHighlight","Color of the other search matches. The color must not be opaque so as not to hide underlying decorations."),!0),OR=I("editor.findRangeHighlightBackground",{dark:"#3a3d4166",light:"#b4b4b44d",hc:null},p("findRangeHighlight","Color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),PR=I("editor.findMatchBorder",{light:null,dark:null,hc:_i},p("editorFindMatchBorder","Border color of the current search match.")),da=I("editor.findMatchHighlightBorder",{light:null,dark:null,hc:_i},p("findMatchHighlightBorder","Border color of the other search matches.")),FR=I("editor.findRangeHighlightBorder",{dark:null,light:null,hc:te(_i,.4)},p("findRangeHighlightBorder","Border color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),cU=I("searchEditor.findMatchBackground",{light:te(Ys,.66),dark:te(Ys,.66),hc:Ys},p("searchEditor.queryMatch","Color of the Search Editor query matches.")),dU=I("searchEditor.findMatchBorder",{light:te(da,.66),dark:te(da,.66),hc:da},p("searchEditor.editorFindMatchBorder","Border color of the Search Editor query matches.")),uU=I("editor.hoverHighlightBackgroun
13d",{light:"#ADD6FF26",dark:"#264f7840",hc:"#ADD6FF26"},p("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),ZC=I("editorHoverWidget.background",{light:Zi,dark:Zi,hc:Zi},p("hoverBackground","Background color of the editor hover.")),fU=I("editorHoverWidget.foreground",{light:Zs,dark:Zs,hc:Zs},p("hoverForeground","Foreground color of the editor hover.")),gU=I("editorHoverWidget.border",{light:od,dark:od,hc:od},p("hoverBorder","Border color of the editor hover.")),mU=I("editorHoverWidget.statusBarBackground",{dark:nr(ZC,.2),light:Ka(ZC,.05),hc:Zi},p("statusBarBackground","Background color of the editor hover status bar.")),pU=I("editorLink.activeForeground",{dark:"#4E94CE",light:O.blue,hc:O.cyan},p("activeLinkForeground","Color of active links.")),ua=I("editorInlayHint.foreground",{dark:te(rd,.8),light:te(rd,.8),hc:rd},p("editorInlayHintForeground","Foreground color of inline hints")),fa=I("editorInlayHint.background",{dark:te(sd,.6),light:te(sd,.3),hc:sd}
13,p("editorInlayHintBackground","Background color of inline hints")),_U=I("editorInlayHint.typeForeground",{dark:ua,light:ua,hc:ua},p("editorInlayHintForegroundTypes","Foreground color of inline hints for types")),vU=I("editorInlayHint.typeBackground",{dark:fa,light:fa,hc:fa},p("editorInlayHintBackgroundTypes","Background color of inline hints for types")),CU=I("editorInlayHint.parameterForeground",{dark:ua,light:ua,hc:ua},p("editorInlayHintForegroundParameter","Foreground color of inline hints for parameters")),bU=I("editorInlayHint.parameterBackground",{dark:fa,light:fa,hc:fa},p("editorInlayHintBackgroundParameter","Background color of inline hints for parameters")),wU=I("editorLightBulb.foreground",{dark:"#FFCC00",light:"#DDB100",hc:"#FFCC00"},p("editorLightBulbForeground","The color used for the lightbulb actions icon.")),SU=I("editorLightBulbAutoFix.foreground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},p("editorLightBulbAutoFixForeground","The color used for the lightbulb auto fix actions icon.")),Op=new O(new ce(155,185,85,.2)),Pp=new O(new ce(255,0,0,.2)),J2=I("diffEditor.insertedTextBackground",{dark:Op,light:Op,hc:null},p("diffEditorInserted","Background color for text that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),ek=I("diffEditor.removedTextBackground",{dark:Pp,light:Pp,hc:null},p("diffEditorRemoved","Background color for text that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),BR=I("diffEditor.insertedLineBackground",{dark:null,light:null,hc:null},p("diffEditorInsertedLines","Background color for lines that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),VR=I("diffEditor.removedLineBackground",{dark:null,light:null,hc:null},p("diffEditorRemovedLines","Background color for lines that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),WR=I("diffEditorGutter.insertedLineBackground",{dark:null,light:null,hc:null},p("diffEditorInsertedLineGutter","Background color for the margin where lines got inserted.")),HR=I("diffEditorGutter.removedLineBackground",{dark:null,light:null,hc:null},p("diffEditorRemovedLineGutter","Background color for the margin where lines got removed.")),zR=I("diffEditorOverview.insertedForeground",{dark:null,light:null,hc:null},p("diffEditorOverviewInserted","Diff overview ruler foreground for inserted content.")),UR=I("diffEditorOverview.removedForeground",{dark:null,light:null,hc:null},p("diffEditorOverviewRemoved","Diff overview ruler foreground for removed content.")),$R=I("diffEditor.insertedTextBorder",{dark:null,light:null,hc:"#33ff2eff"},p("diffEditorInsertedOutline","Outline color for the text that got inserted.")),KR=I("diffEditor.removedTextBorder",{dark:null,light:null,hc:"#FF008F"},p("diffEditorRemovedOutline","Outline color for text that got removed.")),jR=I("diffEditor.border",{dark:null,light:null,hc:Ye},p("diffEditorBorder","Border color between the two text editors.")),qR=I("diffEditor.diagonalFill",{dark:"#cccccc33",light:"#22222233",hc:null},p("diffDiagonalFill","Color of the diff editor's diagonal fill. The diagonal fill is used in side-by-side diff views.")),GR=I("list.focusB
13ackground",{dark:null,light:null,hc:null},p("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.")),ZR=I("list.focusForeground",{dark:null,light:null,hc:null},p("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.")),YR=I("list.focusOutline",{dark:Pn,light:Pn,hc:_i},p("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.")),Xs=I("list.activeSelectionBackground",{dark:"#094771",light:"#0060C0",hc:null},p("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.")),Qs=I("list.activeSelectionForeground",{dark:O.white,light:O.white,hc:null},p("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.")),ad=I("list.activeSelectionIconForeground",{dark:null,light:null,hc:null},p("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.")),XR=I("list.inactiveSelectionBackground",{dark:"#37373D",light:"#E4E6F1",hc:null},p("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.")),QR=I("list.inactiveSelectionForeground",{dark:null,light:null,hc:null},p("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.")),JR=I("list.inactiveSelectionIconForeground",{dark:null,light:null,hc:null},p("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.")),eA=I("list.inactiveFocusBackground",{dark:null,light:null,hc:null},p("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.")),tA=I("list.inactiveFocusOutline",{dark:null,light:null,hc:null},p("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.")),iA=I("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hc:null},p("listHoverBackground","List/Tree background when hovering over items using the mouse.")),nA=I("list.hoverForeground",{dark:null,light:null,hc:null},p("listHoverForeground","List/Tree foreground when hovering over items using the mouse.")),sA=I("list.dropBackground",{dark:"#062F4A",light:"#D6EBFF",hc:null},p("listDropBackground","List/Tree drag and drop background when moving items around using the mouse.")),Kf=I("list.highlightForeground",{dark:"#18A3FF",light:"#0066BF",hc:Pn},p("highlight","List/Tree foreground color of the match highlights when searching inside the list/tree.")),yU=I("list.focusHighlightForeground",{dark:Kf,light:DA(Xs,Kf,"#9DDDFF"),hc:Kf},p("listFocusHighlightForeground","List/Tree foreground color of the match highlights on actively focused items when searching inside the list/tree.")),LU=I("list.invalidItemForeground",{dark:"#B89500",light:"#B89500",hc:"#B89500"},p("invalidItemForeground","List/Tree foreground color for invalid items, for example an unresolved root in explorer.")),kU=I("list.errorForeground",{dark:"#F88070",light:"#B01011",hc:null},p("listErrorForeground","Foreground color of list items containing errors.")),xU=I("list.warningForeground",{dark:"#CCA700",light:"#855F00",hc:null},p("listWarningForeground","Foreground color of list items containing warnings.")),rA=I("listFilterWidget.background",{light:"#efc1ad",dark:"#653723",hc:O.black}
13,p("listFilterWidgetBackground","Background color of the type filter widget in lists and trees.")),oA=I("listFilterWidget.outline",{dark:O.transparent,light:O.transparent,hc:"#f38518"},p("listFilterWidgetOutline","Outline color of the type filter widget in lists and trees.")),aA=I("listFilterWidget.noMatchesOutline",{dark:"#BE1100",light:"#BE1100",hc:Ye},p("listFilterWidgetNoMatchesOutline","Outline color of the type filter widget in lists and trees, when there are no matches.")),IU=I("list.filterMatchBackground",{dark:Ys,light:Ys,hc:null},p("listFilterMatchHighlight","Background color of the filtered match.")),EU=I("list.filterMatchBorder",{dark:da,light:da,hc:Ye},p("listFilterMatchHighlightBorder","Border color of the filtered match.")),lA=I("tree.indentGuidesStroke",{dark:"#585858",light:"#a9a9a9",hc:"#a9a9a9"},p("treeIndentGuidesStroke","Tree stroke color for the indentation guides.")),hA=I("tree.tableColumnsBorder",{dark:"#CCCCCC20",light:"#61616120",hc:null},p("tableColumnsBorder","Table border color between columns.")),cA=I("tree.tableOddRowsBackground",{dark:te(Oe,.04),light:te(Oe,.04),hc:null},p("tableOddRowsBackgroundColor","Background color for odd table rows.")),DU=I("list.deemphasizedForeground",{dark:"#8C8C8C",light:"#8E8E90",hc:"#A7A8A9"},p("listDeemphasizedForeground","List/Tree foreground color for items that are deemphasized. ")),YC=I("quickInput.list.focusBackground",{dark:null,light:null,hc:null},"",void 0,p("quickInput.list.focusBackground deprecation","Please use quickInputList.focusBackground instead")),dA=I("quickInputList.focusForeground",{dark:Qs,light:Qs,hc:Qs},p("quickInput.listFocusForeground","Quick picker foreground color for the focused item.")),uA=I("quickInputList.focusIconForeground",{dark:ad,light:ad,hc:ad},p("quickInput.listFocusIconForeground","Quick picker icon foreground color for the focused item.")),fA=I("quickInputList.focusBackground",{dark:tb(YC,Xs),light:tb(YC,Xs),hc:null},p("quickInput.listFocusBackground","Quick picker background color for the focused item.")),gA=I("menu.border",{dark:null,light:null,hc:Ye},p("menuBorder","Border color of menus.")),mA=I("menu.foreground",{dark:Hl,light:Oe,hc:Hl},p("menuForeground","Foreground color of menu items.")),pA=I("menu.background",{dark:Kr,light:Kr,hc:Kr},p("menuBackground","Background color of menu items.")),_A=I("menu.selectionForeground",{dark:Qs,light:Qs,hc:Qs},p("menuSelectionForeground","Foreground color of the selected menu item in menus.")),vA=I("menu.selectionBackground",{dark:Xs,light:Xs,hc:Xs},p("menuSelectionBackground","Background color of the selected menu item in menus.")),CA=I("menu.selectionBorder",{dark:null,light:null,hc:_i},p("menuSelectionBorder","Border color of the selected menu item in menus.")),bA=I("menu.separatorBackground",{dark:"#BBBBBB",light:"#888888",hc:Ye},p("menuSeparatorBackground","Color of a separator menu item in menus.")),Fp=I("toolbar.hoverBackground",{dark:"#5a5d5e50",light:"#b8b8b850",hc:null},p("toolbarHoverBackground","Toolbar background when hovering over actions using the mouse")),NU=I("toolbar.hoverOutline",{dark:null,light:null,hc:_i},p("toolbarHoverOutline","Toolbar outline when hovering over actions using the mouse")),TU=I("toolbar.activeBackground",{dark:nr(Fp,.1),light:Ka(Fp,.1),hc:null},p("toolbarActiveBackground","Toolbar background when holding the mouse over actions")),MU=I("editor.snippetTabstopHighlightBackgroun
13d",{dark:new O(new ce(124,124,124,.3)),light:new O(new ce(10,50,100,.2)),hc:new O(new ce(124,124,124,.3))},p("snippetTabstopHighlightBackground","Highlight background color of a snippet tabstop.")),RU=I("editor.snippetTabstopHighlightBorder",{dark:null,light:null,hc:null},p("snippetTabstopHighlightBorder","Highlight border color of a snippet tabstop.")),AU=I("editor.snippetFinalTabstopHighlightBackground",{dark:null,light:null,hc:null},p("snippetFinalTabstopHighlightBackground","Highlight background color of the final tabstop of a snippet.")),OU=I("editor.snippetFinalTabstopHighlightBorder",{dark:"#525252",light:new O(new ce(10,50,100,.5)),hc:"#525252"},p("snippetFinalTabstopHighlightBorder","Highlight border color of the final tabstop of a snippet.")),PU=I("breadcrumb.foreground",{light:te(Oe,.8),dark:te(Oe,.8),hc:te(Oe,.8)},p("breadcrumbsFocusForeground","Color of focused breadcrumb items.")),FU=I("breadcrumb.background",{light:Gi,dark:Gi,hc:Gi},p("breadcrumbsBackground","Background color of breadcrumb items.")),BU=I("breadcrumb.focusForeground",{light:Ka(Oe,.2),dark:nr(Oe,.1),hc:nr(Oe,.1)},p("breadcrumbsFocusForeground","Color of focused breadcrumb items.")),VU=I("breadcrumb.activeSelectionForeground",{light:Ka(Oe,.2),dark:nr(Oe,.1),hc:nr(Oe,.1)},p("breadcrumbsSelectedForegound","Color of selected breadcrumb items.")),WU=I("breadcrumbPicker.background",{light:Zi,dark:Zi,hc:Zi},p("breadcrumbsSelectedBackground","Background color of breadcrumb item picker.")),tk=.5,XC=O.fromHex("#40C8AE").transparent(tk),QC=O.fromHex("#40A6FF").transparent(tk),JC=O.fromHex("#606060").transparent(.4),Cs=.4,Da=1,zl=I("merge.currentHeaderBackground",{dark:XC,light:XC,hc:null},p("mergeCurrentHeaderBackground","Current header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),HU=I("merge.currentContentBackground",{dark:te(zl,Cs),light:te(zl,Cs),hc:te(zl,Cs)},p("mergeCurrentContentBackground","Current content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),Ul=I("merge.incomingHeaderBackground",{dark:QC,light:QC,hc:null},p("mergeIncomingHeaderBackground","Incoming header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),zU=I("merge.incomingContentBackground",{dark:te(Ul,Cs),light:te(Ul,Cs),hc:te(Ul,Cs)},p("mergeIncomingContentBackground","Incoming content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),$l=I("merge.commonHeaderBackground",{dark:JC,light:JC,hc:null},p("mergeCommonHeaderBackground","Common ancestor header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),UU=I("merge.commonContentBackground",{dark:te($l,Cs),light:te($l,Cs),hc:te($l,Cs)},p("mergeCommonContentBackground","Common ancestor content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),Bv=I("merge.border",{dark:null,light:null,hc:"#C3DF6F"},p("mergeBorder","Border color on headers and the splitter in inline merge-conflicts.")),$U=I("editorOverviewRuler.currentContentForeground",{dark:te(zl,Da),light:te(zl,Da),hc:Bv},p("overviewRulerCurrentContentForeground","Current overview ruler foreground for inline merge-conflicts.")),KU=I("editorOverviewRuler.incomingContentForeground",{dark:te(Ul,Da),light:te(Ul,Da),hc:Bv},p("overviewRulerIncomingContentForeground","Incoming overview ruler foreground for inline merge-conflicts.")),jU=I("editorOverviewRuler.commonContentForeground",{dark:te($l,Da),light:te($l,Da),hc:Bv},p("overviewRulerCommonContentForeground","Common ancestor overview ruler foreground for inline merge-conflicts.")),Vv=I("editorOverviewRuler.findMatchForeground",{dark:"#d186167e",light:"#d186167e",hc:"#AB5A00"},p("overviewRulerFindMatchForeground","Overview ruler marker color for find matches. The color must not be opaque so as not to hide underlying decorations."),!0),qU=I("editorOverviewRuler.selectionHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hc:"#A0A0A0CC"},p("overviewRulerSelectionHighlightForeground","Overview ruler marker color for selection highlights. The color must not be opaque so as not to hide underlying decorations."),!0),Kl=I("minimap.findMatchHighlight",{light:"#d18616",dark:"#d18616",hc:"#AB5A00"},p("minimapFindMatchHighlight","Minimap marker color for find matches."),!0),GU=I("minimap.selectionO
13ccurrenceHighlight",{light:"#c9c9c9",dark:"#676767",hc:"#ffffff"},p("minimapSelectionOccurrenceHighlight","Minimap marker color for repeating editor selections."),!0),eb=I("minimap.selectionHighlight",{light:"#ADD6FF",dark:"#264F78",hc:"#ffffff"},p("minimapSelectionHighlight","Minimap marker color for the editor selection."),!0),wA=I("minimap.errorHighlight",{dark:new O(new ce(255,18,18,.7)),light:new O(new ce(255,18,18,.7)),hc:new O(new ce(255,50,50,1))},p("minimapError","Minimap marker color for errors.")),SA=I("minimap.warningHighlight",{dark:pn,light:pn,hc:Pv},p("overviewRuleWarning","Minimap marker color for warnings.")),yA=I("minimap.background",{dark:null,light:null,hc:null},p("minimapBackground","Minimap background color.")),LA=I("minimap.foregroundOpacity",{dark:O.fromHex("#000f"),light:O.fromHex("#000f"),hc:O.fromHex("#000f")},p("minimapForegroundOpacity",'Opacity of foreground elements rendered in the minimap. For example, "#000000c0" will render the elements with 75% opacity.')),kA=I("minimapSlider.background",{light:te(aa,.5),dark:te(aa,.5),hc:te(aa,.5)},p("minimapSliderBackground","Minimap slider background color.")),xA=I("minimapSlider.hoverBackground",{light:te(la,.5),dark:te(la,.5),hc:te(la,.5)},p("minimapSliderHoverBackground","Minimap slider background color when hovering.")),IA=I("minimapSlider.activeBackground",{light:te(ha,.5),dark:te(ha,.5),hc:te(ha,.5)},p("minimapSliderActiveBackground","Minimap slider background color when clicked on.")),ZU=I("problemsErrorIcon.foreground",{dark:jr,light:jr,hc:jr},p("problemsErrorIconForeground","The color used for the problems error icon.")),YU=I("problemsWarningIcon.foreground",{dark:pn,light:pn,hc:pn},p("problemsWarningIconForeground","The color used for the problems warning icon.")),XU=I("problemsInfoIcon.foreground",{dark:vs,light:vs,hc:vs},p("problemsInfoIconForeground","The color used for the problems info icon.")),QU=I("charts.foreground",{dark:Oe,light:Oe,hc:Oe},p("chartsForeground","The foreground color used in charts.")),JU=I("charts.lines",{dark:te(Oe,.5),light:te(Oe,.5),hc:te(Oe,.5)},p("chartsLines","The color used for horizontal lines in charts.")),e$=I("charts.red",{dark:jr,light:jr,hc:jr},p("chartsRed","The red color used in chart visualizations.")),t$=I("charts.blue",{dark:vs,light:vs,hc:vs},p("chartsBlue","The blue color used in chart visualizations.")),i$=I("charts.yellow",{dark:pn,light:pn,hc:pn},p("chartsYellow","The yellow color used in chart visualizations.")),n$=I("charts.orange",{dark:Kl,light:Kl,hc:Kl},p("chartsOrange","The orange color used in chart visualizations.")),s$=I("charts.green",{dark:"#89D185",light:"#388A34",hc:"#89D185"},p("chartsGreen","The green color used in chart visualizations.")),r$=I("charts.purple",{dark:"#B180D7",light:"#652D90",hc:"#B180D7"},p("chartsPurple","The purple color used in chart visualizations."));function EA(t,e){var i,n,s;switch(t.op){case 0:return(i=ss(t.value,e))===null||i===void 0?void 0:i.darken(t.factor);case 1:return(n=ss(t.value,e))===null||n===void 0?void 0:n.lighten(t.factor);case 2:return(s=ss(t.value,e))===null||s===void 0?void 0:s.transparent(t.factor);case 3:for(const r of t.values){const o=ss(r,e);if(o)return o}return;case 5:return ss(e.defines(t.if)?t.then:t.else,e);case 4:{const r=ss(t.value,e);if(!r)return;const o=ss(t.background,e);return o?r.isDarkerThan(o)?O.getLighterColor(r,o,t.factor).transparent(t.transparency):O.getDarkerColor(r,o,t.factor).transparent(t.transparency):r.transparent(t.factor*t.transparency)}default:throw X1(t)}}function Ka(t,e){return{op:0,value:t,factor:e}}function nr(t,e){return{op:1,value:t,factor:e}}function te(t,e){return{op:2,value:t,factor:e}}function tb(...t){return{op:3,values:t}}function DA(t,e,i){return{op:5,if:t,then:e,else:i}}function ib(t,e,i,n){return{op:4,value:t,background:e,factor:i,transparency:n}}function ss(t,e){if(t!==null){if(typeof t=="string")return t[0]==="#"?O.fromHex(t):e.getColor(t);if(t instanceof O)return t;if(typeof t=="object")return EA(t,e)}}var ik="vscode://schemas/workbench-colors",nk=vt.as(ef.JSONContribution);nk.registerSchema(ik,tf.getColorSchema());var nb=new _t(()=>nk.notifySchemaChanged(ik),200);tf.onDidChangeSchema(()=>{nb.isScheduled()||nb.schedule()});var Wv=class{constructor(t,e){this.x=t,this.y=e,this._pageCoordinatesBrand=void 0}toClientCoordinates(){return new sk(this.x-ps.scrollX,this.y-ps.scrollY)}},sk=class{constructor(t,e){this.clientX=t,this.clientY=e,this._clientCoordinatesBrand=void 0}toPageCoordinates(){return new Wv(this.clientX+ps.scrollX,this.clientY+ps.scrollY)}},NA=class{constructor(t,e,i,n){this.x=t,this.y=e,this.width=i,this.height=n,this._editorPagePositionBrand=void 0}},TA=class{constructor(t,e){this.x=t,this.y=e,this._positionRelativeToEditorBrand=void 0}};function rk(t){const e=qi(t);return new NA(e.left,e.top,e.width,e.height)}
13function ok(t,e,i){const n=e.width/t.offsetWidth,s=e.height/t.offsetHeight,r=(i.x-e.x)/n,o=(i.y-e.y)/s;return new TA(r,o)}var no=class extends ji{constructor(t,e){super(t),this._editorMouseEventBrand=void 0,this.pos=new Wv(this.posx,this.posy),this.editorPos=rk(e),this.relativePos=ok(e,this.editorPos,this.pos)}},MA=class{constructor(t){this._editorViewDomNode=t}_create(t){return new no(t,this._editorViewDomNode)}onContextMenu(t,e){return B(t,"contextmenu",i=>{e(this._create(i))})}onMouseUp(t,e){return B(t,"mouseup",i=>{e(this._create(i))})}onMouseDown(t,e){return B(t,"mousedown",i=>{e(this._create(i))})}onMouseLeave(t,e){return Dv(t,i=>{e(this._create(i))})}onMouseMoveThrottled(t,e,i,n){return Nv(t,"mousemove",e,(r,o)=>i(r,this._create(o)),n)}},RA=class{constructor(t){this._editorViewDomNode=t}_create(t){return new no(t,this._editorViewDomNode)}onPointerUp(t,e){return B(t,"pointerup",i=>{e(this._create(i))})}onPointerDown(t,e){return B(t,"pointerdown",i=>{e(this._create(i))})}onPointerLeave(t,e){return _M(t,i=>{e(this._create(i))})}onPointerMoveThrottled(t,e,i,n){return Nv(t,"pointermove",e,(r,o)=>i(r,this._create(o)),n)}},AA=class extends V{constructor(t){super(),this._editorViewDomNode=t,this._globalMouseMoveMonitor=this._register(new Ju),this._key
13downListener=null}startMonitoring(t,e,i,n,s){this._keydownListener=gi(document,"keydown",o=>{o.toKeybinding().isModifierKey()||this._globalMouseMoveMonitor.stopMonitoring(!0,o.browserEvent)},!0);const r=(o,a)=>i(o,new no(a,this._editorViewDomNode));this._globalMouseMoveMonitor.startMonitoring(t,e,r,n,o=>{this._keydownListener.dispose(),s(o)})}stopMonitoring(){this._globalMouseMoveMonitor.stopMonitoring(!0)}},OA=class ak{constructor(e){this._editor=e,this._instanceId=++ak._idPool,this._counter=0,this._rules=new Map,this._garbageCollectionScheduler=new _t(()=>this.garbageCollect(),1e3)}createClassNameRef(e){const i=this.getOrCreateRule(e);return i.increaseRefCount(),{className:i.className,dispose:()=>{i.decreaseRefCount(),this._garbageCollectionScheduler.schedule()}}}getOrCreateRule(e){const i=this.computeUniqueKey(e);let n=this._rules.get(i);if(!n){const s=this._counter++;n=new PA(i,`dyn-rule-${this._instanceId}-${s}`,Xd(this._editor.getContainerDomNode())?this._editor.getContainerDomNode():void 0,e),this._rules.set(i,n)}return n}computeUniqueKey(e){return JSON.stringify(e)}garbageCollect(){for(const e of this._rules.values())e.hasReferences()||(this._rules.delete(e.key),e.dispose())}};OA._idPool=0;var PA=class{constructor(t,e,i,n){this.key=t,this.className=e,this.properties=n,this._referenceCount=0,this._styleElement=Yi(i),this._styleElement.textContent=this.getCssText(this.className,this.properties)}getCssText(t,e){let i=`.${t} {`;for(const n in e){const s=e[n];let r;typeof s=="object"?r=`var(${F2(s.id)})`:r=s;const o=FA(n);i+=`
14	${o}: ${r};`}return i+=`
15}`,i}dispose(){this._styleElement.remove()}increaseRefCount(){this._referenceCount++}decreaseRefCount(){this._referenceCount--}hasReferences(){return this._referenceCount>0}};function FA(t){return t.replace(/(^[A-Z])/,([e])=>e.toLowerCase()).replace(/([A-Z])/g,([e])=>`-${e.toLowerCase()}`)}var Vh=class extends V{constructor(){super(),this._shouldRender=!0}shouldRender(){return this._shouldRender}forceShouldRender(){this._shouldRender=!0}setShouldRender(){this._shouldRender=!0}onDidRender(){this._shouldRender=!1}onCompositionStart(t){return!1}onCompositionEnd(t){return!1}onConfigurationChanged(t){return!1}onCursorStateChanged(t){return!1}onDecorationsChanged(t){return!1}onFlushed(t){return!1}onFocusChanged(t){return!1}onLanguageConfigurationChanged(t){return!1}onLineMappingChanged(t){return!1}onLinesChanged(t){return!1}onLinesDeleted(t){return!1}onLinesInserted(t){return!1}onRevealRangeRequest(t){return!1}onScrollChanged(t){return!1}onThemeChanged(t){return!1}onTokensChanged(t){return!1}onTokensColorsChanged(t){return!1}onZonesChanged(t){return!1}handleEvents(t){let e=!1;for(let i=0,n=t.length;i<n;i++){const s=t[i];switch(s.type){case 0:this.onCompositionStart(s)&&(e=!0);break;case 1:this.onCompositionEnd(s)&&(e=!0);break;case 2:this.onConfigurationChanged(s)&&(e=!0);break;case 3:this.onCursorStateChanged(s)&&(e=!0);break;case 4:this.onDecorationsChanged(s)&&(e=!0);break;case 5:this.onFlushed(s)&&(e=!0);break;case 6:this.onFocusChanged(s)&&(e=!0);break;case 7:this.onLanguageConfigurationChanged(s)&&(e=!0);break;case 8:this.onLineMappingChanged(s)&&(e=!0);break;case 9:this.onLinesChanged(s)&&(e=!0);break;case 10:this.onLinesDeleted(s)&&(e=!0);break;case 11:this.onLinesInserted(s)&&(e=!0);break;case 12:this.onRevealRangeRequest(s)&&(e=!0);break;case 13:this.onScrollChanged(s)&&(e=!0);break;case 15:this.onTokensChanged(s)&&(e=!0);break;case 14:this.onThemeChanged(s)&&(e=!0);break;case 16:this.onTokensColorsChanged(s)&&(e=!0);break;case 17:this.onZonesChanged(s)&&(e=!0);break;default:}}e&&(this._shouldRender=!0)}},Mi=class extends Vh{constructor(t){super(),this._context=t,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}},Hn=class{static write(t,e){t.setAttribute("data-mprt",String(e))}static read(t){const e=t.getAttribute("data-mprt");return e===null?0:parseInt(e,10)}static collect(t,e){const i=[];let n=0;for(;t&&t!==document.body&&t!==e;)t.nodeType===t.ELEMENT_NODE&&(i[n++]=this.read(t)),t=t.parentElement;const s=new Uint8Array(n);for(let r=0;r<n;r++)s[r]=i[n-r-1];return s}},BA=class{constructor(t,e){this._restrictedRenderingContextBrand=void 0,this._viewLayout=t,this.viewportData=e,this.scrollWidth=this._viewLayout.getScrollWidth(),this.scrollHeight=this._viewLayout.getScrollHeight(),this.visibleRange=this.viewportData.visibleRange,this.bigNumbersDelta=this.viewportData.bigNumbersDelta;const i=this._viewLayout.getCurrentViewport();this.scrollTop=i.top,this.scrollLeft=i.left,this.viewportWidth=i.width,this.viewportHe
15ight=i.height}getScrolledTopFromAbsoluteTop(t){return t-this.scrollTop}getVerticalOffsetForLineNumber(t){return this._viewLayout.getVerticalOffsetForLineNumber(t)}getDecorationsInViewport(){return this.viewportData.getDecorationsInViewport()}},VA=class extends BA{constructor(t,e,i){super(t,e),this._renderingContextBrand=void 0,this._viewLines=i}linesVisibleRangesForRange(t,e){return this._viewLines.linesVisibleRangesForRange(t,e)}visibleRangeForPosition(t){return this._viewLines.visibleRangeForPosition(t)}},WA=class{constructor(t,e,i){this.outsideRenderedLine=t,this.lineNumber=e,this.ranges=i}},lk=class hk{constructor(e,i){this._horizontalRangeBrand=void 0,this.left=Math.round(e),this.width=Math.round(i)}static from(e){const i=new Array(e.length);for(let n=0,s=e.length;n<s;n++){const r=e[n];i[n]=new hk(r.left,r.width)}return i}toString(){return`[${this.left},${this.width}]`}},ga=class{constructor(t,e){this._floatHorizontalRangeBrand=void 0,this.left=t,this.width=e}toString(){return`[${this.left},${this.width}]`}static compare(t,e){return t.left-e.left}},HA=class{constructor(t,e){this.outsideRenderedLine=t,this.originalLeft=e,this.left=Math.round(this.originalLeft)}},zA=class{constructor(t,e){this.outsideRenderedLine=t,this.ranges=e}},jf=class{static _createRange(){return this._handyReadyRange||(this._handyReadyRange=document.createRange()),this._handyReadyRange}static _detachRange(t,e){t.selectNodeContents(e)}static _readClientRects(t,e,i,n,s){const r=this._createRange();try{return r.setStart(t,e),r.setEnd(i,n),r.getClientRects()}catch{return null}finally{this._detachRange(r,s)}}static _mergeAdjacentRanges(t){if(t.length===1)return t;t.sort(ga.compare);const e=[];let i=0,n=t[0];for(let s=1,r=t.length;s<r;s++){const o=t[s];n.left+n.width+.9>=o.left?n.width=Math.max(n.width,o.left+o.width-n.left):(e[i++]=n,n=o)}return e[i++]=n,e}static _createHorizontalRangesFromClientRects(t,e,i){if(!t||t.length===0)return null;const n=[];for(let s=0,r=t.length;s<r;s++){const o=t[s];n[s]=new ga(Math.max(0,(o.left-e)/i),o.width/i)}return this._mergeAdjacentRanges(n)}static readHorizontalRanges(t,e,i,n,s,r,o,a){const h=t.children.length-1;if(0>h)return null;if(e=Math.min(h,Math.max(0,e)),n=Math.min(h,Math.max(0,n)),e===n&&i===s&&i===0&&!t.children[e].firstChild){const g=t.children[e].getClientRects();return this._createHorizontalRangesFromClientRects(g,r,o)}e!==n&&n>0&&s===0&&(n--,s=1073741824);let c=t.children[e].firstChild,d=t.children[n].firstChild;if((!c||!d)&&(!c&&i===0&&e>0&&(c=t.children[e-1].firstChild,i=1073741824),!d&&s===0&&n>0&&(d=t.children[n-1].firstChild,s=1073741824)),!c||!d)return null;i=Math.min(c.textContent.length,Math.max(0,i)),s=Math.min(d.textContent.length,Math.max(0,s));const u=this._readClientRects(c,i,d,s,a);return this._createHorizontalRangesFromClientRects(u,r,o)}},UA=(function(){return ia?!0:!(Bt||Ii||Wn)})(),ma=!0,sb=class{constructor(t,e){this._domNode=t,this._clientRectDeltaLeft=0,this._clientRectScale=1,this._clientRectRead=!1,this.endNode=e}readClientRect(){if(!this._clientRectRead){this._clientRectRead=!0;const t=this._domNode.getBoundingClientRect();this._clientRectDeltaLeft=t.left,this._clientRectScale=t.width/this._domNode.offsetWidth}}get clientRectDeltaLeft(){return this._clientRectRead||this.readClientRect(),this._clientRectDeltaLeft}get clientRectScale(){return this._clientRectRead||this.readClientRect(),this._clientRectScale}},rb=class{constructor(t,e){this.themeType=e;const i=t.options,n=i.get(44);this.renderWhitespace=i.get(88),this.renderControlCharacters=i.get(83),this.spaceWidth=n.spaceWidth,this.middotWidth=n.middotWidth,this.wsmiddotWidth=n.wsmiddotWidth,this.useMonospaceOptimizations=n.isMonospace&&!i.get(29),this.canUseHalfwidthRightwardsArrow=n.canUseHalfwidthRightwardsArrow,this.lineHeight=i.get(59),this.stopRenderingLineAfter=i.get(105),this.fontLigatures=i.get(45)}equals(t){return this.themeType===t.themeType&&this.renderWhitespace===t.renderWhitespace&&this.renderControlCharacters===t.renderControlCharacters&&this.spaceWidth===t.spaceWidth&&this.middotWidth===t.middotWidth&&this.wsmiddotWidth===t.wsmi
15ddotWidth&&this.useMonospaceOptimizations===t.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===t.canUseHalfwidthRightwardsArrow&&this.lineHeight===t.lineHeight&&this.stopRenderingLineAfter===t.stopRenderingLineAfter&&this.fontLigatures===t.fontLigatures}},Vs=class ck{constructor(e){this._options=e,this._isMaybeInvalid=!0,this._renderedViewLine=null}getDomNode(){return this._renderedViewLine&&this._renderedViewLine.domNode?this._renderedViewLine.domNode.domNode:null}setDomNode(e){if(this._renderedViewLine)this._renderedViewLine.domNode=de(e);else throw new Error("I have no rendered view line to set the dom node to...")}onContentChanged(){this._isMaybeInvalid=!0}onTokensChanged(){this._isMaybeInvalid=!0}onDecorationsChanged(){this._isMaybeInvalid=!0}onOptionsChanged(e){this._isMaybeInvalid=!0,this._options=e}onSelectionChanged(){return this._options.themeType===On.HIGH_CONTRAST||this._options.renderWhitespace==="selection"?(this._isMaybeInvalid=!0,!0):!1}renderLine(e,i,n,s){if(this._isMaybeInvalid===!1)return!1;this._isMaybeInvalid=!1;const r=n.getViewLineRenderingData(e),o=this._options,a=to.filter(r.inlineDecorations,e,r.minColumn,r.maxColumn);let l=null;if(o.themeType===On.HIGH_CONTRAST||this._options.renderWhitespace==="selection"){const u=n.selections;for(const g of u){if(g.endLineNumber<e||g.startLineNumber>e)continue;const m=g.startLineNumber===e?g.startColumn:r.minColumn,_=g.endLineNumber===e?g.endColumn:r.maxColumn;m<_&&(o.themeType===On.HIGH_CONTRAST||this._options.renderWhitespace!=="selection"?a.push(new to(m,_,"inline-selected-text",0)):(l||(l=[]),l.push(new F5(m-1,_-1))))}}const h=new za(o.useMonospaceOptimizations,o.canUseHalfwidthRightwardsArrow,r.content,r.continuesWithWrappedLine,r.isBasicASCII,r.containsRTL,r.minColumn-1,r.tokens,a,r.tabSize,r.startVisibleColumn,o.spaceWidth,o.middotWidth,o.wsmiddotWidth,o.stopRenderingLineAfter,o.renderWhitespace,o.renderControlCharacters,o.fontLigatures!==ho.OFF,l);if(this._renderedViewLine&&this._renderedViewLine.input.equals(h))return!1;
15s.appendASCIIString('<div style="top:'),s.appendASCIIString(String(i)),s.appendASCIIString("px;height:"),s.appendASCIIString(String(this._options.lineHeight)),s.appendASCIIString('px;" class="'),s.appendASCIIString(ck.CLASS_NAME),s.appendASCIIString('">');const c=Lv(h,s);s.appendASCIIString("</div>");let d=null;return ma&&UA&&r.isBasicASCII&&o.useMonospaceOptimizations&&c.containsForeignElements===0&&r.content.length<300&&h.lineTokens.getCount()<100&&(d=new nc(this._renderedViewLine?this._renderedViewLine.domNode:null,h,c.characterMapping)),d||(d=uk(this._renderedViewLine?this._renderedViewLine.domNode:null,h,c.characterMapping,c.containsRTL,c.containsForeignElements)),this._renderedViewLine=d,!0}layoutLine(e,i){this._renderedViewLine&&this._renderedViewLine.domNode&&(this._renderedViewLine.domNode.setTop(i),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 nc:!1}monospaceAssumptionsAreValid(){return this._renderedViewLine&&this._renderedViewLine instanceof nc?this._renderedViewLine.monospaceAssumptionsAreValid():ma}onMonospaceAssumptionsInvalidated(){this._renderedViewLine&&this._renderedViewLine instanceof nc&&(this._renderedViewLine=this._renderedViewLine.toSlowRenderedLine())}getVisibleRangesForRange(e,i,n,s){if(!this._renderedViewLine)return null;i=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,i)),n=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,n));const r=this._renderedViewLine.input.stopRenderingLineAfter;let o=!1;r!==-1&&i>r+1&&n>r+1&&(o=!0),r!==-1&&i>r+1&&(i=r+1),r!==-1&&n>r+1&&(n=r+1);const a=this._renderedViewLine.getVisibleRangesForRange(e,i,n,s);return a&&a.length>0?new zA(o,a):null}getColumnOfNodeOffset(e,i,n){return this._renderedViewLine?this._renderedViewLine.getColumnOfNodeOffset(e,i,n):1}};Vs.CLASS_NAME="view-line";var nc=class{constructor(t,e,i){this.domNode=t,this.input=e,this._characterMapping=i,this._charWidth=e.spaceWidth}getWidth(){return Math.round(this._getCharPosition(this._characterMapping.length))}getWidthIsFast(){return!0}monospaceAssumptionsAreValid(){if(!this.domNode)return ma;const t=this.getWidth(),e=this.domNode.domNode.firstChild.offsetWidth;return Math.abs(t-e)>=2&&(ma=!1),ma}toSlowRenderedLine(){return uk(this.domNode,this.input,this._characterMapping,!1,0)}getVisibleRangesForRange(t,e,i,n){const s=this._getCharPosition(e),r=this._getCharPosition(i);return[new ga(s,r-s)]}_getCharPosition(t){const e=this._characterMapping.getAbsoluteOffset(t);return this._charWidth*e}getColumnOfNodeOffset(t,e,i){const n=e.textContent.length;let s=-1;for(;e;)e=e.previousSibling,s++;return this._characterMapping.getColumn(new yv(s,i),n)}},dk=class{constructor(t,e,i,n,s){if(this.domNode=t,this.input=e,this._characterMapping=i,this._isWhitespaceOnly=/^\s*$/.test(e.lineContent),this._containsForeignElements=s,this._cachedWidth=-1,this._pixelOffsetCache=null,!n||this._characterMapping.length===0){this._pixelOffsetCache=new Float32Array(Math.max(2,this._characterMapping.length+1));for(let r=0,o=this._characterMapping.length;r<=o;r++)this._pixelOffsetCache[r]=-1}}_getReadingTarget(t){return t.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(t,e,i,n){if(!this.domNode)return null;if(this._pixelOffsetCache!==null){const s=this._readPixelOffset(this.domNode,t,e,n);if(s===-1)return null;const r=this._readPixelOffset(this.domNode,t,i,n);return r===-1?null:[new ga(s,r-s)]}return this._readVisibleRangesForRange(this.domNode,t,e,i,n)}_readVisibleRangesForRange(t,e,i,n,s){if(i===n){const r=this._readPixelOffset(t,e,i,s);return r===-1?null:[new ga(r,0)]}else return this._readRawVisibleRangesForRange(t,i,n,s)}
15_readPixelOffset(t,e,i,n){if(this._characterMapping.length===0){if(this._containsForeignElements===0||this._containsForeignElements===2)return 0;if(this._containsForeignElements===1)return this.getWidth();const s=this._getReadingTarget(t);return s.firstChild?s.firstChild.offsetWidth:0}if(this._pixelOffsetCache!==null){const s=this._pixelOffsetCache[i];if(s!==-1)return s;const r=this._actualReadPixelOffset(t,e,i,n);return this._pixelOffsetCache[i]=r,r}return this._actualReadPixelOffset(t,e,i,n)}_actualReadPixelOffset(t,e,i,n){if(this._characterMapping.length===0){const a=jf.readHorizontalRanges(this._getReadingTarget(t),0,0,0,0,n.clientRectDeltaLeft,n.clientRectScale,n.endNode);return!a||a.length===0?-1:a[0].left}if(i===this._characterMapping.length&&this._isWhitespaceOnly&&this._containsForeignElements===0)return this.getWidth();const s=this._characterMapping.getDomPosition(i),r=jf.readHorizontalRanges(this._getReadingTarget(t),s.partIndex,s.charIndex,s.partIndex,s.charIndex,n.clientRectDeltaLeft,n.clientRectScale,n.endNode);if(!r||r.length===0)return-1;const o=r[0].left;if(this.input.isBasicASCII){const a=this._characterMapping.getAbsoluteOffset(i),l=Math.round(this.input.spaceWidth*a);if(Math.abs(l-o)<=1)return l}return o}_readRawVisibleRangesForRange(t,e,i,n){if(e===1&&i===this._characterMapping.length)return[new ga(0,this.getWidth())];const s=this._characterMapping.getDomPosition(e),r=this._characterMapping.getDomPosition(i);return jf.readHorizontalRanges(this._getReadingTarget(t),s.partIndex,s.charIndex,r.partIndex,r.charIndex,n.clientRectDeltaLeft,n.clientRectScale,n.endNode)}getColumnOfNodeOffset(t,e,i){const n=e.textContent.length;let s=-1;for(;e;)e=e.previousSibling,s++;return this._characterMapping.getColumn(new yv(s,i),n)}},$A=class extends dk{_readVisibleRangesForRange(t,e,i,n,s){const r=super._readVisibleRangesForRange(t,e,i,n,s);if(!r||r.length===0||i===n||i===1&&n===this._characterMapping.length)return r;if(!this.input.containsRTL){const o=this._readPixelOffset(t,e,n,s);if(o!==-1){const a=r[r.length-1];a.left<o&&(a.width=o-a.left)}}return r}},uk=(function(){return js?KA:jA})();function KA(t,e,i,n,s){return new $A(t,e,i,n,s)}function jA(t,e,i,n,s){return new dk(t,e,i,n,s)}var ut=class fk{static _nextVisibleColumn(e,i,n){return e===9?fk.nextRenderTabStop(i,n):ir(e)||cv(e)?i+2:i+1}static visibleColumnFromColumn(e,i,n){const s=Math.min(i-1,e.length),r=e.substring(0,s),o=new Ud(r);let a=0;for(;!o.eol();){const l=zd(r,s,o.offset);o.nextGraphemeLength(),a=this._nextVisibleColumn(l,a,n)}return a}static columnFromVisibleColumn(e,i,n){if(i<=0)return 1;const s=e.length,r=new Ud(e);let o=0,a=1;for(;!r.eol();){const l=zd(e,s,r.offset);r.nextGraphemeLength();const h=this._nextVisibleColumn(l,o,n),c=r.offset+1;if(h>=i){const d=i-o;return h-i<d?c:a}o=h,a=c}return s+1}static nextRenderTabStop(e,i){return e+i-e%i}static nextIndentTabStop(e,i){return e+i-e%i}static prevRenderTabStop(e,i){return Math.max(0,e-1-(e-1)%i)}static prevIndentTabStop(e,i){return Math.max(0,e-1-(e-1)%i)}},Bp=class gk{static whitespaceVisibleColumn(e,i,n){const s=e.length;let r=0,o=-1,a=-1;for(let l=0;l<s;l++){if(l===i)return[o,a,r];switch(r%n===0&&(o=l,a=r),e.charCodeAt(l)){case 32:r+=1;break;case 9:r=ut.nextRenderTabStop(r,n);break;default:return[-1,-1,-1]}}return i===s?[o,a,r]:[-1,-1,-1]}static atomicPosition(e,i,n,s){const r=e.length,[o,a,l]=gk.whitespaceVisibleColumn(e,i,n);if(l===-1)return-1;let h;switch(s){case 0:h=!0;break;case 1:h=!1;break;case 2:if(l%n===0)return i;h=l%n<=n/2}if(h){if(o===-1)return-1;let u=a;for(let g=o;g<r;++g){if(u===a+n)return o;switch(e.charCodeAt(g)){case 32:u+=1;break;case 9:u=ut.nextRenderTabStop(u,n);break;default:return-1}}return u===a+n?o:-1}const c=ut.nextRenderTabStop(l,n);let d=l;for(let u=i;u<r;u++){if(d===c)return u;switch(e.charCodeAt(u)){case 32:d+=1;break;case 9:d=ut.nextRenderTabStop(d,n);break;default:return-1}}return d===c?r:-1}},Ms=class{constructor(t=null){this.hitTarget=t,this.type=0}},Vp=class{constructor(t,e,i){this.position=t,this.spanNode=e,this.injectedText=i,this.type=1}},Ar;(function(t){function e(i,n,s){const r=i.getPositionFromDOMInfo(n,s);return r?new Vp(r,n,null):new Ms(n)}t.createFromDOMInfo=e})(Ar||(Ar={}));var qA=class{constructor(t,e){this.lastViewCursorsRenderData=t,this.lastTextareaPosition=e}},$t=class{static _deduceRage(t,e=null){return!e&&t?new T(t.lineNumber,t.column,t.lineNumber,t.column):e??null}static createUnknown(t,e,i){return{type:0,element:t,mouseColumn:e,position:i,range:this._deduceRage(i)}}static createTextarea(t,e){return{type:1,element:t,mouseColumn:e,position:null,range:null}}
15static createMargin(t,e,i,n,s,r){return{type:t,element:e,mouseColumn:i,position:n,range:s,detail:r}}static createViewZone(t,e,i,n,s){return{type:t,element:e,mouseColumn:i,position:n,range:this._deduceRage(n),detail:s}}static createContentText(t,e,i,n,s){return{type:6,element:t,mouseColumn:e,position:i,range:this._deduceRage(i,n),detail:s}}static createContentEmpty(t,e,i,n){return{type:7,element:t,mouseColumn:e,position:i,range:this._deduceRage(i),detail:n}}static createContentWidget(t,e,i){return{type:9,element:t,mouseColumn:e,position:null,range:null,detail:i}}static createScrollbar(t,e,i){return{type:11,element:t,mouseColumn:e,position:i,range:this._deduceRage(i)}}static createOverlayWidget(t,e,i){return{type:12,element:t,mouseColumn:e,position:null,range:null,detail:i}}static createOutsideEditor(t,e){return{type:13,element:null,mouseColumn:t,position:e,range:this._deduceRage(e)}}static _typeToString(t){return t===1?"TEXTAREA":t===2?"GUTTER_GLYPH_MARGIN":t===3?"GUTTER_LINE_NUMBERS":t===4?"GUTTER_LINE_DECORATIONS":t===5?"GUTTER_VIEW_ZONE":t===6?"CONTENT_TEXT":t===7?"CONTENT_EMPTY":t===8?"CONTENT_VIEW_ZONE":t===9?"CONTENT_WIDGET":t===10?"OVERVIEW_RULER":t===11?"SCROLLBAR":t===12?"OVERLAY_WIDGET":"UNKNOWN"}static toString(t){return this._typeToString(t.type)+": "+t.position+" - "+t.range+" - "+JSON.stringify(t.detail)}},Ai=class{static isTextArea(t){return t.length===2&&t[0]===3&&t[1]===6}static isChildOfViewLines(t){return t.length>=4&&t[0]===3&&t[3]===7}static isStrictChildOfViewLines(t){return t.length>4&&t[0]===3&&t[3]===7}static isChildOfScrollableElement(t){return t.length>=2&&t[0]===3&&t[1]===5}static isChildOfMinimap(t){return t.length>=2&&t[0]===3&&t[1]===8}static isChildOfContentWidgets(t){return t.length>=4&&t[0]===3&&t[3]===1}static isChildOfOverflowingContentWidgets(t){return t.length>=1&&t[0]===2}static isChildOfOverlayWidgets(t){return t.length>=2&&t[0]===3&&t[1]===4}},Wp=class Hp{constructor(e,i,n){this.viewModel=e.viewModel;const s=e.configuration.options;this.layoutInfo=s.get(131),this.viewDomNode=i.viewDomNode,this.lineHeight=s.get(59),this.stickyTabStops=s.get(104),this.typicalHalfwidthCharacterWidth=s.get(44).typicalHalfwidthCharacterWidth,this.lastRenderData=n,this._context=e,this._viewHelper=i}getZoneAtCoord(e){return Hp.getZoneAtCoord(this._context,e)}static getZoneAtCoord(e,i){const n=e.viewLayout.getWhitespaceAtVerticalOffset(i);if(n){const s=n.verticalOffset+n.height/2,r=e.viewModel.getLineCount();let o=null,a,l=null;return n.afterLineNumber!==r&&(l=new A(n.afterLineNumber+1,1)),n.afterLineNumber>0&&(o=new A(n.afterLineNumber,e.viewModel.getLineMaxColumn(n.afterLineNumber))),l===null?a=o:o===null?a=l:i<s?a=o:a=l,{viewZoneId:n.id,afterLineNumber:n.afterLineNumber,positionBefore:o,positionAfter:l,position:a}}return null}getFullLineRangeAtCoord(e){if(this._context.viewLayout.isAfterLines(e)){const s=this._context.viewModel.getLineCount(),r=this._context.viewModel.getLineMaxColumn(s);return{range:new T(s,r,s,r),isAfterLines:!0}}const i=this._context.viewLayout.getLineNumberAtVerticalOffset(e),n=this._context.viewModel.getLineMaxColumn(i);return{range:new T(i,1,i,n),isAfterLines:!1}}getLineNumberAtVerticalOffset(e){return this._context.viewLayout.getLineNumberAtVerticalOffset(e)}isAfterLines(e){return this._context.viewLayout.isAfterLines(e)}isInTopPadding(e){return this._context.viewLayout.isInTopPadding(e)}isInBottomPadding(e){return this._context.viewLayout.isInBottomPadding(e)}getVerticalOffsetForLineNumber(e){return this._context.viewLayout.getVerticalOffsetForLineNumber(e)}findAttribute(e,i){return Hp._findAttribute(e,i,this._viewHelper.viewDomNode)}static _findAttribute(e,i,n){for(;e&&e!==document.body;){if(e.hasAttribute&&e.hasAttribute(i))return e.getAttribute(i);if(e===n)return null;e=e.parentNode}return null}getLineWidth(e){return this._viewHelper.getLineWidth(e)}visibleRangeForPosition(e,i){return this._viewHelper.visibleRangeForPosition(e,i)}getPositionFromDOMInfo(e,i){return this._viewHelper.getPositionFromDOMInfo(e,i)}getCurrentScrollTop(){return this._context.viewLayout.getCurrentScrollTop()}getCurrentScrollLeft(){return this._context.viewLayout.getCurrentScrollLeft()}},GA=class{constructor(t,e,i,n){this.editorPos=e,this.pos=i,this.relativePos=n,this.mouseVerticalOffset=Math.max(0,t.getCurrentScrollTop()+this.relativePos.y),this.mouseContentHorizontalOffset=t.getCurrentScrollLeft()+this.relativePos.x-t.layoutInfo.contentLeft,this.isInMarginArea=this.relativePos.x<t.layoutInfo.contentLeft&&this.relativePos.x>=t.layoutInfo.glyphMarginLeft,this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,pk._getMouseColumn(this.mouseContentHorizontalOffset,t.typicalHalfwidthCharacterWidth))}},ZA=class mk extends GA{constructor(e,i,n,s,r){super(e,i,n,s),this._ctx=e,r?(this.target=r,this.targetPath=Hn.collect(r,e.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}
16	target: ${this.target?this.target.outerHTML:null}`}_getMouseColumn(e=null){return e&&e.column<this._ctx.viewModel.getLineMaxColumn(e.lineNumber)?ut.visibleColumnFromColumn(this._ctx.viewModel.getLineContent(e.lineNumber),e.column,this._ctx.viewModel.model.getOptions().tabSize)+1:this.mouseColumn}fulfillUnknown(e=null){return $t.createUnknown(this.target,this._getMouseColumn(e),e)}fulfillTextarea(){return $t.createTextarea(this.target,this._getMouseColumn())}fulfillMargin(e,i,n,s){return $t.createMargin(e,this.target,this._getMouseColumn(i),i,n,s)}fulfillViewZone(e,i,n){return $t.createViewZone(e,this.target,this._getMouseColumn(i),i,n)}fulfillContentText(e,i,n){return $t.createContentText(this.target,this._getMouseColumn(e),e,i,n)}fulfillContentEmpty(e,i){return $t.createContentEmpty(this.target,this._getMouseColumn(e),e,i)}fulfillContentWidget(e){return $t.createContentWidget(this.target,this._getMouseColumn(),e)}fulfillScrollbar(e){return $t.createScrollbar(this.target,this._getMouseColumn(e),e)}fulfillOverlayWidget(e){return $t.createOverlayWidget(this.target,this._getMouseColumn(),e)}withTarget(e){return new mk(this._ctx,this.editorPos,this.pos,this.relativePos,e)}},ob={isAfterLines:!0};function qf(t){return{isAfterLines:!1,horizontalDistanceToText:t}}var pk=class Mt{constructor(e,i){this._context=e,this._viewHelper=i}mouseTargetIsWidget(e){const i=e.target,n=Hn.collect(i,this._viewHelper.viewDomNode);return!!(Ai.isChildOfContentWidgets(n)||Ai.isChildOfOverflowingContentWidgets(n)||Ai.isChildOfOverlayWidgets(n))}createMouseTarget(e,i,n,s,r){const o=new Wp(this._context,this._viewHelper,e),a=new ZA(o,i,n,s,r);try{return Mt._createMouseTarget(o,a,!1)}catch{return a.fulfillUnknown()}}static _createMouseTarget(e,i,n){if(i.target===null){if(n)return i.fulfillUnknown();
16const o=Mt._doHitTest(e,i);return o.type===1?Mt.createMouseTargetFromHitTestPosition(e,i,o.spanNode,o.position,o.injectedText):this._createMouseTarget(e,i.withTarget(o.hitTarget),!0)}const s=i;let r=null;return r=r||Mt._hitTestContentWidget(e,s),r=r||Mt._hitTestOverlayWidget(e,s),r=r||Mt._hitTestMinimap(e,s),r=r||Mt._hitTestScrollbarSlider(e,s),r=r||Mt._hitTestViewZone(e,s),r=r||Mt._hitTestMargin(e,s),r=r||Mt._hitTestViewCursor(e,s),r=r||Mt._hitTestTextArea(e,s),r=r||Mt._hitTestViewLines(e,s,n),r=r||Mt._hitTestScrollbar(e,s),r||i.fulfillUnknown()}static _hitTestContentWidget(e,i){if(Ai.isChildOfContentWidgets(i.targetPath)||Ai.isChildOfOverflowingContentWidgets(i.targetPath)){const n=e.findAttribute(i.target,"widgetId");return n?i.fulfillContentWidget(n):i.fulfillUnknown()}return null}static _hitTestOverlayWidget(e,i){if(Ai.isChildOfOverlayWidgets(i.targetPath)){const n=e.findAttribute(i.target,"widgetId");return n?i.fulfillOverlayWidget(n):i.fulfillUnknown()}return null}static _hitTestViewCursor(e,i){if(i.target){const n=e.lastRenderData.lastViewCursorsRenderData;for(const s of n)if(i.target===s.domNode)return i.fulfillContentText(s.position,null,{mightBeForeignElement:!1,injectedText:null})}if(i.isInContentArea){const n=e.lastRenderData.lastViewCursorsRenderData,s=i.mouseContentHorizontalOffset,r=i.mouseVerticalOffset;for(const o of n){if(s<o.contentLeft||s>o.contentLeft+o.width)continue;const a=e.getVerticalOffsetForLineNumber(o.position.lineNumber);if(a<=r&&r<=a+o.height)return i.fulfillContentText(o.position,null,{mightBeForeignElement:!1,injectedText:null})}}return null}static _hitTestViewZone(e,i){const n=e.getZoneAtCoord(i.mouseVerticalOffset);if(n){const s=i.isInContentArea?8:5;return i.fulfillViewZone(s,n.position,n)}return null}static _hitTestTextArea(e,i){return Ai.isTextArea(i.targetPath)?e.lastRenderData.lastTextareaPosition?i.fulfillContentText(e.lastRenderData.lastTextareaPosition,null,{mightBeForeignElement:!1,injectedText:null}):i.fulfillTextarea():null}static _hitTestMargin(e,i){if(i.isInMarginArea){const n=e.getFullLineRangeAtCoord(i.mouseVerticalOffset),s=n.range.getStartPosition();let r=Math.abs(i.relativePos.x);const o={isAfterLines:n.isAfterLines,glyphMarginLeft:e.layoutInfo.glyphMarginLeft,glyphMarginWidth:e.layoutInfo.glyphMarginWidth,lineNumbersWidth:e.layoutInfo.lineNumbersWidth,offsetX:r};return r-=e.layoutInfo.glyphMarginLeft,r<=e.layoutInfo.glyphMarginWidth?i.fulfillMargin(2,s,n.range,o):(r-=e.layoutInfo.glyphMarginWidth,r<=e.layoutInfo.lineNumbersWidth?i.fulfillMargin(3,s,n.range,o):(r-=e.layoutInfo.lineNumbersWidth,i.fulfillMargin(4,s,n.range,o)))}return null}static _hitTestViewLines(e,i,n){if(!Ai.isChildOfViewLines(i.targetPath))return null;if(e.isInTopPadding(i.mouseVerticalOffset))return i.fulfillContentEmpty(new A(1,1),ob);if(e.isAfterLines(i.mouseVerticalOffset)||e.isInBottomPadding(i.mouseVerticalOffset)){const r=e.viewModel.getLineCount(),o=e.viewModel.getLineMaxColumn(r);return i.fulfillContentEmpty(new A(r,o),ob)}if(n){if(Ai.isStrictChildOfViewLines(i.targetPath)){const r=e.getLineNumberAtVerticalOffset(i.mouseVerticalOffset);if(e.viewModel.getLineLength(r)===0){const a=e.getLineWidth(r),l=qf(i.mouseContentHorizontalOffset-a);return i.fulfillContentEmpty(new A(r,1),l)}const o=e.getLineWidth(r);if(i.mouseContentHorizontalOffset>=o){const a=qf(i.mouseContentHorizontalOffset-o),l=new A(r,e.viewModel.getLineMaxColumn(r));return i.fulfillContentEmpty(l,a)}}return i.fulfillUnknown()}const s=Mt._doHitTest(e,i);return s.type===1?Mt.createMouseTargetFromHitTestPosition(e,i,s.spanNode,s.position,s.injectedText):this._createMouseTarget(e,i.withTarget(s.hitTarget),!0)}static _hitTestMinimap(e,i){if(Ai.isChildOfMinimap(i.targetPath)){const n=e.getLineNumberAtVerticalOffset(i.mouseVerticalOffset),s=e.viewModel.getLineMaxColumn(n);return i.fulfillScrollbar(new A(n,s))}return null}static _hitTestScrollbarSlider(e,i){if(Ai.isChildOfScrollableElement(i.targetPath)&&i.target&&i.target.nodeType===1){const n=i.target.className;if(n&&/\b(slider|scrollbar)\b/.test(n)){const s=e.getLineNumberAtVerticalOffset(i.mouseVerticalOffset),r=e.viewModel.getLineMaxColumn(s);return i.fulfillScrollbar(new A(s,r))}}return null}static _hitTestScrollbar(e,i){if(Ai.isChildOfScrollableElement(i.targetPath)){const n=e.getLineNumberAtVerticalOffset(i.mouseVerticalOffset),s=e.viewM
16odel.getLineMaxColumn(n);return i.fulfillScrollbar(new A(n,s))}return null}getMouseColumn(e){const i=this._context.configuration.options,n=i.get(131),s=this._context.viewLayout.getCurrentScrollLeft()+e.x-n.contentLeft;return Mt._getMouseColumn(s,i.get(44).typicalHalfwidthCharacterWidth)}static _getMouseColumn(e,i){return e<0?1:Math.round(e/i)+1}static createMouseTargetFromHitTestPosition(e,i,n,s,r){const o=s.lineNumber,a=s.column,l=e.getLineWidth(o);if(i.mouseContentHorizontalOffset>l){const _=qf(i.mouseContentHorizontalOffset-l);return i.fulfillContentEmpty(s,_)}const h=e.visibleRangeForPosition(o,a);if(!h)return i.fulfillUnknown(s);const c=h.left;if(i.mouseContentHorizontalOffset===c)return i.fulfillContentText(s,null,{mightBeForeignElement:!!r,injectedText:r});const d=[];if(d.push({offset:h.left,column:a}),a>1){const _=e.visibleRangeForPosition(o,a-1);_&&d.push({offset:_.left,column:a-1})}if(a<e.viewModel.getLineMaxColumn(o)){const _=e.visibleRangeForPosition(o,a+1);_&&d.push({offset:_.left,column:a+1})}d.sort((_,C)=>_.offset-C.offset);const u=i.pos.toClientCoordinates(),g=n.getBoundingClientRect(),m=g.left<=u.clientX&&u.clientX<=g.right;for(let _=1;_<d.length;_++){const C=d[_-1],w=d[_];if(C.offset<=i.mouseContentHorizontalOffset&&i.mouseContentHorizontalOffset<=w.offset){const v=new T(o,C.column,o,w.column);return i.fulfillContentText(s,v,{mightBeForeignElement:!m||!!r,injectedText:r})}}return i.fulfillContentText(s,null,{mightBeForeignElement:!m||!!r,injectedText:r})}static _doHitTestWithCaretRangeFromPoint(e,i){const n=e.getLineNumberAtVerticalOffset(i.mouseVerticalOffset),s=e.getVerticalOffsetForLineNumber(n)+Math.floor(e.lineHeight/2);let r=i.pos.y+(s-i.mouseVerticalOffset);r<=i.editorPos.y&&(r=i.editorPos.y+1),r>=i.editorPos.y+i.editorPos.height&&(r=i.editorPos.y+i.editorPos.height-1);const o=new Wv(i.pos.x,r),a=this._actualDoHitTestWithCaretRangeFromPoint(e,o.toClientCoordinates());return a.type===1?a:this._actualDoHitTestWithCaretRangeFromPoint(e,i.pos.toClientCoordinates())}static _actualDoHitTestWithCaretRangeFromPoint(e,i){const n=io(e.viewDomNode);let s;if(n?typeof n.caretRangeFromPoint>"u"?s=YA(n,i.clientX,i.clientY):s=n.caretRangeFromPoint(i.clientX,i.clientY):s=document.caretRangeFromPoint(i.clientX,i.clientY),!s||!s.startContainer)return new Ms;const r=s.startContainer;if(r.nodeType===r.TEXT_NODE){const o=r.parentNode,a=o?o.parentNode:null,l=a?a.parentNode:null;return(l&&l.nodeType===l.ELEMENT_NODE?l.className:null)===Vs.CLASS_NAME?Ar.createFromDOMInfo(e,o,s.startOffset):new Ms(r.parentNode)}else if(r.nodeType===r.ELEMENT_NODE){const o=r.parentNode,a=o?o.parentNode:null;return(a&&a.nodeType===a.ELEMENT_NODE?a.className:null)===Vs.CLASS_NAME?Ar.createFromDOMInfo(e,r,r.textContent.length):new Ms(r)}return new Ms}static _doHitTestWithCaretPositionFromPoint(e,i){const n=document.caretPositionFromPoint(i.clientX,i.clientY);if(n.offsetNode.nodeType===n.offsetNode.TEXT_NODE){const s=n.offsetNode.parentNode,r=s?s.parentNode:null,o=r?r.parentNode:null;return(o&&o.nodeType===o.ELEMENT_NODE?o.className:null)===Vs.CLASS_NAME?Ar.createFromDOMInfo(e,n.offsetNode.parentNode,n.offset):new Ms(n.offsetNode.parentNode)}if(n.offsetNode.nodeType===n.offsetNode.ELEMENT_NODE){const s=n.offsetNode.parentNode,r=s&&s.nodeType===s.ELEMENT_NODE?s.className:null,o=s?s.parentNode:null,a=o&&o.nodeType===o.ELEMENT_NODE?o.className:null;if(r===Vs.CLASS_NAME){const l=n.offsetNode.childNodes[Math.min(n.offset,n.offsetNode.childNodes.length-1)];if(l)return Ar.createFromDOMInfo(e,l,0)}else if(a===Vs.CLASS_NAME)return Ar.createFromDOMInfo(e,n.offsetNode,0)}return new Ms(n.offsetNode)}static _snapToSoftTabBoundary(e,i){const n=i.getLineContent(e.lineNumber),{tabSize:s}=i.model.getOptions(),r=Bp.atomicPosition(n,e.column-1,s,2);return r!==-1?new A(e.lineNumber,r+1):e}static _doHitTest(e,i){let n=new Ms;if(typeof document.caretRangeFromPoint=="function"?n=this._doHitTestWithCaretRangeFromPoint(e,i):document.caretPositionFromPoint&&(n=this._doHitTestWithCaretPositionFromPoint(e,i.pos.toClientCoordinates())),n.type===1){const s=e.viewModel.getInjectedTextAt(n.position),r=e.viewModel.normalizePosition(n.position,2);(s||!r.equals(n.position))&&(n=new Vp(r,n.spanNode,s))}return n.type===1&&e.stickyTabStops&&(n=new Vp(this._snapToSoftTabBoundary(n.position,e.viewModel),n.spanNode,n.injectedText)),n}};function YA(t,e,i){const n=document.createRange();let s=t.elementFromPoint(e,i);if(s!==null){for(;s&&s.firstChild&&s.firstChild.nodeType!==s.firstChild.TEXT_NODE&&s.lastChild&&s.lastChild.firstChild;)s=s.lastChild;const r=s.getBoundingClientRect(),o=window.getComputedStyle(s,null).getPropertyValue("font"),a=s.innerText;let l=r.left,h=0,c;if(e>
16r.left+r.width)h=a.length;else{const d=_k.getInstance();for(let u=0;u<a.length+1;u++){if(c=d.getCharWidth(a.charAt(u),o)/2,l+=c,e<l){h=u;break}l+=c}}n.setStart(s.firstChild,h),n.setEnd(s.firstChild,h)}return n}var _k=class El{constructor(){this._cache={},this._canvas=document.createElement("canvas")}static getInstance(){return El._INSTANCE||(El._INSTANCE=new El),El._INSTANCE}getCharWidth(e,i){const n=e+i;if(this._cache[n])return this._cache[n];const s=this._canvas.getContext("2d");s.font=i;const r=s.measureText(e).width;return this._cache[n]=r,r}};_k._INSTANCE=null;function su(t){return function(e,i){let n=!1;return t&&(n=t.mouseTargetIsWidget(i)),n||i.preventDefault(),i}}var uh=class vk extends Vh{constructor(e,i,n){super(),this._context=e,this.viewController=i,this.viewHelper=n,this.mouseTargetFactory=new pk(this._context,n),this._mouseDownOperation=this._register(new XA(this._context,this.viewController,this.viewHelper,(o,a)=>this._createMouseTarget(o,a),o=>this._getMouseColumn(o))),this.lastMouseLeaveTime=-1,this._height=this._context.configuration.options.get(131).height;const s=new MA(this.viewHelper.viewDomNode);this._register(s.onContextMenu(this.viewHelper.viewDomNode,o=>this._onContextMenu(o,!0))),this._register(s.onMouseMoveThrottled(this.viewHelper.viewDomNode,o=>this._onMouseMove(o),su(this.mouseTargetFactory),vk.MOUSE_MOVE_MINIMUM_TIME)),this._register(s.onMouseUp(this.viewHelper.viewDomNode,o=>this._onMouseUp(o))),this._register(s.onMouseLeave(this.viewHelper.viewDomNode,o=>this._onMouseLeave(o))),this._register(s.onMouseDown(this.viewHelper.viewDomNode,o=>this._onMouseDown(o)));const r=o=>{if(this.viewController.emitMouseWheel(o),!this._context.configuration.options.get(68))return;const a=new ka(o);if(fe?(o.metaKey||o.ctrlKey)&&!o.shiftKey&&!o.altKey:o.ctrlKey&&!o.metaKey&&!o.shiftKey&&!o.altKey){const l=$d.getZoomLevel(),h=a.deltaY>0?1:-1;$d.setZoomLevel(l+h),a.preventDefault(),a.stopPropagation()}};this._register(B(this.viewHelper.viewDomNode,Z.MOUSE_WHEEL,r,{capture:!0,passive:!1})),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(e){if(e.hasChanged(131)){const i=this._context.configuration.options.get(131).height;this._height!==i&&(this._height=i,this._mouseDownOperation.onHeightChanged())}return!1}onCursorStateChanged(e){return this._mouseDownOperation.onCursorStateChanged(e),!1}onFocusChanged(e){return!1}onScrollChanged(e){return this._mouseDownOperation.onScrollChanged(),!1}getTargetAtClientPoint(e,i){const n=new sk(e,i).toPageCoordinates(),s=rk(this.viewHelper.viewDomNode);if(n.y<s.y||n.y>s.y+s.height||n.x<s.x||n.x>s.x+s.width)return null;const r=ok(this.viewHelper.viewDomNode,s,n);return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),s,n,r,null)}_createMouseTarget(e,i){let n=e.target;if(!this.viewHelper.viewDomNode.contains(n)){const s=io(this.viewHelper.viewDomNode);s&&(n=s.elementsFromPoint(e.posx,e.posy).find(r=>this.viewHelper.viewDomNode.contains(r)))}return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),e.editorPos,e.pos,e.relativePos,i?n:null)}_getMouseColumn(e){return this.mouseTargetFactory.getMouseColumn(e.relativePos)}_onContextMenu(e,i){this.viewController.emitContextMenu({event:e,target:this._createMouseTarget(e,i)})}_onMouseMove(e){this._mouseDownOperation.isActive()||e.timestamp<this.lastMouseLeaveTime||this.viewController.emitMouseMove({event:e,target:this._createMouseTarget(e,!0)})}_onMouseLeave(e){this.lastMouseLeaveTime=new Date().getTime(),this.viewController.emitMouseLeave({event:e,target:null})}_onMouseUp(e){this.viewController.emitMouseUp({event:e,target:this._createMouseTarget(e,!0)})}_onMouseDown(e){const i=this._createMouseTarget(e,!0),n=i.type===6||i.type===7,s=i.type===2||i.type===3||i.type===4,r=i.type===3,o=this._context.configuration.options.get(98),a=i.type===8||i.type===5,l=i.type===9;let h=e.leftButton||e.middleButton;fe&&e.leftButton&&e.ctrlKey&&(h=!1);const c=()=>{e.preventDefault(),this.viewHelper.focusTextArea()};if(h&&(n||r&&o))c(),this._mouseDownOperation.start(i.type,e);else if(s)e.preventDefault();else if(a){const d=i.detail;this.viewHelper.shouldSuppressMouseDownOnViewZone(d.viewZoneId)&&(c(),this._mouseDownOperation.start(i.type,e),e.preventDefault())}else l&&this.viewHelper.shouldSuppressMouseDownOnWidget(i.detail)&&(c(),e.preventDefault());this.viewController.emitMouseDown({event:e,target:i})}};uh.MOUSE_MOVE_MINIMUM_TIME=100;var XA=class extends V{constructor(t,e,i,n,s){super(),this._context=t,this._viewController=e,this._viewHelper=i,this._createMouseTarget=n,this._getMouseColumn=s,this._mouseMoveMonitor=this._register(new AA(this._viewHelper.viewDomNode)),this._onScrollTimeout=this._register(new jn),this._mouseState=new Ck,this._currentSelection=new xe(1,1,1,1),this._isActive=!1,this._lastMouseEvent=null}dispose(){super.dispose()}isActive(){return this._isActive}_onMouseDownThenMove(t){this._lastMouseEvent=t,this._mouseState.setModifiers(t);const e=this._findMousePosition(t,!0);e&&(this._mouseState.isDragAndDrop?this._viewController.emitMouseDrag({event:t,target:e}):this._dispatchMouse(e,!0))}start(t,e){this._lastMouseEvent=e,this._mouseState.setStartedOnLineNumbers(t===3),this._mouseState.setStartButtons(e),this._mouseState.setModifiers(e);const i=this._findMousePosition(e,!0);if(!i||!i.position)return;this._mouseState.trySetCount(e.detail,i.position),e.detail=this._mouseState.count;const n=this._context.configuration.options;if(!n.get(81)&&n.get(31)&&!n.get(18)&&!this._mouseState.altKey&&e.detail<2&&!this._isActive&&!this._currentSelection.isEmpty()&&i.type===6&&i.position&&this._currentSelection.containsPosition(i.position)){this._mouseState.isDragAndDrop=!0,this._isActive=!0,this._mouseMoveMonitor.startMonitoring(e.target,e.buttons,su(null),s=>this._onMouseDownThenMove(s),s=>{const r=this._findMousePosition(this._lastMouseEvent,!0);s&&s instanceof KeyboardEvent?this._viewController.emitMouseDropCanceled():this._viewController.emitMouseDrop({event:this._lastMouseEvent,target:r?this._createMouseTarget(this._lastMouseEvent,!0):null}),this._stop()});return}this._mouseState.isDragAndDrop=!1,this._dispatchMouse(i,e.shiftKey),this._isActive||(this._isActive=!0,this._mouseMoveMonitor.startMonitoring(e.target,e.buttons,su(null),s=>this._onMouseDownThenMove(s),()=>this._stop()))}_stop(){this._isActive=!1,this._onScrollTimeout.cancel()}onHeightChanged(){this._mouseMoveMonitor.stopMonitoring()}onScrollChanged(){this._isActive&&this._onScrollTimeout.setIfNotSet(()=>{if(!this._lastMouseEvent)return;const t=this._findMousePosition(this._lastMouseEvent,!1);t&&(this._mouseState.isDragAndDrop||this._dispatchMouse(t,!0))},10)}onCursorStateChanged(t){this._currentSelection=t.selections[0]}_getPositionOutsideEditor(t){const e=t.editorPos,i=this._context.viewModel,n=this._context.viewLayout,s=this._getMouseColumn(t);if(t.posy<e.y){const o=Math.max(n.getCurrentScrollTop()-(e.y-t.posy),0),a=Wp.getZoneAtCoord(this._context,o);if(a){const h=this._helpPositionJumpOverViewZone(a);if(h)return $t.createOutsideEditor(s,h)}const l=n.getLineNumberAtVerticalOffset(o);return $t.createOutsideEditor(s,new A(l,1))}if(t.posy>e.y+e.height){const o=n.getCurrentScrollTop()+t.relativePos.y,a=Wp.getZoneAtCoord(this._context,o);if(a){const h=this._helpPositionJumpOverViewZone(a);if(h)return $t.createOutsideEditor(s,h)}const l=n.getLineNumberAtVerticalOffset(o);return $t.createOutsideEditor(s,new A(l,i.getLineMaxColumn(l)))}const r=n.getLineNumberAtVerticalOffset(n.getCurrentScrollTop()+t.relativePos.y);return t.posx<e.x?$t.createOutsideEditor(s,new A(r,1)):t.posx>e.x+e.width?$t.createOutsideEditor(s,new A(r,i.getLineMaxColumn(r))):null}_findMousePosition(t,e){const i=this._getPositionOutsideEditor(t);if(i)return i;const n=this._createMouseTarget(t,e);if(!n.position)return null;if(n.type===8||n.type===5){const s=this._helpPositionJumpOverViewZone(n.detail);if(s)return $t.createViewZone(n.type,n.element,n.mouseColumn,s,n.detail)}return n}_helpPositionJumpOverViewZone(t){const e=new A(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),i=t.positionBefore,n=t.positionAfter;return i&&n?i.isBefore(e)?i:n:null}_dispatchMouse(t,e){t.position&&this._viewController.dispatchMouse({position:t.position,mouseColumn:t.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,inSelectionMode:e,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:t.type===6&&t.detail.injectedText!==null})}},Ck=class bk{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(e){this._altKey=e.altKey,this._ctrlKey=e.ctrlKey,this._metaKey=e.metaKey,this._shiftKey=e.shiftKey}setStartButtons(e){this._leftButton=e.leftButton,this._middleButton=e.middleButton}setStartedOnLineNumbers(e){this._startedOnLineNumbers=e}trySetCount(e,i){const n=new Date().getTime();n-this._lastSetMouseDownCountTime>bk.CLEAR_MOUSE_DOWN_COUNT_TIME&&(e=1),this._lastSetMouseDownCountTime=n,e>this._lastMouseDownCount+1&&(e=this._lastMouseDownCount+1),this._lastMouseDownPosition&&this._lastMouseDownPosition.equals(i)?this._lastMouseDownPositionEqualCount++:this._lastMouseDownPositionEqualCount=1,this._lastMouseDownPosition=i,this._lastMouseDownCount=Math.min(e,this._lastMouseDownPositionEqualCount)}};Ck.CLEAR_MOUSE_DOWN_COUNT_TIME=400;var dn;(function(t){t.text="text/plain",t.binary="application/octet-stream",t.unknown="application/unknown",t.markdown="text/markdown",t.latex="text/latex",t.ur
16iList="text/uri-list"})(dn||(dn={}));var Kt=class zp{constructor(e,i,n,s,r){this.value=e,this.selectionStart=i,this.selectionEnd=n,this.selectionStartPosition=s,this.selectionEndPosition=r}toString(){return`[ <${this.value}>, selectionStart: ${this.selectionStart}, selectionEnd: ${this.selectionEnd}]`}static readFromTextArea(e){return new zp(e.getValue(),e.getSelectionStart(),e.getSelectionEnd(),null,null)}collapseSelection(){return new zp(this.value,this.value.length,this.value.length,null,null)}writeToTextArea(e,i,n){i.setValue(e,this.value),n&&i.setSelectionRange(e,this.selectionStart,this.selectionEnd)}deduceEditorPosition(e){if(e<=this.selectionStart){const s=this.value.substring(e,this.selectionStart);return this._finishDeduceEditorPosition(this.selectionStartPosition,s,-1)}if(e>=this.selectionEnd){const s=this.value.substring(this.selectionEnd,e);return this._finishDeduceEditorPosition(this.selectionEndPosition,s,1)}const i=this.value.substring(this.selectionStart,e);if(i.indexOf("…")===-1)return this._finishDeduceEditorPosition(this.selectionStartPosition,i,1);const n=this.value.substring(e,this.selectionEnd);return this._finishDeduceEditorPosition(this.selectionEndPosition,n,-1)}_finishDeduceEditorPosition(e,i,n){let s=0,r=-1;for(;(r=i.indexOf(`
17`,r+1))!==-1;)s++;return[e,n*i.length,s]}static deduceInput(e,i,n){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};const s=Math.min(nC(e.value,i.value),e.selectionStart,i.selectionStart),r=Math.min(sC(e.value,i.value),e.value.length-e.selectionEnd,i.value.length-i.selectionEnd);e.value.substring(s,e.value.length-r);const o=i.value.substring(s,i.value.length-r),a=e.selectionStart-s,l=e.selectionEnd-s;return i.selectionStart-s===i.selectionEnd-s?{text:o,replacePrevCharCnt:e.selectionStart-s,replaceNextCharCnt:0,positionDelta:0}:{text:o,replacePrevCharCnt:l-a,replaceNextCharCnt:0,positionDelta:0}}static deduceAndroidCompositionInput(e,i){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};if(e.value===i.value)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:i.selectionEnd-e.selectionEnd};const n=Math.min(nC(e.value,i.value),e.selectionEnd),s=Math.min(sC(e.value,i.value),e.value.length-e.selectionEnd),r=e.value.substring(n,e.value.length-s),o=i.value.substring(n,i.value.length-s);e.selectionStart-n;const a=e.selectionEnd-n;i.selectionStart-n;const l=i.selectionEnd-n;return{text:o,replacePrevCharCnt:a,replaceNextCharCnt:r.length-a,positionDelta:l-o.length}}};Kt.EMPTY=new Kt("",0,0,null,null);var QA=class Dl{static _getPageOfLine(e,i){return Math.floor((e-1)/i)}static _getRangeForPage(e,i){const n=e*i,s=n+1,r=n+i;return new T(s,1,r+1,1)}static fromEditorSelection(e,i,n,s,r){const o=Dl._getPageOfLine(n.startLineNumber,s),a=Dl._getRangeForPage(o,s),l=Dl._getPageOfLine(n.endLineNumber,s),h=Dl._getRangeForPage(l,s),c=a.intersectRanges(new T(1,1,n.startLineNumber,n.startColumn));let d=i.getValueInRange(c,1);const u=i.getLineCount(),g=i.getLineMaxColumn(u),m=h.intersectRanges(new T(n.endLineNumber,n.endColumn,u,g));let _=i.getValueInRange(m,1),C;if(o===l||o+1===l)C=i.getValueInRange(n,1);else{const w=a.intersectRanges(n),v=h.intersectRanges(n);C=i.getValueInRange(w,1)+"…"+i.getValueInRange(v,1)}return r&&(d.length>500&&(d=d.substring(d.length-500,d.length)),_.length>500&&(_=_.substring(0,500)),C.length>2*500&&(C=C.substring(0,500)+"…"+C.substring(C.length-500,C.length))),new Kt(d+C+_,d.length,d.length+C.length,new A(n.startLineNumber,n.startColumn),new A(n.endLineNumber,n.endColumn))}},ru;(function(t){t.Tap="-monaco-textarea-synthetic-tap"})(ru||(ru={}));var JA={forceCopyWithSyntaxHighlighting:!1},ou=class{constructor(){this._lastState=null}set(t,e){this._lastState={lastCopiedValue:t,data:e}}get(t){return this._lastState&&this._lastState.lastCopiedValue===t?this._lastState.data:(this._lastState=null,null)}};ou.INSTANCE=new ou;var e7=class{constructor(){this._lastTypeTextLength=0}handleCompositionUpdate(t){t=t||"";const e={text:t,replacePrevCharCnt:this._lastTypeTextLength,replaceNextCharCnt:0,positionDelta:0};return this._lastTypeTextLength=t.length,e}},t7=class extends V{constructor(t,e,i,n){super(),this._host=t,this._textArea=e,this._OS=i,this._browser=n,this._onFocus=this._register(new M),this.onFocus=this._onFocus.event,this._onBlur=this._register(new M),this.onBlur=this._onBlur.event,this._onKeyDown=this._register(new M),this.onKeyDown=this._onKeyDown.event,this._onKeyUp=this._register(new M),this.onKeyUp=this._onKeyUp.event,this._onCut=this._register(new M),this.onCut=this._onCut.event,this._onPaste=this._register(new M),this.onPaste=this._onPaste.event,this._onType=this._register(new M),this.onType=this._onType.event,this._onCompositionStart=this._register(new M),this.onCompositionStart=this._onCompositionStart.event,this._onCompositionUpdate=this._register(new M),this.onCompositionUpdate=this._onCompositionUpdate.event,this._onCompositionEnd=this._register(new M),this.onCompositionEnd=this._onCompositionEnd.event,this._onSelectionChangeRequest=this._register(new M),this.onSelectionChangeRequest=this._onSelectionChangeRequest.event,this._asyncTriggerCut=this._register(new _t(()=>this._onCut.fire(),0)),this._asyncFocusGainWriteScreenReaderContent=this._register(new _t(()=>this.writeScreenReaderContent("asyncFocusGain"),0)),this._textAreaState=Kt.EMPTY,this._selectionChangeListener=null,this.writeScreenReaderContent("ctor"),this._hasFocus=!1,this._currentComposition=null;let s=null;this._register(this._textArea.onKeyDown(r=>
17{const o=new Pe(r);(o.keyCode===109||this._currentComposition&&o.keyCode===1)&&o.stopPropagation(),o.equals(9)&&o.preventDefault(),s=o,this._onKeyDown.fire(o)})),this._register(this._textArea.onKeyUp(r=>{const o=new Pe(r);this._onKeyUp.fire(o)})),this._register(this._textArea.onCompositionStart(r=>{const o=new e7;if(this._currentComposition){this._currentComposition=o;return}if(this._currentComposition=o,this._OS===2&&s&&s.equals(109)&&this._textAreaState.selectionStart===this._textAreaState.selectionEnd&&this._textAreaState.selectionStart>0&&this._textAreaState.value.substr(this._textAreaState.selectionStart-1,1)===r.data&&(s.code==="ArrowRight"||s.code==="ArrowLeft")){o.handleCompositionUpdate("x"),this._onCompositionStart.fire({data:r.data});return}if(this._browser.isAndroid){this._onCompositionStart.fire({data:r.data});return}this._onCompositionStart.fire({data:r.data})})),this._register(this._textArea.onCompositionUpdate(r=>{const o=this._currentComposition;if(!o)return;if(this._browser.isAndroid){const l=Kt.readFromTextArea(this._textArea),h=Kt.deduceAndroidCompositionInput(this._textAreaState,l);this._textAreaState=l,this._onType.fire(h),this._onCompositionUpdate.fire(r);return}const a=o.handleCompositionUpdate(r.data);this._textAreaState=Kt.readFromTextArea(this._textArea),this._onType.fire(a),this._onCompositionUpdate.fire(r)})),this._register(this._textArea.onCompositionEnd(r=>{const o=this._currentComposition;if(!o)return;if(this._currentComposition=null,this._browser.isAndroid){const l=Kt.readFromTextArea(this._textArea),h=Kt.deduceAndroidCompositionInput(this._textAreaState,l);this._textAreaState=l,this._onType.fire(h),this._onCompositionEnd.fire();return}const a=o.handleCompositionUpdate(r.data);this._textAreaState=Kt.readFromTextArea(this._textArea),this._onType.fire(a),this._onCompositionEnd.fire()})),this._register(this._textArea.onInput(r=>{if(this._textArea.setIgnoreSelectionChangeTime("received input event"),this._currentComposition)return;const o=Kt.readFromTextArea(this._textArea),a=Kt.deduceInput(this._textAreaState,o,this._OS===2);a.replacePrevCharCnt===0&&a.text.length===1&&at(a.text.charCodeAt(0))||(this._textAreaState=o,(a.text!==""||a.replacePrevCharCnt!==0||a.replaceNextCharCnt!==0||a.positionDelta!==0)&&this._onType.fire(a))})),this._register(this._textArea.onCut(r=>{this._textArea.setIgnoreSelectionChangeTime("received cut event"),this._ensureClipboardGetsEditorSelection(r),this._asyncTriggerCut.schedule()})),this._register(this._textArea.onCopy(r=>{this._ensureClipboardGetsEditorSelection(r)})),this._register(this._textArea.onPaste(r=>{if(this._textArea.setIgnoreSelectionChangeTime("received paste event"),r.preventDefault(),!r.clipboardData)return;let[o,a]=ab.getTextData(r.clipboardData);o&&(a=a||ou.INSTANCE.get(o),this._onPaste.fire({text:o,metadata:a}))})),this._register(this._textArea.onFocus(()=>{const r=this._hasFocus;this._setHasFocus(!0),this._browser.isSafari&&!r&&this._hasFocus&&this._asyncFocusGainWriteScreenReaderContent.schedule()})),this._register(this._textArea.onBlur(()=>{this._currentComposition&&(this._currentComposition=null,this.writeScreenReaderContent("blurWithoutCompositionEnd"),this._onCompositionEnd.fire()),this._setHasFocus(!1)}
17)),this._register(this._textArea.onSyntheticTap(()=>{this._browser.isAndroid&&this._currentComposition&&(this._currentComposition=null,this.writeScreenReaderContent("tapWithoutCompositionEnd"),this._onCompositionEnd.fire())}))}_installSelectionChangeListener(){let t=0;return B(document,"selectionchange",e=>{if(!this._hasFocus||this._currentComposition||!this._browser.isChrome)return;const i=Date.now(),n=i-t;if(t=i,n<5)return;const s=i-this._textArea.getIgnoreSelectionChangeTime();if(this._textArea.resetSelectionChangeTime(),s<100||!this._textAreaState.selectionStartPosition||!this._textAreaState.selectionEndPosition)return;const r=this._textArea.getValue();if(this._textAreaState.value!==r)return;const o=this._textArea.getSelectionStart(),a=this._textArea.getSelectionEnd();if(this._textAreaState.selectionStart===o&&this._textAreaState.selectionEnd===a)return;const l=this._textAreaState.deduceEditorPosition(o),h=this._host.deduceModelPosition(l[0],l[1],l[2]),c=this._textAreaState.deduceEditorPosition(a),d=this._host.deduceModelPosition(c[0],c[1],c[2]),u=new xe(h.lineNumber,h.column,d.lineNumber,d.column);this._onSelectionChangeRequest.fire(u)})}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(t){this._hasFocus!==t&&(this._hasFocus=t,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(t,e){this._hasFocus||(e=e.collapseSelection()),e.writeToTextArea(t,this._textArea,this._hasFocus),this._textAreaState=e}writeScreenReaderContent(t){this._currentComposition||this._setAndWriteTextAreaState(t,this._host.getScreenReaderContent(this._textAreaState))}_ensureClipboardGetsEditorSelection(t){const e=this._host.getDataToCopy(),i={version:1,isFromEmptySelection:e.isFromEmptySelection,multicursorText:e.multicursorText,mode:e.mode};ou.INSTANCE.set(this._browser.isFirefox?e.text.replace(/\r\n/g,`
18`):e.text,i),t.preventDefault(),t.clipboardData&&ab.setTextData(t.clipboardData,e.text,e.html,i)}},ab=class{static getTextData(t){const e=t.getData(dn.text);let i=null;const n=t.getData("vscode-editor-data");if(typeof n=="string")try{i=JSON.parse(n),i.version!==1&&(i=null)}catch{}return[e,i]}static setTextData(t,e,i,n){t.setData(dn.text,e),typeof i=="string"&&t.setData("text/html",i),t.setData("vscode-editor-data",JSON.stringify(n))}},i7=class extends V{constructor(t){super(),this._actual=t,this.onKeyDown=this._register(tn(this._actual,"keydown")).event,this.onKeyUp=this._register(tn(this._actual,"keyup")).event,this.onCompositionStart=this._register(tn(this._actual,"compositionstart")).event,this.onCompositionUpdate=this._register(tn(this._actual,"compositionupdate")).event,this.onCompositionEnd=this._register(tn(this._actual,"compositionend")).event,this.onInput=this._register(tn(this._actual,"input")).event,this.onCut=this._register(tn(this._actual,"cut")).event,this.onCopy=this._register(tn(this._actual,"copy")).event,this.onPaste=this._register(tn(this._actual,"paste")).event,this.onFocus=this._register(tn(this._actual,"focus")).event,this.onBlur=this._register(tn(this._actual,"blur")).event,this._onSyntheticTa
18p=this._register(new M),this.onSyntheticTap=this._onSyntheticTap.event,this._ignoreSelectionChangeTime=0,this._register(B(this._actual,ru.Tap,()=>this._onSyntheticTap.fire()))}hasFocus(){const t=io(this._actual);return t?t.activeElement===this._actual:Ev(this._actual)?document.activeElement===this._actual:!1}setIgnoreSelectionChangeTime(t){this._ignoreSelectionChangeTime=Date.now()}getIgnoreSelectionChangeTime(){return this._ignoreSelectionChangeTime}resetSelectionChangeTime(){this._ignoreSelectionChangeTime=0}getValue(){return this._actual.value}setValue(t,e){const i=this._actual;i.value!==e&&(this.setIgnoreSelectionChangeTime("setValue"),i.value=e)}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(t,e,i){const n=this._actual;let s=null;const r=io(n);r?s=r.activeElement:s=document.activeElement;const o=s===n,a=n.selectionStart,l=n.selectionEnd;if(o&&a===e&&l===i){Ii&&window.parent!==window&&n.focus();return}if(o){this.setIgnoreSelectionChangeTime("setSelectionRange"),n.setSelectionRange(e,i),Ii&&window.parent!==window&&n.focus();return}try{const h=LM(n);this.setIgnoreSelectionChangeTime("setSelectionRange"),n.focus(),n.setSelectionRange(e,i),kM(n,h)}catch{}}},n7=class extends uh{constructor(t,e,i){super(t,e,i),this._register(ii.addTarget(this.viewHelper.linesContentDomNode)),this._register(B(this.viewHelper.linesContentDomNode,Me.Tap,s=>this.onTap(s))),this._register(B(this.viewHelper.linesContentDomNode,Me.Change,s=>this.onChange(s))),this._register(B(this.viewHelper.linesContentDomNode,Me.Contextmenu,s=>this._onContextMenu(new no(s,this.viewHelper.viewDomNode),!1))),this._lastPointerType="mouse",this._register(B(this.viewHelper.linesContentDomNode,"pointerdown",s=>{const r=s.pointerType;if(r==="mouse"){this._lastPointerType="mouse";return}else r==="touch"?this._lastPointerType="touch":this._lastPointerType="pen"}));const n=new RA(this.viewHelper.viewDomNode);this._register(n.onPointerMoveThrottled(this.viewHelper.viewDomNode,s=>this._onMouseMove(s),su(this.mouseTargetFactory),uh.MOUSE_MOVE_MINIMUM_TIME)),this._register(n.onPointerUp(this.viewHelper.viewDomNode,s=>this._onMouseUp(s))),this._register(n.onPointerLeave(this.viewHelper.viewDomNode,s=>this._onMouseLeave(s))),this._register(n.onPointerDown(this.viewHelper.viewDomNode,s=>
18this._onMouseDown(s)))}onTap(t){if(!t.initialTarget||!this.viewHelper.linesContentDomNode.contains(t.initialTarget))return;t.preventDefault(),this.viewHelper.focusTextArea();const e=this._createMouseTarget(new no(t,this.viewHelper.viewDomNode),!1);e.position&&this.viewController.dispatchMouse({position:e.position,mouseColumn:e.position.column,startedOnLineNumbers:!1,mouseDownCount:t.tapCount,inSelectionMode:!1,altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1,leftButton:!1,middleButton:!1,onInjectedText:e.type===6&&e.detail.injectedText!==null})}onChange(t){this._lastPointerType==="touch"&&this._context.viewModel.viewLayout.deltaScrollNow(-t.translationX,-t.translationY)}_onMouseDown(t){t.browserEvent.pointerType!=="touch"&&super._onMouseDown(t)}},s7=class extends uh{constructor(t,e,i){super(t,e,i),this._register(ii.addTarget(this.viewHelper.linesContentDomNode)),this._register(B(this.viewHelper.linesContentDomNode,Me.Tap,n=>this.onTap(n))),this._register(B(this.viewHelper.linesContentDomNode,Me.Change,n=>this.onChange(n))),this._register(B(this.viewHelper.linesContentDomNode,Me.Contextmenu,n=>this._onContextMenu(new no(n,this.viewHelper.viewDomNode),!1)))}onTap(t){t.preventDefault(),this.viewHelper.focusTextArea();const e=this._createMouseTarget(new no(t,this.viewHelper.viewDomNode),!1);if(e.position){const i=document.createEvent("CustomEvent");i.initEvent(ru.Tap,!1,!0),this.viewHelper.dispatchTextAreaEvent(i),this.viewController.moveTo(e.position)}}onChange(t){this._context.viewModel.viewLayout.deltaScrollNow(-t.translationX,-t.translationY)}},r7=class extends V{constructor(t,e,i){super(),Xr&&VL.pointerEvents?this.handler=this._register(new n7(t,e,i)):window.TouchEvent?this.handler=this._register(new s7(t,e,i)):this.handler=this._register(new uh(t,e,i))}getTargetAtClientPoint(t,e){return this.handler.getTargetAtClientPoint(t,e)}},ja=class extends Vh{}
18,o7=I("editor.lineHighlightBackground",{dark:null,light:null,hc:null},p("lineHighlight","Background color for the highlight of line at the cursor position.")),lb=I("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hc:"#f38518"},p("lineHighlightBorderBox","Background color for the border around the line at the cursor position.")),a7=I("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hc:null},p("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),l7=I("editor.rangeHighlightBorder",{dark:null,light:null,hc:_i},p("rangeHighlightBorder","Background color of the border around highlighted ranges."),!0),h7=I("editor.symbolHighlightBackground",{dark:Ys,light:Ys,hc:null},p("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),c7=I("editor.symbolHighlightBorder",{dark:null,light:null,hc:_i},p("symbolHighlightBorder","Background color of the border around highlighted symbols."),!0),wk=I("editorCursor.foreground",{dark:"#AEAFAD",light:O.black,hc:O.white},p("caret","Color of the editor cursor.")),d7=I("editorCursor.background",null,p("editorCursorBackgroun
18d","The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.")),qr=I("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hc:"#e3e4e229"},p("editorWhitespaces","Color of whitespace characters in the editor.")),nf=I("editorIndentGuide.background",{dark:qr,light:qr,hc:qr},p("editorIndentGuides","Color of the editor indentation guides.")),sf=I("editorIndentGuide.activeBackground",{dark:qr,light:qr,hc:qr},p("editorActiveIndentGuide","Color of the active editor indentation guides.")),Sk=I("editorLineNumber.foreground",{dark:"#858585",light:"#237893",hc:O.white},p("editorLineNumbers","Color of editor line numbers.")),Gf=I("editorActiveLineNumber.foreground",{dark:"#c6c6c6",light:"#0B216F",hc:_i},p("editorActiveLineNumber","Color of editor active line number"),!1,p("deprecatedEditorActiveLineNumber","Id is deprecated. Use 'editorLineNumber.activeForeground' instead.")),u7=I("editorLineNumber.activeForeground",{dark:Gf,light:Gf,hc:Gf},p("editorActiveLineNumber","Color of editor active line number")),f7=I("editorRuler.foreground",{dark:"#5A5A5A",light:O.lightgrey,hc:O.white},p("editorRuler","Color of the editor rulers.")),o$=I("editorCodeLens.foreground",{dark:"#999999",light:"#919191",hc:"#999999"},p("editorCodeLensForeground","Foreground color of editor CodeLens")),a$=I("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hc:"#0064001a"},p("editorBracketMatchBackground","Background color behind matching brackets")),l$=I("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hc:Ye},p("editorBracketMatchBorder","Color for matching brackets boxes")),g7=I("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hc:"#7f7f7f4d"},p("editorOverviewRulerBorder","Color of the overview ruler border.")),m7=I("editorOverviewRuler.background",null,p("editorOverviewRulerBackground","Background color of the editor overview ruler. Only used when the minimap is enabled and placed on the right side of the editor.")),p7=I("editorGutter.background",{dark:Gi,light:Gi,hc:Gi},p("editorGutter","Background color of the editor gutter. The gutter contains the glyph margins and the line numbers.")),_7=I("editorUnnecessaryCode.border",{dark:null,light:null,hc:O.fromHex("#fff").transparent(.8)},p("unnecessaryCodeBorder","Border color of unnecessary (unused) source code in the editor.")),v7=I("editorUnnecessaryCode.opacity",{dark:O.fromHex("#000a"),light:O.fromHex("#0007"),hc:null},p("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.`)),h$=I("editorGhostText.border",{dark:null,light:null,hc:O.fromHex("#fff").transparent(.8)},p("editorGhostTextBorder","Border color of ghost text in the editor.")),c$=I("editorGhostText.foreground",{dark:O.fromHex("#ffffff56"),light:O.fromHex("#0007"),hc:null},p("editorGhostTextForeground","Foreground color of the ghost text in the editor.")),d$=I("editorGhostText.background",{dark:null,light:null,hc:null},p("editorGhostTextBackground","Background color of the ghost text in the editor.")),Zf=new O(new ce(0,122,204,.6)),u$=I("editorOverviewRuler.rangeHighlightForeground",{dark:Zf,light:Zf,hc:Zf},p("overviewRulerRangeHighlight","Overview ruler marker color for range highlights. The color must not be opaque so as not to hide underlying decorations."),!0),C7=I("editorOverviewRuler.errorForeground",{dark:new O(new ce(255,18,18,.7)),light:new O(new ce(255,18,18,.7)),hc:new O(new ce(255,50,50,1))},p("overviewRuleError","Overview ruler marker color for errors.")),b7=I("editorOverviewRuler.warningForeground",{dark:pn,light:pn,hc:Pv},p("overviewRuleWarning","Overview ruler marker color for warnings.")),w7=I("editorOverviewRuler.infoForeground",{dark:vs,light:vs,hc:X2},p("overviewRuleInfo","Overview ruler marker color for infos.")),yk=I("editorBracketHighlight.foreground1",{dark:"#FFD700",light:"#0431FAFF",hc:"#FFD700"},p("editorBracketHighlightForeground1","Foreground color of brackets (1). Requires enabling bracket pair colorization.")),Lk=I("editorBracketHighlight.foreground2",{dark:"#DA70D6",light:"#319331FF",hc:"#DA70D6"},p("editorBracketHighlightForeground2","Foreground color of brackets (2). Requires enabling bracket pair colorization.")),kk=I("editorBracketHighlight.foreground3",{dark:"#179FFF",light:"#7B3814FF",hc:"#87CEFA"},p("editorBracketHighlightForeground3","Foreground color of brackets (3). Requires enabling bracket pair colorization.")),xk=I("editorBracketHighlight.foreground4",{dark:"#00000000",light:"#00000000",hc:"#00000000"},p("editorBracketHighlightForeground4","Foreground color of brackets (4). Requires enabling bracket pair colorization.")),Ik=I("editorBracketHighlight.foreground5",{dark:"#00000000",light:"#00000000",hc:"#00000000"},p("editorBracketHighlightForeground5","Foreground color of brackets (5). Requires enabling bracket pair colorization.")),Ek=I("editorBracketHighlight.foreground6",{dark:"#00000000",light:"#00000000",hc:"#00000000"},p("editorBracketHighlightForeground6","Foreground color of brackets (6). Requires enabling bracket pair colorization.")),S7=I("editorBracketHighlight.unexpectedBracket.foreground",{dark:new O(new ce(255,18,18,.8)),light:new O(new ce(255,18,18,.8)),hc:new O(new ce(255,50,50,
181))},p("editorBracketHighlightUnexpectedBracketForeground","Foreground color of unexpected brackets.")),y7=I("editorBracketPairGuide.background1",{dark:"#00000000",light:"#00000000",hc:"#00000000"},p("editorBracketPairGuide.background1","Background color of inactive bracket pair guides (1). Requires enabling bracket pair guides.")),L7=I("editorBracketPairGuide.background2",{dark:"#00000000",light:"#00000000",hc:"#00000000"},p("editorBracketPairGuide.background2","Background color of inactive bracket pair guides (2). Requires enabling bracket pair guides.")),k7=I("editorBracketPairGuide.background3",{dark:"#00000000",light:"#00000000",hc:"#00000000"},p("editorBracketPairGuide.background3","Background color of inactive bracket pair guides (3). Requires enabling bracket pair guides.")),x7=I("editorBracketPairGuide.background4",{dark:"#00000000",light:"#00000000",hc:"#00000000"},p("editorBracketPairGuide.background4","Background color of inactive bracket pair guides (4). Requires enabling bracket pair guides.")),I7=I("editorBracketPairGuide.background5",{dark:"#00000000",light:"#00000000",hc:"#00000000"},p("editorBracketPairGuide.background5","Background color of inactive bracket pair guides (5). Requires enabling bracket pair guides.")),E7=I("editorBracketPairGuide.background6",{dark:"#00000000",light:"#00000000",hc:"#00000000"},p("editorBracketPairGuide.background6","Background color of inactive bracket pair guides (6). Requires enabling bracket pair guides.")),D7=I("editorBracketPairGuide.activeBackground1",{dark:"#00000000",light:"#00000000",hc:"#00000000"},p("editorBracketPairGuide.activeBackground1","Background color of active bracket pair guides (1). Requires enabling bracket pair guides.")),N7=I("editorBracketPairGuide.activeBackground2",{dark:"#00000000",light:"#00000000",hc:"#00000000"},p("editorBracketPairGuide.activeBackground2","Background color of active bracket pair guides (2). Requires enabling bracket pair guides.")),T7=I("editorBracketPairGuide.activeBackground3",{dark:"#00000000",light:"#00000000",hc:"#00000000"},p("editorBracketPairGuide.activeBackground3","Background color of active bracket pair guides (3). Requires enabling bracket pair guides.")),M7=I("editorBracketPairGuide.activeBackground4",{dark:"#00000000",light:"#00000000",hc:"#00000000"},p("editorBracketPairGuide.activeBackground4","Background color of active bracket pair guides (4). Requires enabling bracket pair guides.")),R7=I("editorBracketPairGuide.activeBackground5",{dark:"#00000000",light:"#00000000",hc:"#00000000"},p("editorBracketPairGuide.activeBackground5","Background color of active bracket pair guides (5). Requires enabling bracket pair guides.")),A7=I("editorBracketPairGuide.activeBackground6",{dark:"#00000000",light:"#00000000",hc:"#00000000"},p("editorBracketPairGuide.activeBackground6","Background color of active bracket pair guides (6). Requires enabling bracket pair guides.")),f$=I("editorUnicodeHighlight.border",{dark:"#BD9B03",light:"#CEA33D",hc:"#ff0000"},p("editorUnicodeHighlight.border","Border color used to highlight unicode characters."));Yt((t,e)=>{const i=t.getColor(Gi);i&&e.addRule(`.monaco-editor, .monaco-editor-background, .monaco-editor .inputarea.ime-input { background-color: ${i}; }`);const n=t.getColor(Bh);n&&e.addRule(`.monaco-editor, .monaco-editor .inputarea.ime-input { color: ${n}; }`);const s=t.getColor(p7);s&&e.addRule(`.monaco-editor .margin { background-color: ${s}; }`);const r=t.getColor(a7);r&&e.addRule(`.monaco-editor .rangeHighlight { background-color: ${r}; }`);const o=t.getColor(l7);o&&e.addRule(`.monaco-editor .rangeHighlight { border: 1px ${t.type==="hc"?"dotted":"solid"} ${o}; }`);const a=t.getColor(h7);a&&e.addRule(`.monaco-editor .symbolHighlight { background-color: ${a}; }`);const l=t.getColor(c7);l&&e.addRule(`.monaco-editor .symbolHighlight { border: 1px ${t.type==="hc"?"dotted":"solid"} ${l}; }`);const h=t.getColor(qr);h&&(e.addRule(`.monaco-editor .mtkw { color: ${h} !important; }`),e.addRule(`.monaco-editor .mtkz { color: ${h} !important; }`))});var Hv=class Up extends ja{constructor(e){super(),this._context=e,this._readConfig(),this._lastCursorModelPosition=new A(1,1),this._renderResult=null,this._activeLineNumber=1,this._context.addEventHandler(this)}_readConfig(){const e=this._context.configuration.options;this._lineHeight=e.get(59);const i=e.get(60);this._renderLineNumbers=i.renderType,this._renderCustomLineNumbers=i.renderFn,this._renderFinalNewline=e.get(84);const n=e.get(131);this._lineNumbersLeft=n.lineNumbersLeft,this._lineNumbersWidth=n.lineNumbersWidth}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){return this._readConfig(),!0}onCursorStateChanged(e){const i=e.selections[0].getPosition();this._lastCursorModelPosition=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(i);let n=!1;return this._activeLineNumber!==i.lineNumber&&(this._activeLineNumber=i.lineNumber,n=!0),(this._renderLineNumbers===2||this._renderLineNumbers===3)&&(n=!0),n}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getLineRenderLineNumber(e){const i=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new A(e,1));if(i.column!==1)return"";const n=i.lineNumber;if(this._renderCustomLineNumbers)return this._renderCustomLineNumbers(n);if(this._renderLineNumbers===2){const s=Math.abs(this._lastCursorModelPosition.lineNumber-n);return s===0?'<span class="relative-current-line-number">'+n+"</span>":String(s)}return this._renderLineNumbers===3?this._lastCursorModelPosition.lineNumber===n||n%10===0?String(n):"":String(n)}prepareRender(e){if(this._renderLineNumbers===0){this._renderResult=null;return}const i=Bt?this._lineHeight%2===0?" lh-even":" lh-odd":"",n=e.visibleRange.startLineNumber,s=e.visibleRange.endLineNumber,r='<div class="'+Up.CLASS_NAME+i+'" style="left:'+this._lineNumbersLeft+"px;width:"+this._lineNumbersWidth+'px;">',o=this._context.viewModel.getLineCount(),a=[];for(let l=n;l<=s;l++){const h=l-n;if(!this._renderFinalNewline&&l===o&&this._context.viewModel.getLineLength(l)===0){a[h]="";continue}const c=this._getLineRenderLineNumber(l);c?l===this._activeLineNumber?a[h]='<div class="active-line-number '+Up.CLASS_NAME+i+'" style="left:'+this._lineNumbersLeft+"px;width:"+this._lineNumbersWidth+'px;">'+c+"</div>":a[h]=r+c+"</div>":a[h]=""}this._renderResult=a}render(e,i){if(!this._renderResult)return"";const n=i-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}};Hv.CLASS_NAME="line-numbers";Yt((t,e)=>{const i=t.getColor(Sk);i&&e.addRule(`.monaco-editor .line-numbers { color: ${i}; }`);const n=t.getColor(u7);n&&e.addRule(`.monaco-editor .line-numbers.active-line-number { color: ${n}; }`)});var rf=class $p extends Mi{constructor(e){super(e);const i=this._context.configuration.options,n=i.get(131);this._canUseLayerHinting=!i.get(28),this._contentLeft=n.contentLeft,this._glyphMarginLeft=n.glyphMarginLeft,this._glyphMarginWidth=n.glyphMarginWidth,this._domNo
18de=de(document.createElement("div")),this._domNode.setClassName($p.OUTER_CLASS_NAME),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._glyphMarginBackgroundDomNode=de(document.createElement("div")),this._glyphMarginBackgroundDomNode.setClassName($p.CLASS_NAME),this._domNode.appendChild(this._glyphMarginBackgroundDomNode)}dispose(){super.dispose()}getDomNode(){return this._domNode}onConfigurationChanged(e){const i=this._context.configuration.options,n=i.get(131);return this._canUseLayerHinting=!i.get(28),this._contentLeft=n.contentLeft,this._glyphMarginLeft=n.glyphMarginLeft,this._glyphMarginWidth=n.glyphMarginWidth,!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollTopChanged}prepareRender(e){}render(e){this._domNode.setLayerHinting(this._canUseLayerHinting),this._domNode.setContain("strict");const i=e.scrollTop-e.bigNumbersDelta;this._domNode.setTop(-i);const n=Math.min(e.scrollHeight,1e6);this._domNode.setHeight(n),this._domNode.setWidth(this._contentLeft),this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft),this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth),this._glyphMarginBackgroundDomNode.setHeight(n)}};rf.CLASS_NAME="glyph-margin";rf.OUTER_CLASS_NAME="margin";var Gr="monaco-mouse-cursor-text",O7=class{constructor(t,e,i,n,s){this._context=t,this.modelLineNumber=e,this.distanceToModelLineStart=i,this.widthOfHiddenLineTextBefore=n,this.distanceToModelLineEnd=s,this._visibleTextAreaBrand=void 0,this.startPosition=null,this.endPosition=null,this.visibleTextareaStart=null,this.visibleTextareaEnd=null,this._previousPresentation=null}prepareRender(t){const e=new A(this.modelLineNumber,this.distanceToModelLineStart+1),i=new A(this.modelLineNumber,this._context.viewModel.model.getLineMaxColumn(this.modelLineNumber)-this.distanceToModelLineEnd);this.startPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(e),this.endPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(i),this.startPosition.lineNumber===this.endPosition.lineNumber?(this.visibleTextareaStart=t.visibleRangeForPosition(this.startPosition),this.visibleTextareaEnd=t.visibleRangeForPosition(this.endPosition)):(this.visibleTextareaStart=null,this.visibleTextareaEnd=null)}definePresentation(t){return this._previousPresentation||(t?this._previousPresentation=t:this._previousPresentation={foreground:1,italic:!1,bold:!1,underline:!1,strikethrough:!1}),this._previousPresentation}},ol=Ii,P7=class extends Mi{constructor(t,e,i){super(t),this._primaryCursorPosition=new A(1,1),this._primaryCursorVisibleRange=null,this._viewController=e,this._visibleRangeProvider=i,this._scrollLeft=0,this._scrollTop=0;const n=this._context.configuration.options,s=n.get(131);this._setAccessibilityOptions(n),this._contentLeft=s.contentLeft,this._contentWidth=s.contentWidth,this._contentHeight=s.height,this._fontInfo=n.get(44),this._lineHeight=n.get(59),this._emptySelectionClipboard=n.get(32),this._copyWithSyntaxHighlighting=n.get(21),this._visibleTextArea=null,this._selections=[new xe(1,1,1,1)],this._modelSelections=[new xe(1,1,1,1)],this._lastRenderPosition=null,this.textArea=de(document.createElement("textarea")),Hn.write(this.textArea,6),this.textArea.setClassName(`inputarea ${Gr}`),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(n)),this.textArea.setAttribute("tabindex",String(n.get(112))),this.textArea.setAttribute("role","textbox"),this.textArea.setAttribute("aria-roledescription",p("editor","editor")),this.textArea.setAttribute("aria-multiline","true"),this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),n.get(30)&&n.get(81)&&this.textArea.setAttribute("readonly","true"),this.textAreaCover=
18de(document.createElement("div")),this.textAreaCover.setPosition("absolute");const r={getLineCount:()=>this._context.viewModel.getLineCount(),getLineMaxColumn:l=>this._context.viewModel.getLineMaxColumn(l),getValueInRange:(l,h)=>this._context.viewModel.getValueInRange(l,h)},o={getDataToCopy:()=>{const l=this._context.viewModel.getPlainTextToCopy(this._modelSelections,this._emptySelectionClipboard,ei),h=this._context.viewModel.model.getEOL(),c=this._emptySelectionClipboard&&this._modelSelections.length===1&&this._modelSelections[0].isEmpty(),d=Array.isArray(l)?l:null,u=Array.isArray(l)?l.join(h):l;let g,m=null;if(JA.forceCopyWithSyntaxHighlighting||this._copyWithSyntaxHighlighting&&u.length<65536){const _=this._context.viewModel.getRichTextToCopy(this._modelSelections,this._emptySelectionClipboard);_&&(g=_.html,m=_.mode)}return{isFromEmptySelection:c,multicursorText:d,text:u,html:g,mode:m}},getScreenReaderContent:l=>{if(this._accessibilitySupport===1){if(fe){const h=this._selections[0];if(h.isEmpty()){const c=h.getStartPosition();let d=this._getWordBeforePosition(c);if(d.length===0&&(d=this._getCharacterBeforePosition(c)),d.length>0)return new Kt(d,d.length,d.length,c,c)}}return Kt.EMPTY}if(jy){const h=this._selections[0];if(h.isEmpty()){const c=h.getStartPosition(),[d,u]=this._getAndroidWordAtPosition(c);if(d.length>0)return new Kt(d,u,u,c,c)}return Kt.EMPTY}return QA.fromEditorSelection(l,r,this._selections[0],this._accessibilityPageSize,this._accessibilitySupport===0)},deduceModelPosition:(l,h,c)=>this._context.viewModel.deduceModelPositionRelativeToViewPosition(l,h,c)},a=this._register(new i7(this.textArea.domNode));this._textAreaInput=this._register(new t7(o,a,Hi,q4)),this._register(this._textAreaInput.onKeyDown(l=>{this._viewController.emitKeyDown(l)})),this._register(this._textAreaInput.onKeyUp(l=>{this._viewController.emitKeyUp(l)})),this._register(this._textAreaInput.onPaste(l=>{let h=!1,c=null,d=null;l.metadata&&(h=this._emptySelectionClipboard&&!!l.metadata.isFromEmptySelection,c=typeof l.metadata.multicursorText<"u"?l.metadata.multicursorText:null,d=l.metadata.mode),this._viewController.paste(l.text,h,c,d)})),this._register(this._textAreaInput.onCut(()=>{this._viewController.cut()})),this._register(this._textAreaInput.onType(l=>{l.replacePrevCharCnt||l.replaceNextCharCnt||l.positionDelta?this._viewController.compositionType(l.text,l.replacePrevCharCnt,l.replaceNextCharCnt,l.positionDelta):this._viewController.type(l.text)})),this._register(this._textAreaInput.onSelectionChangeRequest(l=>{this._viewController.setSelection(l)})),this._register(this._textAreaInput.onCompositionStart(l=>{const h=this.textArea.domNode,c=this._modelSelections[0],{distanceToModelLineStart:d,widthOfHiddenTextBefore:u}=(()=>{const m=h.value.substring(0,Math.min(h.selectionStart,h.selectionEnd)),_=m.lastIndexOf(`
19`),C=m.substring(_+1),w=C.lastIndexOf("	"),v=C.length-w-1,b=c.getStartPosition(),y=Math.min(b.column-1,v);return{distanceToModelLineStart:b.column-1-y,widthOfHiddenTextBefore:F7(C.substring(0,C.length-y),this._fontInfo)}})(),{distanceToModelLineEnd:g}=(()=>{const m=h.value.substring(Math.max(h.selectionStart,h.selectionEnd)),_=m.indexOf(`
20`),C=_===-1?m:m.substring(0,_),w=C.indexOf("	"),v=w===-1?C.length:C.length-w-1,b=c.getEndPosition(),y=Math.min(this._context.viewModel.model.getLineMaxColumn(b.lineNumber)-b.column,v);return{distanceToModelLineEnd:this._context.viewModel.model.getLineMaxColumn(b.lineNumber)-b.column-y}})();this._context.viewModel.revealRange("keyboard",!0,T.fromPositions(this._selections[0].getStartPosition()),0,1),this._visibleTextArea=new O7(this._context,c.startLineNumber,d,u,g),this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render(),this.textArea.setClassName(`inputarea ${Gr} ime-input`),this._viewController.compositionStart(),this._context.viewModel.onCompositionStart()})),this._register(this._textAreaInput.onCompositionUpdate(l=>{this._visibleTextArea&&(this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render())})),this._register(this._textAreaInput.onCompositionEnd(()=>{this._visibleTextArea=null,this._render(),this.textArea.setClassName(`inputarea ${Gr}`),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(t){const e='`~!@#$%^&*()-=+[{]}\\|;:",.<>/?',i=this._context.viewModel.getLineContent(t.lineNumber),n=La(e);let s=!0,r=t.column,o=!0,a=t.column,l=0;for(;l<50&&(s||o);){if(s&&r<=1&&(s=!1),s){const h=i.charCodeAt(r-2);n.get(h)!==0?s=!1:r--}if(o&&a>i.length&&(o=!1),o){const h=i.charCodeAt(a-1);n.get(h)!==0?o=!1:a++}l++}return[i.substring(r-1,a-1),t.column-r]}_getWordBeforePosition(t){const e=this._context.viewModel.getLineContent(t.lineNumber),i=La(this._context.configuration.options.get(117));let n=t.column,s=0;for(;n>1;){const r=e.charCodeAt(n-2);if(i.get(r)!==0||s>50)return e.substring(n-1,t.column-1);s++,n--}return e.substring(0,t.column-1)}_getCharacterBeforePosition(t){if(t.column>1){const e=this._context.viewModel.getLineContent(t.lineNumber).charAt(t.column-2);if(!at(e.charCodeAt(0)))return e}return""}_getAriaLabel(t){return t.get(2)===1?p("accessibilityOffAriaLabel","The editor is not accessible at this time. Press {0} for options.",Bt?"Shift+Alt+F1":"Alt+F1"):t.get(4)}_setAccessibilityOptions(t){this._accessibilitySupport=t.get(2);const e=t.get(3);this._accessibilitySupport===2&&e===co.accessibilityPageSize.defaultValue?this._accessibilityPageSize=500:this._accessibilityPageSize=e}onConfigurationChanged(t){const e=this._context.configuration.options,i=e.get(131);return this._setAccessibilityOptions(e),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._contentHeight=i.height,this._fontInfo=e.get(44),this._lineHeight=e.get(59),this._emptySelectionClipboard=e.get(32),this._copyWithSyntaxHighlighting=e.get(21),this.textArea.setAttribute("aria-label",this._getAriaLabel(e)),this.textArea.setAttribute("tabindex",String(e.get(112))),(t.hasChanged(30)||t.hasChanged(81))&&(e.get(30)&&e.get(81)?this.textArea.setAttribute("readonly","true"):this.textArea.removeAttribute("readonly")),t.hasChanged(2)&&this._textAreaInput.writeScreenReaderContent("strategy changed"),!0}onCursorStateChanged(t){return this._selections=t.selections.slice(0),this._modelSelections=t.modelSelections.slice(0),this._textAreaInput.writeScreenReaderContent("selection changed"),!0}onDecorationsChanged(t){return!0}onFlushed(t){return!0}onLinesChanged(t){return!0}onLinesDeleted(t){return!0}onLinesInserted(t){return!0}onScrollChanged(t){return this._scrollLeft=t.scrollLeft,this._scrollTop=t.scrollTop,!0}onZonesChanged(t){return!0}isFocused(){return this._textAreaInput.isFocused()}focusTextArea(){this._textAreaInput.focusTextArea()}getLastRenderData(){return this._lastRenderPosition}setAriaOptions(t){t.activeDescendant?(this.textArea.setAttribute("aria-haspopup","true"),this.textArea.setAttribute("aria-autocomplete","list"),this.textArea.setAttribute("aria-activedescendant",t.activeDescendant)):(this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),this.textArea.removeAttribute("aria-activedescendant")),t.role&&this.textArea.setAttribute("role",t.role)}prepareRender(t){this._primaryCursorPosition=new A(this._selections[0].positionLineNumber,this._selections[0].positionColumn),this._primaryCursorVisibleRange=t.visibleRangeForPosition(this._primaryCursorPosition),this._visibleTextArea&&this._visibleTextArea.prepareRender(t)}render(t){this._textAreaInput.writeScreenReaderContent("render"),this._render()}
20_render(){if(this._visibleTextArea){const i=this._visibleTextArea.visibleTextareaStart,n=this._visibleTextArea.visibleTextareaEnd,s=this._visibleTextArea.startPosition,r=this._visibleTextArea.endPosition;if(s&&r&&i&&n&&n.left>=this._scrollLeft&&i.left<=this._scrollLeft+this._contentWidth){const o=this._context.viewLayout.getVerticalOffsetForLineNumber(this._primaryCursorPosition.lineNumber)-this._scrollTop,a=this._newlinecount(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart));let l=this._visibleTextArea.widthOfHiddenLineTextBefore,h=this._contentLeft+i.left-this._scrollLeft,c=n.left-i.left+1;if(h<this._contentLeft){const _=this._contentLeft-h;h+=_,l+=_,c-=_}c>this._contentWidth&&(c=this._contentWidth);const d=this._context.viewModel.getViewLineData(s.lineNumber),u=d.tokens.findTokenIndexAtOffset(s.column-1),g=u===d.tokens.findTokenIndexAtOffset(r.column-1),m=this._visibleTextArea.definePresentation(g?d.tokens.getPresentation(u):null);this.textArea.domNode.scrollTop=a*this._lineHeight,this.textArea.domNode.scrollLeft=l,this._doRender({lastRenderPosition:null,top:o,left:h,width:c,height:this._lineHeight,useCover:!1,color:(Ge.getColorMap()||[])[m.foreground],italic:m.italic,bold:m.bold,underline:m.underline,strikethrough:m.strikethrough})}return}if(!this._primaryCursorVisibleRange){this._renderAtTopLeft();return}const t=this._contentLeft+this._primaryCursorVisibleRange.left-this._scrollLeft;if(t<this._contentLeft||t>this._contentLeft+this._contentWidth){this._renderAtTopLeft();return}const e=this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber)-this._scrollTop;if(e<0||e>this._contentHeight){this._renderAtTopLeft();return}if(fe){this._doRender({lastRenderPosition:this._primaryCursorPosition,top:e,left:t,width:ol?0:1,height:this._lineHeight,useCover:!1}),this.textArea.domNode.scrollLeft=this._primaryCursorVisibleRange.left;const i=this._newlinecount(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart));this.textArea.domNode.scrollTop=i*this._lineHeight;return}this._doRender({lastRenderPosition:this._primaryCursorPosition,top:e,left:t,width:ol?0:1,height:ol?0:1,useCover:!1})}_newlinecount(t){let e=0,i=-1;do{if(i=t.indexOf(`
21`,i+1),i===-1)break;e++}while(!0);return e}_renderAtTopLeft(){this._doRender({lastRenderPosition:null,top:0,left:0,width:ol?0:1,height:ol?0:1,useCover:!0})}_doRender(t){this._lastRenderPosition=t.lastRenderPosition;const e=this.textArea,i=this.textAreaCover;Zt(e,this._fontInfo),e.setTop(t.top),e.setLeft(t.left),e.setWidth(t.width),e.setHeight(t.height),e.setColor(t.color?O.Format.CSS.formatHex(t.color):""),e.setFontStyle(t.italic?"italic":""),t.bold&&e.setFontWeight("bold"),e.setTextDecoration(`${t.underline?" underline":""}${t.strikethrough?" line-through":""}`),i.setTop(t.useCover?t.top:0),i.setLeft(t.useCover?t.left:0),i.setWidth(t.useCover?t.width:0),i.setHeight(t.useCover?t.height:0);const n=this._context.configuration.options;n.get(50)?i.setClassName("monaco-editor-background textAreaCover "+rf.OUTER_CLASS_NAME):n.get(60).renderType!==0?i.setClassName("monaco-editor-background textAreaCover "+Hv.CLASS_NAME):i.setClassName("monaco-editor-background textAreaCover")}};function F7(t,e){if(t.length===0)return 0;const i=document.createElement("div");i.style.position="absolute",i.style.top="-50000px",i.style.width="50000px";const n=document.createElement("span");Zt(n,e),n.style.whiteSpace="pre",n.append(t),i.appendChild(n),document.body.appendChild(i);const s=n.offsetWidth;return document.body.removeChild(i),s}function B7(t,e,i){let n=0;for(let r=0;r<t.length;r++)t.charAt(r)==="	"?n+=e:n++;let s="";if(!i){const r=Math.floor(n/e);n=n%e;for(let o=0;o<r;o++)s+="	"}for(let r=0;r<n;r++)s+=" ";return s}function Dk(t,e,i){let n=fi(t);return n===-1&&(n=t.length),B7(t.substring(0,n),e,i)+t.substring(n)}var V7=()=>!0,W7=()=>!1,H7=t=>t===" "||t==="	",Io=class{constructor(t,e,i,n){this.languageConfigurationService=n,this._cursorMoveConfigurationBrand=void 0,this._languageId=t;const s=i.options,r=s.get(131);this.readOnly=s.get(81),this.tabSize=e.tabSize,this.indentSize=e.indentSize,this.insertSpaces=e.insertSpaces,this.stickyTabStops=s.get(104),this.lineHeight=s.get(59),this.pageSize=Math.max(1,Math.floor(r.height/this.lineHeight)-2),this.useTabStops=s.get(116),this.wordSeparators=s.get(117),this.emptySelectionClipboard=s.get(32),this.copyWithSyntaxHighlighting=s.get(21),this.multiCursorMergeOverlapping=s.get(69),this.multiCursorPaste=s.get(71),this.autoClosingBrackets=s.get(5),this.autoClosingQuotes=s.get(8),this.autoClosingDelete=s.get(6),this.autoClosingOvertype=s.get(7),this.autoSurround=s.get(11),this.autoIndent=s.get(9),this.surroundingPairs={},this._electricChars=null,this.shouldAutoCloseBefore={quote:this._getShouldAutoClose(t,this.autoClosingQuotes),bracket:this._getShouldAutoClose(t,this.autoClosingBrackets)},this.autoClosingPairs=this.languageConfigurationService.getLanguageConfiguration(t).getAutoClosingPairs();const o=this.languageConfigurationService.getLanguageConfiguration(t).getSurroundingPairs();if(o)for(const a of o)this.surroundingPairs[a.open]=a.close}static shouldRecreate(t){return t.hasChanged(131)||t.hasChanged(117)||t.hasChanged(32)||t.hasChanged(69)||t.hasChanged(71)||t.hasChanged(5)||t.hasChanged(8)||t.hasChanged(6)||t.hasChanged(7)||t.hasChanged(11)||t.hasChanged(116)||t.hasChanged(59)||t.hasChanged(81)}get electricChars(){var t;if(!this._electricChars){this._electricChars={};const e=(t=this.languageConfigurationService.getLanguageConfiguration(this._languageId).electricCharacter)===null||t===void 0?void 0:t.getElectricCharacters();if(e)for(const i of e)this._electricChars[i]=!0}return this._electricChars}onElectricCharacter(t,e,i){const n=Kd(e,i-1),s=this.languageConfigurationService.getLanguageConfiguration(n.languageId).electricCharacter;return s?s.onElectricCharacter(t,n,i-n.firstCharOffset):null}normalizeIndentation(t){return Dk(t,this.indentSize,this.insertSpaces)}_getShouldAutoClose(t,e){switch(e){case"beforeWhitespace":return H7;case"languageDefined":return this._getLanguageDefinedShouldAutoClose(t);case"always":return V7;case"never":return W7}}_getLanguageDefinedShouldAutoClose(t){const e=this.languageConfigurationService.getLanguageConfiguration(t).getAutoCloseBeforeSet();return i=>e.indexOf(i)!==-1}visibleColumnFromColumn(t,e){return ut.visibleColumnFromColumn(t.getLineContent(e.lineNumber),e.column,this.tabSize)}columnFromVisibleColumn(t,e,i){const n=ut.columnFromVisibleColumn(t.getLineContent(e),i,this.tabSize),s=t.getLineMinColumn(e);if(n<s)return s;const r=t.getLineMaxColumn(e);return n>r?r:n}},re=class Nk{constructor(e,i){this._cursorStateBrand=void 0,this.modelState=e,this.viewState=i}static fromModelState(e){return new z7(e)}static fromViewState(e){return new U7(e)}static fromModelSelection(e){const i=xe.liftSelection(e),n=new Ft(T.fromPositions(i.getSelectionStart()),0,i.getPosition(),0);return Nk.fromModelState(n)}static fromModelSelections(e){const i=[];for(let n=0,s=e.length;n<s;n++)i[n]=this.fromModelSelection(e[n]);return i}equals(e){return this.viewState.equals(e.viewState)&&this.modelState.equals(e.modelState)}},z7=class{constructor(t){this.modelState=t,this.viewState=null}},U7=class{constructor(t){this.modelState=null,this.viewState=t}},Ft=class ld{constructor(e,i,n,s){this._singleCursorStateBrand=void 0,this.selectionStart=e,this.selectionStartLeftoverVisibleColumns=i,this.position=n,this.leftoverVisibleColumns=s,this.selection=ld._computeSelection(this.selectionStart,this.position)}equals(e){return this.selectionStartLeftoverVisibleColumns===e.selectionStartLeftoverVisibleColumns&&this.leftoverVisibleColumns===e.leftoverVisibleColumns&&this.position.equals(e.position)&&this.selectionStart.equalsRange(e.selectionStart)}hasSelection(){return!this.selection.isEmpty()||!this.selectionStart.isEmpty()}move(e,i,n,s){return e?new ld(this.selectionStart,this.selectionStartLeftoverVisibleColumns,new A(i,n),s):new ld(new T(i,n,i,n),s,new A(i,n),s)}static _computeSelection(e,i){return e.isEmpty()||!i.isBeforeOrEqual(e.getStartPosition())?xe.fromPositions(e.getStartPosition(),i):xe.fromPositions(e.getEndPosition(),i)}},Qt=class{constructor(t,e,i){this._editOperationResultBrand=void 0,this.type=t,this.commands=e,this.shouldPushStackElementBefore=i.shouldPushStackElementBefore,this.shouldPushStackElementAfter=i.shouldPushStackElementAfter}};function Fo(t){return t==="'"||t==='"'||t==="`"}var al=class Tk{static columnSelect(e,i,n,s,r,o){const a=Math.abs(r-n)+1,l=n>r,h=s>o,c=s<o,d=[];for(let u=0;u<a;u++){const g=n+(l?-u:u),m=e.columnFromVisibleColumn(i,g,s),_=e.columnFromVisibleColumn(i,g,o),C=e.visibleColumnFromColumn(i,new A(g,m)),w=e.visibleColumnFromColumn(i,new A(g,_));c&&(C>o||w<s)||h&&(w>
vendor: 32,001 bytes, lines 21-35
21s||C<o)||d.push(new Ft(new T(g,m,g,m),0,new A(g,_),0))}if(d.length===0)for(let u=0;u<a;u++){const g=n+(l?-u:u),m=i.getLineMaxColumn(g);d.push(new Ft(new T(g,m,g,m),0,new A(g,m),0))}return{viewStates:d,reversed:l,fromLineNumber:n,fromVisualColumn:s,toLineNumber:r,toVisualColumn:o}}static columnSelectLeft(e,i,n){let s=n.toViewVisualColumn;return s>0&&s--,Tk.columnSelect(e,i,n.fromViewLineNumber,n.fromViewVisualColumn,n.toViewLineNumber,s)}static columnSelectRight(e,i,n){let s=0;const r=Math.min(n.fromViewLineNumber,n.toViewLineNumber),o=Math.max(n.fromViewLineNumber,n.toViewLineNumber);for(let l=r;l<=o;l++){const h=i.getLineMaxColumn(l),c=e.visibleColumnFromColumn(i,new A(l,h));s=Math.max(s,c)}let a=n.toViewVisualColumn;return a<s&&a++,this.columnSelect(e,i,n.fromViewLineNumber,n.fromViewVisualColumn,n.toViewLineNumber,a)}static columnSelectUp(e,i,n,s){const r=s?e.pageSize:1,o=Math.max(1,n.toViewLineNumber-r);return this.columnSelect(e,i,n.fromViewLineNumber,n.fromViewVisualColumn,o,n.toViewVisualColumn)}static columnSelectDown(e,i,n,s){const r=s?e.pageSize:1,o=Math.min(i.getLineCount(),n.toViewLineNumber+r);return this.columnSelect(e,i,n.fromViewLineNumber,n.fromViewVisualColumn,o,n.toViewVisualColumn)}},zt=class{constructor(t,e,i=!1){this._range=t,this._text=e,this.insertsAutoWhitespace=i}getEditOperations(t,e){e.addTrackedEditOperation(this._range,this._text)}computeCursorState(t,e){const i=e.getInverseEditOperations()[0].range;return xe.fromPositions(i.getEndPosition())}},sc=class{constructor(t,e,i=!1){this._range=t,this._text=e,this.insertsAutoWhitespace=i}getEditOperations(t,e){e.addTrackedEditOperation(this._range,this._text)}computeCursorState(t,e){const i=e.getInverseEditOperations()[0].range;return xe.fromPositions(i.getStartPosition())}},hd=class{constructor(t,e,i,n,s=!1){this._range=t,this._text=e,this._columnDeltaOffset=n,this._lineNumberDeltaOffset=i,this.insertsAutoWhitespace=s}getEditOperations(t,e){e.addTrackedEditOperation(this._range,this._text)}computeCursorState(t,e){const i=e.getInverseEditOperations()[0].range;return xe.fromPositions(i.getEndPosition().delta(this._lineNumberDeltaOffset,this._columnDeltaOffset))}},Mk=class{constructor(t,e,i,n=!1){this._range=t,this._text=e,this._initialSelection=i,this._forceMoveMarkers=n,this._selectionId=null}getEditOperations(t,e){e.addTrackedEditOperation(this._range,this._text,this._forceMoveMarkers),this._selectionId=e.trackSelection(this._initialSelection)}computeCursorState(t,e){return e.getTrackedSelection(this._selectionId)}},Yf=class{constructor(t,e,i){this._cursorPositionBrand=void 0,this.lineNumber=t,this.column=e,this.leftoverVisibleColumns=i}},Qe=class Wt{static leftPosition(e,i){if(i.column>e.getLineMinColumn(i.lineNumber))return i.delta(void 0,-Hy(e.getLineContent(i.lineNumber),i.column-1));if(i.lineNumber>1){const n=i.lineNumber-1;return new A(n,e.getLineMaxColumn(n))}else return i}static leftPositionAtomicSoftTabs(e,i,n){if(i.column<=e.getLineIndentColumn(i.lineNumber)){const s=e.getLineMinColumn(i.lineNumber),r=e.getLineContent(i.lineNumber),o=Bp.atomicPosition(r,i.column-1,n,0);if(o!==-1&&o+1>=s)return new A(i.lineNumber,o+1)}return this.leftPosition(e,i)}static left(e,i,n){const s=e.stickyTabStops?Wt.leftPositionAtomicSoftTabs(i,n,e.tabSize):Wt.leftPosition(i,n);return new Yf(s.lineNumber,s.column,0)}static moveLeft(e,i,n,s,r){let o,a;if(n.hasSelection()&&!s)o=n.selection.startLineNumber,a=n.selection.startColumn;else{const l=n.position.delta(void 0,-(r-1)),h=i.normalizePosition(Wt.clipPositionColumn(l,i),0),c=Wt.left(e,i,h);o=c.lineNumber,a=c.column}return n.move(s,o,a,0)}static clipPositionColumn(e,i){return new A(e.lineNumber,Wt.clipRange(e.column,i.getLineMinColumn(e.lineNumber),i.getLineMaxColumn(e.lineNumber)))}static clipRange(e,i,n){return e<i?i:e>n?n:e}static rightPosition(e,i,n){return n<e.getLineMaxColumn(i)?n=n+av(e.getLineContent(i),n-1):i<e.getLineCount()&&(i=i+1,n=e.getLineMinColumn(i)),new A(i,n)}static rightPositionAtomicSoftTabs(e,i,n,s,r){if(n<e.getLineIndentColumn(i)){const o=e.getLineContent(i),a=Bp.atomicPosition(o,n-1,s,1);if(a!==-1)return new A(i,a+1)}return this.rightPosition(e,i,n)}static right(e,i,n){const s=e.stickyTabStops?Wt.rightPositionAtomicSoftTabs(i,n.lineNumber,n.column,e.tabSize,e.indentSize):Wt.rightPosition(i,n.lineNumber,n.column);return new Yf(s.lineNumber,s.column,0)}static moveRight(e,i,n,s,r){let o,a;if(n.hasSelection()&&!s)o=n.selection.endLineNumber,a=n.selection.endColumn;else{const l=n.position.delta(void 0,r-1),h=i.normalizePosition(Wt.clipPositionColumn(l,i),1),c=Wt.right(e,i,h);o=c.lineNumber,a=c.column}return n.move(s,o,a,0)}static vertical(e,i,n,s,r,o,a,l){const h=ut.visibleColumnFromColumn(i.getLineContent(n),s,e.tabSize)+r,c=i.getLineCount(),d=n===1&&s===1,u=n===c&&s===i.getLineMaxColumn(n),g=o<n?d:u;if(n=o,n<1?(n=1,a?s=i.getLineMinColumn(n):s=Math.min(i.getLineMaxColumn(n),s)):n>c?(n=c,a?s=i.getLineMaxColumn(n):s=Math.min(i.getLineMaxColumn(n),s)):s=e.columnFromVisibleColumn(i,n,h),g?r=0:r=h-ut.visibleColumnFromColumn(i.getLineContent(n),s,e.tabSize),l!==void 0){const m=new A(n,s),_=i.normalizePosition(m,l);r=r+(s-_.column),n=_.lineNumber,s=_.column}return new Yf(n,s,r)}static down(e,i,n,s,r,o,a){return this.vertical(e,i,n,s,r,n+o,a,1)}static moveDown(e,i,n,s,r){let o,a;n.hasSelection()&&!s?(o=n.selection.endLineNumber,a=n.selection.endColumn):(o=n.position.lineNumber,a=n.position.column);const l=Wt.down(e,i,o,a,n.leftoverVisibleColumns,r,!0);return n.move(s,l.lineNumber,l.column,l.leftoverVisibleColumns)}static translateDown(e,i,n){const s=n.selection,r=Wt.down(e,i,s.selectionStartLineNumber,s.selectionStartColumn,n.selectionStartLeftoverVisibleColumns,1,!1),o=Wt.down(e,i,s.positionLineNumber,s.positionColumn,n.leftoverVisibleColumns,1,!1);return new Ft(new T(r.lineNumber,r.column,r.lineNumber,r.column),r.leftoverVisibleColumns,new A(o.lineNumber,o.column),o.leftoverVisibleColumns)}static up(e,i,n,s,r,o,a){return this.vertical(e,i,n,s,r,n-o,a,0)}static moveUp(e,i,n,s,r){let o,a;n.hasSelection()&&!s?(o=n.selection.startLineNumber,a=n.selection.startColumn):(o=n.position.lineNumber,a=n.position.column);const l=Wt.up(e,i,o,a,n.leftoverVisibleColumns,r,!0);return n.move(s,l.lineNumber,l.column,l.leftoverVisibleColumns)}static translateUp(e,i,n){const s=n.selection,r=Wt.up(e,i,s.selectionStartLineNumber,s.selectionStartColumn,n.selectionStartLeftoverVisibleColumns,1,!1),o=Wt.up(e,i,s.positionLineNumber,s.positionColumn,n.leftoverVisibleColumns,1,!1);return new Ft(new T(r.lineNumber,r.column,r.lineNumber,r.column),r.leftoverVisibleColumns,new A(o.lineNumber,o.column),o.leftoverVisibleColumns)}static _isBlankLine(e,i){return e.getLineFirstNonWhitespaceColumn(i)===0}static moveToPrevBlankLine(e,i,n,s){let r=n.position.lineNumber;for(;r>1&&this._isBlankLine(i,r);)r--;for(;r>1&&!this._isBlankLine(i,r);)r--;return n.move(s,r,i.getLineMinColumn(r),0)}static moveToNextBlankLine(e,i,n,s){const r=i.getLineCount();let o=n.position.lineNumber;for(;o<r&&this._isBlankLine(i,o);)o++;for(;o<r&&!this._isBlankLine(i,o);)o++;return n.move(s,o,i.getLineMinColumn(o),0)}static moveToBeginningOfLine(e,i,n,s){const r=n.position.lineNumber,o=i.getLineMinColumn(r),a=i.getLineFirstNonWhitespaceColumn(r)||o;let l;return n.position.column===a?l=o:l=a,n.move(s,r,l,0)}static moveToEndOfLine(e,i,n,s,r){const o=n.position.lineNumber,a=i.getLineMaxColumn(o);return n.move(s,o,a,r?1073741824-a:0)}static moveToBeginningOfBuffer(e,i,n,s){return n.move(s,1,1,0)}static moveToEndOfBuffer(e,i,n,s){const r=i.getLineCount(),o=i.getLineMaxColumn(r);return n.move(s,r,o,0)}},au=class Kp{static deleteRight(e,i,n,s){const r=[];let o=e!==3;for(let a=0,l=s.length;a<l;a++){const h=s[a];let c=h;if(c.isEmpty()){const d=h.getPosition(),u=Qe.right(i,n,d);c=new T(u.lineNumber,u.column,d.lineNumber,d.column)}if(c.isEmpty()){r[a]=null;continue}c.startLineNumber!==c.endLineNumber&&(o=!0),r[a]=new zt(c,"")}return[o,r]}static isAutoClosingPairDelete(e,i,n,s,r,o,a){if(i==="never"&&n==="never"||e==="never")return!1;for(let l=0,h=o.length;l<h;l++){const c=o[l],d=c.getPosition();if(!c.isEmpty())return!1;const u=r.getLineContent(d.lineNumber);if(d.column<2||d.column>=u.length+1)return!1;const g=u.charAt(d.column-2),m=s.get(g);if(!m)return!1;if(Fo(g)){if(n==="never")return!1}else if(i==="never")return!1;const _=u.charAt(d.column-1);let C=!1;for(const w of m)w.open===g&&w.close===_&&(C=!0);if(!C)return!1;if(e==="auto"){let w=!1;for(let v=0,b=a.length;v<b;v++){const y=a[v];if(d.lineNumber===y.startLineNumber&&d.column===y.startColumn){w=!0;break}}if(!w)return!1}}return!0}static _runAutoClosingPairDelete(e,i,n){const s=[];for(let r=0,o=n.length;r<o;r++){const a=n[r].getPosition(),l=new T(a.lineNumber,a.column-1,a.lineNumber,a.column+1);s[r]=new zt(l,"")}return[!0,s]}static deleteLeft(e,i,n,s,r){if(this.isAutoClosingPairDelete(i.autoClosingDelete,i.autoClosingBrackets,i.autoClosingQuotes,i.autoClosingPairs.autoClosingPairsOpenByEnd,n,s,r))return this._runAutoClosingPairDelete(i,n,s);const o=[];let a=e!==2;for(let l=0,h=s.length;l<h;l++){const c=Kp.getDeleteRange(s[l],n,i);if(c.isEmpty()){o[l]=null;continue}c.startLineNumber!==c.endLineNumber&&(a=!0),o[l]=new zt(c,"")}return[a,o]}static getDeleteRange(e,i,n){if(!e.isEmpty())return e;const s=e.getPosition();if(n.useTabStops&&s.column>1){const r=i.getLineContent(s.lineNumber),o=fi(r),a=o===-1?r.length+1:o+1;if(s.column<=a){const l=n.visibleColumnFromColumn(i,s),h=ut.prevIndentTabStop(l,n.indentSize),c=n.columnFromVisibleColumn(i,s.lineNumber,h);return new T(s.lineNumber,c,s.lineNumber,s.column)}}return T.fromPositions(Kp.getPositionAfterDeleteLeft(s,i),s)}static getPositionAfterDeleteLeft(e,i){if(e.column>1){const n=$4(e.column-1,i.getLineContent(e.lineNumber));return e.with(void 0,n+1)}else if(e.lineNumber>1){const n=e.lineNumber-1;return new A(n,i.getLineMaxColumn(n))}else return e}static cut(e,i,n){const s=[];let r=null;n.sort((o,a)=>A.compare(o.getStartPosition(),a.getEndPosition()));for(let o=0,a=n.length;o<a;o++){const l=n[o];if(l.isEmpty())if(e.emptySelectionClipboard){const h=l.getPosition();let c,d,u,g;h.lineNumber<i.getLineCount()?(c=h.lineNumber,d=1,u=h.lineNumber+1,g=1):h.lineNumber>1&&r?.endLineNumber!==h.lineNumber?(c=h.lineNumber-1,d=i.getLineMaxColumn(h.lineNumber-1),u=h.lineNumber,g=i.getLineMaxColumn(h.lineNumber)):(c=h.lineNumber,d=1,u=h.lineNumber,g=i.getLineMaxColumn(h.lineNumber));const m=new T(c,d,u,g);r=m,m.isEmpty()?s[o]=null:s[o]=new zt(m,"")}else s[o]=null;else s[o]=new zt(l,"")}return new Qt(0,s,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}},Rk=class je{static _createWord(e,i,n,s,r){return{start:s,end:r,wordType:i,nextCharClass:n}}static _findPreviousWordOnLine(e,i,n){const s=i.getLineContent(n.lineNumber);return this._doFindPreviousWordOnLine(s,e,n)}static _doFindPreviousWordOnLine(e,i,n){let s=0;for(let r=n.column-2;r>=0;r--){const o=e.charCodeAt(r),a=i.get(o);if(a===0){if(s===2)return this._createWord(e,s,a,r+1,this._findEndOfWord(e,i,s,r+1));s=1}else if(a===2){if(s===1)return this._createWord(e,s,a,r+1,this._findEndOfWord(e,i,s,r+1));s=2}else if(a===1&&s!==0)return this._createWord(e,s,a,r+1,this._findEndOfWord(e,i,s,r+1))}return s!==0?this._createWord(e,s,1,0,this._findEndOfWord(e,i,s,0)):null}static _findEndOfWord(e,i,n,s){const r=e.length;for(let o=s;o<r;o++){const a=e.charCodeAt(o),l=i.get(a);if(l===1||n===1&&l===2||n===2&&l===0)return o}return r}static _findNextWordOnLine(e,i,n){const s=i.getLineContent(n.lineNumber);return this._doFindNextWordOnLine(s,e,n)}static _doFindNextWordOnLine(e,i,n){let s=0;const r=e.length;for(let o=n.column-1;o<r;o++){const a=e.charCodeAt(o),l=i.get(a);if(l===0){if(s===2)return this._createWord(e,s,l,this._findStartOfWord(e,i,s,o-1),o);s=1}else if(l===2){if(s===1)return this._createWord(e,s,l,this._findStartOfWord(e,i,s,o-1),o);s=2}else if(l===1&&s!==0)return this._createWord(e,s,l,this._findStartOfWord(e,i,s,o-1),o)}return s!==0?this._createWord(e,s,1,this._findStartOfWord(e,i,s,r-1),r):null}static _findStartOfWord(e,i,n,s){for(let r=s;r>=0;r--){const o=e.charCodeAt(r),a=i.get(o);if(a===1||n===1&&a===2||n===2&&a===0)return r+1}return 0}static moveWordLeft(e,i,n,s){let r=n.lineNumber,o=n.column;o===1&&r>1&&(r=r-1,o=i.getLineMaxColumn(r));let a=je._findPreviousWordOnLine(e,i,new A(r,o));if(s===0)return new A(r,a?a.start+1:1);if(s===1)return a&&a.wordType===2&&a.end-a.start===1&&a.nextCharClass===0&&(a=je._findPreviousWordOnLine(e,i,new A(r,a.start+1))),new A(r,a?a.start+1:1);if(s===3){for(;a&&a.wordType===2;)a=je._findPreviousWordOnLine(e,i,new A(r,a.start+1));return new A(r,a?a.start+1:1)}return a&&o<=a.end+1&&(a=je._findPreviousWordOnLine(e,i,new A(r,a.start+1))),new A(r,a?a.end+1:1)}static _moveWordPartLeft(e,i){const n=i.lineNumber,s=e.getLineMaxColumn(n);if(i.column===1)return n>1?new A(n-1,e.getLineMaxColumn(n-1)):i;const r=e.getLineContent(n);for(let o=i.column-1;o>1;o--){const a=r.charCodeAt(o-2),l=r.charCodeAt(o-1);if(a===95&&l!==95)return new A(n,o);if(Ko(a)&&Os(l))return new A(n,o);if(Os(a)&&Os(l)&&o+1<s){const h=r.charCodeAt(o);if(Ko(h))return new A(n,o)}}return new A(n,1)}static moveWordRight(e,i,n,s){let r=n.lineNumber,o=n.column,a=!1;o===i.getLineMaxColumn(r)&&r<i.getLineCount()&&(a=!0,r=r+1,o=1);let l=je._findNextWordOnLine(e,i,new A(r,o));if(s===2)l&&l.wordType===2&&l.end-l.start===1&&l.nextCharClass===0&&(l=je._findNextWordOnLine(e,i,new A(r,l.end+1))),l?o=l.end+1:o=i.getLineMaxColumn(r);else if(s===3){for(a&&(o=0);l&&(l.wordType===2||l.start+1<=o);)l=je._findNextWordOnLine(e,i,new A(r,l.end+1));l?o=l.start+1:o=i.getLineMaxColumn(r)}else l&&!a&&o>=l.start+1&&(l=je._findNextWordOnLine(e,i,new A(r,l.end+1))),l?o=l.start+1:o=i.getLineMaxColumn(r);return new A(r,o)}static _moveWordPartRight(e,i){const n=i.lineNumber,s=e.getLineMaxColumn(n);if(i.column===s)return n<e.getLineCount()?new A(n+1,1):i;const r=e.getLineContent(n);for(let o=i.column+1;o<s;o++){const a=r.charCodeAt(o-2),l=r.charCodeAt(o-1);if(a!==95&&l===95)return new A(n,o);if(Ko(a)&&Os(l))return new A(n,o);if(Os(a)&&Os(l)&&o+1<s){const h=r.charCodeAt(o);if(Ko(h))return new A(n,o)}}return new A(n,s)}static _deleteWordLeftWhitespace(e,i){const n=e.getLineContent(i.lineNumber),s=i.column-2,r=Va(n,s);return r+1<s?new T(i.lineNumber,r+2,i.lineNumber,i.column):null}static deleteWordLeft(e,i){const n=e.wordSeparators,s=e.model,r=e.selection,o=e.whitespaceHeuristics;if(!r.isEmpty())return r;if(au.isAutoClosingPairDelete(e.autoClosingDelete,e.autoClosingBrackets,e.autoClosingQuotes,e.autoClosingPairs.autoClosingPairsOpenByEnd,e.model,[e.selection],e.autoClosedCharacters)){const d=e.selection.getPosition();return new T(d.lineNumber,d.column-1,d.lineNumber,d.column+1)}const a=new A(r.positionLineNumber,r.positionColumn);let l=a.lineNumber,h=a.column;if(l===1&&h===1)return null;if(o){const d=this._deleteWordLeftWhitespace(s,a);if(d)return d}let c=je._findPreviousWordOnLine(n,s,a);return i===0?c?h=c.start+1:h>1?h=1:(l--,h=s.getLineMaxColumn(l)):(c&&h<=c.end+1&&(c=je._findPreviousWordOnLine(n,s,new A(l,c.start+1))),c?h=c.end+1:h>1?h=1:(l--,h=s.getLineMaxColumn(l))),new T(l,h,a.lineNumber,a.column)}static deleteInsideWord(e,i,n){if(!n.isEmpty())return n;const s=new A(n.positionLineNumber,n.positionColumn),r=this._deleteInsideWordWhitespace(i,s);return r||this._deleteInsideWordDetermineDeleteRange(e,i,s)}static _charAtIsWhitespace(e,i){const n=e.charCodeAt(i);return n===32||n===9}static _deleteInsideWordWhitespace(e,i){const n=e.getLineContent(i.lineNumber),s=n.length;if(s===0)return null;let r=Math.max(i.column-2,0);if(!this._charAtIsWhitespace(n,r))return null;let o=Math.min(i.column-1,s-1);if(!this._charAtIsWhitespace(n,o))return null;for(;r>0&&this._charAtIsWhitespace(n,r-1);)r--;for(;o+1<s&&this._charAtIsWhitespace(n,o+1);)o++;return new T(i.lineNumber,r+1,i.lineNumber,o+2)}static _deleteInsideWordDetermineDeleteRange(e,i,n){const s=i.getLineContent(n.lineNumber),r=s.length;if(r===0)return n.lineNumber>1?new T(n.lineNumber-1,i.getLineMaxColumn(n.lineNumber-1),n.lineNumber,1):n.lineNumber<i.getLineCount()?new T(n.lineNumber,1,n.lineNumber+1,1):new T(n.lineNumber,1,n.lineNumber,1);const o=d=>d.start+1<=n.column&&n.column<=d.end+1,a=(d,u)=>(d=Math.min(d,n.column),u=Math.max(u,n.column),new T(n.lineNumber,d,n.lineNumber,u)),l=d=>{let u=d.start+1,g=d.end+1,m=!1;for(;g-1<r&&this._charAtIsWhitespace(s,g-1);)m=!0,g++;if(!m)for(;u>1&&this._charAtIsWhitespace(s,u-2);)u--;return a(u,g)},h=je._findPreviousWordOnLine(e,i,n);if(h&&o(h))return l(h);const c=je._findNextWordOnLine(e,i,n);return c&&o(c)?l(c):h&&c?a(h.end+1,c.start+1):h?a(h.start+1,h.end+1):c?a(c.start+1,c.end+1):a(1,r+1)}static _deleteWordPartLeft(e,i){if(!i.isEmpty())return i;const n=i.getPosition(),s=je._moveWordPartLeft(e,n);return new T(n.lineNumber,n.column,s.lineNumber,s.column)}static _findFirstNonWhitespaceChar(e,i){const n=e.length;for(let s=i;s<n;s++){const r=e.charAt(s);if(r!==" "&&r!=="	")return s}return n}static _deleteWordRightWhitespace(e,i){const n=e.getLineContent(i.lineNumber),s=i.column-1,r=this._findFirstNonWhitespaceChar(n,s);return s+1<r?new T(i.lineNumber,i.column,i.lineNumber,r+1):null}static deleteWordRight(e,i){const n=e.wordSeparators,s=e.model,r=e.selection,o=e.whitespaceHeuristics;if(!r.isEmpty())return r;const a=new A(r.positionLineNumber,r.positionColumn);let l=a.lineNumber,h=a.column;const c=s.getLineCount(),d=s.getLineMaxColumn(l);if(l===c&&h===d)return null;if(o){const g=this._deleteWordRightWhitespace(s,a);if(g)return g}let u=je._findNextWordOnLine(n,s,a);return i===2?u?h=u.end+1:h<d||l===c?h=d:(l++,u=je._findNextWordOnLine(n,s,new A(l,1)),u?h=u.start+1:h=s.getLineMaxColumn(l)):(u&&h>=u.start+1&&(u=je._findNextWordOnLine(n,s,new A(l,u.end+1))),u?h=u.start+1:h<d||l===c?h=d:(l++,u=je._findNextWordOnLine(n,s,new A(l,1)),u?h=u.start+1:h=s.getLineMaxColumn(l))),new T(l,h,a.lineNumber,a.column)}static _deleteWordPartRight(e,i){if(!i.isEmpty())return i;const n=i.getPosition(),s=je._moveWordPartRight(e,n);return new T(n.lineNumber,n.column,s.lineNumber,s.column)}static _createWordAtPosition(e,i,n){const s=new T(i,n.start+1,i,n.end+1);return{word:e.getValueInRange(s),startColumn:s.startColumn,endColumn:s.endColumn}}static getWordAtPosition(e,i,n){const s=La(i),r=je._findPreviousWordOnLine(s,e,n);if(r&&r.wordType===1&&r.start<=n.column-1&&n.column-1<=r.end)return je._createWordAtPosition(e,n.lineNumber,r);const o=je._findNextWordOnLine(s,e,n);return o&&o.wordType===1&&o.start<=n.column-1&&n.column-1<=o.end?je._createWordAtPosition(e,n.lineNumber,o):null}static word(e,i,n,s,r){const o=La(e.wordSeparators),a=je._findPreviousWordOnLine(o,i,r),l=je._findNextWordOnLine(o,i,r);if(!s){let g,m;return a&&a.wordType===1&&a.start<=r.column-1&&r.column-1<=a.end?(g=a.start+1,m=a.end+1):l&&l.wordType===1&&l.start<=r.column-1&&r.column-1<=l.end?(g=l.start+1,m=l.end+1):(a?g=a.end+1:g=1,l?m=l.start+1:m=i.getLineMaxColumn(r.lineNumber)),new Ft(new T(r.lineNumber,g,r.lineNumber,m),0,new A(r.lineNumber,m),0)}let h,c;a&&a.wordType===1&&a.start<r.column-1&&r.column-1<a.end?(h=a.start+1,c=a.end+1):l&&l.wordType===1&&l.start<r.column-1&&r.column-1<l.end?(h=l.start+1,c=l.end+1):(h=r.column,c=r.column);const d=r.lineNumber;let u;if(n.selectionStart.containsPosition(r))u=n.selectionStart.endColumn;else if(r.isBeforeOrEqual(n.selectionStart.getStartPosition())){u=h;const g=new A(d,u);n.selectionStart.containsPosition(g)&&(u=n.selectionStart.endColumn)}else{u=c;const g=new A(d,u);n.selectionStart.containsPosition(g)&&(u=n.selectionStart.startColumn)}return n.move(!0,d,u,0)}},kt=class{static addCursorDown(t,e,i){const n=[];let s=0;for(let r=0,o=e.length;r<o;r++){const a=e[r];n[s++]=new re(a.modelState,a.viewState),i?n[s++]=re.fromModelState(Qe.translateDown(t.cursorConfig,t.model,a.modelState)):n[s++]=re.fromViewState(Qe.translateDown(t.cursorConfig,t,a.viewState))}return n}static addCursorUp(t,e,i){const n=[];let s=0;for(let r=0,o=e.length;r<o;r++){const a=e[r];n[s++]=new re(a.modelState,a.viewState),i?n[s++]=re.fromModelState(Qe.translateUp(t.cursorConfig,t.model,a.modelState)):n[s++]=re.fromViewState(Qe.translateUp(t.cursorConfig,t,a.viewState))}return n}static moveToBeginningOfLine(t,e,i){let n=[];for(let s=0,r=e.length;s<r;s++){const o=e[s];n[s]=this._moveToLineStart(t,o,i)}return n}static _moveToLineStart(t,e,i){const n=e.viewState.position.column,s=n===e.modelState.position.column,r=e.viewState.position.lineNumber,o=n===t.getLineFirstNonWhitespaceColumn(r);return!s&&!o?this._moveToLineStartByView(t,e,i):this._moveToLineStartByModel(t,e,i)}static _moveToLineStartByView(t,e,i){return re.fromViewState(Qe.moveToBeginningOfLine(t.cursorConfig,t,e.viewState,i))}static _moveToLineStartByModel(t,e,i){return re.fromModelState(Qe.moveToBeginningOfLine(t.cursorConfig,t.model,e.modelState,i))}static moveToEndOfLine(t,e,i,n){const s=[];for(let r=0,o=e.length;r<o;r++){const a=e[r];s[r]=this._moveToLineEnd(t,a,i,n)}return s}static _moveToLineEnd(t,e,i,n){const s=e.viewState.position,r=t.getLineMaxColumn(s.lineNumber),o=s.column===r,a=e.modelState.position,l=t.model.getLineMaxColumn(a.lineNumber),h=r-s.column===l-a.column;return o||h?this._moveToLineEndByModel(t,e,i,n):this._moveToLineEndByView(t,e,i,n)}static _moveToLineEndByView(t,e,i,n){return re.fromViewState(Qe.moveToEndOfLine(t.cursorConfig,t,e.viewState,i,n))}static _moveToLineEndByModel(t,e,i,n){return re.fromModelState(Qe.moveToEndOfLine(t.cursorConfig,t.model,e.modelState,i,n))}static expandLineSelection(t,e){const i=[];for(let n=0,s=e.length;n<s;n++){const r=e[n],o=r.modelState.selection.startLineNumber,a=t.model.getLineCount();let l=r.modelState.selection.endLineNumber,h;l===a?h=t.model.getLineMaxColumn(a):(l++,h=1),i[n]=re.fromModelState(new Ft(new T(o,1,o,1),0,new A(l,h),0))}return i}static moveToBeginningOfBuffer(t,e,i){const n=[];for(let s=0,r=e.length;s<r;s++){const o=e[s];n[s]=re.fromModelState(Qe.moveToBeginningOfBuffer(t.cursorConfig,t.model,o.modelState,i))}return n}static moveToEndOfBuffer(t,e,i){const n=[];for(let s=0,r=e.length;s<r;s++){const o=e[s];n[s]=re.fromModelState(Qe.moveToEndOfBuffer(t.cursorConfig,t.model,o.modelState,i))}return n}static selectAll(t,e){const i=t.model.getLineCount(),n=t.model.getLineMaxColumn(i);return re.fromModelState(new Ft(new T(1,1,1,1),0,new A(i,n),0))}static line(t,e,i,n,s){const r=t.model.validatePosition(n),o=s?t.coordinatesConverter.validateViewPosition(new A(s.lineNumber,s.column),r):t.coordinatesConverter.convertModelPositionToViewPosition(r);if(!i||!e.modelState.hasSelection()){const l=t.model.getLineCount();let h=r.lineNumber+1,c=1;return h>l&&(h=l,c=t.model.getLineMaxColumn(h)),re.fromModelState(new Ft(new T(r.lineNumber,1,h,c),0,new A(h,c),0))}const a=e.modelState.selectionStart.getStartPosition().lineNumber;if(r.lineNumber<a)return re.fromViewState(e.viewState.move(e.modelState.hasSelection(),o.lineNumber,1,0));if(r.lineNumber>a){const l=t.getLineCount();let h=o.lineNumber+1,c=1;return h>l&&(h=l,c=t.getLineMaxColumn(h)),re.fromViewState(e.viewState.move(e.modelState.hasSelection(),h,c,0))}else{const l=e.modelState.selectionStart.getEndPosition();return re.fromModelState(e.modelState.move(e.modelState.hasSelection(),l.lineNumber,l.column,0))}}static word(t,e,i,n){const s=t.model.validatePosition(n);return re.fromModelState(Rk.word(t.cursorConfig,t.model,e.modelState,i,s))}static cancelSelection(t,e){if(!e.modelState.hasSelection())return new re(e.modelState,e.viewState);const i=e.viewState.position.lineNumber,n=e.viewState.position.column;return re.fromViewState(new Ft(new T(i,n,i,n),0,new A(i,n),0))}static moveTo(t,e,i,n,s){const r=t.model.validatePosition(n),o=s?t.coordinatesConverter.validateViewPosition(new A(s.lineNumber,s.column),r):t.coordinatesConverter.convertModelPositionToViewPosition(r);return re.fromViewState(e.viewState.move(i,o.lineNumber,o.column,0))}static simpleMove(t,e,i,n,s,r){switch(i){case 0:return r===4?this._moveHalfLineLeft(t,e,n):this._moveLeft(t,e,n,s);case 1:return r===4?this._moveHalfLineRight(t,e,n):this._moveRight(t,e,n,s);case 2:return r===2?this._moveUpByViewLines(t,e,n,s):this._moveUpByModelLines(t,e,n,s);case 3:return r===2?this._moveDownByViewLines(t,e,n,s):this._moveDownByModelLines(t,e,n,s);case 4:return r===2?e.map(o=>re.fromViewState(Qe.moveToPrevBlankLine(t.cursorConfig,t,o.viewState,n))):e.map(o=>re.fromModelState(Qe.moveToPrevBlankLine(t.cursorConfig,t.model,o.modelState,n)));case 5:return r===2?e.map(o=>re.fromViewState(Qe.moveToNextBlankLine(t.cursorConfig,t,o.viewState,n))):e.map(o=>re.fromModelState(Qe.moveToNextBlankLine(t.cursorConfig,t.model,o.modelState,n)));case 6:return this._moveToViewMinColumn(t,e,n);case 7:return this._moveToViewFirstNonWhitespaceColumn(t,e,n);case 8:return this._moveToViewCenterColumn(t,e,n);case 9:return this._moveToViewMaxColumn(t,e,n);case 10:return this._moveToViewLastNonWhitespaceColumn(t,e,n);default:return null}}static viewportMove(t,e,i,n,s){const r=t.getCompletelyVisibleViewRange(),o=t.coordinatesConverter.convertViewRangeToModelRange(r);switch(i){case 11:{const a=this._firstLineNumberInRange(t.model,o,s),l=t.model.getLineFirstNonWhitespaceColumn(a);return[this._moveToModelPosition(t,e[0],n,a,l)]}case 13:{const a=this._lastLineNumberInRange(t.model,o,s),l=t.model.getLineFirstNonWhitespaceColumn(a);return[this._moveToModelPosition(t,e[0],n,a,l)]}case 12:{const a=Math.round((o.startLineNumber+o.endLineNumber)/2),l=t.model.getLineFirstNonWhitespaceColumn(a);return[this._moveToModelPosition(t,e[0],n,a,l)]}case 14:{const a=[];for(let l=0,h=e.length;l<h;l++){const c=e[l];a[l]=this.findPositionInViewportIfOutside(t,c,r,n)}return a}default:return null}}static findPositionInViewportIfOutside(t,e,i,n){const s=e.viewState.position.lineNumber;if(i.startLineNumber<=s&&s<=i.endLineNumber-1)return new re(e.modelState,e.viewState);{let r;s>i.endLineNumber-1?r=i.endLineNumber-1:s<i.startLineNumber?r=i.startLineNumber:r=s;const o=Qe.vertical(t.cursorConfig,t,s,e.viewState.position.column,e.viewState.leftoverVisibleColumns,r,!1);return re.fromViewState(e.viewState.move(n,o.lineNumber,o.column,o.leftoverVisibleColumns))}}static _firstLineNumberInRange(t,e,i){let n=e.startLineNumber;return e.startColumn!==t.getLineMinColumn(n)&&n++,Math.min(e.endLineNumber,n+i-1)}static _lastLineNumberInRange(t,e,i){let n=e.startLineNumber;return e.startColumn!==t.getLineMinColumn(n)&&n++,Math.max(n,e.endLineNumber-i+1)}static _moveLeft(t,e,i,n){return e.map(s=>re.fromViewState(Qe.moveLeft(t.cursorConfig,t,s.viewState,i,n)))}static _moveHalfLineLeft(t,e,i){const n=[];for(let s=0,r=e.length;s<r;s++){const o=e[s],a=o.viewState.position.lineNumber,l=Math.round(t.getLineContent(a).length/2);n[s]=re.fromViewState(Qe.moveLeft(t.cursorConfig,t,o.viewState,i,l))}return n}static _moveRight(t,e,i,n){return e.map(s=>re.fromViewState(Qe.moveRight(t.cursorConfig,t,s.viewState,i,n)))}static _moveHalfLineRight(t,e,i){const n=[];for(let s=0,r=e.length;s<r;s++){const o=e[s],a=o.viewState.position.lineNumber,l=Math.round(t.getLineContent(a).length/2);n[s]=re.fromViewState(Qe.moveRight(t.cursorConfig,t,o.viewState,i,l))}return n}static _moveDownByViewLines(t,e,i,n){const s=[];for(let r=0,o=e.length;r<o;r++){const a=e[r];s[r]=re.fromViewState(Qe.moveDown(t.cursorConfig,t,a.viewState,i,n))}return s}static _moveDownByModelLines(t,e,i,n){const s=[];for(let r=0,o=e.length;r<o;r++){const a=e[r];s[r]=re.fromModelState(Qe.moveDown(t.cursorConfig,t.model,a.modelState,i,n))}return s}static _moveUpByViewLines(t,e,i,n){const s=[];for(let r=0,o=e.length;r<o;r++){const a=e[r];s[r]=re.fromViewState(Qe.moveUp(t.cursorConfig,t,a.viewState,i,n))}return s}static _moveUpByModelLines(t,e,i,n){const s=[];for(let r=0,o=e.length;r<o;r++){const a=e[r];s[r]=re.fromModelState(Qe.moveUp(t.cursorConfig,t.model,a.modelState,i,n))}return s}static _moveToViewPosition(t,e,i,n,s){return re.fromViewState(e.viewState.move(i,n,s,0))}static _moveToModelPosition(t,e,i,n,s){return re.fromModelState(e.modelState.move(i,n,s,0))}static _moveToViewMinColumn(t,e,i){const n=[];for(let s=0,r=e.length;s<r;s++){const o=e[s],a=o.viewState.position.lineNumber,l=t.getLineMinColumn(a);n[s]=this._moveToViewPosition(t,o,i,a,l)}return n}static _moveToViewFirstNonWhitespaceColumn(t,e,i){const n=[];for(let s=0,r=e.length;s<r;s++){const o=e[s],a=o.viewState.position.lineNumber,l=t.getLineFirstNonWhitespaceColumn(a);n[s]=this._moveToViewPosition(t,o,i,a,l)}return n}static _moveToViewCenterColumn(t,e,i){const n=[];for(let s=0,r=e.length;s<r;s++){const o=e[s],a=o.viewState.position.lineNumber,l=Math.round((t.getLineMaxColumn(a)+t.getLineMinColumn(a))/2);n[s]=this._moveToViewPosition(t,o,i,a,l)}return n}static _moveToViewMaxColumn(t,e,i){const n=[];for(let s=0,r=e.length;s<r;s++){const o=e[s],a=o.viewState.position.lineNumber,l=t.getLineMaxColumn(a);n[s]=this._moveToViewPosition(t,o,i,a,l)}return n}static _moveToViewLastNonWhitespaceColumn(t,e,i){const n=[];for(let s=0,r=e.length;s<r;s++){const o=e[s],a=o.viewState.position.lineNumber,l=t.getLineLastNonWhitespaceColumn(a);n[s]=this._moveToViewPosition(t,o,i,a,l)}return n}},lu;(function(t){const e=function(n){if(!Li(n))return!1;const s=n;return!(!_n(s.to)||!gn(s.select)&&!fy(s.select)||!gn(s.by)&&!_n(s.by)||!gn(s.value)&&!Lh(s.value))};t.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:
22					* 'to': A mandatory logical position value providing where to move the cursor.
23						\`\`\`
24						'left', 'right', 'up', 'down', 'prevBlankLine', 'nextBlankLine',
25						'wrappedLineStart', 'wrappedLineEnd', 'wrappedLineColumnCenter'
26						'wrappedLineFirstNonWhitespaceCharacter', 'wrappedLineLastNonWhitespaceCharacter'
27						'viewPortTop', 'viewPortCenter', 'viewPortBottom', 'viewPortIfOutside'
28						\`\`\`
29					* 'by': Unit to move. Default is computed based on 'to' value.
30						\`\`\`
31						'line', 'wrappedLine', 'character', 'halfLine'
32						\`\`\`
33					* 'value': Number of units to move. Default is '1'.
34					* 'select': If 'true' makes the selection. Default is 'false'.
35				`,constraint:e,schema:{type:"object",required:["to"],properties:{to:{type:"string",enum:["left","right","up","down","prevBlankLine","nextBlankLine","wrappedLineStart","wrappedLineEnd","wrappedLineColumnCenter","wrappedLineFirstNonWhitespaceCharacter","wrappedLineLastNonWhitespaceCharacter","viewPortTop","viewPortCenter","viewPortBottom","viewPortIfOutside"]},by:{type:"string",enum:["line","wrappedLine","character","halfLine"]},value:{type:"number",default:1},select:{type:"boolean",default:!1}}}}]},t.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"},t.RawUnit={Line:"line",WrappedLine:"wrappedLine",Character:"character",HalfLine:"halfLine"};function i(n){if(!n.to)return null;let s;switch(n.to){case t.RawDirection.Left:s=0;break;case t.RawDirection.Right:s=1;break;case t.RawDirection.Up:s=2;break;case t.RawDirection.Down:s=3;break;case t.RawDirection.PrevBlankLine:s=4;break;case t.RawDirection.NextBlankLine:s=5;break;case t.RawDirection.WrappedLineStart:s=6;break;case t.RawDirection.WrappedLineFirstNonWhitespaceCharacter:s=7;break;case t.RawDirection.WrappedLineColumnCenter:s=8;break;case t.RawDirection.WrappedLineEnd:s=9;break;case t.RawDirection.WrappedLineLastNonWhitespaceCharacter:s=10;break;case t.RawDirection.ViewPortTop:s=11;break;case t.RawDirection.ViewPortBottom:s=13;break;case t.RawDirection.ViewPortCenter:s=12;break;case t.RawDirection.ViewPortIfOutside:s=14;break;default:return null}let r=0;
35switch(n.by){case t.RawUnit.Line:r=1;break;case t.RawUnit.WrappedLine:r=2;break;case t.RawUnit.Character:r=3;break;case t.RawUnit.HalfLine:r=4}return{direction:s,unit:r,select:!!n.select,value:n.value||1}}t.parse=i})(lu||(lu={}));var Xf=Object.create(null);function vr(t,e){if(e<=0)return"";Xf[t]||(Xf[t]=["",t]);const i=Xf[t];for(let n=i.length;n<=e;n++)i[n]=i[n-1]+t;return i[e]}var ll=class jp{constructor(e,i){this._opts=i,this._selection=e,this._selectionId=null,this._useLastEditRangeForCursorEndPosition=!1,this._selectionStartColumnStaysPut=!1}static unshiftIndent(e,i,n,s,r){const o=ut.visibleColumnFromColumn(e,i,n);return r?vr(vr(" ",s),ut.prevIndentTabStop(o,s)/s):vr("	",ut.prevRenderTabStop(o,n)/n)}static shiftIndent(e,i,n,s,r){const o=ut.visibleColumnFromColumn(e,i,n);return r?vr(vr(" ",s),ut.nextIndentTabStop(o,s)/s):vr("	",ut.nextRenderTabStop(o,n)/n)}_addEditOperation(e,i,n){this._useLastEditRangeForCursorEndPosition?e.addTrackedEditOperation(i,n):e.addEditOperation(i,n)}getEditOperations(e,i){const n=this._selection.startLineNumber;let s=this._selection.endLineNumber;this._selection.endColumn===1&&n!==s&&(s=s-1);const{tabSize:r,indentSize:o,insertSpaces:a}=this._opts,l=n===s;if(this._opts.useTabStops){this._selection.isEmpty()&&/^\s*$/.test(e.getLineContent(n))&&(this._useLastEditRangeForCursorEndPosition=!0);let h=0,c=0;for(let d=n;d<=s;d++,h=c){c=0;const u=e.getLineContent(d);let g=fi(u);if(this._opts.isUnshift&&(u.length===0||g===0)||!l&&!this._opts.isUnshift&&u.length===0)continue;if(g===-1&&(g=u.length),d>1&&ut.visibleColumnFromColumn(u,g+1,r)%o!==0&&e.isCheapToTokenize(d-1)){const _=Wi.getEnterAction(this._opts.autoIndent,e,new T(d-1,e.getLineMaxColumn(d-1),d-1,e.getLineMaxColumn(d-1)));if(_){if(c=h,_.appendText)for(let C=0,w=_.appendText.length;C<w&&c<o&&_.appendText.charCodeAt(C)===32;C++)c++;_.removeText&&(c=Math.max(0,c-_.removeText));for(let C=0;C<c&&!(g===0||u.charCodeAt(g-1)!==32);C++)g--}}if(this._opts.isUnshift&&g===0)continue;let m;this._opts.isUnshift?m=jp.unshiftIndent(u,g+1,r,o,a):m=jp.shiftIndent(u,g+1,r,o,a),this._addEditOperation(i,new T(d,1,d,g+1),m),d===n&&!this._selection.isEmpty()&&(this._selectionStartColumnStaysPut=this._selection.startColumn<=g+1)}}else{!this._opts.isUnshift&&this._selection.isEmpty()&&e.getLineLength(n)===0&&(this._useLastEditRangeForCursorEndPosition=!0);const h=a?vr(" ",o):"	";for(let c=n;c<=s;c++){const d=e.getLineContent(c);let u=fi(d);if(!(this._opts.isUnshift&&(d.length===0||u===0))&&!(!l&&!this._opts.isUnshift&&d.length===0)&&(u===-1&&(u=d.length),!(this._opts.isUnshift&&u===0)))if(this._opts.isUnshift){u=Math.min(u,o);for(let g=0;g<u;g++)if(d.charCodeAt(g)===9){u=g+1;break}this._addEditOperation(i,new T(c,1,c,u+1),"")}else this._addEditOperation(i,new T(c,1,c,1),h),c===n&&!this._selection.isEmpty()&&(this._selectionStartColumnStaysPut=this._selection.startColumn===1)}}this._selectionId=i.trackSelection(this._selection)}computeCursorState(e,i){if(this._useLastEditRangeForCursorEndPosition){const s=i.getInverseEditOperations()[0];return new xe(s.range.endLineNumber,s.range.endColumn,s.range.endLineNumber,s.range.endColumn)}const n=i.getTrackedSelection(this._selectionId);if(this._selectionStartColumnStaysPut){const s=this._selection.startColumn;return n.startColumn<=s?n:n.getDirection()===0?new xe(n.startLineNumber,s,n.endLineNumber,n.endColumn):new xe(n.endLineNumber,n.endColumn,n.startLineNumber,s)}return n}},$7=class{constructor(t,e,i){this._range=t,this._charBeforeSelection=e,this._charAfterSelection=i}getEditOperations(t,e){e.addTrackedEditOperation(new T(this._range.startLineNumber,this._range.startColumn,this._range.startLineNumber,this._range.startColumn),this._charBeforeSelection),e.addTrackedEditOperation(new T(this._range.endLineNumber,this._range.endColumn,this._range.endLineNumber,this._range.endColumn),this._charAfterSelection)}computeCursorState(t,e){const i=e.getInverseEditOperations(),n=i[0].range,s=i[1].range;return new xe(n.endLineNumber,n.endColumn,s.endLineNumber,s.endColumn-this._charAfterSelection.length)}},Ws=class Ct{static indent(e,i,n){if(i===null||n===null)return[];const s=[];for(let r=0,o=n.length;r<o;r++)s[r]=new ll(n[r],{isUnshift:!1,tabSize:e.tabSize,indentSize:e.indentSize,insertSpaces:e.insertSpaces,useTabStops:e.useTabStops,autoIndent:e.autoIndent});return s}static outdent(e,i,n){const s=[];for(let r=0,o=n.length;r<o;r++)s[r]=new ll(n[r],{isUnshift:!0,tabSize:e.tabSize,indentSize:e.indentSize,insertSpaces:e.insertSpaces,useTabStops:e.useTabStops,autoIndent:e.autoIndent});return s}static shiftIndent(e,i,n){return n=n||1,ll.shiftIndent(i,i.length+n,e.tabSize,e.indentSize,e.insertSpaces)}static unshiftIndent(e,i,n){return n=n||1,ll.unshiftIndent(i,i.length+n,e.tabSize,e.indentSize,e.insertSpaces)}static _distributedPaste(e,i,n,s){const r=[];for(let o=0,a=n.length;o<a;o++)r[o]=new zt(n[o],s[o]);return new Qt(0,r,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _simplePaste(e,i,n,s,r){const o=[];for(let a=0,l=n.length;a<l;a++){const h=n[a],c=h.getPosition();if(r&&!h.isEmpty()&&(r=!1),r&&s.indexOf(`
36`)!==s.length-1&&(r=!1),r){const d=new T(c.lineNumber,1,c.lineNumber,1);o[a]=new Mk(d,s,h,!0)}else o[a]=new zt(h,s)}return new Qt(0,o,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _distributePasteToCursors(e,i,n,s,r){if(s||i.length===1)return null;if(r&&r.length===i.length)return r;
36if(e.multiCursorPaste==="spread"){n.charCodeAt(n.length-1)===10&&(n=n.substr(0,n.length-1)),n.charCodeAt(n.length-1)===13&&(n=n.substr(0,n.length-1));const o=Th(n);if(o.length===i.length)return o}return null}static paste(e,i,n,s,r,o){const a=this._distributePasteToCursors(e,n,s,r,o);return a?(n=n.sort(T.compareRangesUsingStarts),this._distributedPaste(e,i,n,a)):this._simplePaste(e,i,n,s,r)}static _goodIndentForLine(e,i,n){let s=null,r="";const o=Wi.getInheritIndentForLine(e.autoIndent,i,n,!1);if(o)s=o.action,r=o.indentation;else if(n>1){let a;for(a=n-1;a>=1;a--){const c=i.getLineContent(a);if(Va(c)>=0)break}if(a<1)return null;const l=i.getLineMaxColumn(a),h=Wi.getEnterAction(e.autoIndent,i,new T(a,l,a,l));h&&(r=h.indentation+h.appendText)}return s&&(s===rt.Indent&&(r=Ct.shiftIndent(e,r)),s===rt.Outdent&&(r=Ct.unshiftIndent(e,r)),r=e.normalizeIndentation(r)),r||null}static _replaceJumpToNextIndent(e,i,n,s){let r="";const o=n.getStartPosition();if(e.insertSpaces){const a=e.visibleColumnFromColumn(i,o),l=e.indentSize,h=l-a%l;for(let c=0;c<h;c++)r+=" "}else r="	";return new zt(n,r,s)}static tab(e,i,n){const s=[];for(let r=0,o=n.length;r<o;r++){const a=n[r];if(a.isEmpty()){const l=i.getLineContent(a.startLineNumber);if(/^\s*$/.test(l)&&i.isCheapToTokenize(a.startLineNumber)){let h=this._goodIndentForLine(e,i,a.startLineNumber);h=h||"	";const c=e.normalizeIndentation(h);if(!l.startsWith(c)){s[r]=new zt(new T(a.startLineNumber,1,a.startLineNumber,l.length+1),c,!0);continue}}s[r]=this._replaceJumpToNextIndent(e,i,a,!0)}else{if(a.startLineNumber===a.endLineNumber){const l=i.getLineMaxColumn(a.startLineNumber);if(a.startColumn!==1||a.endColumn!==l){s[r]=this._replaceJumpToNextIndent(e,i,a,!1);continue}}s[r]=new ll(a,{isUnshift:!1,tabSize:e.tabSize,indentSize:e.indentSize,insertSpaces:e.insertSpaces,useTabStops:e.useTabStops,autoIndent:e.autoIndent})}}return s}static compositionType(e,i,n,s,r,o,a,l){const h=s.map(c=>this._compositionType(n,c,r,o,a,l));return new Qt(4,h,{shouldPushStackElementBefore:rc(e,4),shouldPushStackElementAfter:!1})}static _compositionType(e,i,n,s,r,o){if(!i.isEmpty())return null;const a=i.getPosition(),l=Math.max(1,a.column-s),h=Math.min(e.getLineMaxColumn(a.lineNumber),a.column+r),c=new T(a.lineNumber,l,a.lineNumber,h);return e.getValueInRange(c)===n&&o===0?null:new hd(c,n,0,o)}static _typeCommand(e,i,n){return n?new sc(e,i,!0):new zt(e,i,!0)}static _enter(e,i,n,s){if(e.autoIndent===0)return Ct._typeCommand(s,`
37`,n);if(!i.isCheapToTokenize(s.getStartPosition().lineNumber)||e.autoIndent===1){const l=i.getLineContent(s.startLineNumber),h=Rt(l).substring(0,s.startColumn-1);return Ct._typeCommand(s,`
38`+e.normalizeIndentation(h),n)}const r=Wi.getEnterAction(e.autoIndent,i,s);if(r){if(r.indentAction===rt.None)return Ct._typeCommand(s,`
39`+e.normalizeIndentation(r.indentation+r.appendText),n);if(r.indentAction===rt.Indent)return Ct._typeCommand(s,`
40`+e.normalizeIndentation(r.indentation+r.appendText),n);if(r.indentAction===rt.IndentOutdent){const l=e.normalizeIndentation(r.indentation),h=e.normalizeIndentation(r.indentation+r.appendText),c=`
41`+h+`
42`+l;return n?new sc(s,c,!0):new hd(s,c,-1,h.length-l.length,!0)}else if(r.indentAction===rt.Outdent){const l=Ct.unshiftIndent(e,r.indentation);return Ct._typeCommand(s,`
43`+e.normalizeIndentation(l+r.appendText),n)}}const o=i.getLineContent(s.startLineNumber),a=Rt(o).substring(0,s.startColumn-1);if(e.autoIndent>=4){const l=Wi.getIndentForEnter(e.autoIndent,i,s,{unshiftIndent:h=>Ct.unshiftIndent(e,h),shiftIndent:h=>Ct.shiftIndent(e,h),normalizeIndentation:h=>e.normalizeIndentation(h)});if(l){let h=e.visibleColumnFromColumn(i,s.getEndPosition());const c=s.endColumn,d=i.getLineContent(s.endLineNumber),u=fi(d);if(u>=0?s=s.setEndPosition(s.endLineNumber,Math.max(s.endColumn,u+1)):s=s.setEndPosition(s.endLineNumber,i.getLineMaxColumn(s.endLineNumber)),n)return new sc(s,`
44`+e.normalizeIndentation(l.afterEnter),!0);{let g=0;return c<=u+1&&(e.insertSpaces||(h=Math.ceil(h/e.indentSize)),g=Math.min(h+1-e.normalizeIndentation(l.afterEnter).length-1,0)),new hd(s,`
45`+e.normalizeIndentation(l.afterEnter),0,g,!0)}}}return Ct._typeCommand(s,`
46`+e.normalizeIndentation(a),n)}static _isAutoIndentType(e,i,n){if(e.autoIndent<4)return!1;for(let s=0,r=n.length;s<r;s++)if(!i.isCheapToTokenize(n[s].getEndPosition().lineNumber))return!1;return!0}static _runAutoIndentType(e,i,n,s){const r=Wi.getIndentationAtPosition(i,n.startLineNumber,n.startColumn),o=Wi.getIndentActionForType(e.autoIndent,i,n,s,{shiftIndent:a=>Ct.shiftIndent(e,a),unshiftIndent:a=>Ct.unshiftIndent(e,a)});if(o===null)return null;if(o!==e.normalizeIndentation(r)){const a=i.getLineFirstNonWhitespaceColumn(n.startLineNumber);return a===0?Ct._typeCommand(new T(n.startLineNumber,1,n.endLineNumber,n.endColumn),e.normalizeIndentation(o)+s,!1):Ct._typeCommand(new T(n.startLineNumber,1,n.endLineNumber,n.endColumn),e.normalizeIndentation(o)+i.getLineContent(n.startLineNumber).substring(a-1,n.startColumn-1)+s,!1)}return null}static _isAutoClosingOvertype(e,i,n,s,r){if(e.autoClosingOvertype==="never"||!e.autoClosingPairs.autoClosingPairsCloseSingleChar.has(r))return!1;for(let o=0,a=n.length;o<a;o++){const l=n[o];if(!l.isEmpty())return!1;const h=l.getPosition(),c=i.getLineContent(h.lineNumber);if(c.charAt(h.column-1)!==r)return!1;const d=Fo(r);if((h.column>
462?c.charCodeAt(h.column-2):0)===92&&d)return!1;if(e.autoClosingOvertype==="auto"){let u=!1;for(let g=0,m=s.length;g<m;g++){const _=s[g];if(h.lineNumber===_.startLineNumber&&h.column===_.startColumn){u=!0;break}}if(!u)return!1}}return!0}static _runAutoClosingOvertype(e,i,n,s,r){const o=[];for(let a=0,l=s.length;a<l;a++){const h=s[a].getPosition(),c=new T(h.lineNumber,h.column,h.lineNumber,h.column+1);o[a]=new zt(c,r)}return new Qt(4,o,{shouldPushStackElementBefore:rc(e,4),shouldPushStackElementAfter:!1})}static _isBeforeClosingBrace(e,i){const n=i.charAt(0),s=e.autoClosingPairs.autoClosingPairsOpenByStart.get(n)||[],r=e.autoClosingPairs.autoClosingPairsCloseByStart.get(n)||[],o=s.some(l=>i.startsWith(l.open)),a=r.some(l=>i.startsWith(l.close));return!o&&a}static _findAutoClosingPairOpen(e,i,n,s){const r=e.autoClosingPairs.autoClosingPairsOpenByEnd.get(s);if(!r)return null;let o=null;for(const a of r)if(o===null||a.open.length>o.open.length){let l=!0;for(const h of n)if(i.getValueInRange(new T(h.lineNumber,h.column-a.open.length+1,h.lineNumber,h.column))+s!==a.open){l=!1;break}l&&(o=a)}return o}static _findContainedAutoClosingPair(e,i){if(i.open.length<=1)return null;const n=i.close.charAt(i.close.length-1),s=e.autoClosingPairs.autoClosingPairsCloseByEnd.get(n)||[];let r=null;for(const o of s)o.open!==i.open&&i.open.includes(o.open)&&i.close.endsWith(o.close)&&(!r||o.open.length>r.open.length)&&(r=o);return r}static _getAutoClosingPairClose(e,i,n,s,r){const o=Fo(s),a=o?e.autoClosingQuotes:e.autoClosingBrackets,l=o?e.shouldAutoCloseBefore.quote:e.shouldAutoCloseBefore.bracket;if(a==="never")return null;for(const m of n)if(!m.isEmpty())return null;const h=n.map(m=>{const _=m.getPosition();return r?{lineNumber:_.lineNumber,beforeColumn:_.column-s.length,afterColumn:_.column}:{lineNumber:_.lineNumber,beforeColumn:_.column,afterColumn:_.column}}),c=this._findAutoClosingPairOpen(e,i,h.map(m=>new A(m.lineNumber,m.beforeColumn)),s);if(!c)return null;const d=this._findContainedAutoClosingPair(e,c),u=d?d.close:"";let g=!0;for(const m of h){const{lineNumber:_,beforeColumn:C,afterColumn:w}=m,v=i.getLineContent(_),b=v.substring(0,C-1),y=v.substring(w-1);if(y.startsWith(u)||(g=!1),y.length>0){const x=y.charAt(0);if(!Ct._isBeforeClosingBrace(e,y)&&!l(x))return null}if(c.open.length===1&&(s==="'"||s==='"')&&a!=="always"){const x=La(e.wordSeparators);if(b.length>0){const E=b.charCodeAt(b.length-1);if(x.get(E)===0)return null}}if(!i.isCheapToTokenize(_))return null;i.forceTokenization(_);const k=i.getLineTokens(_),S=Kd(k,C-1);if(!c.shouldAutoClose(S,C-S.firstCharOffset))return null;const L=c.findNeutralCharacter();if(L){const x=i.getTokenTypeIfInsertingCharacter(_,C,L);if(!c.isOK(x))return null}}return g?c.close.substring(0,c.close.length-u.length):c.close}static _runAutoClosingOpenCharType(e,i,n,s,r,o,a){const l=[];for(let h=0,c=s.length;h<c;h++){const d=s[h];l[h]=new Ak(d,r,!o,a)}return new Qt(4,l,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}static _shouldSurroundChar(e,i){return Fo(i)?e.autoSurround==="quotes"||e.autoSurround==="languageDefined":e.autoSurround==="brackets"||e.autoSurround==="languageDefined"}static _isSurroundSelectionType(e,i,n,s){if(!Ct._shouldSurroundChar(e,s)||!e.surroundingPairs.hasOwnProperty(s))return!1;const r=Fo(s);for(let o=0,a=n.length;o<a;o++){const l=n[o];if(l.isEmpty())return!1;let h=!0;for(let c=l.startLineNumber;c<=l.endLineNumber;c++){const d=i.getLineContent(c),u=c===l.startLineNumber?l.startColumn-1:0,g=c===l.endLineNumber?l.endColumn-1:d.length,m=d.substring(u,g);if(/[^ \t]/.test(m)){h=!1;break}}if(h)return!1;if(r&&l.startLineNumber===l.endLineNumber&&l.startColumn+1===l.endColumn){const c=i.getValueInRange(l);if(Fo(c))return!1}}return!0}static _runSurroundSelectionType(e,i,n,s,r){const o=[];for(let a=0,l=s.length;a<l;a++){const h=s[a],c=i.surroundingPairs[r];o[a]=new $7(h,r,c)}return new Qt(0,o,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _isTypeInterceptorElectricChar(e,i,n){return!!(n.length===1&&i.isCheapToTokenize(n[0].getEndPosition().lineNumber))}static _typeInterceptorElectricChar(e,i,n,s,r){if(!i.electricChars.hasOwnProperty(r)||!s.isEmpty())return null;const o=s.getPosition();n.forceTokenization(o.lineNumber);const a=n.getLineTokens(o.lineNumber);let l;try{l=i.onElectricCharacter(r,a,o.column)}catch(h){return We(h),null}if(!l)return null;if(l.matchOpenBracket){const h=(a.getLineContent()+r).lastIndexOf(l.matchOpenBracket)+1,c=n.bracketPairs.findMatchingBracketUp(l.matchOpenBracket,{lineNumber:o.lineNumber,column:h},500);if(c){if(c.startLineNumber===o.lineNumber)return null;const d=n.getLineContent(c.startLineNumber),u=Rt(d),g=i.normalizeIndentation(u),m=n.getLineContent(o.lineNumber),_=n.getLineFirstNonWhitespaceColumn(o.lineNumber)||o.column,C=g+m.substring(_-1,o.column-1)+r,w=new T(o.lineNumber,1,o.lineNumber,o.column),v=new zt(w,C);return new Qt(Qf(C,e),[v],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!0})}}return null}static compositionEndWithInterceptors(e,i,n,s,r,o){if(!s||xe.selectionsArrEqual(s,r))return null;let a=null;for(const h of r){if(!h.isEmpty())return null;const c=h.getPosition(),d=n.getValueInRange(new T(c.lineNumber,c.column-1,c.lineNumber,c.column));if(a===null)a=d;else if(a!==d)return null}if(!a)return null;if(this._isAutoClosingOvertype(i,n,r,o,a)){const h=r.map(c=>new zt(new T(c.positionLineNumber,c.positionColumn,c.positionLineNumber,c.positionColumn+1),"",!1));return new Qt(4,h,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}const l=this._getAutoClosingPairClose(i,n,r,a,!0);return l!==null?this._runAutoClosingOpenCharType(e,i,n,r,a,!0,l):null}static typeWithInterceptors(e,i,n,s,r,o,a){if(!e&&a===`
47`){const c=[];for(let d=0,u=r.length;d<u;d++)c[d]=Ct._enter(n,s,!1,r[d]);return new Qt(4,c,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}if(!e&&this._isAutoIndentType(n,s,r)){const c=[];let d=!1;for(let u=0,g=r.length;u<g;u++)if(c[u]=this._runAutoIndentType(n,s,r[u],a),!c[u]){d=!0;break}if(!d)return new Qt(4,c,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}if(!e&&this._isAutoClosingOvertype(n,s,r,o,a))return this._runAutoClosingOvertype(i,n,s,r,a);if(!e){const c=this._getAutoClosingPairClose(n,s,r,a,!1);if(c)return this._runAutoClosingOpenCharType(i,n,s,r,a,!1,c)}if(this._isSurroundSelectionType(n,s,r,a))return this._runSurroundSelectionType(i,n,s,r,a);if(!e&&this._isTypeInterceptorElectricChar(n,s,r)){const c=this._typeInterceptorElectricChar(i,n,s,r[0],a);if(c)return c}const l=[];for(let c=0,d=r.length;c<d;c++)l[c]=new zt(r[c],a);const h=Qf(a,i);return new Qt(h,l,{shouldPushStackElementBefore:rc(i,h),shouldPushStackElementAfter:!1})}static typeWithoutInterceptors(e,i,n,s,r){const o=[];for(let l=0,h=s.length;l<h;l++)o[l]=new zt(s[l],r);const a=Qf(r,e);return new Qt(a,o,{shouldPushStackElementBefore:rc(e,a),shouldPushStackElementAfter:!1})}static lineInsertBefore(e,i,n){if(i===null||n===null)return[];const s=[];for(let r=0,o=n.length;r<o;r++){let a=n[r].positionLineNumber;if(a===1)s[r]=new sc(new T(1,1,1,1),`
48`);else{a--;const l=i.getLineMaxColumn(a);s[r]=this._enter(e,i,!1,new T(a,l,a,l))}}return s}static lineInsertAfter(e,i,n){if(i===null||n===null)return[];const s=[];for(let r=0,o=n.length;r<o;r++){const a=n[r].positionLineNumber,l=i.getLineMaxColumn(a);s[r]=this._enter(e,i,!1,new T(a,l,a,l))}return s}static lineBreakInsert(e,i,n){const s=[];for(let r=0,o=n.length;r<o;r++)s[r]=this._enter(e,i,!0,n[r]);return s}},Ak=class extends hd{constructor(t,e,i,n){super(t,(i?e:"")+n,0,-n.length),this._openCharacter=e,this._closeCharacter=n,this.closeCharacterRange=null,this.enclosingRange=null}computeCursorState(t,e){const i=e.getInverseEditOperations()[0].range;return this.closeCharacterRange=new T(i.startLineNumber,i.endColumn-this._closeCharacter.length,i.endLineNumber,i.endColumn),this.enclosingRange=new T(i.startLineNumber,i.endColumn-this._openCharacter.length-this._closeCharacter.length,i.endLineNumber,i.endColumn),super.computeCursorState(t,e)}};function Qf(t,e){return t===" "?e===5||e===6?6:5:4}function rc(t,e){return cb(t)&&!cb(e)?!0:t===5?!1:hb(t)!==hb(e)}function hb(t){return t===6||t===5?"space":t}function cb(t){return t===4||t===5||t===6}var H;(function(t){t.editorSimpleInput=new Y("editorSimpleInput",!1,!0),t.editorTextFocus=new Y("editorTextFocus",!1,p("editorTextFocus","Whether the editor text has focus (cursor is blinking)")),t.focus=new Y("editorFocus",!1,p("editorFocus","Whether the editor or an editor widget has focus (e.g. focus is in the find widget)")),t.textInputFocus=new Y("textInputFocus",!1,p("textInputFocus","Whether an editor or a rich text input has focus (cursor is blinking)")),t.readOnly=new Y("editorReadonly",!1,p("editorReadonly","Whether the editor is read only")),t.inDiffEditor=new Y("inDiffEditor",!1,p("inDiffEditor","Whether the context is a diff editor")),t.columnSelection=new Y("editorColumnSelection",!1,p("editorColumnSelection","Whether `editor.columnSelection` is enabled")),t.writable=t.readOnly.toNegated(),t.hasNonEmptySelection=new Y("editorHasSelection",!1,p("editorHasSelection","Whether the editor has text selected")),t.hasOnlyEmptySelection=t.hasNonEmptySelection.toNegated(),t.hasMultipleSelections=new Y("editorHasMultipleSelections",!1,p("editorHasMultipleSelections","Whether the editor has multiple selections")),t.hasSingleSelection=t.hasMultipleSelections.toNegated(),t.tabMovesFocus=new Y("editorTabMovesFocus",!1,p("editorTabMovesFocus","Whether `Tab` will move focus out of the editor")),t.tabDoesNotMoveFocus=t.tabMovesFocus.toNegated(),t.isInWalkThroughSnippet=new Y("isInEmbeddedEditor",!1,!0),t.canUndo=new Y("canUndo",!1,!0),t.canRedo=new Y("canRedo",!1,!0),t.hoverVisible=new Y("editorHoverVisible",!1,p("editorHoverVisible","Whether the editor hover is visible")),t.inCompositeEditor=new Y("inCompositeEditor",void 0,p("inCompositeEditor","Whether the editor is part of a larger editor (e.g. notebooks)")),t.notInCompositeEditor=t.inCompositeEditor.toNegated(),t.languageId=new Y("editorLangId","",p("editorLangId","The language identifier of the editor")),t.hasCompletionItemProvider=new Y("editorHasCompletionItemProvider",!1,p("editorHasCompletionItemProvider","Whether the editor has a completion item provider")),t.hasCodeActionsProvider=new Y("editorHasCodeActionsProvider",!1,p("editorHasCodeActionsProvider","Whether the editor has a code actions provider")),t.hasCodeLensProvider=new Y("editorHasCodeLensProvider",!1,p("editorHasCodeLensProvider","Whether the editor has a code lens provider")),t.hasDefinitionProvider=new Y("editorHasDefinitionProvider",!1,p("editorHasDefinitionProvider","Whether the editor has a definition provider")),t.hasDeclarationProvider=new Y("editorHasDeclarationProvider",!1,p("editorHasDeclarationProvider","Whether the editor has a declaration provider")),t.hasImplementationProvider=new Y("editorHasImplementationProvider",!1,p("editorHasImplementationProvider","Whether the editor has an implementation provider")),t.hasTypeDefinitionProvider=new Y("editorHasTypeDefinitionProvider",!1,p("editorHasTypeDefinitionProvider","Whether the editor has a type definition provider")),t.hasHoverProvider=new Y("editorHasHoverProvider",!1,p("editorHasHoverProvider","Whether the editor has a hover provider")),t.hasDocumentHighlightProvider=new Y("editorHasDocumentHighlightProvider",!1,p("editorHasDocumentHighlightProvider","Whether the editor has a document highlight provider")),t.hasDocumentSymbolProvider=new Y("editorHasDocumentSymbolProvider",!1,p("editorHasDocumentSymbolProvider","Whether the editor has a document symbol provider")),t.hasReferenceProvider=new Y("editorHasReferenceProvider",!1,p("editorHasReferenceProvider","Whether the editor has a reference provider")),t.hasRenameProvider=new Y("editorHasRenameProvider",!1,p("editorHasRenameProvider","Whether the editor has a rename provider")),t.hasSignatureHelpProvider=new Y("editorHasSignatureHelpProvider",!1,p("editorHasSignatureHelpProvider","Whether the editor has a signature help provider")),t.hasInlayHintsProvi
48der=new Y("editorHasInlayHintsProvider",!1,p("editorHasInlayHintsProvider","Whether the editor has an inline hints provider")),t.hasDocumentFormattingProvider=new Y("editorHasDocumentFormattingProvider",!1,p("editorHasDocumentFormattingProvider","Whether the editor has a document formatting provider")),t.hasDocumentSelectionFormattingProvider=new Y("editorHasDocumentSelectionFormattingProvider",!1,p("editorHasDocumentSelectionFormattingProvider","Whether the editor has a document selection formatting provider")),t.hasMultipleDocumentFormattingProvider=new Y("editorHasMultipleDocumentFormattingProvider",!1,p("editorHasMultipleDocumentFormattingProvider","Whether the editor has multiple document formatting providers")),t.hasMultipleDocumentSelectionFormattingProvider=new Y("editorHasMultipleDocumentSelectionFormattingProvider",!1,p("editorHasMultipleDocumentSelectionFormattingProvider","Whether the editor has multiple document selection formatting providers"))})(H||(H={}));var me=0,$e=class extends Ph{runEditorCommand(t,e,i){const n=e._getViewModel();n&&this.runCoreEditorCommand(n,i||{})}},hu;(function(t){const e=function(n){if(!Li(n))return!1;const s=n;return!(!_n(s.to)||!gn(s.by)&&!_n(s.by)||!gn(s.value)&&!Lh(s.value)||!gn(s.revealCursor)&&!fy(s.revealCursor))};t.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'\n						```\n					* 'value': Number of units to move. Default is '1'.\n					* 'revealCursor': If 'true' reveals the cursor if it is outside view port.\n				",constraint:e,schema:{type:"object",required:["to"],properties:{to:{type:"string",enum:["up","down"]},by:{type:"string",enum:["line","wrappedLine","page","halfPage"]},value:{type:"number",default:1},revealCursor:{type:"boolean"}}}}]},t.RawDirection={Up:"up",Down:"down"},t.RawUnit={Line:"line",WrappedLine:"wrappedLine",Page:"page",HalfPage:"halfPage"};function i(n){let s;switch(n.to){case t.RawDirection.Up:s=1;break;case t.RawDirection.Down:s=2;break;default:return null}let r;switch(n.by){case t.RawUnit.Line:r=1;break;case t.RawUnit.WrappedLine:r=2;break;case t.RawUnit.Page:r=3;break;case t.RawUnit.HalfPage:r=4;break;default:r=2}const o=Math.floor(n.value||1),a=!!n.revealCursor;return{direction:s,unit:r,value:o,revealCursor:a,select:!!n.select}}t.parse=i})(hu||(hu={}));var Go;(function(t){const e=function(i){if(!Li(i))return!1;const n=i;return!(!Lh(n.lineNumber)&&!_n(n.lineNumber)||!gn(n.at)&&!_n(n.at))};t.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:e,schema:{type:"object",required:["lineNumber"],properties:{lineNumber:{type:["number","string"]},at:{type:"string",enum:["top","center","bottom"]}}}}]},t.RawAtArgument={Top:"top",Center:"center",Bottom:"bottom"}})(Go||(Go={}));var qp=class{constructor(t){t.addImplementation(1e4,"code-editor",(e,i)=>{const n=e.get(pt).getFocusedCodeEditor();return n&&n.hasTextFocus()?this._runEditorCommand(e,n,i):!1}),t.addImplementation(1e3,"generic-dom-input-textarea",(e,i)=>{const n=document.activeElement;return n&&["input","textarea"].indexOf(n.tagName.toLowerCase())>=0?(this.runDOMCommand(),!0):!1}),t.addImplementation(0,"generic-dom",(e,i)=>{const n=e.get(pt).getActiveCodeEditor();return n?(n.focus(),this._runEditorCommand(e,n,i)):!1})}_runEditorCommand(t,e,i){const n=this.runEditorCommand(t,e,i);return n||!0}},st;(function(t){class e extends $e{constructor(v){super(v),this._minimalReveal=v.minimalReveal,this._inSelectionMode=v.inSelectionMode}runCoreEditorCommand(v,b){v.model.pushStackElement(),v.setCursorStates(b.source,3,[kt.moveTo(v,v.getPrimaryCursorState(),this._inSelectionMode,b.position,b.viewPosition)])&&v.revealPrimaryCursor(b.source,!0,this._minimalReveal)}}t.MoveTo=q(new e({id:"_moveTo",minimalReveal:!0,inSelectionMode:!1,precondition:void 0})),t.MoveToSelect=q(new e({id:"_moveToSelect",minimalReveal:!1,inSelectionMode:!0,precondition:void 0}));class i extends $e{runCoreEditorCommand(v,b){v.model.pushStackElement();const y=this._getColumnSelectResult(v,v.getPrimaryCursorState(),v.getCursorColumnSelectData(),b);v.setCursorStates(b.source,3,y.viewStates.map(k=>
vendor: 4,149 bytes, line 48
48re.fromViewState(k))),v.setCursorColumnSelectData({isReal:!0,fromViewLineNumber:y.fromLineNumber,fromViewVisualColumn:y.fromVisualColumn,toViewLineNumber:y.toLineNumber,toViewVisualColumn:y.toVisualColumn}),y.reversed?v.revealTopMostCursor(b.source):v.revealBottomMostCursor(b.source)}}t.ColumnSelect=q(new class extends i{constructor(){super({id:"columnSelect",precondition:void 0})}_getColumnSelectResult(w,v,b,y){const k=w.model.validatePosition(y.position),S=w.coordinatesConverter.validateViewPosition(new A(y.viewPosition.lineNumber,y.viewPosition.column),k),L=y.doColumnSelect?b.fromViewLineNumber:S.lineNumber,x=y.doColumnSelect?b.fromViewVisualColumn:y.mouseColumn-1;return al.columnSelect(w.cursorConfig,w,L,x,S.lineNumber,y.mouseColumn-1)}}),t.CursorColumnSelectLeft=q(new class extends i{constructor(){super({id:"cursorColumnSelectLeft",precondition:void 0,kbOpts:{weight:me,kbExpr:H.textInputFocus,primary:3599,linux:{primary:0}}})}_getColumnSelectResult(w,v,b,y){return al.columnSelectLeft(w.cursorConfig,w,b)}}),t.CursorColumnSelectRight=q(new class extends i{constructor(){super({id:"cursorColumnSelectRight",precondition:void 0,kbOpts:{weight:me,kbExpr:H.textInputFocus,primary:3601,linux:{primary:0}}})}_getColumnSelectResult(w,v,b,y){return al.columnSelectRight(w.cursorConfig,w,b)}});class n extends i{constructor(v){super(v),this._isPaged=v.isPaged}_getColumnSelectResult(v,b,y,k){return al.columnSelectUp(v.cursorConfig,v,y,this._isPaged)}}t.CursorColumnSelectUp=q(new n({isPaged:!1,id:"cursorColumnSelectUp",precondition:void 0,kbOpts:{weight:me,kbExpr:H.textInputFocus,primary:3600,linux:{primary:0}}})),t.CursorColumnSelectPageUp=q(new n({isPaged:!0,id:"cursorColumnSelectPageUp",precondition:void 0,kbOpts:{weight:me,kbExpr:H.textInputFocus,primary:3595,linux:{primary:0}}}));class s extends i{constructor(v){super(v),this._isPaged=v.isPaged}_getColumnSelectResult(v,b,y,k){return al.columnSelectDown(v.cursorConfig,v,y,this._isPaged)}}t.CursorColumnSelectDown=q(new s({isPaged:!1,id:"cursorColumnSelectDown",precondition:void 0,kbOpts:{weight:me,kbExpr:H.textInputFocus,primary:3602,linux:{primary:0}}})),t.CursorColumnSelectPageDown=q(new s({isPaged:!0,id:"cursorColumnSelectPageDown",precondition:void 0,kbOpts:{weight:me,kbExpr:H.textInputFocus,primary:3596,linux:{primary:0}}}));class r extends $e{constructor(){super({id:"cursorMove",precondition:void 0,description:lu.description})}runCoreEditorCommand(v,b){const y=lu.parse(b);y&&this._runCursorMove(v,b.source,y)}_runCursorMove(v,b,y){v.model.pushStackElement(),v.setCursorStates(b,3,r._move(v,v.getCursorStates(),y)),v.revealPrimaryCursor(b,!0)}static _move(v,b,y){const k=y.select,S=y.value;switch(y.direction){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:return kt.simpleMove(v,b,y.direction,k,S,y.unit);case 11:case 13:case 12:case 14:return kt.viewportMove(v,b,y.direction,k,S);default:return null}}}t.CursorMoveImpl=r,t.CursorMove=q(new r);class o extends $e{constructor(v){super(v),this._staticArgs=v.args}runCoreEditorCommand(v,b){let y=this._staticArgs;this._staticArgs.value===-1&&(y={direction:this._staticArgs.direction,unit:this._staticArgs.unit,select:this._staticArgs.select,value:b.pageSize||v.cursorConfig.pageSize}),v.model.pushStackElement(),v.setCursorStates(b.source,3,kt.simpleMove(v,v.getCursorStates(),y.direction,y.select,y.value,y.unit)),v.revealPrimaryCursor(b.source,!0)}}t.CursorLeft=q(new o({args:{direction:0,unit:0,select:!1,value:1},id:"cursorLeft",precondition:void 0,kbOpts:{weight:me,kbExpr:H.textInputFocus,primary:15,mac:{primary:15,secondary:[288]}}})),t.CursorLeftSelect=q(new o({args:{direction:0,unit:0,select:!0,value:1},id:"cursorLeftSelect",precondition:void 0,kbOpts:{weight:me,kbExpr:H.textInputFocus,primary:1039}})),t.CursorRight=q(new o({args:{direction:1,unit:0,select:!1,value:1},id:"cursorRight",precondition:void 0,kbOpts:{weight:me,kbExpr:H.textInputFocus,primary:17,mac:{primary:17,secondary:[292]}}})),t.CursorRightSelect=q(new o({args:{direction:1,unit:0,select:!0,value:1},id:"cursorRightSelect",precondition:void 0,kbOpts:{weight:me,kbExpr:H.textInputFocus,primary:1041}}
vendor: 12,392 bytes, line 48
48)),t.CursorUp=q(new o({args:{direction:2,unit:2,select:!1,value:1},id:"cursorUp",precondition:void 0,kbOpts:{weight:me,kbExpr:H.textInputFocus,primary:16,mac:{primary:16,secondary:[302]}}})),t.CursorUpSelect=q(new o({args:{direction:2,unit:2,select:!0,value:1},id:"cursorUpSelect",precondition:void 0,kbOpts:{weight:me,kbExpr:H.textInputFocus,primary:1040,secondary:[3088],mac:{primary:1040},linux:{primary:1040}}})),t.CursorPageUp=q(new o({args:{direction:2,unit:2,select:!1,value:-1},id:"cursorPageUp",precondition:void 0,kbOpts:{weight:me,kbExpr:H.textInputFocus,primary:11}})),t.CursorPageUpSelect=q(new o({args:{direction:2,unit:2,select:!0,value:-1},id:"cursorPageUpSelect",precondition:void 0,kbOpts:{weight:me,kbExpr:H.textInputFocus,primary:1035}})),t.CursorDown=q(new o({args:{direction:3,unit:2,select:!1,value:1},id:"cursorDown",precondition:void 0,kbOpts:{weight:me,kbExpr:H.textInputFocus,primary:18,mac:{primary:18,secondary:[300]}}})),t.CursorDownSelect=q(new o({args:{direction:3,unit:2,select:!0,value:1},id:"cursorDownSelect",precondition:void 0,kbOpts:{weight:me,kbExpr:H.textInputFocus,primary:1042,secondary:[3090],mac:{primary:1042},linux:{primary:1042}}})),t.CursorPageDown=q(new o({args:{direction:3,unit:2,select:!1,value:-1},id:"cursorPageDown",precondition:void 0,kbOpts:{weight:me,kbExpr:H.textInputFocus,primary:12}})),t.CursorPageDownSelect=q(new o({args:{direction:3,unit:2,select:!0,value:-1},id:"cursorPageDownSelect",precondition:void 0,kbOpts:{weight:me,kbExpr:H.textInputFocus,primary:1036}})),t.CreateCursor=q(new class extends $e{constructor(){super({id:"createCursor",precondition:void 0})}runCoreEditorCommand(w,v){let b;v.wholeLine?b=kt.line(w,w.getPrimaryCursorState(),!1,v.position,v.viewPosition):b=kt.moveTo(w,w.getPrimaryCursorState(),!1,v.position,v.viewPosition);const y=w.getCursorStates();if(y.length>1){const k=b.modelState?b.modelState.position:null,S=b.viewState?b.viewState.position:null;for(let L=0,x=y.length;L<x;L++){const E=y[L];if(!(k&&!E.modelState.selection.containsPosition(k))&&!(S&&!E.viewState.selection.containsPosition(S))){y.splice(L,1),w.model.pushStackElement(),w.setCursorStates(v.source,3,y);return}}}y.push(b),w.model.pushStackElement(),w.setCursorStates(v.source,3,y)}}),t.LastCursorMoveToSelect=q(new class extends $e{constructor(){super({id:"_lastCursorMoveToSelect",precondition:void 0})}runCoreEditorCommand(w,v){const b=w.getLastAddedCursorIndex(),y=w.getCursorStates(),k=y.slice(0);k[b]=kt.moveTo(w,y[b],!0,v.position,v.viewPosition),w.model.pushStackElement(),w.setCursorStates(v.source,3,k)}});class a extends $e{constructor(v){super(v),this._inSelectionMode=v.inSelectionMode}runCoreEditorCommand(v,b){v.model.pushStackElement(),v.setCursorStates(b.source,3,kt.moveToBeginningOfLine(v,v.getCursorStates(),this._inSelectionMode)),v.revealPrimaryCursor(b.source,!0)}}t.CursorHome=q(new a({inSelectionMode:!1,id:"cursorHome",precondition:void 0,kbOpts:{weight:me,kbExpr:H.textInputFocus,primary:14,mac:{primary:14,secondary:[2063]}}})),t.CursorHomeSelect=q(new a({inSelectionMode:!0,id:"cursorHomeSelect",precondition:void 0,kbOpts:{weight:me,kbExpr:H.textInputFocus,primary:1038,mac:{primary:1038,secondary:[3087]}}}));class l extends $e{constructor(v){super(v),this._inSelectionMode=v.inSelectionMode}runCoreEditorCommand(v,b){v.model.pushStackElement(),v.setCursorStates(b.source,3,this._exec(v.getCursorStates())),v.revealPrimaryCursor(b.source,!0)}_exec(v){const b=[];for(let y=0,k=v.length;y<k;y++){const S=v[y],L=S.modelState.position.lineNumber;b[y]=re.fromModelState(S.modelState.move(this._inSelectionMode,L,1,0))}return b}}t.CursorLineStart=q(new l({inSelectionMode:!1,id:"cursorLineStart",precondition:void 0,kbOpts:{weight:me,kbExpr:H.textInputFocus,primary:0,mac:{primary:287}}})),t.CursorLineStartSelect=q(new l({inSelectionMode:!0,id:"cursorLineStartSelect",precondition:void 0,kbOpts:{weight:me,kbExpr:H.textInputFocus,primary:0,mac:{primary:1311}}}));class h extends $e{constructor(v){super(v),this._inSelectionMode=v.inSelectionMode}runCoreEditorCommand(v,b){v.model.pushStackElement(),v.setCursorStates(b.source,3,kt.moveToEndOfLine(v,v.getCursorStates(),this._inSelectionMode,b.sticky||!1)),v.revealPrimaryCursor(b.source,!0)}}t.CursorEnd=q(new h({inSelectionMode:!1,id:"cursorEnd",precondition:void 0,kbOpts:{args:{sticky:!1},weight:me,kbExpr:H.textInputFocus,primary:13,mac:{primary:13,secondary:[2065]}},description:{description:"Go to End",args:[{name:"args",schema:{type:"object",properties:{sticky:{description:p("stickydesc","Stick to the end even when going to longer lines"),type:"boolean",default:!1}}}}]}})),t.CursorEndSelect=q(new h({inSelectionMode:!0,id:"cursorEndSelect",precondition:void 0,kbOpts:{args:{sticky:!1},weight:me,kbExpr:H.textInputFocus,primary:1037,mac:{primary:1037,secondary:[3089]}},description:{description:"Select to End",args:[{name:"args",schema:{type:"object",properties:{sticky:{description:p("stickydesc","Stick to the end even when going to longer lines"),type:"boolean",default:!1}}}}]}}));class c extends $e{constructor(v){super(v),this._inSelectionMode=v.inSelectionMode}runCoreEditorCommand(v,b){v.model.pushStackElement(),v.setCursorStates(b.source,3,this._exec(v,v.getCursorStates())),v.revealPrimaryCursor(b.source,!0)}_exec(v,b){const y=[];for(let k=0,S=b.length;k<S;k++){const L=b[k],x=L.modelState.position.lineNumber,E=v.model.getLineMaxColumn(x);y[k]=re.fromModelState(L.modelState.move(this._inSelectionMode,x,E,0))}return y}}t.CursorLineEnd=q(new c({inSelectionMode:!1,id:"cursorLineEnd",precondition:void 0,kbOpts:{weight:me,kbExpr:H.textInputFocus,primary:0,mac:{primary:291}}})),t.CursorLineEndSelect=q(new c({inSelectionMode:!0,id:"cursorLineEndSelect",precondition:void 0,kbOpts:{weight:me,kbExpr:H.textInputFocus,primary:0,mac:{primary:1315}}}));class d extends $e{constructor(v){super(v),this._inSelectionMode=v.inSelectionMode}runCoreEditorCommand(v,b){v.model.pushStackElement(),v.setCursorStates(b.source,3,kt.moveToBeginningOfBuffer(v,v.getCursorStates(),this._inSelectionMode)),v.revealPrimaryCursor(b.source,!0)}}t.CursorTop=q(new d({inSelectionMode:!1,id:"cursorTop",precondition:void 0,kbOpts:{weight:me,kbExpr:H.textInputFocus,primary:2062,mac:{primary:2064}}})),t.CursorTopSelect=q(new d({inSelectionMode:!0,id:"cursorTopSelect",precondition:void 0,kbOpts:{weight:me,kbExpr:H.textInputFocus,primary:3086,mac:{primary:3088}}}));class u extends $e{constructor(v){super(v),this._inSelectionMode=v.inSelectionMode}runCoreEditorCommand(v,b){v.model.pushStackElement(),v.setCursorStates(b.source,3,kt.moveToEndOfBuffer(v,v.getCursorStates(),this._inSelectionMode)),v.revealPrimaryCursor(b.source,!0)}}t.CursorBottom=q(new u({inSelectionMode:!1,id:"cursorBottom",precondition:void 0,kbOpts:{weight:me,kbExpr:H.textInputFocus,primary:2061,mac:{primary:2066}}})),t.CursorBottomSelect=q(new u({inSelectionMode:!0,id:"cursorBottomSelect",precondition:void 0,kbOpts:{weight:me,kbExpr:H.textInputFocus,primary:3085,mac:{primary:3090}}}));class g extends $e{constructor(){super({id:"editorScroll",precondition:void 0,description:hu.description})}runCoreEditorCommand(v,b){const y=hu.parse(b);y&&this._runEditorScroll(v,b.source,y)}_runEditorScroll(v,b,y){const k=this._computeDesiredScrollTop(v,y);if(y.revealCursor){const S=v.getCompletelyVisibleViewRangeAtScrollTop(k);v.setCursorStates(b,3,[kt.findPositionInViewportIfOutside(v,v.getPrimaryCursorState(),S,y.select)])}v.viewLayout.setScrollPosition({scrollTop:k},0)}_computeDesiredScrollTop(v,b){if(b.unit===1){const S=v.getCompletelyVisibleViewRange(),L=v.coordinatesConverter.convertViewRangeToModelRange(S);let x;b.direction===1?x=Math.max(1,L.startLineNumber-b.value):x=Math.min(v.model.getLineCount(),L.startLineNumber+b.value);const E=v.coordinatesConverter.convertModelPositionToViewPosition(new A(x,1));return v.viewLayout.getVerticalOffsetForLineNumber(E.lineNumber)}let y;b.unit===3?y=v.cursorConfig.pageSize*b.value:b.unit===4?y=Math.round(v.cursorConfig.pageSize/2)*b.value:y=b.value;const k=(b.direction===1?-1:1)*y;return v.viewLayout.getCurrentScrollTop()+k*v.cursorConfig.lineHeight}}t.EditorScrollImpl=g,t.EditorScroll=q(new g),t.ScrollLineUp=q(new class extends $e{constructor(){super({id:"scrollLineUp",precondition:void 0,kbOpts:{weight:me,kbExpr:H.textInputFocus,primary:2064,mac:{primary:267}}})}runCoreEditorCommand(w,v){t.EditorScroll._runEditorScroll(w,v.source,{direction:1,unit:2,value:1,revealCursor:!1,select:!1})}}),t.ScrollPageUp=q(new class extends $e{constructor(){super({id:"scrollPageUp",precondition:void 0,kbOpts:{weight:me,kbExpr:H.textInputFocus,primary:2059,win:{primary:523},linux:{primary:523}}})}runCoreEditorCommand(w,v){t.EditorScroll._runEditorScroll(w,v.source,{direction:1,unit:3,value:1,revealCursor:!1,select:!1})}}),t.ScrollLineDown=q(new class extends $e{constructor(){super({id:"scrollLineDown",precondition:void 0,kbOpts:{weight:me,kbExpr:H.textInputFocus,primary:2066,mac:{primary:268}}})}runCoreEditorCommand(w,v){t.EditorScroll._runEditorScroll(w,v.source,{direction:2,unit:2,value:1,revealCursor:!1,select:!1})}}),t.ScrollPageDown=q(new class extends $e{constructor(){super({id:"scrollPageDown",precondition:void 0,kbOpts:{weight:me,kbExpr:H.textInputFocus,primary:2060,win:{primary:524},linux:{primary:524}}})}runCoreEditorCommand(w,v){t.EditorScroll._runEditorScroll(w,v.source,{direction:2,unit:3,value:1,revealCursor:!1,select:!1})}});class m extends $e{constructor(v){super(v),this._inSelectionMode=v.inSelectionMode}runCoreEditorCommand(v,b){v.model.pushStackElement(),v.setCursorStates(b.source,3,[kt.word(v,v.getPrimaryCursorState(),this._inSelectionMode,b.position)]),v.revealPrimaryCursor(b.source,!0)}}t.WordSelect=q(new m({inSelectionMode:!1,id:"_wordSelect",precondition:void 0})),t.WordSelectDrag=q(new m({inSelectionMode:!0,id:"_wordSelectDrag",precondition:void 0})),t.LastCursorWordSelect=q(new class extends $e{constructor(){super({id:"lastCursorWordSelect",precondition:void 0})}runCoreEditorCommand(w,v){const b=w.getLastAddedCursorIndex(),y=w.getCursorStates(),k=y.slice(0),S=y[b];k[b]=kt.word(w,S,S.modelState.hasSelection(),v.position),w.model.pushStackElement(),w.setCursorStates(v.source,3,k)}});class _ extends $e{constructor(v){super(v),this._inSelectionMode=v.inSelectionMode}runCoreEditorCommand(v,b){v.model.pushStackElement(),v.setCursorStates(b.source,3,[kt.line(v,v.getPrimaryCursorState(),this._inSelectionMode,b.position,b.viewPosition)]),v.revealPrimaryCursor(b.source,!1)}}t.LineSelect=q(new _({inSelectionMode:!1,id:"_lineSelect",precondition:void 0})),t.LineSelectDrag=q(new _({inSelectionMode:!0,id:"_lineSelectDrag",precondition:void 0}));class C extends $e{constructor(v){super(v),this._inSelectionMode=v.inSelectionMode}runCoreEditorCommand(v,b){const y=v.getLastAddedCursorIndex(),k=v.getCursorStates(),S=k.slice(0);S[y]=kt.line(v,k[y],this._inSelectionMode,b.position,b.viewPosition),v.model.pushStackElement(),v.setCursorStates(b.source,3,S)}}t.LastCursorLineSelect=q(new C({inSelectionMode:!1,id:"lastCursorLineSelect",precondition:void 0})),t.LastCursorLineSelectDrag=q(new C({inSelectionMode:!0,id:"lastCursorLineSelectDrag",precondition:void 0})),t.CancelSelection=q(new class extends $e{constructor(){super({id:"cancelSelection",precondition:H.hasNonEmptySelection,kbOpts:{weight:me,kbExpr:H.textInputFocus,primary:9,secondary:[1033]}})}runCoreEditorCommand(w,v){w.model.pushStackElement(),w.setCursorStates(v.source,3,[kt.cancelSelection(w,w.getPrimaryCursorState())]),w.revealPrimaryCursor(v.source,!0)}}),t.RemoveSecondaryCursors=q(new class extends $e{constructor(){super({id:"removeSecondaryCursors",precondition:H.hasMultipleSelections,kbOpts:{weight:1,kbExpr:H.textInputFocus,primary:9,secondary:[1033]}})}runCoreEditorCommand(w,v){w.model.pushStackElement(),w.setCursorStates(v.source,3,[w.getPrimaryCursorState()]),w.revealPrimaryCursor(v.source,!0),Lp(p("removedCursor","Removed secondary cursors"))}}),t.RevealLine=q(new class extends $e{constructor(){super({id:"revealLine",precondition:void 0,description:Go.description})}runCoreEditorCommand(w,v){const b=v,y=b.lineNumber||0;let k=typeof y=="number"?y+1:parseInt(y)+1;k<1&&(k=1);const S=w.model.getLineCount();k>S&&(k=S);const L=new T(k,1,k,w.model.getLineMaxColumn(k));let x=0;if(b.at)switch(b.at){case Go.RawAtArgument.Top:x=3;break;case Go.RawAtArgument.Center:x=1;break;case Go.RawAtArgument.Bottom:x=4}
48const E=w.coordinatesConverter.convertModelRangeToViewRange(L);w.revealRange(v.source,!1,E,x,0)}}),t.SelectAll=new class extends qp{constructor(){super(GM)}runDOMCommand(){Ii&&(document.activeElement.focus(),document.activeElement.select()),document.execCommand("selectAll")}runEditorCommand(w,v,b){const y=v._getViewModel();y&&this.runCoreEditorCommand(y,b)}runCoreEditorCommand(w,v){w.model.pushStackElement(),w.setCursorStates("keyboard",3,[kt.selectAll(w,w.getPrimaryCursorState())])}},t.SetSelection=q(new class extends $e{constructor(){super({id:"setSelection",precondition:void 0})}runCoreEditorCommand(w,v){w.model.pushStackElement(),w.setCursorStates(v.source,3,[re.fromModelSelection(v.selection)])}})})(st||(st={}));var K7=Re.and(H.textInputFocus,H.columnSelection);function qa(t,e){Ua.registerKeybindingRule({id:t,primary:e,when:K7,weight:1})}qa(st.CursorColumnSelectLeft.id,1039);qa(st.CursorColumnSelectRight.id,1041);qa(st.CursorColumnSelectUp.id,1040);qa(st.CursorColumnSelectPageUp.id,1035);qa(st.CursorColumnSelectDown.id,1042);qa(st.CursorColumnSelectPageDown.id,1036);function db(t){return t.register(),t}var ub;(function(t){class e extends Ph{runEditorCommand(n,s,r){const o=s._getViewModel();o&&this.runCoreEditingCommand(s,o,r||{})}}t.CoreEditingCommand=e,t.LineBreakInsert=q(new class extends e{constructor(){super({id:"lineBreakInsert",precondition:H.writable,kbOpts:{weight:me,kbExpr:H.textInputFocus,primary:0,mac:{primary:301}}})}runCoreEditingCommand(i,n,s){i.pushUndoStop(),i.executeCommands(this.id,Ws.lineBreakInsert(n.cursorConfig,n.model,n.getCursorStates().map(r=>r.modelState.selection)))}}),t.Outdent=q(new class extends e{constructor(){super({id:"outdent",precondition:H.writable,kbOpts:{weight:me,kbExpr:Re.and(H.editorTextFocus,H.tabDoesNotMoveFocus),primary:1026}})}runCoreEditingCommand(i,n,s){i.pushUndoStop(),i.executeCommands(this.id,Ws.outdent(n.cursorConfig,n.model,n.getCursorStates().map(r=>r.modelState.selection))),i.pushUndoStop()}}),t.Tab=q(new class extends e{constructor(){super({id:"tab",precondition:H.writable,kbOpts:{weight:me,kbExpr:Re.and(H.editorTextFocus,H.tabDoesNotMoveFocus),primary:2}})}runCoreEditingCommand(i,n,s){i.pushUndoStop(),i.executeCommands(this.id,Ws.tab(n.cursorConfig,n.model,n.getCursorStates().map(r=>r.modelState.selection))),i.pushUndoStop()}}),t.DeleteLeft=q(new class extends e{constructor(){super({id:"deleteLeft",precondition:void 0,kbOpts:{weight:me,kbExpr:H.textInputFocus,primary:1,secondary:[1025],mac:{primary:1,secondary:[1025,294,257]}}})}runCoreEditingCommand(i,n,s){const[r,o]=au.deleteLeft(n.getPrevEditOperationType(),n.cursorConfig,n.model,n.getCursorStates().map(a=>a.modelState.selection),n.getCursorAutoClosedCharacters());r&&i.pushUndoStop(),i.executeCommands(this.id,o),n.setPrevEditOperationType(2)}}),t.DeleteRight=q(new class extends e{constructor(){super({id:"deleteRight",precondition:void 0,kbOpts:{weight:me,kbExpr:H.textInputFocus,primary:20,mac:{primary:20,secondary:[290,276]}}})}runCoreEditingCommand(i,n,s){const[r,o]=au.deleteRight(n.getPrevEditOperationType(),n.cursorConfig,n.model,n.getCursorStates().map(a=>a.modelState.selection));r&&i.pushUndoStop(),i.executeCommands(this.id,o),n.setPrevEditOperationType(3)}}),t.Undo=new class extends qp{constructor(){super(R2)}runDOMCommand(){document.execCommand("undo")}runEditorCommand(i,n,s){if(!(!n.hasModel()||n.getOption(81)===!0))return n.getModel().undo()}},t.Redo=new class extends qp{constructor(){super(A2)}runDOMCommand(){document.execCommand("redo")}runEditorCommand(i,n,s){if(!(!n.hasModel()||n.getOption(81)===!0))return n.getModel().redo()}}})(ub||(ub={}));var fb=class extends Qu{constructor(t,e,i){super({id:t,precondition:void 0,description:i}),this._handlerId=e}runCommand(t,e){const i=t.get(pt).getFocusedCodeEditor();i&&i.trigger("keyboard",this._handlerId,e)}};function mo(t,e){db(new fb("default:"+t,t)),db(new fb(t,t,e))}mo("type",{description:"Type",args:[{name:"args",schema:{type:"object",required:["text"],properties:{text:{type:"string"}}}}]});mo("replacePreviousChar");mo("compositionType");mo("compositionStart");mo("compositionEnd");mo("paste");mo("cut");var j7=class{constructor(t,e,i,n){this.configuration=t,this.viewModel=e,this.userInputEvents=i,this.commandDelegate=n}paste(t,e,i,n){this.commandDelegate.paste(t,e,i,n)}type(t){this.commandDelegate.type(t)}compositionType(t,e,i,n){this.commandDelegate.compositionType(t,e,i,n)}compositionStart(){this.commandDelegate.startComposition()}compositionEnd(){this.commandDelegate.endComposition()}cut(){this.commandDelegate.cut()}setSelection(t){st.SetSelection.runCoreEditorCommand(this.viewModel,{source:"keyboard",selection:t})}_validateViewColumn(t){const e=this.viewModel.getLineMinColumn(t.lineNumber);return t.column<e?new A(t.lineNumber,e):t}_hasMulticursorModifier(t){switch(this.configuration.options.get(70)){case"altKey":return t.altKey;case"ctrlKey":return t.ctrlKey;case"metaKey":return t.metaKey;default:return!1}}_hasNonMulticursorModifier(t){switch(this.configuration.options.get(70)){case"altKey":return t.ctrlKey||t.metaKey;case"ctrlKey":return t.altKey||t.metaKey;case"metaKey":return t.ctrlKey||t.altKey;default:return!1}}dispatchMouse(t){const e=this.configuration.options,i=Bt&&e.get(96),n=e.get(18);t.middleButton&&!i?this._columnSelect(t.position,t.mouseColumn,t.inSelectionMode):t.startedOnLineNumbers?this._hasMulticursorModifier(t)?t.inSelectionMode?this._lastCursorLineSelect(t.position):this._createCursor(t.position,!0):t.inSelectionMode?this._lineSelectDrag(t.position):this._lineSelect(t.position):t.mouseDownCount>=4?this._selectAll():t.mouseDownCount===3?this._hasMulticursorModifier(t)?t.inSelectionMode?this._lastCursorLineSelectDrag(t.position):this._lastCursorLineSelect(t.position):t.inSelectionMode?this._lineSelectDrag(t.position):this._lineSelect(t.position):t.mouseDownCount===2?t.onInjectedText||(this._hasMulticursorModifier(t)?this._lastCursorWordSelect(t.position):t.inSelectionMode?this._wordSelectDrag(t.position):this._wordSelect(t.position)):this._hasMulticursorModifier(t)?this._hasNonMulticursorModifier(t)||(t.shiftKey?this._columnSelect(t.position,t.mouseColumn,!0):t.inSelectionMode?this._lastCursorMoveToSelect(t.position):this._createCursor(t.position,!1)):t.inSelectionMode?t.altKey?this._columnSelect(t.position,t.mouseColumn,!0):n?this._columnSelect(t.position,t.mouseColumn,!0):this._moveToSelect(t.position):this.moveTo(t.position)}
48_usualArgs(t){return t=this._validateViewColumn(t),{source:"mouse",position:this._convertViewToModelPosition(t),viewPosition:t}}moveTo(t){st.MoveTo.runCoreEditorCommand(this.viewModel,this._usualArgs(t))}_moveToSelect(t){st.MoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(t))}_columnSelect(t,e,i){t=this._validateViewColumn(t),st.ColumnSelect.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(t),viewPosition:t,mouseColumn:e,doColumnSelect:i})}_createCursor(t,e){t=this._validateViewColumn(t),st.CreateCursor.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(t),viewPosition:t,wholeLine:e})}_lastCursorMoveToSelect(t){st.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(t))}_wordSelect(t){st.WordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(t))}_wordSelectDrag(t){st.WordSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(t))}_lastCursorWordSelect(t){st.LastCursorWordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(t))}_lineSelect(t){st.LineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(t))}_lineSelectDrag(t){st.LineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(t))}_lastCursorLineSelect(t){st.LastCursorLineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(t))}_lastCursorLineSelectDrag(t){st.LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(t))}_selectAll(){st.SelectAll.runCoreEditorCommand(this.viewModel,{source:"mouse"})}_convertViewToModelPosition(t){return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(t)}emitKeyDown(t){this.userInputEvents.emitKeyDown(t)}emitKeyUp(t){this.userInputEvents.emitKeyUp(t)}emitContextMenu(t){this.userInputEvents.emitContextMenu(t)}emitMouseMove(t){this.userInputEvents.emitMouseMove(t)}emitMouseLeave(t){this.userInputEvents.emitMouseLeave(t)}emitMouseUp(t){this.userInputEvents.emitMouseUp(t)}emitMouseDown(t){this.userInputEvents.emitMouseDown(t)}emitMouseDrag(t){this.userInputEvents.emitMouseDrag(t)}emitMouseDrop(t){this.userInputEvents.emitMouseDrop(t)}emitMouseDropCanceled(){this.userInputEvents.emitMouseDropCanceled()}emitMouseWheel(t){this.userInputEvents.emitMouseWheel(t)}},Ok=class Pk{constructor(e){this.onKeyDown=null,this.onKeyUp=null,this.onContextMenu=null,this.onMouseMove=null,this.onMouseLeave=null,this.onMouseDown=null,this.onMouseUp=null,this.onMouseDrag=null,this.onMouseDrop=null,this.onMouseDropCanceled=null,this.onMouseWheel=null,this._coordinatesConverter=e}emitKeyDown(e){this.onKeyDown&&this.onKeyDown(e)}emitKeyUp(e){this.onKeyUp&&this.onKeyUp(e)}emitContextMenu(e){this.onContextMenu&&this.onContextMenu(this._convertViewToModelMouseEvent(e))}emitMouseMove(e){this.onMouseMove&&this.onMouseMove(this._convertViewToModelMouseEvent(e))}emitMouseLeave(e){this.onMouseLeave&&this.onMouseLeave(this._convertViewToModelMouseEvent(e))}emitMouseDown(e){this.onMouseDown&&this.onMouseDown(this._convertViewToModelMouseEvent(e))}emitMouseUp(e){this.onMouseUp&&this.onMouseUp(this._convertViewToModelMouseEvent(e))}emitMouseDrag(e){this.onMouseDrag&&this.onMouseDrag(this._convertViewToModelMouseEvent(e))}emitMouseDrop(e){this.onMouseDrop&&this.onMouseDrop(this._convertViewToModelMouseEvent(e))}emitMouseDropCanceled(){this.onMouseDropCanceled&&this.onMouseDropCanceled()}emitMouseWheel(e){this.onMouseWheel&&this.onMouseWheel(e)}_convertViewToModelMouseEvent(e){return e.target?{event:e.event,target:this._convertViewToModelMouseTarget(e.target)}:e}_convertViewToModelMouseTarget(e){return Pk.convertViewToModelMouseTarget(e,this._coordinatesConverter)}static convertViewToModelMouseTarget(e,i){const n=Object.assign({},e);return n.position&&(n.position=i.convertViewPositionToModelPosition(n.position)),n.range&&(n.range=i.convertViewRangeToModelRange(n.range)),n}},Jf,Fk=class{constructor(t){this._createLine=t,this._set(1,[])}flush(){this._set(1,[])}_set(t,e){this._lines=e,this._rendLineNumberStart=t}_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(t){const e=t-this._rendLineNumberStart;if(e<0||e>=this._lines.length)throw new Error("Illegal value for lineNumber");return this._lines[e]}onLinesDeleted(t,e){if(this.getCount()===0)return null;const i=this.getStartLineNumber(),n=this.getEndLineNumber();if(e<i){const o=e-t+1;return this._rendLineNumberStart-=o,null}if(t>n)return null;let s=0,r=0;for(let o=i;o<=n;o++){const a=o-this._rendLineNumberStart;t<=o&&o<=e&&(r===0?(s=a,r=1):r++)}if(t<i){let o=0;e<i?o=e-t+1:o=i-t,this._rendLineNumberStart-=o}return this._lines.splice(s,r)}
vendor: 1,249 bytes, line 48
48onLinesChanged(t,e){if(this.getCount()===0)return!1;const i=this.getStartLineNumber(),n=this.getEndLineNumber();let s=!1;for(let r=t;r<=e;r++)r>=i&&r<=n&&(this._lines[r-this._rendLineNumberStart].onContentChanged(),s=!0);return s}onLinesInserted(t,e){if(this.getCount()===0)return null;const i=e-t+1,n=this.getStartLineNumber(),s=this.getEndLineNumber();if(t<=n)return this._rendLineNumberStart+=i,null;if(t>s)return null;if(i+t>s)return this._lines.splice(t-this._rendLineNumberStart,s-t+1);const r=[];for(let c=0;c<i;c++)r[c]=this._createLine();const o=t-this._rendLineNumberStart,a=this._lines.slice(0,o),l=this._lines.slice(o,this._lines.length-i),h=this._lines.slice(this._lines.length-i,this._lines.length);return this._lines=a.concat(r).concat(l),h}onTokensChanged(t){if(this.getCount()===0)return!1;const e=this.getStartLineNumber(),i=this.getEndLineNumber();let n=!1;for(let s=0,r=t.length;s<r;s++){const o=t[s];if(o.toLineNumber<e||o.fromLineNumber>i)continue;const a=Math.max(e,o.fromLineNumber),l=Math.min(i,o.toLineNumber);for(let h=a;h<=l;h++){const c=h-this._rendLineNumberStart;this._lines[c].onTokensChanged(),n=!0}}return n}},Bk=class{constructor(t){this._host=t,this.domNode=this._createDomNode(),this._linesCollection=new Fk(()=>
48this._host.createVisibleLine())}_createDomNode(){const t=de(document.createElement("div"));return t.setClassName("view-layer"),t.setPosition("absolute"),t.domNode.setAttribute("role","presentation"),t.domNode.setAttribute("aria-hidden","true"),t}onConfigurationChanged(t){return!!t.hasChanged(131)}onFlushed(t){return this._linesCollection.flush(),!0}onLinesChanged(t){return this._linesCollection.onLinesChanged(t.fromLineNumber,t.toLineNumber)}onLinesDeleted(t){const e=this._linesCollection.onLinesDeleted(t.fromLineNumber,t.toLineNumber);if(e)for(let i=0,n=e.length;i<n;i++){const s=e[i].getDomNode();s&&this.domNode.domNode.removeChild(s)}return!0}onLinesInserted(t){const e=this._linesCollection.onLinesInserted(t.fromLineNumber,t.toLineNumber);if(e)for(let i=0,n=e.length;i<n;i++){const s=e[i].getDomNode();s&&this.domNode.domNode.removeChild(s)}return!0}onScrollChanged(t){return t.scrollTopChanged}onTokensChanged(t){return this._linesCollection.onTokensChanged(t.ranges)}onZonesChanged(t){return!0}getStartLineNumber(){return this._linesCollection.getStartLineNumber()}getEndLineNumber(){return this._linesCollection.getEndLineNumber()}getVisibleLine(t){return this._linesCollection.getLine(t)}renderLines(t){const e=this._linesCollection._get(),i=new zv(this.domNode.domNode,this._host,t),n={rendLineNumberStart:e.rendLineNumberStart,lines:e.lines,linesLength:e.lines.length},s=i.render(n,t.startLineNumber,t.endLineNumber,t.relativeVerticalOffset);this._linesCollection._set(s.rendLineNumberStart,s.lines)}},zv=class Bo{constructor(e,i,n){this.domNode=e,this.host=i,this.viewportData=n}render(e,i,n,s){const r={rendLineNumberStart:e.rendLineNumberStart,lines:e.lines.slice(0),linesLength:e.linesLength};if(r.rendLineNumberStart+r.linesLength-1<i||n<r.rendLineNumberStart){r.rendLineNumberStart=i,r.linesLength=n-i+1,r.lines=[];for(let o=i;o<=n;o++)r.lines[o-i]=this.host.createVisibleLine();return this._finishRendering(r,!0,s),r}if(this._renderUntouchedLines(r,Math.max(i-r.rendLineNumberStart,0),Math.min(n-r.rendLineNumberStart,r.linesLength-1),s,i),r.rendLineNumberStart>i){const o=i,a=Math.min(n,r.rendLineNumberStart-1);o<=a&&(this._insertLinesBefore(r,o,a,s,i),r.linesLength+=a-o+1)}else if(r.rendLineNumberStart<i){const o=Math.min(r.linesLength,i-r.rendLineNumberStart);o>0&&(this._removeLinesBefore(r,o),r.linesLength-=o)}if(r.rendLineNumberStart=i,r.rendLineNumberStart+r.linesLength-1<n){const o=r.rendLineNumberStart+r.linesLength,a=n;o<=a&&(this._insertLinesAfter(r,o,a,s,i),r.linesLength+=a-o+1)}else if(r.rendLineNumberStart+r.linesLength-1>n){const o=Math.max(0,n-r.rendLineNumberStart+1),a=r.linesLength-1-o+1;a>0&&(this._removeLinesAfter(r,a),r.linesLength-=a)}return this._finishRendering(r,!1,s),r}_renderUntouchedLines(e,i,n,s,r){const o=e.rendLineNumberStart,a=e.lines;for(let l=i;l<=n;l++){const h=o+l;a[l].layoutLine(h,s[h-r])}}_insertLinesBefore(e,i,n,s,r){const o=[];let a=0;for(let l=i;l<=n;l++)o[a++]=this.host.createVisibleLine();e.lines=o.concat(e.lines)}_removeLinesBefore(e,i){for(let n=0;n<i;n++){const s=e.lines[n].getDomNode();s&&this.domNode.removeChild(s)}e.lines.splice(0,i)}_insertLinesAfter(e,i,n,s,r){const o=[];let a=0;for(let l=i;l<=n;l++)o[a++]=this.host.createVisibleLine();e.lines=e.lines.concat(o)}_removeLinesAfter(e,i){const n=e.linesLength-i;for(let s=0;s<i;s++){const r=e.lines[n+s].getDomNode();r&&this.domNode.removeChild(r)}e.lines.splice(n,i)}_finishRenderingNewLines(e,i,n,s){Bo._ttPolicy&&(n=Bo._ttPolicy.createHTML(n));const r=this.domNode.lastChild;i||!r?this.domNode.innerHTML=n:r.insertAdjacentHTML("afterend",n);let o=this.domNode.lastChild;for(let a=e.linesLength-1;a>=0;a--){const l=e.lines[a];s[a]&&(l.setDomNode(o),o=o.previousSibling)}}_finishRenderingInvalidLines(e,i,n){const s=document.createElement("div");Bo._ttPolicy&&(i=Bo._ttPolicy.createHTML(i)),s.innerHTML=i;for(let r=0;r<e.linesLength;r++){const o=e.lines[r];if(n[r]){const a=s.firstChild,l=o.getDomNode();l.parentNode.replaceChild(a,l),o.setDomNode(a)}}}_finishRendering(e,i,n){const s=Bo._sb,r=e.linesLength,o=e.lines,a=e.rendLineNumberStart,l=[];{s.reset();let h=!1;for(let c=0;c<r;c++){const d=o[c];l[c]=!1,!d.getDomNode()&&d.renderLine(c+a,n[c],this.viewportData,s)&&(l[c]=!0,h=!0)}h&&this._finishRenderingNewLines(e,i,s.build(),l)}{s.reset();let h=!1;const c=[];for(let d=0;d<r;d++){const u=o[d];c[d]=!1,!l[d]&&u.renderLine(d+a,n[d],this.viewportData,s)&&(c[d]=!0,h=!0)}h&&this._finishRenderingInvalidLines(e,s.build(),c)}}};zv._ttPolicy=(Jf=window.trustedTypes)===null||Jf===void 0?void 0:Jf.createPolicy("editorViewLayer",{createHTML:t=>t});zv._sb=ya(1e5);var Vk=class extends Mi{constructor(t){super(t),this._visibleLines=new Bk(this),this.domNode=this._visibleLines.domNode,this._dynamicOverlays=[],this._isFocused=!1,this.domNode.setClassName("view-overlays")}
48shouldRender(){if(super.shouldRender())return!0;for(let t=0,e=this._dynamicOverlays.length;t<e;t++)if(this._dynamicOverlays[t].shouldRender())return!0;return!1}dispose(){super.dispose();for(let t=0,e=this._dynamicOverlays.length;t<e;t++)this._dynamicOverlays[t].dispose();this._dynamicOverlays=[]}getDomNode(){return this.domNode}createVisibleLine(){return new q7(this._context.configuration,this._dynamicOverlays)}addDynamicOverlay(t){this._dynamicOverlays.push(t)}onConfigurationChanged(t){this._visibleLines.onConfigurationChanged(t);const e=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();for(let n=e;n<=i;n++)this._visibleLines.getVisibleLine(n).onConfigurationChanged(t);return!0}onFlushed(t){return this._visibleLines.onFlushed(t)}onFocusChanged(t){return this._isFocused=t.isFocused,!0}onLinesChanged(t){return this._visibleLines.onLinesChanged(t)}onLinesDeleted(t){return this._visibleLines.onLinesDeleted(t)}onLinesInserted(t){return this._visibleLines.onLinesInserted(t)}onScrollChanged(t){return this._visibleLines.onScrollChanged(t)||!0}onTokensChanged(t){return this._visibleLines.onTokensChanged(t)}onZonesChanged(t){return this._visibleLines.onZonesChanged(t)}prepareRender(t){const e=this._dynamicOverlays.filter(i=>i.shouldRender());for(let i=0,n=e.length;i<n;i++){const s=e[i];s.prepareRender(t),s.onDidRender()}}render(t){this._viewOverlaysRender(t),this.domNode.toggleClassName("focused",this._isFocused)}_viewOverlaysRender(t){this._visibleLines.renderLines(t.viewportData)}},q7=class{constructor(t,e){this._configuration=t,this._lineHeight=this._configuration.options.get(59),this._dynamicOverlays=e,this._domNode=null,this._renderedContent=null}getDomNode(){return this._domNode?this._domNode.domNode:null}setDomNode(t){this._domNode=de(t)}onContentChanged(){}onTokensChanged(){}onConfigurationChanged(t){this._lineHeight=this._configuration.options.get(59)}renderLine(t,e,i,n){let s="";for(let r=0,o=this._dynamicOverlays.length;r<o;r++){const a=this._dynamicOverlays[r];s+=a.render(i.startLineNumber,t)}return this._renderedContent===s?!1:(this._renderedContent=s,n.appendASCIIString('
48<div style="position:absolute;top:'),n.appendASCIIString(String(e)),n.appendASCIIString("px;width:100%;height:"),n.appendASCIIString(String(this._lineHeight)),n.appendASCIIString('px;">'),n.appendASCIIString(s),n.appendASCIIString("</div>"),!0)}layoutLine(t,e){this._domNode&&(this._domNode.setTop(e),this._domNode.setHeight(this._lineHeight))}},G7=class extends Vk{constructor(t){super(t);const e=this._context.configuration.options.get(131);this._contentWidth=e.contentWidth,this.domNode.setHeight(0)}onConfigurationChanged(t){const e=this._context.configuration.options.get(131);return this._contentWidth=e.contentWidth,super.onConfigurationChanged(t)||!0}onScrollChanged(t){return super.onScrollChanged(t)||t.scrollWidthChanged}_viewOverlaysRender(t){super._viewOverlaysRender(t),this.domNode.setWidth(Math.max(t.scrollWidth,this._contentWidth))}},Z7=class extends Vk{constructor(t){super(t);const e=this._context.configuration.options,i=e.get(131);this._contentLeft=i.contentLeft,this.domNode.setClassName("margin-view-overlays"),this.domNode.setWidth(1),Zt(this.domNode,e.get(44))}onConfigurationChanged(t){const e=this._context.configuration.options;Zt(this.domNode,e.get(44));const i=e.get(131);return this._contentLeft=i.contentLeft,super.onConfigurationChanged(t)||!0}onScrollChanged(t){return super.onScrollChanged(t)||t.scrollHeightChanged}_viewOverlaysRender(t){super._viewOverlaysRender(t);const e=Math.min(t.scrollHeight,1e6);this.domNode.setHeight(e),this.domNode.setWidth(this._contentLeft)}},hl=class{constructor(t,e){this._coordinateBrand=void 0,this.top=t,this.left=e}},Y7=class extends Mi{constructor(t,e){super(t),this._viewDomNode=e,this._widgets={},this.domNode=de(document.createElement("div")),Hn.write(this.domNode,1),this.domNode.setClassName("contentWidgets"),this.domNode.setPosition("absolute"),this.domNode.setTop(0),this.overflowingContentWidgetsDomNode=de(document.createElement("div")),Hn.write(this.overflowingContentWidgetsDomNode,2),this.overflowingContentWidgetsDomNode.setClassName("overflowingContentWidgets")}dispose(){super.dispose(),this._widgets={}}onConfigurationChanged(t){const e=Object.keys(this._widgets);for(const i of e)this._widgets[i].onConfigurationChanged(t);return!0}onDecorationsChanged(t){return!0}onFlushed(t){return!0}onLineMappingChanged(t){const e=Object.keys(this._widgets);for(const i of e)this._widgets[i].onLineMappingChanged(t);return!0}onLinesChanged(t){return!0}onLinesDeleted(t){return!0}onLinesInserted(t){return!0}onScrollChanged(t){return!0}onZonesChanged(t){return!0}addWidget(t){const e=new X7(this._context,this._viewDomNode,t);this._widgets[e.id]=e,e.allowEditorOverflow?this.overflowingContentWidgetsDomNode.appendChild(e.domNode):this.domNode.appendChild(e.domNode),this.setShouldRender()}setWidgetPosition(t,e,i){this._widgets[t.getId()].setPosition(e,i),this.setShouldRender()}removeWidget(t){const e=t.getId();if(this._widgets.hasOwnProperty(e)){const i=this._widgets[e];delete this._widgets[e];const n=i.domNode.domNode;n.parentNode.removeChild(n),n.removeAttribute("monaco-visible-content-widget"),this.setShouldRender()}}shouldSuppressMouseDownOnWidget(t){return this._widgets.hasOwnProperty(t)?this._widgets[t].suppressMouseDown:!1}onBeforeRender(t){const e=Object.keys(this._widgets);for(const i of e)this._widgets[i].onBeforeRender(t)}prepareRender(t){const e=Object.keys(this._widgets);for(const i of e)this._widgets[i].prepareRender(t)}render(t){const e=Object.keys(this._widgets);for(const i of e)this._widgets[i].render(t)}},X7=class{constructor(t,e,i){this._context=t,this._viewDomNode=e,this._actual=i,this.domNode=de(this._actual.getDomNode()),this.id=this._actual.getId(),this.allowEditorOverflow=this._actual.allowEditorOverflow||!1,this.suppressMouseDown=this._actual.suppressMouseDown||!1;const n=this._context.configuration.options,s=n.get(131);this._fixedOverflowWidgets=n.get(36),this._contentWidth=s.contentWidth,this._contentLeft=s.contentLeft,this._lineHeight=n.get(59),this._range=null,this._viewRange=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(t){const e=this._context.configuration.options;if(this._lineHeight=e.get(59),t.hasChanged(131)){const i=e.get(131);this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._maxWidth=this._getMaxWidth()}}onLineMappingChanged(t){this._setPosition(this._range)}_setPosition(t){if(this._range=t,this._viewRange=null,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))}}_getMaxWidth(){return this.allowEditorOverflow?window.innerWidth||document.documentElement.offsetWidth||document.body.offsetWidth:this._contentWidth}setPosition(t,e){this._setPosition(t),this._preference=e,this._viewRange&&this._preference&&this._preference.length>0?this.domNode.setDisplay("block"):this.domNode.setDisplay("none"),this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1}_layoutBoxInViewport(t,e,i,n,s){const r=t.top,o=r,a=e.top+this._lineHeight,l=s.viewportHe
48ight-a,h=r-n,c=o>=n,d=a,u=l>=n;let g=t.left,m=e.left;return g+i>s.scrollLeft+s.viewportWidth&&(g=s.scrollLeft+s.viewportWidth-i),m+i>s.scrollLeft+s.viewportWidth&&(m=s.scrollLeft+s.viewportWidth-i),g<s.scrollLeft&&(g=s.scrollLeft),m<s.scrollLeft&&(m=s.scrollLeft),{fitsAbove:c,aboveTop:h,aboveLeft:g,fitsBelow:u,belowTop:d,belowLeft:m}}_layoutHorizontalSegmentInPage(t,e,i,n){const s=Math.max(0,e.left-n),r=Math.min(e.left+e.width+n,t.width);let o=e.left+i-ps.scrollX;if(o+n>r){const a=o-(r-n);o-=a,i-=a}if(o<s){const a=o-s;o-=a,i-=a}return[i,o]}_layoutBoxInPage(t,e,i,n,s){const r=t.top-n,o=e.top+this._lineHeight,a=qi(this._viewDomNode.domNode),l=a.top+r-ps.scrollY,h=a.top+o-ps.scrollY,c=$L(document.body),[d,u]=this._layoutHorizontalSegmentInPage(c,a,t.left-s.scrollLeft+this._contentLeft,i),[g,m]=this._layoutHorizontalSegmentInPage(c,a,e.left-s.scrollLeft+this._contentLeft,i),_=22,C=22,w=l>=_,v=h+n<=c.height-C;return this._fixedOverflowWidgets?{fitsAbove:w,aboveTop:Math.max(l,_),aboveLeft:u,fitsBelow:v,belowTop:h,belowLeft:m}:{fitsAbove:w,aboveTop:r,aboveLeft:d,fitsBelow:v,belowTop:o,belowLeft:g}}_prepareRenderWidgetAtExactPositionOverflowing(t){return new hl(t.top,t.left+this._contentLeft)}_getTopAndBottomLeft(t){if(!this._viewRange)return[null,null];const e=t.linesVisibleRangesForRange(this._viewRange,!1);if(!e||e.length===0)return[null,null];let i=e[0],n=e[0];for(const h of e)h.lineNumber<i.lineNumber&&(i=h),h.lineNumber>n.lineNumber&&(n=h);let s=1073741824;for(const h of i.ranges)h.left<s&&(s=h.left);let r=1073741824;for(const h of n.ranges)h.left<r&&(r=h.left);const o=t.getVerticalOffsetForLineNumber(i.lineNumber)-t.scrollTop,a=new hl(o,s),l=t.getVerticalOffsetForLineNumber(n.lineNumber)-t.scrollTop;return[a,new hl(l,r)]}_prepareRenderWidget(t){if(!this._preference||this._preference.length===0)return null;const[e,i]=this._getTopAndBottomLeft(t);if(!e||!i)return null;if(this._cachedDomNodeOffsetWidth===-1||this._cachedDomNodeOffsetHeight===-1){let s=null;if(typeof this._actual.beforeRender=="function"&&(s=eg(this._actual.beforeRender,this._actual)),s)this._cachedDomNodeOffsetWidth=s.width,this._cachedDomNodeOffsetHeight=s.height;else{const r=this.domNode.domNode;this._cachedDomNodeOffsetWidth=r.offsetWidth,this._cachedDomNodeOffsetHeight=r.offsetHeight}}let n;this.allowEditorOverflow?n=this._layoutBoxInPage(e,i,this._cachedDomNodeOffsetWidth,this._cachedDomNodeOffsetHeight,t):n=this._layoutBoxInViewport(e,i,this._cachedDomNodeOffsetWidth,this._cachedDomNodeOffsetHeight,t);for(let s=1;s<=2;s++)for(const r of this._preference)if(r===1){if(!n)return null;if(s===2||n.fitsAbove)return{coordinate:new hl(n.aboveTop,n.aboveLeft),position:1}}else if(r===2){if(!n)return null;if(s===2||n.fitsBelow)return{coordinate:new hl(n.belowTop,n.belowLeft),position:2}}else return this.allowEditorOverflow?{coordinate:this._prepareRenderWidgetAtExactPositionOverflowing(e),position:0}:{coordinate:e,position:0};return null}onBeforeRender(t){!this._viewRange||!this._preference||this._viewRange.endLineNumber<t.startLineNumber||this._viewRange.startLineNumber>t.endLineNumber||this.domNode.setMaxWidth(this._maxWidth)}prepareRender(t){this._renderData=this._prepareRenderWidget(t)}render(t){if(!this._renderData){this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,this.domNode.setVisibility("hidden")),typeof this._actual.afterRender=="function"&&eg(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+t.scrollTop-t.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"&&eg(this._actual.afterRender,this._actual,this._renderData.position)}};function eg(t,e,...i){try{return t.call(e,...i)}catch{return null}}var Wk=class extends ja{constructor(t){super(),this._context=t;const e=this._context.configuration.options,i=e.get(131);this._lineHeight=e.get(59),this._renderLineHighlight=e.get(85),this._renderLineHighlightOnlyWhenFocus=e.get(86),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._selectionIsEmpty=!0,this._focused=!1,this._cursorLineNumbers=[1],this._selections=[new xe(1,1,1,1)],this._renderData=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}_readFromSelections(){let t=!1;const e=this._selections.map(n=>n.positionLineNumber);e.sort((n,s)=>n-s),Rn(this._cursorLineNumbers,e)||(this._cursorLineNumbers=e,t=!0);const i=this._selections.every(n=>n.isEmpty());return this._selectionIsEmpty!==i&&(this._selectionIsEmpty=i,t=!0),t}onThemeChanged(t){return this._readFromSelections()}onConfigurationChanged(t){const e=this._context.configuration.options,i=e.get(131);return this._lineHeight=e.get(59),this._renderLineHighlight=e.get(85),this._renderLineHighlightOnlyWhenFocus=e.get(86),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,!0}onCursorStateChanged(t){return this._selections=t.selections,this._readFromSelections()}onFlushed(t){return!0}onLinesDeleted(t){return!0}onLinesInserted(t){return!0}onScrollChanged(t){return t.scrollWidthChanged||t.scrollTopChanged}onZonesChanged(t){return!0}onFocusChanged(t){return this._renderLineHighlightOnlyWhenFocus?(this._focused=t.isFocused,!0):!1}prepareRender(t){if(!this._shouldRenderThis()){this._renderData=null;return}const e=this._renderOne(t),i=t.visibleRange.startLineNumber,n=t.visibleRange.endLineNumber,s=this._cursorLineNumbers.length;let r=0;const o=[];for(let a=i;a<=n;a++){const l=a-i;for(;r<s&&this._cursorLineNumbers[r]<a;)r++;r<s&&this._cursorLineNumbers[r]===a?o[l]=e:o[l]=""}this._renderData=o}render(t,e){if(!this._renderData)return"";const i=e-t;return i>=this._renderData.length?"":this._renderData[i]}_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)}},Q7=class extends Wk{_renderOne(t){return`<div class="${"current-line"+(this._shouldRenderOther()?" current-line-both":"")}" style="width:${Math.max(t.scrollWidth,this._contentWidth)}px; height:${this._lineHeight}px;"></div>`}_shouldRenderThis(){return this._shouldRenderInContent()}_shouldRenderOther(){return this._shouldRenderInMargin()}},J7=class extends Wk{_renderOne(t){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()}};Yt((t,e)=>{const i=t.getColor(o7);if(i&&(e.addRule(`.monaco-editor .view-overlays .current-line { background-color: ${i}; }`),e.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { background-color: ${i}; border: none; }
48`)),!i||i.isTransparent()||t.defines(lb)){const n=t.getColor(lb);n&&(e.addRule(`.monaco-editor .view-overlays .current-line { border: 2px solid ${n}; }`),e.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { border: 2px solid ${n}; }`),t.type==="hc"&&(e.addRule(".monaco-editor .view-overlays .current-line { border-width: 1px; }"),e.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border-width: 1px; }")))}});var e9=class extends ja{constructor(t){super(),this._context=t;const e=this._context.configuration.options;this._lineHeight=e.get(59),this._typicalHalfwidthCharacterWidth=e.get(44).typicalHalfwidthCharacterWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(t){const e=this._context.configuration.options;return this._lineHeight=e.get(59),this._typicalHalfwidthCharacterWidth=e.get(44).typicalHalfwidthCharacterWidth,!0}onDecorationsChanged(t){return!0}onFlushed(t){return!0}onLinesChanged(t){return!0}onLinesDeleted(t){return!0}onLinesInserted(t){return!0}onScrollChanged(t){return t.scrollTopChanged||t.scrollWidthChanged}onZonesChanged(t){return!0}prepareRender(t){const e=t.getDecorationsInViewport();let i=[],n=0;for(let a=0,l=e.length;a<l;a++){const h=e[a];h.options.className&&(i[n++]=h)}i=i.sort((a,l)=>{if(a.options.zIndex<l.options.zIndex)return-1;if(a.options.zIndex>l.options.zIndex)return 1;const h=a.options.className,c=l.options.className;return h<c?-1:h>c?1:T.compareRangesUsingStarts(a.range,l.range)});const s=t.visibleRange.startLineNumber,r=t.visibleRange.endLineNumber,o=[];for(let a=s;a<=r;a++){const l=a-s;o[l]=""}this._renderWholeLineDecorations(t,i,o),this._renderNormalDecorations(t,i,o),this._renderResult=o}_renderWholeLineDecorations(t,e,i){const n=String(this._lineHeight),s=t.visibleRange.startLineNumber,r=t.visibleRange.endLineNumber;for(let o=0,a=e.length;o<a;o++){const l=e[o];if(!l.options.isWholeLine)continue;const h='<div class="cdr '+l.options.className+'" style="left:0;width:100%;height:'+n+'px;"></div>',c=Math.max(l.range.startLineNumber,s),d=Math.min(l.range.endLineNumber,r);for(let u=c;u<=d;u++){const g=u-s;i[g]+=h}}}_renderNormalDecorations(t,e,i){const n=String(this._lineHeight),s=t.visibleRange.startLineNumber;let r=null,o=!1,a=null;for(let l=0,h=e.length;l<h;l++){const c=e[l];if(c.options.isWholeLine)continue;const d=c.options.className,u=!!c.options.showIfCollapsed;let g=c.range;if(u&&g.endColumn===1&&g.endLineNumber!==g.startLineNumber&&(g=new T(g.startLineNumber,g.startColumn,g.endLineNumber-1,this._context.viewModel.getLineMaxColumn(g.endLineNumber-1))),r===d&&o===u&&T.areIntersectingOrTouching(a,g)){a=T.plusRange(a,g);continue}r!==null&&this._renderNormalDecoration(t,a,r,o,n,s,i),r=d,o=u,a=g}r!==null&&this._renderNormalDecoration(t,a,r,o,n,s,i)}_renderNormalDecoration(t,e,i,n,s,r,o){const a=t.linesVisibleRangesForRange(e,i==="findMatch");if(a)for(let l=0,h=a.length;l<h;l++){const c=a[l];if(c.outsideRenderedLine)continue;const d=c.lineNumber-r;if(n&&c.ranges.length===1){const u=c.ranges[0];if(u.width<this._typicalHalfwidthCharacterWidth){const g=Math.round(u.left+u.width/2),m=Math.max(0,Math.round(g-this._typicalHalfwidthCharacterWidth/2));c.ranges[0]=new lk(m,this._typicalHalfwidthCharacterWidth)}}for(let u=0,g=c.ranges.length;u<g;u++){const m=c.ranges[u],_='<div class="cdr '+i+'" style="left:'+String(m.left)+"px;width:"+String(m.width)+"px;height:"+s+'px;"></div>';o[d]+=_}}}render(t,e){if(!this._renderResult)return"";const i=e-t;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}},qn=class extends V{onclick(t,e){this._register(B(t,Z.CLICK,i=>e(new ji(i))))}onmousedown(t,e){this._register(B(t,Z.MOUSE_DOWN,i=>e(new ji(i))))}onmouseover(t,e){this._register(B(t,Z.MOUSE_OVER,i=>e(new ji(i))))}onnonbubblingmouseout(t,e){this._register(Dv(t,i=>e(new ji(i))))}onkeydown(t,e){this._register(B(t,Z.KEY_DOWN,i=>e(new Pe(i))))}onkeyup(t,e){this._register(B(t,Z.KEY_UP,i=>e(new Pe(i))))}oninput(t,e){this._register(B(t,Z.INPUT,e))}onblur(t,e){this._register(B(t,Z.BLUR,e))}onfocus(t,e){this._register(B(t,Z.FOCUS,e))}ignoreGesture(t){ii.ignoreTarget(t)}},t9=class extends qn{constructor(t){super(),this._onActivate=t.onActivate,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",this.bgDomNode.style.width=t.bgWidth+"px",this.bgDomNode.style.height=t.bgHeight+"px",typeof t.top<"u"&&(this.bgDomNode.style.top="0px"),typeof t.left<"u"&&(this.bgDomNode.style.left="0px"),typeof t.bottom<"u"&&(this.bgDomNode.style.bottom="0px"),typeof t.right<"u"&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=t.className,this.domNode.classList.add(...t.icon.classNamesArray),this.domNode.style.position="absolute",this.domNode.style.width="11px",this.domNode.style.height="11px",typeof t.top<"u"&&(this.domNode.style.top=t.top+"px"),typeof t.left<"u"&&(this.domNode.style.left=t.left+"px"),typeof t.bottom<"u"&&(this.domNode.style.bottom=t.bottom+"px"),typeof t.right<"u"&&(this.domNode.style.right=t.right+"px"),this._mouseMoveMonitor=this._register(new Ju),this.onmousedown(this.bgDomNode,e=>this._arrowMouseDown(e)),this.onmousedown(this.domNode,e=>this._arrowMouseDown(e)),this._mousedownRepeatTimer=this._register(new Rh),this._mousedownScheduleRepeatTimer=this._register(new jn)}_arrowMouseDown(t){const e=()=>{this._mousedownRepeatTimer.cancelAndSet(()=>this._onActivate(),41.666666666666664)};this._onActivate(),this._mousedownRepeatTimer.cancel(),this._mousedownScheduleRepeatTimer.cancelAndSet(e,200),this._mouseMoveMonitor.startMonitoring(t.target,t.buttons,Ov,i=>{},()=>{this._mousedownRepeatTimer.cancel(),this._mousedownScheduleRepeatTimer.cancel()}),t.preventDefault()}},i9=class extends V{constructor(t,e,i){super(),this._visibility=t,this._visibleClassName=e,this._invisibleClassName=i,this._domNo
48de=null,this._isVisible=!1,this._isNeeded=!1,this._rawShouldBeVisible=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new jn)}setVisibility(t){this._visibility!==t&&(this._visibility=t,this._updateShouldBeVisible())}setShouldBeVisible(t){this._rawShouldBeVisible=t,this._updateShouldBeVisible()}_applyVisibilitySetting(){return this._visibility===2?!1:this._visibility===3?!0:this._rawShouldBeVisible}_updateShouldBeVisible(){const t=this._applyVisibilitySetting();this._shouldBeVisible!==t&&(this._shouldBeVisible=t,this.ensureVisibility())}setIsNeeded(t){this._isNeeded!==t&&(this._isNeeded=t,this.ensureVisibility())}setDomNode(t){this._domNode=t,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(()=>{this._domNode&&this._domNode.setClassName(this._visibleClassName)},0))}_hide(t){this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,this._domNode&&this._domNode.setClassName(this._invisibleClassName+(t?" fade":"")))}},n9=140,Hk=class extends qn{constructor(t){super(),this._lazyRender=t.lazyRender,this._host=t.host,this._scrollable=t.scrollable,this._scrollByPage=t.scrollByPage,this._scrollbarState=t.scrollbarState,this._visibilityController=this._register(new i9(t.visibility,"visible scrollbar "+t.extraScrollbarClassName,"invisible scrollbar "+t.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._mouseMoveMonitor=this._register(new Ju),this._shouldRender=!0,this.domNode=de(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition("absolute"),this.onmousedown(this.domNode.domNode,e=>this._domNodeMouseDown(e))}_createArrow(t){const e=this._register(new t9(t));this.domNode.domNode.appendChild(e.bgDomNode),this.domNode.domNode.appendChild(e.domNode)}_createSlider(t,e,i,n){this.slider=de(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(t),this.slider.setLeft(e),typeof i=="number"&&this.slider.setWidth(i),typeof n=="number"&&this.slider.setHeight(n),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this.onmousedown(this.slider.domNode,s=>{s.leftButton&&(s.preventDefault(),this._sliderMouseDown(s,()=>{}))}),this.onclick(this.slider.domNode,s=>{s.leftButton&&s.stopPropagation()})}_onElementSize(t){return this._scrollbarState.setVisibleSize(t)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(t){return this._scrollbarState.setScrollSize(t)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(t){return this._scrollbarState.setScrollPosition(t)&&(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()))}_domNodeMouseDown(t){t.target===this.domNode.domNode&&this._onMouseDown(t)}delegateMouseDown(t){const e=this.domNode.domNode.getClientRects()[0].top,i=e+this._scrollbarState.getSliderPosition(),n=e+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),s=this._sliderMousePosition(t);i<=s&&s<=n?t.leftButton&&(t.preventDefault(),this._sliderMouseDown(t,()=>{})):this._onMouseDown(t)}_onMouseDown(t){let e,i;if(t.target===this.domNode.domNode&&typeof t.browserEvent.offsetX=="number"&&typeof t.browserEvent.offsetY=="number")e=t.browserEvent.offsetX,i=t.browserEvent.offsetY;else{const s=qi(this.domNode.domNode);e=t.posx-s.left,i=t.posy-s.top}const n=this._mouseDownRelativePosition(e,i);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(n):this._scrollbarState.getDesiredScrollPositionFromOffset(n)),t.leftButton&&(t.preventDefault(),this._sliderMouseDown(t,()=>{}))}_sliderMouseDown(t,e){const i=this._sliderMousePosition(t),n=this._sliderOrthogonalMousePosition(t),s=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._mouseMoveMonitor.startMonitoring(t.target,t.buttons,Ov,r=>{const o=this._sliderOrthogonalMousePosition(r),a=Math.abs(o-n);if(ei&&a>n9){this._setDesiredScrollPositionNow(s.getScrollPosition());return}const l=this._sliderMousePosition(r)-i;this._setDesiredScrollPositionNow(s.getDesiredScrollPositionFromDelta(l))},()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd(),e()}),this._host.onDragStart()}_setDesiredScrollPositionNow(t){const e={};this.writeScrollPosition(e,t),this._scrollable.setScrollPositionNow(e)}updateScrollbarSize(t){this._updateScrollbarSize(t),this._scrollbarState.setScrollbarSize(t),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}},s9=20,zk=class Gp{constructor(e,i,n,s,r,o){this._scrollbarSize=Math.round(i),this._oppositeScrollbarSize=Math.round(n),this._arrowSize=Math.round(e),this._visibleSize=s,this._scrollSize=r,this._scrollPosition=o,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new Gp(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(e){const i=Math.round(e);return this._visibleSize!==i?(this._visibleSize=i,this._refreshComputedValues(),!0):!1}setScrollSize(e){const i=Math.round(e);return this._scrollSize!==i?(this._scrollSize=i,this._refreshComputedValues(),!0):!1}setScrollPosition(e){const i=Math.round(e);return this._scrollPosition!==i?(this._scrollPosition=i,this._refreshComputedValues(),!0):!1}setScrollbarSize(e){this._scrollbarSize=Math.round(e)}setOppositeScrollbarSize(e){this._oppositeScrollbarSize=Math.round(e)}static _computeValues(e,i,n,s,r){const o=Math.max(0,n-e),a=Math.max(0,o-2*i),l=s>0&&s>n;if(!l)return{computedAvailableSize:Math.round(o),computedIsNeeded:l,computedSliderSize:Math.round(a),computedSliderRatio:0,computedSliderPosition:0};const h=Math.round(Math.max(s9,Math.floor(n*a/s))),c=(a-h)/(s-n),d=r*c;return{computedAvailableSize:Math.round(o),computedIsNeeded:l,computedSliderSize:Math.round(h),computedSliderRatio:c,computedSliderPosition:Math.round(d)}}_refreshComputedValues(){const e=Gp._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=e.computedAvailableSize,this._computedIsNeeded=e.computedIsNeeded,this._computedSliderSize=e.computedSliderSize,this._computedSliderRatio=e.computedSliderRatio,this._computedSliderPosition=e.computedSliderPosition}getArrowSize(){return this._arrowSize}getScrollPosition(){return this._scrollPosition}getRectangleLargeSize(){return this._computedAvailableSize}getRectangleSmallSize(){return this._scrollbarSize}isNeeded(){return this._computedIsNeeded}getSliderSize(){return this._computedSliderSize}getSliderPosition(){return this._computedSliderPosition}getDesiredScrollPositionFromOffset(e){if(!this._computedIsNeeded)return 0;const i=e-this._arrowSize-this._computedSliderSize/2;return Math.round(i/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(e){if(!this._computedIsNeeded)return 0;const i=e-this._arrowSize;let n=this._scrollPosition;return i<this._computedSliderPosition?n-=this._visibleSize:n+=this._visibleSize,n}getDesiredScrollPositionFromDelta(e){if(!this._computedIsNeeded)return 0;const i=this._computedSliderPosition+e;return Math.round(i/this._computedSliderRatio)}},r9=class extends Hk{constructor(t,e,i){const n=t.getScrollDimensions(),s=t.getCurrentScrollPosition();if(super({lazyRender:e.lazyRender,host:i,scrollbarState:new zk(e.horizontalHasArrows?e.arrowSize:0,e.horizontal===2?0:e.horizontalScrollbarSize,e.vertical===2?0:e.verticalScrollbarSize,n.width,n.scrollWidth,s.scrollLeft),visibility:e.horizontal,extraScrollbarClassName:"horizontal",scrollable:t,scrollByPage:e.scrollByPage}),e.horizontalHasArrows){const r=(e.arrowSize-11)/2,o=(e.horizontalScrollbarSize-11)/2;this._createArrow({className:"scra",icon:f.scrollbarButtonLeft,top:o,left:r,bottom:void 0,right:void 0,bgWidth:e.arrowSize,bgHeight:e.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new ka(null,1,0))}),this._createArrow({className:"scra",icon:f.scrollbarButtonRight,top:o,left:void 0,bottom:void 0,right:r,bgWi
vendor: 6,372 bytes, line 48
48dth:e.arrowSize,bgHeight:e.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new ka(null,-1,0))})}this._createSlider(Math.floor((e.horizontalScrollbarSize-e.horizontalSliderSize)/2),0,void 0,e.horizontalSliderSize)}_updateSlider(t,e){this.slider.setWidth(t),this.slider.setLeft(e)}_renderDomNode(t,e){this.domNode.setWidth(t),this.domNode.setHeight(e),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(t){return this._shouldRender=this._onElementScrollSize(t.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(t.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(t.width)||this._shouldRender,this._shouldRender}_mouseDownRelativePosition(t,e){return t}_sliderMousePosition(t){return t.posx}_sliderOrthogonalMousePosition(t){return t.posy}_updateScrollbarSize(t){this.slider.setHeight(t)}writeScrollPosition(t,e){t.scrollLeft=e}updateOptions(t){this.updateScrollbarSize(t.horizontal===2?0:t.horizontalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(t.vertical===2?0:t.verticalScrollbarSize),this._visibilityController.setVisibility(t.horizontal),this._scrollByPage=t.scrollByPage}},o9=class extends Hk{constructor(t,e,i){const n=t.getScrollDimensions(),s=t.getCurrentScrollPosition();if(super({lazyRender:e.lazyRender,host:i,scrollbarState:new zk(e.verticalHasArrows?e.arrowSize:0,e.vertical===2?0:e.verticalScrollbarSize,0,n.height,n.scrollHeight,s.scrollTop),visibility:e.vertical,extraScrollbarClassName:"vertical",scrollable:t,scrollByPage:e.scrollByPage}),e.verticalHasArrows){const r=(e.arrowSize-11)/2,o=(e.verticalScrollbarSize-11)/2;this._createArrow({className:"scra",icon:f.scrollbarButtonUp,top:r,left:o,bottom:void 0,right:void 0,bgWidth:e.verticalScrollbarSize,bgHeight:e.arrowSize,onActivate:()=>this._host.onMouseWheel(new ka(null,0,1))}),this._createArrow({className:"scra",icon:f.scrollbarButtonDown,top:void 0,left:o,bottom:r,right:void 0,bgWidth:e.verticalScrollbarSize,bgHeight:e.arrowSize,onActivate:()=>this._host.onMouseWheel(new ka(null,0,-1))})}this._createSlider(0,Math.floor((e.verticalScrollbarSize-e.verticalSliderSize)/2),e.verticalSliderSize,void 0)}_updateSlider(t,e){this.slider.setHeight(t),this.slider.setTop(e)}_renderDomNode(t,e){this.domNode.setWidth(e),this.domNode.setHeight(t),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(t){return this._shouldRender=this._onElementScrollSize(t.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(t.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(t.height)||this._shouldRender,this._shouldRender}_mouseDownRelativePosition(t,e){return e}_sliderMousePosition(t){return t.posy}_sliderOrthogonalMousePosition(t){return t.posx}_updateScrollbarSize(t){this.slider.setWidth(t)}writeScrollPosition(t,e){t.scrollTop=e}updateOptions(t){this.updateScrollbarSize(t.vertical===2?0:t.verticalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(0),this._visibilityController.setVisibility(t.vertical),this._scrollByPage=t.scrollByPage}},a9=class Zp{constructor(e,i,n,s,r,o,a){this._forceIntegerValues=e,this._scrollStateBrand=void 0,this._forceIntegerValues&&(i=i|0,n=n|0,s=s|0,r=r|0,o=o|0,a=a|0),this.rawScrollLeft=s,this.rawScrollTop=a,i<0&&(i=0),s+i>n&&(s=n-i),s<0&&(s=0),r<0&&(r=0),a+r>o&&(a=o-r),a<0&&(a=0),this.width=i,this.scrollWidth=n,this.scrollLeft=s,this.height=r,this.scrollHeight=o,this.scrollTop=a}equals(e){return this.rawScrollLeft===e.rawScrollLeft&&this.rawScrollTop===e.rawScrollTop&&this.width===e.width&&this.scrollWidth===e.scrollWidth&&this.scrollLeft===e.scrollLeft&&this.height===e.height&&this.scrollHeight===e.scrollHeight&&this.scrollTop===e.scrollTop}withScrollDimensions(e,i){return new Zp(this._forceIntegerValues,typeof e.width<"u"?e.width:this.width,typeof e.scrollWidth<"u"?e.scrollWidth:this.scrollWidth,i?this.rawScrollLeft:this.scrollLeft,typeof e.height<"u"?e.height:this.height,typeof e.scrollHeight<"u"?e.scrollHeight:this.scrollHeight,i?this.rawScrollTop:this.scrollTop)}withScrollPosition(e){return new Zp(this._forceIntegerValues,this.width,this.scrollWidth,typeof e.scrollLeft<"u"?e.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,typeof e.scrollTop<"u"?e.scrollTop:this.rawScrollTop)}createScrollEvent(e,i){const n=this.width!==e.width,s=this.scrollWidth!==e.scrollWidth,r=this.scrollLeft!==e.scrollLeft,o=this.height!==e.height,a=this.scrollHeight!==e.scrollHeight,l=this.scrollTop!==e.scrollTop;return{inSmoothScrolling:i,oldWidth:e.width,oldScrollWidth:e.scrollWidth,oldScrollLeft:e.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:e.height,oldScrollHeight:e.scrollHeight,oldScrollTop:e.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:n,scrollWidthChanged:s,scrollLeftChanged:r,heightChanged:o,scrollHeightChanged:a,scrollTopChanged:l}}},Wh=class extends V{constructor(t){super(),this._scrollableBrand=void 0,this._onScroll=this._register(new M),this.onScroll=this._onScroll.event,this._smoothScrollDuration=t.smoothScrollDuration,this._scheduleAtNextAnimationFrame=t.scheduleAtNextAnimationFrame,this._state=new a9(t.forceIntegerValues,0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(t){this._smoothScrollDuration=t}validateScrollPosition(t){return this._state.withScrollPosition(t)}getScrollDimensions(){return this._state}setScrollDimensions(t,e){const i=this._state.withScrollDimensions(t,e);this._setState(i,!!this._smoothScrolling),this._smoothScrolling&&this._smoothScrolling.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(t){const e=this._state.withScrollPosition(t);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(e,!1)}setScrollPositionSmooth(t,e){if(this._smoothScrollDuration===0)return this.setScrollPositionNow(t);if(this._smoothScrolling){t={scrollLeft:typeof t.scrollLeft>"u"?this._smoothScrolling.to.scrollLeft:t.scrollLeft,scrollTop:typeof t.scrollTop>"u"?this._smoothScrolling.to.scrollTop:t.scrollTop};const i=this._state.withScrollPosition(t);
48if(this._smoothScrolling.to.scrollLeft===i.scrollLeft&&this._smoothScrolling.to.scrollTop===i.scrollTop)return;let n;e?n=new mb(this._smoothScrolling.from,i,this._smoothScrolling.startTime,this._smoothScrolling.duration):n=this._smoothScrolling.combine(this._state,i,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=n}else{const i=this._state.withScrollPosition(t);this._smoothScrolling=mb.start(this._state,i,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}_performSmoothScrolling(){if(!this._smoothScrolling)return;const t=this._smoothScrolling.tick(),e=this._state.withScrollPosition(t);if(this._setState(e,!0),!!this._smoothScrolling){if(t.isDone){this._smoothScrolling.dispose(),this._smoothScrolling=null;return}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}}_setState(t,e){const i=this._state;i.equals(t)||(this._state=t,this._onScroll.fire(this._state.createScrollEvent(i,e)))}},gb=class{constructor(t,e,i){this.scrollLeft=t,this.scrollTop=e,this.isDone=i}};function tg(t,e){const i=e-t;return function(n){return t+i*c9(n)}}function l9(t,e,i){return function(n){return n<i?t(n/i):e((n-i)/(1-i))}}var mb=class Yp{constructor(e,i,n,s){this.from=e,this.to=i,this.duration=s,this.startTime=n,this.animationFrameDisposable=null,this._initAnimations()}_initAnimations(){this.scrollLeft=this._initAnimation(this.from.scrollLeft,this.to.scrollLeft,this.to.width),this.scrollTop=this._initAnimation(this.from.scrollTop,this.to.scrollTop,this.to.height)}_initAnimation(e,i,n){if(Math.abs(e-i)>2.5*n){let s,r;return e<i?(s=e+.75*n,r=i-.75*n):(s=e-.75*n,r=i+.75*n),l9(tg(e,s),tg(r,i),.33)}return tg(e,i)}dispose(){this.animationFrameDisposable!==null&&(this.animationFrameDisposable.dispose(),this.animationFrameDisposable=null)}acceptScrollDimensions(e){this.to=e.withScrollPosition(this.to),this._initAnimations()}tick(){return this._tick(Date.now())}_tick(e){const i=(e-this.startTime)/this.duration;if(i<1){const n=this.scrollLeft(i),s=this.scrollTop(i);return new gb(n,s,!1)}return new gb(this.to.scrollLeft,this.to.scrollTop,!0)}combine(e,i,n){return Yp.start(e,i,n)}static start(e,i,n){n=n+10;const s=Date.now()-10;return new Yp(e,i,s,n)}};function h9(t){return Math.pow(t,3)}function c9(t){return 1-h9(1-t)}var d9=500,pb=50,u9=class{constructor(t,e,i){this.timestamp=t,this.deltaX=e,this.deltaY=i,this.score=0}},Xp=class{constructor(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}isPhysicalMouseWheel(){if(this._front===-1&&this._rear===-1)return!1;let t=1,e=0,i=1,n=this._rear;do{const s=n===this._front?t:Math.pow(2,-i);if(t-=s,e+=this._memory[n].score*s,n===this._front)break;n=(this._capacity+n-1)%this._capacity,i++}while(!0);return e<=.5}accept(t,e,i){const n=new u9(t,e,i);n.score=this._computeScore(n),this._front===-1&&this._rear===-1?(this._memory[0]=n,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]=n)}_computeScore(t){if(Math.abs(t.deltaX)>0&&Math.abs(t.deltaY)>0)return 1;let e=.5;return!(this._front===-1&&this._rear===-1)&&this._memory[this._rear],(!this._isAlmostInt(t.deltaX)||!this._isAlmostInt(t.deltaY))&&(e+=.25),Math.min(Math.max(e,0),1)}_isAlmostInt(t){return Math.abs(Math.round(t)-t)<.01}};Xp.INSTANCE=new Xp;var Uv=class extends qn{constructor(t,e,i){super(),this._onScroll=this._register(new M),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new M),t.style.overflow="hidden",this._options=g9(e),this._scrollable=i,this._register(this._scrollable.onScroll(s=>{this._onWillScroll.fire(s),this._onDidScroll(s),this._onScroll.fire(s)}));const n={onMouseWheel:s=>this._onMouseWheel(s),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new o9(this._scrollable,this._options,n)),this._horizontalScrollbar=this._register(new r9(this._scrollable,this._options,n)),this._domNo
48de=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(t),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=de(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=de(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=de(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,s=>this._onMouseOver(s)),this.onnonbubblingmouseout(this._listenOnDomNode,s=>this._onMouseOut(s)),this._hideTimeout=this._register(new jn),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}get options(){return this._options}dispose(){this._mouseWheelToDispose=De(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarMouseDown(t){this._verticalScrollbar.delegateMouseDown(t)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(t){this._scrollable.setScrollDimensions(t,!1)}updateClassName(t){this._options.className=t,fe&&(this._options.className+=" mac"),this._domNode.className="monaco-scrollable-element "+this._options.className}updateOptions(t){typeof t.handleMouseWheel<"u"&&(this._options.handleMouseWheel=t.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),typeof t.mouseWheelScrollSensitivity<"u"&&(this._options.mouseWheelScrollSensitivity=t.mouseWheelScrollSensitivity),typeof t.fastScrollSensitivity<"u"&&(this._options.fastScrollSensitivity=t.fastScrollSensitivity),typeof t.scrollPredominantAxis<"u"&&(this._options.scrollPredominantAxis=t.scrollPredominantAxis),typeof t.horizontal<"u"&&(this._options.horizontal=t.horizontal),typeof t.vertical<"u"&&(this._options.vertical=t.vertical),typeof t.horizontalScrollbarSize<"u"&&(this._options.horizontalScrollbarSize=t.horizontalScrollbarSize),typeof t.verticalScrollbarSize<"u"&&(this._options.verticalScrollbarSize=t.verticalScrollbarSize),typeof t.scrollByPage<"u"&&(this._options.scrollByPage=t.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}_setListeningToMouseWheel(t){if(this._mouseWheelToDispose.length>0!==t&&(this._mouseWheelToDispose=De(this._mouseWheelToDispose),t)){const e=i=>{this._onMouseWheel(new ka(i))};this._mouseWheelToDispose.push(B(this._listenOnDomNode,Z.MOUSE_WHEEL,e,{passive:!1}))}}_onMouseWheel(t){const e=Xp.INSTANCE;{const s=window.devicePixelRatio/Ky();ei||Bt?e.accept(Date.now(),t.deltaX/s,t.deltaY/s):e.accept(Date.now(),t.deltaX,t.deltaY)}let i=!1;if(t.deltaY||t.deltaX){let s=t.deltaY*this._options.mouseWheelScrollSensitivity,r=t.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(Math.abs(s)>=Math.abs(r)?r=0:s=0),this._options.flipAxes&&([s,r]=[r,s]);const o=!fe&&t.browserEvent&&t.browserEvent.shiftKey;(this._options.scrollYToX||o)&&!r&&(r=s,s=0),t.browserEvent&&t.browserEvent.altKey&&(r=r*this._options.fastScrollSensitivity,s=s*this._options.fastScrollSensitivity);const a=this._scrollable.getFutureScrollPosition();let l={};if(s){const h=pb*s,c=a.scrollTop-(h<0?Math.floor(h):Math.ceil(h));this._verticalScrollbar.writeScrollPosition(l,c)}if(r){const h=pb*r,c=a.scrollLeft-(h<0?Math.floor(h):Math.ceil(h));this._horizontalScrollbar.writeScrollPosition(l,c)}l=this._scrollable.validateScrollPosition(l),(a.scrollLeft!==l.scrollLeft||a.scrollTop!==l.scrollTop)&&(this._options.mouseWheelSmoothScroll&&e.
48isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(l):this._scrollable.setScrollPositionNow(l),i=!0)}let n=i;!n&&this._options.alwaysConsumeMouseWheel&&(n=!0),!n&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(n=!0),n&&(t.preventDefault(),t.stopPropagation())}_onDidScroll(t){this._shouldRender=this._horizontalScrollbar.onDidScroll(t)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(t)||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 t=this._scrollable.getCurrentScrollPosition(),e=t.scrollTop>0,i=t.scrollLeft>0,n=i?" left":"",s=e?" top":"",r=i||e?" top-left-corner":"";this._leftShadowDomNode.setClassName(`shadow${n}`),this._topShadowDomNode.setClassName(`shadow${s}`),this._topLeftShadowDomNode.setClassName(`shadow${r}${s}${n}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseOut(t){this._mouseIsOver=!1,this._hide()}_onMouseOver(t){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(),d9)}},f9=class extends Uv{constructor(t,e){e=e||{},e.mouseWheelSmoothScroll=!1;const i=new Wh({forceIntegerValues:!0,smoothScrollDuration:0,scheduleAtNextAnimationFrame:n=>Cn(n)});super(t,e,i),this._register(i)}setScrollPosition(t){this._scrollable.setScrollPositionNow(t)}},$v=class extends Uv{constructor(t,e,i){super(t,e,i)}setScrollPosition(t){t.reuseAnimation?this._scrollable.setScrollPositionSmooth(t,t.reuseAnimation):this._scrollable.setScrollPositionNow(t)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}},Uk=class extends Uv{constructor(t,e){e=e||{},e.mouseWheelSmoothScroll=!1;const i=new Wh({forceIntegerValues:!1,smoothScrollDuration:0,scheduleAtNextAnimationFrame:n=>Cn(n)});super(t,e,i),this._register(i),this._element=t,this.onScroll(n=>{n.scrollTopChanged&&(this._element.scrollTop=n.scrollTop),n.scrollLeftChanged&&(this._element.scrollLeft=n.scrollLeft)}),this.scanDomNode()}setScrollPosition(t){this._scrollable.setScrollPositionNow(t)}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 g9(t){const e={lazyRender:typeof t.lazyRender<"u"?t.lazyRender:!1,className:typeof t.className<"u"?t.className:"",useShadows:typeof t.useShadows<"u"?t.useShadows:!0,handleMouseWheel:typeof t.handleMouseWheel<"u"?t.handleMouseWheel:!0,flipAxes:typeof t.flipAxes<"u"?t.flipAxes:!1,consumeMouseWheelIfScrollbarIsNeeded:typeof t.consumeMouseWheelIfScrollbarIsNeeded<"u"?t.consumeMouseWheelIfScrollbarIsNeeded:!1,alwaysConsumeMouseWheel:typeof t.alwaysConsumeMouseWheel<"u"?t.alwaysConsumeMouseWheel:!1,scrollYToX:typeof t.scrollYToX<"u"?t.scrollYToX:!1,mouseWheelScrollSensitivity:typeof t.mouseWheelScrollSensitivity<"u"?t.mouseWheelScrollSensitivity:1,fastScrollSensitivity:typeof t.fastScrollSensitivity<"u"?t.fastScrollSensitivity:5,scrollPredominantAxis:typeof t.scrollPredominantAxis<"u"?t.scrollPredominantAxis:!0,mouseWheelSmoothScroll:typeof t.mouseWheelSmoothScroll<"u"?t.mouseWheelSmoothScroll:!0,arrowSize:typeof t.arrowSize<"u"?t.arrowSize:11,listenOnDomNode:typeof t.listenOnDomNode<"u"?t.listenOnDomNode:null,horizontal:typeof t.horizontal<"u"?t.horizontal:1,horizontalScrollbarSize:typeof t.horizontalScrollbarSize<"u"?t.horizontalScrollbarSize:10,horizontalSliderSize:typeof t.horizontalSliderSize<"u"?t.horizontalSliderSize:0,horizontalHasArrows:typeof t.horizontalHasArrows<"u"?t.horizontalHasArrows:!1,vertical:typeof t.vertical<"u"?t.vertical:1,verticalScrollbarSize:typeof t.verticalScrollbarSize<"u"?t.verticalScrollbarSize:10,verticalHasArrows:typeof t.verticalHasArrows<"u"?t.verticalHasArrows:!1,verticalSliderSize:typeof t.verticalSliderSize<"u"?t.verticalSliderSize:0,scrollByPage:typeof t.scrollByPage<"u"?t.scrollByPage:!1};return e.horizontalSliderSize=typeof t.horizontalSliderSize<"u"?t.horizontalSliderSize:e.horizontalScrollbarSize,e.verticalSliderSize=typeof t.verticalSliderSize<"u"?t.verticalSliderSize:e.verticalScrollbarSize,fe&&(e.className+=" mac"),e}var m9=class extends Mi{constructor(t,e,i,n){super(t);const s=this._context.configuration.options,r=s.get(92),o=s.get(67),a=s.get(34),l=s.get(95),h={listenOnDomNode:i.domNode,className:"editor-scrollable "+nu(t.theme.type),useShadows:!1,lazyRender:!0,vertical:r.vertical,horizontal:r.horizontal,verticalHasArrows:r.verticalHasArrows,horizontalHasArrows:r.horizontalHasArrows,verticalScrollbarSize:r.verticalScrollbarSize,verticalSliderSize:r.verticalSliderSize,horizontalScrollbarSize:r.horizontalScrollbarSize,horizontalSliderSize:r.horizontalSliderSize,handleMouseWheel:r.handleMouseWheel,alwaysConsumeMouseWheel:r.alwaysConsumeMouseWheel,arrowSize:r.arrowSize,mouseWheelScrollSensitivity:o,fastScrollSensitivity:a,scrollPredominantAxis:l,scrollByPage:r.scrollByPage};this.scrollbar=this._register(new $v(e.domNode,h,this._context.viewLayout.getScrollable())),Hn.write(this.scrollbar.getDomNode(),5),this.scrollbarDomNode=de(this.scrollbar.getDomNode()),this.scrollbarDomNode.setPosition("absolute"),this._setLayout();const c=(d,u,g)=>{const m={};if(u){const _=d.scrollTop;_&&(m.scrollTop=this._context.viewLayout.getCurrentScrollTop()+_,d.scrollTop=0)}if(g){const _=d.scrollLeft;_&&(m.scrollLeft=this._context.viewLayout.getCurrentScrollLeft()+_,d.scrollLeft=0)}this._context.viewModel.viewLayout.setScrollPosition(m,1)};this._register(B(i.domNode,"scroll",d=>
48c(i.domNode,!0,!0))),this._register(B(e.domNode,"scroll",d=>c(e.domNode,!0,!1))),this._register(B(n.domNode,"scroll",d=>c(n.domNode,!0,!1))),this._register(B(this.scrollbarDomNode.domNode,"scroll",d=>c(this.scrollbarDomNode.domNode,!0,!1)))}dispose(){super.dispose()}_setLayout(){const t=this._context.configuration.options,e=t.get(131);this.scrollbarDomNode.setLeft(e.contentLeft),t.get(65).side==="right"?this.scrollbarDomNode.setWidth(e.contentWidth+e.minimap.minimapWidth):this.scrollbarDomNode.setWidth(e.contentWidth),this.scrollbarDomNode.setHeight(e.height)}getOverviewRulerLayoutInfo(){return this.scrollbar.getOverviewRulerLayoutInfo()}getDomNode(){return this.scrollbarDomNode}delegateVerticalScrollbarMouseDown(t){this.scrollbar.delegateVerticalScrollbarMouseDown(t)}onConfigurationChanged(t){if(t.hasChanged(92)||t.hasChanged(67)||t.hasChanged(34)){const e=this._context.configuration.options,i=e.get(92),n=e.get(67),s=e.get(34),r=e.get(95),o={vertical:i.vertical,horizontal:i.horizontal,verticalScrollbarSize:i.verticalScrollbarSize,horizontalScrollbarSize:i.horizontalScrollbarSize,scrollByPage:i.scrollByPage,handleMouseWheel:i.handleMouseWheel,mouseWheelScrollSensitivity:n,fastScrollSensitivity:s,scrollPredominantAxis:r};this.scrollbar.updateOptions(o)}return t.hasChanged(131)&&this._setLayout(),!0}onScrollChanged(t){return!0}onThemeChanged(t){return this.scrollbar.updateClassName("editor-scrollable "+nu(this._context.theme.type)),!0}prepareRender(t){}render(t){this.scrollbar.renderNow()}};Yt((t,e)=>{const i=t.getColor($a);i&&e.addRule(`
49			.monaco-scrollable-element > .shadow.top {
50				box-shadow: ${i} 0 6px 6px -6px inset;
51			}
52
53			.monaco-scrollable-element > .shadow.left {
54				box-shadow: ${i} 6px 0 6px -6px inset;
55			}
56
57			.monaco-scrollable-element > .shadow.top.left {
58				box-shadow: ${i} 6px 6px 6px -6px inset;
59			}
60		`);const n=t.getColor(aa);n&&e.addRule(`
61			.monaco-scrollable-element > .scrollbar > .slider {
62				background: ${n};
63			}
64		`);const s=t.getColor(la);s&&e.addRule(`
65			.monaco-scrollable-element > .scrollbar > .slider:hover {
66				background: ${s};
67			}
68		`);const r=t.getColor(ha);r&&e.addRule(`
69			.monaco-scrollable-element > .scrollbar > .slider.active {
70				background: ${r};
71			}
72		`)});var cu=class{constructor(t,e,i){this._decorationToRenderBrand=void 0,this.startLineNumber=+t,this.endLineNumber=+e,this.className=String(i)}},Kv=class extends ja{_render(t,e,i){const n=[];for(let o=t;o<=e;o++){const a=o-t;n[a]=[]}if(i.length===0)return n;i.sort((o,a)=>o.className===a.className?o.startLineNumber===a.startLineNumber?o.endLineNumber-a.endLineNumber:o.startLineNumber-a.startLineNumber:o.className<a.className?-1:1);let s=null,r=0;for(let o=0,a=i.length;o<a;o++){const l=i[o],h=l.className;let c=Math.max(l.startLineNumber,t)-t;const d=Math.min(l.endLineNumber,e)-t;s===h?(c=Math.max(r+1,c),r=Math.max(r,d)):(s=h,r=d);for(let u=c;u<=r;u++)n[u].push(s)}return n}},p9=class extends Kv{constructor(t){super(),this._context=t;const e=this._context.configuration.options,i=e.get(131);this._lineHeight=e.get(59),this._glyphMargin=e.get(50),this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(t){const e=this._context.configuration.options,i=e.get(131);return this._lineHeight=e.get(59),this._glyphMargin=e.get(50),this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,!0}onDecorationsChanged(t){return!0}onFlushed(t){return!0}onLinesChanged(t){return!0}onLinesDeleted(t){return!0}onLinesInserted(t){return!0}onScrollChanged(t){return t.scrollTopChanged}onZonesChanged(t){return!0}_getDecorations(t){const e=t.getDecorationsInViewport(),i=[];let n=0;for(let s=0,r=e.length;s<r;s++){const o=e[s],a=o.options.glyphMarginClassName;a&&(i[n++]=new cu(o.range.startLineNumber,o.range.endLineNumber,a))}return i}prepareRender(t){if(!this._glyphMargin){this._renderResult=null;return}const e=t.visibleRange.startLineNumber,i=t.visibleRange.endLineNumber,n=this._render(e,i,this._getDecorations(t)),s=this._lineHeight.toString(),r=this._glyphMarginLeft.toString(),o=this._glyphMarginWidth.toString(),a='" style="left:'+r+"px;width:"+o+"px;height:"+s+'px;"></div>',l=[];for(let h=e;h<=i;h++){const c=h-e,d=n[c];d.length===0?l[c]="":l[c]='<div class="cgmr codicon '+d.join(" ")+a}this._renderResult=l}render(t,e){if(!this._renderResult)return"";const i=e-t;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}},_9=class{constructor(){this._isDisposed=!1}dispose(){this._isDisposed=!0}
72assertNotDisposed(){if(this._isDisposed)throw new Error("TextModelPart is disposed!")}};function v9(t,e){let i=0,n=0;const s=t.length;for(;n<s;){const r=t.charCodeAt(n);if(r===32)i++;else if(r===9)i=i-i%e+e;else break;n++}return n===s?-1:i}var Zr;(function(t){t[t.Disabled=0]="Disabled",t[t.EnabledForActive=1]="EnabledForActive",t[t.Enabled=2]="Enabled"})(Zr||(Zr={}));var Zo=class{constructor(t,e,i){this.visibleColumn=t,this.className=e,this.horizontalLine=i}},Qp=class{constructor(t,e){this.top=t,this.endColumn=e}},C9=class extends _9{constructor(t,e){super(),this.textModel=t,this.languageConfigurationService=e}getLanguageConfiguration(t){return this.languageConfigurationService.getLanguageConfiguration(t)}_computeIndentLevel(t){return v9(this.textModel.getLineContent(t+1),this.textModel.getOptions().tabSize)}getActiveIndentGuide(t,e,i){this.assertNotDisposed();const n=this.textModel.getLineCount();if(t<1||t>n)throw new Error("Illegal value for lineNumber");const s=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,r=!!(s&&s.offSide);let o=-2,a=-1,l=-2,h=-1;const c=S=>{if(o!==-1&&(o===-2||o>S-1)){o=-1,a=-1;for(let L=S-2;L>=0;L--){const x=this._computeIndentLevel(L);if(x>=0){o=L,a=x;break}}}if(l===-2){l=-1,h=-1;for(let L=S;L<n;L++){const x=this._computeIndentLevel(L);if(x>=0){l=L,h=x;break}}}};let d=-2,u=-1,g=-2,m=-1;const _=S=>{if(d===-2){d=-1,u=-1;for(let L=S-2;L>=0;L--){const x=this._computeIndentLevel(L);if(x>=0){d=L,u=x;break}}}if(g!==-1&&(g===-2||g<S-1)){g=-1,m=-1;for(let L=S;L<n;L++){const x=this._computeIndentLevel(L);if(x>=0){g=L,m=x;break}}}};let C=0,w=!0,v=0,b=!0,y=0,k=0;for(let S=0;w||b;S++){const L=t-S,x=t+S;S>1&&(L<1||L<e)&&(w=!1),S>1&&(x>n||x>i)&&(b=!1),S>5e4&&(w=!1,b=!1);let E=-1;if(w&&L>=1){const D=this._computeIndentLevel(L-1);D>=0?(l=L-1,h=D,E=Math.ceil(D/this.textModel.getOptions().indentSize)):(c(L),E=this._getIndentLevelForWhitespaceLine(r,a,h))}let R=-1;if(b&&x<=n){const D=this._computeIndentLevel(x-1);D>=0?(d=x-1,u=D,R=Math.ceil(D/this.textModel.getOptions().indentSize)):(_(x),R=this._getIndentLevelForWhitespaceLine(r,u,m))}if(S===0){k=E;continue}if(S===1){if(x<=n&&R>=0&&k+1===R){w=!1,C=x,v=x,y=R;continue}if(L>=1&&E>=0&&E-1===k){b=!1,C=L,v=L,y=E;continue}if(C=t,v=t,y=k,y===0)return{startLineNumber:C,endLineNumber:v,indent:y}}w&&(E>=y?C=L:w=!1),b&&(R>=y?v=x:b=!1)}return{startLineNumber:C,endLineNumber:v,indent:y}}getLinesBracketGuides(t,e,i,n){var s,r,o,a,l;const h=[],c=this.textModel.bracketPairs.getBracketPairsInRangeWithMinIndentation(new T(t,1,e,this.textModel.getLineMaxColumn(e)));let d;if(i&&c.length>0){const C=t<=i.lineNumber&&i.lineNumber<=e?c.filter(w=>T.strictContainsPosition(w.range,i)):this.textModel.bracketPairs.getBracketPairsInRange(T.fromPositions(i));d=(s=YD(C,w=>w.range.startLineNumber!==w.range.endLineNumber))===null||s===void 0?void 0:s.range}const u=new ba(c),g=new Array,m=new Array,_=new $k;for(let C=t;C<=e;C++){let w=new Array;m.length>0&&(w=w.concat(m),m.length=0),h.push(w);for(const b of u.takeWhile(y=>y.openingBracketRange.startLineNumber<=C)||[]){if(b.range.startLineNumber===b.range.endLineNumber)continue;const y=Math.min(this.getVisibleColumnFromPosition(b.openingBracketRange.getStartPosition()),this.getVisibleColumnFromPosition((o=(r=b.closingBracketRange)===null||r===void 0?void 0:r.getStartPosition())!==null&&o!==void 0?o:b.range.getEndPosition()),b.minVisibleColumnIndentation+1);let k=!1;b.closingBracketRange&&fi(this.textModel.getLineContent(b.closingBracketRange.startLineNumber))<b.closingBracketRange.startColumn-1&&(k=!0);const S=b.openingBracketRange.getStartPosition(),L=(l=(a=b.closingBracketRange)===null||a===void 0?void 0:a.getStartPosition())!==null&&l!==void 0?l:b.range.getEndPosition();b.closingBracketRange===void 0?g[b.nestingLevel]=null:g[b.nestingLevel]={nestingLevel:b.nestingLevel,guideVisibleColumn:y,start:S,visibleStartColumn:this.getVisibleColumnFromPosition(S),end:L,visibleEndColumn:this.getVisibleColumnFromPosition(L),bracketPair:b,renderHorizontalEndLineAtTheBottom:k}}for(const b of g){if(!b)continue;const y=d&&b.bracketPair.range.equalsRange(d),k=_.getInlineClassNameOfLevel(b.nestingLevel)+(n.highlightActive&&y?" "+_.activeClassName:"");(y&&n.horizontalGuides!==Zr.Disabled||n.includeInactive&&n.horizontalGuides===Zr.Enabled)&&(b.start.lineNumber===C&&b.guideVisibleColumn<b.visibleStartColumn&&w.push(new Zo(b.guideVisibleColumn,k,new Qp(!1,b.start.column))),b.end.lineNumber===C+1&&b.guideVisibleColumn<b.visibleEndColumn&&m.push(new Zo(b.guideVisibleColumn,k,new Qp(!b.renderHorizontalEndLineAtTheBottom,b.end.column))))}let v=Number.MAX_SAFE_INTEGER;for(let b=g.length-1;b>=0;b--){const y=g[b];if(!y)continue;
72const k=n.highlightActive&&d&&y.bracketPair.range.equalsRange(d),S=_.getInlineClassNameOfLevel(y.nestingLevel)+(k?" "+_.activeClassName:"");(k||n.includeInactive)&&y.renderHorizontalEndLineAtTheBottom&&y.end.lineNumber===C+1&&m.push(new Zo(y.guideVisibleColumn,S,null)),!(y.end.lineNumber<=C||y.start.lineNumber>=C)&&(y.guideVisibleColumn>=v&&!k||(v=y.guideVisibleColumn,(k||n.includeInactive)&&w.push(new Zo(y.guideVisibleColumn,S,null))))}w.sort((b,y)=>b.visibleColumn-y.visibleColumn)}return h}getVisibleColumnFromPosition(t){return ut.visibleColumnFromColumn(this.textModel.getLineContent(t.lineNumber),t.column,this.textModel.getOptions().tabSize)+1}getLinesIndentGuides(t,e){this.assertNotDisposed();const i=this.textModel.getLineCount();if(t<1||t>i)throw new Error("Illegal value for startLineNumber");if(e<1||e>i)throw new Error("Illegal value for endLineNumber");const n=this.textModel.getOptions(),s=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,r=!!(s&&s.offSide),o=new Array(e-t+1);let a=-2,l=-1,h=-2,c=-1;for(let d=t;d<=e;d++){const u=d-t,g=this._computeIndentLevel(d-1);if(g>=0){a=d-1,l=g,o[u]=Math.ceil(g/n.indentSize);continue}if(a===-2){a=-1,l=-1;for(let m=d-2;m>=0;m--){const _=this._computeIndentLevel(m);if(_>=0){a=m,l=_;break}}}if(h!==-1&&(h===-2||h<d-1)){h=-1,c=-1;for(let m=d;m<i;m++){const _=this._computeIndentLevel(m);if(_>=0){h=m,c=_;break}}}o[u]=this._getIndentLevelForWhitespaceLine(r,l,c)}return o}_getIndentLevelForWhitespaceLine(t,e,i){const n=this.textModel.getOptions();return e===-1||i===-1?0:e<i?1+Math.floor(e/n.indentSize):e===i||t?Math.ceil(i/n.indentSize):1+Math.floor(i/n.indentSize)}},$k=class{constructor(){this.activeClassName="indent-active"}getInlineClassNameOfLevel(t){return`bracket-indent-guide lvl-${t%30}`}},b9=class extends ja{constructor(t){super(),this._context=t,this._primaryPosition=null;const e=this._context.configuration.options,i=e.get(132),n=e.get(44);this._lineHeight=e.get(59),this._spaceWidth=n.spaceWidth,this._maxIndentLeft=i.wrappingColumn===-1?-1:i.wrappingColumn*n.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=e.get(13),this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(t){const e=this._context.configuration.options,i=e.get(132),n=e.get(44);return this._lineHeight=e.get(59),this._spaceWidth=n.spaceWidth,this._maxIndentLeft=i.wrappingColumn===-1?-1:i.wrappingColumn*n.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=e.get(13),!0}onCursorStateChanged(t){var e;const i=t.selections[0].getPosition();return!((e=this._primaryPosition)===null||e===void 0)&&e.equals(i)?!1:(this._primaryPosition=i,!0)}onDecorationsChanged(t){return!0}onFlushed(t){return!0}onLinesChanged(t){return!0}onLinesDeleted(t){return!0}onLinesInserted(t){return!0}onScrollChanged(t){return t.scrollTopChanged}onZonesChanged(t){return!0}onLanguageConfigurationChanged(t){return!0}prepareRender(t){var e,i,n,s;if(!this._bracketPairGuideOptions.indentation&&this._bracketPairGuideOptions.bracketPairs===!1){this._renderResult=null;return}const r=t.visibleRange.startLineNumber,o=t.visibleRange.endLineNumber,a=t.scrollWidth,l=this._lineHeight,h=this._primaryPosition,c=this.getGuidesByLine(r,o,h),d=[];for(let u=r;u<=o;u++){const g=u-r,m=c[g];let _="";const C=(i=(e=t.visibleRangeForPosition(new A(u,1)))===null||e===void 0?void 0:e.left)!==null&&i!==void 0?i:0;for(const w of m){const v=C+(w.visibleColumn-1)*this._spaceWidth;if(v>a||this._maxIndentLeft>0&&v>this._maxIndentLeft)break;const b=w.horizontalLine?w.horizontalLine.top?"horizontal-top":"horizontal-bottom":"vertical",y=w.horizontalLine?((s=(n=t.visibleRangeForPosition(new A(u,w.horizontalLine.endColumn)))===null||n===void 0?void 0:n.left)!==null&&s!==void 0?s:v+this._spaceWidth)-v:this._spaceWidth;_+=`<div class="core-guide ${w.className} ${b}" style="left:${v}px;height:${l}px;width:${y}px"></div>`}d[g]=_}this._renderResult=d}getGuidesByLine(t,e,i){const n=this._bracketPairGuideOptions.bracketPairs!==!1?this._context.viewModel.getBracketGuidesInRangeByLine(t,e,i,{highlightActive:this._bracketPairGuideOptions.highlightActiveBracketPair,horizontalGuides:this._bracketPairGuideOptions.bracketPairsHorizontal===!0?Zr.Enabled:this._bracketPairGuideOptions.bracketPairsHorizontal==="active"?Zr.EnabledForActive:Zr.Disabled,includeInactive:this._bracketPairGuideOptions.bracketPairs===!0}
72):null,s=this._bracketPairGuideOptions.indentation?this._context.viewModel.getLinesIndentGuides(t,e):null;let r=0,o=0,a=0;if(this._bracketPairGuideOptions.highlightActiveIndentation&&i){const c=this._context.viewModel.getActiveIndentGuide(i.lineNumber,t,e);r=c.startLineNumber,o=c.endLineNumber,a=c.indent}const{indentSize:l}=this._context.viewModel.model.getOptions(),h=[];for(let c=t;c<=e;c++){const d=new Array;h.push(d);const u=n?n[c-t]:[],g=new ba(u),m=s?s[c-t]:[];for(let _=1;_<=m;_++){const C=(_-1)*l+1,w=u.length===0&&r<=c&&c<=o&&_===a;d.push(...g.takeWhile(b=>b.visibleColumn<C)||[]);const v=g.peek();(!v||v.visibleColumn!==C||v.horizontalLine)&&d.push(new Zo(C,w?"core-guide-indent-active":"core-guide-indent",null))}d.push(...g.takeWhile(_=>!0)||[])}return h}render(t,e){if(!this._renderResult)return"";const i=e-t;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}};function oc(t){if(!(t&&t.isTransparent()))return t}Yt((t,e)=>{const i=t.getColor(nf);i&&e.addRule(`.monaco-editor .lines-content .core-guide-indent { box-shadow: 1px 0 0 0 ${i} inset; }`);const n=t.getColor(sf)||i;n&&e.addRule(`.monaco-editor .lines-content .core-guide-indent-active { box-shadow: 1px 0 0 0 ${n} inset; }`);const s=[{bracketColor:yk,guideColor:y7,guideColorActive:D7},{bracketColor:Lk,guideColor:L7,guideColorActive:N7},{bracketColor:kk,guideColor:k7,guideColorActive:T7},{bracketColor:xk,guideColor:x7,guideColorActive:M7},{bracketColor:Ik,guideColor:I7,guideColorActive:R7},{bracketColor:Ek,guideColor:E7,guideColorActive:A7}],r=new $k,o=s.map(a=>{var l,h;const c=t.getColor(a.bracketColor),d=t.getColor(a.guideColor),u=t.getColor(a.guideColorActive),g=oc((l=oc(d))!==null&&l!==void 0?l:c?.transparent(.3)),m=oc((h=oc(u))!==null&&h!==void 0?h:c);if(!(!g||!m))return{guideColor:g,guideColorActive:m}}).filter(nN);if(o.length>0){for(let a=0;a<30;a++){const l=o[a%o.length];e.addRule(`.monaco-editor .${r.getInlineClassNameOfLevel(a).replace(/ /g,".")} { --guide-color: ${l.guideColor}; --guide-color-active: ${l.guideColorActive}; }`)}e.addRule(".monaco-editor .vertical { box-shadow: 1px 0 0 0 var(--guide-color) inset; }"),e.addRule(".monaco-editor .horizontal-top { border-top: 1px solid var(--guide-color); }"),e.addRule(".monaco-editor .horizontal-bottom { border-bottom: 1px solid var(--guide-color); }"),e.addRule(`.monaco-editor .vertical.${r.activeClassName} { box-shadow: 1px 0 0 0 var(--guide-color-active) inset; }`),e.addRule(`.monaco-editor .horizontal-top.${r.activeClassName} { border-top: 1px solid var(--guide-color-active); }`),e.addRule(`.monaco-editor .horizontal-bottom.${r.activeClassName} { border-bottom: 1px solid var(--guide-color-active); }`)}});var w9=class{constructor(){this._currentVisibleRange=new T(1,1,1,1)}getCurrentVisibleRange(){return this._currentVisibleRange}setCurrentVisibleRange(t){this._currentVisibleRange=t}},S9=class{constructor(t,e,i,n,s,r,o){this.minimalReveal=t,this.lineNumber=e,this.startColumn=i,this.endColumn=n,this.startScrollTop=s,this.stopScrollTop=r,this.scrollType=o,this.type="range",this.minLineNumber=e,this.maxLineNumber=e}},y9=class{constructor(t,e,i,n,s){this.minimalReveal=t,this.selections=e,this.startScrollTop=i,this.stopScrollTop=n,this.scrollType=s,this.type="selections";let r=e[0].startLineNumber,o=e[0].endLineNumber;for(let a=1,l=e.length;a<l;a++){const h=e[a];r=Math.min(r,h.startLineNumber),o=Math.max(o,h.endLineNumber)}this.minLineNumber=r,this.maxLineNumber=o}},Kk=class jk extends Mi{constructor(e,i){super(e),this._linesContent=i,this._textRangeRestingSpot=document.createElement("div"),this._visibleLines=new Bk(this),this.domNode=this._visibleLines.domNode;const n=this._context.configuration,s=this._context.configuration.options,r=s.get(44),o=s.get(132),a=s.get(131);this._lineHeight=s.get(59),this._typicalHalfwidthCharacterWidth=r.typicalHalfwidthCharacterWidth,this._isViewportWrapping=o.isViewportWrapping,this._revealHorizontalRightPadding=s.get(89),this._horizontalScrollbarHeight=a.horizontalScrollbarHeight,this._cursorSurroundingLines=s.get(25),this._cursorSurroundingLinesStyle=s.get(26),this._canUseLayerHinting=!s.get(28),this._viewLineOptions=new rb(n,this._context.theme.type),Hn.write(this.domNode,7),this.domNode.setClassName(`view-lines ${Gr}`),Zt(this.domNode,r),this._maxLineWidth=0,this._asyncUpdateLineWidths=new _t(()=>{this._updateLineWidthsSlow()},200),this._asyncCheckMonospaceFontAssumptions=new _t(()=>{this._checkMonospaceFontAssumptions()},2e3),this._lastRenderedData=new w9,this._horizontalRevealRequest=null}dispose(){this._asyncUpdateLineWidths.dispose(),this._asyncCheckMonospaceFontAssumptions.dispose(),super.dispose()}getDomNode(){return this.domNode}createVisibleLine(){return new Vs(this._viewLineOptions)}onConfigurationChanged(e){this._visibleLines.onConfigurationChanged(e),e.hasChanged(132)&&(this._maxLineWidth=0);const i=this._context.configuration.options,n=i.get(44),s=i.get(132),r=i.get(131);return this._lineHeight=i.get(59),this._typicalHalfwidthCharacterWidth=n.typicalHalfwidthCharacterWidth,this._isViewportWrapping=s.isViewportWrapping,this._revealHorizontalRightPadding=i.get(89),this._horizontalScrollbarHeight=r.horizontalScrollbarHeight,this._cursorSurroundingLines=i.get(25),this._cursorSurroundingLinesStyle=i.get(26),this._canUseLayerHinting=!i.get(28),Zt(this.domNode,n),this._onOptionsMaybeChanged(),e.hasChanged(131)&&(this._maxLineWidth=0),!0}_onOptionsMaybeChanged(){const e=this._context.configuration,i=new rb(e,this._context.theme.type);if(!this._viewLineOptions.equals(i)){this._viewLineOptions=i;const n=this._visibleLines.getStartLineNumber(),s=this._visibleLines.getEndLineNumber();for(let r=n;r<=s;r++)this._visibleLines.getVisibleLine(r).onOptionsChanged(this._viewLineOptions);return!0}return!1}onCursorStateChanged(e){const i=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();let s=!1;for(let r=i;r<=n;r++)s=this._visibleLines.getVisibleLine(r).onSelectionChanged()||s;return s}onDecorationsChanged(e){{const i=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();for(let s=i;s<=n;s++)this._visibleLines.getVisibleLine(s).onDecorationsChanged()}return!0}onFlushed(e){const i=this._visibleLines.onFlushed(e);return this._maxLineWidth=0,i}
72onLinesChanged(e){return this._visibleLines.onLinesChanged(e)}onLinesDeleted(e){return this._visibleLines.onLinesDeleted(e)}onLinesInserted(e){return this._visibleLines.onLinesInserted(e)}onRevealRangeRequest(e){const i=this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(),e.source,e.minimalReveal,e.range,e.selections,e.verticalType);if(i===-1)return!1;let n=this._context.viewLayout.validateScrollPosition({scrollTop:i});e.revealHorizontal?e.range&&e.range.startLineNumber!==e.range.endLineNumber?n={scrollTop:n.scrollTop,scrollLeft:0}:e.range?this._horizontalRevealRequest=new S9(e.minimalReveal,e.range.startLineNumber,e.range.startColumn,e.range.endColumn,this._context.viewLayout.getCurrentScrollTop(),n.scrollTop,e.scrollType):e.selections&&e.selections.length>0&&(this._horizontalRevealRequest=new y9(e.minimalReveal,e.selections,this._context.viewLayout.getCurrentScrollTop(),n.scrollTop,e.scrollType)):this._horizontalRevealRequest=null;const s=Math.abs(this._context.viewLayout.getCurrentScrollTop()-n.scrollTop)<=this._lineHeight?1:e.scrollType;return this._context.viewModel.viewLayout.setScrollPosition(n,s),!0}onScrollChanged(e){if(this._horizontalRevealRequest&&e.scrollLeftChanged&&(this._horizontalRevealRequest=null),this._horizontalRevealRequest&&e.scrollTopChanged){const i=Math.min(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop),n=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(e.scrollTop<i||e.scrollTop>n)&&(this._horizontalRevealRequest=null)}return this.domNode.setWidth(e.scrollWidth),this._visibleLines.onScrollChanged(e)||!0}onTokensChanged(e){return this._visibleLines.onTokensChanged(e)}onZonesChanged(e){return this._context.viewModel.viewLayout.setMaxLineWidth(this._maxLineWidth),this._visibleLines.onZonesChanged(e)}onThemeChanged(e){return this._onOptionsMaybeChanged()}getPositionFromDOMInfo(e,i){const n=this._getViewLineDomNode(e);if(n===null)return null;const s=this._getLineNumberFor(n);if(s===-1||s<1||s>this._context.viewModel.getLineCount())return null;if(this._context.viewModel.getLineMaxColumn(s)===1)return new A(s,1);const r=this._visibleLines.getStartLineNumber(),o=this._visibleLines.getEndLineNumber();if(s<r||s>o)return null;let a=this._visibleLines.getVisibleLine(s).getColumnOfNodeOffset(s,e,i);const l=this._context.viewModel.getLineMinColumn(s);return a<l&&(a=l),new A(s,a)}_getViewLineDomNode(e){for(;e&&e.nodeType===1;){if(e.className===Vs.CLASS_NAME)return e;e=e.parentElement}return null}_getLineNumberFor(e){const i=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();for(let s=i;s<=n;s++)if(e===this._visibleLines.getVisibleLine(s).getDomNode())return s;return-1}getLineWidth(e){const i=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();return e<i||e>n?-1:this._visibleLines.getVisibleLine(e).getWidth()}linesVisibleRangesForRange(e,i){if(this.shouldRender())return null;const n=e.endLineNumber,s=T.intersectRanges(e,this._lastRenderedData.getCurrentVisibleRange());if(!s)return null;let r=[],o=0;const a=new sb(this.domNode.domNode,this._textRangeRestingSpot);let l=0;i&&(l=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new A(s.startLineNumber,1)).lineNumber);const h=this._visibleLines.getStartLineNumber(),c=this._visibleLines.getEndLineNumber();for(let d=s.startLineNumber;d<=s.endLineNumber;d++){if(d<h||d>c)continue;const u=d===s.startLineNumber?s.startColumn:1,g=d===s.endLineNumber?s.endColumn:this._context.viewModel.getLineMaxColumn(d),m=this._visibleLines.getVisibleLine(d).getVisibleRangesForRange(d,u,g,a);if(m){if(i&&d<n){const _=l;l=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new A(d+1,1)).lineNumber,_!==l&&(m.ranges[m.ranges.length-1].width+=this._typicalHalfwidthCharacterWidth)}r[o++]=new WA(m.outsideRenderedLine,d,lk.from(m.ranges))}}return o===0?null:r}_visibleRangesForLineRange(e,i,n){return this.shouldRender()||e<this._visibleLines.getStartLineNumber()||e>this._visibleLines.getEndLineNumber()?null:this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(e,i,n,new sb(this.domNode.domNode,this._textRangeRestingSpot))}visibleRangeForPosition(e){const i=this._visibleRangesForLineRange(e.lineNumber,e.column,e.column);return i?new HA(i.outsideRenderedLine,i.ranges[0].left):null}updateLineWidths(){this._updateLineWidths(!1)}_updateLineWidthsFast(){return this._updateLineWidths(!0)}_updateLineWidthsSlow(){this._updateLineWidths(!1)}_updateLineWidths(e){const i=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();let s=1,r=!0;for(let o=i;o<=n;o++){const a=this._visibleLines.getVisibleLine(o);if(e&&!a.getWidthIsFast()){r=!1;continue}s=Math.max(s,a.getWidth())}return r&&i===1&&n===this._context.viewModel.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(s),r}_checkMonospaceFontAssumptions(){let e=-1,i=-1;const n=this._visibleLines.getStartLineNumber(),s=this._visibleLines.getEndLineNumber();for(let r=n;r<=s;r++){const o=this._visibleLines.getVisibleLine(r);if(o.needsMonospaceFontCheck()){const a=o.getWidth();a>i&&(i=a,e=r)}}if(e!==-1&&!this._visibleLines.getVisibleLine(e).monospaceAssumptionsAreValid())for(let r=n;r<=s;r++)this._visibleLines.getVisibleLine(r).onMonospaceAssumptionsInvalidated()}prepareRender(){throw new Error("Not supported")}render(){throw new Error("Not supported")}renderText(e){if(this._visibleLines.renderLines(e),this._lastRenderedData.setCurrentVisibleRange(e.visibleRange),this.domNode.setWidth(this._context.viewLayout.getScrollWidth()),this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(),1e6)),this._horizontalRevealRequest){const n=this._horizontalRevealRequest;if(e.startLineNumber<=n.minLineNumber&&n.maxLineNumber<=e.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();const s=this._computeScrollLeftToReveal(n);s&&(this._isViewportWrapping||this._ensureMaxLineWidth(s.maxHorizontalOffset),this._context.viewModel.viewLayout.setScrollPosition({scrollLeft:s.scrollLeft},n.scrollType))}}if(this._updateLineWidthsFast()||this._asyncUpdateLineWidths.schedule(),Bt&&!this._asyncCheckMonospaceFontAssumptions.isScheduled()){const n=this._visibleLines.getStartLineNumber(),s=this._visibleLines.getEndLineNumber();for(let r=n;r<=s;r++)if(this._visibleLines.getVisibleLine(r).needsMonospaceFontCheck()){this._asyncCheckMonospaceFontAssumptions.schedule();break}}this._linesContent.setLayerHinting(this._canUseLayerHinting),this._linesContent.setContain("strict");const i=this._context.viewLayout.getCurrentScrollTop()-e.bigNumbersDelta;this._linesContent.setTop(-i),this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft())}_ensureMaxLineWidth(e){const i=Math.ceil(e);this._maxLineWidth<i&&(this._maxLineWidth=i,this._context.viewModel.viewLayout.setMaxLineWidth(this._maxLineWidth))}_computeScrollTopToRevealRange(e,i,n,s,r,o){const a=e.top,l=e.height,h=a+l;let c,d,u;if(r&&r.length>0){let m=r[0].startLineNumber,_=r[0].endLineNumber;for(let C=1,w=r.length;C<w;C++){const v=r[C];
72m=Math.min(m,v.startLineNumber),_=Math.max(_,v.endLineNumber)}c=!1,d=this._context.viewLayout.getVerticalOffsetForLineNumber(m),u=this._context.viewLayout.getVerticalOffsetForLineNumber(_)+this._lineHeight}else if(s)c=!0,d=this._context.viewLayout.getVerticalOffsetForLineNumber(s.startLineNumber),u=this._context.viewLayout.getVerticalOffsetForLineNumber(s.endLineNumber)+this._lineHeight;else return-1;if((i==="mouse"||n)&&this._cursorSurroundingLinesStyle==="default")n||(d-=this._lineHeight);else{const m=Math.min(l/this._lineHeight/2,this._cursorSurroundingLines);d-=m*this._lineHeight,u+=Math.max(0,m-1)*this._lineHeight}(o===0||o===4)&&(u+=n?this._horizontalScrollbarHeight:this._lineHeight);let g;if(u-d>l){if(!c)return-1;g=d}else if(o===5||o===6)if(o===6&&a<=d&&u<=h)g=a;else{const m=Math.max(5*this._lineHeight,l*.2),_=d-m,C=u-l;g=Math.max(C,_)}else if(o===1||o===2)if(o===2&&a<=d&&u<=h)g=a;else{const m=(d+u)/2;g=Math.max(0,m-l/2)}else g=this._computeMinimumScrolling(a,h,d,u,o===3,o===4);return g}_computeScrollLeftToReveal(e){const i=this._context.viewLayout.getCurrentViewport(),n=i.left,s=n+i.width;let r=1073741824,o=0;if(e.type==="range"){const a=this._visibleRangesForLineRange(e.lineNumber,e.startColumn,e.endColumn);if(!a)return null;for(const l of a.ranges)r=Math.min(r,Math.round(l.left)),o=Math.max(o,Math.round(l.left+l.width))}else for(const a of e.selections){if(a.startLineNumber!==a.endLineNumber)return null;const l=this._visibleRangesForLineRange(a.startLineNumber,a.startColumn,a.endColumn);if(!l)return null;for(const h of l.ranges)r=Math.min(r,Math.round(h.left)),o=Math.max(o,Math.round(h.left+h.width))}return e.minimalReveal||(r=Math.max(0,r-jk.HORIZONTAL_EXTRA_PX),o+=this._revealHorizontalRightPadding),e.type==="selections"&&o-r>i.width?null:{scrollLeft:this._computeMinimumScrolling(n,s,r,o),maxHorizontalOffset:o}}_computeMinimumScrolling(e,i,n,s,r,o){e=e|0,i=i|0,n=n|0,s=s|0,r=!!r,o=!!o;const a=i-e;if(s-n<a){if(r)return n;if(o)return Math.max(0,s-a);if(n<e)return n;if(s>i)return Math.max(0,s-a)}else return n;return e}};Kk.HORIZONTAL_EXTRA_PX=30;var L9=class extends Kv{constructor(t){super(),this._context=t;const e=this._context.configuration.options.get(131);this._decorationsLeft=e.decorationsLeft,this._decorationsWidth=e.decorationsWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(t){const e=this._context.configuration.options.get(131);return this._decorationsLeft=e.decorationsLeft,this._decorationsWidth=e.decorationsWidth,!0}onDecorationsChanged(t){return!0}onFlushed(t){return!0}onLinesChanged(t){return!0}onLinesDeleted(t){return!0}onLinesInserted(t){return!0}onScrollChanged(t){return t.scrollTopChanged}onZonesChanged(t){return!0}_getDecorations(t){const e=t.getDecorationsInViewport(),i=[];let n=0;for(let s=0,r=e.length;s<r;s++){const o=e[s],a=o.options.linesDecorationsClassName;a&&(i[n++]=new cu(o.range.startLineNumber,o.range.endLineNumber,a));const l=o.options.firstLineDecorationClassName;l&&(i[n++]=new cu(o.range.startLineNumber,o.range.startLineNumber,l))}return i}prepareRender(t){const e=t.visibleRange.startLineNumber,i=t.visibleRange.endLineNumber,n=this._render(e,i,this._getDecorations(t)),s=this._decorationsLeft.toString(),r=this._decorationsWidth.toString(),o='" style="left:'+s+"px;width:"+r+'px;"></div>',a=[];for(let l=e;l<=i;l++){const h=l-e,c=n[h];let d="";for(let u=0,g=c.length;u<g;u++)d+='<div class="cldr '+c[u]+o;a[h]=d}this._renderResult=a}render(t,e){return this._renderResult?this._renderResult[e-t]:""}},k9=class extends Kv{constructor(t){super(),this._context=t,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(t){return!0}onDecorationsChanged(t){return!0}onFlushed(t){return!0}onLinesChanged(t){return!0}onLinesDeleted(t){return!0}onLinesInserted(t){return!0}onScrollChanged(t){return t.scrollTopChanged}onZonesChanged(t){return!0}_getDecorations(t){const e=t.getDecorationsInViewport(),i=[];let n=0;for(let s=0,r=e.length;s<r;s++){const o=e[s],a=o.options.marginClassName;a&&(i[n++]=new cu(o.range.startLineNumber,o.range.endLineNumber,a))}return i}prepareRender(t){const e=t.visibleRange.startLineNumber,i=t.visibleRange.endLineNumber,n=this._render(e,i,this._getDecorations(t)),s=[];for(let r=e;r<=i;r++){const o=r-e,a=n[o];let l="";for(let h=0,c=a.length;h<c;h++)l+='<div class="cmdr '+a[h]+'" style=""></div>';s[o]=l}this._renderResult=s}render(t,e){return this._renderResult?this._renderResult[e-t]:""}},Js=class Nl{constructor(e,i,n,s){this._rgba8Brand=void 0,this.r=Nl._clamp(e),this.g=Nl._clamp(i),this.b=Nl._clamp(n),this.a=Nl._clamp(s)}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}static _clamp(e){return e<0?0:e>255?255:e|0}};Js.Empty=new Js(0,0,0,0);var jv=class qk extends V{constructor(){super(),this._onDidChange=new M,this.onDidChange=this._onDidChange.event,this._updateColorMap(),this._register(Ge.onDidChange(e=>{e.changedColorMap&&this._updateColorMap()}))}static getInstance(){return this._INSTANCE||(this._INSTANCE=XN(new qk)),this._INSTANCE}_updateColorMap(){const e=Ge.getColorMap();if(!e){this._colors=[Js.Empty],this._backgroundIsLight=!0;return}this._colors=[Js.Empty];for(let n=1;n<e.length;n++){const s=e[n].rgba;this._colors[n]=new Js(s.r,s.g,s.b,Math.round(s.a*255))}const i=e[2].getRelativeLuminance();this._backgroundIsLight=i>=.5,this._onDidChange.fire(void 0)}getColor(e){return(e<1||e>=this._colors.length)&&(e=2),this._colors[e]}backgroundIsLight(){return this._backgroundIsLight}};jv._INSTANCE=null;var x9=(()=>{const t=[];for(let e=32;e<=126;e++)t.push(e);return t.push(65533),t})(),I9=(t,e)=>(t-=32,t<0||t>96?e<=2?(t+96)%96:95:t),_b=class Jp{constructor(e,i){this.scale=i,this._minimapCharRendererBrand=void 0,this.charDataNormal=Jp.soften(e,12/15),this.charDataLight=Jp.soften(e,50/60)}static soften(e,i){const n=new Uint8ClampedArray(e.length);for(let s=0,r=e.length;s<r;s++)n[s]=Gd(e[s]*i);return n}renderChar(e,i,n,s,r,o,a,l,h,c,d){const u=1*this.scale,g=2*this.scale,m=d?1:g;if(i+u>e.width||n+m>e.height)return;const _=c?this.charDataLight:this.charDataNormal,C=I9(s,h),w=e.width*4,v=a.r,b=a.g,y=a.b,k=r.r-v,S=r.g-b,L=r.b-y,x=Math.max(o,l),E=e.data;let R=C*u*g,D=n*w+i*4;for(let W=0;W<m;W++){let P=D;for(let K=0;K<u;K++){const j=_[R++]/255*(o/255);E[P++]=v+k*j,E[P++]=b+S*j,E[P++]=y+L*j,E[P++]=x}D+=w}}blockRenderChar(e,i,n,s,r,o,a,l){const h=1*this.scale,c=2*this.scale,d=l?1:c;if(i+h>e.width||n+d>e.height)return;const u=e.width*4,g=.5*(r/255),m=o.r,_=o.g,C=o.b,w=s.r-m,v=s.g-_,b=s.b-C,y=m+w*g,k=_+v*g,S=C+b*g,L=Math.max(r,a),x=e.data;let E=n*u+i*4;for(let R=0;R<d;R++){let D=E;for(let W=0;W<h;W++)x[D++]=y,x[D++]=k,x[D++]=S,x[D++]=L;E+=u}}},vb={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},Cb=t=>{const e=new Uint8ClampedArray(t.length/2);for(let i=0;i<t.length;i+=2)e[i>>1]=vb[t[i]]<<4|vb[t[i+1]]&15;return e},bb={1:Qr(()=>Cb("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792")),2:Qr(()=>
vendor: 5,148 bytes, line 72
72Cb("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126"))},E9=class cd{static create(e,i){if(this.lastCreated&&e===this.lastCreated.scale&&i===this.lastFontFamily)return this.lastCreated;let n;return bb[e]?n=new _b(bb[e](),e):n=cd.createFromSampleData(cd.createSampleData(i).data,e),this.lastFontFamily=i,this.lastCreated=n,n}static createSampleData(e){const i=document.createElement("canvas"),n=i.getContext("2d");i.style.height="16px",i.height=16,i.width=960,i.style.width="960px",n.fillStyle="#ffffff",n.font=`bold 16px ${e}`,n.textBaseline="middle";let s=0;for(const r of x9)n.fillText(String.fromCharCode(r),s,8),s+=10;return n.getImageData(0,0,960,16)}static createFromSampleData(e,i){if(e.length!==61440)throw new Error("Unexpected source in MinimapCharRenderer");const n=cd._downsample(e,i);return new _b(n,i)}static _downsampleChar(e,i,n,s,r){const o=1*r,a=2*r;let l=s,h=0;for(let c=0;c<a;c++){const d=c/a*16,u=(c+1)/a*16;for(let g=0;g<o;g++){const m=g/o*10,_=(g+1)/o*10;let C=0,w=0;for(let b=d;b<u;b++){const y=i+Math.floor(b)*3840,k=1-(b-Math.floor(b));for(let S=m;S<_;S++){const L=1-(S-Math.floor(S)),x=y+Math.floor(S)*4,E=L*k;w+=E,C+=e[x]*e[x+3]/255*E}}const v=C/w;h=Math.max(h,v),n[l++]=Gd(v)}}return h}static _downsample(e,i){const n=2*i*1*i,s=n*96,r=new Uint8ClampedArray(s);let o=0,a=0,l=0;for(let h=0;h<96;h++)l=Math.max(l,this._downsampleChar(e,a,r,o,i)),o+=n,a+=40;if(l>0){const h=255/l;for(let c=0;c<s;c++)r[c]*=h}return r}},D9=140,N9=2,wb=class e_{constructor(e,i,n){const s=e.options,r=s.get(129),o=s.get(131),a=o.minimap,l=s.get(44),h=s.get(65);this.renderMinimap=a.renderMinimap,this.size=h.size,this.minimapHeightIsEditorHeight=a.minimapHeightIsEditorHeight,this.scrollBeyondLastLine=s.get(94),this.showSlider=h.showSlider,this.pixelRatio=r,this.typicalHalfwidthCharacterWidth=l.typicalHalfwidthCharacterWidth,this.lineHeight=s.get(59),this.minimapLeft=a.minimapLeft,this.minimapWidth=a.minimapWidth,this.minimapHeight=o.height,this.canvasInnerWidth=a.minimapCanvasInnerWidth,this.canvasInnerHeight=a.minimapCanvasInnerHeight,this.canvasOuterWidth=a.minimapCanvasOuterWidth,this.canvasOuterHeight=a.minimapCanvasOuterHeight,this.isSampling=a.minimapIsSampling,this.editorHeight=o.height,this.fontScale=a.minimapScale,this.minimapLineHeight=a.minimapLineHeight,this.minimapCharWidth=1*this.fontScale,this.charRenderer=Qr(()=>E9.create(this.fontScale,l.fontFamily)),this.defaultBackgroundColor=n.getColor(2),this.backgroundColor=e_._getMinimapBackground(i,this.defaultBackgroundColor),this.foregroundAlpha=e_._getMinimapForegroundOpacity(i)}static _getMinimapBackground(e,i){const n=e.getColor(yA);return n?new Js(n.rgba.r,n.rgba.g,n.rgba.b,Math.round(255*n.rgba.a)):i}static _getMinimapForegroundOpacity(e){const i=e.getColor(LA);return i?Js._clamp(Math.round(255*i.rgba.a)):255}equals(e){return this.renderMinimap===e.renderMinimap&&this.size===e.size&&this.minimapHeightIsEditorHeight===e.minimapHeightIsEditorHeight&&this.scrollBeyondLastLine===e.scrollBeyondLastLine&&this.showSlider===e.showSlider&&this.pixelRatio===e.pixelRatio&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.lineHeight===e.lineHeight&&this.minimapLeft===e.minimapLeft&&this.minimapWidth===e.minimapWidth&&this.minimapHeight===e.minimapHeight&&this.canvasInnerWidth===e.canvasInnerWidth&&this.canvasInnerHeight===e.canvasInnerHeight&&this.canvasOuterWidth===e.canvasOuterWidth&&this.canvasOuterHeight===e.canvasOuterHeight&&this.isSampling===e.isSampling&&this.editorHeight===e.editorHeight&&this.fontScale===e.fontScale&&this.minimapLineHeight===e.minimapLineHeight&&this.minimapCharWidth===e.minimapCharWidth&&this.defaultBackgroun
72dColor&&this.defaultBackgroundColor.equals(e.defaultBackgroundColor)&&this.backgroundColor&&this.backgroundColor.equals(e.backgroundColor)&&this.foregroundAlpha===e.foregroundAlpha}},T9=class dd{constructor(e,i,n,s,r,o,a,l){this.scrollTop=e,this.scrollHeight=i,this.sliderNeeded=n,this._computedSliderRatio=s,this.sliderTop=r,this.sliderHeight=o,this.startLineNumber=a,this.endLineNumber=l}getDesiredScrollTopFromDelta(e){return Math.round(this.scrollTop+e/this._computedSliderRatio)}getDesiredScrollTopFromTouchLocation(e){return Math.round((e-this.sliderHeight/2)/this._computedSliderRatio)}static create(e,i,n,s,r,o,a,l,h,c,d){const u=e.pixelRatio,g=e.minimapLineHeight,m=Math.floor(e.canvasInnerHeight/g),_=e.lineHeight;if(e.minimapHeightIsEditorHeight){const k=l*e.lineHeight+(e.scrollBeyondLastLine?r-e.lineHeight:0),S=Math.max(1,Math.floor(r*r/k)),L=Math.max(0,e.minimapHeight-S),x=L/(c-r),E=h*x,R=L>0,D=Math.floor(e.canvasInnerHeight/e.minimapLineHeight);return new dd(h,c,R,x,E,S,1,Math.min(a,D))}let C;if(o&&n!==a){const k=n-i+1;C=Math.floor(k*g/u)}else{const k=r/_;C=Math.floor(k*g/u)}let w;e.scrollBeyondLastLine?w=(a-1)*g/u:w=Math.max(0,a*g/u-C),w=Math.min(e.minimapHeight-C,w);const v=w/(c-r),b=h*v;let y=0;if(e.scrollBeyondLastLine&&(y=r/_-1),m>=a+y)return new dd(h,c,w>0,v,b,C,1,a);{let k=Math.max(1,Math.floor(i-b*u/g));d&&d.scrollHeight===c&&(d.scrollTop>h&&(k=Math.min(k,d.startLineNumber)),d.scrollTop<h&&(k=Math.max(k,d.startLineNumber)));const S=Math.min(a,k+m-1),L=(h-s)/_,x=(i-k+L)*g/u;return new dd(h,c,!0,v,x,C,k,S)}}},du=class{constructor(t){this.dy=t}onContentChanged(){this.dy=-1}onTokensChanged(){this.dy=-1}};du.INVALID=new du(-1);var Sb=class{constructor(t,e,i){this.renderedLayout=t,this._imageData=e,this._renderedLine
vendor: 9,716 bytes, line 72
72s=new Fk(()=>du.INVALID),this._renderedLines._set(t.startLineNumber,i)}linesEquals(t){if(!this.scrollEquals(t))return!1;const e=this._renderedLines._get().lines;for(let i=0,n=e.length;i<n;i++)if(e[i].dy===-1)return!1;return!0}scrollEquals(t){return this.renderedLayout.startLineNumber===t.startLineNumber&&this.renderedLayout.endLineNumber===t.endLineNumber}_get(){const t=this._renderedLines._get();return{imageData:this._imageData,rendLineNumberStart:t.rendLineNumberStart,lines:t.lines}}onLinesChanged(t,e){return this._renderedLines.onLinesChanged(t,e)}onLinesDeleted(t,e){this._renderedLines.onLinesDeleted(t,e)}onLinesInserted(t,e){this._renderedLines.onLinesInserted(t,e)}onTokensChanged(t){return this._renderedLines.onTokensChanged(t)}},M9=class Gk{constructor(e,i,n,s){this._backgroundFillData=Gk._createBackgroundFillData(i,n,s),this._buffers=[e.createImageData(i,n),e.createImageData(i,n)],this._lastUsedBuffer=0}getBuffer(){this._lastUsedBuffer=1-this._lastUsedBuffer;const e=this._buffers[this._lastUsedBuffer];return e.data.set(this._backgroundFillData),e}static _createBackgroundFillData(e,i,n){const s=n.r,r=n.g,o=n.b,a=n.a,l=new Uint8ClampedArray(e*i*4);let h=0;for(let c=0;c<i;c++)for(let d=0;d<e;d++)l[h]=s,l[h+1]=r,l[h+2]=o,l[h+3]=a,h+=4;return l}},yb=class t_{constructor(e,i){this.samplingRatio=e,this.minimapLines=i}static compute(e,i,n){if(e.renderMinimap===0||!e.isSampling)return[null,[]];const s=e.pixelRatio,r=e.lineHeight,o=e.scrollBeyondLastLine,{minimapLineCount:a}=Cy.computeContainedMinimapLineCount({viewLineCount:i,scrollBeyondLastLine:o,height:e.editorHeight,lineHeight:r,pixelRatio:s}),l=i/a,h=l/2;if(!n||n.minimapLines.length===0){const b=[];if(b[0]=1,a>1){for(let y=0,k=a-1;y<k;y++)b[y]=Math.round(y*l+h);b[a-1]=i}return[new t_(l,b),[]]}const c=n.minimapLines,d=c.length,u=[];let g=0,m=0,_=1;const C=10;let w=[],v=null;for(let b=0;b<a;b++){const y=Math.max(_,Math.round(b*l)),k=Math.max(y,Math.round((b+1)*l));for(;g<d&&c[g]<y;){if(w.length<C){const L=g+1+m;v&&v.type==="deleted"&&v._oldIndex===g-1?v.deleteToLineNumber++:(v={type:"deleted",_oldIndex:g,deleteFromLineNumber:L,deleteToLineNumber:L},w.push(v)),m--}g++}let S;if(g<d&&c[g]<=k)S=c[g],g++;else if(b===0?S=1:b+1===a?S=i:S=Math.round(b*l+h),w.length<C){const L=g+1+m;v&&v.type==="inserted"&&v._i===b-1?v.insertToLineNumber++:(v={type:"inserted",_i:b,insertFromLineNumber:L,insertToLineNumber:L},w.push(v)),m++}u[b]=S,_=S}if(w.length<C)for(;g<d;){const b=g+1+m;v&&v.type==="deleted"&&v._oldIndex===g-1?v.deleteToLineNumber++:(v={type:"deleted",_oldIndex:g,deleteFromLineNumber:b,deleteToLineNumber:b},w.push(v)),m--,g++}else w=[{type:"flush"}];return[new t_(l,u),w]}modelLineToMinimapLine(e){return Math.min(this.minimapLines.length,Math.max(1,Math.round(e/this.samplingRatio)))}modelLineRangeToMinimapLineRange(e,i){let n=this.modelLineToMinimapLine(e)-1;for(;n>0&&this.minimapLines[n-1]>=e;)n--;let s=this.modelLineToMinimapLine(i)-1;for(;s+1<this.minimapLines.length&&this.minimapLines[s+1]<=i;)s++;if(n===s){const r=this.minimapLines[n];if(r<e||r>i)return null}return[n+1,s+1]}decorationLineRangeToMinimapLineRange(e,i){let n=this.modelLineToMinimapLine(e),s=this.modelLineToMinimapLine(i);return e!==i&&s===n&&(s===this.minimapLines.length?n>1&&n--:s++),[n,s]}onLinesDeleted(e){const i=e.toLineNumber-e.fromLineNumber+1;let n=this.minimapLines.length,s=0;for(let r=this.minimapLines.length-1;r>=0&&!(this.minimapLines[r]<e.fromLineNumber);r--)this.minimapLines[r]<=e.toLineNumber?(this.minimapLines[r]=Math.max(1,e.fromLineNumber-1),n=Math.min(n,r),s=Math.max(s,r)):this.minimapLines[r]-=i;return[n,s]}onLinesInserted(e){const i=e.toLineNumber-e.fromLineNumber+1;for(let n=this.minimapLines.length-1;n>=0&&!(this.minimapLines[n]<e.fromLineNumber);n--)this.minimapLines[n]+=i}},R9=class extends Mi{constructor(t){super(t),this.tokensColorTracker=jv.getInstance(),this._selections=[],this._minimapSelections=null,this.options=new wb(this._context.configuration,this._context.theme,this.tokensColorTracker);const[e]=yb.compute(this.options,this._context.viewModel.getLineCount(),null);this._samplingState=e,this._shouldCheckSampling=!1,this._actual=new A9(t.theme,this)}dispose(){this._actual.dispose(),super.dispose()}getDomNode(){return this._actual.getDomNode()}_onOptionsMaybeChanged(){const t=new wb(this._context.configuration,this._context.theme,this.tokensColorTracker);return this.options.equals(t)?!1:(this.options=t,this._recreateLineSampling(),this._actual.onDidChangeOptions(),!0)}onConfigurationChanged(t){return this._onOptionsMaybeChanged()}onCursorStateChanged(t){return this._selections=t.selections,this._minimapSelections=null,this._actual.onSelectionChanged()}onDecorationsChanged(t){return t.affectsMinimap?this._actual.onDecorationsChanged():!1}onFlushed(t){return this._samplingState&&(this._shouldCheckSampling=!0),this._actual.onFlushed()}onLinesChanged(t){if(this._samplingState){const e=this._samplingState.modelLineRangeToMinimapLineRange(t.fromLineNumber,t.toLineNumber);return e?this._actual.onLinesChanged(e[0],e[1]):!1}else return this._actual.onLinesChanged(t.fromLineNumber,t.toLineNumber)}onLinesDeleted(t){if(this._samplingState){const[e,i]=this._samplingState.onLinesDeleted(t);return e<=i&&this._actual.onLinesChanged(e+1,i+1),this._shouldCheckSampling=!0,!0}else return this._actual.onLinesDeleted(t.fromLineNumber,t.toLineNumber)}onLinesInserted(t){return this._samplingState?(this._samplingState.onLinesInserted(t),this._shouldCheckSampling=!0,!0):this._actual.onLinesInserted(t.fromLineNumber,t.toLineNumber)}onScrollChanged(t){return this._actual.onScrollChanged()}onThemeChanged(t){return this._actual.onThemeChanged(),this._onOptionsMaybeChanged(),!0}onTokensChanged(t){if(this._samplingState){const e=[];for(const i of t.ranges){const n=this._samplingState.modelLineRangeToMinimapLineRange(i.fromLineNumber,i.toLineNumber);n&&e.push({fromLineNumber:n[0],toLineNumber:n[1]})}return e.length?this._actual.onTokensChanged(e):!1}else return this._actual.onTokensChanged(t.ranges)}onTokensColorsChanged(t){return this._onOptionsMaybeChanged(),this._actual.onTokensColorsChanged()}onZonesChanged(t){return this._actual.onZonesChanged()}prepareRender(t){this._shouldCheckSampling&&(this._shouldCheckSampling=!1,this._recreateLineSampling())}render(t){let e=t.visibleRange.startLineNumber,i=t.visibleRange.endLineNumber;this._samplingState&&(e=this._samplingState.modelLineToMinimapLine(e),i=this._samplingState.modelLineToMinimapLine(i));const n={viewportContainsWhitespaceGaps:t.viewportData.whitespaceViewportData.length>0,scrollWidth:t.scrollWidth,scrollHeight:t.scrollHeight,viewportStartLineNumber:e,viewportEndLineNumber:i,viewportStartLineNumberVerticalOffset:t.getVerticalOffsetForLineNumber(e),scrollTop:t.scrollTop,scrollLeft:t.scrollLeft,viewportWidth:t.viewportWidth,viewportHeight:t.viewportHeight};this._actual.render(n)}_recreateLineSampling(){this._minimapSelections=null;const t=!!this._samplingState,[e,i]=yb.compute(this.options,this._context.viewModel.getLineCount(),this._samplingState);if(this._samplingState=e,t&&this._samplingState)for(const n of i)switch(n.type){case"deleted":this._actual.onLinesDeleted(n.deleteFromLineNumber,n.deleteToLineNumber);break;case"inserted":this._actual.onLinesInserted(n.insertFromLineNumber,n.insertToLineNumber);break;case"flush":this._actual.onFlushed()}}getLineCount(){return this._samplingState?this._samplingState.minimapLines.length:this._context.viewModel.getLineCount()}getRealLineCount(){return this._context.viewModel.getLineCount()}getLineContent(t){return this._samplingState?this._context.viewModel.getLineContent(this._samplingState.minimapLines[t-1]):this._context.viewModel.getLineContent(t)}getLineMaxColumn(t){return this._samplingState?this._context.viewModel.getLineMaxColumn(this._samplingState.minimapLines[t-1]):this._context.viewModel.getLineMaxColumn(t)}getMinimapLinesRenderingData(t,e,i){if(this._samplingState){const n=[];for(let s=0,r=e-t+1;s<r;s++)i[s]?n[s]=this._context.viewModel.getViewLineData(this._samplingState.minimapLines[t+s-1]):n[s]=null;return n}return this._context.viewModel.getMinimapLinesRenderingData(t,e,i).data}getSelections(){if(this._minimapSelections===null)if(this._samplingState){this._minimapSelections=[];for(const t of this._selections){const[e,i]=this._samplingState.decorationLineRangeToMinimapLineRange(t.startLineNumber,t.endLineNumber);this._minimapSelections.push(new xe(e,t.startColumn,i,t.endColumn))}}else this._minimapSelections=this._selections;return this._minimapSelections}getMinimapDecorationsInViewport(t,e){let i;if(this._samplingState){const s=this._samplingState.minimapLines[t-1],r=this._samplingState.minimapLines[e-1];i=new T(s,1,r,this._context.viewModel.getLineMaxColumn(r))}else i=new T(t,1,e,this._context.viewModel.getLineMaxColumn(e));const n=this._context.viewModel.getDecorationsInViewport(i);if(this._samplingState){const s=[];for(const r of n){if(!r.options.minimap)continue;const o=r.range,a=this._samplingState.modelLineToMinimapLine(o.startLineNumber),l=this._samplingState.modelLineToMinimapLine(o.endLineNumber);s.push(new TL(new T(a,o.startColumn,l,o.endColumn),r.options))}return s}return n}getOptions(){return this._context.viewModel.model.getOptions()}revealLineNumber(t){this._samplingState&&(t=this._samplingState.minimapLines[t-1]),this._context.viewModel.revealRange("mouse",!1,new T(t,1,t,1),1,0)}setScrollTop(t){this._context.viewModel.viewLayout.setScrollPosition({scrollTop:t},1)}},A9=class i_ extends V{constructor(e,i){super(),this._renderDecorations=!1,this._gestureInProgress=!1,this._theme=e,this._model=i,this._lastRenderData=null,this._buffers=null,this._selectionColor=this._theme.getColor(eb),this._domNo
72de=de(document.createElement("div")),Hn.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=de(document.createElement("div")),this._shadow.setClassName("minimap-shadow-hidden"),this._domNode.appendChild(this._shadow),this._canvas=de(document.createElement("canvas")),this._canvas.setPosition("absolute"),this._canvas.setLeft(0),this._domNode.appendChild(this._canvas),this._decorationsCanvas=de(document.createElement("canvas")),this._decorationsCanvas.setPosition("absolute"),this._decorationsCanvas.setClassName("minimap-decorations-layer"),this._decorationsCanvas.setLeft(0),this._domNode.appendChild(this._decorationsCanvas),this._slider=de(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=de(document.createElement("div")),this._sliderHorizontal.setPosition("absolute"),this._sliderHorizontal.setClassName("minimap-slider-horizontal"),this._slider.appendChild(this._sliderHorizontal),this._applyLayout(),this._mouseDownListener=gi(this._domNo
72de.domNode,"mousedown",n=>{if(n.preventDefault(),this._model.options.renderMinimap===0||!this._lastRenderData)return;if(this._model.options.size!=="proportional"){if(n.leftButton&&this._lastRenderData){const a=qi(this._slider.domNode),l=a.top+a.height/2;this._startSliderDragging(n.buttons,n.posx,l,n.posy,this._lastRenderData.renderedLayout)}return}const s=this._model.options.minimapLineHeight,r=this._model.options.canvasInnerHeight/this._model.options.canvasOuterHeight*n.browserEvent.offsetY;let o=Math.floor(r/s)+this._lastRenderData.renderedLayout.startLineNumber;o=Math.min(o,this._model.getLineCount()),this._model.revealLineNumber(o)}),this._sliderMouseMoveMonitor=new Ju,this._sliderMouseDownListener=gi(this._slider.domNode,"mousedown",n=>{n.preventDefault(),n.stopPropagation(),n.leftButton&&this._lastRenderData&&this._startSliderDragging(n.buttons,n.posx,n.posy,n.posy,this._lastRenderData.renderedLayout)}),this._gestureDisposable=ii.addTarget(this._domNode.domNode),this._sliderTouchStartListener=B(this._domNode.domNode,Me.Start,n=>{n.preventDefault(),n.stopPropagation(),this._lastRenderData&&(this._slider.toggleClassName("active",!0),this._gestureInProgress=!0,this.scrollDueToTouchEvent(n))},{passive:!1}
72),this._sliderTouchMoveListener=B(this._domNode.domNode,Me.Change,n=>{n.preventDefault(),n.stopPropagation(),this._lastRenderData&&this._gestureInProgress&&this.scrollDueToTouchEvent(n)},{passive:!1}),this._sliderTouchEndListener=gi(this._domNode.domNode,Me.End,n=>{n.preventDefault(),n.stopPropagation(),this._gestureInProgress=!1,this._slider.toggleClassName("active",!1)})}_startSliderDragging(e,i,n,s,r){this._slider.toggleClassName("active",!0);const o=(a,l)=>{const h=Math.abs(l-i);if(ei&&h>D9){this._model.setScrollTop(r.scrollTop);return}const c=a-n;this._model.setScrollTop(r.getDesiredScrollTopFromDelta(c))};s!==n&&o(s,i),this._sliderMouseMoveMonitor.startMonitoring(this._slider.domNode,e,Ov,a=>o(a.posy,a.posx),()=>{this._slider.toggleClassName("active",!1)})}scrollDueToTouchEvent(e){const i=this._domNode.domNode.getBoundingClientRect().top,n=this._lastRenderData.renderedLayout.getDesiredScrollTopFromTouchLocation(e.pageY-i);this._model.setScrollTop(n)}dispose(){this._mouseDownListener.dispose(),this._sliderMouseMoveMonitor.dispose(),this._sliderMouseDownListener.dispose(),this._gestureDisposable.dispose(),this._sliderTouchStartListener.dispose(),this._sliderTouchMoveListener.dispose(),this._sliderTouchEndListener.dispose(),super.dispose()}_getMinimapDomNodeClassName(){return this._model.options.showSlider==="always"?"minimap slider-always":"minimap slider-mouseover"}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 M9(this._canvas.domNode.getContext("2d"),this._model.options.canvasInnerWidth,this._model.options.canvasInnerHeight,this._model.options.backgroundColor)),this._buffers?this._buffers.getBuffer():null}onDidChangeOptions(){this._lastRenderData=null,this._buffers=null,this._applyLayout(),this._domNode.setClassName(this._getMinimapDomNodeClassName())}onSelectionChanged(){return this._renderDecorations=!0,!0}onDecorationsChanged(){return this._renderDecorations=!0,!0}onFlushed(){return this._lastRenderData=null,!0}onLinesChanged(e,i){return this._lastRenderData?this._lastRenderData.onLinesChanged(e,i):!1}onLinesDeleted(e,i){return this._lastRenderData&&this._lastRenderData.onLinesDeleted(e,i),!0}onLinesInserted(e,i){return this._lastRenderData&&this._lastRenderData.onLinesInserted(e,i),!0}onScrollChanged(){return this._renderDecorations=!0,!0}onThemeChanged(){return this._selectionColor=this._theme.getColor(eb),this._renderDecorations=!0,!0}onTokensChanged(e){return this._lastRenderData?this._lastRenderData.onTokensChanged(e):!1}onTokensColorsChanged(){return this._lastRenderData=null,this._buffers=null,!0}onZonesChanged(){return this._lastRenderData=null,!0}render(e){if(this._model.options.renderMinimap===0){this._shadow.setClassName("minimap-shadow-hidden"),this._sliderHorizontal.setWidth(0),this._sliderHorizontal.setHeight(0);return}e.scrollLeft+e.viewportWidth>=e.scrollWidth?this._shadow.setClassName("minimap-shadow-hidden"):this._shadow.setClassName("minimap-shadow-visible");const i=T9.create(this._model.options,e.viewportStartLineNumber,e.viewportEndLineNumber,e.viewportStartLineNumberVerticalOffset,e.viewportHeight,e.viewportContainsWhitespaceGaps,this._model.getLineCount(),this._model.getRealLineCount(),e.scrollTop,e.scrollHeight,this._lastRenderData?this._lastRenderData.renderedLayout:null);this._slider.setDisplay(i.sliderNeeded?"block":"none"),this._slider.setTop(i.sliderTop),this._slider.setHeight(i.sliderHeight),this._sliderHorizontal.setLeft(0),this._sliderHorizontal.setWidth(this._model.options.minimapWidth),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(i.sliderHeight),this.renderDecorations(i),this._lastRenderData=this.renderLines(i)}renderDecorations(e){if(this._renderDecorations){this._renderDecorations=!1;const i=this._model.getSelections();i.sort(T.compareRangesUsingStarts);const n=this._model.getMinimapDecorationsInViewport(e.startLineNumber,e.endLineNumber);n.sort((u,g)=>
72(u.options.zIndex||0)-(g.options.zIndex||0));const{canvasInnerWidth:s,canvasInnerHeight:r}=this._model.options,o=this._model.options.minimapLineHeight,a=this._model.options.minimapCharWidth,l=this._model.getOptions().tabSize,h=this._decorationsCanvas.domNode.getContext("2d");h.clearRect(0,0,s,r);const c=new Lb(e.startLineNumber,e.endLineNumber,!1);this._renderSelectionLineHighlights(h,i,c,e,o),this._renderDecorationsLineHighlights(h,n,c,e,o);const d=new Lb(e.startLineNumber,e.endLineNumber,null);this._renderSelectionsHighlights(h,i,d,e,o,l,a,s),this._renderDecorationsHighlights(h,n,d,e,o,l,a,s)}}_renderSelectionLineHighlights(e,i,n,s,r){if(!this._selectionColor||this._selectionColor.isTransparent())return;e.fillStyle=this._selectionColor.transparent(.5).toString();let o=0,a=0;for(const l of i){const h=Math.max(s.startLineNumber,l.startLineNumber),c=Math.min(s.endLineNumber,l.endLineNumber);if(h>c)continue;for(let g=h;g<=c;g++)n.set(g,!0);const d=(h-s.startLineNumber)*r,u=(c-s.startLineNumber)*r+r;a>=d||(a>o&&e.fillRect(8,o,e.canvas.width,a-o),o=d),a=u}a>o&&e.fillRect(8,o,e.canvas.width,a-o)}_renderDecorationsLineHighlights(e,i,n,s,r){const o=new Map;for(let a=i.length-1;a>=0;a--){const l=i[a],h=l.options.minimap;if(!h||h.position!==ms.Inline)continue;const c=Math.max(s.startLineNumber,l.range.startLineNumber),d=Math.min(s.endLineNumber,l.range.endLineNumber);if(c>d)continue;const u=h.getColor(this._theme.value);if(!u||u.isTransparent())continue;let g=o.get(u.toString());g||(g=u.transparent(.5).toString(),o.set(u.toString(),g)),e.fillStyle=g;for(let m=c;m<=d;m++){if(n.has(m))continue;n.set(m,!0);const _=(c-s.startLineNumber)*r;e.fillRect(8,_,e.canvas.width,r)}}}_renderSelectionsHighlights(e,i,n,s,r,o,a,l){if(!(!this._selectionColor||this._selectionColor.isTransparent()))for(const h of i){const c=Math.max(s.startLineNumber,h.startLineNumber),d=Math.min(s.endLineNumber,h.endLineNumber);if(!(c>d))for(let u=c;u<=d;u++)this.renderDecorationOnLine(e,n,h,this._selectionColor,s,u,r,r,o,a,l)}}_renderDecorationsHighlights(e,i,n,s,r,o,a,l){for(const h of i){const c=h.options.minimap;if(!c)continue;const d=Math.max(s.startLineNumber,h.range.startLineNumber),u=Math.min(s.endLineNumber,h.range.endLineNumber);if(d>u)continue;const g=c.getColor(this._theme.value);if(!(!g||g.isTransparent()))for(let m=d;m<=u;m++)switch(c.position){case ms.Inline:this.renderDecorationOnLine(e,n,h.range,g,s,m,r,r,o,a,l);continue;case ms.Gutter:{const _=(m-s.startLineNumber)*r;this.renderDecoration(e,g,2,_,N9,r);continue}}}}renderDecorationOnLine(e,i,n,s,r,o,a,l,h,c,d){const u=(o-r.startLineNumber)*l;if(u+a<0||u>this._model.options.canvasInnerHeight)return;const{startLineNumber:g,endLineNumber:m}=n,_=g===o?n.startColumn:1,C=m===o?n.endColumn:this._model.getLineMaxColumn(o),w=this.getXOffsetForPosition(i,o,_,h,c,d),v=this.getXOffsetForPosition(i,o,C,h,c,d);this.renderDecoration(e,s,w,u,v-w,a)}getXOffsetForPosition(e,i,n,s,r,o){if(n===1)return 8;if((n-1)*r>=o)return o;let a=e.get(i);if(!a){const l=this._model.getLineContent(i);a=[8];let h=8;for(let c=1;c<l.length+1;c++){const d=l.charCodeAt(c-1),u=d===9?s*r:ir(d)?2*r:r,g=h+u;if(g>=o){a[c]=o;break}a[c]=g,h=g}e.set(i,a)}return n-1<a.length?a[n-1]:o}renderDecoration(e,i,n,s,r,o){e.fillStyle=i&&i.toString()||"",e.fillRect(n,s,r,o)}renderLines(e){const i=e.startLineNumber,n=e.endLineNumber,s=this._model.options.minimapLineHeight;if(this._lastRenderData&&this._lastRenderData.linesEquals(e)){const W=this._lastRenderData._get();return new Sb(e,W.imageData,W.lines)}const r=this._getBuffer();if(!r)return null;const[o,a,l]=i_._renderUntouchedLines(r,i,n,s,this._lastRenderData),h=this._model.getMinimapLinesRenderingData(i,n,l),c=this._model.getOptions().tabSize,d=this._model.options.defaultBackgroundColor,u=this._model.options.backgroundColor,g=this._model.options.foregroundAlpha,m=this._model.tokensColorTracker,_=m.backgroundIsLight(),C=this._model.options.renderMinimap,w=this._model.options.charRenderer(),v=this._model.options.fontScale,b=this._model.options.minimapCharWidth,y=(C===1?2:3)*v,k=s>y?Math.floor((s-y)/2):0,S=u.a/255,L=new Js(Math.round((u.r-d.r)*S+d.r),Math.round((u.g-d.g)*S+d.g),Math.round((u.b-d.b)*S+d.b),255);let x=0;const E=[];for(let W=0,P=n-i+1;W<P;W++)l[W]&&i_._renderLine(r,L,u.a,_,C,b,m,g,w,x,k,c,h[W],v,s),E[W]=new du(x),x+=s;const R=o===-1?0:o,D=(a===-1?r.height:a)-R;return this._canvas.domNode.getContext("2d").putImageData(r,0,0,0,R,r.width,D),new Sb(e,r,E)}static _renderUntouchedLines(e,i,n,s,r){const o=[];if(!r){for(let S=0,L=n-i+1;S<L;S++)o[S]=!0;return[-1,-1,o]}const a=r._get(),l=a.imageData.data,h=a.rendLineNumberStart,c=a.lines,d=c.length,u=e.width,g=e.data,m=(n-i+1)*s*u*4;let _=-1,C=-1,w=-1,v=-1,b=-1,y=-1,k=0;for(let S=i;S<=n;S++){const L=S-i,x=S-h,E=x>=0&&x<d?c[x].dy:-1;if(E===-1){o[L]=!0,k+=s;continue}const R=E*u*4,D=(E+s)*u*4,W=k*u*4,P=(k+s)*u*4;v===R&&y===W?(v=D,y=P):(w!==-1&&(g.set(l.subarray(w,v),b),_===-1&&w===0&&w===b&&(_=v),C===-1&&v===m&&w===b&&(C=w)),w=R,v=D,b=W,y=P),o[L]=!1,k+=s}return w!==-1&&(g.set(l.subarray(w,v),b),_===-1&&w===0&&w===b&&(_=v),C===-1&&v===m&&w===b&&(C=w)),[_===-1?-1:_/(u*4),C===-1?-1:C/(u*4),o]}static _renderLine(e,i,n,s,r,o,a,l,h,c,d,u,g,m,_){const C=g.content,w=g.tokens,v=e.width-o,b=_===1;let y=8,k=0,S=0;for(let L=0,x=w.getCount();L<x;L++){const E=w.getEndOffset(L),R=w.getForeground(L),D=a.getColor(R);for(;k<E;k++){if(y>v)return;const W=C.charCodeAt(k);if(W===9){const P=u-(k+S)%u;S+=P-1,y+=P*o}else if(W===32)y+=o;else{const P=ir(W)?2:1;for(let K=0;K<P;K++)if(r===2?h.blockRenderChar(e,y,c+d,D,l,i,n,b):h.renderChar(e,y,c+d,W,D,l,i,n,m,s,b),y+=o,y>v)return}}}}},Lb=class{constructor(t,e,i){this._startLineNumber=t,this._endLineNumber=e,this._defaultValue=i,this._values=[];for(let n=0,s=this._endLineNumber-this._startLineNumber+1;n<s;n++)this._values[n]=i}has(t){return this.get(t)!==this._defaultValue}set(t,e){t<this._startLineNumber||t>this._endLineNumber||(this._values[t-this._startLineNumber]=e)}get(t){return t<this._startLineNumber||t>this._endLineNumber?this._defaultValue:this._values[t-this._startLineNumber]}};Yt((t,e)=>{const i=t.getColor(kA);i&&e.addRule(`.monaco-editor .minimap-slider .minimap-slider-horizontal { background: ${i}; }`);const n=t.getColor(xA);n&&e.addRule(`.monaco-editor .minimap-slider:hover .minimap-slider-horizontal { background: ${n}; }`);const s=t.getColor(IA);s&&e.addRule(`.monaco-editor .minimap-slider.active .minimap-slider-horizontal { background: ${s}; }`);const r=t.getColor($a);r&&e.addRule(`.monaco-editor .minimap-shadow-visible { box-shadow: ${r} -6px 0 6px -6px inset; }`)});var O9=class extends Mi{constructor(t){super(t);const e=this._context.configuration.options.get(131);this._widgets={},this._verticalScrollbarWidth=e.verticalScrollbarWidth,this._minimapWidth=e.minimap.minimapWidth,this._horizontalScrollbarHeight=e.horizontalScrollbarHeight,this._editorHeight=e.height,this._editorWidth=e.width,this._domNo
72de=de(document.createElement("div")),Hn.write(this._domNode,4),this._domNode.setClassName("overlayWidgets")}dispose(){super.dispose(),this._widgets={}}getDomNode(){return this._domNode}onConfigurationChanged(t){const e=this._context.configuration.options.get(131);return this._verticalScrollbarWidth=e.verticalScrollbarWidth,this._minimapWidth=e.minimap.minimapWidth,this._horizontalScrollbarHeight=e.horizontalScrollbarHeight,this._editorHeight=e.height,this._editorWidth=e.width,!0}addWidget(t){const e=de(t.getDomNode());this._widgets[t.getId()]={widget:t,preference:null,domNode:e},e.setPosition("absolute"),e.setAttribute("widgetId",t.getId()),this._domNode.appendChild(e),this.setShouldRender()}setWidgetPosition(t,e){const i=this._widgets[t.getId()];return i.preference===e?!1:(i.preference=e,this.setShouldRender(),!0)}removeWidget(t){const e=t.getId();if(this._widgets.hasOwnProperty(e)){const i=this._widgets[e].domNode.domNode;delete this._widgets[e],i.parentNode.removeChild(i),this.setShouldRender()}}_renderWidget(t){const e=t.domNode;if(t.preference===null){e.unsetTop();return}if(t.preference===0)e.setTop(0),e.setRight(2*this._verticalScrollbarWidth+this._minimapWidth);else if(t.preference===1){const i=e.domNode.clientHeight;e.setTop(this._editorHeight-i-2*this._horizontalScrollbarHeight),e.setRight(2*this._verticalScrollbarWidth+this._minimapWidth)}else t.preference===2&&(e.setTop(0),e.domNode.style.right="50%")}prepareRender(t){}render(t){this._domNode.setWidth(this._editorWidth);const e=Object.keys(this._widgets);for(let i=0,n=e.length;i<n;i++){const s=e[i];this._renderWidget(this._widgets[s])}}},P9=class{constructor(t,e){const i=t.options;this.lineHeight=i.get(59),this.pixelRatio=i.get(129),this.overviewRulerLanes=i.get(74),this.renderBorder=i.get(73);const n=e.getColor(g7);this.borderColor=n?n.toString():null,this.hideCursor=i.get(52);const s=e.getColor(wk);this.cursorColor=s?s.transparent(.7).toString():null,this.themeType=e.type;const r=i.get(65),o=r.enabled,a=r.side,l=o?e.getColor(m7)||Ge.getDefaultBackground():null;l===null||a==="left"?this.backgroundColor=null:this.backgroundColor=O.Format.CSS.formatHex(l);const h=i.get(131).overviewRuler;this.top=h.top,this.right=h.right,this.domWidth=h.width,this.domHeight=h.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[c,d]=this._initLanes(1,this.canvasWidth,this.overviewRulerLanes);this.x=c,this.w=d}_initLanes(t,e,i){const n=e-t;if(i>=3){const s=Math.floor(n/3),r=Math.floor(n/3),o=n-s-r,a=t,l=a+s;return[[0,a,l,a,a+s+o,a,l,a],[0,s,o,s+o,r,s+o+r,o+r,s+o+r]]}else if(i===2){const s=Math.floor(n/2),r=n-s,o=t;return[[0,o,o,o,o+s,o,o,o],[0,s,s,s,r,s+r,s+r,s+r]]}else{const s=t,r=n;return[[0,s,s,s,s,s,s,s],[0,r,r,r,r,r,r,r]]}}equals(t){return this.lineHeight===t.lineHeight&&this.pixelRatio===t.pixelRatio&&this.overviewRulerLanes===t.overviewRulerLanes&&this.renderBorder===t.renderBorder&&this.borderColor===t.borderColor&&this.hideCursor===t.hideCursor&&this.cursorColor===t.cursorColor&&this.themeType===t.themeType&&this.backgroundColor===t.backgroundColor&&this.top===t.top&&this.right===t.right&&this.domWidth===t.domWidth&&this.domHeight===t.domHeight&&this.canvasWidth===t.canvasWidth&&this.canvasHeight===t.canvasHeight}},F9=class extends Mi{constructor(t){super(t),this._domNode=de(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=Ge.onDidChange(e=>{e.changedColorMap&&this._updateSettings(!0)}),this._cursorPositions=[]}dispose(){super.dispose(),this._tokensColorTrackerListener.dispose()}_updateSettings(t){const e=new P9(this._context.configuration,this._context.theme);return this._settings&&this._settings.equals(e)?!1:(this._settings=e,this._domNode.setTop(this._settings.top),this._domNode.setRight(this._settings.right),this._domNo
72de.setWidth(this._settings.domWidth),this._domNode.setHeight(this._settings.domHeight),this._domNode.domNode.width=this._settings.canvasWidth,this._domNode.domNode.height=this._settings.canvasHeight,t&&this._render(),!0)}onConfigurationChanged(t){return this._updateSettings(!1)}onCursorStateChanged(t){this._cursorPositions=[];for(let e=0,i=t.selections.length;e<i;e++)this._cursorPositions[e]=t.selections[e].getPosition();return this._cursorPositions.sort(A.compare),!0}onDecorationsChanged(t){return!!t.affectsOverviewRuler}onFlushed(t){return!0}onScrollChanged(t){return t.scrollHeightChanged}onZonesChanged(t){return!0}onThemeChanged(t){return this._updateSettings(!1)}getDomNode(){return this._domNode.domNode}prepareRender(t){}render(t){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 t=this._settings.canvasWidth,e=this._settings.canvasHeight,i=this._settings.lineHeight,n=this._context.viewLayout,s=e/this._context.viewLayout.getScrollHeight(),r=this._context.viewModel.getAllOverviewRulerDecorations(this._context.theme),o=6*this._settings.pixelRatio|0,a=o/2|0,l=this._domNode.domNode.getContext("2d");this._settings.backgroundColor===null?l.clearRect(0,0,t,e):(l.fillStyle=this._settings.backgroundColor,l.fillRect(0,0,t,e));const h=this._settings.x,c=this._settings.w;r.sort(ML.cmp);for(const d of r){const u=d.color,g=d.data;l.fillStyle=u;let m=0,_=0,C=0;for(let w=0,v=g.length/3;w<v;w++){const b=g[3*w],y=g[3*w+1],k=g[3*w+2];let S=n.getVerticalOffsetForLineNumber(y)*s|0,L=(n.getVerticalOffsetForLineNumber(k)+i)*s|0;if(L-S<o){let x=(S+L)/2|0;x<a?x=a:x+a>e&&(x=e-a),S=x-a,L=x+a}S>C+1||b!==m?(w!==0&&l.fillRect(h[m],_,c[m],C-_),m=b,_=S,C=L):L>C&&(C=L)}l.fillRect(h[m],_,c[m],C-_)}if(!this._settings.hideCursor&&this._settings.cursorColor){const d=2*this._settings.pixelRatio|0,u=d/2|0,g=this._settings.x[7],m=this._settings.w[7];l.fillStyle=this._settings.cursorColor;let _=-100,C=-100;for(let w=0,v=this._cursorPositions.length;w<v;w++){const b=this._cursorPositions[w];let y=n.getVerticalOffsetForLineNumber(b.lineNumber)*s|0;y<u?y=u:y+u>e&&(y=e-u);const k=y-u,S=k+d;k>C+1?(w!==0&&l.fillRect(g,_,m,C-_),_=k,C=S):S>C&&(C=S)}l.fillRect(g,_,m,C-_)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(l.beginPath(),l.lineWidth=1,l.strokeStyle=this._settings.borderColor,l.moveTo(0,0),l.lineTo(0,e),l.stroke(),l.moveTo(0,0),l.lineTo(t,0),l.stroke())}},kb=class{constructor(t,e,i){this._colorZoneBrand=void 0,this.from=t|0,this.to=e|0,this.colorId=i|0}static compare(t,e){return t.colorId===e.colorId?t.from===e.from?t.to-e.to:t.from-e.from:t.colorId-e.colorId}},fh=class{constructor(t,e,i,n){this._overviewRulerZoneBrand=void 0,this.startLineNumber=t,this.endLineNumber=e,this.heightInLines=i,this.color=n,this._colorZone=null}static compare(t,e){return t.color===e.color?t.startLineNumber===e.startLineNumber?t.heightInLines===e.heightInLines?t.endLineNumber-e.endLineNumber:t.heightInLines-e.heightInLines:t.startLineNumber-e.startLineNumber:t.color<e.color?-1:1}setColorZone(t){this._colorZone=t}getColorZones(){return this._colorZone}},B9=class{constructor(t){this._getVerticalOffsetForLine=t,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(t){this._zones=t,this._zones.sort(fh.compare)}setLineHeight(t){return this._lineHeight===t?!1:(this._lineHeight=t,this._colorZonesInvalid=!0,!0)}setPixelRatio(t){this._pixelRatio=t,this._colorZonesInvalid=!0}getDOMWidth(){return this._domWidth}getCanvasWidth(){return this._domWidth*this._pixelRatio}setDOMWidth(t){return this._domWidth===t?!1:(this._domWidth=t,this._colorZonesInvalid=!0,!0)}getDOMHeight(){return this._domHeight}getCanvasHeight(){return this._domHeight*this._pixelRatio}setDOMHeight(t){return this._domHeight===t?!1:(this._domHeight=t,this._colorZonesInvalid=!0,!0)}getOuterHeight(){return this._outerHeight}setOuterHeight(t){return this._outerHeight===t?!1:(this._outerHeight=t,this._colorZonesInvalid=!0,!0)}resolveColorZones(){const t=this._colorZonesInvalid,e=Math.floor(this._lineHeight),i=Math.floor(this.getCanvasHeight()),n=i/Math.floor(this._outerHeight),s=Math.floor(4*this._pixelRatio/2),r=[];for(let o=0,a=this._zones.length;o<a;o++){const l=this._zones[o];if(!t){const v=l.getColorZones();
vendor: 11,092 bytes, line 72
72if(v){r.push(v);continue}}const h=this._getVerticalOffsetForLine(l.startLineNumber),c=l.heightInLines===0?this._getVerticalOffsetForLine(l.endLineNumber)+e:h+l.heightInLines*e,d=Math.floor(n*h),u=Math.floor(n*c);let g=Math.floor((d+u)/2),m=u-g;m<s&&(m=s),g-m<0&&(g=m),g+m>i&&(g=i-m);const _=l.color;let C=this._color2Id[_];C||(C=++this._lastAssignedId,this._color2Id[_]=C,this._id2Color[C]=_);const w=new kb(g-m,g+m,C);l.setColorZone(w),r.push(w)}return this._colorZonesInvalid=!1,r.sort(kb.compare),r}},V9=class extends Vh{constructor(t,e){super(),this._context=t;const i=this._context.configuration.options;this._domNode=de(document.createElement("canvas")),this._domNode.setClassName(e),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._zoneManager=new B9(n=>this._context.viewLayout.getVerticalOffsetForLineNumber(n)),this._zoneManager.setDOMWidth(0),this._zoneManager.setDOMHeight(0),this._zoneManager.setOuterHeight(this._context.viewLayout.getScrollHeight()),this._zoneManager.setLineHeight(i.get(59)),this._zoneManager.setPixelRatio(i.get(129)),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(t){const e=this._context.configuration.options;return t.hasChanged(59)&&(this._zoneManager.setLineHeight(e.get(59)),this._render()),t.hasChanged(129)&&(this._zoneManager.setPixelRatio(e.get(129)),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(t){return this._render(),!0}onScrollChanged(t){return t.scrollHeightChanged&&(this._zoneManager.setOuterHeight(t.scrollHeight),this._render()),!0}onZonesChanged(t){return this._render(),!0}getDomNode(){return this._domNode.domNode}setLayout(t){this._domNode.setTop(t.top),this._domNode.setRight(t.right);let e=!1;e=this._zoneManager.setDOMWidth(t.width)||e,e=this._zoneManager.setDOMHeight(t.height)||e,e&&(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(t){this._zoneManager.setZones(t),this._render()}_render(){if(this._zoneManager.getOuterHeight()===0)return!1;const t=this._zoneManager.getCanvasWidth(),e=this._zoneManager.getCanvasHeight(),i=this._zoneManager.resolveColorZones(),n=this._zoneManager.getId2Color(),s=this._domNode.domNode.getContext("2d");return s.clearRect(0,0,t,e),i.length>0&&this._renderOneLane(s,i,n,t),!0}_renderOneLane(t,e,i,n){let s=0,r=0,o=0;for(const a of e){const l=a.colorId,h=a.from,c=a.to;l!==s?(t.fillRect(0,r,n,o-r),s=l,t.fillStyle=i[s],r=h,o=c):o>=h?o=Math.max(o,c):(t.fillRect(0,r,n,o-r),r=h,o=c)}t.fillRect(0,r,n,o-r)}},W9=class extends Mi{constructor(t){super(t),this.domNode=de(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("view-rulers"),this._renderedRulers=[];const e=this._context.configuration.options;this._rulers=e.get(91),this._typicalHalfwidthCharacterWidth=e.get(44).typicalHalfwidthCharacterWidth}dispose(){super.dispose()}onConfigurationChanged(t){const e=this._context.configuration.options;return this._rulers=e.get(91),this._typicalHalfwidthCharacterWidth=e.get(44).typicalHalfwidthCharacterWidth,!0}onScrollChanged(t){return t.scrollHeightChanged}prepareRender(t){}_ensureRulersCount(){const t=this._renderedRulers.length,e=this._rulers.length;if(t===e)return;if(t<e){const{tabSize:n}=this._context.viewModel.model.getOptions(),s=n;let r=e-t;for(;r>0;){const o=de(document.createElement("div"));o.setClassName("view-ruler"),o.setWidth(s),this.domNode.appendChild(o),this._renderedRulers.push(o),r--}return}let i=t-e;for(;i>0;){const n=this._renderedRulers.pop();this.domNode.removeChild(n),i--}}render(t){this._ensureRulersCount();for(let e=0,i=this._rulers.length;e<i;e++){const n=this._renderedRulers[e],s=this._rulers[e];n.setBoxShadow(s.color?`1px 0 0 0 ${s.color} inset`:""),n.setHeight(Math.min(t.scrollHeight,1e6)),n.setLeft(s.column*this._typicalHalfwidthCharacterWidth)}}};Yt((t,e)=>{const i=t.getColor(f7);i&&e.addRule(`.monaco-editor .view-ruler { box-shadow: 1px 0 0 0 ${i} inset; }`)});var H9=class extends Mi{constructor(t){super(t),this._scrollTop=0,this._width=0,this._updateWidth(),this._shouldShow=!1;const e=this._context.configuration.options.get(92);this._useShadows=e.useShadows,this._domNode=de(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true")}dispose(){super.dispose()}_updateShouldShow(){const t=this._useShadows&&this._scrollTop>0;return this._shouldShow!==t?(this._shouldShow=t,!0):!1}getDomNode(){return this._domNode}_updateWidth(){const t=this._context.configuration.options.get(131);t.minimap.renderMinimap===0||t.minimap.minimapWidth>0&&t.minimap.minimapLeft===0?this._width=t.width:this._width=t.width-t.minimap.minimapWidth-t.verticalScrollbarWidth}onConfigurationChanged(t){const e=this._context.configuration.options.get(92);return this._useShadows=e.useShadows,this._updateWidth(),this._updateShouldShow(),!0}onScrollChanged(t){return this._scrollTop=t.scrollTop,this._updateShouldShow()}prepareRender(t){}render(t){this._domNode.setWidth(this._width),this._domNode.setClassName(this._shouldShow?"scroll-decoration":"")}};Yt((t,e)=>{const i=t.getColor($a);i&&e.addRule(`.monaco-editor .scroll-decoration { box-shadow: ${i} 0 6px 6px -6px inset; }`)});var z9=class{constructor(t){this.left=t.left,this.width=t.width,this.startStyle=null,this.endStyle=null}},U9=class{constructor(t,e){this.lineNumber=t,this.ranges=e}};function $9(t){return new z9(t)}function K9(t){return new U9(t.lineNumber,t.ranges.map($9))}var ur=class dt extends ja{constructor(e){super(),this._previousFrameVisibleRangesWithStyle=[],this._context=e;const i=this._context.configuration.options;this._lineHeight=i.get(59),this._roundedSelection=i.get(90),this._typicalHalfwidthCharacterWidth=i.get(44).typicalHalfwidthCharacterWidth,this._selections=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const i=this._context.configuration.options;return this._lineHeight=i.get(59),this._roundedSelection=i.get(90),this._typicalHalfwidthCharacterWidth=i.get(44).typicalHalfwidthCharacterWidth,!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_visibleRangesHaveGaps(e){for(let i=0,n=e.length;i<n;i++)if(e[i].ranges.length>1)return!0;return!1}_enrichVisibleRangesWithStyle(e,i,n){const s=this._typicalHalfwidthCharacterWidth/4;let r=null,o=null;if(n&&n.length>0&&i.length>0){const a=i[0].lineNumber;if(a===e.startLineNumber)for(let h=0;!r&&h<n.length;h++)n[h].lineNumber===a&&(r=n[h].ranges[0]);const l=i[i.length-1].lineNumber;if(l===e.endLineNumber)for(let h=n.length-1;!o&&h>=0;h--)n[h].lineNumber===l&&(o=n[h].ranges[0]);r&&!r.startStyle&&(r=null),o&&!o.startStyle&&(o=null)}for(let a=0,l=i.length;a<l;a++){const h=i[a].ranges[0],c=h.left,d=h.left+h.width,u={top:0,bottom:0},g={top:0,bottom:0};if(a>0){const m=i[a-1].ranges[0].left,_=i[a-1].ranges[0].left+i[a-1].ranges[0].width;ac(c-m)<s?u.top=2:c>m&&(u.top=1),ac(d-_)<s?g.top=2:m<d&&d<_&&(g.top=1)}else r&&(u.top=r.startStyle.top,g.top=r.endStyle.top);if(a+1<l){const m=i[a+1].ranges[0].left,_=i[a+1].ranges[0].left+i[a+1].ranges[0].width;ac(c-m)<s?u.bottom=2:m<c&&c<_&&(u.bottom=1),ac(d-_)<s?g.bottom=2:d<_&&(g.bottom=1)}else o&&(u.bottom=o.startStyle.bottom,g.bottom=o.endStyle.bottom);h.startStyle=u,h.endStyle=g}}_getVisibleRangesWithStyle(e,i,n){const s=(i.linesVisibleRangesForRange(e,!0)||[]).map(K9);return!this._visibleRangesHaveGaps(s)&&this._roundedSelection&&this._enrichVisibleRangesWithStyle(i.visibleRange,s,n),s}_createSelectionPiece(e,i,n,s,r){return'<div class="cslr '+n+'" style="top:'+e.toString()+"px;left:"+s.toString()+"px;width:"+r.toString()+"px;height:"+i+'px;"></div>'}_actualRenderOneSelection(e,i,n,s){if(s.length===0)return;const r=!!s[0].ranges[0].startStyle,o=this._lineHeight.toString(),a=(this._lineHeight-1).toString(),l=s[0].lineNumber,h=s[s.length-1].lineNumber;for(let c=0,d=s.length;c<d;c++){const u=s[c],g=u.lineNumber,m=g-i,_=n&&(g===h||g===l)?a:o,C=n&&g===l?1:0;let w="",v="";for(let b=0,y=u.ranges.length;b<y;b++){const k=u.ranges[b];if(r){const L=k.startStyle,x=k.endStyle;if(L.top===1||L.bottom===1){w+=this._createSelectionPiece(C,_,dt.SELECTION_CLASS_NAME,k.left-dt.ROUNDED_PIECE_WIDTH,dt.ROUNDED_PIECE_WIDTH);let E=dt.EDITOR_BACKGROUND_CLASS_NAME;L.top===1&&(E+=" "+dt.SELECTION_TOP_RIGHT),L.bottom===1&&(E+=" "+dt.SELECTION_BOTTOM_RIGHT),w+=this._createSelectionPiece(C,_,E,k.left-dt.ROUNDED_PIECE_WIDTH,dt.ROUNDED_PIECE_WIDTH)}if(x.top===1||x.bottom===1){w+=this._createSelectionPiece(C,_,dt.SELECTION_CLASS_NAME,k.left+k.width,dt.ROUNDED_PIECE_WIDTH);let E=dt.EDITOR_BACKGROUND_CLASS_NAME;x.top===1&&(E+=" "+dt.SELECTION_TOP_LEFT),x.bottom===1&&(E+=" "+dt.SELECTION_BOTTOM_LEFT),w+=this._createSelectionPiece(C,_,E,k.left+k.width,dt.ROUNDED_PIECE_WIDTH)}}let S=dt.SELECTION_CLASS_NAME;if(r){const L=k.startStyle,x=k.endStyle;L.top===0&&(S+=" "+dt.SELECTION_TOP_LEFT),L.bottom===0&&(S+=" "+dt.SELECTION_BOTTOM_LEFT),x.top===0&&(S+=" "+dt.SELECTION_TOP_RIGHT),x.bottom===0&&(S+=" "+dt.SELECTION_BOTTOM_RIGHT)}v+=this._createSelectionPiece(C,_,S,k.left,k.width)}e[m][0]+=w,e[m][1]+=v}}prepareRender(e){const i=[],n=e.visibleRange.startLineNumber,s=e.visibleRange.endLineNumber;for(let o=n;o<=s;o++){const a=o-n;i[a]=["",""]}const r=[];for(let o=0,a=this._selections.length;o<a;o++){const l=this._selections[o];if(l.isEmpty()){r[o]=null;continue}const h=this._getVisibleRangesWithStyle(l,e,this._previousFrameVisibleRangesWithStyle[o]);r[o]=h,this._actualRenderOneSelection(i,n,this._selections.length>1,h)}this._previousFrameVisibleRangesWithStyle=r,this._renderResult=i.map(([o,a])=>o+a)}render(e,i){if(!this._renderResult)return"";const n=i-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}};ur.SELECTION_CLASS_NAME="selected-text";ur.SELECTION_TOP_LEFT="top-left-radius";ur.SELECTION_BOTTOM_LEFT="bottom-left-radius";ur.SELECTION_TOP_RIGHT="top-right-radius";ur.SELECTION_BOTTOM_RIGHT="bottom-right-radius";ur.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background";ur.ROUNDED_PIECE_WIDTH=10;Yt((t,e)=>{const i=t.getColor(ca);i&&e.addRule(`.monaco-editor .focused .selected-text { background-color: ${i}; }`);const n=t.getColor(Fv);n&&e.addRule(`.monaco-editor .selected-text { background-color: ${n}; }`);const s=t.getColor(RR);
72s&&!s.isTransparent()&&e.addRule(`.monaco-editor .view-line span.inline-selected-text { color: ${s}; }`)});function ac(t){return t<0?-t:t}var xb=class{constructor(t,e,i,n,s,r){this.top=t,this.left=e,this.width=i,this.height=n,this.textContent=s,this.textContentClassName=r}},Ib=class{constructor(t){this._context=t;const e=this._context.configuration.options,i=e.get(44);this._cursorStyle=e.get(24),this._lineHeight=e.get(59),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(e.get(27),this._typicalHalfwidthCharacterWidth),this._isVisible=!0,this._domNode=de(document.createElement("div")),this._domNode.setClassName(`cursor ${Gr}`),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),Zt(this._domNode,i),this._domNode.setDisplay("none"),this._position=new A(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(t){const e=this._context.configuration.options,i=e.get(44);return this._cursorStyle=e.get(24),this._lineHeight=e.get(59),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(e.get(27),this._typicalHalfwidthCharacterWidth),Zt(this._domNode,i),!0}onCursorPositionChanged(t){return this._position=t,!0}_getGraphemeAwarePosition(){const{lineNumber:t,column:e}=this._position,i=this._context.viewModel.getLineContent(t),[n,s]=V4(i,e-1);return[new A(t,n+1),i.substring(n,s)]}_prepareRender(t){let e="";const[i,n]=this._getGraphemeAwarePosition();if(this._cursorStyle===ht.Line||this._cursorStyle===ht.LineThin){const d=t.visibleRangeForPosition(i);if(!d||d.outsideRenderedLine)return null;let u;this._cursorStyle===ht.Line?(u=WC(this._lineCursorWidth>0?this._lineCursorWidth:2),u>2&&(e=n)):u=WC(1);let g=d.left;u>=2&&g>=1&&(g-=1);const m=t.getVerticalOffsetForLineNumber(i.lineNumber)-t.bigNumbersDelta;return new xb(m,g,u,this._lineHeight,e,"")}const s=t.linesVisibleRangesForRange(new T(i.lineNumber,i.column,i.lineNumber,i.column+n.length),!1);if(!s||s.length===0)return null;const r=s[0];if(r.outsideRenderedLine||r.ranges.length===0)return null;const o=r.ranges[0],a=o.width<1?this._typicalHalfwidthCharacterWidth:o.width;let l="";if(this._cursorStyle===ht.Block){const d=this._context.viewModel.getViewLineData(i.lineNumber);e=n;const u=d.tokens.findTokenIndexAtOffset(i.column-1);l=d.tokens.getClassName(u)}let h=t.getVerticalOffsetForLineNumber(i.lineNumber)-t.bigNumbersDelta,c=this._lineHeight;return(this._cursorStyle===ht.Underline||this._cursorStyle===ht.UnderlineThin)&&(h+=this._lineHeight-2,c=2),new xb(h,o.left,a,c,e,l)}prepareRender(t){this._renderData=this._prepareRender(t)}render(t){return this._renderData?(this._lastRenderedContent!==this._renderData.textContent&&(this._lastRenderedContent=this._renderData.textContent,this._domNode.domNode.textContent=this._lastRenderedContent),this._domNode.setClassName(`cursor ${Gr} ${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}
72):(this._domNode.setDisplay("none"),null)}},Zk=class n_ extends Mi{constructor(e){super(e);const i=this._context.configuration.options;this._readOnly=i.get(81),this._cursorBlinking=i.get(22),this._cursorStyle=i.get(24),this._cursorSmoothCaretAnimation=i.get(23),this._selectionIsEmpty=!0,this._isComposingInput=!1,this._isVisible=!1,this._primaryCursor=new Ib(this._context),this._secondaryCursors=[],this._renderData=[],this._domNode=de(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 jn,this._cursorFlatBlinkInterval=new Rh,this._blinkingEnabled=!1,this._editorHasFocus=!1,this._updateBlinking()}dispose(){super.dispose(),this._startCursorBlinkAnimation.dispose(),this._cursorFlatBlinkInterval.dispose()}getDomNode(){return this._domNode}onCompositionStart(e){return this._isComposingInput=!0,this._updateBlinking(),!0}onCompositionEnd(e){return this._isComposingInput=!1,this._updateBlinking(),!0}onConfigurationChanged(e){const i=this._context.configuration.options;this._readOnly=i.get(81),this._cursorBlinking=i.get(22),this._cursorStyle=i.get(24),this._cursorSmoothCaretAnimation=i.get(23),this._updateBlinking(),this._updateDomClassName(),this._primaryCursor.onConfigurationChanged(e);for(let n=0,s=this._secondaryCursors.length;n<s;n++)this._secondaryCursors[n].onConfigurationChanged(e);return!0}_onCursorPositionChanged(e,i){if(this._primaryCursor.onCursorPositionChanged(e),this._updateBlinking(),this._secondaryCursors.length<i.length){const n=i.length-this._secondaryCursors.length;for(let s=0;s<n;s++){const r=new Ib(this._context);this._domNode.domNode.insertBefore(r.getDomNode().domNode,this._primaryCursor.getDomNode().domNode.nextSibling),this._secondaryCursors.push(r)}}else if(this._secondaryCursors.length>i.length){const n=this._secondaryCursors.length-i.length;for(let s=0;s<n;s++)this._domNode.removeChild(this._secondaryCursors[0].getDomNode()),this._secondaryCursors.splice(0,1)}for(let n=0;n<i.length;n++)this._secondaryCursors[n].onCursorPositionChanged(i[n])}onCursorStateChanged(e){const i=[];for(let s=0,r=e.selections.length;s<r;s++)i[s]=e.selections[s].getPosition();this._onCursorPositionChanged(i[0],i.slice(1));const n=e.selections[0].isEmpty();return this._selectionIsEmpty!==n&&(this._selectionIsEmpty=n,this._updateDomClassName()),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onFocusChanged(e){return this._editorHasFocus=e.isFocused,this._updateBlinking(),!1}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return!0}onTokensChanged(e){const i=n=>{for(let s=0,r=e.ranges.length;s<r;s++)if(e.ranges[s].fromLineNumber<=n.lineNumber&&n.lineNumber<=e.ranges[s].toLineNumber)return!0;return!1};if(i(this._primaryCursor.getPosition()))return!0;for(const n of this._secondaryCursors)if(i(n.getPosition()))return!0;return!1}onZonesChanged(e){return!0}_getCursorBlinking(){return this._isComposingInput||!this._editorHasFocus?0:this._readOnly?5:this._cursorBlinking}_updateBlinking(){this._startCursorBlinkAnimation.cancel(),this._cursorFlatBlinkInterval.cancel();const e=this._getCursorBlinking(),i=e===0,n=e===5;i?this._hide():this._show(),this._blinkingEnabled=!1,this._updateDomClassName(),!i&&!n&&(e===1?this._cursorFlatBlinkInterval.cancelAndSet(()=>{this._isVisible?this._hide():this._show()},n_.BLINK_INTERVAL):this._startCursorBlinkAnimation.setIfNotSet(()=>{this._blinkingEnabled=!0,this._updateDomClassName()},n_.BLINK_INTERVAL))}_updateDomClassName(){this._domNode.setClassName(this._getClassName())}_getClassName(){let e="cursors-layer";switch(this._selectionIsEmpty||(e+=" has-selection"),this._cursorStyle){case ht.Line:e+=" cursor-line-style";break;case ht.Block:e+=" cursor-block-style";break;case ht.Underline:e+=" cursor-underline-style";break;case ht.LineThin:e+=" cursor-line-thin-style";break;case ht.BlockOutline:e+=" cursor-block-outline-style";break;case ht.UnderlineThin:e+=" cursor-underline-thin-style";break;default:e+=" cursor-line-style"}if(this._blinkingEnabled)switch(this._getCursorBlinking()){case 1:e+=" cursor-blink";break;case 2:e+=" cursor-smooth";break;case 3:e+=" cursor-phase";break;case 4:e+=" cursor-expand";break;case 5:e+=" cursor-solid";break;default:e+=" cursor-solid"}else e+=" cursor-solid";return this._cursorSmoothCaretAnimation&&(e+=" cursor-smooth-caret-animation"),e}_show(){this._primaryCursor.show();for(let e=0,i=this._secondaryCursors.length;e<i;e++)this._secondaryCursors[e].show();this._isVisible=!0}_hide(){this._primaryCursor.hide();for(let e=0,i=this._secondaryCursors.length;e<i;e++)this._secondaryCursors[e].hide();this._isVisible=!1}prepareRender(e){this._primaryCursor.prepareRender(e);for(let i=0,n=this._secondaryCursors.length;i<n;i++)this._secondaryCursors[i].prepareRender(e)}render(e){const i=[];let n=0;const s=this._primaryCursor.render(e);s&&(i[n++]=s);for(let r=0,o=this._secondaryCursors.length;r<o;r++){const a=this._secondaryCursors[r].render(e);a&&(i[n++]=a)}this._renderData=i}getLastRenderData(){return this._renderData}};Zk.BLINK_INTERVAL=500;Yt((t,e)=>{const i=t.getColor(wk);if(i){let n=t.getColor(d7);n||(n=i.opposite()),e.addRule(`.monaco-editor .inputarea.ime-input { caret-color: ${i}; }`),e.addRule(`.monaco-editor .cursors-layer .cursor { background-color: ${i}; border-color: ${i}; color: ${n}; }`),t.type==="hc"&&e.addRule(`.monaco-editor .cursors-layer.has-selection .cursor { border-left: 1px solid ${n}; border-right: 1px solid ${n}; }`)}});var ig=()=>{throw new Error("Invalid change accessor")},j9=class extends Mi{constructor(t){super(t);const e=this._context.configuration.options,i=e.get(131);this._lineHeight=e.get(59),this._contentWidth=i.contentWidth,this._contentLeft=i.contentLeft,this.domNode=de(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=de(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={}}
vendor: 4,631 bytes, line 72
72_recomputeWhitespacesProps(){const t=this._context.viewLayout.getWhitespaces(),e=new Map;for(const n of t)e.set(n.id,n);let i=!1;return this._context.viewModel.changeWhitespace(n=>{const s=Object.keys(this._zones);for(let r=0,o=s.length;r<o;r++){const a=s[r],l=this._zones[a],h=this._computeWhitespaceProps(l.delegate);l.isInHiddenArea=h.isInHiddenArea;const c=e.get(a);c&&(c.afterLineNumber!==h.afterViewLineNumber||c.height!==h.heightInPx)&&(n.changeOneWhitespace(a,h.afterViewLineNumber,h.heightInPx),this._safeCallOnComputedHeight(l.delegate,h.heightInPx),i=!0)}}),i}onConfigurationChanged(t){const e=this._context.configuration.options,i=e.get(131);return this._lineHeight=e.get(59),this._contentWidth=i.contentWidth,this._contentLeft=i.contentLeft,t.hasChanged(59)&&this._recomputeWhitespacesProps(),!0}onLineMappingChanged(t){return this._recomputeWhitespacesProps()}onLinesDeleted(t){return!0}onScrollChanged(t){return t.scrollTopChanged||t.scrollWidthChanged}onZonesChanged(t){return!0}onLinesInserted(t){return!0}_getZoneOrdinal(t){return typeof t.afterColumn<"u"?t.afterColumn:1e4}_computeWhitespaceProps(t){if(t.afterLineNumber===0)return{isInHiddenArea:!1,afterViewLineNumber:0,heightInPx:this._heightInPixels(t),minWidthInPx:this._minWidthInPixels(t)};let e;if(typeof t.afterColumn<"u")e=this._context.viewModel.model.validatePosition({lineNumber:t.afterLineNumber,column:t.afterColumn});else{const r=this._context.viewModel.model.validatePosition({lineNumber:t.afterLineNumber,column:1}).lineNumber;e=new A(r,this._context.viewModel.model.getLineMaxColumn(r))}let i;e.column===this._context.viewModel.model.getLineMaxColumn(e.lineNumber)?i=this._context.viewModel.model.validatePosition({lineNumber:e.lineNumber+1,column:1}):i=this._context.viewModel.model.validatePosition({lineNumber:e.lineNumber,column:e.column+1});const n=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(e,t.afterColumnAffinity),s=this._context.viewModel.coordinatesConverter.modelPositionIsVisible(i);return{isInHiddenArea:!s,afterViewLineNumber:n.lineNumber,heightInPx:s?this._heightInPixels(t):0,minWidthInPx:this._minWidthInPixels(t)}}changeViewZones(t){let e=!1;return this._context.viewModel.changeWhitespace(i=>{const n={addZone:s=>(e=!0,this._addZone(i,s)),removeZone:s=>{s&&(e=this._removeZone(i,s)||e)},layoutZone:s=>{s&&(e=this._layoutZone(i,s)||e)}};q9(t,n),n.addZone=ig,n.removeZone=ig,n.layoutZone=ig}),e}_addZone(t,e){const i=this._computeWhitespaceProps(e),n={whitespaceId:t.insertWhitespace(i.afterViewLineNumber,this._getZoneOrdinal(e),i.heightInPx,i.minWidthInPx),delegate:e,isInHiddenArea:i.isInHiddenArea,isVisible:!1,domNode:de(e.domNode),marginDomNode:e.marginDomNode?de(e.marginDomNode):null};return this._safeCallOnComputedHeight(n.delegate,i.heightInPx),n.domNode.setPosition("absolute"),n.domNode.domNode.style.width="100%",n.domNode.setDisplay("none"),n.domNode.setAttribute("monaco-view-zone",n.whitespaceId),this.domNode.appendChild(n.domNode),n.marginDomNode&&(n.marginDomNode.setPosition("absolute"),n.marginDomNode.domNode.style.width="100%",n.marginDomNode.setDisplay("none"),n.marginDomNode.setAttribute("monaco-view-zone",n.whitespaceId),this.marginDomNode.appendChild(n.marginDomNode)),this._zones[n.whitespaceId]=n,this.setShouldRender(),n.whitespaceId}_removeZone(t,e){if(this._zones.hasOwnProperty(e)){const i=this._zones[e];return delete this._zones[e],t.removeWhitespace(i.whitespaceId),i.domNode.removeAttribute("monaco-visible-view-zone"),i.domNode.removeAttribute("monaco-view-zone"),i.domNode.domNode.parentNode.removeChild(i.domNode.domNode),i.marginDomNode&&(i.marginDomNode.removeAttribute("monaco-visible-view-zone"),i.marginDomNode.removeAttribute("monaco-view-zone"),i.marginDomNode.domNode.parentNode.removeChild(i.marginDomNode.domNode)),this.setShouldRender(),!0}return!1}_layoutZone(t,e){if(this._zones.hasOwnProperty(e)){const i=this._zones[e],n=this._computeWhitespaceProps(i.delegate);return i.isInHiddenArea=n.isInHiddenArea,t.changeOneWhitespace(i.whitespaceId,n.afterViewLineNumber,n.heightInPx),this._safeCallOnComputedHeight(i.delegate,n.heightInPx),this.setShouldRender(),!0}return!1}shouldSuppressMouseDownOnViewZone(t){return this._zones.hasOwnProperty(t)?!!this._zones[t].delegate.suppressMouseDown:!1}_heightInPixels(t){return typeof t.heightInPx=="number"?t.heightInPx:typeof t.heightInLines=="number"?this._lineHeight*t.heightInLines:this._lineHeight}_minWidthInPixels(t){return typeof t.minWidthInPx=="number"?t.minWidthInPx:0}_safeCallOnComputedHeight(t,e){if(typeof t.onComputedHeight=="function")try{t.onComputedHeight(e)}catch(i){We(i)}}
72_safeCallOnDomNodeTop(t,e){if(typeof t.onDomNodeTop=="function")try{t.onDomNodeTop(e)}catch(i){We(i)}}prepareRender(t){}render(t){const e=t.viewportData.whitespaceViewportData,i={};let n=!1;for(const r of e)this._zones[r.id].isInHiddenArea||(i[r.id]=r,n=!0);const s=Object.keys(this._zones);for(let r=0,o=s.length;r<o;r++){const a=s[r],l=this._zones[a];let h=0,c=0,d="none";i.hasOwnProperty(a)?(h=i[a].verticalOffset-t.bigNumbersDelta,c=i[a].height,d="block",l.isVisible||(l.domNode.setAttribute("monaco-visible-view-zone","true"),l.isVisible=!0),this._safeCallOnDomNodeTop(l.delegate,t.getScrolledTopFromAbsoluteTop(i[a].verticalOffset))):(l.isVisible&&(l.domNode.removeAttribute("monaco-visible-view-zone"),l.isVisible=!1),this._safeCallOnDomNodeTop(l.delegate,t.getScrolledTopFromAbsoluteTop(-1e6))),l.domNode.setTop(h),l.domNode.setHeight(c),l.domNode.setDisplay(d),l.marginDomNode&&(l.marginDomNode.setTop(h),l.marginDomNode.setHeight(c),l.marginDomNode.setDisplay(d))}n&&(this.domNode.setWidth(Math.max(t.scrollWidth,this._contentWidth)),this.marginDomNode.setWidth(this._contentLeft))}};function q9(t,e){try{return t(e)}catch(i){We(i)}}var G9=class{constructor(t){this._theme=t}get type(){return this._theme.type}get value(){return this._theme}update(t){this._theme=t}getColor(t){return this._theme.getColor(t)}},Z9=class{constructor(t,e,i){this.configuration=t,this.theme=new G9(e),this.viewModel=i,this.viewLayout=i.viewLayout}addEventHandler(t){this.viewModel.addViewEventHandler(t)}removeEventHandler(t){this.viewModel.removeViewEventHandler(t)}},Y9=class{constructor(t,e,i,n){this.selections=t,this.startLineNumber=e.startLineNumber|0,this.endLineNumber=e.endLineNumber|0,this.relativeVerticalOffset=e.relativeVerticalOffset,this.bigNumbersDelta=e.bigNumbersDelta|0,this.whitespaceViewportData=i,this._model=n,this.visibleRange=new T(e.startLineNumber,this._model.getLineMinColumn(e.startLineNumber),e.endLineNumber,this._model.getLineMaxColumn(e.endLineNumber))}getViewLineRenderingData(t){return this._model.getViewLineRenderingData(this.visibleRange,t)}getDecorationsInViewport(){return this._model.getDecorationsInViewport(this.visibleRange)}},X9=class extends Vh{constructor(t,e,i,n,s,r){super(),this._selections=[new xe(1,1,1,1)],this._renderAnimationFrame=null;const o=new j7(e,n,s,t);this._context=new Z9(e,i,n),this._context.addEventHandler(this),this._viewParts=[],this._textAreaHandler=new P7(this._context,o,this._createTextAreaHandlerHelper()),this._viewParts.push(this._textAreaHandler),this._linesContent=de(document.createElement("div")),this._linesContent.setClassName("lines-content monaco-editor-background"),this._linesContent.setPosition("absolute"),this.domNode=de(document.createElement("div")),this.domNode.setClassName(this._getEditorClassName()),this.domNode.setAttribute("role","code"),this._overflowGuardContainer=de(document.createElement("div")),Hn.write(this._overflowGuardContainer,3),this._overflowGuardContainer.setClassName("overflow-guard"),this._scrollbar=new m9(this._context,this._linesContent,this.domNode,this._overflowGuardContainer),this._viewParts.push(this._scrollbar),this._viewLines=new Kk(this._context,this._linesContent),this._viewZones=new j9(this._context),this._viewParts.push(this._viewZones);const a=new F9(this._context);this._viewParts.push(a);const l=new H9(this._context);this._viewParts.push(l);const h=new G7(this._context);this._viewParts.push(h),h.addDynamicOverlay(new Q7(this._context)),h.addDynamicOverlay(new ur(this._context)),h.addDynamicOverlay(new b9(this._context)),h.addDynamicOverlay(new e9(this._context));const c=new Z7(this._context);this._viewParts.push(c),c.addDynamicOverlay(new J7(this._context)),c.addDynamicOverlay(new p9(this._context)),c.addDynamicOverlay(new k9(this._context)),c.addDynamicOverlay(new L9(this._context)),c.addDynamicOverlay(new Hv(this._context));const d=new rf(this._context);d.getDomNode().appendChild(this._viewZones.marginDomNode),d.getDomNode().appendChild(c.getDomNode()),this._viewParts.push(d),this._contentWidgets=new Y7(this._context,this.domNode),this._viewParts.push(this._contentWidgets),this._viewCursors=new Zk(this._context),this._viewParts.push(this._viewCursors),this._overlayWidgets=new O9(this._context),this._viewParts.push(this._overlayWidgets);const u=new W9(this._context);this._viewParts.push(u);const g=new R9(this._context);if(this._viewParts.push(g),a){const m=this._scrollbar.getOverviewRulerLayoutInfo();m.parent.insertBefore(a.getDomNode(),m.insertBefore)}this._linesContent.appendChild(h.getDomNode()),this._linesContent.appendChild(u.dom
72Node),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(d.getDomNode()),this._overflowGuardContainer.appendChild(this._scrollbar.getDomNode()),this._overflowGuardContainer.appendChild(l.getDomNode()),this._overflowGuardContainer.appendChild(this._textAreaHandler.textArea),this._overflowGuardContainer.appendChild(this._textAreaHandler.textAreaCover),this._overflowGuardContainer.appendChild(this._overlayWidgets.getDomNode()),this._overflowGuardContainer.appendChild(g.getDomNode()),this.domNode.appendChild(this._overflowGuardContainer),r?r.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode.domNode):this.domNode.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode),this._applyLayout(),this._pointerHandler=this._register(new r7(this._context,o,this._createPointerHandlerHelper()))}_flushAccumulatedAndRenderNow(){this._renderNow()}_createPointerHandlerHelper(){return{viewDomNode:this.domNode.domNode,linesContentDomNode:this._linesContent.domNode,focusTextArea:()=>{this.focus()},dispatchTextAreaEvent:t=>{this._textAreaHandler.textArea.domNode.dispatchEvent(t)},getLastRenderData:()=>{const t=this._viewCursors.getLastRenderData()||[],e=this._textAreaHandler.getLastRenderData();return new qA(t,e)},shouldSuppressMouseDownOnViewZone:t=>this._viewZones.shouldSuppressMouseDownOnViewZone(t),shouldSuppressMouseDownOnWidget:t=>this._contentWidgets.shouldSuppressMouseDownOnWidget(t),getPositionFromDOMInfo:(t,e)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getPositionFromDOMInfo(t,e)),visibleRangeForPosition:(t,e)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(new A(t,e))),getLineWidth:t=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getLineWidth(t))}}_createTextAreaHandlerHelper(){return{visibleRangeForPosition:t=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(t))}}_applyLayout(){const t=this._context.configuration.options.get(131);this.domNode.setWidth(t.width),this.domNode.setHeight(t.height),this._overflowGuardContainer.setWidth(t.width),this._overflowGuardContainer.setHeight(t.height),this._linesContent.setWidth(1e6),this._linesContent.setHeight(1e6)}_getEditorClassName(){const t=this._textAreaHandler.isFocused()?" focused":"";return this._context.configuration.options.get(128)+" "+nu(this._context.theme.type)+t}handleEvents(t){super.handleEvents(t),this._scheduleRender()}onConfigurationChanged(t){return this.domNode.setClassName(this._getEditorClassName()),this._applyLayout(),!1}onCursorStateChanged(t){return this._selections=t.selections,!1}onFocusChanged(t){return this.domNode.setClassName(this._getEditorClassName()),!1}onThemeChanged(t){return this._context.theme.update(t.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 t of this._viewParts)t.dispose();super.dispose()}_scheduleRender(){this._renderAnimationFrame===null&&(this._renderAnimationFrame=UL(this._onRenderScheduled.bind(this),100))}_onRenderScheduled(){this._renderAnimationFrame=null,this._flushAccumulatedAndRenderNow()}_renderNow(){Q9(()=>this._actualRender())}_getViewPartsToRender(){const t=[];let e=0;for(const i of this._viewParts)i.shouldRender()&&(t[e++]=i);return t}_actualRender(){if(!Ev(this.domNode.domNode))return;let t=this._getViewPartsToRender();if(!this._viewLines.shouldRender()&&t.length===0)return;const e=this._context.viewLayout.getLinesViewportData();this._context.viewModel.setViewport(e.startLineNumber,e.endLineNumber,e.centeredLineNumber);const i=new Y9(this._selections,e,this._context.viewLayout.getWhitespaceViewportData(),this._context.viewModel);this._contentWidgets.shouldRender()&&this._contentWidgets.onBeforeRender(i),this._viewLines.shouldRender()&&(this._viewLines.renderText(i),this._viewLines.onDidRender(),t=this._getViewPartsToRender());const n=new VA(this._context.viewLayout,i,this._viewLines);for(const s of t)s.prepareRender(n);for(const s of t)s.render(n),s.onDidRender()}delegateVerticalScrollbarMouseDown(t){this._scrollbar.delegateVerticalScrollbarMouseDown(t)}restoreState(t){this._context.viewModel.viewLayout.setScrollPosition({scrollTop:t.scrollTop},1),this._context.viewModel.tokenizeViewport(),this._renderNow(),this._viewLines.updateLineWidths(),this._context.viewModel.viewLayout.setScrollPosition({scrollLeft:t.scrollLeft},1)}getOffsetForColumn(t,e){const i=this._context.viewModel.model.validatePosition({lineNumber:t,column:e}),n=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(i);this._flushAccumulatedAndRenderNow();const s=this._viewLines.visibleRangeForPosition(new A(n.lineNumber,n.column));return s?s.left:-1}
72getTargetAtClientPoint(t,e){const i=this._pointerHandler.getTargetAtClientPoint(t,e);return i?Ok.convertViewToModelMouseTarget(i,this._context.viewModel.coordinatesConverter):null}createOverviewRuler(t){return new V9(this._context,t)}change(t){this._viewZones.changeViewZones(t),this._scheduleRender()}render(t,e){if(e){this._viewLines.forceShouldRender();for(const i of this._viewParts)i.forceShouldRender()}t?this._flushAccumulatedAndRenderNow():this._scheduleRender()}focus(){this._textAreaHandler.focusTextArea()}isFocused(){return this._textAreaHandler.isFocused()}setAriaOptions(t){this._textAreaHandler.setAriaOptions(t)}addContentWidget(t){this._contentWidgets.addWidget(t.widget),this.layoutContentWidget(t),this._scheduleRender()}layoutContentWidget(t){let e=t.position&&t.position.range||null;if(e===null){const n=t.position?t.position.position:null;n!==null&&(e=new T(n.lineNumber,n.column,n.lineNumber,n.column))}const i=t.position?t.position.preference:null;this._contentWidgets.setWidgetPosition(t.widget,e,i),this._scheduleRender()}removeContentWidget(t){this._contentWidgets.removeWidget(t.widget),this._scheduleRender()}addOverlayWidget(t){this._overlayWidgets.addWidget(t.widget),this.layoutOverlayWidget(t),this._scheduleRender()}layoutOverlayWidget(t){const e=t.position?t.position.preference:null;this._overlayWidgets.setWidgetPosition(t.widget,e)&&this._scheduleRender()}removeOverlayWidget(t){this._overlayWidgets.removeWidget(t.widget),this._scheduleRender()}};function Q9(t){try{return t()}catch(e){We(e)}}var Eb=class Yk{constructor(e){this._selTrackedRange=null,this._trackSelection=!0,this._setState(e,new Ft(new T(1,1,1,1),0,new A(1,1),0),new Ft(new T(1,1,1,1),0,new A(1,1),0))}dispose(e){this._removeTrackedRange(e)}startTrackingSelection(e){this._trackSelection=!0,this._updateTrackedRange(e)}stopTrackingSelection(e){this._trackSelection=!1,this._removeTrackedRange(e)}_updateTrackedRange(e){this._trackSelection&&(this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,this.modelState.selection,0))}_removeTrackedRange(e){this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,null,0)}asCursorState(){return new re(this.modelState,this.viewState)}readSelectionFromMarkers(e){const i=e.model._getTrackedRange(this._selTrackedRange);return xe.fromRange(i,this.modelState.selection.getDirection())}ensureValidState(e){this._setState(e,this.modelState,this.viewState)}setState(e,i,n){this._setState(e,i,n)}static _validatePositionWithCache(e,i,n,s){return i.equals(n)?s:e.normalizePosition(i,2)}static _validateViewState(e,i){const n=i.position,s=i.selectionStart.getStartPosition(),r=i.selectionStart.getEndPosition(),o=e.normalizePosition(n,2),a=this._validatePositionWithCache(e,s,n,o),l=this._val
vendor: 4,800 bytes, line 72
72idatePositionWithCache(e,r,s,a);return n.equals(o)&&s.equals(a)&&r.equals(l)?i:new Ft(T.fromPositions(a,l),i.selectionStartLeftoverVisibleColumns+s.column-a.column,o,i.leftoverVisibleColumns+n.column-o.column)}_setState(e,i,n){if(n&&(n=Yk._validateViewState(e.viewModel,n)),i){const s=e.model.validateRange(i.selectionStart),r=i.selectionStart.equalsRange(s)?i.selectionStartLeftoverVisibleColumns:0,o=e.model.validatePosition(i.position),a=i.position.equals(o)?i.leftoverVisibleColumns:0;i=new Ft(s,r,o,a)}else{if(!n)return;const s=e.model.validateRange(e.coordinatesConverter.convertViewRangeToModelRange(n.selectionStart)),r=e.model.validatePosition(e.coordinatesConverter.convertViewPositionToModelPosition(n.position));i=new Ft(s,n.selectionStartLeftoverVisibleColumns,r,n.leftoverVisibleColumns)}if(n){const s=e.coordinatesConverter.validateViewRange(n.selectionStart,i.selectionStart),r=e.coordinatesConverter.validateViewPosition(n.position,i.position);n=new Ft(s,i.selectionStartLeftoverVisibleColumns,r,i.leftoverVisibleColumns)}else{const s=e.coordinatesConverter.convertModelPositionToViewPosition(new A(i.selectionStart.startLineNumber,i.selectionStart.startColumn)),r=e.coordinatesConverter.convertModelPositionToViewPosition(new A(i.selectionStart.endLineNumber,i.selectionStart.endColumn)),o=new T(s.lineNumber,s.column,r.lineNumber,r.column),a=e.coordinatesConverter.convertModelPositionToViewPosition(i.position);n=new Ft(o,i.selectionStartLeftoverVisibleColumns,a,i.leftoverVisibleColumns)}this.modelState=i,this.viewState=n,this._updateTrackedRange(e)}},Db=class{constructor(t){this.context=t,this.cursors=[new Eb(t)],this.lastAddedCursorIndex=0}dispose(){for(const t of this.cursors)t.dispose(this.context)}startTrackingSelections(){for(const t of this.cursors)t.startTrackingSelection(this.context)}stopTrackingSelections(){for(const t of this.cursors)t.stopTrackingSelection(this.context)}updateContext(t){this.context=t}ensureValidState(){for(const t of this.cursors)t.ensureValidState(this.context)}readSelectionFromMarkers(){return this.cursors.map(t=>t.readSelectionFromMarkers(this.context))}getAll(){return this.cursors.map(t=>t.asCursorState())}getViewPositions(){return this.cursors.map(t=>t.viewState.position)}getTopMostViewPosition(){return iN(this.cursors,wf(t=>t.viewState.position,A.compare)).viewState.position}getBottomMostViewPosition(){return tN(this.cursors,wf(t=>t.viewState.position,A.compare)).viewState.position}getSelections(){return this.cursors.map(t=>t.modelState.selection)}getViewSelections(){return this.cursors.map(t=>t.viewState.selection)}setSelections(t){this.setStates(re.fromModelSelections(t))}getPrimaryCursor(){return this.cursors[0].asCursorState()}setStates(t){t!==null&&(this.cursors[0].setState(this.context,t[0].modelState,t[0].viewState),this._setSecondaryStates(t.slice(1)))}_setSecondaryStates(t){const e=this.cursors.length-1,i=t.length;if(e<i){const n=i-e;for(let s=0;s<n;s++)this._addSecondaryCursor()}else if(e>i){const n=e-i;for(let s=0;s<n;s++)this._removeSecondaryCursor(this.cursors.length-2)}for(let n=0;n<i;n++)this.cursors[n+1].setState(this.context,t[n].modelState,t[n].viewState)}killSecondaryCursors(){this._setSecondaryStates([])}_addSecondaryCursor(){this.cursors.push(new Eb(this.context)),this.lastAddedCursorIndex=this.cursors.length-1}getLastAddedCursorIndex(){return this.cursors.length===1||this.lastAddedCursorIndex===0?0:this.lastAddedCursorIndex}_removeSecondaryCursor(t){this.lastAddedCursorIndex>=t+1&&this.lastAddedCursorIndex--,this.cursors[t+1].dispose(this.context),this.cursors.splice(t+1,1)}normalize(){if(this.cursors.length===1)return;const t=this.cursors.slice(0),e=[];for(let i=0,n=t.length;i<n;i++)e.push({index:i,selection:t[i].modelState.selection});e.sort(wf(i=>i.selection,T.compareRangesUsingStarts));for(let i=0;i<e.length-1;i++){const n=e[i],s=e[i+1],r=n.selection,o=s.selection;if(!this.context.cursorConfig.multiCursorMergeOverlapping)continue;let a;if(o.isEmpty()||r.isEmpty()?a=o.getStartPosition().isBeforeOrEqual(r.getEndPosition()):a=o.getStartPosition().isBefore(r.getEndPosition()),a){const l=n.index<s.index?i:i+1,h=n.index<s.index?i+1:i,c=e[h].index,d=e[l].index,u=e[h].selection,g=e[l].selection;if(!u.equalsSelection(g)){const m=u.plusRange(g),_=u.selectionStartLineNumber===u.startLineNumber&&u.selectionStartColumn===u.startColumn,C=g.selectionStartLineNumber===g.startLineNumber&&g.selectionStartColumn===g.startColumn;let w;c===this.lastAddedCursorIndex?(w=_,this.lastAddedCursorIndex=d):w=C;let v;w?v=new xe(m.startLineNumber,m.startColumn,m.endLineNumber,m.endColumn):v=new xe(m.endLineNumber,m.endColumn,m.startLineNumber,m.startColumn),e[l].selection=v;const b=re.fromModelSelection(v);t[d].setState(this.context,b.modelState,b.viewState)}for(const m of e)m.index>
72c&&m.index--;t.splice(c,1),e.splice(h,1),this._removeSecondaryCursor(c-1),i--}}}},Nb=class{constructor(t,e,i,n){this._cursorContextBrand=void 0,this.model=t,this.viewModel=e,this.coordinatesConverter=i,this.cursorConfig=n}},J9=class{constructor(){this.changeType=1}},sr=class s_{constructor(e,i,n,s,r){this.ownerId=e,this.lineNumber=i,this.column=n,this.options=s,this.order=r}static applyInjectedText(e,i){if(!i||i.length===0)return e;let n="",s=0;for(const r of i)n+=e.substring(s,r.column-1),s=r.column-1,n+=r.options.content;return n+=e.substring(s),n}static fromDecorations(e){const i=[];for(const n of e)n.options.before&&n.options.before.content.length>0&&i.push(new s_(n.ownerId,n.range.startLineNumber,n.range.startColumn,n.options.before,0)),n.options.after&&n.options.after.content.length>0&&i.push(new s_(n.ownerId,n.range.endLineNumber,n.range.endColumn,n.options.after,1));return i.sort((n,s)=>n.lineNumber===s.lineNumber?n.column===s.column?n.order-s.order:n.column-s.column:n.lineNumber-s.lineNumber),i}},Tb=class{constructor(t,e,i){this.changeType=2,this.lineNumber=t,this.detail=e,this.injectedText=i}},eO=class{constructor(t,e){this.changeType=3,this.fromLineNumber=t,this.toLineNumber=e}},tO=class{constructor(t,e,i,n){this.changeType=4,this.injectedTexts=n,this.fromLineNumber=t,this.toLineNumber=e,this.detail=i}},iO=class{constructor(){this.changeType=5}},jl=class Xk{constructor(e,i,n,s){this.changes=e,this.versionId=i,this.isUndoing=n,this.isRedoing=s,this.resultingSelection=null}containsEvent(e){for(let i=0,n=this.changes.length;i<n;i++)if(this.changes[i].changeType===e)return!0;return!1}static merge(e,i){const n=[].concat(e.changes).concat(i.changes),s=i.versionId,r=e.isUndoing||i.isUndoing,o=e.isRedoing||i.isRedoing;return new Xk(n,s,r,o)}},Qk=class{constructor(t){this.changes=t}},nO=class r_{constructor(e,i){this.rawContentChangedEvent=e,this.contentChangedEvent=i}merge(e){const i=jl.merge(this.rawContentChangedEvent,e.rawContentChangedEvent),n=r_._mergeChangeEvents(this.contentChangedEvent,e.contentChangedEvent);return new r_(i,n)}static _mergeChangeEvents(e,i){return{changes:[].concat(e.changes).concat(i.changes),eol:i.eol,versionId:i.versionId,isUndoing:e.isUndoing||i.isUndoing,isRedoing:e.isRedoing||i.isRedoing,isFlush:e.isFlush||i.isFlush}}},sO=class{constructor(){this.type=0}},rO=class{constructor(){this.type=1}},oO=class{constructor(t){this.type=2,this._source=t}hasChanged(t){return this._source.hasChanged(t)}},aO=class{constructor(t,e){this.type=3,this.selections=t,this.modelSelections=e}},Eo=class{constructor(t){this.type=4,t?(this.affectsMinimap=t.affectsMinimap,this.affectsOverviewRuler=t.affectsOverviewRuler):(this.affectsMinimap=!0,this.affectsOverviewRuler=!0)}},lc=class{constructor(){this.type=5}},lO=class{constructor(t){this.type=6,this.isFocused=t}},hO=class{constructor(){this.type=7}},hc=class{constructor(){this.type=8}},Jk=class{constructor(t,e){this.type=9,this.fromLineNumber=t,this.toLineNumber=e}},o_=class{constructor(t,e){this.type=10,this.fromLineNumber=t,this.toLineNumber=e}},a_=class{constructor(t,e){this.type=11,this.fromLineNumber=t,this.toLineNumber=e}},ud=class{constructor(t,e,i,n,s,r,o){this.source=t,this.minimalReveal=e,this.range=i,this.selections=n,this.verticalType=s,this.revealHorizontal=r,this.scrollType=o,this.type=12}},cO=class{constructor(t){this.type=13,this.scrollWidth=t.scrollWidth,this.scrollLeft=t.scrollLeft,this.scrollHeight=t.scrollHeight,this.scrollTop=t.scrollTop,this.scrollWidthChanged=t.scrollWidthChanged,this.scrollLeftChanged=t.scrollLeftChanged,this.scrollHeightChanged=t.scrollHeightChanged,this.scrollTopChanged=t.scrollTopChanged}},dO=class{constructor(t){this.theme=t,this.type=14}},uO=class{constructor(t){this.type=15,this.ranges=t}},fO=class{constructor(){this.type=16}},gO=class{constructor(){this.type=17}},mO=class extends V{constructor(){super(),this._onEvent=this._register(new M),this.onEvent=this._onEvent.event,this._eventHandlers=[],this._viewEventQueue=null,this._isConsumingViewEventQueue=!1,this._collector=null,this._collectorCnt=0,this._outgoingEvents=[]}emitOutgoingEvent(t){this._addOutgoingEvent(t),this._emitOutgoingEvents()}_addOutgoingEvent(t){for(let e=0,i=this._outgoingEvents.length;e<i;e++)if(this._outgoingEvents[e].kind===t.kind){this._outgoingEvents[e]=this._outgoingEvents[e].merge
72(t);return}this._outgoingEvents.push(t)}_emitOutgoingEvents(){for(;this._outgoingEvents.length>0;){if(this._collector||this._isConsumingViewEventQueue)return;const t=this._outgoingEvents.shift();t.isNoOp()||this._onEvent.fire(t)}}addViewEventHandler(t){for(let e=0,i=this._eventHandlers.length;e<i;e++)this._eventHandlers[e];this._eventHandlers.push(t)}removeViewEventHandler(t){for(let e=0;e<this._eventHandlers.length;e++)if(this._eventHandlers[e]===t){this._eventHandlers.splice(e,1);break}}beginEmitViewEvents(){return this._collectorCnt++,this._collectorCnt===1&&(this._collector=new pO),this._collector}endEmitViewEvents(){if(this._collectorCnt--,this._collectorCnt===0){const t=this._collector.outgoingEvents,e=this._collector.viewEvents;this._collector=null;for(const i of t)this._addOutgoingEvent(i);e.length>0&&this._emitMany(e)}this._emitOutgoingEvents()}emitSingleViewEvent(t){try{this.beginEmitViewEvents().emitViewEvent(t)}finally{this.endEmitViewEvents()}}_emitMany(t){this._viewEventQueue?this._viewEventQueue=this._viewEventQueue.concat(t):this._viewEventQueue=t,this._isConsumingViewEventQueue||this._consumeViewEventQueue()}_consumeViewEventQueue(){try{this._isConsumingViewEventQueue=!0,this._doConsumeQueue()}finally{this._isConsumingViewEventQueue=!1}}_doConsumeQueue(){for(;this._viewEventQueue;){const t=this._viewEventQueue;this._viewEventQueue=null;const e=this._eventHandlers.slice(0);for(const i of e)i.handleEvents(t)}}},pO=class{constructor(){this.viewEvents=[],this.outgoingEvents=[]}emitViewEvent(t){this.viewEvents.push(t)}emitOutgoingEvent(t){this.outgoingEvents.push(t)}},_O=class ex{constructor(e,i,n,s){this.kind=0,this._oldContentWidth=e,this._oldContentHeight=i,this.contentWidth=n,this.contentHeight=s,this.contentWidthChanged=this._oldContentWidth!==this.contentWidth,this.contentHeightChanged=this._oldContentHeight!==this.contentHeight}isNoOp(){return!this.contentWidthChanged&&!this.contentHeightChanged}merge(e){return e.kind!==0?this:new ex(this._oldContentWidth,this._oldContentHeight,e.contentWidth,e.contentHeight)}},vO=class tx{constructor(e,i){this.kind=1,this.oldHasFocus=e,this.hasFocus=i}isNoOp(){return this.oldHasFocus===this.hasFocus}merge(e){return e.kind!==1?this:new tx(this.oldHasFocus,e.hasFocus)}},CO=class ix{constructor(e,i,n,s,r,o,a,l){this.kind=2,this._oldScrollWidth=e,this._oldScrollLeft=i,this._oldScrollHeight=n,this._oldScrollTop=s,this.scrollWidth=r,this.scrollLeft=o,this.scrollHeight=a,this.scrollTop=l,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}merge(e){return e.kind!==2?this:new ix(this._oldScrollWidth,this._oldScrollLeft,this._oldScrollHeight,this._oldScrollTop,e.scrollWidth,e.scrollLeft,e.scrollHeight,e.scrollTop)}},Mb=class{constructor(){this.kind=3}isNoOp(){return!1}merge(t){return this}},bO=class l_{constructor(e,i,n,s,r,o,a){this.kind=6,this.oldSelections=e,this.selections=i,this.oldModelVersionId=n,this.modelVersionId=s,this.source=r,this.reason=o,this.reachedMaxCursorCount=a}static _selectionsAreEqual(e,i){if(!e&&!i)return!0;if(!e||!i)return!1;const n=e.length;if(n!==i.length)return!1;for(let s=0;s<n;s++)if(!e[s].equalsSelection(i[s]))return!1;return!0}isNoOp(){return l_._selectionsAreEqual(this.oldSelections,this.selections)&&this.oldModelVersionId===this.modelVersionId}merge(e){return e.kind!==6?this:new l_(this.oldSelections,e.selections,this.oldModelVersionId,e.modelVersionId,e.source,e.reason,this.reachedMaxCursorCount||e.reachedMaxCursorCount)}},wO=class{constructor(){this.kind=5}isNoOp(){return!1}merge(t){return this}},qv=class h_ extends V{constructor(e,i,n,s){super(),this._model=e,this._knownModelVersionId=this._model.getVersionId(),this._viewModel=i,this._coordinatesConverter=n,this.context=new Nb(this._model,this._viewModel,this._coordinatesConverter,s),this._cursors=new Db(this.context),this._hasFocus=!1,this._isHandling=!1,this._isDoingComposition=!1,this._selectionsWhenCompositionStarted=null,this._columnSelectData=null,this._autoClosedActions=[],this._prevEditOperationType=0}dispose(){this._cursors.dispose(),this._autoClosedActions=De(this._autoClosedActions),super.dispose()}updateConfiguration(e){this.context=new Nb(this._model,this._viewModel,this._coordinatesConverter,e),this._cursors.updateContext(this.context)}onLineMappingChanged(e){this._knownModelVersionId===this._model.getVersionId()&&this.setStates(e,"viewModel",0,this.getCursorStates())}setHasFocus(e){this._hasFocus=e}_validateAutoClosedActions(){if(this._autoClosedActions.length>0){const e=this._cursors.getSelections();for(let i=0;i<this._autoClosedActions.length;i++){const n=this._autoClosedActions[i];n.isValid(e)||(n.dispose(),this._autoClosedActions.splice(i,1),i--)}}}getPrimaryCursorState(){return this._cursors.getPrimaryCursor()}getLastAddedCursorIndex(){return this._cursors.getLastAddedCursorIndex()}getCursorStates(){return this._cursors.getAll()}setStates(e,i,n,s){let r=!1;s!==null&&s.length>h_.MAX_CURSOR_COUNT&&(s=s.slice(0,h_.MAX_CURSOR_COUNT),r=!0);const o=ng.from(this._model,this);return this._cursors.setStates(s),this._cursors.normalize(),this._columnSelectData=null,this._val
vendor: 5,845 bytes, lines 72-73
72idateAutoClosedActions(),this._emitStateChangedIfNecessary(e,i,n,o,r)}setCursorColumnSelectData(e){this._columnSelectData=e}revealPrimary(e,i,n,s,r,o){const a=this._cursors.getViewPositions();let l=null,h=null;a.length>1?h=this._cursors.getViewSelections():l=T.fromPositions(a[0],a[0]),e.emitViewEvent(new ud(i,n,l,h,s,r,o))}saveState(){const e=[],i=this._cursors.getSelections();for(let n=0,s=i.length;n<s;n++){const r=i[n];e.push({inSelectionMode:!r.isEmpty(),selectionStart:{lineNumber:r.selectionStartLineNumber,column:r.selectionStartColumn},position:{lineNumber:r.positionLineNumber,column:r.positionColumn}})}return e}restoreState(e,i){const n=[];for(let s=0,r=i.length;s<r;s++){const o=i[s];let a=1,l=1;o.position&&o.position.lineNumber&&(a=o.position.lineNumber),o.position&&o.position.column&&(l=o.position.column);let h=a,c=l;o.selectionStart&&o.selectionStart.lineNumber&&(h=o.selectionStart.lineNumber),o.selectionStart&&o.selectionStart.column&&(c=o.selectionStart.column),n.push({selectionStartLineNumber:h,selectionStartColumn:c,positionLineNumber:a,positionColumn:l})}this.setStates(e,"restoreState",0,re.fromModelSelections(n)),this.revealPrimary(e,"restoreState",!1,0,!0,1)}onModelContentChanged(e,i){if(i instanceof Qk){if(this._isHandling)return;this._isHandling=!0;try{this.setStates(e,"modelChange",0,this.getCursorStates())}finally{this._isHandling=!1}}else{if(this._knownModelVersionId=i.versionId,this._isHandling)return;const n=i.containsEvent(1);if(this._prevEditOperationType=0,n)this._cursors.dispose(),this._cursors=new Db(this.context),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(e,"model",1,null,!1);else if(this._hasFocus&&i.resultingSelection&&i.resultingSelection.length>0){const s=re.fromModelSelections(i.resultingSelection);this.setStates(e,"modelChange",i.isUndoing?5:i.isRedoing?6:2,s)&&this.revealPrimary(e,"modelChange",!1,0,!0,0)}else{const s=this._cursors.readSelectionFromMarkers();this.setStates(e,"modelChange",2,re.fromModelSelections(s))}}}getSelection(){return this._cursors.getPrimaryCursor().modelState.selection}getTopMostViewPosition(){return this._cursors.getTopMostViewPosition()}getBottomMostViewPosition(){return this._cursors.getBottomMostViewPosition()}getCursorColumnSelectData(){if(this._columnSelectData)return this._columnSelectData;const e=this._cursors.getPrimaryCursor(),i=e.viewState.selectionStart.getStartPosition(),n=e.viewState.position;return{isReal:!1,fromViewLineNumber:i.lineNumber,fromViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,i),toViewLineNumber:n.lineNumber,toViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,n)}}getSelections(){return this._cursors.getSelections()}setSelections(e,i,n,s){this.setStates(e,i,s,re.fromModelSelections(n))}getPrevEditOperationType(){return this._prevEditOperationType}setPrevEditOperationType(e){this._prevEditOperationType=e}_pushAutoClosedAction(e,i){const n=[],s=[];for(let a=0,l=e.length;a<l;a++)n.push({range:e[a],options:{description:"auto-closed-character",inlineClassName:"auto-closed-character",stickiness:1}}),s.push({range:i[a],options:{description:"auto-closed-enclosing",stickiness:1}});const r=this._model.deltaDecorations([],n),o=this._model.deltaDecorations([],s);this._autoClosedActions.push(new Rb(this._model,r,o))}_executeEditOperation(e){if(!e)return;e.shouldPushStackElementBefore&&this._model.pushStackElement();const i=SO.executeCommands(this._model,this._cursors.getSelections(),e.commands);if(i){this._interpretCommandResult(i);const n=[],s=[];for(let r=0;r<e.commands.length;r++){const o=e.commands[r];o instanceof Ak&&o.enclosingRange&&o.closeCharacterRange&&(n.push(o.closeCharacterRange),s.push(o.enclosingRange))}n.length>0&&this._pushAutoClosedAction(n,s),this._prevEditOperationType=e.type}e.shouldPushStackElementAfter&&this._model.pushStackElement()}_interpretCommandResult(e){(!e||e.length===0)&&(e=this._cursors.readSelectionFromMarkers()),this._columnSelectData=null,this._cursors.setSelections(e),this._cursors.normalize()}_emitStateChangedIfNecessary(e,i,n,s,r){const o=ng.from(this._model,this);if(o.equals(s))return!1;const a=this._cursors.getSelections(),l=this._cursors.getViewSelections();if(e.emitViewEvent(new aO(l,a)),!s||s.cursorState.length!==o.cursorState.length||o.cursorState.some((h,c)=>!h.modelState.equals(s.cursorState[c].modelState))){const h=s?s.cursorState.map(d=>d.modelState.selection):null,c=s?s.modelVersionId:0;e.emitOutgoingEvent(new bO(h,a,c,o.modelVersionId,i||"keyboard",n,r))}return!0}_findAutoClosingPairs(e){if(!e.length)return null;const i=[];for(let n=0,s=e.length;n<s;n++){const r=e[n];if(!r.text||r.text.indexOf(`
73`)>=0)return null;const o=r.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/);if(!o)return null;const a=o[1],l=this.context.cursorConfig.autoClosingPairs.autoClosingPairsCloseSingleChar.get(a);if(!l||l.length!==1)return null;const h=l[0].open,c=r.text.length-o[2].length-1,d=r.text.lastIndexOf(h,c-1);if(d===-1)return null;i.push([d,c])}return i}executeEdits(e,i,n,s){let r=null;i==="snippet"&&(r=this._findAutoClosingPairs(n)),r&&(n[0]._isTracked=!0);const o=[],a=[],l=this._model.pushEditOperations(this.getSelections(),n,h=>{if(r)for(let d=0,u=r.length;d<u;d++){const[g,m]=r[d],_=h[d],C=_.range.startLineNumber,w=_.range.startColumn-1+g,v=_.range.startColumn-1+m;o.push(new T(C,v+1,C,v+2)),a.push(new T(C,w+1,C,v+2))}const c=s(h);return c&&(this._isHandling=!0),c});l&&(this._isHandling=!1,this.setSelections(e,i,l,0)),o.length>0&&this._pushAutoClosedAction(o,a)}_executeEdit(e,i,n,s=0){if(this.context.cursorConfig.readOnly)return;const r=ng.from(this._model,this);this._cursors.stopTrackingSelections(),this._isHandling=!0;try{this._cursors.ensureValidState(),e()}catch(o){We(o)}this._isHandling=!1,this._cursors.startTrackingSelections(),this._val
73idateAutoClosedActions(),this._emitStateChangedIfNecessary(i,n,s,r,!1)&&this.revealPrimary(i,n,!1,0,!0,0)}setIsDoingComposition(e){this._isDoingComposition=e}getAutoClosedCharacters(){return Rb.getAllAutoClosedCharacters(this._autoClosedActions)}startComposition(e){this._selectionsWhenCompositionStarted=this.getSelections().slice(0)}endComposition(e,i){this._executeEdit(()=>{i==="keyboard"&&(this._executeEditOperation(Ws.compositionEndWithInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,this._selectionsWhenCompositionStarted,this.getSelections(),this.getAutoClosedCharacters())),this._selectionsWhenCompositionStarted=null)},e,i)}type(e,i,n){this._executeEdit(()=>{if(n==="keyboard"){const s=i.length;let r=0;for(;r<s;){const o=av(i,r),a=i.substr(r,o);this._executeEditOperation(Ws.typeWithInterceptors(this._isDoingComposition,this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),this.getAutoClosedCharacters(),a)),r+=o}}else this._executeEditOperation(Ws.typeWithoutInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),i))},e,n)}compositionType(e,i,n,s,r,o){if(i.length===0&&n===0&&s===0){if(r!==0){const a=this.getSelections().map(l=>{const h=l.getPosition();return new xe(h.lineNumber,h.column+r,h.lineNumber,h.column+r)});this.setSelections(e,o,a,0)}return}this._executeEdit(()=>{this._executeEditOperation(Ws.compositionType(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),i,n,s,r))},e,o)}paste(e,i,n,s,r){this._executeEdit(()=>{this._executeEditOperation(Ws.paste(this.context.cursorConfig,this._model,this.getSelections(),i,n,s||[]))},e,r,4)}cut(e,i){this._executeEdit(()=>{this._executeEditOperation(au.cut(this.context.cursorConfig,this._model,this.getSelections()))},e,i)}executeCommand(e,i,n){this._executeEdit(()=>{this._cursors.killSecondaryCursors(),this._executeEditOperation(new Qt(0,[i],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},e,n)}executeCommands(e,i,n){this._executeEdit(()=>{this._executeEditOperation(new Qt(0,i,{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},e,n)}};qv.MAX_CURSOR_COUNT=1e4;var ng=class nx{constructor(e,i){this.modelVersionId=e,this.cursorState=i}static from(e,i){return new nx(e.getVersionId(),i.getCursorStates())}equals(e){if(!e||this.modelVersionId!==e.modelVersionId||this.cursorState.length!==e.cursorState.length)return!1;for(let i=0,n=this.cursorState.length;i<n;i++)if(!this.cursorState[i].equals(e.cursorState[i]))return!1;return!0}},Rb=class{constructor(t,e,i){this._model=t,this._autoClosedCharactersDecorations=e,this._autoClosedEnclosingDecorations=i}static getAllAutoClosedCharacters(t){let e=[];for(const i of t)e=e.concat(i.getAutoClosedCharactersRanges());return e}dispose(){this._autoClosedCharactersDecorations=this._model.deltaDecorations(this._autoClosedCharactersDecorations,[]),this._autoClosedEnclosingDecorations=this._model.deltaDecorations(this._autoClosedEnclosingDecorations,[])}getAutoClosedCharactersRanges(){const t=[];for(let e=0;e<this._autoClosedCharactersDecorations.length;e++){const i=this._model.getDecorationRange(this._autoClosedCharactersDecorations[e]);i&&t.push(i)}return t}isValid(t){const e=[];for(let i=0;i<this._autoClosedEnclosingDecorations.length;i++){const n=this._model.getDecorationRange(this._autoClosedEnclosingDecorations[i]);if(n&&(e.push(n),n.startLineNumber!==n.endLineNumber))return!1}e.sort(T.compareRangesUsingStarts),t.sort(T.compareRangesUsingStarts);for(let i=0;i<t.length;i++)if(i>=e.length||!e[i].strictContainsRange(t[i]))return!1;return!0}},SO=class{static executeCommands(t,e,i){const n={model:t,selectionsBefore:e,trackedRanges:[],trackedRangesDirection:[]},s=this._innerExecuteCommands(n,i);for(let r=0,o=n.trackedRanges.length;r<o;r++)n.model._setTrackedRange(n.trackedRanges[r],null,0);return s}static _innerExecuteCommands(t,e){if(this._arrayIsEmpty(e))return null;const i=this._getEditOperations(t,e);if(i.operations.length===0)return null;const n=i.operations,s=this._getLoserCursorMap(n);if(s.hasOwnProperty("0"))return null;const r=[];for(let l=0,h=n.length;l<h;l++)s.hasOwnProperty(n[l].identifier.major.toString())||r.push(n[l]);i.hadTrackedEditOperation&&r.length>0&&(r[0]._isTracked=!0);let o=t.model.pushEditOperations(t.selectionsBefore,r,l=>{const h=[];for(let u=0;u<t.selectionsBefore.length;u++)h[u]=[];for(const u of l)u.identifier&&h[u.identifier.major].push(u);const c=(u,g)=>u.identifier.minor-g.identifier.minor,d=[];for(let u=0;u<t.selectionsBefore.length;u++)h[u].length>0?(h[u].sort(c),d[u]=e[u].computeCursorState(t.model,{getInverseEditOperations:()=>h[u],getTrackedSelection:g=>{const m=parseInt(g,10),_=t.model._getTrackedRange(t.trackedRanges[m]);return t.trackedRangesDirection[m]===0?new xe(_.startLineNumber,_.startColumn,_.endLineNumber,_.endColumn):new xe(_.endLineNumber,_.endColumn,_.startLineNumber,_.startColumn)}})):d[u]=t.selectionsBefore[u];return d});o||(o=t.selectionsBefore);const a=[];for(let l in s)s.hasOwnProperty(l)&&a.push(parseInt(l,10));a.sort((l,h)=>h-l);for(const l of a)o.splice(l,1);return o}static _arrayIsEmpty(t){for(let e=0,i=t.length;e<i;e++)if(t[e])return!1;return!0}static _getEditOperations(t,e){let i=[],n=!1;for(let s=0,r=e.length;s<r;s++){const o=e[s];if(o){const a=this._getEditOperationsFromCommand(t,s,o);i=i.concat(a.operations),n=n||a.hadTrackedEditOperation}}return{operations:i,hadTrackedEditOperation:n}}static _getEditOperationsFromCommand(t,e,i){const n=[];let s=0;const r=(c,d,u=!1)=>{T.isEmpty(c)&&d===""||n.push({identifier:{major:e,minor:s++},range:c,text:d,forceMoveMarkers:u,isAutoWhitespaceEdit:i.insertsAutoWhitespace})};let o=!1;const h={addEditOperation:r,addTrackedEditOperation:(c,d,u)=>{o=!0,r(c,d,u)},trackSelection:(c,d)=>{const u=xe.liftSelection(c);let g;if(u.isEmpty())if(typeof d=="boolean")d?g=2:g=3;else{const C=t.model.getLineMaxColumn(u.startLineNumber);u.startColumn===C?g=2:g=3}else g=1;const m=t.trackedRanges.length,_=t.model._setTrackedRange(null,u,g);return t.trackedRanges[m]=_,t.trackedRangesDirection[m]=u.getDirection(),m.toString()}};try{i.getEditOperations(t.model,h)}catch(c){return We(c),{operations:[],hadTrackedEditOperation:!1}}return{operations:n,hadTrackedEditOperation:o}}
73static _getLoserCursorMap(t){t=t.slice(0),t.sort((i,n)=>-T.compareRangesUsingEnds(i.range,n.range));const e={};for(let i=1;i<t.length;i++){const n=t[i-1],s=t[i];if(T.getStartPosition(n.range).isBefore(T.getEndPosition(s.range))){let r;n.identifier.major>s.identifier.major?r=n.identifier.major:r=s.identifier.major,e[r.toString()]=!0;for(let o=0;o<t.length;o++)t[o].identifier.major===r&&(t.splice(o,1),o<i&&i--,o--);i>0&&i--}}return e}},sx=class{constructor(t,e,i,n,s,r){this.id=t,this.label=e,this.alias=i,this._precondition=n,this._run=s,this._contextKeyService=r}isSupported(){return this._contextKeyService.contextMatchesRules(this._precondition)}run(){return this.isSupported()?this._run():Promise.resolve(void 0)}},Ga={Configuration:"base.contributions.configuration"},sg={properties:{},patternProperties:{}},rg={properties:{},patternProperties:{}},og={properties:{},patternProperties:{}},ag={properties:{},patternProperties:{}},lg={properties:{},patternProperties:{}},cc={properties:{},patternProperties:{}},cl="vscode://schemas/settings/resourceLanguage",Ab=vt.as(ef.JSONContribution),yO=class{constructor(){this.overrideIdentifiers=new Set,this._onDidSchemaChange=new M,this._onDidUpdateConfiguration=new M,this.configurationDefaultsOverrides=new Map,this.defaultLanguageConfigurationOverridesNode={id:"defaultOverrides",title:p("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.excludedConfigurationProperties={},Ab.registerSchema(cl,this.resourceLanguageSettingsSchema),this.registerOverridePropertyPatternKey()}registerConfiguration(t,e=!0){this.registerConfigurations([t],e)}registerConfigurations(t,e=!0){const i=this.doRegisterConfigurations(t,e);Ab.registerSchema(cl,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:i})}registerDefaultConfigurations(t){var e;const i=[],n=[];for(const{overrides:s,source:r}of t)for(const o in s)if(i.push(o),gh.test(o)){const a=Object.assign(Object.assign({},((e=this.configurationDefaultsOverrides.get(o))===null||e===void 0?void 0:e.value)||{}),s[o]);this.configurationDefaultsOverrides.set(o,{source:r,value:a});const l={type:"object",default:a,description:p("defaultLanguageConfiguration.description","Configure settings to be overridden for {0} language.",o),$ref:cl,defaultDefaultValue:a,source:_n(r)?void 0:r};n.push(...ox(o)),this.configurationProperties[o]=l,this.defaultLanguageConfigurationOverridesNode.properties[o]=l}else{this.configurationDefaultsOverrides.set(o,{value:s[o],source:r});const a=this.configurationProperties[o];a&&(this.updatePropertyDefaultValue(o,a),this.updateSchema(o,a))}this.registerOverrideIdentifiers(n),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:i,defaultsOverrides:!0})}registerOverrideIdentifiers(t){for(const e of t)this.overrideIdentifiers.add(e);this.updateOverridePropertyPatternKey()}doRegisterConfigurations(t,e){const i=[];return t.forEach(n=>{i.push(...this.validateAndRegisterProperties(n,e,n.extensionInfo,n.restrictedProperties)),this.configurationContributors.push(n),this.registerJSONConfiguration(n)}),i}validateAndRegisterProperties(t,e=!0,i,n,s=3){s=zi(t.scope)?s:t.scope;let r=[],o=t.properties;if(o)for(let l in o){if(e&&kO(l)){delete o[l];continue}const h=o[l];if(h.source=i,h.defaultDefaultValue=o[l].default,this.updatePropertyDefaultValue(l,h),gh.test(l)?h.scope=void 0:(h.scope=zi(h.scope)?s:h.scope,h.restricted=zi(h.restricted)?!!n?.includes(l):h.restricted),o[l].hasOwnProperty("included")&&!o[l].included){this.excludedConfigurationProperties[l]=o[l],delete o[l];continue}else this.configurationProperties[l]=o[l];!o[l].deprecationMessage&&o[l].markdownDeprecationMessage&&(o[l].deprecationMessage=o[l].markdownDeprecationMessage),r.push(l)}let a=t.allOf;if(a)for(let l of a)r.push(...this.validateAndRegisterProperties(l,e,i,n,s));return r}getConfigurationProperties(){return this.configurationProperties}registerJSONConfiguration(t){const e=i=>{let n=i.properties;if(n)for(const r in n)this.updateSchema(r,n[r]);let s=i.allOf;
73s&&s.forEach(e)};e(t)}updateSchema(t,e){switch(sg.properties[t]=e,e.scope){case 1:rg.properties[t]=e;break;case 2:og.properties[t]=e;break;case 6:ag.properties[t]=e;break;case 3:lg.properties[t]=e;break;case 4:cc.properties[t]=e;break;case 5:cc.properties[t]=e,this.resourceLanguageSettingsSchema.properties[t]=e}}updateOverridePropertyPatternKey(){for(const t of this.overrideIdentifiers.values()){const e=`[${t}]`,i={type:"object",description:p("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),errorMessage:p("overrideSettings.errorMessage","This setting does not support per-language configuration."),$ref:cl};this.updatePropertyDefaultValue(e,i),sg.properties[e]=i,rg.properties[e]=i,og.properties[e]=i,ag.properties[e]=i,lg.properties[e]=i,cc.properties[e]=i}this._onDidSchemaChange.fire()}registerOverridePropertyPatternKey(){const t={type:"object",description:p("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),errorMessage:p("overrideSettings.errorMessage","This setting does not support per-language configuration."),$ref:cl};sg.patternProperties[xr]=t,rg.patternProperties[xr]=t,og.patternProperties[xr]=t,ag.patternProperties[xr]=t,lg.patternProperties[xr]=t,cc.patternProperties[xr]=t,this._onDidSchemaChange.fire()}updatePropertyDefaultValue(t,e){const i=this.configurationDefaultsOverrides.get(t);let n=i?.value,s=i?.source;gn(n)&&(n=e.defaultDefaultValue,s=void 0),gn(n)&&(n=LO(e.type)),e.default=n,e.defaultValueSource=s}},rx="\\[([^\\]]+)\\]",Ob=new RegExp(rx,"g"),xr=`^(${rx})+$`,gh=new RegExp(xr);function ox(t){const e=[];if(gh.test(t)){let i=Ob.exec(t);for(;i?.length;){const n=i[1].trim();n&&e.push(n),i=Ob.exec(t)}}return tr(e)}function LO(t){switch(Array.isArray(t)?t[0]:t){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}var ax=new yO;vt.add(Ga.Configuration,ax);function kO(t){return t.trim()?gh.test(t)?p("config.property.languageDefault","Cannot register '{0}'. This matches property pattern '\\\\[.*\\\\]$' for describing language specific editor settings. Use 'configurationDefaults' contribution.",t):ax.getConfigurationProperties()[t]!==void 0?p("config.property.duplicate","Cannot register '{0}'. This property is already registered.",t):null:p("config.property.empty","Cannot register an empty property")}var xO={ModesRegistry:"editor.modesRegistry"},IO=class{constructor(){this._onDidChangeLanguages=new M,this.onDidChangeLanguages=this._onDidChangeLanguages.event,this._languages=[]}registerLanguage(t){return this._languages.push(t),this._onDidChangeLanguages.fire(void 0),{dispose:()=>{for(let e=0,i=this._languages.length;e<i;e++)if(this._languages[e]===t){this._languages.splice(e,1);return}}}}getLanguages(){return this._languages}},Na=new IO;vt.add(xO.ModesRegistry,Na);var Hh="plaintext",EO=".txt";Na.registerLanguage({id:Hh,extensions:[EO],aliases:[p("plainText.alias","Plain Text"),"text"],mimetypes:[dn.text]});Wi.register(Hh,{brackets:[["(",")"],["[","]"],["{","}"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],colorizedBracketPairs:[],folding:{offSide:!0}},0);vt.as(Ga.Configuration).registerDefaultConfigurations([{overrides:{"[plaintext]":{"editor.unicodeHighlight.ambiguousCharacters":!1,"editor.unicodeHighlight.invisibleCharacters":!1}}}]);function DO(t,e,i,n,s,r,o){let a="<div>",l=n,h=0,c=!0;for(let d=0,u=e.getCount();d<u;d++){const g=e.getEndOffset(d);if(g<=n)continue;let m="";for(;l<g&&l<s;l++){const _=t.charCodeAt(l);switch(_){case 9:{let C=r-(l+h)%r;for(h+=C-1;C>0;)o&&c?(m+="&#160;",c=!1):(m+=" ",c=!0),C--;break}case 60:m+="&lt;",c=!1;break;case 62:m+="&gt;",c=!1;break;case 38:m+="&amp;",c=!1;break;case 0:m+="&#00;",c=!1;break;case 65279:case 8232:case 8233:case 133:m+="�",c=!1;break;case 13:m+="&#8203",c=!1;break;case 32:o&&c?(m+="&#160;",c=!1):(m+=" ",c=!0);break;default:m+=String.fromCharCode(_),c=!1}}if(a+=`<span style="${e.getInlineStyle(d,i)}">${m}</span>`,g>s||l>=s)break}return a+="</div>",a}var NO=class{constructor(){this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[]}insert(t){this._hasPending=!0,this._inserts.push(t)}change(t){this._hasPending=!0,this._changes.push(t)}remove(t){this._hasPending=!0,this._removes.push(t)}mustCommit(){return this._hasPending}commit(t){if(!this._hasPending)return;const e=this._inserts,i=this._changes,n=this._removes;this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[],t._
73commitPendingChanges(e,i,n)}},TO=class{constructor(t,e,i,n,s){this.id=t,this.afterLineNumber=e,this.ordinal=i,this.height=n,this.minWidth=s,this.prefixSum=0}},lx=class c_{constructor(e,i,n,s){this._instanceId=$y(++c_.INSTANCE_COUNT),this._pendingChanges=new NO,this._lastWhitespaceId=0,this._arr=[],this._prefixSumValidIndex=-1,this._minWidth=-1,this._lineCount=e,this._lineHeight=i,this._paddingTop=n,this._paddingBottom=s}static findInsertionIndex(e,i,n){let s=0,r=e.length;for(;s<r;){const o=s+r>>>1;i===e[o].afterLineNumber?n<e[o].ordinal?r=o:s=o+1:i<e[o].afterLineNumber?r=o:s=o+1}return s}setLineHeight(e){this._checkPendingChanges(),this._lineHeight=e}setPadding(e,i){this._paddingTop=e,this._paddingBottom=i}onFlushed(e){this._checkPendingChanges(),this._lineCount=e}changeWhitespace(e){let i=!1;try{e({insertWhitespace:(n,s,r,o)=>{i=!0,n=n|0,s=s|0,r=r|0,o=o|0;const a=this._instanceId+ ++this._lastWhitespaceId;return this._pendingChanges.insert(new TO(a,n,s,r,o)),a},changeOneWhitespace:(n,s,r)=>{i=!0,s=s|0,r=r|0,this._pendingChanges.change({id:n,newAfterLineNumber:s,newHeight:r})},removeWhitespace:n=>{i=!0,this._pendingChanges.remove({id:n})}})}finally{this._pendingChanges.commit(this)}return i}_commitPendingChanges(e,i,n){if((e.length>0||n.length>0)&&(this._minWidth=-1),e.length+i.length+n.length<=1){for(const l of e)this._insertWhitespace(l);for(const l of i)this._changeOneWhitespace(l.id,l.newAfterLineNumber,l.newHeight);for(const l of n){const h=this._findWhitespaceIndex(l.id);h!==-1&&this._removeWhitespace(h)}return}const s=new Set;for(const l of n)s.add(l.id);const r=new Map;for(const l of i)r.set(l.id,l);const o=l=>{const h=[];for(const c of l)if(!s.has(c.id)){if(r.has(c.id)){const d=r.get(c.id);c.afterLineNumber=d.newAfterLineNumber,c.height=d.newHeight}h.push(c)}return h},a=o(this._arr).concat(o(e));a.sort((l,h)=>l.afterLineNumber===h.afterLineNumber?l.ordinal-h.ordinal:l.afterLineNumber-h.afterLineNumber),this._arr=a,this._prefixSumValidIndex=-1}_checkPendingChanges(){this._pendingChanges.mustCommit()&&this._pendingChanges.commit(this)}_insertWhitespace(e){const i=c_.findInsertionIndex(this._arr,e.afterLineNumber,e.ordinal);this._arr.splice(i,0,e),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,i-1)}_findWhitespaceIndex(e){const i=this._arr;for(let n=0,s=i.length;n<s;n++)if(i[n].id===e)return n;return-1}_changeOneWhitespace(e,i,n){const s=this._findWhitespaceIndex(e);if(s!==-1&&(this._arr[s].height!==n&&(this._arr[s].height=n,this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,s-1)),this._arr[s].afterLineNumber!==i)){const r=this._arr[s];this._removeWhitespace(s),r.afterLineNumber=i,this._insertWhitespace(r)}}_removeWhitespace(e){this._arr.splice(e,1),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,e-1)}onLinesDeleted(e,i){this._checkPendingChanges(),e=e|0,i=i|0,this._lineCount-=i-e+1;for(let n=0,s=this._arr.length;n<s;n++){const r=this._arr[n].afterLineNumber;e<=r&&r<=i?this._arr[n].afterLineNumber=e-1:r>i&&(this._arr[n].afterLineNumber-=i-e+1)}}onLinesInserted(e,i){this._checkPendingChanges(),e=e|0,i=i|0,this._lineCount+=i-e+1;for(let n=0,s=this._arr.length;n<s;n++){const r=this._arr[n].afterLineNumber;e<=r&&(this._arr[n].afterLineNumber+=i-e+1)}}getWhitespacesTotalHeight(){return this._checkPendingChanges(),this._arr.length===0?0:this.getWhitespacesAccumulatedHeight(this._arr.length-1)}getWhitespacesAccumulatedHeight(e){this._checkPendingChanges(),e=e|0;let i=Math.max(0,this._prefixSumValidIndex+1);i===0&&(this._arr[0].prefixSum=this._arr[0].height,i++);for(let n=i;n<=e;n++)this._arr[n].prefixSum=this._arr[n-1].prefixSum+this._arr[n].height;return this._prefixSumValidIndex=Math.max(this._prefixSumValidIndex,e),this._arr[e].prefixSum}getLinesTotalHeight(){return this._checkPendingChanges(),this._lineHeight*this._lineCount+this.getWhitespacesTotalHeight()+this._paddingTop+this._paddingBottom}getWhitespaceAccumulatedHeightBeforeLineNumber(e){this._checkPendingChanges(),e=e|0;const i=this._findLastWhitespaceBeforeLineNumber(e);return i===-1?0:this.getWhitespacesAccumulatedHeight(i)}_findLastWhitespaceBeforeLineNumber(e){e=e|0;const i=this._arr;let n=0,s=i.length-1;for(;n<=s;){const r=(s-n|0)/2|0,o=n+r|0;if(i[o].afterLineNumber<e){if(o+1>=i.length||i[o+1].afterLineNumber>=e)return o;n=o+1|0}else s=o-1|0}return-1}_findFirstWhitespaceAfterLineNumber(e){e=e|0;const i=this._findLastWhitespaceBeforeLineNumber(e)+1;
73return i<this._arr.length?i:-1}getFirstWhitespaceIndexAfterLineNumber(e){return this._checkPendingChanges(),e=e|0,this._findFirstWhitespaceAfterLineNumber(e)}getVerticalOffsetForLineNumber(e){this._checkPendingChanges(),e=e|0;let i;e>1?i=this._lineHeight*(e-1):i=0;const n=this.getWhitespaceAccumulatedHeightBeforeLineNumber(e);return i+n+this._paddingTop}getWhitespaceMinWidth(){if(this._checkPendingChanges(),this._minWidth===-1){let e=0;for(let i=0,n=this._arr.length;i<n;i++)e=Math.max(e,this._arr[i].minWidth);this._minWidth=e}return this._minWidth}isAfterLines(e){return this._checkPendingChanges(),e>this.getLinesTotalHeight()}isInTopPadding(e){return this._paddingTop===0?!1:(this._checkPendingChanges(),e<this._paddingTop)}isInBottomPadding(e){return this._paddingBottom===0?!1:(this._checkPendingChanges(),e>=this.getLinesTotalHeight()-this._paddingBottom)}getLineNumberAtOrAfterVerticalOffset(e){if(this._checkPendingChanges(),e=e|0,e<0)return 1;const i=this._lineCount|0,n=this._lineHeight;let s=1,r=i;for(;s<r;){const o=(s+r)/2|0,a=this.getVerticalOffsetForLineNumber(o)|0;if(e>=a+n)s=o+1;else{if(e>=a)return o;r=o}}return s>i?i:s}getLinesViewportData(e,i){this._checkPendingChanges(),e=e|0,i=i|0;const n=this._lineHeight,s=this.getLineNumberAtOrAfterVerticalOffset(e)|0,r=this.getVerticalOffsetForLineNumber(s)|0;let o=this._lineCount|0,a=this.getFirstWhitespaceIndexAfterLineNumber(s)|0;const l=this.getWhitespacesCount()|0;let h,c;a===-1?(a=l,c=o+1,h=0):(c=this.getAfterLineNumberForWhitespaceIndex(a)|0,h=this.getHeightForWhitespaceIndex(a)|0);let d=r,u=d;const g=5e5;let m=0;r>=g&&(m=Math.floor(r/g)*g,m=Math.floor(m/n)*n,u-=m);const _=[],C=e+(i-e)/2;let w=-1;for(let k=s;k<=o;k++){if(w===-1){const S=d,L=d+n;(S<=C&&C<L||S>C)&&(w=k)}for(d+=n,_[k-s]=u,u+=n;c===k;)u+=h,d+=h,a++,a>=l?c=o+1:(c=this.getAfterLineNumberForWhitespaceIndex(a)|0,h=this.getHeightForWhitespaceIndex(a)|0);if(d>=i){o=k;break}}w===-1&&(w=o);const v=this.getVerticalOffsetForLineNumber(o)|0;let b=s,y=o;return b<y&&r<e&&b++,b<y&&v+n>i&&y--,{bigNumbersDelta:m,startLineNumber:s,endLineNumber:o,relativeVerticalOffset:_,centeredLineNumber:w,completelyVisibleStartLineNumber:b,completelyVisibleEndLineNumber:y}}getVerticalOffsetForWhitespaceIndex(e){this._checkPendingChanges(),e=e|0;const i=this.getAfterLineNumberForWhitespaceIndex(e);let n;i>=1?n=this._lineHeight*i:n=0;let s;return e>0?s=this.getWhitespacesAccumulatedHeight(e-1):s=0,n+s+this._paddingTop}getWhitespaceIndexAtOrAfterVerticallOffset(e){this._checkPendingChanges(),e=e|0;let i=0,n=this.getWhitespacesCount()-1;if(n<0)return-1;const s=this.getVerticalOffsetForWhitespaceIndex(n),r=this.getHeightForWhitespaceIndex(n);if(e>=s+r)return-1;for(;i<n;){const o=Math.floor((i+n)/2),a=this.getVerticalOffsetForWhitespaceIndex(o),l=this.getHeightForWhitespaceIndex(o);if(e>=a+l)i=o+1;else{if(e>=a)return o;n=o}}return i}getWhitespaceAtVerticalOffset(e){this._checkPendingChanges(),e=e|0;const i=this.getWhitespaceIndexAtOrAfterVerticallOffset(e);if(i<0||i>=this.getWhitespacesCount())return null;const n=this.getVerticalOffsetForWhitespaceIndex(i);if(n>e)return null;const s=this.getHeightForWhitespaceIndex(i);return{id:this.getIdForWhitespaceIndex(i),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(i),verticalOffset:n,height:s}}getWhitespaceViewportData(e,i){this._checkPendingChanges(),e=e|0,i=i|0;const n=this.getWhitespaceIndexAtOrAfterVerticallOffset(e),s=this.getWhitespacesCount()-1;if(n<0)return[];const r=[];for(let o=n;o<=s;o++){const a=this.getVerticalOffsetForWhitespaceIndex(o),l=this.getHeightForWhitespaceIndex(o);if(a>=i)break;r.push({id:this.getIdForWhitespaceIndex(o),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(o),verticalOffset:a,height:l})}return r}getWhitespaces(){return this._checkPendingChanges(),this._arr.slice(0)}getWhitespacesCount(){return this._checkPendingChanges(),this._arr.length}getIdForWhitespaceIndex(e){return this._checkPendingChanges(),e=e|0,this._arr[e].id}getAfterLineNumberForWhitespaceIndex(e){return this._checkPendingChanges(),e=e|0,this._arr[e].afterLineNumber}getHeightForWhitespaceIndex(e){return this._checkPendingChanges(),e=e|0,this._arr[e].height}};lx.INSTANCE_COUNT=0;var MO=125,Tl=class{constructor(t,e,i,n){t=t|0,e=e|0,i=i|0,n=n|0,t<0&&(t=0),e<0&&(e=0),i<0&&(i=0),n<0&&(n=0),this.width=t,this.contentWidth=e,this.scrollWidth=Math.max(t,e),this.height=i,this.contentHeight=n,this.scrollHeight=Math.max(i,n)}equals(t){return this.width===t.width&&this.contentWidth===t.contentWidth&&this.height===t.height&&this.contentHeight===t.contentHeight}},RO=class extends V{constructor(t,e){super(),this._onDidContentSizeChange=this._register(new M),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._dimensions=new Tl(0,0,0,0),this._scrollable=this._register(new Wh({forceIntegerValues:!0,smoothScrollDuration:t,scheduleAtNextAnimationFrame:e})),this.onDidScroll=this._scrollable.onScroll}getScrollable(){return this._scrollable}setSmoothScrollDuration(t){this._scrollable.setSmoothScrollDuration(t)}validateScrollPosition(t){return this._scrollable.validateScrollPosition(t)}getScrollDimensions(){return this._dimensions}setScrollDimensions(t){if(this._dimensions.equals(t))return;const e=this._dimensions;this._dimensions=t,this._scrollable.setScrollDimensions({width:t.width,scrollWidth:t.scrollWidth,height:t.height,scrollHeight:t.scrollHeight},!0);const i=e.contentWidth!==t.contentWidth,n=e.contentHeight!==t.contentHeight;(i||n)&&this._onDidContentSizeChange.fire(new _O(e.contentWidth,e.contentHeight,t.contentWidth,t.contentHeight))}getFutureScrollPosition(){return this._scrollable.getFutureScrollPosition()}getCurrentScrollPosition(){return this._scrollable.getCurrentScrollPosition()}setScrollPositionNow(t){this._scrollable.setScrollPositionNow(t)}setScrollPositionSmooth(t){this._scrollable.setScrollPositionSmooth(t)}},AO=class extends V{constructor(t,e,i){super(),this._configuration=t;const n=this._configuration.options,s=n.get(131),r=n.get(75);this._linesLayout=new lx(e,n.get(59),r.top,r.bottom),this._scrollable=this._register(new RO(0,i)),this._configureSmoothScrollDuration(),this._scrollable.setScrollDimensions(new Tl(s.contentWidth,0,s.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(103)?MO:0)}onConfigurationChanged(t){const e=this._configuration.options;if(t.hasChanged(59)&&this._linesLayout.setLineHeight(e.get(59)),t.hasChanged(75)
vendor: 6,395 bytes, line 73
73){const i=e.get(75);this._linesLayout.setPadding(i.top,i.bottom)}if(t.hasChanged(131)){const i=e.get(131),n=i.contentWidth,s=i.height,r=this._scrollable.getScrollDimensions(),o=r.contentWidth;this._scrollable.setScrollDimensions(new Tl(n,r.contentWidth,s,this._getContentHeight(n,s,o)))}else this._updateHeight();t.hasChanged(103)&&this._configureSmoothScrollDuration()}onFlushed(t){this._linesLayout.onFlushed(t)}onLinesDeleted(t,e){this._linesLayout.onLinesDeleted(t,e)}onLinesInserted(t,e){this._linesLayout.onLinesInserted(t,e)}_getHorizontalScrollbarHeight(t,e){const i=this._configuration.options.get(92);return i.horizontal===2||t>=e?0:i.horizontalScrollbarSize}_getContentHeight(t,e,i){const n=this._configuration.options;let s=this._linesLayout.getLinesTotalHeight();return n.get(94)?s+=Math.max(0,e-n.get(59)-n.get(75).bottom):s+=this._getHorizontalScrollbarHeight(t,i),s}_updateHeight(){const t=this._scrollable.getScrollDimensions(),e=t.width,i=t.height,n=t.contentWidth;this._scrollable.setScrollDimensions(new Tl(e,t.contentWidth,i,this._getContentHeight(e,i,n)))}getCurrentViewport(){const t=this._scrollable.getScrollDimensions(),e=this._scrollable.getCurrentScrollPosition();return new RC(e.scrollTop,e.scrollLeft,t.width,t.height)}getFutureViewport(){const t=this._scrollable.getScrollDimensions(),e=this._scrollable.getFutureScrollPosition();return new RC(e.scrollTop,e.scrollLeft,t.width,t.height)}_computeContentWidth(t){const e=this._configuration.options,i=e.get(132),n=e.get(44);if(i.isViewportWrapping){const s=e.get(131),r=e.get(65);return t>s.contentWidth+n.typicalHalfwidthCharacterWidth&&r.enabled&&r.side==="right"?t+s.verticalScrollbarWidth:t}else{const s=e.get(93)*n.typicalHalfwidthCharacterWidth,r=this._linesLayout.getWhitespaceMinWidth();return Math.max(t+s,r)}}setMaxLineWidth(t){const e=this._scrollable.getScrollDimensions();this._scrollable.setScrollDimensions(new Tl(e.width,this._computeContentWidth(t),e.height,e.contentHeight)),this._updateHeight()}saveState(){const t=this._scrollable.getFutureScrollPosition(),e=t.scrollTop,i=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(e);return{scrollTop:e,scrollTopWithoutViewZones:e-this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(i),scrollLeft:t.scrollLeft}}changeWhitespace(t){const e=this._linesLayout.changeWhitespace(t);return e&&this.onHeightMaybeChanged(),e}getVerticalOffsetForLineNumber(t){return this._linesLayout.getVerticalOffsetForLineNumber(t)}isAfterLines(t){return this._linesLayout.isAfterLines(t)}isInTopPadding(t){return this._linesLayout.isInTopPadding(t)}isInBottomPadding(t){return this._linesLayout.isInBottomPadding(t)}getLineNumberAtVerticalOffset(t){return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(t)}getWhitespaceAtVerticalOffset(t){return this._linesLayout.getWhitespaceAtVerticalOffset(t)}getLinesViewportData(){const t=this.getCurrentViewport();return this._linesLayout.getLinesViewportData(t.top,t.top+t.height)}getLinesViewportDataAtScrollTop(t){const e=this._scrollable.getScrollDimensions();return t+e.height>e.scrollHeight&&(t=e.scrollHeight-e.height),t<0&&(t=0),this._linesLayout.getLinesViewportData(t,t+e.height)}getWhitespaceViewportData(){const t=this.getCurrentViewport();return this._linesLayout.getWhitespaceViewportData(t.top,t.top+t.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(t){return this._scrollable.validateScrollPosition(t)}setScrollPosition(t,e){e===1?this._scrollable.setScrollPositionNow(t):this._scrollable.setScrollPositionSmooth(t)}deltaScrollNow(t,e){const i=this._scrollable.getCurrentScrollPosition();this._scrollable.setScrollPositionNow({scrollLeft:i.scrollLeft+t,scrollTop:i.scrollTop+e})}},OO=class{constructor(t,e,i,n,s){this.editorId=t,this.model=e,this.configuration=i,this._linesCollection=n,this._coordinatesConverter=s,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(t){const e=t.id;let i=this._decorationsCache[e];if(!i){const n=t.range,s=t.options;let r;if(s.isWholeLine){const o=this._coordinatesConverter.convertModelPositionToViewPosition(new A(n.startLineNumber,1),0),a=this._coordinatesConverter.convertModelPositionToViewPosition(new A(n.endLineNumber,this.model.getLineMaxColumn(n.endLineNumber)),1);r=new T(o.lineNumber,o.column,a.lineNumber,a.column)}else r=this._coordinatesConverter.convertModelRangeToViewRange(n,1);i=new TL(r,s),this._decorationsCache[e]=i}return i}getDecorationsViewportData(t){let e=this._cachedModelDecorationsResolver!==null;return e=e&&t.equalsRange(this._cachedModelDecorationsResolverViewRange),e||(this._cachedModelDecorationsResolver=this._getDecorationsViewportData(t),this._cachedModelDecorationsResolverViewRange=t),this._cachedModelDecorationsResolver}_getDecorationsViewportData(t){const e=this._linesCollection.getDecorationsInRange(t,this.editorId,Od(this.configuration.options)),i=t.startLineNumber,n=t.endLineNumber,s=[];let r=0;const o=[];for(let a=i;a<=n;a++)o[a-i]=[];for(let a=0,l=e.length;a<l;a++){const h=e[a],c=h.options;if(!PO(this.model,h))continue;const d=this._getOrCreateViewModelDecoration(h),u=d.range;if(s[r++]=d,c.inlineClassName){const g=new Vl(u,c.inlineClassName,c.inlineClassNameAffectsLetterSpacing?3:0),m=Math.max(i,u.startLineNumber),_=
73Math.min(n,u.endLineNumber);for(let C=m;C<=_;C++)o[C-i].push(g)}if(c.beforeContentClassName&&i<=u.startLineNumber&&u.startLineNumber<=n){const g=new Vl(new T(u.startLineNumber,u.startColumn,u.startLineNumber,u.startColumn),c.beforeContentClassName,1);o[u.startLineNumber-i].push(g)}if(c.afterContentClassName&&i<=u.endLineNumber&&u.endLineNumber<=n){const g=new Vl(new T(u.endLineNumber,u.endColumn,u.endLineNumber,u.endColumn),c.afterContentClassName,2);o[u.endLineNumber-i].push(g)}}return{decorations:s,inlineDecorations:o}}};function PO(t,e){return!(e.options.hideInCommentTokens&&FO(t,e)||e.options.hideInStringTokens&&BO(t,e))}function FO(t,e){return hx(t,e.range,i=>i===1)}function BO(t,e){return hx(t,e.range,i=>i===2)}function hx(t,e,i){for(let n=e.startLineNumber;n<=e.endLineNumber;n++){const s=t.getLineTokens(n),r=n===e.startLineNumber,o=n===e.endLineNumber;let a=r?s.findTokenIndexAtOffset(e.startColumn-1):0;for(;a<s.getCount()&&!(o&&s.getStartOffset(a)>e.endColumn-1);){if(!i(s.getStandardTokenType(a)))return!1;a++}}return!0}var dc=class{constructor(t,e,i){this.range=t,this.nestingLevel=e,this.isInvalid=i}},VO=class{constructor(t,e,i,n){this.range=t,this.openingBracketRange=e,this.closingBracketRange=i,this.nestingLevel=n}},WO=class extends VO{constructor(t,e,i,n,s){super(t,e,i,n),this.minVisibleColumnIndentation=s}},d_=class{constructor(t,e){this.lineCount=t,this.columnCount=e}toString(){return`${this.lineCount},${this.columnCount}`}};d_.zero=new d_(0,0);function HO(t,e,i,n){return t!==i?Be(i-t,n):Be(0,n-e)}function zO(t){return t===0}var ci=Math.pow(2,26);function Be(t,e){return t*ci+e}function er(t){const e=t,i=Math.floor(e/ci),n=e-i*ci;return new d_(i,n)}function UO(t){return Math.floor(t/ci)}function gt(t,e){return e<ci?t+e:t-t%ci+e}function $O(t,e){const i=t,n=e;if(n-i<=0)return 0;const s=Math.floor(i/ci),r=Math.floor(n/ci),o=n-r*ci;return s===r?Be(0,o-(i-s*ci)):Be(r-s,o)}function fd(t,e){return t<e}function Wr(t,e){return t<=e}function uc(t,e){return t>=e}function fc(t){return Be(t.lineNumber-1,t.column-1)}function Hr(t,e){const i=t,n=Math.floor(i/ci),s=i-n*ci,r=e,o=Math.floor(r/ci),a=r-o*ci;return new T(n+1,s+1,o+1,a+1)}function KO(t){const e=Th(t);return Be(e.length-1,e[e.length-1].length)}var Pb=class{constructor(t,e,i){this.startOffset=t,this.endOffset=e,this.newLength=i}},jO=class{constructor(t,e){this.documentLength=e,this.nextEditIdx=0,this.deltaOldToNewLineCount=0,this.deltaOldToNewColumnCount=0,this.deltaLineIdxInOld=-1,this.edits=t.map(i=>qO.from(i))}getOffsetBeforeChange(t){return this.adjustNextEdit(t),this.translateCurToOld(t)}getDistanceToNextChange(t){this.adjustNextEdit(t);const e=this.edits[this.nextEditIdx],i=e?this.translateOldToCur(e.offsetObj):this.documentLength;return $O(t,i)}translateOldToCur(t){return t.lineCount===this.deltaLineIdxInOld?Be(t.lineCount+this.deltaOldToNewLineCount,t.columnCount+this.deltaOldToNewColumnCount):Be(t.lineCount+this.deltaOldToNewLineCount,t.columnCount)}translateCurToOld(t){const e=er(t);return e.lineCount-this.deltaOldToNewLineCount===this.deltaLineIdxInOld?Be(e.lineCount-this.deltaOldToNewLineCount,e.columnCount-this.deltaOldToNewColumnCount):Be(e.lineCount-this.deltaOldToNewLineCount,e.columnCount)}adjustNextEdit(t){for(;this.nextEditIdx<this.edits.length;){const e=this.edits[this.nextEditIdx],i=this.translateOldToCur(e.endOffsetAfterObj);if(Wr(i,t)){this.nextEditIdx++;const n=er(i),s=er(this.translateOldToCur(e.endOffsetBeforeObj)),r=n.lineCount-s.lineCount;this.deltaOldToNewLineCount+=r;const o=this.deltaLineIdxInOld===e.endOffsetBeforeObj.lineCount?this.deltaOldToNewColumnCount:0,a=n.columnCount-s.columnCount;this.deltaOldToNewColumnCount=o+a,this.deltaLineIdxInOld=e.endOffsetBeforeObj.lineCount}else break}}},qO=class cx{constructor(e,i,n){this.endOffsetBeforeObj=er(i),this.endOffsetAfterObj=er(gt(e,n)),this.offsetObj=er(e)}static from(e){return new cx(e.startOffset,e.endOffset,e.newLength)}},gd=new Array,Gt=class es{constructor(e,i){this.items=e,this.additionalItems=i}static create(e,i){if(e<=128&&i.length===0){let n=es.cache[e];return n||(n=new es(e,i),es.cache[e]=n),n}return new es(e,i)}static getEmpty(){return this.empty}add(e,i){const n=i.getKey(e);let s=n>>5;if(s===0){const o=1<<n|this.items;return o===this.items?this:es.create(o,this.additionalItems)}s--;const r=this.additionalItems.slice(0);for(;r.length<s;)r.push(0);return r[s]|=1<<(n&31),es.create(this.items,r)}merge(e){const i=this.items|e.items;if(this.additionalItems===gd&&e.additionalItems===gd)return i===this.items?this:i===e.items?e:es.create(i,gd);const n=new Array;for(let s=0;s<Math.max(this.additionalItems.length,e.additionalItems.length);s++){const r=this.additionalItems[s]||0,o=e.additionalItems[s]||0;n.push(r|o)}return es.create(i,n)}intersects(e){if((this.items&e.items)!==0)return!0;for(let i=0;i<Math.min(this.additionalItems.length,e.additionalItems.length);i++)if((this.additionalItems[i]&e.additionalItems[i])!==0)return!0;return!1}};Gt.cache=new Array(129);Gt.empty=Gt.create(0,gd);var Fb={getKey(t){return t}},GO=class{constructor(){this.items=new Map}getKey(t){let e=this.items.get(t);return e===void 0&&(e=this.items.size,this.items.set(t,e)),e}},Gv=class{constructor(t){this._length=t}get length(){return this._length}},Bb=class u_ extends Gv{constructor(e,i,n,s,r){super(e),this.openingBracket=i,this.child=n,this.closingBracket=s,this.missingOpeningBracketIds=r}static create(e,i,n){let s=e.length;return i&&(s=gt(s,i.length)),n&&(s=gt(s,n.length)),new u_(s,e,i,n,i?i.missingOpeningBracketIds:Gt.getEmpty())}get kind(){return 2}get listHeight(){return 0}get childrenLength(){return 3}getChild(e){switch(e){case 0:return this.openingBracket;case 1:return this.child;case 2:return this.closingBracket}throw new Error("Invalid child index")}get children(){const e=new Array;return e.push(this.openingBracket),this.child&&e.push(this.child),this.closingBracket&&e.push(this.closingBracket),e}canBeReused(e){return!(this.closingBracket===null||e.intersects(this.missingOpeningBracketIds))}deepClone(){return new u_(this.length,this.openingBracket.deepClone(),this.child&&this.child.deepClone(),this.closingBracket&&this.closingBracket.deepClone(),this.missingOpeningBracketIds)}computeMinIndentation(e,i){return this.child?this.child.computeMinIndentation(gt(e,this.openingBracket.length),i):Number.MAX_SAFE_INTEGER}},zn=class extends Gv{constructor(t,e,i){super(t),this.listHeight=e,this._missingOpeningBracketIds=i,this.cachedMinIndentation=-1}static create23(t,e,i,n=!1){let s=t.length,r=t.missingOpeningBracketIds;if(t.listHeight!==e.listHeight)throw new Error("Invalid list heights");if(s=gt(s,e.length),r=r.merge(e.missingOpeningBracketIds),i){if(t.listHeight!==i.listHeight)throw new Error("Invalid list heights");s=gt(s,i.length),r=r.merge(i.missingOpeningBracketIds)}return n?new ZO(s,t.listHeight+1,t,e,i,r):new f_(s,t.listHeight+1,t,e,i,r)}static getEmpty(){return new YO(0,0,[],Gt.getEmpty())}get kind(){return 4}get missingOpeningBracketIds(){return this._missingOpeningBracketIds}throwIfImmutable(){}makeLastElementMutable(){this.throwIfImmutable();const t=this.childrenLength;if(t===0)return;const e=this.getChild(t-1),i=e.kind===4?e.toMutable():e;return e!==i&&this.setChild(t-1,i),i}makeFirstElementMutable(){if(this.throwIfImmutable(),this.childrenLength===0)return;const t=this.getChild(0),e=t.kind===4?t.toMutable():t;return t!==e&&this.setChild(0,e),e}canBeReused(t){if(t.intersects(this.missingOpeningBracketIds))return!1;let e=this,i;for(;e.kind===4&&(i=e.childrenLength)>0;)e=e.getChild(i-1);return e.canBeReused(t)}handleChildrenChanged(){this.throwIfImmutable();const t=this.childrenLength;let e=this.getChild(0).length,i=this.getChild(0).missingOpeningBracketIds;for(let n=1;n<t;n++){const s=this.getChild(n);
vendor: 4,750 bytes, line 73
73e=gt(e,s.length),i=i.merge(s.missingOpeningBracketIds)}this._length=e,this._missingOpeningBracketIds=i,this.cachedMinIndentation=-1}computeMinIndentation(t,e){if(this.cachedMinIndentation!==-1)return this.cachedMinIndentation;let i=Number.MAX_SAFE_INTEGER,n=t;for(let s=0;s<this.childrenLength;s++){const r=this.getChild(s);r&&(i=Math.min(i,r.computeMinIndentation(n,e)),n=gt(n,r.length))}return this.cachedMinIndentation=i,i}},f_=class dx extends zn{constructor(e,i,n,s,r,o){super(e,i,o),this._item1=n,this._item2=s,this._item3=r}get childrenLength(){return this._item3!==null?3:2}getChild(e){switch(e){case 0:return this._item1;case 1:return this._item2;case 2:return this._item3}throw new Error("Invalid child index")}setChild(e,i){switch(e){case 0:this._item1=i;return;case 1:this._item2=i;return;case 2:this._item3=i;return}throw new Error("Invalid child index")}get children(){return this._item3?[this._item1,this._item2,this._item3]:[this._item1,this._item2]}get item1(){return this._item1}get item2(){return this._item2}get item3(){return this._item3}deepClone(){return new dx(this.length,this.listHeight,this._item1.deepClone(),this._item2.deepClone(),this._item3?this._item3.deepClone():null,this.missingOpeningBracketIds)}appendChildOfSameHeight(e){if(this._item3)throw new Error("Cannot append to a full (2,3) tree node");this.throwIfImmutable(),this._item3=e,this.handleChildrenChanged()}unappendChild(){if(!this._item3)throw new Error("Cannot remove from a non-full (2,3) tree node");this.throwIfImmutable();const e=this._item3;return this._item3=null,this.handleChildrenChanged(),e}prependChildOfSameHeight(e){if(this._item3)throw new Error("Cannot prepend to a full (2,3) tree node");this.throwIfImmutable(),this._item3=this._item2,this._item2=this._item1,this._item1=e,this.handleChildrenChanged()}unprependChild(){if(!this._item3)throw new Error("Cannot remove from a non-full (2,3) tree node");this.throwIfImmutable();const e=this._item1;return this._item1=this._item2,this._item2=this._item3,this._item3=null,this.handleChildrenChanged(),e}toMutable(){return this}},ZO=class extends f_{toMutable(){return new f_(this.length,this.listHeight,this.item1,this.item2,this.item3,this.missingOpeningBracketIds)}throwIfImmutable(){throw new Error("this instance is immutable")}},Vb=class ux extends zn{constructor(e,i,n,s){super(e,i,s),this._children=n}get childrenLength(){return this._children.length}getChild(e){return this._children[e]}setChild(e,i){this._children[e]=i}get children(){return this._children}deepClone(){const e=new Array(this._children.length);for(let i=0;i<this._children.length;i++)e[i]=this._children[i].deepClone();return new ux(this.length,this.listHeight,e,this.missingOpeningBracketIds)}appendChildOfSameHeight(e){this.throwIfImmutable(),this._children.push(e),this.handleChildrenChanged()}unappendChild(){this.throwIfImmutable();const e=this._children.pop();return this.handleChildrenChanged(),e}prependChildOfSameHeight(e){this.throwIfImmutable(),this._children.unshift(e),this.handleChildrenChanged()}unprependChild(){this.throwIfImmutable();const e=this._children.shift();return this.handleChildrenChanged(),e}toMutable(){return this}},YO=class extends Vb{toMutable(){return new Vb(this.length,this.listHeight,[...this.children],this.missingOpeningBracketIds)}throwIfImmutable(){throw new Error("this instance is immutable")}},XO=[],Zv=class extends Gv{get listHeight(){return 0}get childrenLength(){return 0}getChild(t){return null}get children(){return XO}deepClone(){return this}},Vo=class extends Zv{get kind(){return 0}get missingOpeningBracketIds(){return Gt.getEmpty()}canBeReused(t){return!0}computeMinIndentation(t,e){const i=er(t),n=(i.columnCount===0?i.lineCount:i.lineCount+1)+1,s=UO(gt(t,this.length))+1;let r=Number.MAX_SAFE_INTEGER;for(let o=n;o<=s;o++){const a=e.getLineFirstNonWhitespaceColumn(o),l=e.getLineContent(o);if(a===0)continue;const h=ut.visibleColumnFromColumn(l,a,e.getOptions().tabSize);r=Math.min(r,h)}return r}},Wb=class fx extends Zv{constructor(e,i,n){super(e),this.languageId=i,this.bracketIds=n}static create(e,i,n){return new fx(e,i,n)}get kind(){return 1}get missingOpeningBracketIds(){return Gt.getEmpty()}canBeReused(e){return!1}computeMinIndentation(e,i){return Number.MAX_SAFE_INTEGER}},QO=class extends Zv{constructor(t,e){super(e),this.missingOpeningBracketIds=t}get kind(){return 3}canBeReused(t){return!t.intersects(this.missingOpeningBracketIds)}computeMinIndentation(t,e){return Number.MAX_SAFE_INTEGER}},Hs=class{constructor(t,e,i,n,s){this.length=t,this.kind=e,this.bracketId=i,this.bracketIds=n,this.astNode=s}},JO=class{constructor(t,e){this.textModel=t,this.bracketTokens=e,this.reader=new eP(this.textModel,this.bracketTokens),this._offset=0,this.didPee
73k=!1,this.peeked=null,this.textBufferLineCount=t.getLineCount(),this.textBufferLastLineLength=t.getLineLength(this.textBufferLineCount)}get offset(){return this._offset}get length(){return Be(this.textBufferLineCount,this.textBufferLastLineLength)}skip(t){this.didPeek=!1,this._offset=gt(this._offset,t);const e=er(this._offset);this.reader.setPosition(e.lineCount,e.columnCount)}read(){let t;return this.peeked?(this.didPeek=!1,t=this.peeked):t=this.reader.read(),t&&(this._offset=gt(this._offset,t.length)),t}peek(){return this.didPeek||(this.peeked=this.reader.read(),this.didPeek=!0),this.peeked}},eP=class{constructor(t,e){this.textModel=t,this.bracketTokens=e,this.lineIdx=0,this.line=null,this.lineCharOffset=0,this.lineTokens=null,this.lineTokenOffset=0,this.peekedToken=null,this.textBufferLineCount=t.getLineCount(),this.textBufferLastLineLength=t.getLineLength(this.textBufferLineCount)}setPosition(t,e){t===this.lineIdx?(this.lineCharOffset=e,this.lineTokenOffset=this.lineCharOffset===0?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset)):(this.lineIdx=t,this.lineCharOffset=e,this.line=null),this.peekedToken=null}read(){if(this.peekedToken){const s=this.peekedToken;return this.peekedToken=null,this.lineCharOffset+=s.length,s}if(this.lineIdx>this.textBufferLineCount-1||this.lineIdx===this.textBufferLineCount-1&&this.lineCharOffset>=this.textBufferLastLineLength)return null;this.line===null&&(this.lineTokens=this.textModel.getLineTokens(this.lineIdx+1),this.line=this.lineTokens.getLineContent(),this.lineTokenOffset=this.lineCharOffset===0?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset));const t=this.lineIdx,e=this.lineCharOffset;let i=0;for(;;){const s=this.lineTokens,r=s.getCount();let o=null;if(this.lineTokenOffset<r){const a=s.getMetadata(this.lineTokenOffset);for(;this.lineTokenOffset+1<r&&a===s.getMetadata(this.lineTokenOffset+1);)this.lineTokenOffset++;const l=li.getTokenType(a)===0,h=s.getEndOffset(this.lineTokenOffset);if(l&&h!==this.lineCharOffset){const c=s.getLanguageId(this.lineTokenOffset),d=this.line.substring(this.lineCharOffset,h),u=this.bracketTokens.getSingleLanguageBracketTokens(c),g=u.regExpGlobal;if(g){g.lastIndex=0;const m=g.exec(d);m&&(o=u.getToken(m[0]),o&&(this.lineCharOffset+=m.index))}}if(i+=h-this.lineCharOffset,o)if(t!==this.lineIdx||e!==this.lineCharOffset){this.peekedToken=o;break}else return this.lineCharOffset+=o.length,o;else this.lineTokenOffset++,this.lineCharOffset=h}else if(this.lineIdx===this.textBufferLineCount-1||(this.lineIdx++,this.lineTokens=this.textModel.getLineTokens(this.lineIdx+1),this.lineTokenOffset=0,this.line=this.lineTokens.getLineContent(),this.lineCharOffset=0,i+=33,i>1e3))break;if(i>1500)break}const n=HO(t,e,this.lineIdx,this.lineCharOffset);return new Hs(n,0,-1,Gt.getEmpty(),new Vo(n))}},tP=class{constructor(t,e){this.text=t,this._offset=0,this.idx=0;const i=e.getRegExpStr()?new RegExp(e.getRegExpStr()+`|
74`,"g"):null,n=[];let s,r=0,o=0,a=0,l=0;const h=new Array;for(let u=0;u<60;u++)h.push(new Hs(Be(0,u),0,-1,Gt.getEmpty(),new Vo(Be(0,u))));const c=new Array;for(let u=0;u<60;u++)c.push(new Hs(Be(1,u),0,-1,Gt.getEmpty(),new Vo(Be(1,u))));if(i)for(i.lastIndex=0;(s=i.exec(t))!==null;){const u=s.index,g=s[0];if(g===`
75`)r++,o=u+1;else{if(a!==u){let m;if(l===r){const _=u-a;if(_<h.length)m=h[_];else{const C=Be(0,_);m=new Hs(C,0,-1,Gt.getEmpty(),new Vo(C))}}else{const _=r-l,C=u-o;if(_===1&&C<c.length)m=c[C];else{const w=Be(_,C);m=new Hs(w,0,-1,Gt.getEmpty(),new Vo(w))}}n.push(m)}n.push(e.getToken(g)),a=u+g.length,l=r}}const d=t.length;if(a!==d){const u=l===r?Be(0,d-a):Be(r-l,d-o);n.push(new Hs(u,0,-1,Gt.getEmpty(),new Vo(u)))}this.length=Be(r,d-o),this.tokens=n}get offset(){return this._offset}read(){return this.tokens[this.idx++]||null}peek(){return this.tokens[this.idx]||null}skip(t){throw new ZN}},Hb=class gx{constructor(e){this.map=e,this.hasRegExp=!1,this._regExpGlobal=null}static createFromLanguage(e,i){function n(l,h){return i.getKey(`${l}:::${h}`)}const s=e.characterPair.getColorizedBrackets(),r=new Map,o=new Set;for(const[l,h]of s){o.add(l);let c=r.get(h);const d=n(e.languageId,l);c||(c={openingBrackets:Gt.getEmpty(),first:d},r.set(h,c)),c.openingBrackets=c.openingBrackets.add(d,Fb)}const a=new Map;for(const[l,h]of r){const c=Be(0,l.length);a.set(l,new Hs(c,2,h.first,h.openingBrackets,Wb.create(c,e.languageId,h.openingBrackets)))}for(const l of o){const h=Be(0,l.length),c=n(e.languageId,l),d=Gt.getEmpty().add(c,Fb);a.set(l,new Hs(h,1,c,d,Wb.create(h,e.languageId,d)))}return new gx(a)}getRegExpStr(){if(this.isEmpty)return null;
75{const e=[...this.map.keys()];return e.sort(),e.reverse(),e.map(i=>iP(i)).join("|")}}get regExpGlobal(){if(!this.hasRegExp){const e=this.getRegExpStr();this._regExpGlobal=e?new RegExp(e,"g"):null,this.hasRegExp=!0}return this._regExpGlobal}getToken(e){return this.map.get(e)}findClosingTokenText(e){for(const[i,n]of this.map)if(n.bracketIds.intersects(e))return i}get isEmpty(){return this.map.size===0}};function iP(t){const e=Vn(t);return/^[\w ]+$/.test(t)?`\\b${e}\\b`:e}var nP=class{constructor(t,e){this.denseKeyProvider=t,this.getLanguageConfiguration=e,this.languageIdToBracketTokens=new Map}didLanguageChange(t){const e=this.languageIdToBracketTokens.get(t);if(!e)return!1;const i=Hb.createFromLanguage(this.getLanguageConfiguration(t),this.denseKeyProvider).getRegExpStr();return e.getRegExpStr()!==i}getSingleLanguageBracketTokens(t){let e=this.languageIdToBracketTokens.get(t);return e||(e=Hb.createFromLanguage(this.getLanguageConfiguration(t),this.denseKeyProvider),this.languageIdToBracketTokens.set(t,e)),e}};function sP(t){if(t.length===0)return null;if(t.length===1)return t[0];let e=0;function i(){if(e>=t.length)return null;const r=e,o=t[r].listHeight;for(e++;e<t.length&&t[e].listHeight===o;)e++;return e-r>=2?mx(r===0&&e===t.length?t:t.slice(r,e),!1):t[r]}let n=i(),s=i();if(!s)return n;for(let r=i();r;r=i())zb(n,s)<=zb(s,r)?(n=hg(n,s),s=r):s=hg(s,r);return hg(n,s)}function mx(t,e=!1){if(t.length===0)return null;if(t.length===1)return t[0];let i=t.length;for(;i>3;){const n=i>>1;for(let s=0;s<n;s++){const r=s<<1;t[s]=zn.create23(t[r],t[r+1],r+3===i?t[r+2]:null,e)}i=n}return zn.create23(t[0],t[1],i>=3?t[2]:null,e)}function zb(t,e){return Math.abs(t.listHeight-e.listHeight)}function hg(t,e){return t.listHeight===e.listHeight?zn.create23(t,e,null,!1):t.listHeight>e.listHeight?rP(t,e):oP(e,t)}function rP(t,e){t=t.toMutable();let i=t;const n=new Array;let s;for(;;){if(e.listHeight===i.listHeight){s=e;break}if(i.kind!==4)throw new Error("unexpected");n.push(i),i=i.makeLastElementMutable()}for(let r=n.length-1;r>=0;r--){const o=n[r];s?o.childrenLength>=3?s=zn.create23(o.unappendChild(),s,null,!1):(o.appendChildOfSameHeight(s),s=void 0):o.handleChildrenChanged()}return s?zn.create23(t,s,null,!1):t}function oP(t,e){t=t.toMutable();let i=t;const n=new Array;for(;e.listHeight!==i.listHeight;){if(i.kind!==4)throw new Error("unexpected");n.push(i),i=i.makeFirstElementMutable()}let s=e;for(let r=n.length-1;r>=0;r--){const o=n[r];s?o.childrenLength>=3?s=zn.create23(s,o.unprependChild(),null,!1):(o.prependChildOfSameHeight(s),s=void 0):o.handleChildrenChanged()}return s?zn.create23(s,t,null,!1):t}var aP=class{constructor(t){this.lastOffset=0,this.nextNodes=[t],this.offsets=[0],this.idxs=[]}readLongestNodeAt(t,e){if(fd(t,this.lastOffset))throw new Error("Invalid offset");for(this.lastOffset=t;;){const i=dl(this.nextNodes);if(!i)return;const n=dl(this.offsets);if(fd(t,n))return;if(fd(n,t))if(gt(n,i.length)<=t)this.nextNodeAfterCurrent();else{const s=cg(i);s!==-1?(this.nextNodes.push(i.getChild(s)),this.offsets.push(n),this.idxs.push(s)):this.nextNodeAfterCurrent()}else{if(e(i))return this.nextNodeAfterCurrent(),i;{const s=cg(i);if(s===-1){this.nextNodeAfterCurrent();return}else this.nextNodes.push(i.getChild(s)),this.offsets.push(n),this.idxs.push(s)}}}}nextNodeAfterCurrent(){for(;;){const t=dl(this.offsets),e=dl(this.nextNodes);if(this.nextNodes.pop(),this.offsets.pop(),this.idxs.length===0)break;const i=dl(this.nextNodes),n=cg(i,this.idxs[this.idxs.length-1]);if(n!==-1){this.nextNodes.push(i.getChild(n)),this.offsets.push(gt(t,e.length)),this.idxs[this.idxs.length-1]=n;break}else this.idxs.pop()}}};function cg(t,e=-1){for(;;){if(e++,e>=t.childrenLength)return-1;if(t.getChild(e))return e}}function dl(t){return t.length>0?t[t.length-1]:void 0}function Ub(t,e,i,n){return new lP(t,e,i,n).parseDocument()}var lP=class{constructor(t,e,i,n){if(this.tokenizer=t,this.createImmutableLists=n,this._itemsConstructed=0,this._itemsFromCache=0,i&&n)throw new Error("Not supported");this.oldNodeReader=i?new aP(i):void 0,this.positionMapper=new jO(e,t.length)}parseDocument(){this._itemsConstructed=0,this._itemsFromCache=0;let t=this.parseList(Gt.getEmpty());return t||(t=zn.getEmpty()),t}parseList(t){const e=new Array;for(;;){const i=this.tokenizer.peek();if(!i||i.kind===2&&i.bracketIds.intersects(t))break;const n=this.parseChild(t);n.kind===4&&n.childrenLength===0||e.push(n)}return this.oldNodeReader?sP(e):mx(e,this.createImmutableLists)}parseChild(t){if(this.oldNodeReader){const i=this.positionMapper.getDistanceToNextChange(this.tokenizer.offset);if(!zO(i)){const n=this.oldNodeReader.readLongestNodeAt(this.positionMapper.getOffsetBeforeChange(this.tokenizer.offset),s=>fd(s.length,i)?s.canBeReused(t):!1);if(n)return this._itemsFromCache++,this.tokenizer.skip(n.length),n}}this._itemsConstructed++;const e=this.tokenizer.read();switch(e.kind){case 2:return new QO(e.bracketIds,e.length);case 0:return e.astNode;case 1:{const i=t.merge(e.bracketIds),n=this.parseList(i),s=this.tokenizer.peek();return s&&s.kind===2&&(s.bracketId===e.bracketId||s.bracketIds.intersects(e.bracketIds))?(this.tokenizer.read(),Bb.create(e.astNode,n,s.astNode)):Bb.create(e.astNode,n,null)}default:throw new Error("unexpected")}}},hP=class extends V{constructor(t,e){if(super(),this.textModel=t,this.getLanguageConfiguration=e,this.didChangeEmitter=new M,this.denseKeyProvider=new GO,this.brackets=new nP(this.denseKeyProvider,this.getLanguageConfiguration),this.onDidChange=this.didChangeEmitter.event,t.backgroundTokenizationState===0){const i=this.brackets.getSingleLanguageBracketTokens(this.textModel.getLanguageId()),n=new tP(this.textModel.getValue(),i);this.initialAstWithoutTokens=Ub(n,[],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens}else t.backgroundTokenizationState===2?(this.initialAstWithoutTokens=void 0,this.astWithTokens=this.parseDocumentFromTextBuffer([],void 0,!1)):t.backgroundTokenizationState===1&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer([],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens)}didLanguageChange(t){return this.brackets.didLanguageChange(t)}
75handleDidChangeBackgroundTokenizationState(){if(this.textModel.backgroundTokenizationState===2){const t=this.initialAstWithoutTokens===void 0;this.initialAstWithoutTokens=void 0,t||this.didChangeEmitter.fire()}}handleDidChangeTokens({ranges:t}){const e=t.map(i=>new Pb(Be(i.fromLineNumber-1,0),Be(i.toLineNumber,0),Be(i.toLineNumber-i.fromLineNumber+1,0)));this.astWithTokens=this.parseDocumentFromTextBuffer(e,this.astWithTokens,!1),this.initialAstWithoutTokens||this.didChangeEmitter.fire()}handleContentChanged(t){const e=t.changes.map(i=>{const n=T.lift(i.range);return new Pb(fc(n.getStartPosition()),fc(n.getEndPosition()),KO(i.text))}).reverse();this.astWithTokens=this.parseDocumentFromTextBuffer(e,this.astWithTokens,!1),this.initialAstWithoutTokens&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer(e,this.initialAstWithoutTokens,!1))}parseDocumentFromTextBuffer(t,e,i){const n=e,s=new JO(this.textModel,this.brackets);return Ub(s,t,n,i)}getBracketsInRange(t){const e=Be(t.startLineNumber-1,t.startColumn-1),i=Be(t.endLineNumber-1,t.endColumn-1),n=new Array,s=this.initialAstWithoutTokens||this.astWithTokens;return g_(s,0,s.length,e,i,n),n}getBracketPairsInRange(t,e){const i=new Array,n=fc(t.getStartPosition()),s=fc(t.getEndPosition()),r=this.initialAstWithoutTokens||this.astWithTokens,o=new cP(i,e,this.textModel);return px(r,0,r.length,n,s,o),i}};function g_(t,e,i,n,s,r,o=0){if(t.kind===4)for(const a of t.children)i=gt(e,a.length),Wr(e,s)&&uc(i,n)&&g_(a,e,i,n,s,r,o),e=i;else if(t.kind===2){o++;{const a=t.openingBracket;if(i=gt(e,a.length),Wr(e,s)&&uc(i,n)){const l=Hr(e,i);r.push(new dc(l,o-1,!t.closingBracket))}e=i}if(t.child){const a=t.child;i=gt(e,a.length),Wr(e,s)&&uc(i,n)&&g_(a,e,i,n,s,r,o),e=i}if(t.closingBracket){const a=t.closingBracket;if(i=gt(e,a.length),Wr(e,s)&&uc(i,n)){const l=Hr(e,i);r.push(new dc(l,o-1,!1))}e=i}}else if(t.kind===3){const a=Hr(e,i);r.push(new dc(a,o-1,!0))}else if(t.kind===1){const a=Hr(e,i);r.push(new dc(a,o-1,!1))}}var cP=class{constructor(t,e,i){this.result=t,this.includeMinIndentation=e,this.textModel=i}};function px(t,e,i,n,s,r,o=0){var a;if(t.kind===2){const h=gt(e,t.openingBracket.length);let c=-1;r.includeMinIndentation&&(c=t.computeMinIndentation(e,r.textModel)),r.result.push(new WO(Hr(e,i),Hr(e,h),t.closingBracket?Hr(gt(h,((a=t.child)===null||a===void 0?void 0:a.length)||0),i):void 0,o,c)),o++}let l=e;for(const h of t.children){const c=l;l=gt(l,h.length),Wr(c,s)&&Wr(n,l)&&px(h,c,l,n,s,r,o)}}var dP=class extends V{constructor(t,e){super(),this.textModel=t,this.languageConfigurationService=e,this.bracketPairsTree=this._register(new Sy),this.onDidChangeEmitter=new M,this.onDidChange=this.onDidChangeEmitter.event,this.bracketsRequested=!1,this._register(this.languageConfigurationService.onDidChange(i=>{var n;(!i.languageId||!((n=this.bracketPairsTree.value)===null||n===void 0)&&n.object.didLanguageChange(i.languageId))&&(this.bracketPairsTree.clear(),this.updateBracketPairsTree())}))}get isDocumentSupported(){return this.textModel.getValueLength()<=5e6}handleDidChangeOptions(t){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeLanguage(t){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeContent(t){var e;(e=this.bracketPairsTree.value)===null||e===void 0||e.object.handleContentChanged(t)}handleDidChangeBackgroundTokenizationState(){var t;(t=this.bracketPairsTree.value)===null||t===void 0||t.object.handleDidChangeBackgroundTokenizationState()}handleDidChangeTokens(t){var e;(e=this.bracketPairsTree.value)===null||e===void 0||e.object.handleDidChangeTokens(t)}updateBracketPairsTree(){if(this.bracketsRequested&&this.isDocumentSupported){if(!this.bracketPairsTree.value){const t=new ne;this.bracketPairsTree.value=uP(t.add(new hP(this.textModel,e=>this.languageConfigurationService.getLanguageConfiguration(e))),t),t.add(this.bracketPairsTree.value.object.onDidChange(e=>this.onDidChangeEmitter.fire(e))),this.onDidChangeEmitter.fire()}}else this.bracketPairsTree.value&&(this.bracketPairsTree.clear(),this.onDidChangeEmitter.fire())}getBracketPairsInRange(t){var e;return this.bracketsRequested=!0,this.updateBracketPairsTree(),((e=this.bracketPairsTree.value)===null||e===void 0?void 0:e.object.getBracketPairsInRange(t,!1))||[]}getBracketPairsInRangeWithMinIndentation(t){var e;return this.bracketsRequested=!0,this.updateBracketPairsTree(),((e=this.bracketPairsTree.value)===null||e===void 0?void 0:e.object.getBracketPairsInRange(t,!0))||[]}getBracketsInRange(t){var e;return this.bracketsRequested=!0,this.updateBracketPairsTree(),((e=this.bracketPairsTree.value)===null||e===void 0?void 0:e.object.getBracketsInRange(t))||[]}
vendor: 5,104 bytes, line 75
75findMatchingBracketUp(t,e,i){const n=t.toLowerCase(),s=this.textModel.validatePosition(e),r=this.textModel.getLanguageIdAtPosition(s.lineNumber,s.column),o=this.languageConfigurationService.getLanguageConfiguration(r).brackets;if(!o)return null;const a=o.textIsBracket[n];return a?gc(this._findMatchingBracketUp(a,s,dg(i))):null}matchBracket(t,e){const i=dg(e);return this._matchBracket(this.textModel.validatePosition(t),i)}_establishBracketSearchOffsets(t,e,i,n){const s=e.getCount(),r=e.getLanguageId(n);let o=Math.max(0,t.column-1-i.maxBracketLength);for(let l=n-1;l>=0;l--){const h=e.getEndOffset(l);if(h<=o)break;if(kn(e.getStandardTokenType(l))||e.getLanguageId(l)!==r){o=h;break}}let a=Math.min(e.getLineContent().length,t.column-1+i.maxBracketLength);for(let l=n+1;l<s;l++){const h=e.getStartOffset(l);if(h>=a)break;if(kn(e.getStandardTokenType(l))||e.getLanguageId(l)!==r){a=h;break}}return{searchStartOffset:o,searchEndOffset:a}}_matchBracket(t,e){const i=t.lineNumber,n=this.textModel.getLineTokens(i),s=this.textModel.getLineContent(i),r=n.findTokenIndexAtOffset(t.column-1);if(r<0)return null;const o=this.languageConfigurationService.getLanguageConfiguration(n.getLanguageId(r)).brackets;if(o&&!kn(n.getStandardTokenType(r))){let{searchStartOffset:a,searchEndOffset:l}=this._establishBracketSearchOffsets(t,n,o,r),h=null;for(;;){const c=Pi.findNextBracketInRange(o.forwardRegex,i,s,a,l);if(!c)break;if(c.startColumn<=t.column&&t.column<=c.endColumn){const d=s.substring(c.startColumn-1,c.endColumn-1).toLowerCase(),u=this._matchFoundBracket(c,o.textIsBracket[d],o.textIsOpenBracket[d],e);if(u){if(u instanceof hs)return null;h=u}}a=c.endColumn-1}if(h)return h}if(r>0&&n.getStartOffset(r)===t.column-1){const a=r-1,l=this.languageConfigurationService.getLanguageConfiguration(n.getLanguageId(a)).brackets;if(l&&!kn(n.getStandardTokenType(a))){const{searchStartOffset:h,searchEndOffset:c}=this._establishBracketSearchOffsets(t,n,l,a),d=Pi.findPrevBracketInRange(l.reversedRegex,i,s,h,c);if(d&&d.startColumn<=t.column&&t.column<=d.endColumn){const u=s.substring(d.startColumn-1,d.endColumn-1).toLowerCase(),g=this._matchFoundBracket(d,l.textIsBracket[u],l.textIsOpenBracket[u],e);if(g)return g instanceof hs?null:g}}}return null}_matchFoundBracket(t,e,i,n){if(!e)return null;const s=i?this._findMatchingBracketDown(e,t.getEndPosition(),n):this._findMatchingBracketUp(e,t.getStartPosition(),n);return s?s instanceof hs?s:[t,s]:null}_findMatchingBracketUp(t,e,i){const n=t.languageId,s=t.reversedRegex;let r=-1,o=0;const a=(l,h,c,d)=>{for(;;){if(i&&++o%100===0&&!i())return hs.INSTANCE;const u=Pi.findPrevBracketInRange(s,l,h,c,d);if(!u)break;const g=h.substring(u.startColumn-1,u.endColumn-1).toLowerCase();if(t.isOpen(g)?r++:t.isClose(g)&&r--,r===0)return u;d=u.startColumn-1}return null};for(let l=e.lineNumber;l>=1;l--){const h=this.textModel.getLineTokens(l),c=h.getCount(),d=this.textModel.getLineContent(l);let u=c-1,g=d.length,m=d.length;l===e.lineNumber&&(u=h.findTokenIndexAtOffset(e.column-1),g=e.column-1,m=e.column-1);let _=!0;for(;u>=0;u--){const C=h.getLanguageId(u)===n&&!kn(h.getStandardTokenType(u));if(C)_?g=h.getStartOffset(u):(g=h.getStartOffset(u),m=h.getEndOffset(u));else if(_&&g!==m){const w=a(l,d,g,m);if(w)return w}_=C}if(_&&g!==m){const C=a(l,d,g,m);if(C)return C}}return null}_findMatchingBracketDown(t,e,i){const n=t.languageId,s=t.forwardRegex;let r=1,o=0;const a=(h,c,d,u)=>{for(;;){if(i&&++o%100===0&&!i())return hs.INSTANCE;const g=Pi.findNextBracketInRange(s,h,c,d,u);if(!g)break;const m=c.substring(g.startColumn-1,g.endColumn-1).toLowerCase();if(t.isOpen(m)?r++:t.isClose(m)&&r--,r===0)return g;d=g.endColumn-1}return null},l=this.textModel.getLineCount();for(let h=e.lineNumber;h<=l;h++){const c=this.textModel.getLineTokens(h),d=c.getCount(),u=this.textModel.getLineContent(h);let g=0,m=0,_=0;h===e.lineNumber&&(g=c.findTokenIndexAtOffset(e.column-1),m=e.column-1,_=e.column-1);let C=!0;for(;g<d;g++){const w=c.getLanguageId(g)===n&&!kn(c.getStandardTokenType(g));if(w)C||(m=c.getStartOffset(g)),_=c.getEndOffset(g);else if(C&&m!==_){const v=a(h,u,m,_);if(v)return v}C=w}if(C&&m!==_){const w=a(h,u,m,_);if(w)return w}}return null}findPrevBracket(t){const e=this.textModel.validatePosition(t);let i=null,n=null;for(let s=e.lineNumber;s>=1;s--){const r=this.textModel.getLineTokens(s),o=r.getCount(),a=this.textModel.getLineContent(s);let l=o-1,h=a.length,c=a.length;if(s===e.lineNumber){l=r.findTokenIndexAtOffset(e.column-1),h=e.column-1,c=e.column-1;const u=r.getLanguageId(l);i!==u&&(i=u,n=this.languageConfigurationService.getLanguageConfiguration(i).brackets)}let d=!0;for(;l>=0;l--){const u=r.getLanguageId(l);if(i!==u){if(n&&d&&h!==c){const m=Pi.findPrevBracketInRange(n.reversedRegex,s,a,h,c);if(m)return this._toFoundBracket(n,m);d=!1}i=u,n=this.languageConfigurationService.getLanguageConfiguration(i).brackets}const g=!!n&&!kn(r.getStandardTokenType(l));if(g)d?h=r.getStartOffset(l):(h=r.getStartOffset(l),c=r.getEndOffset(l));else if(n&&d&&h!==c){const m=Pi.findPrevBracketInRange(n.reversedRegex,s,a,h,c);if(m)return this._toFoundBracket(n,m)}
75d=g}if(n&&d&&h!==c){const u=Pi.findPrevBracketInRange(n.reversedRegex,s,a,h,c);if(u)return this._toFoundBracket(n,u)}}return null}findNextBracket(t){const e=this.textModel.validatePosition(t),i=this.textModel.getLineCount();let n=null,s=null;for(let r=e.lineNumber;r<=i;r++){const o=this.textModel.getLineTokens(r),a=o.getCount(),l=this.textModel.getLineContent(r);let h=0,c=0,d=0;if(r===e.lineNumber){h=o.findTokenIndexAtOffset(e.column-1),c=e.column-1,d=e.column-1;const g=o.getLanguageId(h);n!==g&&(n=g,s=this.languageConfigurationService.getLanguageConfiguration(n).brackets)}let u=!0;for(;h<a;h++){const g=o.getLanguageId(h);if(n!==g){if(s&&u&&c!==d){const _=Pi.findNextBracketInRange(s.forwardRegex,r,l,c,d);if(_)return this._toFoundBracket(s,_);u=!1}n=g,s=this.languageConfigurationService.getLanguageConfiguration(n).brackets}const m=!!s&&!kn(o.getStandardTokenType(h));if(m)u||(c=o.getStartOffset(h)),d=o.getEndOffset(h);else if(s&&u&&c!==d){const _=Pi.findNextBracketInRange(s.forwardRegex,r,l,c,d);if(_)return this._toFoundBracket(s,_)}u=m}if(s&&u&&c!==d){const g=Pi.findNextBracketInRange(s.forwardRegex,r,l,c,d);if(g)return this._toFoundBracket(s,g)}}return null}findEnclosingBrackets(t,e){const i=dg(e),n=this.textModel.validatePosition(t),s=this.textModel.getLineCount(),r=new Map;let o=[];const a=(u,g)=>{if(!r.has(u)){const m=[];for(let _=0,C=g?g.brackets.length:0;_<C;_++)m[_]=0;r.set(u,m)}o=r.get(u)};let l=0;const h=(u,g,m,_,C)=>{for(;;){if(i&&++l%100===0&&!i())return hs.INSTANCE;const w=Pi.findNextBracketInRange(u.forwardRegex,g,m,_,C);if(!w)break;const v=m.substring(w.startColumn-1,w.endColumn-1).toLowerCase(),b=u.textIsBracket[v];if(b&&(b.isOpen(v)?o[b.index]++:b.isClose(v)&&o[b.index]--,o[b.index]===-1))return this._matchFoundBracket(w,b,!1,i);_=w.endColumn-1}return null};let c=null,d=null;for(let u=n.lineNumber;u<=s;u++){const g=this.textModel.getLineTokens(u),m=g.getCount(),_=this.textModel.getLineContent(u);let C=0,w=0,v=0;if(u===n.lineNumber){C=g.findTokenIndexAtOffset(n.column-1),w=n.column-1,v=n.column-1;const y=g.getLanguageId(C);c!==y&&(c=y,d=this.languageConfigurationService.getLanguageConfiguration(c).brackets,a(c,d))}let b=!0;for(;C<m;C++){const y=g.getLanguageId(C);if(c!==y){if(d&&b&&w!==v){const S=h(d,u,_,w,v);if(S)return gc(S);b=!1}c=y,d=this.languageConfigurationService.getLanguageConfiguration(c).brackets,a(c,d)}const k=!!d&&!kn(g.getStandardTokenType(C));if(k)b||(w=g.getStartOffset(C)),v=g.getEndOffset(C);else if(d&&b&&w!==v){const S=h(d,u,_,w,v);if(S)return gc(S)}b=k}if(d&&b&&w!==v){const y=h(d,u,_,w,v);if(y)return gc(y)}}return null}_toFoundBracket(t,e){if(!e)return null;let i=this.textModel.getValueInRange(e);i=i.toLowerCase();const n=t.textIsBracket[i];return n?{range:e,open:n.open,close:n.close,isOpen:t.textIsOpenBracket[i]}:null}};function uP(t,e){return{object:t,dispose:()=>e?.dispose()}}function dg(t){if(typeof t>"u")return()=>!0;{const e=Date.now();return()=>Date.now()-e<=t}}var hs=class{constructor(){this._searchCanceledBrand=void 0}};hs.INSTANCE=new hs;function gc(t){return t instanceof hs?null:t}var fP=class extends V{constructor(t){super(),this.textModel=t,this.colorProvider=new _x,this.onDidChangeEmitter=new M,this.onDidChange=this.onDidChangeEmitter.event,this.colorizationOptions=t.getOptions().bracketPairColorizationOptions,this._register(t.bracketPairs.onDidChange(e=>{this.onDidChangeEmitter.fire()}))}handleDidChangeOptions(t){this.colorizationOptions=this.textModel.getOptions().bracketPairColorizationOptions}getDecorationsInRange(t,e,i){if(e===void 0)return[];if(!this.colorizationOptions.enabled)return[];const n=new Array,s=this.textModel.bracketPairs.getBracketsInRange(t);for(const r of s)n.push({id:`bracket${r.range.toString()}-${r.nestingLevel}`,options:{description:"BracketPairColorization",inlineClassName:this.colorProvider.getInlineClassName(r)},ownerId:0,range:r.range});return n}getAllDecorations(t,e){return t===void 0?[]:this.colorizationOptions.enabled?this.getDecorationsInRange(new T(1,1,this.textModel.getLineCount(),1),t,e):[]}},_x=class{constructor(){this.unexpectedClosingBracketClassName="unexpected-closing-bracket"}getInlineClassName(t){return t.isInvalid?this.unexpectedClosingBracketClassName:this.getInlineClassNameOfLevel(t.nestingLevel)}getInlineClassNameOfLevel(t){return`bracket-highlighting-${t%30}`}};Yt((t,e)=>{const i=[yk,Lk,kk,xk,Ik,Ek],n=new _x;
vendor: 10,112 bytes, line 75
75e.addRule(`.monaco-editor .${n.unexpectedClosingBracketClassName} { color: ${t.getColor(S7)}; }`);const s=i.map(r=>t.getColor(r)).filter(r=>!!r).filter(r=>!r.isTransparent());for(let r=0;r<30;r++){const o=s[r%s.length];e.addRule(`.monaco-editor .${n.getInlineClassNameOfLevel(r)} { color: ${o}; }`)}});function mc(t){return t.replace(/\n/g,"\\n").replace(/\r/g,"\\r")}var Dn=class xn{constructor(e,i,n,s){this.oldPosition=e,this.oldText=i,this.newPosition=n,this.newText=s}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} "${mc(this.newText)}")`:this.newText.length===0?`(delete@${this.oldPosition} "${mc(this.oldText)}")`:`(replace@${this.oldPosition} "${mc(this.oldText)}" with "${mc(this.newText)}")`}static _writeStringSize(e){return 4+2*e.length}static _writeString(e,i,n){const s=i.length;on(e,s,n),n+=4;for(let r=0;r<s;r++)uT(e,i.charCodeAt(r),n),n+=2;return n}static _readString(e,i){const n=rn(e,i);return i+=4,Gm(e,i,n)}writeSize(){return 8+xn._writeStringSize(this.oldText)+xn._writeStringSize(this.newText)}write(e,i){return on(e,this.oldPosition,i),i+=4,on(e,this.newPosition,i),i+=4,i=xn._writeString(e,this.oldText,i),i=xn._writeString(e,this.newText,i),i}static read(e,i,n){const s=rn(e,i);i+=4;const r=rn(e,i);i+=4;const o=xn._readString(e,i);i+=xn._writeStringSize(o);const a=xn._readString(e,i);return i+=xn._writeStringSize(a),n.push(new xn(s,o,r,a)),i}};function gP(t,e){return t===null||t.length===0?e:new mP(t,e).compress()}var mP=class ts{constructor(e,i){this._prevEdits=e,this._currEdits=i,this._result=[],this._resultLen=0,this._prevLen=this._prevEdits.length,this._prevDeltaOffset=0,this._currLen=this._currEdits.length,this._currDeltaOffset=0}compress(){let e=0,i=0,n=this._getPrev(e),s=this._getCurr(i);for(;e<this._prevLen||i<this._currLen;){if(n===null){this._acceptCurr(s),s=this._getCurr(++i);continue}if(s===null){this._acceptPrev(n),n=this._getPrev(++e);continue}if(s.oldEnd<=n.newPosition){this._acceptCurr(s),s=this._getCurr(++i);continue}if(n.newEnd<=s.oldPosition){this._acceptPrev(n),n=this._getPrev(++e);continue}if(s.oldPosition<n.newPosition){const[l,h]=ts._splitCurr(s,n.newPosition-s.oldPosition);this._acceptCurr(l),s=h;continue}if(n.newPosition<s.oldPosition){const[l,h]=ts._splitPrev(n,s.oldPosition-n.newPosition);this._acceptPrev(l),n=h;continue}let o,a;if(s.oldEnd===n.newEnd)o=n,a=s,n=this._getPrev(++e),s=this._getCurr(++i);else if(s.oldEnd<n.newEnd){const[l,h]=ts._splitPrev(n,s.oldLength);o=l,a=s,n=h,s=this._getCurr(++i)}else{const[l,h]=ts._splitCurr(s,n.newLength);o=n,a=l,n=this._getPrev(++e),s=h}this._result[this._resultLen++]=new Dn(o.oldPosition,o.oldText,a.newPosition,a.newText),this._prevDeltaOffset+=o.newLength-o.oldLength,this._currDeltaOffset+=a.newLength-a.oldLength}const r=ts._merge(this._result);return ts._removeNoOps(r)}_acceptCurr(e){this._result[this._resultLen++]=ts._rebaseCurr(this._prevDeltaOffset,e),this._currDeltaOffset+=e.newLength-e.oldLength}_getCurr(e){return e<this._currLen?this._currEdits[e]:null}_acceptPrev(e){this._result[this._resultLen++]=ts._rebasePrev(this._currDeltaOffset,e),this._prevDeltaOffset+=e.newLength-e.oldLength}_getPrev(e){return e<this._prevLen?this._prevEdits[e]:null}static _rebaseCurr(e,i){return new Dn(i.oldPosition-e,i.oldText,i.newPosition,i.newText)}static _rebasePrev(e,i){return new Dn(i.oldPosition,i.oldText,i.newPosition+e,i.newText)}static _splitPrev(e,i){const n=e.newText.substr(0,i),s=e.newText.substr(i);return[new Dn(e.oldPosition,e.oldText,e.newPosition,n),new Dn(e.oldEnd,"",e.newPosition+i,s)]}static _splitCurr(e,i){const n=e.oldText.substr(0,i),s=e.oldText.substr(i);return[new Dn(e.oldPosition,n,e.newPosition,e.newText),new Dn(e.oldPosition+i,s,e.newEnd,"")]}static _merge(e){if(e.length===0)return e;const i=[];let n=0,s=e[0];for(let r=1;r<e.length;r++){const o=e[r];s.oldEnd===o.oldPosition?s=new Dn(s.oldPosition,s.oldText+o.oldText,s.newPosition,s.newText+o.newText):(i[n++]=s,s=o)}return i[n++]=s,i}static _removeNoOps(e){if(e.length===0)return e;const i=[];let n=0;for(let s=0;s<e.length;s++){const r=e[s];r.oldText!==r.newText&&(i[n++]=r)}return i}};function xs(t){return t===47||t===92}function vx(t){return t.replace(/[\\/]/g,Ze.sep)}function pP(t){return t.indexOf("/")===-1&&(t=vx(t)),/^[a-zA-Z]:(\/|$)/.test(t)&&(t="/"+t),t}function $b(t,e=Ze.sep){if(!t)return"";const i=t.length,n=t.charCodeAt(0);if(xs(n)){if(xs(t.charCodeAt(1))&&!xs(t.charCodeAt(2))){let r=3;const o=r;for(;r<i&&!xs(t.charCodeAt(r));r++);if(o!==r&&!xs(t.charCodeAt(r+1))){for(r+=1;r<i;r++)if(xs(t.charCodeAt(r)))return t.slice(0,r+1).replace(/[\\/]/g,e)}}return e}else if(_P(n)&&t.charCodeAt(1)===58)return xs(t.charCodeAt(2))?t.slice(0,2)+e:t.slice(0,2);let s=t.indexOf("://");if(s!==-1){for(s+=3;s<i;s++)if(xs(t.charCodeAt(s)))return t.slice(0,s+1)}return""}function m_(t,e,i,n=$r){if(t===e)return!0;if(!t||!e||e.length>t.length)return!1;if(i){if(!sv(t,e))return!1;if(e.length===t.length)return!0;let s=e.length;return e.charAt(e.length-1)===n&&s--,t.charAt(s)===n}return e.charAt(e.length-1)!==n&&(e+=n),t.indexOf(e)===0}function _P(t){return t>=65&&t<=90||t>=97&&t<=122}function Yn(t){return Wd(t,!0)}var Yv=class{constructor(t){this._ignorePathCasing=t}compare(t,e,i=!1){return t===e?0:zm(this.getComparisonKey(t,i),this.getComparisonKey(e,i))}isEqual(t,e,i=!1){return t===e?!0:!t||!e?!1:this.getComparisonKey(t,i)===this.getComparisonKey(e,i)}getComparisonKey(t,e=!1){return t.with({path:this._ignorePathCasing(t)?t.path.toLowerCase():void 0,fragment:e?null:void 0}).toString()}isEqualOrParent(t,e,i=!1){if(t.scheme===e.scheme){if(t.scheme===_e.file)return m_(Yn(t),Yn(e),this._ignorePathCasing(t))&&t.query===e.query&&(i||t.fragment===e.fragment);if(Kb(t.authority,e.authority))return m_(t.path,e.path,this._ignorePathCasing(t),"/")&&t.query===e.query&&(i||t.fragment===e.fragment)}return!1}joinPath(t,...e){return Le.joinPath(t,...e)}basenameOrAuthority(t){return Cx(t)||t.authority}basename(t){return Ze.basename(t.path)}extname(t){return Ze.extname(t.path)}dirname(t){if(t.path.length===0)return t;let e;return t.scheme===_e.file?e=Le.file(C4(Yn(t))).path:(e=Ze.dirname(t.path),t.authority&&e.length&&e.charCodeAt(0)!==47&&(e="/")),t.with({path:e})}normalizePath(t){if(!t.path.length)return t;let e;return t.scheme===_e.file?e=Le.file(Ty(Yn(t))).path:e=Ze.normalize(t.path),t.with({path:e})}relativePath(t,e){if(t.scheme!==e.scheme||!Kb(t.authority,e.authority))return;if(t.scheme===_e.file){const s=v4(Yn(t),Yn(e));return ei?vx(s):s}let i=t.path||"/",n=e.path||"/";if(this._ignorePathCasing(t)){let s=0;for(const r=Math.min(i.length,n.length);s<r&&!(i.charCodeAt(s)!==n.charCodeAt(s)&&i.charAt(s).toLowerCase()!==n.charAt(s).toLowerCase());s++);i=n.substr(0,s)+i.substr(s)}return Ze.relative(i,n)}resolvePath(t,e){if(t.scheme===_e.file){const i=Le.file(_4(Yn(t),e));return t.with({authority:i.authority,path:i.path})}return e=pP(e),t.with({path:Ze.resolve(t.path,e)})}isAbsolutePath(t){return!!t.path&&t.path[0]==="/"}isEqualAuthority(t,e){return t===e||t!==void 0&&e!==void 0&&jo(t,e)}hasTrailingPathSeparator(t,e=$r){if(t.scheme===_e.file){const i=Yn(t);return i.length>$b(i).length&&i[i.length-1]===e}else{const i=t.path;return i.length>1&&i.charCodeAt(i.length-1)===47&&!/^[a-zA-Z]:(\/$|\\$)/.test(t.fsPath)}}removeTrailingPathSeparator(t,e=$r){return jb(t,e)?t.with({path:t.path.substr(0,t.path.length-1)}):t}addTrailingPathSeparator(t,e=$r){let i=!1;if(t.scheme===_e.file){const n=Yn(t);i=n!==void 0&&n.length===$b(n).length&&n[n.length-1]===e}else{e="/";const n=t.path;i=n.length===1&&n.charCodeAt(n.length-1)===47}return!i&&!jb(t,e)?t.with({path:t.path+"/"}):t}},Ne=new Yv(()=>!1),g$=new Yv(t=>t.scheme===_e.file?!Bt:!0),m$=new Yv(t=>!0),p$=Ne.isEqual.bind(Ne),_$=Ne.isEqualOrParent.bind(Ne),v$=Ne.getComparisonKey.bind(Ne),C$=Ne.basenameOrAuthority.bind(Ne),Cx=Ne.basename.bind(Ne),b$=Ne.extname.bind(Ne),w$=Ne.dirname.bind(Ne),S$=Ne.joinPath.bind(Ne),vP=Ne.normalizePath.bind(Ne),y$=Ne.relativePath.bind(Ne),L$=Ne.resolvePath.bind(Ne),k$=Ne.isAbsolutePath.bind(Ne),Kb=Ne.isEqualAuthority.bind(Ne),jb=Ne.hasTrailingPathSeparator.bind(Ne),x$=Ne.removeTrailingPathSeparator.bind(Ne),I$=Ne.addTrailingPathSeparator.bind(Ne),uu;(function(t){t.META_DATA_LABEL="label",t.META_DATA_DESCRIPTION="description",t.META_DATA_SIZE="size",t.META_DATA_MIME="mime";function e(i){const n=new Map;i.path.substring(i.path.indexOf(";")+1,i.path.lastIndexOf(";")).split(";").forEach(r=>{const[o,a]=r.split(":");o&&a&&n.set(o,a)});const s=i.path.substring(0,i.path.indexOf(";"));return s&&n.set(t.META_DATA_MIME,s),n}t.parseMetaData=e})(uu||(uu={}));function Do(t){return t.toString()}var bi=class is{constructor(e,i,n,s,r,o,a){this.beforeVersionId=e,this.afterVersionId=i,this.beforeEOL=n,this.afterEOL=s,this.beforeCursorState=r,this.afterCursorState=o,this.changes=a}static create(e,i){const n=e.getAlternativeVersionId(),s=p_(e);return new is(n,n,s,s,i,i,[])}append(e,i,n,s,r){i.length>0&&(this.changes=gP(this.changes,i)),this.afterEOL=n,this.afterVersionId=s,this.afterCursorState=r}static _writeSelectionsSize(e){return 4+16*(e?e.length:0)}static _writeSelections(e,i,n){if(on(e,i?i.length:0,n),n+=4,i)for(const s of i)on(e,s.selectionStartLineNumber,n),n+=4,on(e,s.selectionStartColumn,n),n+=4,on(e,s.positionLineNumber,n),n+=4,on(e,s.positionColumn,n),n+=4;return n}static _readSelections(e,i,n){const s=rn(e,i);i+=4;for(let r=0;r<s;r++){const o=rn(e,i);i+=4;const a=rn(e,i);i+=4;const l=rn(e,i);i+=4;const h=rn(e,i);i+=4,n.push(new xe(o,a,l,h))}return i}serialize(){let e=10+is._writeSelectionsSize(this.beforeCursorState)+is._writeSelectionsSize(this.afterCursorState)+4;for(const s of this.changes)e+=s.writeSize();const i=new Uint8Array(e);let n=0;on(i,this.beforeVersionId,n),n+=4,on(i,this.afterVersionId,n),n+=4,cC(i,this.beforeEOL,n),n+=1,cC(i,this.afterEOL,n),n+=1,n=is._writeSelections(i,this.beforeCursorState,n),n=is._writeSelections(i,this.afterCurs
75orState,n),on(i,this.changes.length,n),n+=4;for(const s of this.changes)n=s.write(i,n);return i.buffer}static deserialize(e){const i=new Uint8Array(e);let n=0;const s=rn(i,n);n+=4;const r=rn(i,n);n+=4;const o=hC(i,n);n+=1;const a=hC(i,n);n+=1;const l=[];n=is._readSelections(i,n,l);const h=[];n=is._readSelections(i,n,h);const c=rn(i,n);n+=4;const d=[];for(let u=0;u<c;u++)n=Dn.read(i,n,d);return new is(s,r,o,a,l,h,d)}},bx=class{constructor(t,e){this.model=t,this._data=bi.create(t,e)}get type(){return 0}get resource(){return Le.isUri(this.model)?this.model:this.model.uri}get label(){return p("edit","Typing")}toString(){return(this._data instanceof bi?this._data:bi.deserialize(this._data)).changes.map(t=>t.toString()).join(", ")}matchesResource(t){return(Le.isUri(this.model)?this.model:this.model.uri).toString()===t.toString()}setModel(t){this.model=t}canAppend(t){return this.model===t&&this._data instanceof bi}append(t,e,i,n,s){this._data instanceof bi&&this._data.append(t,e,i,n,s)}close(){this._data instanceof bi&&(this._data=this._data.serialize())}open(){this._data instanceof bi||(this._data=bi.deserialize(this._data))}undo(){if(Le.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof bi&&(this._data=this._data.serialize());const t=bi.deserialize(this._data);this.model._applyUndo(t.changes,t.beforeEOL,t.beforeVersionId,t.beforeCursorState)}redo(){if(Le.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof bi&&(this._data=this._data.serialize());const t=bi.deserialize(this._data);this.model._applyRedo(t.changes,t.afterEOL,t.afterVersionId,t.afterCursorState)}heapSize(){return this._data instanceof bi&&(this._data=this._data.serialize()),this._data.byteLength+168}},CP=class{constructor(t,e){this.type=1,this.label=t,this._isOpen=!0,this._editStackElementsArr=e.slice(0),this._editStackElementsMap=new Map;for(const i of this._editStackElementsArr){const n=Do(i.resource);this._editStackElementsMap.set(n,i)}this._delegate=null}get resources(){return this._editStackElementsArr.map(t=>t.resource)}prepareUndoRedo(){if(this._delegate)return this._delegate.prepareUndoRedo(this)}matchesResource(t){const e=Do(t);return this._editStackElementsMap.has(e)}setModel(t){const e=Do(Le.isUri(t)?t:t.uri);this._editStackElementsMap.has(e)&&this._editStackElementsMap.get(e).setModel(t)}canAppend(t){if(!this._isOpen)return!1;const e=Do(t.uri);return this._editStackElementsMap.has(e)?this._editStackElementsMap.get(e).canAppend(t):!1}append(t,e,i,n,s){const r=Do(t.uri);this._editStackElementsMap.get(r).append(t,e,i,n,s)}close(){this._isOpen=!1}open(){}undo(){this._isOpen=!1;for(const t of this._editStackElementsArr)t.undo()}redo(){for(const t of this._editStackElementsArr)t.redo()}heapSize(t){const e=Do(t);return this._editStackElementsMap.has(e)?this._editStackElementsMap.get(e).heapSize():0}split(){return this._editStackElementsArr}toString(){let t=[];for(const e of this._editStackElementsArr)t.push(`${Cx(e.resource)}: ${e}`);return`{${t.join(", ")}}`}};function p_(t){return t.getEOL()===`
76`?0:1}function cs(t){return t?t instanceof bx||t instanceof CP:!1}var bP=class wx{constructor(e,i){this._model=e,this._undoRedoService=i}pushStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);cs(e)&&e.close()}popStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);cs(e)&&e.open()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(e){const i=this._undoRedoService.getLastElement(this._model.uri);if(cs(i)&&i.canAppend(this._model))return i;const n=new bx(this._model,e);return this._undoRedoService.pushElement(n),n}pushEOL(e){const i=this._getOrCreateEditStackElement(null);this._model.setEOL(e),i.append(this._model,[],p_(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(e,i,n){const s=this._getOrCreateEditStackElement(e),r=this._model.applyEdits(i,!0),o=wx._computeCursorState(n,r),a=r.map((l,h)=>({index:h,textChange:l.textChange}));return a.sort((l,h)=>l.textChange.oldPosition===h.textChange.oldPosition?l.index-h.index:l.textChange.oldPosition-h.textChange.oldPosition),s.append(this._model,a.map(l=>l.textChange),p_(this._model),this._model.getAlternativeVersionId(),o),o}static _computeCursorState(e,i){try{return e?e(i):null}catch(n){return We(n),null}}},wP=class{constructor(){this.spacesDiff=0,this.looksLikeAlignment=!1}};
vendor: 37,429 bytes, lines 76-83
76function SP(t,e,i,n,s){s.spacesDiff=0,s.looksLikeAlignment=!1;let r=0;for(;r<e&&r<n&&t.charCodeAt(r)===i.charCodeAt(r);r++);let o=0,a=0;for(let u=r;u<e;u++)t.charCodeAt(u)===32?o++:a++;let l=0,h=0;for(let u=r;u<n;u++)i.charCodeAt(u)===32?l++:h++;if(o>0&&a>0||l>0&&h>0)return;const c=Math.abs(a-h),d=Math.abs(o-l);if(c===0){s.spacesDiff=d,d>0&&0<=l-1&&l-1<t.length&&l<i.length&&i.charCodeAt(l)!==32&&t.charCodeAt(l-1)===32&&t.charCodeAt(t.length-1)===44&&(s.looksLikeAlignment=!0);return}if(d%c===0){s.spacesDiff=d/c;return}}function qb(t,e,i){const n=Math.min(t.getLineCount(),1e4);let s=0,r=0,o="",a=0;const l=[2,4,6,8,3,5,7],h=8,c=[0,0,0,0,0,0,0,0,0],d=new wP;for(let m=1;m<=n;m++){const _=t.getLineLength(m),C=t.getLineContent(m),w=_<=65536;let v=!1,b=0,y=0,k=0;for(let L=0,x=_;L<x;L++){const E=w?C.charCodeAt(L):t.getLineCharCode(m,L);if(E===9)k++;else if(E===32)y++;else{v=!0,b=L;break}}if(!v||(k>0?s++:y>1&&r++,SP(o,a,C,b,d),d.looksLikeAlignment&&!(i&&e===d.spacesDiff)))continue;const S=d.spacesDiff;S<=h&&c[S]++,o=C,a=b}let u=i;s!==r&&(u=s<r);let g=e;if(u){let m=u?0:.1*n;l.forEach(_=>{const C=c[_];C>m&&(m=C,g=_)}),g===4&&c[4]>0&&c[2]>0&&c[2]>=c[4]/2&&(g=2)}return{insertSpaces:u,tabSize:g}}function Ht(t){return(t.metadata&1)>>>0}function be(t,e){t.metadata=t.metadata&254|e<<0}function mt(t){return(t.metadata&2)>>>1===1}function Ce(t,e){t.metadata=t.metadata&253|(e?1:0)<<1}function Sx(t){return(t.metadata&4)>>>2===1}function Gb(t,e){t.metadata=t.metadata&251|(e?1:0)<<2}function yP(t){return(t.metadata&24)>>>3}function Zb(t,e){t.metadata=t.metadata&231|e<<3}function LP(t){return(t.metadata&32)>>>5===1}function Yb(t,e){t.metadata=t.metadata&223|(e?1:0)<<5}var yx=class{constructor(t,e,i){this.metadata=0,this.parent=this,this.left=this,this.right=this,be(this,1),this.start=e,this.end=i,this.delta=0,this.maxEnd=i,this.id=t,this.ownerId=0,this.options=null,Gb(this,!1),Zb(this,1),Yb(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=e,this.cachedAbsoluteEnd=i,this.range=null,Ce(this,!1)}reset(t,e,i,n){this.start=e,this.end=i,this.maxEnd=i,this.cachedVersionId=t,this.cachedAbsoluteStart=e,this.cachedAbsoluteEnd=i,this.range=n}setOptions(t){this.options=t;const e=this.options.className;Gb(this,e==="squiggly-error"||e==="squiggly-warning"||e==="squiggly-info"),Zb(this,this.options.stickiness),Yb(this,this.options.collapseOnReplaceEdit)}setCachedOffsets(t,e,i){this.cachedVersionId!==i&&(this.range=null),this.cachedVersionId=i,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=e}detach(){this.parent=null,this.left=null,this.right=null}},ee=new yx(null,0,0);ee.parent=ee;ee.left=ee;ee.right=ee;be(ee,0);var ug=class{constructor(){this.root=ee,this.requestNormalizeDelta=!1}intervalSearch(t,e,i,n,s){return this.root===ee?[]:MP(this,t,e,i,n,s)}search(t,e,i){return this.root===ee?[]:TP(this,t,e,i)}collectNodesFromOwner(t){return DP(this,t)}collectNodesPostOrder(){return NP(this)}insert(t){Xb(this,t),this._normalizeDeltaIfNecessary()}delete(t){Qb(this,t),this._normalizeDeltaIfNecessary()}resolveNode(t,e){const i=t;let n=0;for(;t!==this.root;)t===t.parent.right&&(n+=t.parent.delta),t=t.parent;const s=i.start+n,r=i.end+n;i.setCachedOffsets(s,r,e)}acceptReplace(t,e,i,n){const s=IP(this,t,t+e);for(let r=0,o=s.length;r<o;r++){const a=s[r];Qb(this,a)}this._normalizeDeltaIfNecessary(),EP(this,t,t+e,i),this._normalizeDeltaIfNecessary();for(let r=0,o=s.length;r<o;r++){const a=s[r];a.start=a.cachedAbsoluteStart,a.end=a.cachedAbsoluteEnd,xP(a,t,t+e,i,n),a.maxEnd=a.end,Xb(this,a)}this._normalizeDeltaIfNecessary()}_normalizeDeltaIfNecessary(){this.requestNormalizeDelta&&(this.requestNormalizeDelta=!1,kP(this))}};function kP(t){let e=t.root,i=0;for(;e!==ee;){if(e.left!==ee&&!mt(e.left)){e=e.left;continue}if(e.right!==ee&&!mt(e.right)){i+=e.delta,e=e.right;continue}e.start=i+e.start,e.end=i+e.end,e.delta=0,rr(e),Ce(e,!0),Ce(e.left,!1),Ce(e.right,!1),e===e.parent.right&&(i-=e.parent.delta),e=e.parent}Ce(t.root,!1)}function No(t,e,i,n){return t<i?!0:t>i||n===1?!1:n===2?!0:e}function xP(t,e,i,n,s){const r=yP(t),o=r===0||r===2,a=r===1||r===2,l=i-e,h=n,c=Math.min(l,h),d=t.start;let u=!1;const g=t.end;let m=!1;e<=d&&g<=i&&LP(t)&&(t.start=e,u=!0,t.end=e,m=!0);{const C=s?1:l>0?2:0;!u&&No(d,o,e,C)&&(u=!0),!m&&No(g,a,e,C)&&(m=!0)}if(c>0&&!s){const C=l>h?2:0;!u&&No(d,o,e+c,C)&&(u=!0),!m&&No(g,a,e+c,C)&&(m=!0)}{const C=s?1:0;!u&&No(d,o,i,C)&&(t.start=e+h,u=!0),!m&&No(g,a,i,C)&&(t.end=e+h,m=!0)}const _=h-l;u||(t.start=Math.max(0,d+_)),m||(t.end=Math.max(0,g+_)),t.start>t.end&&(t.end=t.start)}function IP(t,e,i){let n=t.root,s=0,r=0,o=0,a=0;const l=[];let h=0;for(;n!==ee;){if(mt(n)){Ce(n.left,!1),Ce(n.right,!1),n===n.parent.right&&(s-=n.parent.delta),n=n.parent;continue}if(!mt(n.left)){if(r=s+n.maxEnd,r<e){Ce(n,!0);continue}if(n.left!==ee){n=n.left;continue}}if(o=s+n.start,o>i){Ce(n,!0);continue}if(a=s+n.end,a>=e&&(n.setCachedOffsets(o,a,0),l[h++]=n),Ce(n,!0),n.right!==ee&&!mt(n.right)){s+=n.delta,n=n.right;continue}}return Ce(t.root,!1),l}function EP(t,e,i,n){let s=t.root,r=0,o=0,a=0;const l=n-(i-e);for(;s!==ee;){if(mt(s)){Ce(s.left,!1),Ce(s.right,!1),s===s.parent.right&&(r-=s.parent.delta),rr(s),s=s.parent;continue}if(!mt(s.left)){if(o=r+s.maxEnd,o<e){Ce(s,!0);continue}if(s.left!==ee){s=s.left;continue}}if(a=r+s.start,a>i){s.start+=l,s.end+=l,s.delta+=l,(s.delta<-1073741824||s.delta>1073741824)&&(t.requestNormalizeDelta=!0),Ce(s,!0);continue}if(Ce(s,!0),s.right!==ee&&!mt(s.right)){r+=s.delta,s=s.right;continue}}Ce(t.root,!1)}function DP(t,e){let i=t.root;const n=[];let s=0;for(;i!==ee;){if(mt(i)){Ce(i.left,!1),Ce(i.right,!1),i=i.parent;continue}if(i.left!==ee&&!mt(i.left)){i=i.left;continue}if(i.ownerId===e&&(n[s++]=i),Ce(i,!0),i.right!==ee&&!mt(i.right)){i=i.right;continue}}return Ce(t.root,!1),n}function NP(t){let e=t.root;const i=[];let n=0;for(;e!==ee;){if(mt(e)){Ce(e.left,!1),Ce(e.right,!1),e=e.parent;continue}if(e.left!==ee&&!mt(e.left)){e=e.left;continue}if(e.right!==ee&&!mt(e.right)){e=e.right;continue}i[n++]=e,Ce(e,!0)}return Ce(t.root,!1),i}function TP(t,e,i,n){let s=t.root,r=0,o=0,a=0;const l=[];let h=0;for(;s!==ee;){if(mt(s)){Ce(s.left,!1),Ce(s.right,!1),s===s.parent.right&&(r-=s.parent.delta),s=s.parent;continue}if(s.left!==ee&&!mt(s.left)){s=s.left;continue}o=r+s.start,a=r+s.end,s.setCachedOffsets(o,a,n);let c=!0;if(e&&s.ownerId&&s.ownerId!==e&&(c=!1),i&&Sx(s)&&(c=!1),c&&(l[h++]=s),Ce(s,!0),s.right!==ee&&!mt(s.right)){r+=s.delta,s=s.right;continue}}return Ce(t.root,!1),l}function MP(t,e,i,n,s,r){let o=t.root,a=0,l=0,h=0,c=0;const d=[];let u=0;for(;o!==ee;){if(mt(o)){Ce(o.left,!1),Ce(o.right,!1),o===o.parent.right&&(a-=o.parent.delta),o=o.parent;continue}if(!mt(o.left)){if(l=a+o.maxEnd,l<e){Ce(o,!0);continue}if(o.left!==ee){o=o.left;continue}}if(h=a+o.start,h>i){Ce(o,!0);continue}if(c=a+o.end,c>=e){o.setCachedOffsets(h,c,r);let g=!0;n&&o.ownerId&&o.ownerId!==n&&(g=!1),s&&Sx(o)&&(g=!1),g&&(d[u++]=o)}if(Ce(o,!0),o.right!==ee&&!mt(o.right)){a+=o.delta,o=o.right;continue}}return Ce(t.root,!1),d}function Xb(t,e){if(t.root===ee)return e.parent=ee,e.left=ee,e.right=ee,be(e,0),t.root=e,t.root;RP(t,e),Rs(e.parent);let i=e;for(;i!==t.root&&Ht(i.parent)===1;)if(i.parent===i.parent.parent.left){const n=i.parent.parent.right;Ht(n)===1?(be(i.parent,0),be(n,0),be(i.parent.parent,1),i=i.parent.parent):(i===i.parent.right&&(i=i.parent,ql(t,i)),be(i.parent,0),be(i.parent.parent,1),Gl(t,i.parent.parent))}else{const n=i.parent.parent.left;Ht(n)===1?(be(i.parent,0),be(n,0),be(i.parent.parent,1),i=i.parent.parent):(i===i.parent.left&&(i=i.parent,Gl(t,i)),be(i.parent,0),be(i.parent.parent,1),ql(t,i.parent.parent))}return be(t.root,0),e}function RP(t,e){let i=0,n=t.root;const s=e.start,r=e.end;for(;;)if(OP(s,r,n.start+i,n.end+i)<0)if(n.left===ee){e.start-=i,e.end-=i,e.maxEnd-=i,n.left=e;break}else n=n.left;else if(n.right===ee){e.start-=i+n.delta,e.end-=i+n.delta,e.maxEnd-=i+n.delta,n.right=e;break}else i+=n.delta,n=n.right;e.parent=n,e.left=ee,e.right=ee,be(e,1)}function Qb(t,e){let i,n;if(e.left===ee?(i=e.right,n=e,i.delta+=e.delta,(i.delta<-1073741824||i.delta>1073741824)&&(t.requestNormalizeDelta=!0),i.start+=e.delta,i.end+=e.delta):e.right===ee?(i=e.left,n=e):(n=AP(e.right),i=n.right,i.start+=n.delta,i.end+=n.delta,i.delta+=n.delta,(i.delta<-1073741824||i.delta>1073741824)&&(t.requestNormalizeDelta=!0),n.start+=e.delta,n.end+=e.delta,n.delta=e.delta,(n.delta<-1073741824||n.delta>1073741824)&&(t.requestNormalizeDelta=!0)),n===t.root){t.root=i,be(i,0),e.detach(),fg(),rr(i),t.root.parent=ee;return}const s=Ht(n)===1;if(n===n.parent.left?n.parent.left=i:n.parent.right=i,n===e?i.parent=n.parent:(n.parent===e?i.parent=n:i.parent=n.parent,n.left=e.left,n.right=e.right,n.parent=e.parent,be(n,Ht(e)),e===t.root?t.root=n:e===e.parent.left?e.parent.left=n:e.parent.right=n,n.left!==ee&&(n.left.parent=n),n.right!==ee&&(n.right.parent=n)),e.detach(),s){Rs(i.parent),n!==e&&(Rs(n),Rs(n.parent)),fg();return}Rs(i),Rs(i.parent),n!==e&&(Rs(n),Rs(n.parent));let r;for(;i!==t.root&&Ht(i)===0;)i===i.parent.left?(r=i.parent.right,Ht(r)===1&&(be(r,0),be(i.parent,1),ql(t,i.parent),r=i.parent.right),Ht(r.left)===0&&Ht(r.right)===0?(be(r,1),i=i.parent):(Ht(r.right)===0&&(be(r.left,0),be(r,1),Gl(t,r),r=i.parent.right),be(r,Ht(i.parent)),be(i.parent,0),be(r.right,0),ql(t,i.parent),i=t.root)):(r=i.parent.left,Ht(r)===1&&(be(r,0),be(i.parent,1),Gl(t,i.parent),r=i.parent.left),Ht(r.left)===0&&Ht(r.right)===0?(be(r,1),i=i.parent):(Ht(r.left)===0&&(be(r.right,0),be(r,1),ql(t,r),r=i.parent.left),be(r,Ht(i.parent)),be(i.parent,0),be(r.left,0),Gl(t,i.parent),i=t.root));be(i,0),fg()}function AP(t){for(;t.left!==ee;)t=t.left;return t}function fg(){ee.parent=ee,ee.delta=0,ee.start=0,ee.end=0}function ql(t,e){const i=e.right;i.delta+=e.delta,(i.delta<-1073741824||i.delta>1073741824)&&(t.requestNormalizeDelta=!0),i.start+=e.delta,i.end+=e.delta,e.right=i.left,i.left!==ee&&(i.left.parent=e),i.parent=e.parent,e.parent===ee?t.root=i:e===e.parent.left?e.parent.left=i:e.parent.right=i,i.left=e,e.parent=i,rr(e),rr(i)}function Gl(t,e){const i=e.left;e.delta-=i.delta,(e.delta<-1073741824||e.delta>1073741824)&&(t.requestNormalizeDelta=!0),e.start-=i.delta,e.end-=i.delta,e.left=i.right,i.right!==ee&&(i.right.parent=e),i.parent=e.parent,e.parent===ee?t.root=i:e===e.parent.right?e.parent.right=i:e.parent.left=i,i.right=e,e.parent=i,rr(e),rr(i)}function Lx(t){let e=t.end;if(t.left!==ee){const i=t.left.maxEnd;i>e&&(e=i)}if(t.right!==ee){const i=t.right.maxEnd+t.delta;i>e&&(e=i)}return e}function rr(t){t.maxEnd=Lx(t)}function Rs(t){for(;t!==ee;){const e=Lx(t);if(t.maxEnd===e)return;t.maxEnd=e,t=t.parent}}function OP(t,e,i,n){return t===i?e-n:t-i}var __=class{constructor(t,e){this.piece=t,this.color=e,this.size_left=0,this.lf_left=0,this.parent=this,this.left=this,this.right=this}next(){if(this.right!==G)return Xv(this.right);let t=this;for(;t.parent!==G&&t.parent.left!==t;)t=t.parent;return t.parent===G?G:t.parent}prev(){if(this.left!==G)return kx(this.left);let t=this;for(;t.parent!==G&&t.parent.right!==t;)t=t.parent;return t.parent===G?G:t.parent}detach(){this.parent=null,this.left=null,this.right=null}},G=new __(null,0);G.parent=G;G.left=G;G.right=G;G.color=0;function Xv(t){for(;t.left!==G;)t=t.left;return t}function kx(t){for(;t.right!==G;)t=t.right;return t}function Qv(t){return t===G?0:t.size_left+t.piece.length+Qv(t.right)}function Jv(t){return t===G?0:t.lf_left+t.piece.lineFeedCnt+Jv(t.right)}function gg(){G.parent=G}function Zl(t,e){const i=e.right;i.size_left+=e.size_left+(e.piece?e.piece.length:0),i.lf_left+=e.lf_left+(e.piece?e.piece.lineFeedCnt:0),e.right=i.left,i.left!==G&&(i.left.parent=e),i.parent=e.parent,e.parent===G?t.root=i:e.parent.left===e?e.parent.left=i:e.parent.right=i,i.left=e,e.parent=i}function Yl(t,e){const i=e.left;e.left=i.right,i.right!==G&&(i.right.parent=e),i.parent=e.parent,e.size_left-=i.size_left+(i.piece?i.piece.length:0),e.lf_left-=i.lf_left+(i.piece?i.piece.lineFeedCnt:0),e.parent===G?t.root=i:e===e.parent.right?e.parent.right=i:e.parent.left=i,i.right=e,e.parent=i}function pc(t,e){let i,n;if(e.left===G?(n=e,i=n.right):e.right===G?(n=e,i=n.left):(n=Xv(e.right),i=n.right),n===t.root){t.root=i,i.color=0,e.detach(),gg(),t.root.parent=G;return}const s=n.color===1;if(n===n.parent.left?n.parent.left=i:n.parent.right=i,n===e?(i.parent=n.parent,Ml(t,i)):(n.parent===e?i.parent=n:i.parent=n.parent,Ml(t,i),n.left=e.left,n.right=e.right,n.parent=e.parent,n.color=e.color,e===t.root?t.root=n:e===e.parent.left?e.parent.left=n:e.parent.right=n,n.left!==G&&(n.left.parent=n),n.right!==G&&(n.right.parent=n),n.size_left=e.size_left,n.lf_left=e.lf_left,Ml(t,n)),e.detach(),i.parent.left===i){const o=Qv(i),a=Jv(i);if(o!==i.parent.size_left||a!==i.parent.lf_left){const l=o-i.parent.size_left,h=a-i.parent.lf_left;i.parent.size_left=o,i.parent.lf_left=a,ns(t,i.parent,l,h)}}if(Ml(t,i.parent),s){gg();return}let r;for(;i!==t.root&&i.color===0;)i===i.parent.left?(r=i.parent.right,r.color===1&&(r.color=0,i.parent.color=1,Zl(t,i.parent),r=i.parent.right),r.left.color===0&&r.right.color===0?(r.color=1,i=i.parent):(r.right.color===0&&(r.left.color=0,r.color=1,Yl(t,r),r=i.parent.right),r.color=i.parent.color,i.parent.color=0,r.right.color=0,Zl(t,i.parent),i=t.root)):(r=i.parent.left,r.color===1&&(r.color=0,i.parent.color=1,Yl(t,i.parent),r=i.parent.left),r.left.color===0&&r.right.color===0?(r.color=1,i=i.parent):(r.left.color===0&&(r.right.color=0,r.color=1,Zl(t,r),r=i.parent.left),r.color=i.parent.color,i.parent.color=0,r.left.color=0,Yl(t,i.parent),i=t.root));i.color=0,gg()}function Jb(t,e){for(Ml(t,e);e!==t.root&&e.parent.color===1;)if(e.parent===e.parent.parent.left){const i=e.parent.parent.right;i.color===1?(e.parent.color=0,i.color=0,e.parent.parent.color=1,e=e.parent.parent):(e===e.parent.right&&(e=e.parent,Zl(t,e)),e.parent.color=0,e.parent.parent.color=1,Yl(t,e.parent.parent))}else{const i=e.parent.parent.left;i.color===1?(e.parent.color=0,i.color=0,e.parent.parent.color=1,e=e.parent.parent):(e===e.parent.left&&(e=e.parent,Yl(t,e)),e.parent.color=0,e.parent.parent.color=1,Zl(t,e.parent.parent))}t.root.color=0}function ns(t,e,i,n){for(;e!==t.root&&e!==G;)e.parent.left===e&&(e.parent.size_left+=i,e.parent.lf_left+=n),e=e.parent}function Ml(t,e){let i=0,n=0;if(e!==t.root){for(;e!==t.root&&e===e.parent.right;)e=e.parent;if(e!==t.root)for(e=e.parent,i=Qv(e.left)-e.size_left,n=Jv(e.left)-e.lf_left,e.size_left+=i,e.lf_left+=n;e!==t.root&&(i!==0||n!==0);)e.parent.left===e&&(e.parent.size_left+=i,e.parent.lf_left+=n),e=e.parent}}var _c=65535;function xx(t){let e;return t[t.length-1]<65536?e=new Uint16Array(t.length):e=new Uint32Array(t.length),e.set(t,0),e}var PP=class{constructor(t,e,i,n,s){this.lineStarts=t,this.cr=e,this.lf=i,this.crlf=n,this.isBasicASCII=s}};function rs(t,e=!0){const i=[0];let n=1;for(let s=0,r=t.length;s<r;s++){const o=t.charCodeAt(s);o===13?s+1<r&&t.charCodeAt(s+1)===10?(i[n++]=s+2,s++):i[n++]=s+1:o===10&&(i[n++]=s+1)}return e?xx(i):i}function FP(t,e){t.length=0,t[0]=0;let i=1,n=0,s=0,r=0,o=!0;for(let l=0,h=e.length;l<h;l++){const c=e.charCodeAt(l);c===13?l+1<h&&e.charCodeAt(l+1)===10?(r++,t[i++]=l+2,l++):(n++,t[i++]=l+1):c===10?(s++,t[i++]=l+1):o&&c!==9&&(c<32||c>126)&&(o=!1)}const a=new PP(xx(t),n,s,r,o);return t.length=0,a}var Xt=class{constructor(t,e,i,n,s){this.bufferIndex=t,this.start=e,this.end=i,this.lineFeedCnt=n,this.length=s}},Or=class{constructor(t,e){this.buffer=t,this.lineStarts=e}},BP=class{constructor(t,e){this._pieces=[],this._tree=t,this._BOM=e,this._index=0,t.root!==G&&t.iterate(t.root,i=>(i!==G&&this._pieces.push(i.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++])}},VP=class{constructor(t){this._limit=t,this._cache=[]}get(t){for(let e=this._cache.length-1;e>=0;e--){const i=this._cache[e];if(i.nodeStartOffset<=t&&i.nodeStartOffset+i.node.piece.length>=t)return i}return null}get2(t){for(let e=this._cache.length-1;e>=0;e--){const i=this._cache[e];if(i.nodeStartLineNumber&&i.nodeStartLineNumber<t&&i.nodeStartLineNumber+i.node.piece.lineFeedCnt>=t)return i}return null}set(t){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(t)}validate(t){let e=!1;const i=this._cache;for(let n=0;n<i.length;n++){const s=i[n];if(s.node.parent===null||s.nodeStartOffset>=t){i[n]=null,e=!0;continue}}if(e){const n=[];for(const s of i)s!==null&&n.push(s);this._cache=n}}},WP=class{constructor(t,e,i){this.create(t,e,i)}create(t,e,i){this._buffers=[new Or("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=G,this._lineCnt=1,this._length=0,this._EOL=e,this._EOLLength=e.length,this._EOLNormalized=i;let n=null;for(let s=0,r=t.length;s<r;s++)if(t[s].buffer.length>0){t[s].lineStarts||(t[s].lineStarts=rs(t[s].buffer));const o=new Xt(s+1,{line:0,column:0},{line:t[s].lineStarts.length-1,column:t[s].buffer.length-t[s].lineStarts[t[s].lineStarts.length-1]},t[s].lineStarts.length-1,t[s].buffer.length);this._buffers.push(t[s]),n=this.rbInsertRight(n,o)}this._searchCache=new VP(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()}normalizeEOL(t){const e=_c,i=e-Math.floor(e/3),n=i*2;let s="",r=0;const o=[];if(this.iterate(this.root,a=>{const l=this.getNodeContent(a),h=l.length;if(r<=i||r+h<n)return s+=l,r+=h,!0;const c=s.replace(/\r\n|\r|\n/g,t);return o.push(new Or(c,rs(c))),s=l,r=h,!0}),r>0){const a=s.replace(/\r\n|\r|\n/g,t);o.push(new Or(a,rs(a)))}this.create(o,t,!0)}getEOL(){return this._EOL}setEOL(t){this._EOL=t,this._EOLLength=this._EOL.length,this.normalizeEOL(t)}createSnapshot(t){return new BP(this,t)}getOffsetAt(t,e){let i=0,n=this.root;for(;n!==G;)if(n.left!==G&&n.lf_left+1>=t)n=n.left;else if(n.lf_left+n.piece.lineFeedCnt+1>=t){i+=n.size_left;const s=this.getAccumulatedValue(n,t-n.lf_left-2);return i+=s+e-1}else t-=n.lf_left+n.piece.lineFeedCnt,i+=n.size_left+n.piece.length,n=n.right;return i}getPositionAt(t){t=Math.floor(t),t=Math.max(0,t);let e=this.root,i=0;const n=t;for(;e!==G;)if(e.size_left!==0&&e.size_left>=t)e=e.left;else if(e.size_left+e.piece.length>=t){const s=this.getIndexOf(e,t-e.size_left);if(i+=e.lf_left+s.index,s.index===0){const r=n-this.getOffsetAt(i+1,1);return new A(i+1,r+1)}return new A(i+1,s.remainder+1)}else if(t-=e.size_left+e.piece.length,i+=e.lf_left+e.piece.lineFeedCnt,e.right===G){const s=this.getOffsetAt(i+1,1),r=n-t-s;return new A(i+1,r+1)}else e=e.right;return new A(1,1)}getValueInRange(t,e){if(t.startLineNumber===t.endLineNumber&&t.startColumn===t.endColumn)return"";const i=this.nodeAt2(t.startLineNumber,t.startColumn),n=this.nodeAt2(t.endLineNumber,t.endColumn),s=this.getValueInRange2(i,n);return e?e!==this._EOL||!this._EOLNormalized?s.replace(/\r\n|\r|\n/g,e):e===this.getEOL()&&this._EOLNormalized?s:s.replace(/\r\n|\r|\n/g,e):s}getValueInRange2(t,e){if(t.node===e.node){const o=t.node,a=this._buffers[o.piece.bufferIndex].buffer,l=this.offsetInBuffer(o.piece.bufferIndex,o.piece.start);return a.substring(l+t.remainder,l+e.remainder)}let i=t.node;const n=this._buffers[i.piece.bufferIndex].buffer,s=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);let r=n.substring(s+t.remainder,s+i.piece.length);for(i=i.next();i!==G;){const o=this._buffers[i.piece.bufferIndex].buffer,a=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);if(i===e.node){r+=o.substring(a,a+e.remainder);break}else r+=o.substr(a,i.piece.length);i=i.next()}return r}getLinesContent(){const t=[];let e=0,i="",n=!1;return this.iterate(this.root,s=>{if(s===G)return!0;const r=s.piece;let o=r.length;if(o===0)return!0;const a=this._buffers[r.bufferIndex].buffer,l=this._buffers[r.bufferIndex].lineStarts,h=r.start.line,c=r.end.line;let d=l[h]+r.start.column;if(n&&(a.charCodeAt(d)===10&&(d++,o--),t[e++]=i,i="",n=!1,o===0))return!0;if(h===c)return!this._EOLNormalized&&a.charCodeAt(d+o-1)===13?(n=!0,i+=a.substr(d,o-1)):i+=a.substr(d,o),!0;i+=this._EOLNormalized?a.substring(d,Math.max(d,l[h+1]-this._EOLLength)):a.substring(d,l[h+1]).replace(/(\r\n|\r|\n)$/,""),t[e++]=i;for(let u=h+1;u<c;u++)i=this._EOLNormalized?a.substring(l[u],l[u+1]-this._EOLLength):a.substring(l[u],l[u+1]).replace(/(\r\n|\r|\n)$/,""),t[e++]=i;return!this._EOLNormalized&&a.charCodeAt(l[c]+r.end.column-1)===13?(n=!0,r.end.column===0?e--:i=a.substr(l[c],r.end.column-1)):i=a.substr(l[c],r.end.column),!0}),n&&(t[e++]=i,i=""),t[e++]=i,t}getLength(){return this._length}getLineCount(){return this._lineCnt}getLineContent(t){return this._lastVisitedLine.lineNumber===t?this._lastVisitedLine.value:(this._lastVisitedLine.lineNumber=t,t===this._lineCnt?this._lastVisitedLine.value=this.getLineRawContent(t):this._EOLNormalized?this._lastVisitedLine.value=this.getLineRawContent(t,this._EOLLength):this._lastVisitedLine.value=this.getLineRawContent(t).replace(/(\r\n|\r|\n)$/,""),this._lastVisitedLine.value)}_getCharCode(t){if(t.remainder===t.node.piece.length){const e=t.node.next();if(!e)return 0;const i=this._buffers[e.piece.bufferIndex],n=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start);return i.buffer.charCodeAt(n)}else{const e=this._buffers[t.node.piece.bufferIndex],i=this.offsetInBuffer(t.node.piece.bufferIndex,t.node.piece.start)+t.remainder;return e.buffer.charCodeAt(i)}}getLineCharCode(t,e){const i=this.nodeAt2(t,e+1);return this._getCharCode(i)}getLineLength(t){if(t===this.getLineCount()){const e=this.getOffsetAt(t,1);return this.getLength()-e}return this.getOffsetAt(t+1,1)-this.getOffsetAt(t,1)-this._EOLLength}findMatchesInNode(t,e,i,n,s,r,o,a,l,h,c){const d=this._buffers[t.piece.bufferIndex],u=this.offsetInBuffer(t.piece.bufferIndex,t.piece.start),g=this.offsetInBuffer(t.piece.bufferIndex,s),m=this.offsetInBuffer(t.piece.bufferIndex,r);let _;const C={line:0,column:0};let w,v;e._wordSeparators?(w=d.buffer.substring(g,m),v=b=>b+g,e.reset(0)):(w=d.buffer,v=b=>b,e.reset(g));do if(_=e.next(w),_){if(v(_.index)>=m)return h;this.positionInBuffer(t,v(_.index)-u,C);const b=this.getLineFeedCnt(t.piece.bufferIndex,s,C),y=C.line===s.line?C.column-s.column+n:C.column+1,k=y+_[0].length;if(c[h++]=Tr(new T(i+b,y,i+b,k),_,a),v(_.index)+_[0].length>=m||h>=l)return h}while(_);return h}findMatchesLineByLine(t,e,i,n){const s=[];let r=0;const o=new qo(e.wordSeparators,e.regex);let a=this.nodeAt2(t.startLineNumber,t.startColumn);if(a===null)return[];const l=this.nodeAt2(t.endLineNumber,t.endColumn);if(l===null)return[];let h=this.positionInBuffer(a.node,a.remainder);const c=this.positionInBuffer(l.node,l.remainder);if(a.node===l.node)return this.findMatchesInNode(a.node,o,t.startLineNumber,t.startColumn,h,c,e,i,n,r,s),s;let d=t.startLineNumber,u=a.node;for(;u!==l.node;){const m=this.getLineFeedCnt(u.piece.bufferIndex,h,u.piece.end);if(m>=1){const C=this._buffers[u.piece.bufferIndex].lineStarts,w=this.offsetInBuffer(u.piece.bufferIndex,u.piece.start),v=C[h.line+m],b=d===t.startLineNumber?t.startColumn:1;if(r=this.findMatchesInNode(u,o,d,b,h,this.positionInBuffer(u,v-w),e,i,n,r,s),r>=n)return s;d+=m}const _=d===t.startLineNumber?t.startColumn-1:0;if(d===t.endLineNumber){const C=this.getLineContent(d).substring(_,t.endColumn-1);return r=this._findMatchesInLine(e,o,C,t.endLineNumber,_,r,s,i,n),s}if(r=this._findMatchesInLine(e,o,this.getLineContent(d).substr(_),d,_,r,s,i,n),r>=n)return s;d++,a=this.nodeAt2(d,1),u=a.node,h=this.positionInBuffer(a.node,a.remainder)}if(d===t.endLineNumber){const m=d===t.startLineNumber?t.startColumn-1:0,_=this.getLineContent(d).substring(m,t.endColumn-1);return r=this._findMatchesInLine(e,o,_,t.endLineNumber,m,r,s,i,n),s}const g=d===t.startLineNumber?t.startColumn:1;return r=this.findMatchesInNode(l.node,o,d,g,h,c,e,i,n,r,s),s}_findMatchesInLine(t,e,i,n,s,r,o,a,l){const h=t.wordSeparators;if(!a&&t.simpleSearch){const d=t.simpleSearch,u=d.length,g=i.length;let m=-u;for(;(m=i.indexOf(d,m+u))!==-1;)if((!h||Sv(h,i,g,m,u))&&(o[r++]=new rh(new T(n,m+1+s,n,m+1+u+s),null),r>=l))return r;return r}let c;e.reset(0);do if(c=e.next(i),c&&(o[r++]=Tr(new T(n,c.index+1+s,n,c.index+1+c[0].length+s),c,a),r>=l))return r;while(c);return r}insert(t,e,i=!1){if(this._EOLNormalized=this._EOLNormalized&&i,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==G){const{node:n,remainder:s,nodeStartOffset:r}=this.nodeAt(t),o=n.piece,a=o.bufferIndex,l=this.positionInBuffer(n,s);if(n.piece.bufferIndex===0&&o.end.line===this._lastChangeBufferPos.line&&o.end.column===this._lastChangeBufferPos.column&&r+o.length===t&&e.length<65535){this.appendToNode(n,e),this.computeBufferMetadata();return}if(r===t)this.insertContentToNodeLeft(e,n),this._searchCache.validate(t);else if(r+n.piece.length>t){const h=[];let c=new Xt(o.bufferIndex,l,o.end,this.getLineFeedCnt(o.bufferIndex,l,o.end),this.offsetInBuffer(a,o.end)-this.offsetInBuffer(a,l));if(this.shouldCheckCRLF()&&this.endWithCR(e)&&this.nodeCharCodeAt(n,s)===10){const g={line:c.start.line+1,column:0};c=new Xt(c.bufferIndex,g,c.end,this.getLineFeedCnt(c.bufferIndex,g,c.end),c.length-1),e+=`
77`}if(this.shouldCheckCRLF()&&this.startWithLF(e))if(this.nodeCharCodeAt(n,s-1)===13){const g=this.positionInBuffer(n,s-1);this.deleteNodeTail(n,g),e="\r"+e,n.piece.length===0&&h.push(n)}else this.deleteNodeTail(n,l);else this.deleteNodeTail(n,l);const d=this.createNewPieces(e);c.length>0&&this.rbInsertRight(n,c);let u=n;for(let g=0;g<d.length;g++)u=this.rbInsertRight(u,d[g]);this.deleteNodes(h)}else this.insertContentToNodeRight(e,n)}else{const n=this.createNewPieces(e);let s=this.rbInsertLeft(null,n[0]);for(let r=1;r<n.length;r++)s=this.rbInsertRight(s,n[r])}this.computeBufferMetadata()}delete(t,e){if(this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",e<=0||this.root===G)return;const i=this.nodeAt(t),n=this.nodeAt(t+e),s=i.node,r=n.node;if(s===r){const d=this.positionInBuffer(s,i.remainder),u=this.positionInBuffer(s,n.remainder);if(i.nodeStartOffset===t){if(e===s.piece.length){const g=s.next();pc(this,s),this.validateCRLFWithPrevNode(g),this.computeBufferMetadata();return}this.deleteNodeHead(s,u),this._searchCache.validate(t),this.validateCRLFWithPrevNode(s),this.computeBufferMetadata();return}if(i.nodeStartOffset+s.piece.length===t+e){this.deleteNodeTail(s,d),this.validateCRLFWithNextNode(s),this.computeBufferMetadata();return}this.shrinkNode(s,d,u),this.computeBufferMetadata();return}const o=[],a=this.positionInBuffer(s,i.remainder);this.deleteNodeTail(s,a),this._searchCache.validate(t),s.piece.length===0&&o.push(s);const l=this.positionInBuffer(r,n.remainder);this.deleteNodeHead(r,l),r.piece.length===0&&o.push(r);const h=s.next();for(let d=h;d!==G&&d!==r;d=d.next())o.push(d);const c=s.piece.length===0?s.prev():s;this.deleteNodes(o),this.validateCRLFWithNextNode(c),this.computeBufferMetadata()}insertContentToNodeLeft(t,e){const i=[];if(this.shouldCheckCRLF()&&this.endWithCR(t)&&this.startWithLF(e)){const r=e.piece,o={line:r.start.line+1,column:0};e.piece=new Xt(r.bufferIndex,o,r.end,this.getLineFeedCnt(r.bufferIndex,o,r.end),r.length-1),t+=`
78`,ns(this,e,-1,-1),e.piece.length===0&&i.push(e)}const n=this.createNewPieces(t);let s=this.rbInsertLeft(e,n[n.length-1]);for(let r=n.length-2;r>=0;r--)s=this.rbInsertLeft(s,n[r]);this.validateCRLFWithPrevNode(s),this.deleteNodes(i)}insertContentToNodeRight(t,e){this.adjustCarriageReturnFromNext(t,e)&&(t+=`
79`);const i=this.createNewPieces(t),n=this.rbInsertRight(e,i[0]);let s=n;for(let r=1;r<i.length;r++)s=this.rbInsertRight(s,i[r]);this.validateCRLFWithPrevNode(n)}positionInBuffer(t,e,i){const n=t.piece,s=t.piece.bufferIndex,r=this._buffers[s].lineStarts,o=r[n.start.line]+n.start.column+e;let a=n.start.line,l=n.end.line,h=0,c=0,d=0;for(;a<=l&&(h=a+(l-a)/2|0,d=r[h],h!==l);)if(c=r[h+1],o<d)l=h-1;else if(o>=c)a=h+1;else break;return i?(i.line=h,i.column=o-d,null):{line:h,column:o-d}}getLineFeedCnt(t,e,i){if(i.column===0)return i.line-e.line;const n=this._buffers[t].lineStarts;if(i.line===n.length-1)return i.line-e.line;const s=n[i.line+1],r=n[i.line]+i.column;if(s>r+1)return i.line-e.line;const o=r-1;return this._buffers[t].buffer.charCodeAt(o)===13?i.line-e.line+1:i.line-e.line}offsetInBuffer(t,e){return this._buffers[t].lineStarts[e.line]+e.column}deleteNodes(t){for(let e=0;e<t.length;e++)pc(this,t[e])}createNewPieces(t){if(t.length>65535){const l=[];for(;t.length>_c;){const c=t.charCodeAt(65534);let d;c===13||c>=55296&&c<=56319?(d=t.substring(0,65534),t=t.substring(65534)):(d=t.substring(0,_c),t=t.substring(_c));const u=rs(d);l.push(new Xt(this._buffers.length,{line:0,column:0},{line:u.length-1,column:d.length-u[u.length-1]},u.length-1,d.length)),this._buffers.push(new Or(d,u))}const h=rs(t);return l.push(new Xt(this._buffers.length,{line:0,column:0},{line:h.length-1,column:t.length-h[h.length-1]},h.length-1,t.length)),this._buffers.push(new Or(t,h)),l}let e=this._buffers[0].buffer.length;const i=rs(t,!1);let n=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===e&&e!==0&&this.startWithLF(t)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},n=this._lastChangeBufferPos;for(let l=0;l<i.length;l++)i[l]+=e+1;this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(i.slice(1)),this._buffers[0].buffer+="_"+t,e+=1}else{if(e!==0)for(let l=0;l<i.length;l++)i[l]+=e;this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(i.slice(1)),this._buffers[0].buffer+=t}const s=this._buffers[0].buffer.length,r=this._buffers[0].lineStarts.length-1,o={line:r,column:s-this._buffers[0].lineStarts[r]},a=new Xt(0,n,o,this.getLineFeedCnt(0,n,o),s-e);return this._lastChangeBufferPos=o,[a]}getLineRawContent(t,e=0){let i=this.root,n="";const s=this._searchCache.get2(t);if(s){i=s.node;const r=this.getAccumulatedValue(i,t-s.nodeStartLineNumber-1),o=this._buffers[i.piece.bufferIndex].buffer,a=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);if(s.nodeStartLineNumber+i.piece.lineFeedCnt===t)n=o.substring(a+r,a+i.piece.length);else{const l=this.getAccumulatedValue(i,t-s.nodeStartLineNumber);return o.substring(a+r,a+l-e)}}else{let r=0;const o=t;for(;i!==G;)if(i.left!==G&&i.lf_left>=t-1)i=i.left;else if(i.lf_left+i.piece.lineFeedCnt>t-1){const a=this.getAccumulatedValue(i,t-i.lf_left-2),l=this.getAccumulatedValue(i,t-i.lf_left-1),h=this._buffers[i.piece.bufferIndex].buffer,c=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return r+=i.size_left,this._searchCache.set({node:i,nodeStartOffset:r,nodeStartLineNumber:o-(t-1-i.lf_left)}),h.substring(c+a,c+l-e)}else if(i.lf_left+i.piece.lineFeedCnt===t-1){const a=this.getAccumulatedValue(i,t-i.lf_left-2),l=this._buffers[i.piece.bufferIndex].buffer,h=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);n=l.substring(h+a,h+i.piece.length);break}else t-=i.lf_left+i.piece.lineFeedCnt,r+=i.size_left+i.piece.length,i=i.right}for(i=i.next();i!==G;){const r=this._buffers[i.piece.bufferIndex].buffer;if(i.piece.lineFeedCnt>0){const o=this.getAccumulatedValue(i,0),a=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return n+=r.substring(a,a+o-e),n}else{const o=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);n+=r.substr(o,i.piece.length)}i=i.next()}return n}computeBufferMetadata(){let t=this.root,e=1,i=0;for(;t!==G;)e+=t.lf_left+t.piece.lineFeedCnt,i+=t.size_left+t.piece.length,t=t.right;this._lineCnt=e,this._length=i,this._searchCache.validate(this._length)}getIndexOf(t,e){const i=t.piece,n=this.positionInBuffer(t,e),s=n.line-i.start.line;if(this.offsetInBuffer(i.bufferIndex,i.end)-this.offsetInBuffer(i.bufferIndex,i.start)===e){const r=this.getLineFeedCnt(t.piece.bufferIndex,i.start,n);if(r!==s)return{index:r,remainder:0}}return{index:s,remainder:n.column}}getAccumulatedValue(t,e){if(e<0)return 0;const i=t.piece,n=this._buffers[i.bufferIndex].lineStarts,s=i.start.line+e+1;return s>i.end.line?n[i.end.line]+i.end.column-n[i.start.line]-i.start.column:n[s]-n[i.start.line]-i.start.column}deleteNodeTail(t,e){const i=t.piece,n=i.lineFeedCnt,s=this.offsetInBuffer(i.bufferIndex,i.end),r=e,o=this.offsetInBuffer(i.bufferIndex,r),a=this.getLineFeedCnt(i.bufferIndex,i.start,r),l=a-n,h=o-s,c=i.length+h;t.piece=new Xt(i.bufferIndex,i.start,r,a,c),ns(this,t,h,l)}deleteNodeHead(t,e){const i=t.piece,n=i.lineFeedCnt,s=this.offsetInBuffer(i.bufferIndex,i.start),r=e,o=this.getLineFeedCnt(i.bufferIndex,r,i.end),a=this.offsetInBuffer(i.bufferIndex,r),l=o-n,h=s-a,c=i.length+h;t.piece=new Xt(i.bufferIndex,r,i.end,o,c),ns(this,t,h,l)}shrinkNode(t,e,i){const n=t.piece,s=n.start,r=n.end,o=n.length,a=n.lineFeedCnt,l=e,h=this.getLineFeedCnt(n.bufferIndex,n.start,l),c=this.offsetInBuffer(n.bufferIndex,e)-this.offsetInBuffer(n.bufferIndex,s);t.piece=new Xt(n.bufferIndex,n.start,l,h,c),ns(this,t,c-o,h-a);const d=new Xt(n.bufferIndex,i,r,this.getLineFeedCnt(n.bufferIndex,i,r),this.offsetInBuffer(n.bufferIndex,r)-this.offsetInBuffer(n.bufferIndex,i)),u=this.rbInsertRight(t,d);this.validateCRLFWithPrevNode(u)}appendToNode(t,e){this.adjustCarriageReturnFromNext(e,t)&&(e+=`
80`);const i=this.shouldCheckCRLF()&&this.startWithLF(e)&&this.endWithCR(t),n=this._buffers[0].buffer.length;this._buffers[0].buffer+=e;const s=rs(e,!1);for(let d=0;d<s.length;d++)s[d]+=n;if(i){const d=this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-2];this._buffers[0].lineStarts.pop(),this._lastChangeBufferPos={line:this._lastChangeBufferPos.line-1,column:n-d}}this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(s.slice(1));const r=this._buffers[0].lineStarts.length-1,o={line:r,column:this._buffers[0].buffer.length-this._buffers[0].lineStarts[r]},a=t.piece.length+e.length,l=t.piece.lineFeedCnt,h=this.getLineFeedCnt(0,t.piece.start,o),c=h-l;t.piece=new Xt(t.piece.bufferIndex,t.piece.start,o,h,a),this._lastChangeBufferPos=o,ns(this,t,e.length,c)}nodeAt(t){let e=this.root;const i=this._searchCache.get(t);if(i)return{node:i.node,nodeStartOffset:i.nodeStartOffset,remainder:t-i.nodeStartOffset};let n=0;for(;e!==G;)if(e.size_left>t)e=e.left;else if(e.size_left+e.piece.length>=t){n+=e.size_left;const s={node:e,remainder:t-e.size_left,nodeStartOffset:n};return this._searchCache.set(s),s}else t-=e.size_left+e.piece.length,n+=e.size_left+e.piece.length,e=e.right;return null}nodeAt2(t,e){let i=this.root,n=0;for(;i!==G;)if(i.left!==G&&i.lf_left>=t-1)i=i.left;else if(i.lf_left+i.piece.lineFeedCnt>t-1){const s=this.getAccumulatedValue(i,t-i.lf_left-2),r=this.getAccumulatedValue(i,t-i.lf_left-1);return n+=i.size_left,{node:i,remainder:Math.min(s+e-1,r),nodeStartOffset:n}}else if(i.lf_left+i.piece.lineFeedCnt===t-1){const s=this.getAccumulatedValue(i,t-i.lf_left-2);if(s+e-1<=i.piece.length)return{node:i,remainder:s+e-1,nodeStartOffset:n};e-=i.piece.length-s;break}else t-=i.lf_left+i.piece.lineFeedCnt,n+=i.size_left+i.piece.length,i=i.right;for(i=i.next();i!==G;){if(i.piece.lineFeedCnt>0){const s=this.getAccumulatedValue(i,0),r=this.offsetOfNode(i);return{node:i,remainder:Math.min(e-1,s),nodeStartOffset:r}}else if(i.piece.length>=e-1){const s=this.offsetOfNode(i);return{node:i,remainder:e-1,nodeStartOffset:s}}else e-=i.piece.length;i=i.next()}return null}nodeCharCodeAt(t,e){if(t.piece.lineFeedCnt<1)return-1;const i=this._buffers[t.piece.bufferIndex],n=this.offsetInBuffer(t.piece.bufferIndex,t.piece.start)+e;return i.buffer.charCodeAt(n)}offsetOfNode(t){if(!t)return 0;let e=t.size_left;for(;t!==this.root;)t.parent.right===t&&(e+=t.parent.size_left+t.parent.piece.length),t=t.parent;return e}shouldCheckCRLF(){return!(this._EOLNormalized&&this._EOL===`
81`)}startWithLF(t){if(typeof t=="string")return t.charCodeAt(0)===10;if(t===G||t.piece.lineFeedCnt===0)return!1;const e=t.piece,i=this._buffers[e.bufferIndex].lineStarts,n=e.start.line,s=i[n]+e.start.column;return n===i.length-1||i[n+1]>s+1?!1:this._buffers[e.bufferIndex].buffer.charCodeAt(s)===10}endWithCR(t){return typeof t=="string"?t.charCodeAt(t.length-1)===13:t===G||t.piece.lineFeedCnt===0?!1:this.nodeCharCodeAt(t,t.piece.length-1)===13}validateCRLFWithPrevNode(t){if(this.shouldCheckCRLF()&&this.startWithLF(t)){const e=t.prev();this.endWithCR(e)&&this.fixCRLF(e,t)}}validateCRLFWithNextNode(t){if(this.shouldCheckCRLF()&&this.endWithCR(t)){const e=t.next();this.startWithLF(e)&&this.fixCRLF(t,e)}}fixCRLF(t,e){const i=[],n=this._buffers[t.piece.bufferIndex].lineStarts;let s;t.piece.end.column===0?s={line:t.piece.end.line-1,column:n[t.piece.end.line]-n[t.piece.end.line-1]-1}:s={line:t.piece.end.line,column:t.piece.end.column-1};const r=t.piece.length-1,o=t.piece.lineFeedCnt-1;t.piece=new Xt(t.piece.bufferIndex,t.piece.start,s,o,r),ns(this,t,-1,-1),t.piece.length===0&&i.push(t);const a={line:e.piece.start.line+1,column:0},l=e.piece.length-1,h=this.getLineFeedCnt(e.piece.bufferIndex,a,e.piece.end);e.piece=new Xt(e.piece.bufferIndex,a,e.piece.end,h,l),ns(this,e,-1,-1),e.piece.length===0&&i.push(e);const c=this.createNewPieces(`\r
82`);this.rbInsertRight(t,c[0]);for(let d=0;d<i.length;d++)pc(this,i[d])}adjustCarriageReturnFromNext(t,e){if(this.shouldCheckCRLF()&&this.endWithCR(t)){const i=e.next();if(this.startWithLF(i)){if(t+=`
83`,i.piece.length===1)pc(this,i);else{const n=i.piece,s={line:n.start.line+1,column:0},r=n.length-1,o=this.getLineFeedCnt(n.bufferIndex,s,n.end);i.piece=new Xt(n.bufferIndex,s,n.end,o,r),ns(this,i,-1,-1)}return!0}}return!1}iterate(t,e){if(t===G)return e(G);const i=this.iterate(t.left,e);return i&&e(t)&&this.iterate(t.right,e)}
83getNodeContent(t){if(t===G)return"";const e=this._buffers[t.piece.bufferIndex];let i;const n=t.piece,s=this.offsetInBuffer(n.bufferIndex,n.start),r=this.offsetInBuffer(n.bufferIndex,n.end);return i=e.buffer.substring(s,r),i}getPieceContent(t){const e=this._buffers[t.bufferIndex],i=this.offsetInBuffer(t.bufferIndex,t.start),n=this.offsetInBuffer(t.bufferIndex,t.end);return e.buffer.substring(i,n)}rbInsertRight(t,e){const i=new __(e,1);if(i.left=G,i.right=G,i.parent=G,i.size_left=0,i.lf_left=0,this.root===G)this.root=i,i.color=0;else if(t.right===G)t.right=i,i.parent=t;else{const n=Xv(t.right);n.left=i,i.parent=n}return Jb(this,i),i}rbInsertLeft(t,e){const i=new __(e,1);if(i.left=G,i.right=G,i.parent=G,i.size_left=0,i.lf_left=0,this.root===G)this.root=i,i.color=0;else if(t.left===G)t.left=i,i.parent=t;else{const n=kx(t.left);n.right=i,i.parent=n}return Jb(this,i),i}};function Ta(t){let e=0,i=0,n=0,s=0;for(let r=0,o=t.length;r<o;r++){const a=t.charCodeAt(r);a===13?(e===0&&(i=r),e++,r+1<o&&t.charCodeAt(r+1)===10?(s|=2,r++):s|=3,n=r+1):a===10&&(s|=1,e===0&&(i=r),e++,n=r+1)}return e===0&&(i=t.length),[e,i,t.length-n,s]}var Ix=class md extends V{constructor(e,i,n,s,r,o,a){super(),this._onDidChangeContent=this._register(new M),this._BOM=i,this._mightContainNonBasicASCII=!o,this._mightContainRTL=s,this._mightContainUnusualLineTerminators=r,this._pieceTree=new WP(e,n,a)}mightContainRTL(){return this._mightContainRTL}mightContainUnusualLineTerminators(){return this._mightContainUnusualLineTerminators}resetMightContainUnusualLineTerminators(){this._mightContainUnusualLineTerminators=!1}mightContainNonBasicASCII(){return this._mightContainNonBasicASCII}getBOM(){return this._BOM}getEOL(){return this._pieceTree.getEOL()}createSnapshot(e){return this._pieceTree.createSnapshot(e?this._BOM:"")}getOffsetAt(e,i){return this._pieceTree.getOffsetAt(e,i)}getPositionAt(e){return this._pieceTree.getPositionAt(e)}getRangeAt(e,i){const n=e+i,s=this.getPositionAt(e),r=this.getPositionAt(n);return new T(s.lineNumber,s.column,r.lineNumber,r.column)}getValueInRange(e,i=0){if(e.isEmpty())return"";const n=this._getEndOfLine(i);return this._pieceTree.getValueInRange(e,n)}getValueLengthInRange(e,i=0){if(e.isEmpty())return 0;if(e.startLineNumber===e.endLineNumber)return e.endColumn-e.startColumn;const n=this.getOffsetAt(e.startLineNumber,e.startColumn);return this.getOffsetAt(e.endLineNumber,e.endColumn)-n}getCharacterCountInRange(e,i=0){if(this._mightContainNonBasicASCII){let n=0;const s=e.startLineNumber,r=e.endLineNumber;for(let o=s;o<=r;o++){const a=this.getLineContent(o),l=o===s?e.startColumn-1:0,h=o===r?e.endColumn-1:a.length;for(let c=l;c<h;
vendor: 4,265 bytes, lines 83-86
83c++)at(a.charCodeAt(c))?(n=n+1,c=c+1):n=n+1}return n+=this._getEndOfLine(i).length*(r-s),n}return this.getValueLengthInRange(e,i)}getLength(){return this._pieceTree.getLength()}getLineCount(){return this._pieceTree.getLineCount()}getLinesContent(){return this._pieceTree.getLinesContent()}getLineContent(e){return this._pieceTree.getLineContent(e)}getLineCharCode(e,i){return this._pieceTree.getLineCharCode(e,i)}getLineLength(e){return this._pieceTree.getLineLength(e)}getLineFirstNonWhitespaceColumn(e){const i=fi(this.getLineContent(e));return i===-1?0:i+1}getLineLastNonWhitespaceColumn(e){const i=Va(this.getLineContent(e));return i===-1?0:i+2}_getEndOfLine(e){switch(e){case 1:return`
84`;case 2:return`\r
85`;case 0:return this.getEOL();default:throw new Error("Unknown EOL preference")}}setEOL(e){this._pieceTree.setEOL(e)}applyEdits(e,i,n){let s=this._mightContainRTL,r=this._mightContainUnusualLineTerminators,o=this._mightContainNonBasicASCII,a=!0,l=[];for(let _=0;_<e.length;_++){const C=e[_];a&&C._isTracked&&(a=!1);const w=C.range;if(C.text){let S=!0;o||(S=!hv(C.text),o=S),!s&&S&&(s=lv(C.text)),!r&&S&&(r=Uy(C.text))}let v="",b=0,y=0,k=0;if(C.text){let S;[b,y,k,S]=Ta(C.text);const L=this.getEOL();S===0||S===(L===`\r
86`?2:1)?v=C.text:v=C.text.replace(/\r\n|\r|\n/g,L)}l[_]={sortIndex:_,identifier:C.identifier||null,range:w,rangeOffset:this.getOffsetAt(w.startLineNumber,w.startColumn),rangeLength:this.getValueLengthInRange(w),text:v,eolCount:b,firstLineLength:y,lastLineLength:k,forceMoveMarkers:!!C.forceMoveMarkers,isAutoWhitespaceEdit:C.isAutoWhitespaceEdit||!1}}l.sort(md._sortOpsAscending);let h=!1;for(let _=0,C=l.length-1;_<C;_++){const w=l[_].range.getEndPosition(),v=l[_+1].range.getStartPosition();if(v.isBeforeOrEqual(w)){if(v.isBefore(w))throw new Error("Overlapping ranges are not allowed!");h=!0}}a&&(l=this._reduceOperations(l));const c=n||i?md._getInverseEditRanges(l):[],d=[];if(i)for(let _=0;_<l.length;_++){const C=l[_],w=c[_];if(C.isAutoWhitespaceEdit&&C.range.isEmpty())for(let v=w.startLineNumber;v<=w.endLineNumber;v++){let b="";v===w.startLineNumber&&(b=this.getLineContent(C.range.startLineNumber),fi(b)!==-1)||d.push({lineNumber:v,oldContent:b})}}let u=null;if(n){let _=0;u=[];for(let C=0;C<l.length;C++){const w=l[C],v=c[C],b=this.getValueInRange(w.range),y=w.rangeOffset+_;_+=w.text.length-b.length,u[C]={sortIndex:w.sortIndex,identifier:w.identifier,range:v,text:b,textChange:new Dn(w.rangeOffset,b,y,w.text)}}h||u.sort((C,w)=>C.sortIndex-w.sortIndex)}this._mightContainRTL=s,this._mightContainUnusualLineTerminators=r,this._mightContainNonBasicASCII=o;const g=this._doApplyEdits(l);let m=null;if(i&&d.length>0){d.sort((_,C)=>C.lineNumber-_.lineNumber),m=[];for(let _=0,C=d.length;_<C;_++){const w=d[_].lineNumber;if(_>0&&d[_-1].lineNumber===w)continue;const v=d[_].oldContent,b=this.getLineContent(w);b.length===0||b===v||fi(b)!==-1||m.push(w)}}return this._onDidChangeContent.fire(),new aT(u,g,m)}_reduceOperations(e){return e.length<1e3?e:[this._toSingleEditOperation(e)]}_toSingleEditOperation(e){let i=!1;const n=e[0].range,s=e[e.length-1].range,r=new T(n.startLineNumber,n.startColumn,s.endLineNumber,s.endColumn);let o=n.startLineNumber,a=n.startColumn;const l=[];for(let g=0,m=e.length;g<m;g++){const _=e[g],C=_.range;i=i||_.forceMoveMarkers,l.push(this.getValueInRange(new T(o,a,C.startLineNumber,C.startColumn))),_.text.length>0&&l.push(_.text),o=C.endLineNumber,a=C.endColumn}const h=l.join(""),[c,d,u]=Ta(h);return{sortIndex:0,identifier:e[0].identifier,range:r,rangeOffset:this.getOffsetAt(r.startLineNumber,r.startColumn),rangeLength:this.getValueLengthInRange(r,0),text:h,eolCount:c,firstLineLength:d,lastLineLength:u,forceMoveMarkers:i,isAutoWhitespaceEdit:!1}}_doApplyEdits(e){e.sort(md._sortOpsDescending);const i=[];for(let n=0;n<e.length;n++){const s=e[n],r=s.range.startLineNumber,o=s.range.startColumn,a=s.range.endLineNumber,l=s.range.endColumn;if(r===a&&o===l&&s.text.length===0)continue;s.text?(this._pieceTree.delete(s.rangeOffset,s.rangeLength),this._pieceTree.insert(s.rangeOffset,s.text,!0)):this._pieceTree.delete(s.rangeOffset,s.rangeLength);const h=new T(r,o,a,l);i.push({range:h,rangeLength:s.rangeLength,text:s.text,rangeOffset:s.rangeOffset,forceMoveMarkers:s.forceMoveMarkers})}return i}
86findMatchesLineByLine(e,i,n,s){return this._pieceTree.findMatchesLineByLine(e,i,n,s)}static _getInverseEditRanges(e){const i=[];let n=0,s=0,r=null;for(let o=0,a=e.length;o<a;o++){const l=e[o];let h,c;r?r.range.endLineNumber===l.range.startLineNumber?(h=n,c=s+(l.range.startColumn-r.range.endColumn)):(h=n+(l.range.startLineNumber-r.range.endLineNumber),c=l.range.startColumn):(h=l.range.startLineNumber,c=l.range.startColumn);let d;if(l.text.length>0){const u=l.eolCount+1;u===1?d=new T(h,c,h,c+l.firstLineLength):d=new T(h,c,h+u-1,l.lastLineLength+1)}else d=new T(h,c,h,c);n=d.endLineNumber,s=d.endColumn,i.push(d),r=l}return i}static _sortOpsAscending(e,i){const n=T.compareRangesUsingEnds(e.range,i.range);return n===0?e.sortIndex-i.sortIndex:n}static _sortOpsDescending(e,i){const n=T.compareRangesUsingEnds(e.range,i.range);return n===0?i.sortIndex-e.sortIndex:-n}},HP=class{constructor(t,e,i,n,s,r,o,a,l){this._chunks=t,this._bom=e,this._cr=i,this._lf=n,this._crlf=s,this._containsRTL=r,this._containsUnusualLineTerminators=o,this._isBasicASCII=a,this._normalizeEOL=l}_getEOL(t){const e=this._cr+this._lf+this._crlf,i=this._cr+this._crlf;return e===0?t===1?`
87`:`\r
88`:i>e/2?`\r
89`:`
90`}create(t){const e=this._getEOL(t),i=this._chunks;if(this._normalizeEOL&&(e===`\r
91`&&(this._cr>0||this._lf>0)||e===`
92`&&(this._cr>0||this._crlf>0)))for(let s=0,r=i.length;s<r;s++){const o=i[s].buffer.replace(/\r\n|\r|\n/g,e),a=rs(o);i[s]=new Or(o,a)}const n=new Ix(i,this._bom,e,this._containsRTL,this._containsUnusualLineTerminators,this._isBasicASCII,this._normalizeEOL);return{textBuffer:n,disposable:n}}},zP=class{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(t){if(t.length===0)return;this.chunks.length===0&&dv(t)&&(this.BOM="\uFEFF",t=t.substr(1));const e=t.charCodeAt(t.length-1);e===13||e>=55296&&e<=56319?(this._acceptChunk1(t.substr(0,t.length-1),!1),this._hasPreviousChar=!0,this._previousChar=e):(this._acceptChunk1(t,!1),this._hasPreviousChar=!1,this._previousChar=e)}_acceptChunk1(t,e){!e&&t.length===0||(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+t):this._acceptChunk2(t))}_acceptChunk2(t){const e=FP(this._tmpLineStarts,t);this.chunks.push(new Or(t,e.lineStarts)),this.cr+=e.cr,this.lf+=e.lf,this.crlf+=e.crlf,this.isBasicASCII&&(this.isBasicASCII=e.isBasicASCII),!this.isBasicASCII&&!this.containsRTL&&(this.containsRTL=lv(t)),!this.isBasicASCII&&!this.containsUnusualLineTerminators&&(this.containsUnusualLineTerminators=Uy(t))}finish(t=!0){return this._finish(),new HP(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.containsUnusualLineTerminators,this.isBasicASCII,t)}_finish(){if(this.chunks.length===0&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;const t=this.chunks[this.chunks.length-1];t.buffer+=String.fromCharCode(this._previousChar),t.lineStarts=rs(t.buffer),this._previousChar===13&&this.cr++}}},UP=class{constructor(t,e){this._startLineNumber=t,this._tokens=e}get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._startLineNumber+this._tokens.length-1}getLineTokens(t){return this._tokens[t-this._startLineNumber]}appendLineTokens(t){this._tokens.push(t)}},mg=class{constructor(){this._tokens=[]}add(t,e){if(this._tokens.length>0){const i=this._tokens[this._tokens.length-1];if(i.endLineNumber+1===t){i.appendLineTokens(e);return}}this._tokens.push(new UP(t,[e]))}finalize(){return this._tokens}},ew=class{constructor(t){this._default=t,this._store=[]}get(t){return t<this._store.length?this._store[t]:this._default}set(t,e){for(;t>=this._store.length;)this._store[this._store.length]=this._default;this._store[t]=e}delete(t,e){e===0||t>=this._store.length||this._store.splice(t,e)}insert(t,e){if(e===0||t>=this._store.length)return;const i=[];for(let n=0;n<e;n++)i[n]=this._default;this._store=Vu(this._store,t,i)}},$P=class{constructor(t,e){this.tokenizationSupport=t,this.initialState=e,this._lineBeginState=new ew(null),this._lineNeedsTokenization=new ew(!0),this._firstLineNeedsTokenization=0,this._lineBeginState.set(0,this.initialState)}get invalidLineStartIndex(){return this._firstLineNeedsTokenization}markMustBeTokenized(t){this._lineNeedsTokenization.set(t,!0),this._firstLineNeedsTokenization=Math.min(this._firstLineNeedsTokenization,t)}getBeginState(t){return this._lineBeginState.get(t)}setEndState(t,e,i){if(this._lineNeedsTokenization.set(e,!1),this._firstLineNeedsTokenization=e+1,e===t-1)return;const n=this._lineBeginState.get(e+1);if(n===null||!i.equals(n)){this._lineBeginState.set(e+1,i),this.markMustBeTokenized(e+1);return}let s=e+1;for(;s<t&&!this._lineNeedsTokenization.get(s);)s++;this._firstLineNeedsTokenization=s}applyEdits(t,e){this.markMustBeTokenized(t.startLineNumber-1),this._lineBeginState.delete(t.startLineNumber,t.endLineNumber-t.startLineNumber),this._lineNeedsTokenization.delete(t.startLineNumber,t.endLineNumber-t.startLineNumber),this._lineBeginState.insert(t.startLineNumber,e),this._lineNeedsTokenization.insert(t.startLineNumber,e)}},KP=class extends V{constructor(t,e){super(),this._textModel=t,this._languageIdCodec=e,this._isScheduled=!1,this._isDisposed=!1,this._tokenizationStateStore=null,this._register(Ge.onDidChange(i=>{const n=this._textModel.getLanguageId();i.changedLanguages.indexOf(n)!==-1&&(this._resetTokenizationState(),this._textModel.clearTokens())})),this._resetTokenizationState()}dispose(){this._isDisposed=!0,super.dispose()}handleDidChangeContent(t){if(t.isFlush){this._resetTokenizationState();return}if(this._tokenizationStateStore)for(let e=0,i=t.changes.length;e<i;e++){const n=t.changes[e],[s]=Ta(n.text);this._tokenizationStateStore.applyEdits(n.range,s)}
92this._beginBackgroundTokenization()}handleDidChangeAttached(){this._beginBackgroundTokenization()}handleDidChangeLanguage(t){this._resetTokenizationState(),this._textModel.clearTokens()}_resetTokenizationState(){const[t,e]=jP(this._textModel);t&&e?this._tokenizationStateStore=new $P(t,e):this._tokenizationStateStore=null,this._beginBackgroundTokenization()}_beginBackgroundTokenization(){this._isScheduled||!this._textModel.isAttachedToEditor()||!this._hasLinesToTokenize()||(this._isScheduled=!0,qd(t=>{this._isScheduled=!1,this._backgroundTokenizeWithDeadline(t)}))}_backgroundTokenizeWithDeadline(t){const e=Date.now()+t.timeRemaining(),i=()=>{this._isDisposed||!this._textModel.isAttachedToEditor()||!this._hasLinesToTokenize()||(this._backgroundTokenizeForAtLeast1ms(),Date.now()<e?ry(i):this._beginBackgroundTokenization())};i()}_backgroundTokenizeForAtLeast1ms(){const t=this._textModel.getLineCount(),e=new mg,i=Dh.create(!1);do if(i.elapsed()>1||this._tokenizeOneInvalidLine(e)>=t)break;while(this._hasLinesToTokenize());this._textModel.setTokens(e.finalize(),!this._hasLinesToTokenize())}tokenizeViewport(t,e){const i=new mg;this._tokenizeViewport(i,t,e),this._textModel.setTokens(i.finalize(),!this._hasLinesToTokenize())}reset(){this._resetTokenizationState(),this._textModel.clearTokens()}forceTokenization(t){const e=new mg;this._updateTokensUntilLine(e,t),this._textModel.setTokens(e.finalize(),!this._hasLinesToTokenize())}getTokenTypeIfInsertingCharacter(t,e){if(!this._tokenizationStateStore)return 0;this.forceTokenization(t.lineNumber);const i=this._tokenizationStateStore.getBeginState(t.lineNumber-1);if(!i)return 0;const n=this._textModel.getLanguageId(),s=this._textModel.getLineContent(t.lineNumber),r=s.substring(0,t.column-1)+e+s.substring(t.column-1),o=ul(this._languageIdCodec,n,this._tokenizationStateStore.tokenizationSupport,r,!0,i),a=new mi(o.tokens,r,this._languageIdCodec);if(a.getCount()===0)return 0;const l=a.findTokenIndexAtOffset(t.column-1);return a.getStandardTokenType(l)}tokenizeLineWithEdit(t,e,i){const n=t.lineNumber,s=t.column;if(!this._tokenizationStateStore)return null;this.forceTokenization(n);const r=this._tokenizationStateStore.getBeginState(n-1);if(!r)return null;const o=this._textModel.getLineContent(n),a=o.substring(0,s-1)+i+o.substring(s-1+e),l=this._textModel.getLanguageIdAtPosition(n,0),h=ul(this._languageIdCodec,l,this._tokenizationStateStore.tokenizationSupport,a,!0,r);return new mi(h.tokens,a,this._languageIdCodec)}isCheapToTokenize(t){if(!this._tokenizationStateStore)return!0;const e=this._tokenizationStateStore.invalidLineStartIndex+1;return t>e?!1:t<e||this._textModel.getLineLength(t)<2048}_hasLinesToTokenize(){return this._tokenizationStateStore?this._tokenizationStateStore.invalidLineStartIndex<this._textModel.getLineCount():!1}_tokenizeOneInvalidLine(t){if(!this._tokenizationStateStore||!this._hasLinesToTokenize())return this._textModel.getLineCount()+1;const e=this._tokenizationStateStore.invalidLineStartIndex+1;return this._updateTokensUntilLine(t,e),e}_updateTokensUntilLine(t,e){if(!this._tokenizationStateStore)return;const i=this._textModel.getLanguageId(),n=this._textModel.getLineCount(),s=e-1;for(let r=this._tokenizationStateStore.invalidLineStartIndex;r<=s;r++){const o=this._textModel.getLineContent(r+1),a=this._tokenizationStateStore.getBeginState(r),l=ul(this._languageIdCodec,i,this._tokenizationStateStore.tokenizationSupport,o,!0,a);t.add(r+1,l.tokens),this._tokenizationStateStore.setEndState(n,r,l.endState),r=this._tokenizationStateStore.invalidLineStartIndex-1}}_tokenizeViewport(t,e,i){if(!this._tokenizationStateStore||i<=this._tokenizationStateStore.invalidLineStartIndex)return;if(e<=this._tokenizationStateStore.invalidLineStartIndex){this._updateTokensUntilLine(t,i);return}let n=this._textModel.getLineFirstNonWhitespaceColumn(e);const s=[];let r=null;for(let l=e-1;n>1&&l>=1;l--){const h=this._textModel.getLineFirstNonWhitespaceColumn(l);if(h!==0&&h<n){if(r=this._tokenizationStateStore.getBeginState(l-1),r)break;s.push(this._textModel.getLineContent(l)),n=h}}r||(r=this._tokenizationStateStore.initialState);const o=this._textModel.getLanguageId();let a=r;for(let l=s.length-1;l>=0;
vendor: 5,631 bytes, line 92
92l--)a=ul(this._languageIdCodec,o,this._tokenizationStateStore.tokenizationSupport,s[l],!1,a).endState;for(let l=e;l<=i;l++){const h=this._textModel.getLineContent(l),c=ul(this._languageIdCodec,o,this._tokenizationStateStore.tokenizationSupport,h,!0,a);t.add(l,c.tokens),this._tokenizationStateStore.markMustBeTokenized(l-1),a=c.endState}}};function jP(t){if(t.isTooLargeForTokenization())return[null,null];const e=Ge.get(t.getLanguageId());if(!e)return[null,null];let i;try{i=e.getInitialState()}catch(n){return We(n),[null,null]}return[e,i]}function ul(t,e,i,n,s,r){let o=null;if(i)try{o=i.tokenizeEncoded(n,s,r.clone())}catch(a){We(a)}return o||(o=OT(t.encodeLanguageId(e),r)),mi.convertToEndOffset(o.tokens,n.length),o}var os=new Uint32Array(0).buffer,Cr=class v_{static deleteBeginning(e,i){return e===null||e===os?e:v_.delete(e,0,i)}static deleteEnding(e,i){if(e===null||e===os)return e;const n=fs(e),s=n[n.length-2];return v_.delete(e,i,s)}static delete(e,i,n){if(e===null||e===os||i===n)return e;const s=fs(e),r=s.length>>>1;if(i===0&&s[s.length-2]===n)return os;const o=mi.findIndexInTokensArray(s,i),a=o>0?s[o-1<<1]:0;if(n<s[o<<1]){const u=n-i;for(let g=o;g<r;g++)s[g<<1]-=u;return e}let l,h;a!==i?(s[o<<1]=i,l=o+1<<1,h=i):(l=o<<1,h=a);const c=n-i;for(let u=o+1;u<r;u++){const g=s[u<<1]-c;g>h&&(s[l++]=g,s[l++]=s[(u<<1)+1],h=g)}if(l===s.length)return e;const d=new Uint32Array(l);return d.set(s.subarray(0,l),0),d.buffer}static append(e,i){if(i===os)return e;if(e===os)return i;if(e===null)return e;if(i===null)return null;const n=fs(e),s=fs(i),r=s.length>>>1,o=new Uint32Array(n.length+s.length);o.set(n,0);let a=n.length;const l=n[n.length-2];for(let h=0;h<r;h++)o[a++]=s[h<<1]+l,o[a++]=s[(h<<1)+1];return o.buffer}static insert(e,i,n){if(e===null||e===os)return e;const s=fs(e),r=s.length>>>1;let o=mi.findIndexInTokensArray(s,i);o>0&&s[o-1<<1]===i&&o--;for(let a=o;a<r;a++)s[a<<1]+=n;return e}};function fs(t){return t instanceof Uint32Array?t:new Uint32Array(t)}var qP=class C_{constructor(e){this._lineTokens=[],this._len=0,this._languageIdCodec=e}flush(){this._lineTokens=[],this._len=0}getTokens(e,i,n){let s=null;if(i<this._len&&(s=this._lineTokens[i]),s!==null&&s!==os)return new mi(fs(s),n,this._languageIdCodec);const r=new Uint32Array(2);return r[0]=n.length,r[1]=tw(this._languageIdCodec.encodeLanguageId(e)),new mi(r,n,this._languageIdCodec)}static _massageTokens(e,i,n){const s=n?fs(n):null;if(i===0){let r=!1;if(s&&s.length>1&&(r=li.getLanguageId(s[1])!==e),!r)return os}if(!s||s.length===0){const r=new Uint32Array(2);return r[0]=i,r[1]=tw(e),r.buffer}return s[s.length-2]=i,s.byteOffset===0&&s.byteLength===s.buffer.byteLength?s.buffer:s}_ensureLine(e){for(;e>=this._len;)this._lineTokens[this._len]=null,this._len++}_deleteLines(e,i){i!==0&&(e+i>this._len&&(i=this._len-e),this._lineTokens.splice(e,i),this._len-=i)}_insertLines(e,i){if(i===0)return;const n=[];for(let s=0;s<i;s++)n[s]=null;this._lineTokens=Vu(this._lineTokens,e,n),this._len+=i}setTokens(e,i,n,s,r){const o=C_._massageTokens(this._languageIdCodec.encodeLanguageId(e),n,s);this._ensureLine(i);const a=this._lineTokens[i];return this._lineTokens[i]=o,r?!C_._equals(a,o):!1}static _equals(e,i){if(!e||!i)return!e&&!i;const n=fs(e),s=fs(i);if(n.length!==s.length)return!1;for(let r=0,o=n.length;r<o;r++)if(n[r]!==s[r])return!1;return!0}acceptEdit(e,i,n){this._acceptDeleteRange(e),this._acceptInsertText(new A(e.startLineNumber,e.startColumn),i,n)}_acceptDeleteRange(e){const i=e.startLineNumber-1;if(i>=this._len)return;if(e.startLineNumber===e.endLineNumber){if(e.startColumn===e.endColumn)return;this._lineTokens[i]=Cr.delete(this._lineTokens[i],e.startColumn-1,e.endColumn-1);return}this._lineTokens[i]=Cr.deleteEnding(this._lineTokens[i],e.startColumn-1);const n=e.endLineNumber-1;let s=null;n<this._len&&(s=Cr.deleteBeginning(this._lineTokens[n],e.endColumn-1)),this._lineTokens[i]=Cr.append(this._lineTokens[i],s),this._deleteLines(e.startLineNumber,e.endLineNumber-e.startLineNumber)}_acceptInsertText(e,i,n){if(i===0&&n===0)return;const s=e.lineNumber-1;if(!(s>=this._len)){if(i===0){this._lineTokens[s]=Cr.insert(this._lineTokens[s],e.column-1,n);return}this._lineTokens[s]=Cr.deleteEnding(this._lineTokens[s],e.column-1),this._lineTokens[s]=Cr.insert(this._lineTokens[s],e.column-1,n),this._insertLines(e.lineNumber,i)}}};function tw(t){return(t<<0|16793600)>>>0}var GP=class Ex{constructor(e){this._pieces=[],this._isComplete=!1,this._languageIdCodec=e}flush(){this._pieces=[],this._isComplete=!1}isEmpty(){return this._pieces.length===0}set(e,i){this._pieces=e||[],this._isComplete=i}setPartial(e,i){let n=e;if(i.length>0){const r=i[0].getRange(),o=i[i.length-1].getRange();if(!r||!o)return e;n=e.plusRange(r).plusRange(o)}let s=null;for(let r=0,o=this._pieces.length;r<o;r++){const a=this._pieces[r];if(a.endLineNumber<n.startLineNumber)continue;if(a.startLineNumber>n.endLineNumber){s=s||{index:r};break}if(a.removeTokens(n),a.isEmpty()){this._pieces.splice(r,1),r--,o--;continue}if(a.endLineNumber<n.startLineNumber)continue;if(a.startLineNumber>n.endLineNumber){s=s||{index:r};continue}const[l,h]=a.split(n);if(l.isEmpty()){s=s||{index:r};continue}h.isEmpty()||(this._pieces.splice(r,1,l,h),r++,o++,s=s||{index:r})}return s=s||{index:this._pieces.length},i.length>0&&(this._pieces=Vu(this._pieces,s.index,i)),n}isComplete(){return this._isComplete}addSparseTokens(e,i){const n=this._pieces;if(n.length===0)return i;const s=n[Ex._findFirstPieceWithLine(n,e)].getLineTokens(e);if(!s)return i;const r=i.getCount(),o=s.getCount();let a=0;const l=[];let h=0,c=0;const d=(u,g)=>{u!==c&&(c=u,l[h++]=u,l[h++]=g)};for(let u=0;u<o;
92u++){const g=s.getStartCharacter(u),m=s.getEndCharacter(u),_=s.getMetadata(u),C=((_&1?1024:0)|(_&2?2048:0)|(_&4?4096:0)|(_&8?8192:0)|(_&16?8372224:0)|(_&32?4286578688:0))>>>0,w=~C>>>0;for(;a<r&&i.getEndOffset(a)<=g;)d(i.getEndOffset(a),i.getMetadata(a)),a++;for(a<r&&i.getStartOffset(a)<g&&d(g,i.getMetadata(a));a<r&&i.getEndOffset(a)<m;)d(i.getEndOffset(a),i.getMetadata(a)&w|_&C),a++;if(a<r)d(m,i.getMetadata(a)&w|_&C),i.getEndOffset(a)===m&&a++;else{const v=Math.min(Math.max(0,a-1),r-1);d(m,i.getMetadata(v)&w|_&C)}}for(;a<r;)d(i.getEndOffset(a),i.getMetadata(a)),a++;return new mi(new Uint32Array(l),i.getLineContent(),this._languageIdCodec)}static _findFirstPieceWithLine(e,i){let n=0,s=e.length-1;for(;n<s;){let r=n+Math.floor((s-n)/2);if(e[r].endLineNumber<i)n=r+1;else if(e[r].startLineNumber>i)s=r-1;else{for(;r>n&&e[r-1].startLineNumber<=i&&i<=e[r-1].endLineNumber;)r--;return r}}return n}acceptEdit(e,i,n,s,r){for(const o of this._pieces)o.acceptEdit(e,i,n,s,r)}},e0=ge("undoRedoService"),Dx=class{constructor(t,e){this.resource=t,this.elements=e}},fu=class Nx{constructor(){this.id=Nx._ID++,this.order=1}nextOrder(){return this.id===0?0:this.order++}};fu._ID=0;fu.None=new fu;var zs=class Tx{constructor(){this.id=Tx._ID++,this.order=1}nextOrder(){return this.id===0?0:this.order++}};zs._ID=0;zs.None=new zs;var ZP=function(t,e,i,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r},pg=function(t,e){return function(i,n){e(i,n,t)}};function YP(){return new zP}function XP(t){const e=YP();return e.acceptChunk(t),e.finish()}function iw(t,e){return(typeof t=="string"?XP(t):t).create(e)}var vc=0,QP=999;var JP=class{constructor(t){this._source=t,this._eos=!1}read(){if(this._eos)return null;const t=[];let e=0,i=0;do{const n=this._source.read();if(n===null)return this._eos=!0,e===0?null:t.join("");if(n.length>0&&(t[e++]=n,i+=n.length),i>=65536)return t.join("")}while(!0)}},fl=()=>{throw new Error("Invalid change accessor")},so=class Ir extends V{constructor(e,i,n,s=null,r,o,a){super(),this._undoRedoService=r,this._languageService=o,this._languageConfigurationService=a,this._onWillDispose=this._register(new M),this.onWillDispose=this._onWillDispose.event,this._onDidChangeDecorations=this._register(new n3(u=>this.handleBeforeFireDecorationsChangedEvent(u))),this.onDidChangeDecorations=this._onDidChangeDecorations.event,this._onDidChangeLanguage=this._register(new M),this.onDidChangeLanguage=this._onDidChangeLanguage.event,this._onDidChangeLanguageConfiguration=this._register(new M),this.onDidChangeLanguageConfiguration=this._onDidChangeLanguageConfiguration.event,this._onDidChangeTokens=this._register(new M),this.onDidChangeTokens=this._onDidChangeTokens.event,this._onDidChangeOptions=this._register(new M),this.onDidChangeOptions=this._onDidChangeOptions.event,this._onDidChangeAttached=this._register(new M),this.onDidChangeAttached=this._onDidChangeAttached.event,this._onDidChangeInjectedText=this._register(new M),this._eventEmitter=this._register(new s3),this._backgroundTokenizationState=0,this._onBackgroundTokenizationStateChanged=this._register(new M),vc++,this.id="$model"+vc,this.isForSimpleWidget=n.isForSimpleWidget,typeof s>"u"||s===null?this._associatedResource=Le.parse("inmemory://model/"+vc):this._associatedResource=s,this._attachedEditorCount=0;const{textBuffer:l,disposable:h}=iw(e,n.defaultEOL);this._buffer=l,this._bufferDisposable=h,this._options=Ir.resolveOptions(this._buffer,n);const c=this._buffer.getLineCount(),d=this._buffer.getValueLengthInRange(new T(1,1,c,this._buffer.getLineLength(c)+1),0);n.largeFileOptimizations?this._isTooLargeForTokenization=d>Ir.LARGE_FILE_SIZE_THRESHOLD||c>Ir.LARGE_FILE_LINE_COUNT_THRESHOLD:this._isTooLargeForTokenization=!1,this._isTooLargeForSyncing=d>Ir.MODEL_SYNC_LIMIT,this._versionId=1,this._alternativeVersionId=1,this._initialUndoRedoSnapshot=null,this._isDisposed=!1,this._isDisposing=!1,this._languageId=i,this._languageRegistryListener=this._languageConfigurationService.onDidChange(u=>{u.affects(this._languageId)&&this._onDidChangeLanguageConfiguration.fire({})}),this._instanceId=$y(vc),this._lastDecorationId=0,this._decorations=Object.create(null),this._decorationsTree=new nw,this._commandManager=new bP(this,this._und
92oRedoService),this._isUndoing=!1,this._isRedoing=!1,this._trimAutoWhitespaceLines=null,this._tokens=new qP(this._languageService.languageIdCodec),this._semanticTokens=new GP(this._languageService.languageIdCodec),this._tokenization=new KP(this,this._languageService.languageIdCodec),this._bracketPairColorizer=this._register(new dP(this,this._languageConfigurationService)),this._guidesTextModelPart=this._register(new C9(this,this._languageConfigurationService)),this._decorationProvider=this._register(new fP(this)),this._register(this._decorationProvider.onDidChange(()=>{this._onDidChangeDecorations.beginDeferredEmit(),this._onDidChangeDecorations.fire(),this._onDidChangeDecorations.endDeferredEmit()}))}static resolveOptions(e,i){if(i.detectIndentation){const n=qb(e,i.tabSize,i.insertSpaces);return new Qc({tabSize:n.tabSize,indentSize:n.tabSize,insertSpaces:n.insertSpaces,trimAutoWhitespace:i.trimAutoWhitespace,defaultEOL:i.defaultEOL,bracketPairColorizationOptions:i.bracketPairColorizationOptions})}return new Qc({tabSize:i.tabSize,indentSize:i.indentSize,insertSpaces:i.insertSpaces,trimAutoWhitespace:i.trimAutoWhitespace,defaultEOL:i.defaultEOL,bracketPairColorizationOptions:i.bracketPairColorizationOptions})}onDidChangeContent(e){return this._eventEmitter.slowEvent(i=>e(i.contentChangedEvent))}onDidChangeContentOrInjectedText(e){return Ur(this._eventEmitter.fastEvent(i=>e(i.rawContentChangedEvent)),this._onDidChangeInjectedText.event(i=>e(i)))}get bracketPairs(){return this._bracketPairColorizer}get guides(){return this._guidesTextModelPart}get backgroundTokenizationState(){return this._backgroundTokenizationState}handleTokenizationProgress(e){if(this._backgroundTokenizationState===2)return;const i=e?2:1;this._backgroundTokenizationState!==i&&(this._backgroundTokenizationState=i,this._bracketPairColorizer.handleDidChangeBackgroundTokenizationState(),this._onBackgroundTokenizationStateChanged.fire())}dispose(){this._isDisposing=!0,this._onWillDispose.fire(),this._languageRegistryListener.dispose(),this._tokenization.dispose(),this._isDisposed=!0,super.dispose(),this._bufferDisposable.dispose(),this._isDisposing=!1;const e=new Ix([],"",`
93`,!1,!1,!0,!0);e.dispose(),this._buffer=e,this._bufferDisposable=V.None}_assertNotDisposed(){if(this._isDisposed)throw new Error("Model is disposed!")}_emitContentChangedEvent(e,i){this._isDisposing||(this._bracketPairColorizer.handleDidChangeContent(i),this._tokenization.handleDidChangeContent(i),this._eventEmitter.f
93ire(new nO(e,i)))}setValue(e){if(this._assertNotDisposed(),e===null)return;const{textBuffer:i,disposable:n}=iw(e,this._options.defaultEOL);this._setValueFromTextBuffer(i,n)}_createContentChanged2(e,i,n,s,r,o,a){return{changes:[{range:e,rangeOffset:i,rangeLength:n,text:s}],eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:r,isRedoing:o,isFlush:a}}_setValueFromTextBuffer(e,i){this._assertNotDisposed();const n=this.getFullModelRange(),s=this.getValueLengthInRange(n),r=this.getLineCount(),o=this.getLineMaxColumn(r);this._buffer=e,this._bufferDisposable.dispose(),this._bufferDisposable=i,this._increaseVersionId(),this._tokens.flush(),this._semanticTokens.flush(),this._decorations=Object.create(null),this._decorationsTree=new nw,this._commandManager.clear(),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new jl([new J9],this._versionId,!1,!1),this._createContentChanged2(new T(1,1,r,o),0,s,this.getValue(),!1,!1,!0))}setEOL(e){this._assertNotDisposed();const i=e===1?`\r
94`:`
95`;if(this._buffer.getEOL()===i)return;const n=this.getFullModelRange(),s=this.getValueLengthInRange(n),r=this.getLineCount(),o=this.getLineMaxColumn(r);this._onBeforeEOLChange(),this._buffer.setEOL(i),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new jl([new iO],this._versionId,!1,!1),this._createContentChanged2(new T(1,1,r,o),0,s,this.getValue(),!1,!1,!1))}_onBeforeEOLChange(){this._decorationsTree.ensureAllNodesHaveRanges(this)}_onAfterEOLChange(){const e=this.getVersionId(),i=this._decorationsTree.collectNodesPostOrder();for(let n=0,s=i.length;n<s;n++){const r=i[n],o=r.range,a=r.cachedAbsoluteStart-r.start,l=this._buffer.getOffsetAt(o.startLineNumber,o.startColumn),h=this._buffer.getOffsetAt(o.endLineNumber,o.endColumn);r.cachedAbsoluteStart=l,r.cachedAbsoluteEnd=h,r.cachedVersionId=e,r.start=l-a,r.end=h-a,rr(r)}}onBeforeAttached(){this._attachedEditorCount++,this._attachedEditorCount===1&&(this._tokenization.handleDidChangeAttached(),this._onDidChangeAttached.fire(void 0))}onBeforeDetached(){this._attachedEditorCount--,this._attachedEditorCount===0&&(this._tokenization.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 e=0,i=0;const n=this._buffer.getLineCount();for(let s=1;s<=n;s++){const r=this._buffer.getLineLength(s);r>=1e4?i+=r:e+=r}return i>e}get uri(){return this._associatedResource}getOptions(){return this._assertNotDisposed(),this._options}getFormattingOptions(){return{tabSize:this._options.indentSize,insertSpaces:this._options.insertSpaces}}updateOptions(e){this._assertNotDisposed();const i=typeof e.tabSize<"u"?e.tabSize:this._options.tabSize,n=typeof e.indentSize<"u"?e.indentSize:this._options.indentSize,s=typeof e.insertSpaces<"u"?e.insertSpaces:this._options.insertSpaces,r=typeof e.trimAutoWhitespace<"u"?e.trimAutoWhitespace:this._options.trimAutoWhitespace,o=typeof e.bracketColorizationOptions<"u"?e.bracketColorizationOptions:this._options.bracketPairColorizationOptions,a=new Qc({tabSize:i,indentSize:n,insertSpaces:s,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:r,bracketPairColorizationOptions:o});if(this._options.equals(a))return;const l=this._options.createChangeEvent(a);this._options=a,this._bracketPairColorizer.handleDidChangeOptions(l),this._decorationProvider.handleDidChangeOptions(l),this._onDidChangeOptions.fire(l)}detectIndentation(e,i){this._assertNotDisposed();const n=qb(this._buffer,i,e);this.updateOptions({insertSpaces:n.insertSpaces,tabSize:n.tabSize,indentSize:n.tabSize})}normalizeIndentation(e){return this._assertNotDisposed(),Dk(e,this._options.indentSize,this._options.insertSpaces)}getVersionId(){return this._assertNotDisposed(),this._versionId}mightContainRTL(){return this._buffer.mightContainRTL()}mightContainUnusualLineTerminators(){return this._buffer.mightContainUnusualLineTerminators()}removeUnusualLineTerminators(e=null){const i=this.findMatches(zy.source,!1,!0,!1,null,!1,1073741824);this._buffer.resetMightContainUnusualLineTerminators(),this.pushEditOperations(e,i.map(n=>({range:n.range,text:null})),()=>null)}mightContainNonBasicASCII(){return this._buffer.mightContainNonBasicASCII()}getAlternativeVersionId(){return this._assertNotDisposed(),this._alternativeVersionId}getInitialUndoRedoSnapshot(){return this._assertNotDisposed(),this._initialUndoRedoSnapshot}getOffsetAt(e){this._assertNotDisposed();
vendor: 8,689 bytes, lines 95-101
95const i=this._validatePosition(e.lineNumber,e.column,0);return this._buffer.getOffsetAt(i.lineNumber,i.column)}getPositionAt(e){this._assertNotDisposed();const i=Math.min(this._buffer.getLength(),Math.max(0,e));return this._buffer.getPositionAt(i)}_increaseVersionId(){this._versionId=this._versionId+1,this._alternativeVersionId=this._versionId}_overwriteVersionId(e){this._versionId=e}_overwriteAlternativeVersionId(e){this._alternativeVersionId=e}_overwriteInitialUndoRedoSnapshot(e){this._initialUndoRedoSnapshot=e}getValue(e,i=!1){this._assertNotDisposed();const n=this.getFullModelRange(),s=this.getValueInRange(n,e);return i?this._buffer.getBOM()+s:s}createSnapshot(e=!1){return new JP(this._buffer.createSnapshot(e))}getValueLength(e,i=!1){this._assertNotDisposed();const n=this.getFullModelRange(),s=this.getValueLengthInRange(n,e);return i?this._buffer.getBOM().length+s:s}getValueInRange(e,i=0){return this._assertNotDisposed(),this._buffer.getValueInRange(this.validateRange(e),i)}getValueLengthInRange(e,i=0){return this._assertNotDisposed(),this._buffer.getValueLengthInRange(this.validateRange(e),i)}getCharacterCountInRange(e,i=0){return this._assertNotDisposed(),this._buffer.getCharacterCountInRange(this.validateRange(e),i)}getLineCount(){return this._assertNotDisposed(),this._buffer.getLineCount()}getLineContent(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineContent(e)}getLineLength(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(e)}getLinesContent(){return this._assertNotDisposed(),this._buffer.getLinesContent()}getEOL(){return this._assertNotDisposed(),this._buffer.getEOL()}getEndOfLineSequence(){return this._assertNotDisposed(),this._buffer.getEOL()===`
96`?0:1}getLineMinColumn(e){return this._assertNotDisposed(),1}getLineMaxColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(e)+1}getLineFirstNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(e)}getLineLastNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(e)}_validateRangeRelaxedNoAllocations(e){const i=this._buffer.getLineCount(),n=e.startLineNumber,s=e.startColumn;let r=Math.floor(typeof n=="number"&&!isNaN(n)?n:1),o=Math.floor(typeof s=="number"&&!isNaN(s)?s:1);if(r<1)r=1,o=1;else if(r>i)r=i,o=this.getLineMaxColumn(r);else if(o<=1)o=1;else{const d=this.getLineMaxColumn(r);o>=d&&(o=d)}const a=e.endLineNumber,l=e.endColumn;let h=Math.floor(typeof a=="number"&&!isNaN(a)?a:1),c=Math.floor(typeof l=="number"&&!isNaN(l)?l:1);if(h<1)h=1,c=1;else if(h>i)h=i,c=this.getLineMaxColumn(h);else if(c<=1)c=1;else{const d=this.getLineMaxColumn(h);c>=d&&(c=d)}return n===r&&s===o&&a===h&&l===c&&e instanceof T&&!(e instanceof xe)?e:new T(r,o,h,c)}_isValidPosition(e,i,n){if(typeof e!="number"||typeof i!="number"||isNaN(e)||isNaN(i)||e<1||i<1||(e|0)!==e||(i|0)!==i||e>this._buffer.getLineCount())return!1;if(i===1)return!0;if(i>this.getLineMaxColumn(e))return!1;if(n===1){const s=this._buffer.getLineCharCode(e,i-2);if(at(s))return!1}return!0}_validatePosition(e,i,n){const s=Math.floor(typeof e=="number"&&!isNaN(e)?e:1),r=Math.floor(typeof i=="number"&&!isNaN(i)?i:1),o=this._buffer.getLineCount();if(s<1)return new A(1,1);if(s>o)return new A(o,this.getLineMaxColumn(o));if(r<=1)return new A(s,1);const a=this.getLineMaxColumn(s);if(r>=a)return new A(s,a);if(n===1){const l=this._buffer.getLineCharCode(s,r-2);if(at(l))return new A(s,r-1)}return new A(s,r)}validatePosition(e){return this._assertNotDisposed(),e instanceof A&&this._isValidPosition(e.lineNumber,e.column,1)?e:this._validatePosition(e.lineNumber,e.column,1)}_isValidRange(e,i){const n=e.startLineNumber,s=e.startColumn,r=e.endLineNumber,o=e.endColumn;if(!this._isValidPosition(n,s,0)||!this._isValidPosition(r,o,0))return!1;if(i===1){const a=s>1?this._buffer.getLineCharCode(n,s-2):0,l=o>1&&o<=this._buffer.getLineLength(r)?this._buffer.getLineCharCode(r,o-2):0,h=at(a),c=at(l);return!h&&!c}return!0}validateRange(e){if(this._assertNotDisposed(),e instanceof T&&!(e instanceof xe)&&this._isValidRange(e,1))return e;const n=this._validatePosition(e.startLineNumber,e.startColumn,0),s=this._validatePosition(e.endLineNumber,e.endColumn,0),r=n.lineNumber,o=n.column,a=s.lineNumber,l=s.column;{const h=o>1?this._buffer.getLineCharCode(r,o-2):0,c=l>1&&l<=this._buffer.getLineLength(a)?this._buffer.getLineCharCode(a,l-2):0,d=at(h),u=at(c);return!d&&!u?new T(r,o,a,l):r===a&&o===l?new T(r,o-1,a,l-1):d&&u?new T(r,o-1,a,l+1):d?new T(r,o-1,a,l):new T(r,o,a,l+1)}}modifyPosition(e,i){this._assertNotDisposed();const n=this.getOffsetAt(e)+i;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,n)))}getFullModelRange(){this._assertNotDisposed();const e=this.getLineCount();return new T(1,1,e,this.getLineMaxColumn(e))}findMatchesLineByLine(e,i,n,s){return this._buffer.findMatchesLineByLine(e,i,n,s)}findMatches(e,i,n,s,r,o,a=QP){this._assertNotDisposed();let l=null;i!==null&&(Array.isArray(i)||(i=[i]),i.every(d=>T.isIRange(d))&&(l=i.map(d=>this.validateRange(d)))),l===null&&(l=[this.getFullModelRange()]),l=l.sort((d,u)=>d.startLineNumber-u.startLineNumber||d.startColumn-u.startColumn);const h=[];h.push(l.reduce((d,u)=>T.areIntersecting(d,u)?d.plusRange(u):(h.push(d),u)));let c;if(!n&&e.indexOf(`
97`)<0){const d=new Lr(e,n,s,r).parseSearchRequest();if(!d)return[];c=u=>this.findMatchesLineByLine(u,d,o,a)}else c=d=>Jh.findMatches(this,new Lr(e,n,s,r),d,o,a);return h.map(c).reduce((d,u)=>d.concat(u),[])}findNextMatch(e,i,n,s,r,o){this._assertNotDisposed();const a=this.validatePosition(i);if(!n&&e.indexOf(`
98`)<0){const l=new Lr(e,n,s,r).parseSearchRequest();if(!l)return null;const h=this.getLineCount();let c=new T(a.lineNumber,a.column,h,this.getLineMaxColumn(h)),d=this.findMatchesLineByLine(c,l,o,1);return Jh.findNextMatch(this,new Lr(e,n,s,r),a,o),d.length>0||(c=new T(1,1,a.lineNumber,this.getLineMaxColumn(a.lineNumber)),d=this.findMatchesLineByLine(c,l,o,1),d.length>0)?d[0]:null}return Jh.findNextMatch(this,new Lr(e,n,s,r),a,o)}findPreviousMatch(e,i,n,s,r,o){this._assertNotDisposed();const a=this.validatePosition(i);return Jh.findPreviousMatch(this,new Lr(e,n,s,r),a,o)}pushStackElement(){this._commandManager.pushStackElement()}popStackElement(){this._commandManager.popStackElement()}pushEOL(e){if((this.getEOL()===`
99`?0:1)!==e)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._initialUndoRedoSnapshot===null&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEOL(e)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_validateEditOperation(e){return e instanceof Lf?e:new Lf(e.identifier||null,this.validateRange(e.range),e.text,e.forceMoveMarkers||!1,e.isAutoWhitespaceEdit||!1,e._isTracked||!1)}_validateEditOperations(e){const i=[];for(let n=0,s=e.length;n<s;n++)i[n]=this._validateEditOperation(e[n]);return i}pushEditOperations(e,i,n){try{return this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._pushEditOperations(e,this._validateEditOperations(i),n)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_pushEditOperations(e,i,n){if(this._options.trimAutoWhitespace&&this._trimAutoWhitespaceLines){const s=i.map(o=>({range:this.validateRange(o.range),text:o.text}));let r=!0;if(e)for(let o=0,a=e.length;o<a;o++){const l=e[o];let h=!1;for(let c=0,d=s.length;c<d;c++){const u=s[c].range,g=u.startLineNumber>l.endLineNumber,m=l.startLineNumber>u.endLineNumber;if(!g&&!m){h=!0;break}}if(!h){r=!1;break}}if(r)for(let o=0,a=this._trimAutoWhitespaceLines.length;o<a;o++){const l=this._trimAutoWhitespaceLines[o],h=this.getLineMaxColumn(l);let c=!0;for(let d=0,u=s.length;d<u;d++){const g=s[d].range,m=s[d].text;if(!(l<g.startLineNumber||l>g.endLineNumber)&&!(l===g.startLineNumber&&g.startColumn===h&&g.isEmpty()&&m&&m.length>0&&m.charAt(0)===`
100`)&&!(l===g.startLineNumber&&g.startColumn===1&&g.isEmpty()&&m&&m.length>0&&m.charAt(m.length-1)===`
101`)){c=!1;break}}if(c){const d=new T(l,1,l,h);i.push(new Lf(null,d,null,!1,!1,!1))}}this._trimAutoWhitespaceLines=null}return this._initialUndoRedoSnapshot===null&&(this._initialUndoRedoSnapshot=this._und
101oRedoService.createSnapshot(this.uri)),this._commandManager.pushEditOperation(e,i,n)}_applyUndo(e,i,n,s){const r=e.map(o=>{const a=this.getPositionAt(o.newPosition),l=this.getPositionAt(o.newEnd);return{range:new T(a.lineNumber,a.column,l.lineNumber,l.column),text:o.oldText}});this._applyUndoRedoEdits(r,i,!0,!1,n,s)}_applyRedo(e,i,n,s){const r=e.map(o=>{const a=this.getPositionAt(o.oldPosition),l=this.getPositionAt(o.oldEnd);return{range:new T(a.lineNumber,a.column,l.lineNumber,l.column),text:o.newText}});this._applyUndoRedoEdits(r,i,!1,!0,n,s)}_applyUndoRedoEdits(e,i,n,s,r,o){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._isUndoing=n,this._isRedoing=s,this.applyEdits(e,!1),this.setEOL(i),this._overwriteAlternativeVersionId(r)}finally{this._isUndoing=!1,this._isRedoing=!1,this._eventEmitter.endDeferredEmit(o),this._onDidChangeDecorations.endDeferredEmit()}}applyEdits(e,i=!1){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit();const n=this._validateEditOperations(e);return this._doApplyEdits(n,i)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_doApplyEdits(e,i){const n=this._buffer.getLineCount(),s=this._buffer.applyEdits(e,this._options.trimAutoWhitespace,i),r=this._buffer.getLineCount(),o=s.changes;if(this._trimAutoWhitespaceLines=s.trimAutoWhitespaceLineNumbers,o.length!==0){for(let h=0,c=o.length;h<c;h++){const d=o[h],[u,g,m]=Ta(d.text);this._tokens.acceptEdit(d.range,u,g),this._semanticTokens.acceptEdit(d.range,u,g,m,d.text.length>0?d.text.charCodeAt(0):0),this._decorationsTree.acceptReplace(d.rangeOffset,d.rangeLength,d.text.length,d.forceMoveMarkers)}const a=[];this._increaseVersionId();let l=n;for(let h=0,c=o.length;h<c;h++){const d=o[h],[u]=Ta(d.text);this._onDidChangeDecorations.fire();const g=d.range.startLineNumber,m=d.range.endLineNumber,_=m-g,C=u,w=Math.min(_,C),v=C-_,b=r-l-v+g,y=b,k=b+C,S=this._decorationsTree.getInjectedTextInInterval(this,this.getOffsetAt(new A(y,1)),this.getOffsetAt(new A(k,this.getLineMaxColumn(k))),0),L=sr.fromDecorations(S),x=new ba(L);for(let E=w;E>=0;E--){const R=g+E,D=b+E;x.takeFromEndWhile(P=>P.lineNumber>D);const W=x.takeFromEndWhile(P=>P.lineNumber===D);a.push(new Tb(R,this.getLineContent(D),W))}if(w<_){const E=g+w;a.push(new eO(E+1,m))}if(w<C){const E=new ba(L),R=g+w,D=C-w,W=r-l-D+R+1,P=[],K=[];for(let j=0;j<D;j++){const ie=W+j;K[j]=this.getLineContent(ie),E.takeWhile(J=>J.lineNumber<ie),P[j]=E.takeWhile(J=>J.lineNumber===ie)}a.push(new tO(R+1,g+C,K,P))}l+=v}this._emitContentChangedEvent(new jl(a,this.getVersionId(),this._isUndoing,this._isRedoing),{changes:o,eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:this._isUndoing,isRedoing:this._isRedoing,isFlush:!1})}return s.reverseEdits===null?void 0:s.reverseEdits}undo(){return this._undoRedoService.undo(this.uri)}canUndo(){return this._undoRedoService.canUndo(this.uri)}redo(){return this._undoRedoService.redo(this.uri)}canRedo(){return this._undoRedoService.canRedo(this.uri)}handleBeforeFireDecorationsChangedEvent(e){if(e===null||e.size===0)return;const i=[...e].map(n=>new Tb(n,this.getLineContent(n),this._getInjectedTextInLine(n)));this._onDidChangeInjectedText.fire(new Qk(i))}changeDecorations(e,i=0){this._assertNotDisposed();try{return this._onDidChangeDecorations.beginDeferredEmit(),this._changeDecorations(i,e)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_changeDecorations(e,i){const n={addDecoration:(r,o)=>this._deltaDecorationsImpl(e,[],[{range:r,options:o}])[0],changeDecoration:(r,o)=>{this._changeDecorationImpl(r,o)},changeDecorationOptions:(r,o)=>{this._changeDecorationOptionsImpl(r,ow(o))},removeDecoration:r=>{this._deltaDecorationsImpl(e,[r],[])},deltaDecorations:(r,o)=>r.length===0&&o.length===0?[]:this._deltaDecorationsImpl(e,r,o)};let s=null;try{s=i(n)}catch(r){We(r)}return n.addDecoration=fl,n.changeDecoration=fl,n.changeDecorationOptions=fl,n.removeDecoration=fl,n.deltaDecorations=fl,s}deltaDecorations(e,i,n=0){if(this._assertNotDisposed(),e||(e=[]),e.length===0&&i.length===0)return[];try{return this._onDidChangeDecorations.beginDeferredEmit(),this._deltaDecorationsImpl(n,e,i)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_getTrackedRange(e){return this.getDecorationRange(e)}_setTrackedRange(e,i,n){const s=e?this._decorations[e]:null;if(!s)return i?this._deltaDecorationsImpl(0,[],[{range:i,options:rw[n]}])[0]:null;if(!i)return this._decorationsTree.delete(s),delete this._decorations[s.id],null;
101const r=this._validateRangeRelaxedNoAllocations(i),o=this._buffer.getOffsetAt(r.startLineNumber,r.startColumn),a=this._buffer.getOffsetAt(r.endLineNumber,r.endColumn);return this._decorationsTree.delete(s),s.reset(this.getVersionId(),o,a,r),s.setOptions(rw[n]),this._decorationsTree.insert(s),s.id}removeAllDecorationsWithOwnerId(e){if(this._isDisposed)return;const i=this._decorationsTree.collectNodesFromOwner(e);for(let n=0,s=i.length;n<s;n++){const r=i[n];this._decorationsTree.delete(r),delete this._decorations[r.id]}}getDecorationOptions(e){const i=this._decorations[e];return i?i.options:null}getDecorationRange(e){const i=this._decorations[e];return i?this._decorationsTree.getNodeRange(this,i):null}getLineDecorations(e,i=0,n=!1){return e<1||e>this.getLineCount()?[]:this.getLinesDecorations(e,e,i,n)}getLinesDecorations(e,i,n=0,s=!1){const r=this.getLineCount(),o=Math.min(r,Math.max(1,e)),a=Math.min(r,Math.max(1,i)),l=this.getLineMaxColumn(a),h=new T(o,1,a,l),c=this._getDecorationsInRange(h,n,s);return c.push(...this._decorationProvider.getDecorationsInRange(h,n,s)
101),c}getDecorationsInRange(e,i=0,n=!1){const s=this.validateRange(e),r=this._getDecorationsInRange(s,i,n);return r.push(...this._decorationProvider.getDecorationsInRange(s,i,n)),r}getOverviewRulerDecorations(e=0,i=!1){return this._decorationsTree.getAll(this,e,i,!0)}getInjectedTextDecorations(e=0){return this._decorationsTree.getAllInjectedText(this,e)}_getInjectedTextInLine(e){const i=this._buffer.getOffsetAt(e,1),n=i+this._buffer.getLineLength(e),s=this._decorationsTree.getInjectedTextInInterval(this,i,n,0);return sr.fromDecorations(s).filter(r=>r.lineNumber===e)}getAllDecorations(e=0,i=!1){let n=this._decorationsTree.getAll(this,e,i,!1);return n=n.concat(this._decorationProvider.getAllDecorations(e,i)),n}_getDecorationsInRange(e,i,n){const s=this._buffer.getOffsetAt(e.startLineNumber,e.startColumn),r=this._buffer.getOffsetAt(e.endLineNumber,e.endColumn);return this._decorationsTree.getAllInInterval(this,s,r,i,n)}getRangeAt(e,i){return this._buffer.getRangeAt(e,i-e)}_changeDecorationImpl(e,i){const n=this._decorations[e];if(!n)return;if(n.options.after){const a=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(a.endLineNumber)}if(n.options.before){const a=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(a.startLineNumber)}const s=this._validateRangeRelaxedNoAllocations(i),r=this._buffer.getOffsetAt(s.startLineNumber,s.startColumn),o=this._buffer.getOffsetAt(s.endLineNumber,s.endColumn);this._decorationsTree.delete(n),n.reset(this.getVersionId(),r,o,s),this._decorationsTree.insert(n),this._onDidChangeDecorations.checkAffectedAndFire(n.options),n.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(s.endLineNumber),n.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(s.startLineNumber)}_changeDecorationOptionsImpl(e,i){const n=this._decorations[e];if(!n)return;const s=!!(n.options.overviewRuler&&n.options.overviewRuler.color),r=!!(i.overviewRuler&&i.overviewRuler.color);if(this._onDidChangeDecorations.checkAffectedAndFire(n.options),this._onDidChangeDecorations.checkAffectedAndFire(i),n.options.after||i.after){const o=this._decorationsTree.getNodeRange(this,n);this._onDidChangeDecorations.recordLineAffectedByInjectedText(o.endLineNumber)}if(n.options.before||i.before){const o=this._decorationsTree.getNodeRange(this,n);this._onDidChangeDecorations.recordLineAffectedByInjectedText(o.startLineNumber)}s!==r?(this._decorationsTree.delete(n),n.setOptions(i),this._decorationsTree.insert(n)):n.setOptions(i)}_deltaDecorationsImpl(e,i,n){const s=this.getVersionId(),r=i.length;let o=0;const a=n.length;let l=0;const h=new Array(a);for(;o<r||l<a;){let c=null;if(o<r){do c=this._decorations[i[o++]];while(!c&&o<r);if(c){if(c.options.after){const d=this._decorationsTree.getNodeRange(this,c);this._onDidChangeDecorations.recordLineAffectedByInjectedText(d.endLineNumber)}if(c.options.before){const d=this._decorationsTree.getNodeRange(this,c);this._onDidChangeDecorations.recordLineAffectedByInjectedText(d.startLineNumber)}this._decorationsTree.delete(c),this._onDidChangeDecorations.checkAffectedAndFire(c.options)}}if(l<a){if(!c){const C=++this._lastDecorationId,w=`${this._instanceId};${C}`;c=new yx(w,0,0),this._decorations[w]=c}
101const d=n[l],u=this._validateRangeRelaxedNoAllocations(d.range),g=ow(d.options),m=this._buffer.getOffsetAt(u.startLineNumber,u.startColumn),_=this._buffer.getOffsetAt(u.endLineNumber,u.endColumn);c.ownerId=e,c.reset(s,m,_,u),c.setOptions(g),c.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(u.endLineNumber),c.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(u.startLineNumber),this._onDidChangeDecorations.checkAffectedAndFire(g),this._decorationsTree.insert(c),h[l]=c.id,l++}else c&&delete this._decorations[c.id]}return h}setTokens(e,i=!1){if(e.length!==0){const n=[];for(let s=0,r=e.length;s<r;s++){const o=e[s];let a=0,l=0,h=!1;for(let c=o.startLineNumber;c<=o.endLineNumber;c++)h?(this._tokens.setTokens(this._languageId,c-1,this._buffer.getLineLength(c),o.getLineTokens(c),!1),l=c):this._tokens.setTokens(this._languageId,c-1,this._buffer.getLineLength(c),o.getLineTokens(c),!0)&&(h=!0,a=c,l=c);h&&n.push({fromLineNumber:a,toLineNumber:l})}n.length>0&&this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:!1,ranges:n})}this.handleTokenizationProgress(i)}setSemanticTokens(e,i){this._semanticTokens.set(e,i),this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:e!==null,ranges:[{fromLineNumber:1,toLineNumber:this.getLineCount()}]})}hasCompleteSemanticTokens(){return this._semanticTokens.isComplete()}hasSomeSemanticTokens(){return!this._semanticTokens.isEmpty()}setPartialSemanticTokens(e,i){if(this.hasCompleteSemanticTokens())return;const n=this.validateRange(this._semanticTokens.setPartial(e,i));this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:!0,ranges:[{fromLineNumber:n.startLineNumber,toLineNumber:n.endLineNumber}]})}tokenizeViewport(e,i){e=Math.max(1,e),i=Math.min(this._buffer.getLineCount(),i),this._tokenization.tokenizeViewport(e,i)}clearTokens(){this._tokens.flush(),this._emitModelTokensChangedEvent({tokenizationSupportChanged:!0,semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._buffer.getLineCount()}]})}_emitModelTokensChangedEvent(e){this._isDisposing||(this._bracketPairColorizer.handleDidChangeTokens(e),this._onDidChangeTokens.fire(e))}resetTokenization(){this._tokenization.reset()}forceTokenization(e){if(e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");this._tokenization.forceTokenization(e)}isCheapToTokenize(e){return this._tokenization.isCheapToTokenize(e)}tokenizeIfCheap(e){this.isCheapToTokenize(e)&&this.forceTokenization(e)}getLineTokens(e){if(e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._getLineTokens(e)}_getLineTokens(e){const i=this.getLineContent(e),n=this._tokens.getTokens(this._languageId,e-1,i);return this._semanticTokens.addSparseTokens(e,n)}getLanguageId(){return this._languageId}setMode(e){if(this._languageId===e)return;const i={oldLanguage:this._languageId,newLanguage:e};this._languageId=e,this._bracketPairColorizer.handleDidChangeLanguage(i),this._tokenization.handleDidChangeLanguage(i),this._onDidChangeLanguage.fire(i),this._onDidChangeLanguageConfiguration.fire({})}getLanguageIdAtPosition(e,i){const n=this.validatePosition(new A(e,i)),s=this.getLineTokens(n.lineNumber);return s.getLanguageId(s.findTokenIndexAtOffset(n.column-1))}getTokenTypeIfInsertingCharacter(e,i,n){const s=this.validatePosition(new A(e,i));return this._tokenization.getTokenTypeIfInsertingCharacter(s,n)}tokenizeLineWithEdit(e,i,n){const s=this.validatePosition(e);return this._tokenization.tokenizeLineWithEdit(s,i,n)}getLanguageConfiguration(e){return this._languageConfigurationService.getLanguageConfiguration(e)}getWordAtPosition(e){this._assertNotDisposed();const i=this.validatePosition(e),n=this.getLineContent(i.lineNumber),s=this._getLineTokens(i.lineNumber),r=s.findTokenIndexAtOffset(i.column-1),[o,a]=Ir._findLanguageBoundaries(s,r),l=ih(i.column,this.getLanguageConfiguration(s.getLanguageId(r)).getWordDefinition(),n.substring(o,a),o);if(l&&l.startColumn<=e.column&&e.column<=l.endColumn)return l;if(r>0&&o===i.column-1){const[h,c]=Ir._findLanguageBoundaries(s,r-1),d=ih(i.column,this.getLanguageConfiguration(s.getLanguageId(r-1)).getWordDefinition(),n.substring(h,c),h);if(d&&d.startColumn<=e.column&&e.column<=d.endColumn)return d}return null}static _findLanguageBoundaries(e,i){const n=e.getLanguageId(i);let s=0;for(let o=i;o>=0&&e.getLanguageId(o)===n;o--)s=e.getStartOffset(o);let r=e.getLineContent().length;for(let o=i,a=e.getCount();o<a&&e.getLanguageId(o)===n;o++)r=e.getEndOffset(o);return[s,r]}getWordUntilPosition(e){const i=this.getWordAtPosition(e);return i?{word:i.word.substr(0,e.column-i.startColumn),startColumn:i.startColumn,endColumn:e.column}:{word:"",startColumn:e.column,endColumn:e.column}}normalizePosition(e,i){return e}getLineIndentColumn(e){return e3(this.getLineContent(e))+1}};so.MODEL_SYNC_LIMIT=52428800;so.LARGE_FILE_SIZE_THRESHOLD=20971520;so.LARGE_FILE_LINE_COUNT_THRESHOLD=3e5;so.DEFAULT_CREATION_OPTIONS={isForSimpleWidget:!1,tabSize:Et.tabSize,indentSize:Et.indentSize,insertSpaces:Et.insertSpaces,detectIndentation:!1,defaultEOL:1,trimAutoWhitespace:Et.trimAutoWhitespace,largeFileOptimizations:Et.largeFileOptimizations,bracketPairColorizationOptions:Et.bracketPairColorizationOptions};so=ZP([pg(4,e0),pg(5,Nt),pg(6,hr)],so);function e3(t){let e=0;for(const i of t)if(i===" "||i==="	")e++;else break;return e}function _g(t){return!!(t.options.overviewRuler&&t.options.overviewRuler.color)}function vg(t){return!!t.options.after||!!t.options.before}var nw=class{constructor(){this._decorationsTree0=new ug,this._decorationsTree1=new ug,this._injectedTextDecorationsTree=new ug}ensureAllNodesHaveRanges(t){this.getAll(t,0,!1,!1)}_ensureNodesHaveRanges(t,e){for(const i of e)i.range===null&&(i.range=t.getRangeAt(i.cachedAbsoluteStart,i.cachedAbsoluteEnd));return e}getAllInInterval(t,e,i,n,s){const r=t.getVersionId(),o=this._intervalSearch(e,i,n,s,r);return this._ensureNodesHaveRanges(t,o)}_intervalSearch(t,e,i,n,s){const r=this._decorationsTree0.intervalSearch(t,e,i,n,s),o=this._decorationsTree1.intervalSearch(t,e,i,n,s),a=this._injectedTextDecorationsTree.intervalSearch(t,e,i,n,s);return r.concat(o).concat(a)}getInjectedTextInInterval(t,e,i,n){const s=t.getVersionId(),r=this._injectedTextDecorationsTree.intervalSearch(e,i,n,!1,s);return this._ensureNodesHaveRanges(t,r).filter(o=>o.options.showIfCollapsed||!o.range.isEmpty())}getAllInjectedText(t,e){const i=t.getVersionId(),n=this._injectedTextDecorationsTree.search(e,!1,i);return this._ensureNodesHaveRanges(t,n).filter(s=>s.options.showIfCollapsed||!s.range.isEmpty())}getAll(t,e,i,n){const s=t.getVersionId(),r=this._search(e,i,n,s);return this._ensureNodesHaveRanges(t,r)}_search(t,e,i,n){if(i)return this._decorationsTree1.search(t,e,n);{const s=this._decorationsTree0.search(t,e,n),r=this._decorationsTree1.search(t,e,n),o=this._injectedTextDecorationsTree.search(t,e,n);return s.concat(r).concat(o)}}collectNodesFromOwner(t){const e=this._decorationsTree0.collectNodesFromOwner(t),i=this._decorationsTree1.collectNodesFromOwner(t),n=this._injectedTextDecorationsTree.collectNodesFromOwner(t);
101return e.concat(i).concat(n)}collectNodesPostOrder(){const t=this._decorationsTree0.collectNodesPostOrder(),e=this._decorationsTree1.collectNodesPostOrder(),i=this._injectedTextDecorationsTree.collectNodesPostOrder();return t.concat(e).concat(i)}insert(t){vg(t)?this._injectedTextDecorationsTree.insert(t):_g(t)?this._decorationsTree1.insert(t):this._decorationsTree0.insert(t)}delete(t){vg(t)?this._injectedTextDecorationsTree.delete(t):_g(t)?this._decorationsTree1.delete(t):this._decorationsTree0.delete(t)}getNodeRange(t,e){const i=t.getVersionId();return e.cachedVersionId!==i&&this._resolveNode(e,i),e.range===null&&(e.range=t.getRangeAt(e.cachedAbsoluteStart,e.cachedAbsoluteEnd)),e.range}_resolveNode(t,e){vg(t)?this._injectedTextDecorationsTree.resolveNode(t,e):_g(t)?this._decorationsTree1.resolveNode(t,e):this._decorationsTree0.resolveNode(t,e)}acceptReplace(t,e,i,n){this._decorationsTree0.acceptReplace(t,e,i,n),this._decorationsTree1.acceptReplace(t,e,i,n),this._injectedTextDecorationsTree.acceptReplace(t,e,i,n)}};function Is(t){return t.replace(/[^a-z0-9\-_]/gi," ")}var Mx=class{constructor(t){this.color=t.color||"",this.darkColor=t.darkColor||""}},t3=class extends Mx{constructor(t){super(t),this._resolvedColor=null,this.position=typeof t.position=="number"?t.position:eo.Center}getColor(t){return this._resolvedColor||(t.type!=="light"&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,t):this._resolvedColor=this._resolveColor(this.color,t)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=null}_resolveColor(t,e){if(typeof t=="string")return t;const i=t?e.getColor(t.id):null;return i?i.toString():""}},i3=class extends Mx{constructor(t){super(t),this.position=t.position}getColor(t){return this._resolvedColor||(t.type!=="light"&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,t):this._resolvedColor=this._resolveColor(this.color,t)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=void 0}_resolveColor(t,e){return typeof t=="string"?O.fromHex(t):e.getColor(t.id)}},sw=class b_{constructor(e){this.content=e.content||"",this.inlineClassName=e.inlineClassName||null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.attachedData=e.attachedData||null,this.cursorStops=e.cursorStops||null}static from(e){return e instanceof b_?e:new b_(e)}},Je=class w_{constructor(e){var i,n;this.description=e.description,this.stickiness=e.stickiness||0,this.zIndex=e.zIndex||0,this.className=e.className?Is(e.className):null,this.hoverMessage=e.hoverMessage||null,this.glyphMarginHoverMessage=e.glyphMarginHoverMessage||null,this.isWholeLine=e.isWholeLine||!1,this.showIfCollapsed=e.showIfCollapsed||!1,this.collapseOnReplaceEdit=e.collapseOnReplaceEdit||!1,this.overviewRuler=e.overviewRuler?new t3(e.overviewRuler):null,this.minimap=e.minimap?new i3(e.minimap):null,this.glyphMarginClassName=e.glyphMarginClassName?Is(e.glyphMarginClassName):null,this.linesDecorationsClassName=e.linesDecorationsClassName?Is(e.linesDecorationsClassName):null,this.firstLineDecorationClassName=e.firstLineDecorationClassName?Is(e.firstLineDecorationClassName):null,this.marginClassName=e.marginClassName?Is(e.marginClassName):null,this.inlineClassName=e.inlineClassName?Is(e.inlineClassName):null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.beforeContentClassName=e.beforeContentClassName?Is(e.beforeContentClassName):null,this.afterContentClassName=e.afterContentClassName?Is(e.afterContentClassName):null,this.after=e.after?sw.from(e.after):null,this.before=e.before?sw.from(e.before):null,this.hideInCommentTokens=(i=e.hideInCommentTokens)!==null&&i!==void 0?i:!1,this.hideInStringTokens=(n=e.hideInStringTokens)!==null&&n!==void 0?n:!1}static register(e){return new w_(e)}static createDynamic(e){return new w_(e)}};Je.EMPTY=Je.register({description:"empty"});var rw=[Je.register({description:"tracked-range-always-grows-when-typing-at-edges",stickiness:0}),Je.register({description:"tracked-range-never-grows-when-typing-at-edges",stickiness:1}),Je.register({description:"tracked-range-grows-only-when-typing-before",stickiness:2}),Je.register({description:"tracked-range-grows-only-when-typing-after",stickiness:3})];function ow(t){return t instanceof Je?t:Je.createDynamic(t)}var n3=class extends V{constructor(t){super(),this.handleBeforeFire=t,this._actual=this._register(new M),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 t;if(this._deferredCnt--,this._deferredCnt===0){if(this._shouldFire){this.handleBeforeFire(this._affectedInjectedTextLines);const e={affectsMinimap:this._affectsMinimap,affectsOverviewRuler:this._affectsOverviewRuler};this._shouldFire=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._actual.fire(e)}(t=this._affectedInjectedTextLines)===null||t===void 0||t.clear(),this._affectedInjectedTextLines=null}}recordLineAffectedByInjectedText(t){this._affectedInjectedTextLines||(this._affectedInjectedTextLines=new Set),this._affectedInjectedTextLines.add(t)}checkAffectedAndFire(t){this._affectsMinimap||(this._affectsMinimap=!!(t.minimap&&t.minimap.position)),this._affectsOverviewRuler||(this._affectsOverviewRuler=!!(t.overviewRuler&&t.overviewRuler.color)),this._shouldFire=!0}fire(){this._affectsMinimap=!0,this._affectsOverviewRuler=!0,this._shouldFire=!0}},s3=class extends V{constructor(){super(),this._fastEmitter=this._register(new M),this.fastEvent=this._fastEmitter.event,this._slowEmitter=this._register(new M),this.slowEvent=this._slowEmitter.event,this._deferredCnt=0,this._deferredEvent=null}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(t=null){if(this._deferredCnt--,this._deferredCnt===0&&this._deferredEvent!==null){this._deferredEvent.rawContentChangedEvent.resultingSelection=t;const e=this._deferredEvent;
vendor: 21,867 bytes, line 101
101this._deferredEvent=null,this._fastEmitter.fire(e),this._slowEmitter.fire(e)}}fire(t){if(this._deferredCnt>0){this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(t):this._deferredEvent=t;return}this._fastEmitter.fire(t),this._slowEmitter.fire(t)}};function Cg(t,e){return t===null?e?gu.INSTANCE:mu.INSTANCE:new r3(t,e)}var r3=class{constructor(t,e){this._projectionData=t,this._isVisible=e}isVisible(){return this._isVisible}setVisible(t){return this._isVisible=t,this}getProjectionData(){return this._projectionData}getViewLineCount(){return this._isVisible?this._projectionData.getOutputLineCount():0}getViewLineContent(t,e,i){this._assertVisible();const n=i>0?this._projectionData.breakOffsets[i-1]:0,s=this._projectionData.breakOffsets[i];let r;if(this._projectionData.injectionOffsets!==null){const o=this._projectionData.injectionOffsets.map((a,l)=>new sr(0,0,a+1,this._projectionData.injectionOptions[l],0));r=sr.applyInjectedText(t.getLineContent(e),o).substring(n,s)}else r=t.getValueInRange({startLineNumber:e,startColumn:n+1,endLineNumber:e,endColumn:s+1});return i>0&&(r=aw(this._projectionData.wrappedTextIndentLength)+r),r}getViewLineLength(t,e,i){return this._assertVisible(),this._projectionData.getLineLength(i)}getViewLineMinColumn(t,e,i){return this._assertVisible(),this._projectionData.getMinOutputOffset(i)+1}getViewLineMaxColumn(t,e,i){return this._assertVisible(),this._projectionData.getMaxOutputOffset(i)+1}getViewLineData(t,e,i){const n=new Array;return this.getViewLinesData(t,e,i,1,0,[!0],n),n[0]}getViewLinesData(t,e,i,n,s,r,o){this._assertVisible();const a=this._projectionData,l=a.injectionOffsets,h=a.injectionOptions;let c=null;if(l){c=[];let u=0,g=0;for(let m=0;m<a.getOutputLineCount();m++){const _=new Array;c[m]=_;const C=m>0?a.breakOffsets[m-1]:0,w=a.breakOffsets[m];for(;g<l.length;){const v=h[g].content.length,b=l[g]+u,y=b+v;if(b>w)break;if(C<y){const k=h[g];if(k.inlineClassName){const S=m>0?a.wrappedTextIndentLength:0,L=S+Math.max(b-C,0),x=S+Math.min(y-C,w);L!==x&&_.push(new Z5(L,x,k.inlineClassName,k.inlineClassNameAffectsLetterSpacing))}}if(y<=w)u+=v,g++;else break}}}let d;l?d=t.getLineTokens(e).withInserted(l.map((u,g)=>({offset:u,text:h[g].content,tokenMetadata:mi.defaultTokenMetadata}))):d=t.getLineTokens(e);for(let u=i;u<i+n;u++){const g=s+u-i;if(!r[g]){o[g]=null;continue}o[g]=this._getViewLineData(d,c?c[u]:null,u)}}_getViewLineData(t,e,i){this._assertVisible();const n=this._projectionData,s=i>0?n.wrappedTextIndentLength:0,r=i>0?n.breakOffsets[i-1]:0,o=n.breakOffsets[i],a=t.sliceAndInflate(r,o,s);let l=a.getLineContent();i>0&&(l=aw(n.wrappedTextIndentLength)+l);const h=this._projectionData.getMinOutputOffset(i)+1,c=l.length+1,d=i+1<this.getViewLineCount(),u=i===0?0:n.breakOffsetsVisibleColumn[i-1];return new kv(l,d,h,c,u,a,e)}getModelColumnOfViewPosition(t,e){return this._assertVisible(),this._projectionData.translateToInputOffset(t,e-1)+1}getViewPositionOfModelPosition(t,e,i=2){return this._assertVisible(),this._projectionData.translateToOutputPosition(e-1,i).toPosition(t)}getViewLineNumberOfModelPosition(t,e){return this._assertVisible(),t+this._projectionData.translateToOutputPosition(e-1).outputLineIndex}normalizePosition(t,e,i){const n=e.lineNumber-t;return this._projectionData.normalizeOutputPosition(t,e.column-1,i).toPosition(n)}getInjectedTextAt(t,e){return this._projectionData.getInjectedText(t,e-1)}_assertVisible(){if(!this._isVisible)throw new Error("Not supported")}},gu=class{constructor(){}isVisible(){return!0}setVisible(t){return t?this:mu.INSTANCE}getProjectionData(){return null}getViewLineCount(){return 1}getViewLineContent(t,e,i){return t.getLineContent(e)}getViewLineLength(t,e,i){return t.getLineLength(e)}getViewLineMinColumn(t,e,i){return t.getLineMinColumn(e)}getViewLineMaxColumn(t,e,i){return t.getLineMaxColumn(e)}getViewLineData(t,e,i){const n=t.getLineTokens(e),s=n.getLineContent();return new kv(s,!1,1,s.length+1,0,n.inflate(),null)}getViewLinesData(t,e,i,n,s,r,o){if(!r[s]){o[s]=null;return}o[s]=this.getViewLineData(t,e,0)}getModelColumnOfViewPosition(t,e){return e}getViewPositionOfModelPosition(t,e){return new A(t,e)}getViewLineNumberOfModelPosition(t,e){return t}normalizePosition(t,e,i){return e}getInjectedTextAt(t,e){return null}};gu.INSTANCE=new gu;var mu=class{constructor(){}isVisible(){return!1}setVisible(t){return t?gu.INSTANCE:this}getProjectionData(){return null}getViewLineCount(){return 0}getViewLineContent(t,e,i){throw new Error("Not supported")}getViewLineLength(t,e,i){throw new Error("Not supported")}getViewLineMinColumn(t,e,i){throw new Error("Not supported")}getViewLineMaxColumn(t,e,i){throw new Error("Not supported")}getViewLineData(t,e,i){throw new Error("Not supported")}getViewLinesData(t,e,i,n,s,r,o){throw new Error("Not supported")}getModelColumnOfViewPosition(t,e){throw new Error("Not supported")}getViewPositionOfModelPosition(t,e){throw new Error("Not supported")}getViewLineNumberOfModelPosition(t,e){throw new Error("Not supported")}normalizePosition(t,e,i){throw new Error("Not supported")}getInjectedTextAt(t,e){throw new Error("Not supported")}};mu.INSTANCE=new mu;var bg=[""];function aw(t){if(t>=bg.length)for(let e=1;e<=t;e++)bg[e]=o3(e);return bg[t]}function o3(t){return new Array(t+1).join(" ")}var a3=class{constructor(t,e,i,n,s,r,o,a,l){this._editorId=t,this.model=e,this._validModelVersionId=-1,this._domLineBreaksComputerFactory=i,this._monospaceLineBreaksComputerFactory=n,this.fontInfo=s,this.tabSize=r,this.wrappingStrategy=o,this.wrappingColumn=a,this.wrappingIndent=l,this._constructLines(!0,null)}dispose(){this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[])}createCoordinatesConverter(){return new h3(this)}_constructLines(t,e){this.modelLineProjections=[],t&&(this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[]));const i=this.model.getLinesContent(),n=this.model.getInjectedTextDecorations(this._editorId),s=i.length,r=this.createLineBreaksComputer(),o=new ba(sr.fromDecorations(n));for(let m=0;m<s;m++){const _=o.takeWhile(C=>C.lineNumber===m+1);r.addRequest(i[m],_,e?e[m]:null)}const a=r.finalize(),l=[],h=this.hiddenAreasDecorationIds.map(m=>this.model.getDecorationRange(m)).sort(T.compareRangesUsingStarts);let c=1,d=0,u=-1,g=u+1<h.length?d+1:s+2;for(let m=0;m<s;m++){const _=m+1;_===g&&(u++,c=h[u].startLineNumber,d=h[u].endLineNumber,g=u+1<h.length?d+1:s+2);const C=_>=c&&_<=d,w=Cg(a[m],!C);l[m]=w.getViewLineCount(),this.modelLineProjections[m]=w}this._validModelVersionId=this.model.getVersionId(),this.projectedModelLineLineCounts=new l5(l)}getHiddenAreas(){return this.hiddenAreasDecorationIds.map(t=>this.model.getDecorationRange(t))}setHiddenAreas(t){const e=l3(t.map(c=>this.model.validateRange(c))),i=this.hiddenAreasDecorationIds.map(c=>this.model.getDecorationRange(c)).sort(T.compareRangesUsingStarts);if(e.length===i.length){let c=!1;for(let d=0;d<e.length;d++)if(!e[d].equalsRange(i[d])){c=!0;break}if(!c)return!1}const n=e.map(c=>({range:c,options:Je.EMPTY}));this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,n);const s=e;let r=1,o=0,a=-1,l=a+1<s.length?o+1:this.modelLineProjections.length+2,h=!1;for(let c=0;c<this.modelLineProjections.length;c++){const d=c+1;d===l&&(a++,r=s[a].startLineNumber,o=s[a].endLineNumber,l=a+1<s.length?o+1:this.modelLineProjections.length+2);let u=!1;if(d>=r&&d<=o?this.modelLineProjections[c].isVisible()&&(this.modelLineProjections[c]=this.modelLineProjections[c].setVisible(!1),u=!0):(h=!0,this.modelLineProjections[c].isVisible()||(this.modelLineProjections[c]=this.modelLineProjections[c].setVisible(!0),u=!0)),u){const g=this.modelLineProjections[c].getViewLineCount();this.projectedModelLineLineCounts.setValue(c,g)}}return h||this.setHiddenAreas([]),!0}modelPositionIsVisible(t,e){return t<1||t>this.modelLineProjections.length?!1:this.modelLineProjections[t-1].isVisible()}getModelLineViewLineCount(t){return t<1||t>this.modelLineProjections.length?1:this.modelLineProjections[t-1].getViewLineCount()}setTabSize(t){return this.tabSize===t?!1:(this.tabSize=t,this._constructLines(!1,null),!0)}setWrappingSettings(t,e,i,n){const s=this.fontInfo.equals(t),r=this.wrappingStrategy===e,o=this.wrappingColumn===i,a=this.wrappingIndent===n;if(s&&r&&o&&a)return!1;const l=s&&r&&!o&&a;this.fontInfo=t,this.wrappingStrategy=e,this.wrappingColumn=i,this.wrappingIndent=n;let h=null;if(l){h=[];for(let c=0,d=this.modelLineProjections.length;c<d;c++)h[c]=this.modelLineProjections[c].getProjectionData()}return this._constructLines(!1,h),!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(t,e,i){if(!t||t<=this._validModelVersionId)return null;const n=e===1?1:this.projectedModelLineLineCounts.getPrefixSum(e-1)+1,s=this.projectedModelLineLineCounts.getPrefixSum(i);return this.modelLineProjections.splice(e-1,i-e+1),this.projectedModelLineLineCounts.removeValues(e-1,i-e+1),new o_(n,s)}onModelLinesInserted(t,e,i,n){if(!t||t<=this._validModelVersionId)return null;const s=e>2&&!this.modelLineProjections[e-2].isVisible(),r=e===1?1:this.projectedModelLineLineCounts.getPrefixSum(e-1)+1;let o=0;const a=[],l=[];for(let h=0,c=n.length;h<c;h++){const d=Cg(n[h],!s);a.push(d);const u=d.getViewLineCount();o+=u,l[h]=u}return this.modelLineProjections=this.modelLineProjections.slice(0,e-1).concat(a).concat(this.modelLineProjections.slice(e-1)),this.projectedModelLineLineCounts.insertValues(e-1,l),new a_(r,r+o-1)}onModelLineChanged(t,e,i){if(t!==null&&t<=this._validModelVersionId)return[!1,null,null,null];const n=e-1,s=this.modelLineProjections[n].getViewLineCount(),r=this.modelLineProjections[n].isVisible(),o=Cg(i,r);this.modelLineProjections[n]=o;const a=this.modelLineProjections[n].getViewLineCount();let l=!1,h=0,c=-1,d=0,u=-1,g=0,m=-1;s>a?(h=this.projectedModelLineLineCounts.getPrefixSum(e-1)+1,c=h+a-1,g=c+1,m=g+(s-a)-1,l=!0):s<a?(h=this.projectedModelLineLineCounts.getPrefixSum(e-1)+1,c=h+s-1,d=c+1,u=d+(a-s)-1,l=!0):(h=this.projectedModelLineLineCounts.getPrefixSum(e-1)+1,c=h+a-1),this.projectedModelLineLineCounts.setValue(n,a);const _=h<=c?new Jk(h,c):null,C=d<=u?new a_(d,u):null,w=g<=m?new o_(g,m):null;return[l,_,C,w]}acceptVersionId(t){this._validModelVersionId=t,this.modelLineProjections.length===1&&!this.modelLineProjections[0].isVisible()&&this.setHiddenAreas([])}getViewLineCount(){return this.projectedModelLineLineCounts.getTotalSum()}_toValidViewLineNumber(t){if(t<1)return 1;const e=this.getViewLineCount();return t>e?e:t|0}getActiveIndentGuide(t,e,i){t=this._toValidViewLineNumber(t),e=this._toValidViewLineNumber(e),i=this._toValidViewLineNumber(i);const n=this.convertViewPositionToModelPosition(t,this.getViewLineMinColumn(t)),s=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),r=this.convertViewPositionToModelPosition(i,this.getViewLineMinColumn(i)),o=this.model.guides.getActiveIndentGuide(n.lineNumber,s.lineNumber,r.lineNumber),a=this.convertModelPositionToViewPosition(o.startLineNumber,1),l=this.convertModelPositionToViewPosition(o.endLineNumber,this.model.getLineMaxColumn(o.endLineNumber));return{startLineNumber:a.lineNumber,endLineNumber:l.lineNumber,indent:o.indent}}getViewLineInfo(t){t=this._toValidViewLineNumber(t);const e=this.projectedModelLineLineCounts.getIndexOf(t-1),i=e.index,n=e.remainder;return new lw(i+1,n)}getMinColumnOfViewLine(t){return this.modelLineProjections[t.modelLineNumber-1].getViewLineMinColumn(this.model,t.modelLineNumber,t.modelLineWrappedLineIdx)}getModelStartPositionOfViewLine(t){const e=this.modelLineProjections[t.modelLineNumber-1],i=e.getViewLineMinColumn(this.model,t.modelLineNumber,t.modelLineWrappedLineIdx),n=e.getModelColumnOfViewPosition(t.modelLineWrappedLineIdx,i);return new A(t.modelLineNumber,n)}getModelEndPositionOfViewLine(t){const e=this.modelLineProjections[t.modelLineNumber-1],i=e.getViewLineMaxColumn(this.model,t.modelLineNumber,t.modelLineWrappedLineIdx),n=e.getModelColumnOfViewPosition(t.modelLineWrappedLineIdx,i);return new A(t.modelLineNumber,n)}getViewLineInfosGroupedByModelRanges(t,e){const i=this.getViewLineInfo(t),n=this.getViewLineInfo(e),s=new Array;let r=this.getModelStartPositionOfViewLine(i),o=new Array;for(let a=i.modelLineNumber;a<=n.modelLineNumber;a++){const l=this.modelLineProjections[a-1];if(l.isVisible()){const h=a===i.modelLineNumber?i.modelLineWrappedLineIdx:0,c=a===n.modelLineNumber?n.modelLineWrappedLineIdx+1:l.getViewLineCount();for(let d=h;d<c;d++)o.push(new lw(a,d))}if(!l.isVisible()&&r){const h=new A(a-1,this.model.getLineMaxColumn(a-1)+1),c=T.fromPositions(r,h);s.push(new hw(c,o)),o=[],r=null}else l.isVisible()&&!r&&(r=new A(a,1))}if(r){const a=T.fromPositions(r,this.getModelEndPositionOfViewLine(n));s.push(new hw(a,o))}return s}getViewLinesBracketGuides(t,e,i,n){const s=i?this.convertViewPositionToModelPosition(i.lineNumber,i.column):null,r=[];for(const o of this.getViewLineInfosGroupedByModelRanges(t,e)){const a=o.modelRange.startLineNumber,l=this.model.guides.getLinesBracketGuides(a,o.modelRange.endLineNumber,s,n);for(const h of o.viewLines)if(h.isWrappedLineContinuation&&this.getMinColumnOfViewLine(h)===1)r.push([]);else{let c=l[h.modelLineNumber-a];c=c.map(d=>d.horizontalLine?new Zo(d.visibleColumn,d.className,new Qp(d.horizontalLine.top,this.convertModelPositionToViewPosition(h.modelLineNumber,d.horizontalLine.endColumn).column)):d),r.push(c)}}return r}getViewLinesIndentGuides(t,e){t=this._toValidViewLineNumber(t),e=this._toValidViewLineNumber(e);const i=this.convertViewPositionToModelPosition(t,this.getViewLineMinColumn(t)),n=this.convertViewPositionToModelPosition(e,this.getViewLineMaxColumn(e));let s=[];const r=[],o=[],a=i.lineNumber-1,l=n.lineNumber-1;let h=null;for(let g=a;g<=l;g++){const m=this.modelLineProjections[g];if(m.isVisible()){const _=m.getViewLineNumberOfModelPosition(0,g===a?i.column:1),C=m.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(g+1)),w=C-_+1;let v=0;w>1&&m.getViewLineMinColumn(this.model,g+1,C)===1&&(v=_===0?1:2),r.push(w),o.push(v),h===null&&(h=new A(g+1,0))}else h!==null&&(s=s.concat(this.model.guides.getLinesIndentGuides(h.lineNumber,g)),h=null)}h!==null&&(s=s.concat(this.model.guides.getLinesIndentGuides(h.lineNumber,n.lineNumber)),h=null);const c=e-t+1,d=new Array(c);let u=0;for(let g=0,m=s.length;g<m;g++){let _=s[g];const C=Math.min(c-u,r[g]),w=o[g];let v;w===2?v=0:w===1?v=1:v=C;for(let b=0;b<C;b++)b===v&&(_=0),d[u++]=_}return d}getViewLineContent(t){const e=this.getViewLineInfo(t);return this.modelLineProjections[e.modelLineNumber-1].getViewLineContent(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx)}getViewLineLength(t){const e=this.getViewLineInfo(t);return this.modelLineProjections[e.modelLineNumber-1].getViewLineLength(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx)}getViewLineMinColumn(t){const e=this.getViewLineInfo(t);return this.modelLineProjections[e.modelLineNumber-1].getViewLineMinColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx)}getViewLineMaxColumn(t){const e=this.getViewLineInfo(t);return this.modelLineProjections[e.modelLineNumber-1].getViewLineMaxColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx)}getViewLineData(t){const e=this.getViewLineInfo(t);return this.modelLineProjections[e.modelLineNumber-1].getViewLineData(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx)}getViewLinesData(t,e,i){t=this._toValidViewLineNumber(t),e=this._toValidViewLineNumber(e);const n=this.projectedModelLineLineCounts.getIndexOf(t-1);let s=t;const r=n.index,o=n.remainder,a=[];for(let l=r,h=this.model.getLineCount();l<h;l++){const c=this.modelLineProjections[l];if(!c.isVisible())continue;const d=l===r?o:0;let u=c.getViewLineCount()-d,g=!1;if(s+u>e&&(g=!0,u=e-s+1),c.getViewLinesData(this.model,l+1,d,u,s-t,i,a),s+=u,g)break}return a}validateViewPosition(t,e,i){t=this._toValidViewLineNumber(t);const n=this.projectedModelLineLineCounts.getIndexOf(t-1),s=n.index,r=n.remainder,o=this.modelLineProjections[s],a=o.getViewLineMinColumn(this.model,s+1,r),l=o.getViewLineMaxColumn(this.model,s+1,r);e<a&&(e=a),e>l&&(e=l);const h=o.getModelColumnOfViewPosition(r,e);return this.model.validatePosition(new A(s+1,h)).equals(i)?new A(t,e):this.convertModelPositionToViewPosition(i.lineNumber,i.column)}validateViewRange(t,e){const i=this.validateViewPosition(t.startLineNumber,t.startColumn,e.getStartPosition()),n=this.validateViewPosition(t.endLineNumber,t.endColumn,e.getEndPosition());return new T(i.lineNumber,i.column,n.lineNumber,n.column)}convertViewPositionToModelPosition(t,e){const i=this.getViewLineInfo(t),n=this.modelLineProjections[i.modelLineNumber-1].getModelColumnOfViewPosition(i.modelLineWrappedLineIdx,e);return this.model.validatePosition(new A(i.modelLineNumber,n))}convertViewRangeToModelRange(t){const e=this.convertViewPositionToModelPosition(t.startLineNumber,t.startColumn),i=this.convertViewPositionToModelPosition(t.endLineNumber,t.endColumn);return new T(e.lineNumber,e.column,i.lineNumber,i.column)}convertModelPositionToViewPosition(t,e,i=2){const n=this.model.validatePosition(new A(t,e)),s=n.lineNumber,r=n.column;let o=s-1,a=!1;for(;o>0&&!this.modelLineProjections[o].isVisible();)o--,a=!0;if(o===0&&!this.modelLineProjections[o].isVisible())return new A(1,1);const l=1+this.projectedModelLineLineCounts.getPrefixSum(o);let h;return a?h=this.modelLineProjections[o].getViewPositionOfModelPosition(l,this.model.getLineMaxColumn(o+1),i):h=this.modelLineProjections[s-1].getViewPositionOfModelPosition(l,r,i),h}convertModelRangeToViewRange(t,e=0){if(t.isEmpty()){const i=this.convertModelPositionToViewPosition(t.startLineNumber,t.startColumn,e);return T.fromPositions(i)}else{const i=this.convertModelPositionToViewPosition(t.startLineNumber,t.startColumn,1),n=this.convertModelPositionToViewPosition(t.endLineNumber,t.endColumn,0);return new T(i.lineNumber,i.column,n.lineNumber,n.column)}}getViewLineNumberOfModelPosition(t,e){let i=t-1;if(this.modelLineProjections[i].isVisible()){const s=1+this.projectedModelLineLineCounts.getPrefixSum(i);return this.modelLineProjections[i].getViewLineNumberOfModelPosition(s,e)}for(;i>0&&!this.modelLineProjections[i].isVisible();)i--;if(i===0&&!this.modelLineProjections[i].isVisible())return 1;const n=1+this.projectedModelLineLineCounts.getPrefixSum(i);return this.modelLineProjections[i].getViewLineNumberOfModelPosition(n,this.model.getLineMaxColumn(i+1))}getDecorationsInRange(t,e,i){const n=this.convertViewPositionToModelPosition(t.startLineNumber,t.startColumn),s=this.convertViewPositionToModelPosition(t.endLineNumber,t.endColumn);if(s.lineNumber-n.lineNumber<=t.endLineNumber-t.startLineNumber)return this.model.getDecorationsInRange(new T(n.lineNumber,1,s.lineNumber,s.column),e,i);let r=[];const o=n.lineNumber-1,a=s.lineNumber-1;let l=null;for(let u=o;u<=a;u++)if(this.modelLineProjections[u].isVisible())l===null&&(l=new A(u+1,u===o?n.column:1));else if(l!==null){const g=this.model.getLineMaxColumn(u);r=r.concat(this.model.getDecorationsInRange(new T(l.lineNumber,l.column,u,g),e,i)),l=null}l!==null&&(r=r.concat(this.model.getDecorationsInRange(new T(l.lineNumber,l.column,s.lineNumber,s.column),e,i)),l=null),r.sort((u,g)=>{const m=T.compareRangesUsingStarts(u.range,g.range);return m===0?u.id<g.id?-1:u.id>g.id?1:0:m});let h=[],c=0,d=null;for(const u of r){const g=u.id;d!==g&&(d=g,h[c++]=u)}return h}getInjectedTextAt(t){const e=this.getViewLineInfo(t.lineNumber);return this.modelLineProjections[e.modelLineNumber-1].getInjectedTextAt(e.modelLineWrappedLineIdx,t.column)}normalizePosition(t,e){const i=this.getViewLineInfo(t.lineNumber);return this.modelLineProjections[i.modelLineNumber-1].normalizePosition(i.modelLineWrappedLineIdx,t,e)}getLineIndentColumn(t){const e=this.getViewLineInfo(t);return e.modelLineWrappedLineIdx===0?this.model.getLineIndentColumn(e.modelLineNumber):0}};function l3(t){if(t.length===0)return[];const e=t.slice();e.sort(T.compareRangesUsingStarts);const i=[];let n=e[0].startLineNumber,s=e[0].endLineNumber;for(let r=1,o=e.length;r<o;r++){const a=e[r];a.startLineNumber>s+1?(i.push(new T(n,1,s,1)),n=a.startLineNumber,s=a.endLineNumber):a.endLineNumber>s&&(s=a.endLineNumber)}return i.push(new T(n,1,s,1)),i}var lw=class{constructor(t,e){this.modelLineNumber=t,this.modelLineWrappedLineIdx=e}get isWrappedLineContinuation(){return this.modelLineWrappedLineIdx>0}},hw=class{constructor(t,e){this.modelRange=t,this.viewLines=e}},h3=class{constructor(t){this._lines=t}convertViewPositionToModelPosition(t){return this._lines.convertViewPositionToModelPosition(t.lineNumber,t.column)}convertViewRangeToModelRange(t){return this._lines.convertViewRangeToModelRange(t)}validateViewPosition(t,e){return this._lines.validateViewPosition(t.lineNumber,t.column,e)}validateViewRange(t,e){return this._lines.validateViewRange(t,e)}convertModelPositionToViewPosition(t,e){return this._lines.convertModelPositionToViewPosition(t.lineNumber,t.column,e)}convertModelRangeToViewRange(t,e){return this._lines.convertModelRangeToViewRange(t,e)}modelPositionIsVisible(t){return this._lines.modelPositionIsVisible(t.lineNumber,t.column)}getModelLineViewLineCount(t){return this._lines.getModelLineViewLineCount(t)}getViewLineNumberOfModelPosition(t,e){return this._lines.getViewLineNumberOfModelPosition(t,e)}},c3=class{constructor(t){this.model=t}dispose(){}createCoordinatesConverter(){return new d3(this)}getHiddenAreas(){return[]}setHiddenAreas(t){return!1}setTabSize(t){return!1}setWrappingSettings(t,e,i,n){return!1}createLineBreaksComputer(){const t=[];return{addRequest:(e,i,n)=>{t.push(null)},finalize:()=>t}}onModelFlushed(){}
101onModelLinesDeleted(t,e,i){return new o_(e,i)}onModelLinesInserted(t,e,i,n){return new a_(e,i)}onModelLineChanged(t,e,i){return[!1,new Jk(e,e),null,null]}acceptVersionId(t){}getViewLineCount(){return this.model.getLineCount()}getActiveIndentGuide(t,e,i){return{startLineNumber:t,endLineNumber:t,indent:0}}getViewLinesBracketGuides(t,e,i){return new Array(e-t+1).fill([])}getViewLinesIndentGuides(t,e){const i=e-t+1,n=new Array(i);for(let s=0;s<i;s++)n[s]=0;return n}getViewLineContent(t){return this.model.getLineContent(t)}getViewLineLength(t){return this.model.getLineLength(t)}getViewLineMinColumn(t){return this.model.getLineMinColumn(t)}getViewLineMaxColumn(t){return this.model.getLineMaxColumn(t)}getViewLineData(t){const e=this.model.getLineTokens(t),i=e.getLineContent();return new kv(i,!1,1,i.length+1,0,e.inflate(),null)}getViewLinesData(t,e,i){const n=this.model.getLineCount();t=Math.min(Math.max(1,t),n),e=Math.min(Math.max(1,e),n);const s=[];for(let r=t;r<=e;r++){const o=r-t;s[o]=i[o]?this.getViewLineData(r):null}return s}getDecorationsInRange(t,e,i){return this.model.getDecorationsInRange(t,e,i)}normalizePosition(t,e){return this.model.normalizePosition(t,e)}getLineIndentColumn(t){return this.model.getLineIndentColumn(t)}getInjectedTextAt(t){return null}},d3=class{constructor(t){this._lines=t}_validPosition(t){return this._lines.model.validatePosition(t)}_validRange(t){return this._lines.model.validateRange(t)}convertViewPositionToModelPosition(t){return this._validPosition(t)}convertViewRangeToModelRange(t){return this._validRange(t)}validateViewPosition(t,e){return this._validPosition(e)}validateViewRange(t,e){return this._validRange(e)}convertModelPositionToViewPosition(t){return this._validPosition(t)}convertModelRangeToViewRange(t){return this._validRange(t)}modelPositionIsVisible(t){const e=this._lines.model.getLineCount();return!(t.lineNumber<1||t.lineNumber>e)}getModelLineViewLineCount(t){return 1}getViewLineNumberOfModelPosition(t,e){return t}},u3=class extends V{constructor(t,e,i,n,s,r,o,a){if(super(),this.languageConfigurationService=o,this._themeService=a,this._editorId=t,this._configuration=e,this.model=i,this._eventDispatcher=new mO,this.onEvent=this._eventDispatcher.onEvent,this.cursorConfig=new Io(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._tokenizeViewportSoon=this._register(new _t(()=>this.tokenizeViewport(),50)),this._updateConfigurationViewLineCount=this._register(new _t(()=>this._updateConfigurationViewLineCountNow(),0)),this._hasFocus=!1,this._viewportStartLine=-1,this._viewportStartLineTrackedRange=null,this._viewportStartLineDelta=0,this.model.isTooLargeForTokenization())this._lines=new c3(this.model);else{const l=this._configuration.options,h=l.get(44),c=l.get(125),d=l.get(132),u=l.get(124);this._lines=new a3(this._editorId,this.model,n,s,h,this.model.getOptions().tabSize,c,d.wrappingColumn,u)}this.coordinatesConverter=this._lines.createCoordinatesConverter(),this._cursor=this._register(new qv(i,this,this.coordinatesConverter,this.cursorConfig)),this.viewLayout=this._register(new AO(this._configuration,this.getLineCount(),r)),this._register(this.viewLayout.onDidScroll(l=>{l.scrollTopChanged&&this._tokenizeViewportSoon.schedule(),this._eventDispatcher.emitSingleViewEvent(new cO(l)),this._eventDispatcher.emitOutgoingEvent(new CO(l.oldScrollWidth,l.oldScrollLeft,l.oldScrollHeight,l.oldScrollTop,l.scrollWidth,l.scrollLeft,l.scrollHeight,l.scrollTop))})),this._register(this.viewLayout.onDidContentSizeChange(l=>{this._eventDispatcher.emitOutgoingEvent(l)})),this._decorations=new OO(this._editorId,this.model,this._configuration,this._lines,this.coordinatesConverter),this._registerModelEvents(),this._register(this._configuration.onDidChangeFast(l=>{try{const h=this._eventDispatcher.beginEmitViewEvents();this._onConfigurationChanged(h,l)}finally{this._eventDispatcher.endEmitViewEvents()}})),this._register(jv.getInstance().onDidChange(()=>{this._eventDispatcher.emitSingleViewEvent(new fO)})),this._register(this._themeService.onDidColorThemeChange(l=>{this._invalidateDecorationsColorCache(),this._eventDispatcher.emitSingleViewEvent(new dO(l))})),this._updateConfigurationViewLineCountNow()}dispose(){super.dispose(),this._decorations.dispose(),this._lines.dispose(),this._viewportStartLineTrackedRange=this.model._setTrackedRange(this._viewportStartLineTrackedRange,null,1),this._eventDispatcher.dispose()}createLineBreaksComputer(){return this._lines.createLineBreaksComputer()}addViewEventHandler(t){this._eventDispatcher.addViewEventHandler(t)}removeViewEventHandler(t){this._eventDispatcher.removeViewEventHandler(t)}_updateConfigurationViewLineCountNow(){this._configuration.setViewLineCount(this._lines.getViewLineCount())}tokenizeViewport(){const t=this.viewLayout.getLinesViewportData(),e=new T(t.startLineNumber,this.getLineMinColumn(t.startLineNumber),t.endLineNumber,this.getLineMaxColumn(t.endLineNumber)),i=this._toModelVisibleRanges(e);for(const n of i)this.model.tokenizeViewport(n.startLineNumber,n.endLineNumber)}setHasFocus(t){this._hasFocus=t,this._cursor.setHasFocus(t),this._eventDispatcher.emitSingleViewEvent(new lO(t)),this._eventDispatcher.emitOutgoingEvent(new vO(!t,t))}onCompositionStart(){this._eventDispatcher.emitSingleViewEvent(new sO)}onCompositionEnd(){this._eventDispatcher.emitSingleViewEvent(new rO)}_onConfigurationChanged(t,e){let i=null;if(this._viewportStartLine!==-1){const h=new A(this._viewportStartLine,this.getLineMinColumn(this._viewportStartLine));i=this.coordinatesConverter.convertViewPositionToModelPosition(h)}let n=!1;const s=this._configuration.options,r=s.get(44),o=s.get(125),a=s.get(132),l=s.get(124);if(this._lines.setWrappingSettings(r,o,a.wrappingColumn,l)&&(t.emit
101ViewEvent(new lc),t.emitViewEvent(new hc),t.emitViewEvent(new Eo(null)),this._cursor.onLineMappingChanged(t),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this.viewLayout.getCurrentScrollTop()!==0&&(n=!0),this._updateConfigurationViewLineCount.schedule()),e.hasChanged(81)&&(this._decorations.reset(),t.emitViewEvent(new Eo(null))),t.emitViewEvent(new oO(e)),this.viewLayout.onConfigurationChanged(e),n&&i){const h=this.coordinatesConverter.convertModelPositionToViewPosition(i),c=this.viewLayout.getVerticalOffsetForLineNumber(h.lineNumber);this.viewLayout.setScrollPosition({scrollTop:c+this._viewportStartLineDelta},1)}Io.shouldRecreate(e)&&(this.cursorConfig=new Io(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig))}_registerModelEvents(){this._register(this.model.onDidChangeContentOrInjectedText(t=>{try{const e=this._eventDispatcher.beginEmitViewEvents();let i=!1,n=!1;const s=t.changes,r=t instanceof jl?t.versionId:null,o=this._lines.createLineBreaksComputer();for(const h of s)switch(h.changeType){case 4:for(let c=0;c<h.detail.length;c++){const d=h.detail[c];let u=h.injectedTexts[c];u&&(u=u.filter(g=>!g.ownerId||g.ownerId===this._editorId)),o.addRequest(d,u,null)}break;case 2:{let c=null;h.injectedText&&(c=h.injectedText.filter(d=>!d.ownerId||d.ownerId===this._editorId)),o.addRequest(h.detail,c,null);break}}const a=o.finalize(),l=new ba(a);for(const h of s)switch(h.changeType){case 1:this._lines.onModelFlushed(),e.emitViewEvent(new lc),this._decorations.reset(),this.viewLayout.onFlushed(this.getLineCount()),i=!0;break;case 3:{const c=this._lines.onModelLinesDeleted(r,h.fromLineNumber,h.toLineNumber);c!==null&&(e.emitViewEvent(c),this.viewLayout.onLinesDeleted(c.fromLineNumber,c.toLineNumber)),i=!0;break}case 4:{const c=l.takeCount(h.detail.length),d=this._lines.onModelLinesInserted(r,h.fromLineNumber,h.toLineNumber,c);d!==null&&(e.emitViewEvent(d),this.viewLayout.onLinesInserted(d.fromLineNumber,d.toLineNumber)),i=!0;break}case 2:{const c=l.dequeue(),[d,u,g,m]=this._lines.onModelLineChanged(r,h.lineNumber,c);n=d,u&&e.emitViewEvent(u),g&&(e.emitViewEvent(g),this.viewLayout.onLinesInserted(g.fromLineNumber,g.toLineNumber)),m&&(e.emitViewEvent(m),this.viewLayout.onLinesDeleted(m.fromLineNumber,m.toLineNumber));break}}r!==null&&this._lines.acceptVersionId(r),this.viewLayout.onHeightMaybeChanged(),!i&&n&&(e.emitViewEvent(new hc),e.emitViewEvent(new Eo(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged())}finally{this._eventDispatcher.endEmitViewEvents()}if(this._viewportStartLine=-1,this._configuration.setModelLineCount(this.model.getLineCount()),this._updateConfigurationViewLineCountNow(),!this._hasFocus&&this.model.getAttachedEditorCount()>=2&&this._viewportStartLineTrackedRange){const e=this.model._getTrackedRange(this._viewportStartLineTrackedRange);if(e){const i=this.coordinatesConverter.convertModelPositionToViewPosition(e.getStartPosition()),n=this.viewLayout.getVerticalOffsetForLineNumber(i.lineNumber);this.viewLayout.setScrollPosition({scrollTop:n+this._viewportStartLineDelta},1)}}try{const e=this._eventDispatcher.beginEmitViewEvents();this._cursor.onModelContentChanged(e,t)}finally{this._eventDispatcher.endEmitViewEvents()}this._tokenizeViewportSoon.schedule()})),this._register(this.model.onDidChangeTokens(t=>{const e=[];for(let i=0,n=t.ranges.length;i<n;i++){const s=t.ranges[i],r=this.coordinatesConverter.convertModelPositionToViewPosition(new A(s.fromLineNumber,1)).lineNumber,o=this.coordinatesConverter.convertModelPositionToViewPosition(new A(s.toLineNumber,this.model.getLineMaxColumn(s.toLineNumber))).lineNumber;e[i]={fromLineNumber:r,toLineNumber:o}}this._eventDispatcher.emitSingleViewEvent(new uO(e)),t.tokenizationSupportChanged&&this._tokenizeViewportSoon.schedule()})),this._register(this.model.onDidChangeLanguageConfiguration(t=>{this._eventDispatcher.emitSingleViewEvent(new hO),this.cursorConfig=new Io(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig)})),this._register(this.model.onDidChangeLanguage(t=>{this.cursorConfig=new Io(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig)})),this._register(this.model.onDidChangeOptions(t=>{if(this._lines.setTabSize(this.model.getOptions().tabSize)){try{const e=this._eventDispatcher.beginEmitViewEvents();
vendor: 5,259 bytes, line 101
101e.emitViewEvent(new lc),e.emitViewEvent(new hc),e.emitViewEvent(new Eo(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule()}this.cursorConfig=new Io(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig)})),this._register(this.model.onDidChangeDecorations(t=>{this._decorations.onModelDecorationsChanged(),this._eventDispatcher.emitSingleViewEvent(new Eo(t))}))}setHiddenAreas(t){let e=!1;try{const i=this._eventDispatcher.beginEmitViewEvents();e=this._lines.setHiddenAreas(t),e&&(i.emitViewEvent(new lc),i.emitViewEvent(new hc),i.emitViewEvent(new Eo(null)),this._cursor.onLineMappingChanged(i),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this.viewLayout.onHeightMaybeChanged())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule(),e&&this._eventDispatcher.emitOutgoingEvent(new Mb)}getVisibleRangesPlusViewportAboveBelow(){const t=this._configuration.options.get(131),e=this._configuration.options.get(59),i=Math.max(20,Math.round(t.height/e)),n=this.viewLayout.getLinesViewportData(),s=Math.max(1,n.completelyVisibleStartLineNumber-i),r=Math.min(this.getLineCount(),n.completelyVisibleEndLineNumber+i);return this._toModelVisibleRanges(new T(s,this.getLineMinColumn(s),r,this.getLineMaxColumn(r)))}getVisibleRanges(){const t=this.getCompletelyVisibleViewRange();return this._toModelVisibleRanges(t)}_toModelVisibleRanges(t){const e=this.coordinatesConverter.convertViewRangeToModelRange(t),i=this._lines.getHiddenAreas();if(i.length===0)return[e];const n=[];let s=0,r=e.startLineNumber,o=e.startColumn;const a=e.endLineNumber,l=e.endColumn;for(let h=0,c=i.length;h<c;h++){const d=i[h].startLineNumber,u=i[h].endLineNumber;u<r||d>a||(r<d&&(n[s++]=new T(r,o,d-1,this.model.getLineMaxColumn(d-1))),r=u+1,o=1)}return(r<a||r===a&&o<l)&&(n[s++]=new T(r,o,a,l)),n}getCompletelyVisibleViewRange(){const t=this.viewLayout.getLinesViewportData(),e=t.completelyVisibleStartLineNumber,i=t.completelyVisibleEndLineNumber;return new T(e,this.getLineMinColumn(e),i,this.getLineMaxColumn(i))}getCompletelyVisibleViewRangeAtScrollTop(t){const e=this.viewLayout.getLinesViewportDataAtScrollTop(t),i=e.completelyVisibleStartLineNumber,n=e.completelyVisibleEndLineNumber;return new T(i,this.getLineMinColumn(i),n,this.getLineMaxColumn(n))}saveState(){const t=this.viewLayout.saveState(),e=t.scrollTop,i=this.viewLayout.getLineNumberAtVerticalOffset(e),n=this.coordinatesConverter.convertViewPositionToModelPosition(new A(i,this.getLineMinColumn(i))),s=this.viewLayout.getVerticalOffsetForLineNumber(i)-e;return{scrollLeft:t.scrollLeft,firstPosition:n,firstPositionDeltaTop:s}}reduceRestoreState(t){if(typeof t.firstPosition>"u")return this._reduceRestoreStateCompatibility(t);const e=this.model.validatePosition(t.firstPosition),i=this.coordinatesConverter.convertModelPositionToViewPosition(e),n=this.viewLayout.getVerticalOffsetForLineNumber(i.lineNumber)-t.firstPositionDeltaTop;return{scrollLeft:t.scrollLeft,scrollTop:n}}_reduceRestoreStateCompatibility(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTopWithoutViewZones}}getTabSize(){return this.model.getOptions().tabSize}getLineCount(){return this._lines.getViewLineCount()}setViewport(t,e,i){this._viewportStartLine=t;const n=this.coordinatesConverter.convertViewPositionToModelPosition(new A(t,this.getLineMinColumn(t)));this._viewportStartLineTrackedRange=this.model._setTrackedRange(this._viewportStartLineTrackedRange,new T(n.lineNumber,n.column,n.lineNumber,n.column),1);const s=this.viewLayout.getVerticalOffsetForLineNumber(t),r=this.viewLayout.getCurrentScrollTop();this._viewportStartLineDelta=r-s}getActiveIndentGuide(t,e,i){return this._lines.getActiveIndentGuide(t,e,i)}getLinesIndentGuides(t,e){return this._lines.getViewLinesIndentGuides(t,e)}getBracketGuidesInRangeByLine(t,e,i,n){return this._lines.getViewLinesBracketGuides(t,e,i,n)}getLineContent(t){return this._lines.getViewLineContent(t)}getLineLength(t){return this._lines.getViewLineLength(t)}getLineMinColumn(t){return this._lines.getViewLineMinColumn(t)}getLineMaxColumn(t){return this._lines.getViewLineMaxColumn(t)}getLineFirstNonWhitespaceColumn(t){const e=fi(this.getLineContent(t));return e===-1?0:e+1}getLineLastNonWhitespaceColumn(t){const e=Va(this.getLineContent(t));return e===-1?0:e+2}getDecorationsInViewport(t){return this._decorations.getDecorationsViewportData(t).decorations}getInjectedTextAt(t){return this._lines.getInjectedTextAt(t)}getViewLineRenderingData(t,e){const i=this.model.mightContainRTL(),n=this.model.mightContainNonBasicASCII(),s=this.getTabSize(),r=this._lines.getViewLineData(e);let o=this._decorations.getDecorationsViewportData(t).inlineDecorations[e-t.startLineNumber];return r.inlineDecorations&&(o=[...o,...r.inlineDecorations.map(a=>a.toInlineDecoration(e))]),new vn(r.minColumn,r.maxColumn,r.content,r.continuesWithWrappedLine,i,n,r.tokens,o,s,r.startVisibleColumn)}getViewLineData(t){return this._lines.getViewLineData(t)}
101getMinimapLinesRenderingData(t,e,i){const n=this._lines.getViewLinesData(t,e,i);return new G5(this.getTabSize(),n)}getAllOverviewRulerDecorations(t){const e=this.model.getOverviewRulerDecorations(this._editorId,Od(this._configuration.options)),i=new f3;for(const n of e){const s=n.options,r=s.overviewRuler;if(!r)continue;const o=r.position;if(o===0)continue;const a=r.getColor(t.value),l=this.coordinatesConverter.getViewLineNumberOfModelPosition(n.range.startLineNumber,n.range.startColumn),h=this.coordinatesConverter.getViewLineNumberOfModelPosition(n.range.endLineNumber,n.range.endColumn);i.accept(a,s.zIndex,l,h,o)}return i.asArray}_invalidateDecorationsColorCache(){const t=this.model.getOverviewRulerDecorations();for(const e of t){const i=e.options.overviewRuler;i&&i.invalidateCachedColor();const n=e.options.minimap;n&&n.invalidateCachedColor()}}getValueInRange(t,e){const i=this.coordinatesConverter.convertViewRangeToModelRange(t);return this.model.getValueInRange(i,e)}deduceModelPositionRelativeToViewPosition(t,e,i){const n=this.coordinatesConverter.convertViewPositionToModelPosition(t);this.model.getEOL().length===2&&(e<0?e-=i:e+=i);const s=this.model.getOffsetAt(n)+e;return this.model.getPositionAt(s)}
vendor: 6,591 bytes, lines 101-102
101getPlainTextToCopy(t,e,i){const n=i?`\r
102`:this.model.getEOL();t=t.slice(0),t.sort(T.compareRangesUsingStarts);let s=!1,r=!1;for(const a of t)a.isEmpty()?s=!0:r=!0;if(!r){if(!e)return"";const a=t.map(h=>h.startLineNumber);let l="";for(let h=0;h<a.length;h++)h>0&&a[h-1]===a[h]||(l+=this.model.getLineContent(a[h])+n);return l}if(s&&e){const a=[];let l=0;for(const h of t){const c=h.startLineNumber;h.isEmpty()?c!==l&&a.push(this.model.getLineContent(c)):a.push(this.model.getValueInRange(h,i?2:0)),l=c}return a.length===1?a[0]:a}const o=[];for(const a of t)a.isEmpty()||o.push(this.model.getValueInRange(a,i?2:0));return o.length===1?o[0]:o}getRichTextToCopy(t,e){const i=this.model.getLanguageId();if(i==="plaintext"||t.length!==1)return null;let n=t[0];if(n.isEmpty()){if(!e)return null;const l=n.startLineNumber;n=new T(l,this.model.getLineMinColumn(l),l,this.model.getLineMaxColumn(l))}const s=this._configuration.options.get(44),r=this._getColorMap(),o=/[:;\\\/<>]/.test(s.fontFamily)||s.fontFamily===di.fontFamily;let a;return o?a=di.fontFamily:(a=s.fontFamily,a=a.replace(/"/g,"'"),/[,']/.test(a)||/[+ ]/.test(a)&&(a=`'${a}'`),a=`${a}, ${di.fontFamily}`),{mode:i,html:`<div style="color: ${r[1]};background-color: ${r[2]};font-family: ${a};font-weight: ${s.fontWeight};font-size: ${s.fontSize}px;line-height: ${s.lineHeight}px;white-space: pre;">`+this._getHTMLToCopy(n,r)+"</div>"}}_getHTMLToCopy(t,e){const i=t.startLineNumber,n=t.startColumn,s=t.endLineNumber,r=t.endColumn,o=this.getTabSize();let a="";for(let l=i;l<=s;l++){const h=this.model.getLineTokens(l),c=h.getLineContent(),d=l===i?n-1:0,u=l===s?r-1:c.length;c===""?a+="<br>":a+=DO(c,h.inflate(),e,d,u,o,ei)}return a}_getColorMap(){const t=Ge.getColorMap(),e=["#000000"];if(t)for(let i=1,n=t.length;i<n;i++)e[i]=O.Format.CSS.formatHex(t[i]);return e}getPrimaryCursorState(){return this._cursor.getPrimaryCursorState()}getLastAddedCursorIndex(){return this._cursor.getLastAddedCursorIndex()}getCursorStates(){return this._cursor.getCursorStates()}setCursorStates(t,e,i){return this._withViewEventsCollector(n=>this._cursor.setStates(n,t,e,i))}getCursorColumnSelectData(){return this._cursor.getCursorColumnSelectData()}getCursorAutoClosedCharacters(){return this._cursor.getAutoClosedCharacters()}setCursorColumnSelectData(t){this._cursor.setCursorColumnSelectData(t)}getPrevEditOperationType(){return this._cursor.getPrevEditOperationType()}setPrevEditOperationType(t){this._cursor.setPrevEditOperationType(t)}getSelection(){return this._cursor.getSelection()}getSelections(){return this._cursor.getSelections()}getPosition(){return this._cursor.getPrimaryCursorState().modelState.position}setSelections(t,e,i=0){this._withViewEventsCollector(n=>this._cursor.setSelections(n,t,e,i))}saveCursorState(){return this._cursor.saveState()}restoreCursorState(t){this._withViewEventsCollector(e=>this._cursor.restoreState(e,t))}_executeCursorEdit(t){if(this._cursor.context.cursorConfig.readOnly){this._eventDispatcher.emitOutgoingEvent(new wO);return}this._withViewEventsCollector(t)}executeEdits(t,e,i){this._executeCursorEdit(n=>this._cursor.executeEdits(n,t,e,i))}startComposition(){this._cursor.setIsDoingComposition(!0),this._executeCursorEdit(t=>this._cursor.startComposition(t))}endComposition(t){this._cursor.setIsDoingComposition(!1),this._executeCursorEdit(e=>this._cursor.endComposition(e,t))}type(t,e){this._executeCursorEdit(i=>this._cursor.type(i,t,e))}compositionType(t,e,i,n,s){this._executeCursorEdit(r=>this._cursor.compositionType(r,t,e,i,n,s))}paste(t,e,i,n){this._executeCursorEdit(s=>this._cursor.paste(s,t,e,i,n))}cut(t){this._executeCursorEdit(e=>this._cursor.cut(e,t))}executeCommand(t,e){this._executeCursorEdit(i=>this._cursor.executeCommand(i,t,e))}executeCommands(t,e){this._executeCursorEdit(i=>this._cursor.executeCommands(i,t,e))}revealPrimaryCursor(t,e,i=!1){this._withViewEventsCollector(n=>this._cursor.revealPrimary(n,t,i,0,e,0))}revealTopMostCursor(t){const e=this._cursor.getTopMostViewPosition(),i=new T(e.lineNumber,e.column,e.lineNumber,e.column);this._withViewEventsCollector(n=>n.emitViewEvent(new ud(t,!1,i,null,0,!0,0)))}revealBottomMostCursor(t){const e=this._cursor.getBottomMostViewPosition(),i=new T(e.lineNumber,e.column,e.lineNumber,e.column);this._withViewEventsCollector(n=>n.emitViewEvent(new ud(t,!1,i,null,0,!0,0)))}revealRange(t,e,i,n,s){this._withViewEventsCollector(r=>r.emitViewEvent(new ud(t,!1,i,null,n,e,s)))}changeWhitespace(t){this.viewLayout.changeWhitespace(t)&&(this._eventDispatcher.emitSingleViewEvent(new gO),this._eventDispatcher.emitOutgoingEvent(new Mb))}_withViewEventsCollector(t){try{return t(this._eventDispatcher.beginEmitViewEvents())}finally{this._eventDispatcher.endEmitViewEvents()}}normalizePosition(t,e){return this._lines.normalizePosition(t,e)}getLineIndentColumn(t){return this._lines.getLineIndentColumn(t)}},f3=class{constructor(){this._asMap=Object.create(null),this.asArray=[]}accept(t,e,i,n,s){const r=this._asMap[t];if(r){const o=r.data,a=o[o.length-3],l=o[o.length-1];if(a===s&&l+1>=i){n>l&&(o[o.length-1]=n);return}o.push(s,i,n)}else{const o=new ML(t,e,[s,i,n]);this._asMap[t]=o,this.asArray.push(o)}}},of=class{constructor(...t){this._entries=new Map;for(let[e,i]of t)this.set(e,i)}set(t,e){const i=this._entries.get(t);return this._entries.set(t,e),i}get(t){return this._entries.get(t)}},mh;(function(t){t[t.Ignore=0]="Ignore",t[t.Info=1]="Info",t[t.Warning=2]="Warning",t[t.Error=3]="Error"})(mh||(mh={}));(function(t){const e="error",i="warning",n="warn",s="info",r="ignore";function o(l){return l?jo(e,l)?t.Error:jo(i,l)||jo(n,l)?t.Warning:jo(s,l)?t.Info:t.Ignore:t.Ignore}t.fromValue=o;function a(l){switch(l){case t.Error:return e;case t.Warning:return i;case t.Info:return s;default:return r}}t.toString=a})(mh||(mh={}));var it=mh,wn=ge("notificationService"),g3=class{},Xl=class{constructor(t,e,i,n,s){this.injectionOffsets=t,this.injectionOptions=e,this.breakOffsets=i,this.breakOffsetsVisibleColumn=n,this.wrappedTextIndentLength=s}getOutputLineCount(){return this.breakOffsets.length}getMinOutputOffset(t){return t>0?this.wrappedTextIndentLength:0}getLineLength(t){const e=t>0?this.breakOffsets[t-1]:0;let i=this.breakOffsets[t]-e;return t>0&&(i+=this.wrappedTextIndentLength),i}getMaxOutputOffset(t){return this.getLineLength(t)}translateToInputOffset(t,e){t>0&&(e=Math.max(0,e-this.wrappedTextIndentLength));let i=t===0?e:this.breakOffsets[t-1]+e;if(this.injectionOffsets!==null)for(let n=0;n<this.injectionOffsets.length&&i>this.injectionOffsets[n];n++)i<this.injectionOffsets[n]+this.injectionOptions[n].content.length?
102i=this.injectionOffsets[n]:i-=this.injectionOptions[n].content.length;return i}translateToOutputPosition(t,e=2){let i=t;if(this.injectionOffsets!==null)for(let n=0;n<this.injectionOffsets.length&&!(t<this.injectionOffsets[n]||e!==1&&t===this.injectionOffsets[n]);n++)i+=this.injectionOptions[n].content.length;return this.offsetInInputWithInjectionsToOutputPosition(i,e)}offsetInInputWithInjectionsToOutputPosition(t,e=2){let i=0,n=this.breakOffsets.length-1,s=0,r=0;for(;i<=n;){s=i+(n-i)/2|0;const a=this.breakOffsets[s];if(r=s>0?this.breakOffsets[s-1]:0,e===0)if(t<=r)n=s-1;else if(t>a)i=s+1;else break;else if(t<r)n=s-1;else if(t>=a)i=s+1;else break}let o=t-r;return s>0&&(o+=this.wrappedTextIndentLength),new Cc(s,o)}normalizeOutputPosition(t,e,i){if(this.injectionOffsets!==null){const n=this.outputPositionToOffsetInInputWithInjections(t,e),s=this.normalizeOffsetInInputWithInjectionsAroundInjections(n,i);if(s!==n)return this.offsetInInputWithInjectionsToOutputPosition(s,i)}if(i===0){if(t>0&&e===this.getMinOutputOffset(t))return new Cc(t-1,this.getMaxOutputOffset(t-1))}else if(i===1&&t<this.getOutputLineCount()-1&&e===this.getMaxOutputOffset(t))return new Cc(t+1,this.getMinOutputOffset(t+1));return new Cc(t,e)}outputPositionToOffsetInInputWithInjections(t,e){return t>0&&(e=Math.max(0,e-this.wrappedTextIndentLength)),(t>0?this.breakOffsets[t-1]:0)+e}normalizeOffsetInInputWithInjectionsAroundInjections(t,e){const i=this.getInjectedTextAtOffset(t);if(!i)return t;if(e===2){if(t===i.offsetInInputWithInjections+i.length&&cw(this.injectionOptions[i.injectedTextIndex].cursorStops))return i.offsetInInputWithInjections+i.length;{let n=i.offsetInInputWithInjections;if(dw(this.injectionOptions[i.injectedTextIndex].cursorStops))return n;let s=i.injectedTextIndex-1;for(;s>=0&&this.injectionOffsets[s]===this.injectionOffsets[i.injectedTextIndex]&&!(cw(this.injectionOptions[s].cursorStops)||(n-=this.injectionOptions[s].content.length,dw(this.injectionOptions[s].cursorStops)));)s--;return n}}else if(e===1){let n=i.offsetInInputWithInjections+i.length,s=i.injectedTextIndex;for(;s+1<this.injectionOffsets.length&&this.injectionOffsets[s+1]===this.injectionOffsets[s];)n+=this.injectionOptions[s+1].content.length,s++;return n}else if(e===0){let n=i.offsetInInputWithInjections,s=i.injectedTextIndex;for(;s-1>=0&&this.injectionOffsets[s-1]===this.injectionOffsets[s];)n-=this.injectionOptions[s-1].content.length,s--;return n}X1(e)}getInjectedText(t,e){const i=this.outputPositionToOffsetInInputWithInjections(t,e),n=this.getInjectedTextAtOffset(i);return n?{options:this.injectionOptions[n.injectedTextIndex]}:null}getInjectedTextAtOffset(t){const e=this.injectionOffsets,i=this.injectionOptions;if(e!==null){let n=0;for(let s=0;s<e.length;s++){const r=i[s].content.length,o=e[s]+n,a=e[s]+n+r;if(o>t)break;if(t<=a)return{injectedTextIndex:s,offsetInInputWithInjections:o,length:r};n+=r}}}};function cw(t){return t==null?!0:t===Sa.Right||t===Sa.Both}function dw(t){return t==null?!0:t===Sa.Left||t===Sa.Both}var Cc=class{constructor(t,e){this.outputLineIndex=t,this.outputOffset=e}toString(){return`${this.outputLineIndex}:${this.outputOffset}`}toPosition(t){return new A(t+this.outputLineIndex,this.outputOffset+1)}},m3=class Rx{constructor(e,i){this.classifier=new p3(e,i)}static create(e){return new Rx(e.get(120),e.get(119))}createLineBreaksComputer(e,i,n,s){const r=[],o=[],a=[];return{addRequest:(l,h,c)=>{r.push(l),o.push(h),a.push(c)},finalize:()=>{const l=e.typicalFullwidthCharacterWidth/e.typicalHalfwidthCharacterWidth,h=[];for(let c=0,d=r.length;c<d;c++){const u=o[c],g=a[c];g&&!g.injectionOptions&&!u?h[c]=_3(this.classifier,g,r[c],i,n,l,s):h[c]=v3(this.classifier,r[c],u,i,n,l,s)}return S_.length=0,y_.length=0,h}}}},p3=class extends wv{constructor(t,e){super(0);for(let i=0;i<t.length;i++)this.set(t.charCodeAt(i),1);for(let i=0;i<e.length;i++)this.set(e.charCodeAt(i),2)}get(t){return t>=0&&t<256?this._asciiMap[t]:t>=12352&&t<=12543||t>=13312&&t<=19903||t>=19968&&t<=40959?3:this._map.get(t)||this._defaultValue}},S_=[],y_=[];function _3(t,e,i,n,s,r,o){if(s===-1)return null;const a=i.length;if(a<=1)return null;const l=e.breakOffsets,h=e.breakOffsetsVisibleColumn,c=Ax(i,n,s,r,o),d=s-c,u=S_,g=y_;let m=0,_=0,C=0,w=s;const v=l.length;let b=0;if(b>=0){let y=Math.abs(h[b]-w);for(;b+1<v;){const k=Math.abs(h[b+1]-w);if(k>=y)break;y=k,b++}}for(;b<v;){let y=b<0?0:l[b],k=b<0?0:h[b];_>y&&(y=_,k=C);let S=0,L=0,x=0,E=0;if(k<=w){let D=k,W=y===0?0:i.charCodeAt(y-1),P=y===0?0:t.get(W),K=!0;for(let j=y;
vendor: 2,849 bytes, line 102
102j<a;j++){const ie=j,J=i.charCodeAt(j);let ae,le;if(at(J)?(j++,ae=0,le=2):(ae=t.get(J),le=Ql(J,D,n,r)),ie>_&&L_(W,P,J,ae)&&(S=ie,L=D),D+=le,D>w){ie>_?(x=ie,E=D-le):(x=j+1,E=D),D-L>d&&(S=0),K=!1;break}W=J,P=ae}if(K){m>0&&(u[m]=l[l.length-1],g[m]=h[l.length-1],m++);break}}if(S===0){let D=k,W=i.charCodeAt(y),P=t.get(W),K=!1;for(let j=y-1;j>=_;j--){const ie=j+1,J=i.charCodeAt(j);if(J===9){K=!0;break}let ae,le;if(wa(J)?(j--,ae=0,le=2):(ae=t.get(J),le=ir(J)?r:1),D<=w){if(x===0&&(x=ie,E=D),D<=w-d)break;if(L_(J,ae,W,P)){S=ie,L=D;break}}D-=le,W=J,P=ae}if(S!==0){const j=d-(E-L);if(j<=n){const ie=i.charCodeAt(x);let J;at(ie)?J=2:J=Ql(ie,E,n,r),j-J<0&&(S=0)}}if(K){b--;continue}}if(S===0&&(S=x,L=E),S<=_){const D=i.charCodeAt(_);at(D)?(S=_+2,L=C+2):(S=_+1,L=C+Ql(D,C,n,r))}for(_=S,u[m]=S,C=L,g[m]=L,m++,w=L+d;b<0||b<v&&h[b]<L;)b++;let R=Math.abs(h[b]-w);for(;b+1<v;){const D=Math.abs(h[b+1]-w);if(D>=R)break;R=D,b++}}return m===0?null:(u.length=m,g.length=m,S_=e.breakOffsets,y_=e.breakOffsetsVisibleColumn,e.breakOffsets=u,e.breakOffsetsVisibleColumn=g,e.wrappedTextIndentLength=c,e)}function v3(t,e,i,n,s,r,o){const a=sr.applyInjectedText(e,i);let l,h;if(i&&i.length>0?(l=i.map(L=>L.options),h=i.map(L=>L.column-1)):(l=null,h=null),s===-1)return l?new Xl(h,l,[a.length],[],0):null;const c=a.length;if(c<=1)return l?new Xl(h,l,[a.length],[],0):null;const d=Ax(a,n,s,r,o),u=s-d,g=[],m=[];let _=0,C=0,w=0,v=s,b=a.charCodeAt(0),y=t.get(b),k=Ql(b,0,n,r),S=1;at(b)&&(k+=1,b=a.charCodeAt(1),y=t.get(b),S++);for(let L=S;L<c;L++){const x=L,E=a.charCodeAt(L);let R,D;at(E)?(L++,R=0,D=2):(R=t.get(E),D=Ql(E,k,n,r)),L_(b,y,E,R)&&(C=x,w=k),k+=D,k>v&&((C===0||k-w>u)&&(C=x,w=k-D),g[_]=C,m[_]=w,_++,v=w+u,C=0),b=E,y=R}return _===0&&(!i||i.length===0)?null:(g[_]=c,m[_]=k,new Xl(h,l,g,m,d))}function Ql(t,e,i,n){return t===9?i-e%i:ir(t)||t<32?n:1}function uw(t,e){return e-t%e}function L_(t,e,i,n){return i!==32&&(e===2||e===3&&n!==2||n===1||n===3&&e!==1)}function Ax(t,e,i,n,s){let r=0;if(s!==0){const o=fi(t);if(o!==-1){for(let l=0;l<o;l++){const h=t.charCodeAt(l)===9?uw(r,e):1;r+=h}const a=s===3?2:s===2?1:0;for(let l=0;l<a;l++){const h=uw(r,e);r+=h}r+n>i&&(r=0)}}return r}var wg,Sg=(wg=window.trustedTypes)===null||wg===void 0?void 0:wg.createPolicy("domLineBreaksComputer",{createHTML:t=>t}),C3=class Ox{static create(){return new Ox}constructor(){}createLineBreaksComputer(e,i,n,s){const r=[],o=[];return{addRequest:(a,l,h)=>{r.push(a),o.push(l)},finalize:()=>b3(r,e,i,n,s,o)}}};function b3(t,e,i,n,s,r){var o;function a(S){const L=r[S];if(L){const x=sr.applyInjectedText(t[S],L),E=L.map(D=>D.options),R=L.map(D=>D.column-1);return new Xl(R,E,[x.length],[],0)}else return null}if(n===-1){const S=[];for(let L=0,x=t.length;L<x;L++)S[L]=a(L);return S}const l=Math.round(n*e.typicalHalfwidthCharacterWidth),h=Math.round(i*(s===3?2:s===2?1:0)),c=Math.ceil(e.spaceWi
102dth*h),d=document.createElement("div");Zt(d,e);const u=ya(1e4),g=[],m=[],_=[],C=[],w=[];for(let S=0;S<t.length;S++){const L=sr.applyInjectedText(t[S],r[S]);let x=0,E=0,R=l;if(s!==0)if(x=fi(L),x===-1)x=0;else{for(let K=0;K<x;K++){const j=L.charCodeAt(K)===9?i-E%i:1;E+=j}const P=Math.ceil(e.spaceWidth*E);P+e.typicalFullwidthCharacterWidth>l?(x=0,E=0):R=l-P}const D=L.substr(x),W=w3(D,E,i,R,u,c);g[S]=x,m[S]=E,_[S]=D,C[S]=W[0],w[S]=W[1]}const v=u.build();d.innerHTML=(o=Sg?.createHTML(v))!==null&&o!==void 0?o:v,d.style.position="absolute",d.style.top="10000",d.style.wordWrap="break-word",document.body.appendChild(d);const b=document.createRange(),y=Array.prototype.slice.call(d.children,0),k=[];for(let S=0;S<t.length;S++){const L=y[S],x=S3(b,L,_[S],C[S]);if(x===null){k[S]=a(S);continue}const E=g[S],R=m[S]+h,D=w[S],W=[];for(let ie=0,J=x.length;ie<J;ie++)W[ie]=D[x[ie]];if(E!==0)for(let ie=0,J=x.length;ie<J;ie++)x[ie]+=E;let P,K;const j=r[S];j?(P=j.map(ie=>ie.options),K=j.map(ie=>ie.column-1)):(P=null,K=null),k[S]=new Xl(K,P,x,W,R)}return document.body.removeChild(d),k}function w3(t,e,i,n,s,r){if(r!==0){const u=String(r);
102s.appendASCIIString('<div style="text-indent: -'),s.appendASCIIString(u),s.appendASCIIString("px; padding-left: "),s.appendASCIIString(u),s.appendASCIIString("px; box-sizing: border-box; width:")}else s.appendASCIIString('<div style="width:');s.appendASCIIString(String(n)),s.appendASCIIString('px;">');const o=t.length;let a=e,l=0;const h=[],c=[];let d=0<o?t.charCodeAt(0):0;s.appendASCIIString("<span>");for(let u=0;u<o;u++){u!==0&&u%16384===0&&s.appendASCIIString("</span><span>"),h[u]=l,c[u]=a;const g=d;d=u+1<o?t.charCodeAt(u+1):0;let m=1,_=1;switch(g){case 9:m=i-a%i,_=m;for(let C=1;C<=m;C++)C<m?s.write1(160):s.appendASCII(32);break;case 32:d===32?s.write1(160):s.appendASCII(32);break;case 60:s.appendASCIIString("&lt;");break;case 62:s.appendASCIIString("&gt;");break;case 38:s.appendASCIIString("&amp;");break;case 0:s.appendASCIIString("&#00;");break;case 65279:case 8232:case 8233:case 133:s.write1(65533);break;default:ir(g)&&_++,g<32?s.write1(9216+g):s.write1(g)}l+=m,a+=_}return s.appendASCIIString("</span>"),h[t.length]=l,c[t.length]=a,s.appendASCIIString("</div>"),[h,c]}function S3(t,e,i,n){if(i.length<=1)return null;const s=Array.prototype.slice.call(e.children,0),r=[];try{k_(t,s,n,0,null,i.length-1,null,r)}catch{return null}return r.length===0?null:(r.push(i.length),r)}function k_(t,e,i,n,s,r,o,a){if(n===r||(s=s||yg(t,e,i[n],i[n+1]),o=o||yg(t,e,i[r],i[r+1]),Math.abs(s[0].top-o[0].top)<=.1))return;if(n+1===r){a.push(r);return}const l=n+(r-n)/2|0,h=yg(t,e,i[l],i[l+1]);k_(t,e,i,n,s,l,h,a),k_(t,e,i,l,h,r,o,a)}function yg(t,e,i,n){return t.setStart(e[i/16384|0].firstChild,i%16384),t.setEnd(e[n/16384|0].firstChild,n%16384),t.getClientRects()}var y3=function(t,e,i,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r},Xn=function(t,e){return function(i,n){e(i,n,t)}},L3=0,k3=class{constructor(t,e,i,n,s){this.model=t,this.viewModel=e,this.view=i,this.hasRealView=n,this.listenersToRemove=s}dispose(){De(this.listenersToRemove),this.model.onBeforeDetached(),this.hasRealView&&this.view.dispose(),this.viewModel.dispose()}},pu=class pd extends V{constructor(e,i,n,s,r,o,a,l,h,c,d,u){super(),this.languageConfigurationService=d,this._onDidDispose=this._register(new M),this.onDidDispose=this._onDidDispose.event,this._onDidChangeModelContent=this._register(new M),this.onDidChangeModelContent=this._onDidChangeModelContent.event,this._onDidChangeModelLanguage=this._register(new M),this.onDidChangeModelLanguage=this._onDidChangeModelLanguage.event,this._onDidChangeModelLanguageConfiguration=this._register(new M),this.onDidChangeModelLanguageConfiguration=this._onDidChangeModelLanguageConfiguration.event,this._onDidChangeModelOptions=this._register(new M),this.onDidChangeModelOptions=this._onDidChangeModelOptions.event,this._onDidChangeModelDecorations=this._register(new M),this.onDidChangeModelDecorations=this._onDidChangeModelDecorations.event,this._onDidChangeConfiguration=this._register(new M),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._onDidChangeModel=this._register(new M),this.onDidChangeModel=this._onDidChangeModel.event,this._onDidChangeCursorPosition=this._register(new M),this.onDidChangeCursorPosition=this._onDidChangeCursorPosition.event,this._onDidChangeCursorSelection=this._register(new M),this.onDidChangeCursorSelection=this._onDidChangeCursorSelection.event,this._onDidAttemptReadOnlyEdit=this._register(new M),this.onDidAttemptReadOnlyEdit=this._onDidAttemptReadOnlyEdit.event,this._onDidLayoutChange=this._register(new M),this.onDidLayoutChange=this._onDidLayoutChange.event,this._editorTextFocus=this._register(new fw),this.onDidFocusEditorText=this._editorTextFocus.onDidChangeToTrue,this.onDidBlurEditorText=this._editorTextFocus.onDidChangeToFalse,this._editorWidgetFocus=this._register(new fw),this.onDidFocusEditorWidget=this._editorWidgetFocus.onDidChangeToTrue,this.onDidBlurEditorWidget=this._editorWidgetFocus.onDidChangeToFalse,this._onWillType=this._register(new M),this.onWillType=this._onWillType.event,this._onDidType=this._register(new M),this.onDidType=this._onDidType.event,this._onDidCompositionStart=this._register(new M),this.onDidCompositionStart=this._onDidCompositionStart.event,this._onDidCompositionEnd=this._register(new M),this.onDidCompositionEnd=this._onDidCompositionEnd.event,this._onDidPaste=this._register(new M),this.onDidPaste=this._onDidPaste.event,this._onMouseUp=this._register(new M),this.onMouseUp=this._onMouseUp.event,this._onMouseDown=this._register(new M),this.onMouseDown=this._onMouseDown.event,this._onMouseDrag=this._register(new M),this.onMouseDrag=this._onMouseDrag.event,this._onMouseDrop=this._register(new M),this.onMouseDrop=this._onMouseDrop.event,this._onMouseDropCanceled=this._register(new M),this.onMouseDropCanceled=this._onMouseDropCanceled.event,this._onContextMenu=this._register(new M),this.onContextMenu=this._onContextMenu.event,this._onMouseMove=this._register(new M),this.onMouseMove=this._onMouseMove.event,this._onMouseLeave=this._register(new M),this.onMouseLeave=this._onMouseLeave.event,this._onMouseWheel=this._register(new M),this.onMouseWheel=this._onMouseWheel.event,this._onKeyUp=this._register(new M),this.onKeyUp=this._onKeyUp.event,this._onKeyDown=this._register(new M),this.onKeyDown=this._onKeyDown.event,this._onDidContentSizeChange=this._register(new M),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._onDidScrollChange=this._register(new M),this.onDidScrollChange=this._onDidScrollChange.event,this._onDidChangeViewZones=this._register(new M),this.onDidChangeViewZones=this._onDidChangeViewZones.event,this._onDidChangeHiddenAreas=this._register(new M),this.onDidChangeHiddenAreas=this._onDidChangeHiddenAreas.event,this._bannerDomNode=null;const g=Object.assign({},i);this._domElement=e,this._overflowWidgetsDomNode=g.overflowWidgetsDomNode,delete g.overflowWidgetsDomNode,this._id=++L3,this._decorationTypeKeysToIds={},this._decorationTypeSubtypes={},this._telemetryData=n.telemetryData,this._configuration=this._register(this._createConfiguration(n.isSimpleWidget||!1,g,c)),this._register(this._configuration.onDidChange(_=>{this._onDidChangeConfiguration.fire(_);const C=this._configuration.options;if(_.hasChanged(131)){const w=C.get(131);this._onDidLayoutChange.fire(w)}})),this._contextKeyService=this._register(a.createScoped(this._domElement)),this._notificationService=h,this._codeEditorService=r,this._commandService=o,this._themeService=l,this._register(new x3(this,this._contextKeyService)),this._register(new I3(this,this._contextKeyService,u)),this._instantiationService=s.createChild(new of([Ie,this._contextKeyService])),this._modelData=null,this._contributions={},this._actions={},this._focusTracker=new E3(e),this._register(this._focusTracker.onChange(()=>{this._editorWidgetFocus.setValue(this._focusTracker.hasFocus())})),this._contentWidgets={},this._overlayWidgets={};let m;Array.isArray(n.contributions)?m=n.contributions:m=oa.getEditorContributions();for(const _ of m){if(this._contributions[_.id]){We(new Error(`Cannot have two contributions with the same id ${_.id}`));continue}try{const C=this._instantiationService.createInstance(_.ctor,this);this._contributions[_.id]=C}catch(C){We(C)}}
102oa.getEditorActions().forEach(_=>{if(this._actions[_.id]){We(new Error(`Cannot have two actions with the same id ${_.id}`));return}const C=new sx(_.id,_.label,_.alias,Br(_.precondition),()=>this._instantiationService.invokeFunction(w=>Promise.resolve(_.runEditorCommand(w,this,null))),this._contextKeyService);this._actions[C.id]=C}),this._codeEditorService.addCodeEditor(this)}get isSimpleWidget(){return this._configuration.isSimpleWidget}_createConfiguration(e,i,n){return new Dp(e,i,this._domElement,n)}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return mv.ICodeEditor}dispose(){this._codeEditorService.removeCodeEditor(this),this._focusTracker.dispose();const e=Object.keys(this._contributions);for(let i=0,n=e.length;i<n;i++){const s=e[i];this._contributions[s].dispose()}this._contributions={},this._actions={},this._contentWidgets={},this._overlayWidgets={},this._removeDecorationTypes(),this._postDetachModelCleanup(this._detachModel()),this._onDidDispose.fire(),super.dispose()}invokeWithinContext(e){return this._instantiationService.invokeFunction(e)}updateOptions(e){this._configuration.updateOptions(e||{})}getOptions(){return this._configuration.options}getOption(e){return this._configuration.options.get(e)}getRawOptions(){return this._configuration.getRawOptions()}getOverflowWidgetsDomNode(){return this._overflowWidgetsDomNode}getConfiguredWordAtPosition(e){return this._modelData?Rk.getWordAtPosition(this._modelData.model,this._configuration.options.get(117),e):null}getValue(e=null){if(!this._modelData)return"";const i=!!(e&&e.preserveBOM);let n=0;return e&&e.lineEnding&&e.lineEnding===`
103`?n=1:e&&e.lineEnding&&e.lineEnding===`\r
104`&&(n=2),this._modelData.model.getValue(n,i)}setValue(e){this._modelData&&this._modelData.model.setValue(e)}getModel(){return this._modelData?this._modelData.model:null}setModel(e=null){const i=e;if(this._modelData===null&&i===null||this._modelData&&this._modelData.model===i)return;const n=this.hasTextFocus(),s=this._detachModel();this._attachModel(i),n&&this.hasModel()&&this.focus();const r={oldModelUrl:s?s.uri:null,newModelUrl:i?i.uri:null};this._removeDecorationTypes(),this._onDidChangeModel.fire(r),this._postDetachModelCleanup(s)}_removeDecorationTypes(){if(this._decorationTypeKeysToIds={},this._decorationTypeSubtypes){for(let e in this._decorationTypeSubtypes){const i=this._decorationTypeSubtypes[e];for(let n in i)this._removeDecorationType(e+"-"+n)}this._decorationTypeSubtypes={}}}getVisibleRanges(){return this._modelData?this._modelData.viewModel.getVisibleRanges():[]}getVisibleRangesPlusViewportAboveBelow(){return this._modelData?this._modelData.viewModel.getVisibleRangesPlusViewportAboveBelow():[]}getWhitespaces(){return this._modelData?this._modelData.viewModel.viewLayout.getWhitespaces():[]}static _getVerticalOffsetForPosition(e,i,n){const s=e.model.validatePosition({lineNumber:i,column:n}),r=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(s);return e.viewModel.viewLayout.getVerticalOffsetForLineNumber(r.lineNumber)}getTopForLineNumber(e){return this._modelData?pd._getVerticalOffsetForPosition(this._modelData,e,1):-1}getTopForPosition(e,i){return this._modelData?pd._getVerticalOffsetForPosition(this._modelData,e,i):-1}setHiddenAreas(e){this._modelData&&this._modelData.viewModel.setHiddenAreas(e.map(i=>T.lift(i)))}getVisibleColumnFromPosition(e){if(!this._modelData)return e.column;const i=this._modelData.model.validatePosition(e),n=this._modelData.model.getOptions().tabSize;return ut.visibleColumnFromColumn(this._modelData.model.getLineContent(i.lineNumber),i.column,n)+1}getPosition(){return this._modelData?this._modelData.viewModel.getPosition():null}setPosition(e,i="api"){if(this._modelData){if(!A.isIPosition(e))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections(i,[{selectionStartLineNumber:e.lineNumber,selectionStartColumn:e.column,positionLineNumber:e.lineNumber,positionColumn:e.column}])}}_sendRevealRange(e,i,n,s){if(!this._modelData)return;if(!T.isIRange(e))throw new Error("Invalid arguments");const r=this._modelData.model.validateRange(e),o=this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(r);this._modelData.viewModel.revealRange("api",n,o,i,s)}revealLine(e,i=0){this._revealLine(e,0,i)}revealLineInCenter(e,i=0){this._revealLine(e,1,i)}revealLineInCenterIfOutsideViewport(e,i=0){this._revealLine(e,2,i)}revealLineNearTop(e,i=0){this._revealLine(e,5,i)}_revealLine(e,i,n){if(typeof e!="number")throw new Error("Invalid arguments");this._sendRevealRange(new T(e,1,e,1),i,!1,n)}revealPosition(e,i=0){this._revealPosition(e,0,!0,i)}revealPositionInCenter(e,i=0){this._revealPosition(e,1,!0,i)}revealPositionInCenterIfOutsideViewport(e,i=0){this._revealPosition(e,2,!0,i)}revealPositionNearTop(e,i=0){this._revealPosition(e,5,!0,i)}_revealPosition(e,i,n,s){if(!A.isIPosition(e))throw new Error("Invalid arguments");this._sendRevealRange(new T(e.lineNumber,e.column,e.lineNumber,e.column),i,n,s)}getSelection(){return this._modelData?this._modelData.viewModel.getSelection():null}getSelections(){return this._modelData?this._modelData.viewModel.getSelections():null}setSelection(e,i="api"){const n=xe.isISelection(e),s=T.isIRange(e);if(!n&&!s)throw new Error("Invalid arguments");if(n)this._setSelectionImpl(e,i);else if(s){const r={selectionStartLineNumber:e.startLineNumber,selectionStartColumn:e.startColumn,positionLineNumber:e.endLineNumber,positionColumn:e.endColumn};this._setSelectionImpl(r,i)}}_setSelectionImpl(e,i){if(!this._modelData)return;const n=new xe(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn);this._modelData.viewModel.setSelections(i,[n])}revealLines(e,i,n=0){this._revealLines(e,i,0,n)}revealLinesInCenter(e,i,n=0){this._revealLines(e,i,1,n)}revealLinesInCenterIfOutsideViewport(e,i,n=0){this._revealLines(e,i,2,n)}revealLinesNearTop(e,i,n=0){this._revealLines(e,i,5,n)}_revealLines(e,i,n,s){if(typeof e!="number"||typeof i!="number")throw new Error("Invalid arguments");this._sendRevealRange(new T(e,1,i,1),n,!1,s)}revealRange(e,i=0,n=!1,s=!0){this._revealRange(e,n?1:0,s,i)}revealRangeInCenter(e,i=0){this._revealRange(e,1,!0,i)}revealRangeInCenterIfOutsideViewport(e,i=0){this._revealRange(e,2,!0,i)}revealRangeNearTop(e,i=0){this._revealRange(e,5,!0,i)}revealRangeNearTopIfOutsideViewport(e,i=0){this._revealRange(e,6,!0,i)}revealRangeAtTop(e,i=0){this._revealRange(e,3,!0,i)}_revealRange(e,i,n,s){if(!T.isIRange(e))throw new Error("Invalid arguments");this._sendRevealRange(T.lift(e),i,n,s)}setSelections(e,i="api",n=0){if(this._modelData){if(!e||e.length===0)throw new Error("Invalid arguments");for(let s=0,r=e.length;s<r;s++)if(!xe.isISelection(e[s]))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections(i,e,n)}}getContentWidth(){return this._modelData?this._modelData.viewModel.viewLayout.getContentWidth():-1}getScrollWidth(){return this._modelData?this._modelData.viewModel.viewLayout.getScrollWidth():-1}getScrollLeft(){return this._modelData?this._modelData.viewModel.viewLayout.getCurrentScrollLeft():-1}getContentHeight(){return this._modelData?this._modelData.viewModel.viewLayout.getContentHeight():-1}getScrollHeight(){return this._modelData?this._modelData.viewModel.viewLayout.getScrollHeight():-1}getScrollTop(){return this._modelData?this._modelData.viewModel.viewLayout.getCurrentScrollTop():-1}setScrollLeft(e,i=1){if(this._modelData){if(typeof e!="number")throw new Error("Invalid arguments");this._modelData.viewModel.viewLayout.setScrollPosition({scrollLeft:e},i)}}setScrollTop(e,i=1){if(this._modelData){if(typeof e!="number")throw new Error("Invalid arguments");this._modelData.viewModel.viewLayout.setScrollPosition({scrollTop:e},i)}}setScrollPosition(e,i=1){this._modelData&&this._modelData.viewModel.viewLayout.setScrollPosition(e,i)}saveViewState(){if(!this._modelData)return null;const e={},i=Object.keys(this._contributions);for(const n of i){const s=this._contributions[n];typeof s.saveViewState=="function"&&(e[n]=s.saveViewState())}return{cursorState:this._modelData.viewModel.saveCursorState(),viewState:this._modelData.viewModel.saveState(),contributionsState:e}}restoreViewState(e){if(!this._modelData||!this._modelData.hasRealView)return;const i=e;
104if(i&&i.cursorState&&i.viewState){const n=i.cursorState;Array.isArray(n)?n.length>0&&this._modelData.viewModel.restoreCursorState(n):this._modelData.viewModel.restoreCursorState([n]);const s=i.contributionsState||{},r=Object.keys(this._contributions);for(let a=0,l=r.length;a<l;a++){const h=r[a],c=this._contributions[h];typeof c.restoreViewState=="function"&&c.restoreViewState(s[h])}const o=this._modelData.viewModel.reduceRestoreState(i.viewState);this._modelData.view.restoreState(o)}}getContribution(e){return this._contributions[e]||null}getActions(){const e=[],i=Object.keys(this._actions);for(let n=0,s=i.length;n<s;n++){const r=i[n];e.push(this._actions[r])}return e}getSupportedActions(){let e=this.getActions();return e=e.filter(i=>i.isSupported()),e}getAction(e){return this._actions[e]||null}trigger(e,i,n){switch(n=n||{},i){case"compositionStart":this._startComposition();return;case"compositionEnd":this._endComposition(e);return;case"type":{const r=n;this._type(e,r.text||"");return}case"replacePreviousChar":{const r=n;this._compositionType(e,r.text||"",r.replaceCharCnt||0,0,0);return}case"compositionType":{const r=n;this._compositionType(e,r.text||"",r.replacePrevCharCnt||0,r.replaceNextCharCnt||0,r.positionDelta||0);return}case"paste":{const r=n;this._paste(e,r.text||"",r.pasteOnNewLine||!1,r.multicursorText||null,r.mode||null);return}case"cut":this._cut(e);return}const s=this.getAction(i);if(s){Promise.resolve(s.run()).then(void 0,We);return}this._modelData&&(this._triggerEditorCommand(e,i,n)||this._triggerCommand(i,n))}_triggerCommand(e,i){this._commandService.executeCommand(e,i)}_startComposition(){this._modelData&&(this._modelData.viewModel.startComposition(),this._onDidCompositionStart.fire())}_endComposition(e){this._modelData&&(this._modelData.viewModel.endComposition(e),this._onDidCompositionEnd.fire())}_type(e,i){!this._modelData||i.length===0||(e==="keyboard"&&this._onWillType.fire(i),this._modelData.viewModel.type(i,e),e==="keyboard"&&this._onDidType.fire(i))}_compositionType(e,i,n,s,r){this._modelData&&this._modelData.viewModel.compositionType(i,n,s,r,e)}_paste(e,i,n,s,r){if(!this._modelData||i.length===0)return;const o=this._modelData.viewModel.getSelection().getStartPosition();this._modelData.viewModel.paste(i,n,s,e);const a=this._modelData.viewModel.getSelection().getStartPosition();e==="keyboard"&&this._onDidPaste.fire({range:new T(o.lineNumber,o.column,a.lineNumber,a.column),languageId:r})}_cut(e){this._modelData&&this._modelData.viewModel.cut(e)}_triggerEditorCommand(e,i,n){const s=oa.getEditorCommand(i);return s?(n=n||{},n.source=e,this._instantiationService.invokeFunction(r=>{Promise.resolve(s.runEditorCommand(r,this,n)).then(void 0,We)}
vendor: 4,991 bytes, line 104
104),!0):!1}_getViewModel(){return this._modelData?this._modelData.viewModel:null}pushUndoStop(){return!this._modelData||this._configuration.options.get(81)?!1:(this._modelData.model.pushStackElement(),!0)}popUndoStop(){return!this._modelData||this._configuration.options.get(81)?!1:(this._modelData.model.popStackElement(),!0)}executeEdits(e,i,n){if(!this._modelData||this._configuration.options.get(81))return!1;let s;return n?Array.isArray(n)?s=()=>n:s=n:s=()=>null,this._modelData.viewModel.executeEdits(e,i,s),!0}executeCommand(e,i){this._modelData&&this._modelData.viewModel.executeCommand(i,e)}executeCommands(e,i){this._modelData&&this._modelData.viewModel.executeCommands(i,e)}changeDecorations(e){return this._modelData?this._modelData.model.changeDecorations(e,this._id):null}getLineDecorations(e){return this._modelData?this._modelData.model.getLineDecorations(e,this._id,Od(this._configuration.options)):null}getDecorationsInRange(e){return this._modelData?this._modelData.model.getDecorationsInRange(e,this._id,Od(this._configuration.options)):null}deltaDecorations(e,i){return this._modelData?e.length===0&&i.length===0?e:this._modelData.model.deltaDecorations(e,i,this._id):[]}removeDecorations(e){const i=this._decorationTypeKeysToIds[e];i&&this.deltaDecorations(i,[]),this._decorationTypeKeysToIds.hasOwnProperty(e)&&delete this._decorationTypeKeysToIds[e],this._decorationTypeSubtypes.hasOwnProperty(e)&&delete this._decorationTypeSubtypes[e]}getLayoutInfo(){return this._configuration.options.get(131)}createOverviewRuler(e){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.createOverviewRuler(e)}getContainerDomNode(){return this._domElement}getDomNode(){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.domNode.domNode}delegateVerticalScrollbarMouseDown(e){!this._modelData||!this._modelData.hasRealView||this._modelData.view.delegateVerticalScrollbarMouseDown(e)}layout(e){this._configuration.observeContainer(e),this.render()}focus(){!this._modelData||!this._modelData.hasRealView||this._modelData.view.focus()}hasTextFocus(){return!this._modelData||!this._modelData.hasRealView?!1:this._modelData.view.isFocused()}hasWidgetFocus(){return this._focusTracker&&this._focusTracker.hasFocus()}addContentWidget(e){const i={widget:e,position:e.getPosition()};this._contentWidgets.hasOwnProperty(e.getId()),this._contentWidgets[e.getId()]=i,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addContentWidget(i)}layoutContentWidget(e){const i=e.getId();if(this._contentWidgets.hasOwnProperty(i)){const n=this._contentWidgets[i];n.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutContentWidget(n)}}removeContentWidget(e){const i=e.getId();if(this._contentWidgets.hasOwnProperty(i)){const n=this._contentWidgets[i];delete this._contentWidgets[i],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeContentWidget(n)}}addOverlayWidget(e){const i={widget:e,position:e.getPosition()};this._overlayWidgets.hasOwnProperty(e.getId()),this._overlayWidgets[e.getId()]=i,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addOverlayWidget(i)}layoutOverlayWidget(e){const i=e.getId();if(this._overlayWidgets.hasOwnProperty(i)){const n=this._overlayWidgets[i];n.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutOverlayWidget(n)}}removeOverlayWidget(e){const i=e.getId();if(this._overlayWidgets.hasOwnProperty(i)){const n=this._overlayWidgets[i];delete this._overlayWidgets[i],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeOverlayWidget(n)}}changeViewZones(e){!this._modelData||!this._modelData.hasRealView||this._modelData.view.change(e)}getTargetAtClientPoint(e,i){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.getTargetAtClientPoint(e,i)}getScrolledVisiblePosition(e){if(!this._modelData||!this._modelData.hasRealView)return null;const i=this._modelData.model.validatePosition(e),n=this._configuration.options,s=n.get(131);return{top:pd._getVerticalOffsetForPosition(this._modelData,i.lineNumber,i.column)-this.getScrollTop(),left:this._modelData.view.getOffsetForColumn(i.lineNumber,i.column)+s.glyphMarginWidth+s.lineNumbersWidth+s.decorationsWidth-this.getScrollLeft(),height:n.get(59)}}getOffsetForColumn(e,i){return!this._modelData||!this._modelData.hasRealView?-1:this._modelData.view.getOffsetForColumn(e,i)}render(e=!1){!this._modelData||!this._modelData.hasRealView||this._modelData.view.render(!0,e)}setAriaOptions(e){!this._modelData||!this._modelData.hasRealView||this._modelData.view.setAriaOptions(e)}applyFontInfo(e){Zt(e,this._configuration.options.get(44))}setBanner(e,i){this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._domElement.removeChild(this._bannerDomNode),this._bannerDomNode=e,this._configuration.setReservedHeight(e?i:0),this._bannerDomNode&&this._domElement.prepe
104nd(this._bannerDomNode)}_attachModel(e){if(!e){this._modelData=null;return}const i=[];this._domElement.setAttribute("data-mode-id",e.getLanguageId()),this._configuration.setIsDominatedByLongLines(e.isDominatedByLongLines()),this._configuration.setModelLineCount(e.getLineCount()),e.onBeforeAttached();const n=new u3(this._id,this._configuration,e,C3.create(),m3.create(this._configuration.options),o=>Cn(o),this.languageConfigurationService,this._themeService);i.push(e.onDidChangeDecorations(o=>this._onDidChangeModelDecorations.fire(o))),i.push(e.onDidChangeLanguage(o=>{this._domElement.setAttribute("data-mode-id",e.getLanguageId()),this._onDidChangeModelLanguage.fire(o)})),i.push(e.onDidChangeLanguageConfiguration(o=>this._onDidChangeModelLanguageConfiguration.fire(o))),i.push(e.onDidChangeContent(o=>this._onDidChangeModelContent.fire(o))),i.push(e.onDidChangeOptions(o=>this._onDidChangeModelOptions.fire(o))),i.push(e.onWillDispose(()=>this.setModel(null))),i.push(n.onEvent(o=>{switch(o.kind){case 0:this._onDidContentSizeChange.fire(o);break;case 1:this._editorTextFocus.setValue(o.hasFocus);break;case 2:this._onDidScrollChange.fire(o);break;case 3:this._onDidChangeViewZones.fire();break;case 4:this._onDidChangeHiddenAreas.fire();break;case 5:this._onDidAttemptReadOnlyEdit.fire();break;case 6:{o.reachedMaxCursorCount&&this._notificationService.warn(p("cursors.maximum","The number of cursors has been limited to {0}.",qv.MAX_CURSOR_COUNT));const a=[];for(let c=0,d=o.selections.length;c<d;c++)a[c]=o.selections[c].getPosition();const l={position:a[0],secondaryPositions:a.slice(1),reason:o.reason,source:o.source};this._onDidChangeCursorPosition.fire(l);const h={selection:o.selections[0],secondarySelections:o.selections.slice(1),modelVersionId:o.modelVersionId,oldSelections:o.oldSelections,oldModelVersionId:o.oldModelVersionId,source:o.source,reason:o.reason};this._onDidChangeCursorSelection.fire(h);break}}}));const[s,r]=this._createView(n);if(r){this._domElement.appendChild(s.domNode.domNode);let o=Object.keys(this._contentWidgets);for(let a=0,l=o.length;a<l;a++){const h=o[a];s.addContentWidget(this._contentWidgets[h])}o=Object.keys(this._overlayWidgets);for(let a=0,l=o.length;a<l;a++){const h=o[a];s.addOverlayWidget(this._overlayWidgets[h])}s.render(!1,!0),s.domNode.domNode.setAttribute("data-uri",e.uri.toString())}this._modelData=new k3(e,n,s,r,i)}_createView(e){let i;this.isSimpleWidget?i={paste:(s,r,o,a)=>{this._paste("keyboard",s,r,o,a)},type:s=>{this._type("keyboard",s)},compositionType:(s,r,o,a)=>{this._compositionType("keyboard",s,r,o,a)},startComposition:()=>{this._startComposition()},endComposition:()=>{this._endComposition("keyboard")},cut:()=>{this._cut("keyboard")}}:i={paste:(s,r,o,a)=>{const l={text:s,pasteOnNewLine:r,multicursorText:o,mode:a};this._commandService.executeCommand("paste",l)},type:s=>{const r={text:s};this._commandService.executeCommand("type",r)},compositionType:(s,r,o,a)=>
104{if(o||a){const l={text:s,replacePrevCharCnt:r,replaceNextCharCnt:o,positionDelta:a};this._commandService.executeCommand("compositionType",l)}else{const l={text:s,replaceCharCnt:r};this._commandService.executeCommand("replacePreviousChar",l)}},startComposition:()=>{this._commandService.executeCommand("compositionStart",{})},endComposition:()=>{this._commandService.executeCommand("compositionEnd",{})},cut:()=>{this._commandService.executeCommand("cut",{})}};const n=new Ok(e.coordinatesConverter);return n.onKeyDown=s=>this._onKeyDown.fire(s),n.onKeyUp=s=>this._onKeyUp.fire(s),n.onContextMenu=s=>this._onContextMenu.fire(s),n.onMouseMove=s=>this._onMouseMove.fire(s),n.onMouseLeave=s=>this._onMouseLeave.fire(s),n.onMouseDown=s=>this._onMouseDown.fire(s),n.onMouseUp=s=>this._onMouseUp.fire(s),n.onMouseDrag=s=>this._onMouseDrag.fire(s),n.onMouseDrop=s=>this._onMouseDrop.fire(s),n.onMouseDropCanceled=s=>this._onMouseDropCanceled.fire(s),n.onMouseWheel=s=>this._onMouseWheel.fire(s),[new X9(i,this._configuration,this._themeService.getColorTheme(),e,n,this._overflowWidgetsDomNode),!0]}_postDetachModelCleanup(e){e&&e.removeAllDecorationsWithOwnerId(this._id)}_detachModel(){if(!this._modelData)return null;const e=this._modelData.model,i=this._modelData.hasRealView?this._modelData.view.domNode.domNode:null;return this._modelData.dispose(),this._modelData=null,this._domElement.removeAttribute("data-mode-id"),i&&this._domElement.contains(i)&&this._domElement.removeChild(i),this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._domElement.removeChild(this._bannerDomNode),e}_removeDecorationType(e){this._codeEditorService.removeDecorationType(e)}hasModel(){return this._modelData!==null}};pu=y3([Xn(3,Qi),Xn(4,pt),Xn(5,Ni),Xn(6,Ie),Xn(7,et),Xn(8,wn),Xn(9,Ti),Xn(10,hr),Xn(11,pe)],pu);var fw=class extends V{constructor(){super(),this._onDidChangeToTrue=this._register(new M),this.onDidChangeToTrue=this._onDidChangeToTrue.event,this._onDidChangeToFalse=this._register(new M),this.onDidChangeToFalse=this._onDidChangeToFalse.event,this._value=0}setValue(t){const e=t?2:1;this._value!==e&&(this._value=e,this._value===2?this._onDidChangeToTrue.fire():this._value===1&&this._onDidChangeToFalse.fire())}},x3=class extends V{constructor(t,e){super(),this._editor=t,e.createKey("editorId",t.getId()),this._editorSimpleInput=H.editorSimpleInput.bindTo(e),this._editorFocus=H.focus.bindTo(e),this._textInputFocus=H.textInputFocus.bindTo(e),this._editorTextFocus=H.editorTextFocus.bindTo(e),this._editorTabMovesFocus=H.tabMovesFocus.bindTo(e),this._editorReadonly=H.readOnly.bindTo(e),this._inDiffEditor=H.inDiffEditor.bindTo(e),this._editorColumnSelection=H.columnSelection.bindTo(e),this._hasMultipleSelections=H.hasMultipleSelections.bindTo(e),this._hasNonEmptySelection=H.hasNonEmptySelection.bindTo(e),this._canUndo=H.canUndo.bindTo(e),this._canRedo=H.canRedo.bindTo(e),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 t=this._editor.getOptions();this._editorTabMovesFocus.set(t.get(130)),this._editorReadonly.set(t.get(81)),this._inDiffEditor.set(t.get(54)),this._editorColumnSelection.set(t.get(18))}_updateFromSelection(){const t=this._editor.getSelections();t?(this._hasMultipleSelections.set(t.length>1),this._hasNonEmptySelection.set(t.some(e=>!e.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 t=this._editor.getModel();this._canUndo.set(!!(t&&t.canUndo())),this._canRedo.set(!!(t&&t.canRedo()))}},I3=class extends V{constructor(t,e,i){super(),this._editor=t,this._contextKeyService=e,this._languageFeaturesService=i,this._langId=H.languageId.bindTo(e),this._hasCompletionItemProvider=H.hasCompletionItemProvider.bindTo(e),this._hasCodeActionsProvider=H.hasCodeActionsProvider.bindTo(e),this._hasCodeLensProvider=H.hasCodeLensProvider.bindTo(e),this._hasDefinitionProvider=H.hasDefinitionProvider.bindTo(e),this._hasDeclarationProvider=H.hasDeclarationProvider.bindTo(e),this._hasImplementationProvider=H.hasImplementationProvider.bindTo(e),this._hasTypeDefinitionProvider=H.hasTypeDefinitionProvider.bindTo(e),this._hasHoverProvider=H.hasHoverProvider.bindTo(e),this._hasDocumentHighlightProvider=H.hasDocumentHighlightProvider.bindTo(e),this._hasDocumentSymbolProvider=H.hasDocumentSymbolProvider.bindTo(e),this._hasReferenceProvider=H.hasReferenceProvider.bindTo(e),this._hasRenameProvider=H.hasRenameProvider.bindTo(e),this._hasSignatureHelpProvider=H.hasSignatureHelpProvider.bindTo(e),this._hasInlayHintsProvi
vendor: 4,991 bytes, line 104
104der=H.hasInlayHintsProvider.bindTo(e),this._hasDocumentFormattingProvider=H.hasDocumentFormattingProvider.bindTo(e),this._hasDocumentSelectionFormattingProvider=H.hasDocumentSelectionFormattingProvider.bindTo(e),this._hasMultipleDocumentFormattingProvider=H.hasMultipleDocumentFormattingProvider.bindTo(e),this._hasMultipleDocumentSelectionFormattingProvider=H.hasMultipleDocumentSelectionFormattingProvider.bindTo(e),this._isInWalkThrough=H.isInWalkThroughSnippet.bindTo(e);const n=()=>this._update();this._register(t.onDidChangeModel(n)),this._register(t.onDidChangeModelLanguage(n)),this._register(i.completionProvider.onDidChange(n)),this._register(i.codeActionProvider.onDidChange(n)),this._register(i.codeLensProvider.onDidChange(n)),this._register(i.definitionProvider.onDidChange(n)),this._register(i.declarationProvider.onDidChange(n)),this._register(i.implementationProvider.onDidChange(n)),this._register(i.typeDefinitionProvider.onDidChange(n)),this._register(i.hoverProvider.onDidChange(n)),this._register(i.documentHighlightProvider.onDidChange(n)),this._register(i.documentSymbolProvider.onDidChange(n)),this._register(i.referenceProvider.onDidChange(n)),this._register(i.renameProvider.onDidChange(n)),this._register(i.documentFormattingEditProvider.onDidChange(n)),this._register(i.documentRangeFormattingEditProvider.onDidChange(n)),this._register(i.signatureHelpProvider.onDidChange(n)),this._register(i.inlayHintsProvider.onDidChange(n)),n()}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 t=this._editor.getModel();if(!t){this.reset();return}this._contextKeyService.bufferChangeEvents(()=>{this._langId.set(t.getLanguageId()),this._hasCompletionItemProvider.set(this._languageFeaturesService.completionProvider.has(t)),this._hasCodeActionsProvider.set(this._languageFeaturesService.codeActionProvider.has(t)),this._hasCodeLensProvider.set(this._languageFeaturesService.codeLensProvider.has(t)),this._hasDefinitionProvider.set(this._languageFeaturesService.definitionProvider.has(t)),this._hasDeclarationProvider.set(this._languageFeaturesService.declarationProvider.has(t)),this._hasImplementationProvider.set(this._languageFeaturesService.implementationProvider.has(t)),this._hasTypeDefinitionProvider.set(this._languageFeaturesService.typeDefinitionProvider.has(t)),this._hasHoverProvider.set(this._languageFeaturesService.hoverProvider.has(t)),this._hasDocumentHighlightProvider.set(this._languageFeaturesService.documentHighlightProvider.has(t)),this._hasDocumentSymbolProvider.set(this._languageFeaturesService.documentSymbolProvider.has(t)),this._hasReferenceProvider.set(this._languageFeaturesService.referenceProvider.has(t)),this._hasRenameProvider.set(this._languageFeaturesService.renameProvider.has(t)),this._hasSignatureHelpProvider.set(this._languageFeaturesService.signatureHelpProvider.has(t)),this._hasInlayHintsProvider.set(this._languageFeaturesService.inlayHintsProvider.has(t)),this._hasDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.has(t)||this._languageFeaturesService.documentRangeFormattingEditProvider.has(t)),this._hasDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.has(t)),this._hasMultipleDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.all(t).length+this._languageFeaturesService.documentRangeFormattingEditProvider.all(t).length>1),this._hasMultipleDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.all(t).length>1),this._isInWalkThrough.set(t.uri.scheme===_e.walkThroughSnippet)})}},E3=class extends V{constructor(t){super(),this._onChange=this._register(new M),this.onChange=this._onChange.event,this._hasFocus=!1,this._domFocusTracker=this._register(xa(t)),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}},D3=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='"),N3=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'/>
104<polygon points='0,2 1,3 2.4,3 0,0.6'/></g></svg>");function Lg(t){return D3+encodeURIComponent(t.toString())+N3}var T3=encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" height="3" width="12"><g fill="'),M3=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 R3(t){return T3+encodeURIComponent(t.toString())+M3}Yt((t,e)=>{const i=t.getColor(CR);i&&e.addRule(`.monaco-editor .squiggly-error { border-bottom: 4px double ${i}; }`);const n=t.getColor(jr);n&&e.addRule(`.monaco-editor .squiggly-error { background: url("data:image/svg+xml,${Lg(n)}") repeat-x bottom left; }`);const s=t.getColor(vR);s&&e.addRule(`.monaco-editor .squiggly-error::before { display: block; content: ''; width: 100%; height: 100%; background: ${s}; }`);const r=t.getColor(Pv);r&&e.addRule(`.monaco-editor .squiggly-warning { border-bottom: 4px double ${r}; }`);const o=t.getColor(pn);o&&e.addRule(`.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,${Lg(o)}") repeat-x bottom left; }`);const a=t.getColor(bR);a&&e.addRule(`.monaco-editor .squiggly-warning::before { display: block; content: ''; width: 100%; height: 100%; background: ${a}; }`);const l=t.getColor(X2);l&&e.addRule(`.monaco-editor .squiggly-info { border-bottom: 4px double ${l}; }`);const h=t.getColor(vs);h&&e.addRule(`.monaco-editor .squiggly-info { background: url("data:image/svg+xml,${Lg(h)}") repeat-x bottom left; }`);const c=t.getColor(wR);c&&e.addRule(`.monaco-editor .squiggly-info::before { display: block; content: ''; width: 100%; height: 100%; background: ${c}; }`);const d=t.getColor(yR);d&&e.addRule(`.monaco-editor .squiggly-hint { border-bottom: 2px dotted ${d}; }`);const u=t.getColor(SR);u&&e.addRule(`.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,${R3(u)}") no-repeat bottom left; }`);const g=t.getColor(v7);g&&e.addRule(`.monaco-editor.showUnused .squiggly-inline-unnecessary { opacity: ${g.rgba.a}; }`);const m=t.getColor(_7);m&&e.addRule(`.monaco-editor.showUnused .squiggly-unnecessary { border-bottom: 2px dashed ${m}; }`);const _=t.getColor(Bh)||"inherit";e.addRule(`.monaco-editor.showDeprecated .squiggly-inline-deprecated { text-decoration: line-through; text-decoration-color: ${_}}`)});var Ee=class{constructor(t,e,i){const n=s=>this.emitter.fire(s);this.emitter=new M({onFirstListenerAdd:()=>t.addEventListener(e,n,i),onLastListenerRemove:()=>t.removeEventListener(e,n,i)})}get event(){return this.emitter.event}dispose(){this.emitter.dispose()}};function gw(t){return t.preventDefault(),t.stopPropagation(),t}var Za=function(t,e,i,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r},A3=!1,mw;(function(t){t.North="north",t.South="south",t.East="east",t.West="west"})(mw||(mw={}));var O3=4,P3=new M,F3=300,B3=new M,t0=class{constructor(){this.disposables=new ne}get onPointerMove(){return this.disposables.add(new Ee(window,"mousemove")).event}get onPointerUp(){return this.disposables.add(new Ee(window,"mouseup")).event}dispose(){this.disposables.dispose()}};Za([tt],t0.prototype,"onPointerMove",null);Za([tt],t0.prototype,"onPointerUp",null);var i0=class{constructor(t){this.el=t,this.disposables=new ne}get onPointerMove(){return this.disposables.add(new Ee(this.el,Me.Change)).event}get onPointerUp(){return this.disposables.add(new Ee(this.el,Me.End)).event}dispose(){this.disposables.dispose()}};Za([tt],i0.prototype,"onPointerMove",null);Za([tt],i0.prototype,"onPointerUp",null);var _u=class{constructor(t){this.factory=t}get onPointerMove(){return this.factory.onPointerMove}get onPointerUp(){return this.factory.onPointerUp}dispose(){}};Za([tt],_u.prototype,"onPointerMove",null);Za([tt],_u.prototype,"onPointerUp",null);var pw="pointer-events-disabled",vu=class In extends V{constructor(e,i,n){super(),this.hoverDelay=F3,this.hoverDelayer=this._register(new Ha(this.hoverDelay)),this._state=3,this.onDidEnablementChange=this._register(new M),this._onDidStart=this._register(new M),this._onDidChange=this._register(new M),this._onDidReset=this._register(new M),this._onDidEnd=this._register(new M),this.orthogonalStartSashDisposables=this._register(new ne),this.orthogonalStartDragHandleDisposables=this._register(new ne),this.orthogonalEndSashDisposables=this._register(new ne),this.orthogonalEndDragHandleDisposables=this._register(new ne),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=z(e,Q(".monaco-sash")),n.orthogonalEdge&&this.el.classList.add(`orthogonal-edge-${n.orthogonalEdge}`),fe&&this.el.classList.add("mac");const s=this._register(new Ee(this.el,"mousedown")).event;this._register(s(d=>this.onPointerStart(d,new t0),this));const r=this._register(new Ee(this.el,"dblclick")).event;this._register(r(this.onPointerDoublePress,this));const o=this._register(new Ee(this.el,"mouseenter")).event;this._register(o(()=>In.onMouseEnter(this)));const a=this._register(new Ee(this.el,"mouseleave")).event;this._register(a(()=>In.onMouseLeave(this))),this._register(ii.addTarget(this.el));const l=$.map(this._register(new Ee(this.el,Me.Start)).event,d=>{var u;return Object.assign(Object.assign({},d),{target:(u=d.initialTarget)!==null&&u!==void 0?u:null})});this._register(l(d=>this.onPointerStart(d,new i0(this.el)),this));const h=this._register(new Ee(this.el,Me.Tap)).event,c=$.map($.filter($.debounce(h,(d,u)=>{var g;return{event:u,count:((g=d?.count)!==null&&g!==void 0?g:0)+1}},250),({count:d})=>d===2),({event:d})=>{var u;return Object.assign(Object.assign({},d),{target:(u=d.initialTarget)!==null&&u!==void 0?u:null})});this._register(c(this.onPointerDoublePress,this)),typeof n.size=="number"?(this.size=n.size,n.orientation===0?this.el.style.width=`${this.size}px`:this.el.style.height=`${this.size}px`):(this.size=O3,this._register(P3.event(d=>{this.size=d,this.layout()}))),this._register(B3.event(d=>this.hoverDelay=d)),this.layoutProvider=i,this.orthogonalStartSash=n.orthogonalStartSash,this.orthogonalEndSash=n.orthogonalEndSash,this.orientation=n.orientation||0,this.orientation===1?(this.el.classList.add("horizontal"),this.el.classList.remove("vertical")):(this.el.classList.remove("horizontal"),this.el.classList.add("vertical")),this.el.classList.toggle("debug",A3),this.layout()}get state(){return this._state}get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}set state(e){this._state!==e&&(this.el.classList.toggle("disabled",e===0),this.el.classList.toggle("minimum",e===1),this.el.classList.toggle("maximum",e===2),this._state=e,this.onDidEnablementChange.fire(e))}set orthogonalStartSash(e){if(this.orthogonalStartDragHandleDisposables.clear(),this.orthogonalStartSashDisposables.clear(),e){const i=n=>{this.orthogonalStartDragHandleDisposables.clear(),n!==0&&(this._orthogonalStartDragHandle=z(this.el,Q(".orthogonal-drag-handle.start")),this.orthogonalStartDragHandleDisposables.add(Ae(()=>this._orthogonalStartDragHandle.remove())),this.orthogonalStartDragHandleDisposables.add(new Ee(this._orthogonalStartDragHandle,"mouseenter")).event(()=>In.onMouseEnter(e),void 0,this.orthogonalStartDragHandleDisposables),this.orthogonalStartDragHandleDisposables.add(new Ee(this._orthogonalStartDragHandle,"mouseleave")).event(()=>In.onMouseLeave(e),void 0,this.orthogonalStartDragHandleDisposables)
104)};this.orthogonalStartSashDisposables.add(e.onDidEnablementChange.event(i,this)),i(e.state)}this._orthogonalStartSash=e}set orthogonalEndSash(e){if(this.orthogonalEndDragHandleDisposables.clear(),this.orthogonalEndSashDisposables.clear(),e){const i=n=>{this.orthogonalEndDragHandleDisposables.clear(),n!==0&&(this._orthogonalEndDragHandle=z(this.el,Q(".orthogonal-drag-handle.end")),this.orthogonalEndDragHandleDisposables.add(Ae(()=>this._orthogonalEndDragHandle.remove())),this.orthogonalEndDragHandleDisposables.add(new Ee(this._orthogonalEndDragHandle,"mouseenter")).event(()=>In.onMouseEnter(e),void 0,this.orthogonalEndDragHandleDisposables),this.orthogonalEndDragHandleDisposables.add(new Ee(this._orthogonalEndDragHandle,"mouseleave")).event(()=>In.onMouseLeave(e),void 0,this.orthogonalEndDragHandleDisposables))};this.orthogonalEndSashDisposables.add(e.onDidEnablementChange.event(i,this)),i(e.state)}this._orthogonalEndSash=e}onPointerStart(e,i){ye.stop(e);let n=!1;if(!e.__orthogonalSashEvent){const m=this.getOrthogonalSash(e);m&&(n=!0,e.__orthogonalSashEvent=!0,m.onPointerStart(e,new _u(i)))}if(this.linkedSash&&!e.__linkedSashEvent&&(e.__linkedSashEvent=!0,this.linkedSash.onPointerStart(e,new _u(i))),!this.state)return;const s=EM("iframe");for(const m of s)m.classList.add(pw);const r=e.pageX,o=e.pageY,a=e.altKey,l={startX:r,currentX:r,startY:o,currentY:o,altKey:a};this.el.classList.add("active"),this._onDidStart.fire(l);const h=Yi(this.el),c=()=>{let m="";n?m="all-scroll":this.orientation===1?this.state===1?m="s-resize":this.state===2?m="n-resize":m=fe?"row-resize":"ns-resize":this.state===1?m="e-resize":this.state===2?m="w-resize":m=fe?"col-resize":"ew-resize",h.textContent=`* { cursor: ${m} !important; }`},d=new ne;c(),n||this.onDidEnablementChange.event(c,null,d);const u=m=>{ye.stop(m,!1);const _={startX:r,currentX:m.pageX,startY:o,currentY:m.pageY,altKey:a};this._onDidChange.fire(_)},g=m=>{ye.stop(m,!1),this.el.removeChild(h),this.el.classList.remove("active"),this._onDidEnd.fire(),d.dispose();for(const _ of s)_.classList.remove(pw)};i.onPointerMove(u,null,d),i.onPointerUp(g,null,d),d.add(i)}onPointerDoublePress(e){const i=this.getOrthogonalSash(e);i&&i._onDidReset.fire(),this.linkedSash&&this.linkedSash._onDidReset.fire(),this._onDidReset.fire()}static onMouseEnter(e,i=!1){e.el.classList.contains("active")?(e.hoverDelayer.cancel(),e.el.classList.add("hover")):e.hoverDelayer.trigger(()=>e.el.classList.add("hover"),e.hoverDelay).then(void 0,()=>{}),!i&&e.linkedSash&&In.onMouseEnter(e.linkedSash,!0)}static onMouseLeave(e,i=!1){e.hoverDelayer.cancel(),e.el.classList.remove("hover"),!i&&e.linkedSash&&In.onMouseLeave(e.linkedSash,!0)}clearSashHoverState(){In.onMouseLeave(this)}layout(){if(this.orientation===0){const e=this.layoutProvider;this.el.style.left=e.getVerticalSashLeft(this)-this.size/2+"px",e.getVerticalSashTop&&(this.el.style.top=e.getVerticalSashTop(this)+"px"),e.getVerticalSashHeight&&(this.el.style.height=e.getVerticalSashHeight(this)+"px")}else{const e=this.layoutProvider;this.el.style.top=e.getHorizontalSashTop(this)-this.size/2+"px",e.getHorizontalSashLeft&&(this.el.style.left=e.getHorizontalSashLeft(this)+"px"),e.getHorizontalSashWidth&&(this.el.style.width=e.getHorizontalSashWidth(this)+"px")}}getOrthogonalSash(e){if(!(!e.target||!(e.target instanceof HTMLElement))&&e.target.classList.contains("orthogonal-drag-handle"))return e.target.classList.contains("start")?this.orthogonalStartSash:this.orthogonalEndSash}dispose(){super.dispose(),this.el.remove()}},V3=class Px{constructor(e,i,n){this._visiblePosition=e,this._visiblePositionScrollDelta=i,this._cursorPosition=n}static capture(e){let i=null,n=0;if(e.getScrollTop()!==0){const s=e.getVisibleRanges();if(s.length>0){i=s[0].getStartPosition();const r=e.getTopForPosition(i.lineNumber,i.column);n=e.getScrollTop()-r}}return new Px(i,n,e.getPosition())}restore(e){if(this._visiblePosition){const i=e.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);e.setScrollTop(i+this._visiblePositionScrollDelta)}}restoreRelativeVerticalPositionOfCursor(e){const i=e.getPosition();if(!this._cursorPosition||!i)return;const n=e.getTopForLineNumber(i.lineNumber)-e.getTopForLineNumber(this._cursorPosition.lineNumber);e.setScrollTop(e.getScrollTop()+n)}},Fx={RESOURCES:"ResourceURLs",DOWNLOAD_URL:"DownloadURL",FILES:"Files",TEXT:dn.text,TERMINALS:"Terminals"},W3=class{constructor(t){this.data=t}update(){}getData(){return this.data}},as={CurrentDragAndDropData:void 0},Ps=class extends V{constructor(t,e,i={}){super(),this.options=i,this._context=t||this,this._action=e,e instanceof An&&this._register(e.onDidChange(n=>{this.element&&this.handleActionChangeEvent(n)}))}handleActionChangeEvent(t){t.enabled!==void 0&&this.updateEnabled(),t.checked!==void 0&&this.updateChecked(),t.class!==void 0&&this.updateClass(),t.label!==void 0&&(this.updateLabel(),this.updateTooltip()),t.tooltip!==void 0&&this.updateTooltip()}get actionRunner(){return this._actionRunner||(this._actionRunner=this._register(new Mv)),this._actionRunner}set actionRunner(t){this._actionRunner=t}getAction(){return this._action}isEnabled(){return this._action.enabled}setActionContext(t){this._context=t}render(t){const e=this.element=t;this._register(ii.addTarget(t));const i=this.options&&this.options.draggable;i&&(t.draggable=!0,Ii&&this._register(B(t,Z.DRAG_START,n=>{var s;return(s=n.dataTransfer)===null||s===void 0?void 0:s.setData(Fx.TEXT,this._action.label)}))),this._register(B(e,Me.Tap,n=>this.onClick(n,!0))),this._register(B(e,Z.MOUSE_DOWN,n=>{i||ye.stop(n,!0),this._action.enabled&&n.button===0&&e.classList.add("active")})),fe&&this._register(B(e,Z.CONTEXT_MENU,n=>{n.button===0&&n.ctrlKey===!0&&this.onClick(n)})),this._register(B(e,Z.CLICK,n=>{ye.stop(n,!0),this.options&&this.options.isMenu||this.onClick(n)})),this._register(B(e,Z.DBLCLICK,n=>{ye.stop(n,!0)})),[Z.MOUSE_UP,Z.MOUSE_OUT].forEach(n=>{this._register(B(e,n,s=>{ye.stop(s),e.classList.remove("active")}))})}onClick(t,e=!1){var i;ye.stop(t,!0);const n=zi(this._context)?!((i=this.options)===null||i===void 0)&&i.useEventAsContext?t:{preserveFocus:e}:this._context;this.actionRunner.run(this._action,n)}focus(){this.element&&(this.element.tabIndex=0,this.element.focus(),this.element.classList.add("focused"))}blur(){this.element&&(this.element.blur(),this.element.tabIndex=-1,this.element.classList.remove("focused"))}setFocusable(t){this.element&&(this.element.tabIndex=t?0:-1)}get trapsArrowNavigation(){return!1}updateEnabled(){}updateLabel(){}updateTooltip(){}updateClass(){}updateChecked(){}dispose(){this.element&&(this.element.remove(),this.element=void 0),super.dispose()}},Bx=class extends Ps{constructor(t,e,i={}){super(t,e,i),this.options=i,this.options.icon=i.icon!==void 0?i.icon:!1,this.options.label=i.label!==void 0?i.label:!0,this.cssClass=""}render(t){super.render(t),this.element&&(this.label=z(this.element,Q("a.action-label"))),this.label&&(this._action.id===Ah.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&&(z(this.element,Q("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(t){this.label&&(this.label.tabIndex=t?0:-1)}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this.getAction().label)}updateTooltip(){let t=null;this.getAction().tooltip?t=this.getAction().tooltip:!this.options.label&&this.getAction().label&&this.options.icon&&(t=this.getAction().label,this.options.keybinding&&(t=p({key:"titleLabel",comment:["action title","action keybinding"]},"{0} ({1})",t,this.options.keybinding))),t&&this.label&&(this.label.title=t)}updateClass(){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()):this.label&&this.label.classList.remove("codicon")}updateEnabled(){this.getAction().enabled?(this.label&&(this.label.removeAttribute("aria-disabled"),this.label.classList.remove("disabled")),this.element&&this.element.classList.remove("disabled")):(this.label&&(this.label.setAttribute("aria-disabled","true"),this.label.classList.add("disabled")),this.element&&this.element.classList.add("disabled"))}updateChecked(){this.label&&(this.getAction().checked?this.label.classList.add("checked"):this.label.classList.remove("checked"))}}
104,H3=function(t,e,i,n){function s(r){return r instanceof i?r:new i(function(o){o(r)})}return new(i||(i=Promise))(function(r,o){function a(c){try{h(n.next(c))}catch(d){o(d)}}function l(c){try{h(n.throw(c))}catch(d){o(d)}}function h(c){c.done?r(c.value):s(c.value).then(a,l)}h((n=n.apply(t,e||[])).next())})},Ma=class extends V{constructor(t,e={}){var i,n,s,r,o,a;super(),this.triggerKeyDown=!1,this.focusable=!0,this._onDidBlur=this._register(new M),this.onDidBlur=this._onDidBlur.event,this._onDidCancel=this._register(new M({onFirstListenerAdd:()=>this.cancelHasListener=!0})),this.onDidCancel=this._onDidCancel.event,this.cancelHasListener=!1,this._onDidRun=this._register(new M),this.onDidRun=this._onDidRun.event,this._onBeforeRun=this._register(new M),this.onBeforeRun=this._onBeforeRun.event,this.options=e,this._context=(i=e.context)!==null&&i!==void 0?i:null,this._orientation=(n=this.options.orientation)!==null&&n!==void 0?n:0,this._triggerKeys={keyDown:(r=(s=this.options.triggerKeys)===null||s===void 0?void 0:s.keyDown)!==null&&r!==void 0?r:!1,keys:(a=(o=this.options.triggerKeys)===null||o===void 0?void 0:o.keys)!==null&&a!==void 0?a:[3,10]},this.options.actionRunner?this._actionRunner=this.options.actionRunner:(this._actionRunner=new Mv,this._register(this._actionRunner)),this._register(this._actionRunner.onDidRun(c=>this._onDidRun.fire(c))),this._register(this._actionRunner.onBeforeRun(c=>this._onBeforeRun.fire(c))),this._actionIds=[],this.viewItems=[],this.focusedItem=void 0,this.domNode=document.createElement("div"),this.domNode.className="monaco-action-bar",e.animated!==!1&&this.domNode.classList.add("animated");let l,h;switch(this._orientation){case 0:l=[15],h=[17];break;case 1:l=[16],h=[18],this.domNode.className+=" vertical"}this._register(B(this.domNode,Z.KEY_DOWN,c=>{const d=new Pe(c);let u=!0;const g=typeof this.focusedItem=="number"?this.viewItems[this.focusedItem]:void 0;l&&(d.equals(l[0])||d.equals(l[1]))?u=this.focusPrevious():h&&(d.equals(h[0])||d.equals(h[1]))?u=this.focusNext():d.equals(9)&&this.cancelHasListener?this._onDidCancel.fire():d.equals(14)?u=this.focusFirst():d.equals(13)?u=this.focusLast():d.equals(2)&&g instanceof Ps&&g.trapsArrowNavigation?u=this.focusNext():this.isTriggerKeyEvent(d)?this._triggerKeys.keyDown?this.doTrigger(d):this.triggerKeyDown=!0:u=!1,u&&(d.preventDefault(),d.stopPropagation())})),this._register(B(this.domNode,Z.KEY_UP,c=>{const d=new Pe(c);this.isTriggerKeyEvent(d)?(!this._triggerKeys.keyDown&&this.triggerKeyDown&&(this.triggerKeyDown=!1,this.doTrigger(d)),d.preventDefault(),d.stopPropagation()):(d.equals(2)||d.equals(1026))&&this.updateFocusedItem()})),this.focusTracker=this._register(xa(this.domNode)),this._register(this.focusTracker.onDidBlur(()=>{(sa()===this.domNode||!_s(sa(),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","toolbar"),this.options.ariaLabel&&this.actionsList.setAttribute("aria-label",this.options.ariaLabel),this.domNode.appendChild(this.actionsList),t.appendChild(this.domNode)}refreshRole(){this.length()>=2?this.actionsList.setAttribute("role","toolbar"):this.actionsList.setAttribute("role","presentation")}setFocusable(t){if(this.focusable=t,this.focusable){const e=this.viewItems.find(i=>i instanceof Ps&&i.isEnabled());e instanceof Ps&&e.setFocusable(!0)}else this.viewItems.forEach(e=>{e instanceof Ps&&e.setFocusable(!1)})}isTriggerKeyEvent(t){let e=!1;return this._triggerKeys.keys.forEach(i=>{e=e||t.equals(i)}),e}updateFocusedItem(){for(let t=0;t<this.actionsList.children.length;t++){const e=this.actionsList.children[t];if(_s(sa(),e)){this.focusedItem=t;break}}}get context(){return this._context}set context(t){this._context=t,this.viewItems.forEach(e=>e.setActionContext(t))}get actionRunner(){return this._actionRunner}set actionRunner(t){t&&(this._actionRunner=t,this.viewItems.forEac
104h(e=>e.actionRunner=t))}getContainer(){return this.domNode}push(t,e={}){const i=Array.isArray(t)?t:[t];let n=Lh(e.index)?e.index:null;i.forEach(s=>{const r=document.createElement("li");r.className="action-item",r.setAttribute("role","presentation"),this.options.allowContextMenu||this._register(B(r,Z.CONTEXT_MENU,a=>{ye.stop(a,!0)}));let o;this.options.actionViewItemProvider&&(o=this.options.actionViewItemProvider(s)),o||(o=new Bx(this.context,s,e)),o.actionRunner=this._actionRunner,o.setActionContext(this.context),o.render(r),this.focusable&&o instanceof Ps&&this.viewItems.length===0&&o.setFocusable(!0),n===null||n<0||n>=this.actionsList.children.length?(this.actionsList.appendChild(r),this.viewItems.push(o),this._actionIds.push(s.id)):(this.actionsList.insertBefore(r,this.actionsList.children[n]),this.viewItems.splice(n,0,o),this._actionIds.splice(n,0,s.id),n++)}),typeof this.focusedItem=="number"&&this.focus(this.focusedItem),this.refreshRole()}clear(){De(this.viewItems),this.viewItems=[],this._actionIds=[],Ei(this.actionsList),this.refreshRole()}length(){return this.viewItems.length}focus(t){let e=!1,i;if(t===void 0?e=!0:typeof t=="number"?i=t:typeof t=="boolean"&&(e=t),e&&typeof this.focusedItem>"u"){const n=this.viewItems.findIndex(s=>s.isEnabled());this.focusedItem=n===-1?void 0:n,this.updateFocus(void 0,void 0,!0)}else i!==void 0&&(this.focusedItem=i),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(t){if(typeof this.focusedItem>"u")this.focusedItem=this.viewItems.length-1;else if(this.viewItems.length<=1)return!1;const e=this.focusedItem;let i;do{if(!t&&this.options.preventLoopNavigation&&this.focusedItem+1>=this.viewItems.length)return this.focusedItem=e,!1;this.focusedItem=(this.focusedItem+1)%this.viewItems.length,i=this.viewItems[this.focusedItem]}while(this.focusedItem!==e&&this.options.focusOnlyEnabledItems&&!i.isEnabled());return this.updateFocus(),!0}focusPrevious(t){if(typeof this.focusedItem>"u")this.focusedItem=0;else if(this.viewItems.length<=1)return!1;const e=this.focusedItem;let i;do{if(this.focusedItem=this.focusedItem-1,this.focusedItem<0){if(!t&&this.options.preventLoopNavigation)return this.focusedItem=e,!1;this.focusedItem=this.viewItems.length-1}i=this.viewItems[this.focusedItem]}while(this.focusedItem!==e&&this.options.focusOnlyEnabledItems&&!i.isEnabled());return this.updateFocus(!0),!0}updateFocus(t,e,i=!1){var n;typeof this.focusedItem>"u"&&this.actionsList.focus({preventScroll:e}),this.previouslyFocusedItem!==void 0&&this.previouslyFocusedItem!==this.focusedItem&&((n=this.viewItems[this.previouslyFocusedItem])===null||n===void 0||n.blur());const s=this.focusedItem!==void 0&&this.viewItems[this.focusedItem];if(s){let r=!0;Ad(s.focus)||(r=!1),this.options.focusOnlyEnabledItems&&Ad(s.isEnabled)&&!s.isEnabled()&&(r=!1),r?(i||this.previouslyFocusedItem!==this.focusedItem)&&(s.focus(t),this.previouslyFocusedItem=this.focusedItem):(this.actionsList.focus({preventScroll:e}),this.previouslyFocusedItem=void 0)}}doTrigger(t){if(typeof this.focusedItem>"u")return;const e=this.viewItems[this.focusedItem];if(e instanceof Ps){const i=e._context===null||e._context===void 0?t:e._context;this.run(e._action,i)}}run(t,e){return H3(this,void 0,void 0,function*(){yield this._actionRunner.run(t,e)})}dispose(){De(this.viewItems),this.viewItems=[],this._actionIds=[],this.getContainer().remove(),super.dispose()}},z3={IconContribution:"base.contributions.icons"},_w;(function(t){function e(i,n){let s=i.defaults;for(;ft.isThemeIcon(s);){const r=po.getIcon(s.id);if(!r)return;s=r.defaults}return s}t.getDefinition=e})(_w||(_w={}));var U3=class{constructor(){this._onDidChange=new M,this.onDidChange=this._onDidChange.event,this.iconSchema={definitions:{icons:{type:"object",properties:{fontId:{type:"string",description:p("iconDefinition.fontId","The id of the font to use. If not set, the font that is defined first is used.")},fontCharacter:{type:"string",description:p("iconDefinition.fontCharacter","The font character associated with the icon definition.")}},additionalProperties:!1,defaultSnippets:[{body:{fontCharacter:"\\\\e
104030"}}]}},type:"object",properties:{}},this.iconReferenceSchema={type:"string",pattern:`^${qt.iconNameExpression}$`,enum:[],enumDescriptions:[]},this.iconsById={},this.iconFontsById={}}registerIcon(t,e,i,n){const s=this.iconsById[t];if(s){if(i&&!s.description){s.description=i,this.iconSchema.properties[t].markdownDescription=`${i} $(${t})`;const a=this.iconReferenceSchema.enum.indexOf(t);a!==-1&&(this.iconReferenceSchema.enumDescriptions[a]=i),this._onDidChange.fire()}return s}let r={id:t,description:i,defaults:e,deprecationMessage:n};this.iconsById[t]=r;let o={$ref:"#/definitions/icons"};return n&&(o.deprecationMessage=n),i&&(o.markdownDescription=`${i}: $(${t})`),this.iconSchema.properties[t]=o,this.iconReferenceSchema.enum.push(t),this.iconReferenceSchema.enumDescriptions.push(i||""),this._onDidChange.fire(),{id:t}}getIcons(){return Object.keys(this.iconsById).map(t=>this.iconsById[t])}getIcon(t){return this.iconsById[t]}getIconSchema(){return this.iconSchema}toString(){const t=(s,r)=>s.id.localeCompare(r.id),e=s=>{for(;ft.isThemeIcon(s.defaults);)s=this.iconsById[s.defaults.id];return`codicon codicon-${s?s.id:""}`};let i=[];i.push("| preview     | identifier                        | default codicon ID                | description"),i.push("| ----------- | --------------------------------- | --------------------------------- | --------------------------------- |");const n=Object.keys(this.iconsById).map(s=>this.iconsById[s]);for(const s of n.filter(r=>!!r.description).sort(t))i.push(`|<i class="${e(s)}"></i>|${s.id}|${ft.isThemeIcon(s.defaults)?s.defaults.id:s.id}|${s.description||""}|`);i.push("| preview     | identifier                        "),i.push("| ----------- | --------------------------------- |");for(const s of n.filter(r=>!ft.isThemeIcon(r.defaults)).sort(t))i.push(`|<i class="${e(s)}"></i>|${s.id}|`);return i.join(`
105`)}},po=new U3;vt.add(z3.IconContribution,po);function ni(t,e,i,n){return po.registerIcon(t,e,i,n)}function Vx(){return po}function $3(){for(const t of f.getAll())po.registerIcon(t.id,t.definition,t.description)}$3();var Wx="vscode://schemas/icons",Hx=vt.as(ef.JSONContribution);Hx.registerSchema(Wx,po.getIconSchema());var vw=new _t(()=>Hx.notifySchemaChanged(Wx),200);po.onDidChange(()=>{vw.isScheduled()||vw.schedule()});var K3=ni("widget-close",f.close,p("widgetClose","Icon for the close action in widgets.")),E$=ni("goto-previous-location",f.arrowUp,p("previousChangeIcon","Icon for goto previous editor location.")),D$=ni("goto-next-location",f.arrowDown,p("nextChangeIcon","Icon for goto next editor location.")),N$=ft.modify(f.sync,"spin"),T$=ft.modify(f.loading,"spin"),j3=function(t,e,i,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r},q3=function(t,e){return function(i,n){e(i,n,t)}},G3=function(t,e,i,n){function s(r){return r instanceof i?r:new i(function(o){o(r)})}return new(i||(i=Promise))(function(r,o){function a(c){try{h(n.next(c))}catch(d){o(d)}}function l(c){try{h(n.throw(c))}catch(d){o(d)}}function h(c){c.done?r(c.value):s(c.value).then(a,l)}h((n=n.apply(t,e||[])).next())})},kg,bc=3,gl=class{constructor(t,e,i,n){this.originalLineStart=t,this.originalLineEnd=e,this.modifiedLineStart=i,this.modifiedLineEnd=n}getType(){return this.originalLineStart===0?1:this.modifiedLineStart===0?2:0}},xg=class{constructor(t){this.entries=t}},Z3=ni("diff-review-insert",f.add,p("diffReviewInsertIcon","Icon for 'Insert' in diff review.")),Y3=ni("diff-review-remove",f.remove,p("diffReviewRemoveIcon","Icon for 'Remove' in diff review.")),X3=ni("diff-review-close",f.close,p("diffReviewCloseIcon","Icon for 'Close' in diff review.")),Cu=class Er extends V{constructor(e,i){super(),this._languageService=i,this._width=0,this._diffEditor=e,this._isVisible=!1,this.shadow=de(document.createElement("div")),this.shadow.setClassName("diff-review-shadow"),this.actionBarContainer=de(document.createElement("div")),this.actionBarContainer.setClassName("diff-review-actions"),this._actionBar=this._register(new Ma(this.actionBarContainer.domNode)),this._actionBar.push(new An("diffreview.close",p("label.close","Close"),"close-diff-review "+ft.asClassName(X3),!0,()=>G3(this,void 0,void 0,function*(){return this.hide()})),{label:!1,icon:!0}),this.domNode=de(document.createElement("div")),this.domNode.setClassName("diff-review monaco-editor-background"),this._content=de(document.createElement("div")),this._content.setClassName("diff-review-content"),this._content.setAttribute("role","code"),this.scrollbar=this._register(new Uk(this._content.domNode,{})),this.domNode.domNode.appendChild(this.scrollbar.getDomNode()),this._register(e.onDidUpdateDiff(()=>{this._isVisible&&(this._diffs=this._compute(),this._render())})),this._register(e.getModifiedEditor().onDidChangeCursorPosition(()=>{this._isVisible&&this._render()})),this._register(gi(this.domNode.domNode,"click",n=>{n.preventDefault();const s=jL(n.target,"diff-review-row");s&&this._goToRow(s)})),this._register(gi(this.domNode.domNode,"keydown",n=>{(n.equals(18)||n.equals(2066)||n.equals(530))&&(n.preventDefault(),this._goToRow(this._getNextRow())),(n.equals(16)||n.equals(2064)||n.equals(528))&&(n.preventDefault(),this._goToRow(this._getPrevRow())),(n.equals(9)||n.equals(2057)||n.equals(521)||n.equals(1033))&&(n.preventDefault(),this.hide()),(n.equals(10)||n.equals(3))&&(n.preventDefault(),this.accept())})),this._diffs=[],this._currentDiff=null}prev(){let e=0;if(this._isVisible||(this._diffs=this._compute()),this._isVisible){let n=-1;for(let s=0,r=this._diffs.length;s<r;s++)if(this._diffs[s]===this._currentDiff){n=s;break}e=this._diffs.length+n-1}else e=this._findDiffIndex(this._diffEditor.getPosition());if(this._diffs.length===0)return;e=e%this._diffs.length;const i=this._diffs[e].entries;this._diffEditor.setPosition(new A(i[0].modifiedLineStart,1)),this._diffEditor.setSelection({startColumn:1,startLineNumber:i[0].modifiedLineStart,endColumn:1073741824,endLineNumber:i[i.length-1].modifiedLineEnd}),this._isVisible=!0,this._diffEditor.doLayout(),this._render(),this._goToRow(this._getNextRow())}next(){let e=0;if(this._isVisible||(this._diffs=this._compute()),this._isVisible){let n=-1;for(let s=0,r=this._diffs.length;s<r;s++)if(this._diffs[s]===this._currentDiff){n=s;break}e=n+1}else e=this._findDiffIndex(this._diffEditor.getPosition());if(this._diffs.length===0)return;e=e%this._diffs.length;const i=this._diffs[e].entries;this._diffEditor.setPosition(new A(i[0].modifiedLineStart,1)),this._diffEditor.setSelection({startColumn:1,startLineNumber:i[0].modifiedLineStart,endColumn:1073741824,endLineNumber:i[i.length-1].modifiedLineEnd}),this._isVisible=!0,this._diffEditor.doLayout(),this._render(),this._goToRow(this._getNextRow())}accept(){let e=-1;const i=this._getCurrentFocusedRow();if(i){const n=parseInt(i.getAttribute("data-line"),10);isNaN(n)||(e=n)}this.hide(),e!==-1&&(this._diffEditor.setPosition(new A(e,1)),this._diffEditor.revealPosition(new A(e,1),1))}hide(){this._isVisible=!1,this._diffEditor.updateOptions({readOnly:!1}),this._diffEditor.focus(),this._diffEditor.doLayout(),this._render()}_getPrevRow(){const e=this._getCurrentFocusedRow();return e?e.previousElementSibling?e.previousElementSibling:e:this._getFirstRow()}_getNextRow(){const e=this._getCurrentFocusedRow();return e?e.nextElementSibling?e.nextElementSibling:e:this._getFirstRow()}_getFirstRow(){return this.domNode.domNode.querySelector(".diff-review-row")}_getCurrentFocusedRow(){const e=document.activeElement;return e&&/diff-review-row/.test(e.className)?e:null}_goToRow(e){const i=this._getCurrentFocusedRow();e.tabIndex=0,e.focus(),i&&i!==e&&(i.tabIndex=-1),this.scrollbar.scanDomNode()}isVisible(){return this._isVisible}layout(e,i,n){this._width=i,this.shadow.setTop(e-6),this.shadow.setWidth(i),this.shadow.setHeight(this._isVisible?6:0),this.domNode.setTop(e),this.domNode.setWidth(i),this.domNode.setHeight(n),this._content.setHeight(n),this._content.setWidth(i),this._isVisible?(this.actionBarContainer.setAttribute("aria-hidden","false"),this.actionBarContainer.setDisplay("block")):(this.actionBarContainer.setAttribute("aria-hidden","true"),this.actionBarContainer.setDisplay("none"))}_compute(){const e=this._diffEditor.getLineChanges();if(!e||e.length===0)return[];const i=this._diffEditor.getOriginalEditor().getModel(),n=this._diffEditor.getModifiedEditor().getModel();return!i||!n?[]:Er._mergeAdjacent(e,i.getLineCount(),n.getLineCount())}static _mergeAdjacent(e,i,n){if(!e||e.length===0)return[];const s=[];let r=0;for(let h=0,c=e.length;h<c;h++){const d=e[h],u=d.originalStartLineNumber,g=d.originalEndLineNumber,m=d.modifiedStartLineNumber,_=d.modifiedEndLineNumber,C=[];let w=0;{const v=g===0?u:u-1,b=_===0?m:m-1;let y=1,k=1;if(h>0){const x=e[h-1];x.originalEndLineNumber===0?y=x.originalStartLineNumber+1:y=x.originalEndLineNumber+1,x.modifiedEndLineNumber===0?k=x.modifiedStartLineNumber+1:k=x.modifiedEndLineNumber+1}let S=v-bc+1,L=b-bc+1;if(S<y){const x=y-S;S=S+x,L=L+x}if(L<k){const x=k-L;S=S+x,L=L+x}C[w++]=new gl(S,v,L,b)}g!==0&&(C[w++]=new gl(u,g,0,0)),_!==0&&(C[w++]=new gl(0,0,m,_));{const v=g===0?u+1:g+1,b=_===0?m+1:_+1;let y=i,k=n;if(h+1<c){const x=e[h+1];x.originalEndLineNumber===0?y=x.originalStartLineNumber:y=x.originalStartLineNumber-1,x.modifiedEndLineNumber===0?k=x.modifiedStartLineNumber:k=x.modifiedStartLineNumber-1}let S=v+bc-1,L=b+bc-1;if(S>y){const x=y-S;S=S+x,L=L+x}if(L>k){const x=k-L;S=S+x,L=L+x}C[w++]=new gl(v,S,b,L)}s[r++]=new xg(C)}let o=s[0].entries;const a=[];let l=0;for(let h=1,c=s.length;h<c;
105h++){const d=s[h].entries,u=o[o.length-1],g=d[0];if(u.getType()===0&&g.getType()===0&&g.originalLineStart<=u.originalLineEnd){o[o.length-1]=new gl(u.originalLineStart,g.originalLineEnd,u.modifiedLineStart,g.modifiedLineEnd),o=o.concat(d.slice(1));continue}a[l++]=new xg(o),o=d}return a[l++]=new xg(o),a}_findDiffIndex(e){const i=e.lineNumber;for(let n=0,s=this._diffs.length;n<s;n++){const r=this._diffs[n].entries;if(i<=r[r.length-1].modifiedLineEnd)return n}return 0}_render(){const e=this._diffEditor.getOriginalEditor().getOptions(),i=this._diffEditor.getModifiedEditor().getOptions(),n=this._diffEditor.getOriginalEditor().getModel(),s=this._diffEditor.getModifiedEditor().getModel(),r=n.getOptions(),o=s.getOptions();if(!this._isVisible||!n||!s){Ei(this._content.domNode),this._currentDiff=null,this.scrollbar.scanDomNode();return}this._diffEditor.updateOptions({readOnly:!0});const a=this._findDiffIndex(this._diffEditor.getPosition());if(this._diffs[a]===this._currentDiff)return;this._currentDiff=this._diffs[a];const l=this._diffs[a].entries,h=document.createElement("div");h.className="diff-review-table",h.setAttribute("role","list"),h.setAttribute("aria-label",'Difference review. Use "Stage | Unstage | Revert Selected Ranges" commands'),Zt(h,i.get(44));let c=0,d=0,u=0,g=0;for(let L=0,x=l.length;L<x;L++){const E=l[L],R=E.originalLineStart,D=E.originalLineEnd,W=E.modifiedLineStart,P=E.modifiedLineEnd;R!==0&&(c===0||R<c)&&(c=R),D!==0&&(d===0||D>d)&&(d=D),W!==0&&(u===0||W<u)&&(u=W),P!==0&&(g===0||P>g)&&(g=P)}const m=document.createElement("div");m.className="diff-review-row";const _=document.createElement("div");_.className="diff-review-cell diff-review-summary";const C=d-c+1,w=g-u+1;_.appendChild(document.createTextNode(`${a+1}/${this._diffs.length}: @@ -${c},${C} +${u},${w} @@`)),m.setAttribute("data-line",String(u));const v=L=>L===0?p("no_lines_changed","no lines changed"):L===1?p("one_line_changed","1 line changed"):p("more_lines_changed","{0} lines changed",L),b=v(C),y=v(w);m.setAttribute("aria-label",p({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}",a+1,this._diffs.length,c,b,u,y)),m.appendChild(_),m.setAttribute("role","listitem"),h.appendChild(m);const k=i.get(59);let S=u;for(let L=0,x=l.length;L<x;L++){const E=l[L];Er._renderSection(h,E,S,k,this._width,e,n,r,i,s,o,this._languageService.languageIdCodec),E.modifiedLineStart!==0&&(S=E.modifiedLineEnd)}Ei(this._content.domNode),this._content.domNode.appendChild(h),this.scrollbar.scanDomNode()}static _renderSection(e,i,n,s,r,o,a,l,h,c,d,u){const g=i.getType();let m="diff-review-row",_="";const C="diff-review-spacer";let w=null;switch(g){case 1:m="diff-review-row line-insert",_=" char-insert",w=Z3;break;case 2:m="diff-review-row line-delete",_=" char-delete",w=Y3}const v=i.originalLineStart,b=i.originalLineEnd,y=i.modifiedLineStart,k=i.modifiedLineEnd,S=Math.max(k-y,b-v),L=o.get(131),x=L.glyphMarginWidth+L.lineNumbersWidth,E=h.get(131),R=10+E.glyphMarginWidth+E.lineNumbersWidth;for(let D=0;D<=S;D++){const W=v===0?0:v+D,P=y===0?0:y+D,K=document.createElement("div");K.style.minWidth=r+"px",K.className=m,K.setAttribute("role","listitem"),P!==0&&(n=P),K.setAttribute("data-line",String(n));const j=document.createElement("div");j.className="diff-review-cell",j.style.height=`${s}px`,K.appendChild(j);const ie=document.createElement("span");ie.style.width=x+"px",ie.style.minWidth=x+"px",ie.className="diff-review-line-number"+_,W!==0?ie.appendChild(document.createTextNode(String(W))):ie.innerText=" ",j.appendChild(ie);const J=document.createElement("span");J.style.width=R+"px",J.style.minWidth=R+"px",J.style.paddingRight="10px",J.className="diff-review-line-number"+_,P!==0?J.appendChild(document.createTextNode(String(P))):J.innerText=" ",j.appendChild(J);const ae=document.createElement("span");if(ae.className=C,w){const He=document.createElement("span");He.className=ft.asClassName(w),He.innerText="  ",ae.appendChild(He)}else ae.innerText="  ";j.appendChild(ae);let le;if(P!==0){let He=this._renderLine(c,h,d.tabSize,P,u);Er._ttPolicy&&(He=Er._ttPolicy.createHTML(He)),j.insertAdjacentHTML("beforeend",He),le=c.getLineContent(P)}else{let He=this._renderLine(a,o,l.tabSize,W,u);Er._ttPolicy&&(He=Er._ttPolicy.createHTML(He)),j.insertAdjacentHTML("beforeend",He),le=a.getLineContent(W)}le.length===0&&(le=p("blankLine","blank"));let Ue="";switch(g){case 0:W===P?Ue=p({key:"unchangedLine",comment:["The placeholders are contents of the line and should not be translated."]},"{0} unchanged line {1}",le,W):Ue=p("equalLine","{0} original line {1} modified line {2}",le,W,P);break;
105case 1:Ue=p("insertLine","+ {0} modified line {1}",le,P);break;case 2:Ue=p("deleteLine","- {0} original line {1}",le,W)}K.setAttribute("aria-label",Ue),e.appendChild(K)}}static _renderLine(e,i,n,s,r){const o=e.getLineContent(s),a=i.get(44),l=mi.createEmpty(o,r),h=vn.isBasicASCII(o,e.mightContainNonBasicASCII()),c=vn.containsRTL(o,h,e.mightContainRTL());return qu(new za(a.isMonospace&&!i.get(29),a.canUseHalfwidthRightwardsArrow,o,!1,h,c,0,l,[],n,0,a.spaceWidth,a.middotWidth,a.wsmiddotWidth,i.get(105),i.get(88),i.get(83),i.get(45)!==ho.OFF,null)).html}};Cu._ttPolicy=(kg=window.trustedTypes)===null||kg===void 0?void 0:kg.createPolicy("diffReview",{createHTML:t=>t});Cu=j3([q3(1,Nt)],Cu);Yt((t,e)=>{const i=t.getColor(Sk);i&&e.addRule(`.monaco-diff-editor .diff-review-line-number { color: ${i}; }`);const n=t.getColor($a);n&&e.addRule(`.monaco-diff-editor .diff-review-shadow { box-shadow: ${n} 0 -6px 6px -6px inset; }`)});var Q3=class extends go{constructor(){super({id:"editor.action.diffReview.next",label:p("editor.action.diffReview.next","Go to Next Difference"),alias:"Go to Next Difference",precondition:Re.has("isInDiffEditor"),kbOpts:{kbExpr:null,primary:65,weight:100}})}run(t,e){const i=zx(t);
105i&&i.diffReviewNext()}},J3=class extends go{constructor(){super({id:"editor.action.diffReview.prev",label:p("editor.action.diffReview.prev","Go to Previous Difference"),alias:"Go to Previous Difference",precondition:Re.has("isInDiffEditor"),kbOpts:{kbExpr:null,primary:1089,weight:100}})}run(t,e){const i=zx(t);i&&i.diffReviewPrev()}};function zx(t){const e=t.get(pt),i=e.listDiffEditors(),n=e.getActiveCodeEditor();if(!n)return null;for(let s=0,r=i.length;s<r;s++){const o=i[s];if(o.getModifiedEditor().getId()===n.getId()||o.getOriginalEditor().getId()===n.getId())return o}return null}dr(Q3);dr(J3);var e8="editorWorkerService",Ya=ge(e8),af=ge("contextViewService"),n0=ge("contextMenuService"),Ig=function(t,e,i,n){function s(r){return r instanceof i?r:new i(function(o){o(r)})}return new(i||(i=Promise))(function(r,o){function a(c){try{h(n.next(c))}catch(d){o(d)}}function l(c){try{h(n.throw(c))}catch(d){o(d)}}function h(c){c.done?r(c.value):s(c.value).then(a,l)}h((n=n.apply(t,e||[])).next())})},t8=class extends V{constructor(t,e,i,n,s,r){super(),this._viewZoneId=t,this._marginDomNode=e,this.editor=i,this.diff=n,this._contextMenuService=s,this._clipboardService=r,this._visibility=!1,this._marginDomNode.style.zIndex="10",this._diffActions=document.createElement("div"),this._diffActions.className=f.lightBulb.classNames+" lightbulb-glyph",this._diffActions.style.position="absolute";const o=i.getOption(59),a=i.getModel().getEOL();this._diffActions.style.right="0px",this._diffActions.style.visibility="hidden",this._diffActions.style.height=`${o}px`,this._diffActions.style.lineHeight=`${o}px`,this._marginDomNode.appendChild(this._diffActions);const l=[],h=n.modifiedEndLineNumber===0;l.push(new An("diff.clipboard.copyDeletedContent",h?n.originalEndLineNumber>n.modifiedStartLineNumber?p("diff.clipboard.copyDeletedLinesContent.label","Copy deleted lines"):p("diff.clipboard.copyDeletedLinesContent.single.label","Copy deleted line"):n.originalEndLineNumber>n.modifiedStartLineNumber?p("diff.clipboard.copyChangedLinesContent.label","Copy changed lines"):p("diff.clipboard.copyChangedLinesContent.single.label","Copy changed line"),void 0,!0,()=>Ig(this,void 0,void 0,function*(){const g=new T(n.originalStartLineNumber,1,n.originalEndLineNumber+1,1),m=n.originalModel.getValueInRange(g);yield this._clipboardService.writeText(m)})));let c=0,d;n.originalEndLineNumber>n.modifiedStartLineNumber&&(d=new An("diff.clipboard.copyDeletedLineContent",h?p("diff.clipboard.copyDeletedLineContent.label","Copy deleted line ({0})",n.originalStartLineNumber):p("diff.clipboard.copyChangedLineContent.label","Copy changed line ({0})",n.originalStartLineNumber),void 0,!0,()=>Ig(this,void 0,void 0,function*(){const g=n.originalModel.getLineContent(n.originalStartLineNumber+c);if(g===""){const m=n.originalModel.getEndOfLineSequence();yield this._clipboardService.writeText(m===0?`
106`:`\r
107`)}else yield this._clipboardService.writeText(g)})),l.push(d)),i.getOption(81)||l.push(new An("diff.inline.revertChange",p("diff.inline.revertChange.label","Revert this change"),void 0,!0,()=>Ig(this,void 0,void 0,function*(){const g=new T(n.originalStartLineNumber,1,n.originalEndLineNumber,n.originalModel.getLineMaxColumn(n.originalEndLineNumber)),m=n.originalModel.getValueInRange(g);if(n.modifiedEndLineNumber===0){const _=i.getModel().getLineMaxColumn(n.modifiedStartLineNumber);i.executeEdits("diffEditor",[{range:new T(n.modifiedStartLineNumber,_,n.modifiedStartLineNumber,_),text:a+m}])}else{const _=i.getModel().getLineMaxColumn(n.modifiedEndLineNumber);i.executeEdits("diffEditor",[{range:new T(n.modifiedStartLineNumber,1,n.modifiedEndLineNumber,_),text:m}])}})));const u=(g,m)=>{this._contextMenuService.showContextMenu({getAnchor:()=>({x:g,y:m}),getActions:()=>(d&&(d.label=h?p("diff.clipboard.copyDeletedLineContent.label","Copy deleted line ({0})",n.originalStartLineNumber+c):p("diff.clipboard.copyChangedLineContent.label","Copy changed line ({0})",n.originalStartLineNumber+c)),l),autoSelectFirstItem:!0})};this._register(gi(this._diffActions,"mousedown",g=>{const{top:m,height:_}=qi(this._diffActions),C=Math.floor(o/3);g.preventDefault(),u(g.posx,m+_+C)})),this._register(i.onMouseMove(g=>{g.target.type===8||g.target.type===5?g.target.detail.viewZoneId===this._viewZoneId?(this.visibility=!0,c=this._updateLightBulbPosition(this._marginDomNode,g.event.browserEvent.y,o)):this.visibility=!1:this.visibility=!1})),this._register(i.onMouseDown(g=>{g.event.rightButton&&(g.target.type===8||g.target.type===5)&&g.target.detail.viewZoneId===this._viewZoneId&&(g.event.preventDefault(),c=this._updateLightBulbPosition(this._marginDomNode,g.event.browserEvent.y,o),u(g.event.posx,g.event.posy+o))}))}get visibility(){return this._visibility}set visibility(t){this._visibility!==t&&(this._visibility=t,t?this._diffActions.style.visibility="visible":this._diffActions.style.visibility="hidden")}
107_updateLightBulbPosition(t,e,i){const{top:n}=qi(t),s=e-n,r=Math.floor(s/i),o=r*i;if(this._diffActions.style.top=`${o}px`,this.diff.viewLineCounts){let a=0;for(let l=0;l<this.diff.viewLineCounts.length;l++)if(a+=this.diff.viewLineCounts[l],r<a)return l}return r}},zh=ge("clipboardService"),M$=Object.freeze({total(){},worked(){},done(){}}),i8=class{constructor(t){this.callback=t}report(t){this._value=t,this.callback(this._value)}};i8.None=Object.freeze({report(){}});var s0=ge("editorProgressService"),n8=function(t,e,i,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r},Qn=function(t,e){return function(i,n){e(i,n,t)}},Eg,Cw=class{constructor(t,e){this._contextMenuService=t,this._clipboardService=e,this._zones=[],this._inlineDiffMargins=[],this._zonesMap={},this._decorations=[]}getForeignViewZones(t){return t.filter(e=>!this._zonesMap[String(e.id)])}clean(t){this._zones.length>0&&t.changeViewZones(e=>{for(const i of this._zones)e.removeZone(i)}),this._zones=[],this._zonesMap={},this._decorations=t.deltaDecorations(this._decorations,[])}apply(t,e,i,n){const s=n?V3.capture(t):null;t.changeViewZones(r=>{var o;for(const a of this._zones)r.removeZone(a);for(const a of this._inlineDiffMargins)a.dispose();this._zones=[],this._zonesMap={},this._inlineDiffMargins=[];for(let a=0,l=i.zones.length;a<l;a++){const h=i.zones[a];h.suppressMouseDown=!0;const c=r.addZone(h);this._zones.push(c),this._zonesMap[String(c)]=!0,i.zones[a].diff&&h.marginDomNode&&(h.suppressMouseDown=!1,((o=i.zones[a].diff)===null||o===void 0?void 0:o.originalModel.getValueLength())!==0&&this._inlineDiffMargins.push(new t8(c,h.marginDomNode,t,i.zones[a].diff,this._contextMenuService,this._clipboardService)))}}),s&&s.restore(t),this._decorations=t.deltaDecorations(this._decorations,i.decorations),e&&e.setZones(i.overviewZones)}},s8=0,r8=ni("diff-insert",f.add,p("diffInsertIcon","Line decoration for inserts in the diff editor.")),Ux=ni("diff-remove",f.remove,p("diffRemoveIcon","Line decoration for removals in the diff editor.")),bw=(Eg=window.trustedTypes)===null||Eg===void 0?void 0:Eg.createPolicy("diffEditorWidget",{createHTML:t=>t}),or=class bt extends V{constructor(e,i,n,s,r,o,a,l,h,c,d,u){super(),this._editorProgressService=u,this._onDidDispose=this._register(new M),this.onDidDispose=this._onDidDispose.event,this._onDidUpdateDiff=this._register(new M),this.onDidUpdateDiff=this._onDidUpdateDiff.event,this._onDidContentSizeChange=this._register(new M),this._lastOriginalWarning=null,this._lastModifiedWarning=null,this._editorWorkerService=r,this._codeEditorService=l,this._contextKeyService=this._register(o.createScoped(e)),this._instantiationService=a.createChild(new of([Ie,this._contextKeyService])),this._contextKeyService.createKey("isInDiffEditor",!0),this._themeService=h,this._notificationService=c,this._id=++s8,this._state=0,this._updatingDiffProgress=null,this._domElement=e,i=i||{},this._options=yw(i,{enableSplitViewResizing:!0,renderSideBySide:!0,maxComputationTime:5e3,maxFileSize:50,ignoreTrimWhitespace:!0,renderIndicators:!0,originalEditable:!1,diffCodeLens:!1,renderOverviewRuler:!0,diffWordWrap:"inherit"}),typeof i.isInEmbeddedEditor<"u"?this._contextKeyService.createKey("isInEmbeddedDiffEditor",i.isInEmbeddedEditor):this._contextKeyService.createKey("isInEmbeddedDiffEditor",!1),this._updateDecorationsRunner=this._register(new _t(()=>this._updateDecorations(),0)),this._containerDomElement=document.createElement("div"),this._containerDomElement.className=bt._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide),this._containerDomElement.style.position="relative",this._containerDomElement.style.height="100%",this._domElement.appendChild(this._containerDomElement),this._overviewViewportDomElement=de(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(gi(this._overviewDomElement,"mousedown",m=>{this._modifiedEditor.delegateVerticalScrollbarMouseDown(m)})),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 Cw(d,s),this._modifiedEditorState=new Cw(d,s),this._isVisible=!0,this._isHandlingScrollEvent=!1,this._elementSizeObserver=this._register(new O2(this._containerDomElement,i.dimension)),this._register(this._elementSizeObserver.onDidChange(()=>this._onDidContainerSizeChanged())),i.automaticLayout&&this._elementSizeObserver.startObserving(),this._diffComputationResult=null,this._originalEditor=this._createLeftHandSideEditor(i,n.originalEditor||{}),this._modifiedEditor=this._createRightHandSideEditor(i,n.modifiedEditor||{}),this._originalOverviewRuler=null,this._modifiedOverviewRuler=null,this._reviewPane=a.createInstance(Cu,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 x_(this._createDataSource(),this._options.enableSplitViewResizing)):this._setStrategy(new Sw(this._createDataSource(),this._options.enableSplitViewResizing)),this._register(h.onDidColorThemeChange(m=>{this._strategy&&this._strategy.applyColors(m)&&this._updateDecorationsRunner.schedule(),this._containerDomElement.className=bt._getClassName(this._themeService.getColorTheme(
107),this._options.renderSideBySide)}));const g=oa.getDiffEditorContributions();for(const m of g)try{this._register(a.createInstance(m.ctor,this))}catch(_){We(_)}this._codeEditorService.addDiffEditor(this)}_setState(e){this._state!==e&&(this._state=e,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(e,i){let n="monaco-diff-editor monaco-editor-background ";return i&&(n+="side-by-side "),n+=nu(e.type),n}_recreateOverviewRulers(){this._options.renderOverviewRuler&&(this._originalOverviewRuler&&(this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode()),this._originalOverviewRuler.dispose()),this._originalEditor.hasModel()&&(this._originalOverviewRuler=this._originalEditor.createOverviewRuler("original diffOverviewRuler"),this._overviewDomElement.appendChild(this._originalOverviewRuler.getDomNode())),this._modifiedOverviewRuler&&(this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode()),this._modifiedOverviewRuler.dispose()),this._modifiedEditor.hasModel()&&(this._modifiedOverviewRuler=this._modifiedEditor.createOverviewRuler("modified diffOverviewRuler"),this._overviewDomElement.appendChild(this._modifiedOverviewRuler.getDomNode())),this._layoutOverviewRulers())}_createLeftHandSideEditor(e,i){const n=this._createInnerEditor(this._instantiationService,this._originalDomNode,this._adjustOptionsForLeftHandSide(e),i);this._register(n.onDidScrollChange(r=>{this._isHandlingScrollEvent||!r.scrollTopChanged&&!r.scrollLeftChanged&&!r.scrollHeightChanged||(this._isHandlingScrollEvent=!0,this._modifiedEditor.setScrollPosition({scrollLeft:r.scrollLeft,scrollTop:r.scrollTop}),this._isHandlingScrollEvent=!1,this._layoutOverviewViewport())})),this._register(n.onDidChangeViewZones(()=>{this._onViewZonesChanged()})),this._register(n.onDidChangeConfiguration(r=>{n.getModel()&&(r.hasChanged(44)&&this._updateDecorationsRunner.schedule(),r.hasChanged(132)&&(this._updateDecorationsRunner.cancel(),this._updateDecorations()))})),this._register(n.onDidChangeHiddenAreas(()=>{this._updateDecorationsRunner.cancel(),this._updateDecorations()})),this._register(n.onDidChangeModelContent(()=>{this._isVisible&&this._beginUpdateDecorationsSoon()}));const s=this._contextKeyService.createKey("isInDiffLeftEditor",n.hasWidgetFocus());return this._register(n.onDidFocusEditorWidget(()=>s.set(!0))),this._register(n.onDidBlurEditorWidget(()=>s.set(!1))),this._register(n.onDidContentSizeChange(r=>{const o=this._originalEditor.getContentWidth()+this._modifiedEditor.getContentWidth()+bt.ONE_OVERVIEW_WIDTH,a=Math.max(this._modifiedEditor.getContentHeight(),this._originalEditor.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:a,contentWidth:o,contentHeightChanged:r.contentHeightChanged,contentWidthChanged:r.contentWidthChanged})})),n}_createRightHandSideEditor(e,i){const n=this._createInnerEditor(this._instantiationService,this._modifiedDomNode,this._adjustOptionsForRightHandSide(e),i);this._register(n.onDidScrollChange(r=>{this._isHandlingScrollEvent||!r.scrollTopChanged&&!r.scrollLeftChanged&&!r.scrollHeightChanged||(this._isHandlingScrollEvent=!0,this._originalEditor.setScrollPosition({scrollLeft:r.scrollLeft,scrollTop:r.scrollTop}),this._isHandlingScrollEvent=!1,this._layoutOverviewViewport())})),this._register(n.onDidChangeViewZones(()=>{this._onViewZonesChanged()})),this._register(n.onDidChangeConfiguration(r=>{n.getModel()&&(r.hasChanged(44)&&this._updateDecorationsRunner.schedule(),r.hasChanged(132)&&(this._updateDecorationsRunner.cancel(),this._updateDecorations()))})),this._register(n.onDidChangeHiddenAreas(()=>{this._updateDecorationsRunner.cancel(),this._updateDecorations()})),this._register(n.onDidChangeModelContent(()=>{this._isVisible&&this._beginUpdateDecorationsSoon()})),this._register(n.onDidChangeModelOptions(r=>{r.tabSize&&this._updateDecorationsRunner.schedule()}));const s=this._contextKeyService.createKey("isInDiffRightEditor",n.hasWidgetFocus());return this._register(n.onDidFocusEditorWidget(()=>s.set(!0))),this._register(n.onDidBlurEditorWidget(()=>s.set(!1))),this._register(n.onDidContentSizeChange(r=>{const o=this._originalEditor.getContentWidth()+this._modifiedEditor.getContentWidth()+bt.ONE_OVERVIEW_WIDTH,a=Math.max(this._modifiedEditor.getContentHeight(),this._originalEditor.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:a,contentWidth:o,contentHeightChanged:r.contentHeightChanged,contentWidthChanged:r.contentWidthChanged})}
107)),n}_createInnerEditor(e,i,n,s){return e.createInstance(pu,i,n,s)}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 mv.IDiffEditor}getLineChanges(){return this._diffComputationResult?this._diffComputationResult.changes:null}getOriginalEditor(){return this._originalEditor}getModifiedEditor(){return this._modifiedEditor}updateOptions(e){const i=yw(e,this._options),n=h8(this._options,i);this._options=i;const s=n.ignoreTrimWhitespace||n.renderIndicators,r=this._isVisible&&(n.maxComputationTime||n.maxFileSize);s?this._beginUpdateDecorations():r&&this._beginUpdateDecorationsSoon(),this._modifiedEditor.updateOptions(this._adjustOptionsForRightHandSide(e)),this._originalEditor.updateOptions(this._adjustOptionsForLeftHandSide(e)),this._strategy.setEnableSplitViewResizing(this._options.enableSplitViewResizing),n.renderSideBySide&&(this._options.renderSideBySide?this._setStrategy(new x_(this._createDataSource(),this._options.enableSplitViewResizing)):this._setStrategy(new Sw(this._createDataSource(),this._options.enableSplitViewResizing)),this._containerDomElement.className=bt._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide)),n.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(e){if(e&&(!e.original||!e.modified))throw new Error(e.original?"DiffEditorWidget.setModel: Modified model is null":"DiffEditorWidget.setModel: Original model is null");this._cleanViewZonesAndDecorations(),this._originalEditor.setModel(e?e.original:null),this._modifiedEditor.setModel(e?e.modified:null),this._updateDecorationsRunner.cancel(),e&&(this._originalEditor.setScrollTop(0),this._modifiedEditor.setScrollTop(0)),this._diffComputationResult=null,this._diffComputationToken++,this._setState(0),e&&(this._recreateOverviewRulers(),this._beginUpdateDecorations()),this._layoutOverviewViewport()}getContainerDomNode(){return this._domElement}getVisibleColumnFromPosition(e){return this._modifiedEditor.getVisibleColumnFromPosition(e)}getPosition(){return this._modifiedEditor.getPosition()}setPosition(e,i="api"){this._modifiedEditor.setPosition(e,i)}revealLine(e,i=0){this._modifiedEditor.revealLine(e,i)}revealLineInCenter(e,i=0){this._modifiedEditor.revealLineInCenter(e,i)}revealLineInCenterIfOutsideViewport(e,i=0){this._modifiedEditor.revealLineInCenterIfOutsideViewport(e,i)}revealLineNearTop(e,i=0){this._modifiedEditor.revealLineNearTop(e,i)}revealPosition(e,i=0){this._modifiedEditor.revealPosition(e,i)}revealPositionInCenter(e,i=0){this._modifiedEditor.revealPositionInCenter(e,i)}revealPositionInCenterIfOutsideViewport(e,i=0){this._modifiedEditor.revealPositionInCenterIfOutsideViewport(e,i)}revealPositionNearTop(e,i=0){this._modifiedEditor.revealPositionNearTop(e,i)}getSelection(){return this._modifiedEditor.getSelection()}getSelections(){return this._modifiedEditor.getSelections()}setSelection(e,i="api"){this._modifiedEditor.setSelection(e,i)}setSelections(e,i="api"){this._modifiedEditor.setSelections(e,i)}revealLines(e,i,n=0){this._modifiedEditor.revealLines(e,i,n)}revealLinesInCenter(e,i,n=0){this._modifiedEditor.revealLinesInCenter(e,i,n)}revealLinesInCenterIfOutsideViewport(e,i,n=0){this._modifiedEditor.revealLinesInCenterIfOutsideViewport(e,i,n)}revealLinesNearTop(e,i,n=0){this._modifiedEditor.revealLinesNearTop(e,i,n)}revealRange(e,i=0,n=!1,s=!0){this._modifiedEditor.revealRange(e,i,n,s)}revealRangeInCenter(e,i=0){this._modifiedEditor.revealRangeInCenter(e,i)}revealRangeInCenterIfOutsideViewport(e,i=0){this._modifiedEditor.revealRangeInCenterIfOutsideViewport(e,i)}revealRangeNearTop(e,i=0){this._modifiedEditor.revealRangeNearTop(e,i)}revealRangeNearTopIfOutsideViewport(e,i=0){this._modifiedEditor.revealRangeNearTopIfOutsideViewport(e,i)}revealRangeAtTop(e,i=0){this._modifiedEditor.revealRangeAtTop(e,i)}
107getSupportedActions(){return this._modifiedEditor.getSupportedActions()}saveViewState(){return{original:this._originalEditor.saveViewState(),modified:this._modifiedEditor.saveViewState()}}restoreViewState(e){if(e&&e.original&&e.modified){const i=e;this._originalEditor.restoreViewState(i.original),this._modifiedEditor.restoreViewState(i.modified)}}layout(e){this._elementSizeObserver.observe(e)}focus(){this._modifiedEditor.focus()}hasTextFocus(){return this._originalEditor.hasTextFocus()||this._modifiedEditor.hasTextFocus()}trigger(e,i,n){this._modifiedEditor.trigger(e,i,n)}changeDecorations(e){return this._modifiedEditor.changeDecorations(e)}_onDidContainerSizeChanged(){this._doLayout()}_getReviewHeight(){return this._reviewPane.isVisible()?this._elementSizeObserver.getHeight():0}_layoutOverviewRulers(){if(!this._options.renderOverviewRuler||!this._originalOverviewRuler||!this._modifiedOverviewRuler)return;const e=this._elementSizeObserver.getHeight(),i=this._getReviewHeight(),n=bt.ENTIRE_DIFF_OVERVIEW_WIDTH-2*bt.ONE_OVERVIEW_WIDTH;this._modifiedEditor.getLayoutInfo()&&(this._originalOverviewRuler.setLayout({top:0,width:bt.ONE_OVERVIEW_WIDTH,right:n+bt.ONE_OVERVIEW_WIDTH,height:e-i}),this._modifiedOverviewRuler.setLayout({top:0,right:0,width:bt.ONE_OVERVIEW_WIDTH,height:e-i}))}_onViewZonesChanged(){this._currentlyChangingViewZones||this._updateDecorationsRunner.schedule()}_beginUpdateDecorationsSoon(){this._beginUpdateDecorationsTimeout!==-1&&(window.clearTimeout(this._beginUpdateDecorationsTimeout),this._beginUpdateDecorationsTimeout=-1),this._beginUpdateDecorationsTimeout=window.setTimeout(()=>this._beginUpdateDecorations(),bt.UPDATE_DIFF_DECORATIONS_DELAY)}static _equals(e,i){return!e&&!i?!0:!e||!i?!1:e.toString()===i.toString()}_beginUpdateDecorations(){this._beginUpdateDecorationsTimeout=-1;const e=this._originalEditor.getModel(),i=this._modifiedEditor.getModel();if(!e||!i)return;this._diffComputationToken++;const n=this._diffComputationToken,s=this._options.maxFileSize*1024*1024,r=o=>{const a=o.getValueLength();return s===0||a<=s};if(!r(e)||!r(i)){(!bt._equals(e.uri,this._lastOriginalWarning)||!bt._equals(i.uri,this._lastModifiedWarning))&&(this._lastOriginalWarning=e.uri,this._lastModifiedWarning=i.uri,this._notificationService.warn(p("diff.tooLarge","Cannot compare files because one file is too large.")));return}this._setState(1),this._editorWorkerService.computeDiff(e.uri,i.uri,this._options.ignoreTrimWhitespace,this._options.maxComputationTime).then(o=>{n===this._diffComputationToken&&e===this._originalEditor.getModel()&&i===this._modifiedEditor.getModel()&&(this._setState(2),this._diffComputationResult=o,this._updateDecorationsRunner.schedule(),this._onDidUpdateDiff.fire())},o=>{n===this._diffComputationToken&&e===this._originalEditor.getModel()&&i===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 e=this._diffComputationResult?this._diffComputationResult.changes:[],i=this._originalEditorState.getForeignViewZones(this._originalEditor.getWhitespaces()),n=this._modifiedEditorState.getForeignViewZones(this._modifiedEditor.getWhitespaces()),s=this._strategy.getEditorsDiffDecorations(e,this._options.ignoreTrimWhitespace,this._options.renderIndicators,i,n);try{this._currentlyChangingViewZones=!0,this._originalEditorState.apply(this._originalEditor,this._originalOverviewRuler,s.original,!1),this._modifiedEditorState.apply(this._modifiedEditor,this._modifiedOverviewRuler,s.modified,!0)}finally{this._currentlyChangingViewZones=!1}}_adjustOptionsForSubEditor(e){const i=Object.assign({},e);return i.inDiffEditor=!0,i.automaticLayout=!1,i.scrollbar=Object.assign({},i.scrollbar||{}),i.scrollbar.vertical="visible",i.folding=!1,i.codeLens=this._options.diffCodeLens,i.fixedOverflowWidgets=!0,i.minimap=Object.assign({},i.minimap||{}),i.minimap.enabled=!1,i}_adjustOptionsForLeftHandSide(e){const i=this._adjustOptionsForSubEditor(e);return this._options.renderSideBySide?i.wordWrapOverride1=this._options.diffWordWrap:(i.wordWrapOverride1="off",i.wordWrapOverride2="off"),e.originalAriaLabel&&(i.ariaLabel=e.originalAriaLabel),i.readOnly=!this._options.originalEditable,i.extraEditorClassName="original-in-monaco-diff-editor",Object.assign(Object.assign({}
107,i),{dimension:{height:0,width:0}})}_adjustOptionsForRightHandSide(e){const i=this._adjustOptionsForSubEditor(e);return e.modifiedAriaLabel&&(i.ariaLabel=e.modifiedAriaLabel),i.wordWrapOverride1=this._options.diffWordWrap,i.revealHorizontalRightPadding=co.revealHorizontalRightPadding.defaultValue+bt.ENTIRE_DIFF_OVERVIEW_WIDTH,i.scrollbar.verticalHasArrows=!1,i.extraEditorClassName="modified-in-monaco-diff-editor",Object.assign(Object.assign({},i),{dimension:{height:0,width:0}})}doLayout(){this._elementSizeObserver.observe(),this._doLayout()}_doLayout(){const e=this._elementSizeObserver.getWidth(),i=this._elementSizeObserver.getHeight(),n=this._getReviewHeight(),s=this._strategy.layout();this._originalDomNode.style.width=s+"px",this._originalDomNode.style.left="0px",this._modifiedDomNode.style.width=e-s+"px",this._modifiedDomNode.style.left=s+"px",this._overviewDomElement.style.top="0px",this._overviewDomElement.style.height=i-n+"px",this._overviewDomElement.style.width=bt.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewDomElement.style.left=e-bt.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewViewportDomElement.setWidth(bt.ENTIRE_DIFF_OVERVIEW_WIDTH),this._overviewViewportDomElement.setHeight(30),this._originalEditor.layout({width:s,height:i-n}),this._modifiedEditor.layout({width:e-s-(this._options.renderOverviewRuler?bt.ENTIRE_DIFF_OVERVIEW_WIDTH:0),height:i-n}),(this._originalOverviewRuler||this._modifiedOverviewRuler)&&this._layoutOverviewRulers(),this._reviewPane.layout(i-n,e,n),this._layoutOverviewViewport()}_layoutOverviewViewport(){const e=this._computeOverviewViewport();e?(this._overviewViewportDomElement.setTop(e.top),this._overviewViewportDomElement.setHeight(e.height)):(this._overviewViewportDomElement.setTop(0),this._overviewViewportDomElement.setHeight(0))}_computeOverviewViewport(){const e=this._modifiedEditor.getLayoutInfo();if(!e)return null;const i=this._modifiedEditor.getScrollTop(),n=this._modifiedEditor.getScrollHeight(),s=Math.max(0,e.height),r=Math.max(0,s-0),o=n>0?r/n:0;return{height:Math.max(0,Math.floor(e.height*o)),top:Math.floor(i*o)}}_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(e){this._strategy&&this._strategy.dispose(),this._strategy=e,e.applyColors(this._themeService.getColorTheme()),this._diffComputationResult&&this._updateDecorations(),this._doLayout()}_getLineChangeAtOrBeforeLineNumber(e,i){const n=this._diffComputationResult?this._diffComputationResult.changes:[];if(n.length===0||e<i(n[0]))return null;let s=0,r=n.length-1;for(;s<r;){const o=Math.floor((s+r)/2),a=i(n[o]),l=o+1<=r?i(n[o+1]):1073741824;e<a?r=o-1:e>=l?s=o+1:(s=o,r=o)}return n[s]}_getEquivalentLineForOriginalLineNumber(e){const i=this._getLineChangeAtOrBeforeLineNumber(e,l=>l.originalStartLineNumber);if(!i)return e;const n=i.originalStartLineNumber+(i.originalEndLineNumber>0?-1:0),s=i.modifiedStartLineNumber+(i.modifiedEndLineNumber>0?-1:0),r=i.originalEndLineNumber>0?i.originalEndLineNumber-i.originalStartLineNumber+1:0,o=i.modifiedEndLineNumber>0?i.modifiedEndLineNumber-i.modifiedStartLineNumber+1:0,a=e-n;return a<=r?s+Math.min(a,o):s+o-r+a}_getEquivalentLineForModifiedLineNumber(e){const i=this._getLineChangeAtOrBeforeLineNumber(e,l=>l.modifiedStartLineNumber);if(!i)return e;const n=i.originalStartLineNumber+(i.originalEndLineNumber>0?-1:0),s=i.modifiedStartLineNumber+(i.modifiedEndLineNumber>0?-1:0),r=i.originalEndLineNumber>0?i.originalEndLineNumber-i.originalStartLineNumber+1:0,o=i.modifiedEndLineNumber>0?i.modifiedEndLineNumber-i.modifiedStartLineNumber+1:0,a=e-s;return a<=o?n+Math.min(a,r):n+r-o+a}getDiffLineInformationForOriginal(e){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForOriginalLineNumber(e)}:null}getDiffLineInformationForModified(e){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForModifiedLineNumber(e)}:null}};or.ONE_OVERVIEW_WIDTH=15;or.ENTIRE_DIFF_OVERVIEW_WIDTH=30;or.UPDATE_DIFF_DECORATIONS_DELAY=200;or=n8([Qn(3,zh),Qn(4,Ya),Qn(5,Ie),Qn(6,Qi),Qn(7,pt),Qn(8,et),Qn(9,wn),Qn(10,n0),Qn(11,s0)],or);var $x=class extends V{constructor(t){super(),this._dataSource=t,this._insertColor=null,this._removeColor=null}applyColors(t){const e=t.getColor(zR)||(t.getColor(J2)||Op).transparent
107(2),i=t.getColor(UR)||(t.getColor(ek)||Pp).transparent(2),n=!e.equals(this._insertColor)||!i.equals(this._removeColor);return this._insertColor=e,this._removeColor=i,n}getEditorsDiffDecorations(t,e,i,n,s){s=s.sort((l,h)=>l.afterLineNumber-h.afterLineNumber),n=n.sort((l,h)=>l.afterLineNumber-h.afterLineNumber);const r=this._getViewZones(t,n,s,i),o=this._getOriginalEditorDecorations(r,t,e,i),a=this._getModifiedEditorDecorations(r,t,e,i);return{original:{decorations:o.decorations,overviewZones:o.overviewZones,zones:r.original},modified:{decorations:a.decorations,overviewZones:a.overviewZones,zones:r.modified}}}},ww=class{constructor(t){this._source=t,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}},Kx=class Rl{constructor(e,i,n,s,r){this._lineChanges=e,this._originalForeignVZ=i,this._modifiedForeignVZ=n,this._originalEditor=s,this._modifiedEditor=r}static _getViewLineCount(e,i,n){const s=e.getModel(),r=e._getViewModel();if(s&&r){const o=ph(s,r,i,n);return o.endLineNumber-o.startLineNumber+1}return n-i+1}getViewZones(){const e=this._originalEditor.getOption(59),i=this._modifiedEditor.getOption(59),n=this._originalEditor.getOption(132).wrappingColumn!==-1,s=this._modifiedEditor.getOption(132).wrappingColumn!==-1,r=n||s,o=this._originalEditor.getModel(),a=this._originalEditor._getViewModel().coordinatesConverter,l=this._modifiedEditor._getViewModel().coordinatesConverter,h={original:[],modified:[]};let c=0,d=0,u=0,g=0,m=0,_=0;const C=(S,L)=>S.afterLineNumber-L.afterLineNumber,w=(S,L)=>{if(L.domNode===null&&S.length>0){const x=S[S.length-1];if(x.afterLineNumber===L.afterLineNumber&&x.domNode===null){x.heightInLines+=L.heightInLines;return}}S.push(L)},v=new ww(this._modifiedForeignVZ),b=new ww(this._originalForeignVZ);let y=1,k=1;for(let S=0,L=this._lineChanges.length;S<=L;S++){const x=S<L?this._lineChanges[S]:null;x!==null?(u=x.originalStartLineNumber+(x.originalEndLineNumber>0?-1:0),g=x.modifiedStartLineNumber+(x.modifiedEndLineNumber>0?-1:0),d=x.originalEndLineNumber>0?Rl._getViewLineCount(this._originalEditor,x.originalStartLineNumber,x.originalEndLineNumber):0,c=x.modifiedEndLineNumber>0?Rl._getViewLineCount(this._modifiedEditor,x.modifiedStartLineNumber,x.modifiedEndLineNumber):0,m=Math.max(x.originalStartLineNumber,x.originalEndLineNumber),_=Math.max(x.modifiedStartLineNumber,x.modifiedEndLineNumber)):(u+=1e7+d,g+=1e7+c,m=u,_=g);let E=[],R=[];if(r){let P;x?x.originalEndLineNumber>0?P=x.originalStartLineNumber-y:P=x.modifiedStartLineNumber-k:P=o.getLineCount()-y+1;for(let K=0;K<P;K++){const j=y+K,ie=k+K,J=a.getModelLineViewLineCount(j),ae=l.getModelLineViewLineCount(ie);J<ae?E.push({afterLineNumber:j,heightInLines:ae-J,domNode:null,marginDomNode:null}):J>ae&&R.push({afterLineNumber:ie,heightInLines:J-ae,domNode:null,marginDomNode:null})}x&&(y=(x.originalEndLineNumber>0?x.originalEndLineNumber:x.originalStartLineNumber)+1,k=(x.modifiedEndLineNumber>0?x.modifiedEndLineNumber:x.modifiedStartLineNumber)+1)}for(;v.current&&v.current.afterLineNumber<=_;){let P;v.current.afterLineNumber<=g?P=u-g+v.current.afterLineNumber:P=m;let K=null;x&&x.modifiedStartLineNumber<=v.current.afterLineNumber&&v.current.afterLineNumber<=x.modifiedEndLineNumber&&(K=this._createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion()),E.push({afterLineNumber:P,heightInLines:v.current.height/i,domNode:null,marginDomNode:K}),v.advance()}for(;b.current&&b.current.afterLineNumber<=m;){let P;b.current.afterLineNumber<=u?P=g-u+b.current.afterLineNumber:P=_,R.push({afterLineNumber:P,heightInLines:b.current.height/e,domNode:null}),b.advance()}if(x!==null&&pa(x)){const P=this._produceOriginalFromDiff(x,d,c);P&&E.push(P)}if(x!==null&&_a(x)){const P=this._produceModifiedFromDiff(x,d,c);P&&R.push(P)}let D=0,W=0;for(E=E.sort(C),R=R.sort(C);D<E.length&&W<R.length;){const P=E[D],K=R[W],j=P.afterLineNumber-u,ie=K.afterLineNumber-g;j<ie?(w(h.original,P),D++):ie<j?(w(h.modified,K),W++):P.shouldNotShrink?(w(h.original,P),D++):K.shouldNotShrink?(w(h.modified,K),W++):P.heightInLines>=K.heightInLines?(P.heightInLines-=K.heightInLines,W++):(K.heightInLines-=P.heightInLines,D++)}for(;D<E.length;)w(h.original,E[D]),D++;for(;W<R.length;)w(h.modified,R[W]),W++}
107return{original:Rl._ensureDomNodes(h.original),modified:Rl._ensureDomNodes(h.modified)}}static _ensureDomNodes(e){return e.map(i=>(i.domNode||(i.domNode=jx()),i))}};function ds(t,e,i,n,s){return{range:new T(t,e,i,n),options:s}}var Ut={charDelete:Je.register({description:"diff-editor-char-delete",className:"char-delete"}),charDeleteWholeLine:Je.register({description:"diff-editor-char-delete-whole-line",className:"char-delete",isWholeLine:!0}),charInsert:Je.register({description:"diff-editor-char-insert",className:"char-insert"}),charInsertWholeLine:Je.register({description:"diff-editor-char-insert-whole-line",className:"char-insert",isWholeLine:!0}),lineInsert:Je.register({description:"diff-editor-line-insert",className:"line-insert",marginClassName:"gutter-insert",isWholeLine:!0}),lineInsertWithSign:Je.register({description:"diff-editor-line-insert-with-sign",className:"line-insert",linesDecorationsClassName:"insert-sign "+ft.asClassName(r8),marginClassName:"gutter-insert",isWholeLine:!0}),lineDelete:Je.register({description:"diff-editor-line-delete",className:"line-delete",marginClassName:"gutter-delete",isWholeLine:!0}),lineDeleteWithSign:Je.register({description:"diff-editor-line-delete-with-sign",className:"line-delete",linesDecorationsClassName:"delete-sign "+ft.asClassName(Ux),marginClassName:"gutter-delete",isWholeLine:!0}),lineDeleteMargin:Je.register({description:"diff-editor-line-delete-margin",marginClassName:"gutter-delete"})},x_=class Wo extends $x{constructor(e,i){super(e),this._disableSash=i===!1,this._sashRatio=null,this._sashPosition=null,this._startSashPosition=null,this._sash=this._register(new vu(this._dataSource.getContainerDomNode(),this,{orientation:0})),this._disableSash&&(this._sash.state=0),this._sash.onDidStart(()=>this._onSashDragStart()),this._sash.onDidChange(n=>this._onSashDrag(n)),this._sash.onDidEnd(()=>this._onSashDragEnd()),this._sash.onDidReset(()=>this._onSashReset())}setEnableSplitViewResizing(e){const i=e===!1;this._disableSash!==i&&(this._disableSash=i,this._sash.state=this._disableSash?0:3)}layout(e=this._sashRatio){const i=this._dataSource.getWidth()-(this._dataSource.getOptions().renderOverviewRuler?or.ENTIRE_DIFF_OVERVIEW_WIDTH:0);let n=Math.floor((e||.5)*i);const s=Math.floor(.5*i);return n=this._disableSash?s:n||s,i>Wo.MINIMUM_EDITOR_WIDTH*2?(n<Wo.MINIMUM_EDITOR_WIDTH&&(n=Wo.MINIMUM_EDITOR_WIDTH),n>i-Wo.MINIMUM_EDITOR_WIDTH&&(n=i-Wo.MINIMUM_EDITOR_WIDTH)):n=s,this._sashPosition!==n&&(this._sashPosition=n),this._sash.layout(),this._sashPosition}_onSashDragStart(){this._startSashPosition=this._sashPosition}_onSashDrag(e){const i=this._dataSource.getWidth()-(this._dataSource.getOptions().renderOverviewRuler?or.ENTIRE_DIFF_OVERVIEW_WIDTH:0),n=this.layout((this._startSashPosition+(e.currentX-e.startX))/i);this._sashRatio=n/i,this._dataSource.relayoutEditors()}_onSashDragEnd(){this._sash.layout()}_onSashReset(){this._sashRatio=.5,this._dataSource.relayoutEditors(),this._sash.layout()}getVerticalSashTop(e){return 0}getVerticalSashLeft(e){return this._sashPosition}getVerticalSashHeight(e){return this._dataSource.getHeight()}_getViewZones(e,i,n){const s=this._dataSource.getOriginalEditor(),r=this._dataSource.getModifiedEditor();return new o8(e,i,n,s,r).getViewZones()}_getOriginalEditorDecorations(e,i,n,s){const r=this._dataSource.getOriginalEditor(),o=String(this._removeColor),a={decorations:[],overviewZones:[]},l=r.getModel(),h=r._getViewModel();for(const c of i)if(_a(c)){a.decorations.push({range:new T(c.originalStartLineNumber,1,c.originalEndLineNumber,1073741824),options:s?Ut.lineDeleteWithSign:Ut.lineDelete}),(!pa(c)||!c.charChanges)&&a.decorations.push(ds(c.originalStartLineNumber,1,c.originalEndLineNumber,1073741824,Ut.charDeleteWholeLine));const d=ph(l,h,c.originalStartLineNumber,c.originalEndLineNumber);if(a.overviewZones.push(new fh(d.startLineNumber,d.endLineNumber,0,o)),c.charChanges){for(const u of c.charChanges)if(_a(u))if(n)for(let g=u.originalStartLineNumber;g<=u.originalEndLineNumber;g++){let m,_;g===u.originalStartLineNumber?m=u.originalStartColumn:m=l.getLineFirstNonWhitespaceColumn(g),g===u.originalEndLineNumber?_=u.originalEndColumn:_=l.getLineLastNonWhitespaceColumn(g),a.decorations.push(ds(g,m,g,_,Ut.charDelete))}else a.decorations.push(ds(u.originalStartLineNumber,u.originalStartColumn,u.originalEndLineNumber,u.originalEndColumn,Ut.charDelete))}}return a}_getModifiedEditorDecorations(e,i,n,s){const r=this._dataSource.getModifiedEditor(),o=String(this._insertColor),a={decorations:[],overviewZones:[]},l=r.getModel(),h=r._getViewModel();for(const c of i)if(pa(c)){a.decorations.push({range:new T(c.modifiedStartLineNumber,1,c.modifiedEndLineNumber,1073741824),options:s?Ut.lineInsertWithSign:Ut.lineInsert}),(!_a(c)||!c.charChanges)&&a.decorations.push(ds(c.modifiedStartLineNumber,1,c.modifiedEndLineNumber,1073741824,Ut.charInsertWholeLine));const d=ph(l,h,c.modifiedStartLineNumber,c.modifiedEndLineNumber);if(a.overviewZones.push(new fh(d.startLineNumber,d.endLineNumber,0,o)),c.charChanges){for(const u of c.charChanges)if(pa(u))if(n)for(let g=u.modifiedStartLineNumber;g<=u.modifiedEndLineNumber;g++){let m,_;g===u.modifiedStartLineNumber?m=u.modifiedStartColumn:m=l.getLineFirstNonWhitespaceColumn(g),g===u.modifiedEndLineNumber?_=u.modifiedEndColumn:_=l.getLineLastNonWhitespaceColumn(g),a.decorations.push(ds(g,m,g,_,Ut.charInsert))}else a.decorations.push(ds(u.modifiedStartLineNumber,u.modifiedStartColumn,u.modifiedEndLineNumber,u.modifiedEndColumn,Ut.charInsert))}}return a}};x_.MINIMUM_EDITOR_WIDTH=100;var o8=class extends Kx{constructor(t,e,i,n,s){super(t,e,i,n,s)}_createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion(){return null}_produceOriginalFromDiff(t,e,i){return i>e?{afterLineNumber:Math.max(t.originalStartLineNumber,t.originalEndLineNumber),heightInLines:i-e,domNode:null}:null}_produceModifiedFromDiff(t,e,i){return e>i?{afterLineNumber:Math.max(t.modifiedStartLineNumber,t.modifiedEndLineNumber),heightInLines:e-i,domNode:null}:null}},Sw=class extends $x{constructor(t,e){super(t),this._decorationsLeft=t.getOriginalEditor().getLayoutInfo().decorationsLeft,this._register(t.getOriginalEditor().onDidLayoutChange(i=>{this._decorationsLeft!==i.decorationsLeft&&(this._decorationsLeft=i.decorationsLeft,t.relayoutEditors())}))}setEnableSplitViewResizing(t){}_getViewZones(t,e,i,n){const s=this._dataSource.getOriginalEditor(),r=this._dataSource.getModifiedEditor();return new a8(t,e,i,s,r,n).getViewZones()}_getOriginalEditorDecorations(t,e,i,n){const s=String(this._removeColor),r={decorations:[],overviewZones:[]},o=this._dataSource.getOriginalEditor(),a=o.getModel(),l=o._getViewModel();let h=0;for(const c of e)if(_a(c)){for(r.decorations.push({range:new T(c.originalStartLineNumber,1,c.originalEndLineNumber,1073741824),options:Ut.lineDeleteMargin});h<t.modified.length;){const g=t.modified[h];if(g.diff&&g.diff.originalStartLineNumber>=c.originalStartLineNumber)break;h++}let d=0;if(h<t.modified.length){const g=t.modified[h];g.diff&&g.diff.originalStartLineNumber===c.originalStartLineNumber&&g.diff.originalEndLineNumber===c.originalEndLineNumber&&g.diff.modifiedStartLineNumber===c.modifiedStartLineNumber&&g.diff.modifiedEndLineNumber===c.modifiedEndLineNumber&&(d=g.heightInLines)}const u=ph(a,l,c.originalStartLineNumber,c.originalEndLineNumber);r.overviewZones.push(new fh(u.startLineNumber,u.endLineNumber,d,s))}return r}_getModifiedEditorDecorations(t,e,i,n){const s=this._dataSource.getModifiedEditor(),r=String(this._insertColor),o={decorations:[],overviewZones:[]},a=s.getModel(),l=s._getViewModel();for(const h of e)if(pa(h)){o.decorations.push({range:new T(h.modifiedStartLineNumber,1,h.modifiedEndLineNumber,1073741824),options:n?Ut.lineInsertWithSign:Ut.lineInsert});const c=ph(a,l,h.modifiedStartLineNumber,h.modifiedEndLineNumber);if(o.overviewZones.push(new fh(c.startLineNumber,c.endLineNumber,0,r)),h.charChanges){for(const d of h.charChanges)if(pa(d))if(i)for(let u=d.modifiedStartLineNumber;u<=d.modifiedEndLineNumber;u++){let g,m;u===d.modifiedStartLineNumber?g=d.modifiedStartColumn:g=a.getLineFirstNonWhitespaceColumn(u),u===d.modifiedEndLineNumber?m=d.modifiedEndColumn:m=a.getLineLastNonWhitespaceColumn(u),o.decorations.push(ds(u,g,u,m,Ut.charInsert))}else o.decorations.push(ds(d.modifiedStartLineNumber,d.modifiedStartColumn,d.modifiedEndLineNumber,d.modifiedEndColumn,Ut.charInsert))}else o.decorations.push(ds(h.modifiedStartLineNumber,1,h.modifiedEndLineNumber,1073741824,Ut.charInsertWholeLine))}return o}layout(){return Math.max(5,this._decorationsLeft)}},a8=class extends Kx{constructor(t,e,i,n,s,r){super(t,e,i,n,s),this._originalModel=n.getModel(),this._renderIndicators=r,this._pendingLineChange=[],this._pendingViewZones=[],this._lineBreaksComputer=this._modifiedEditor._getViewModel().createLineBreaksComputer()}getViewZones(){const t=super.getViewZones();return this._finalize(t),t}_createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion(){const t=document.createElement("div");return t.className="inline-added-margin-view-zone",t}_produceOriginalFromDiff(t,e,i){const n=document.createElement("div");return n.className="inline-added-margin-view-zone",{afterLineNumber:Math.max(t.originalStartLineNumber,t.originalEndLineNumber),heightInLines:i,domNode:document.createElement("div"),marginDomNode:n}}_produceModifiedFromDiff(t,e,i){const n=document.createElement("div");n.className=`view-lines line-delete ${Gr}`;const s=document.createElement("div");s.className="inline-deleted-margin-view-zone";const r={shouldNotShrink:!0,afterLineNumber:t.modifiedEndLineNumber===0?t.modifiedStartLineNumber:t.modifiedStartLineNumber-1,heightInLines:e,minWidthInPx:0,domNode:n,marginDomNode:s,diff:{originalStartLineNumber:t.originalStartLineNumber,originalEndLineNumber:t.originalEndLineNumber,modifiedStartLineNumber:t.modifiedStartLineNumber,modifiedEndLineNumber:t.modifiedEndLineNumber,originalModel:this._originalModel,viewLineCounts:null}};for(let o=t.originalStartLineNumber;o<=t.originalEndLineNumber;o++)this._lineBreaksComputer.addRequest(this._originalModel.getLineContent(o),null,null);return this._pendingLineChange.push(t),this._pendingViewZones.push(r),r}_finalize(t){const e=this._modifiedEditor.getOptions(),i=this._modifiedEditor.getModel().getOptions().tabSize,n=e.get(44),s=e.get(29),r=n.typicalHalfwidthCharacterWidth,o=e.get(93),a=this._originalModel.mightContainNonBasicASCII(),l=this._originalModel.mightContainRTL(),h=e.get(59),c=e.get(131).decorationsWidth,d=e.get(105),u=e.get(88),g=e.get(83),m=e.get(45),_=this._lineBreaksComputer.finalize();let C=0;for(let w=0;
107w<this._pendingLineChange.length;w++){const v=this._pendingLineChange[w],b=this._pendingViewZones[w],y=b.domNode;Zt(y,n);const k=b.marginDomNode;Zt(k,n);const S=[];if(v.charChanges)for(const P of v.charChanges)_a(P)&&S.push(new Vl(new T(P.originalStartLineNumber,P.originalStartColumn,P.originalEndLineNumber,P.originalEndColumn),"char-delete",0));const L=S.length>0,x=ya(1e4);let E=0,R=0,D=null;for(let P=v.originalStartLineNumber;P<=v.originalEndLineNumber;P++){const K=P-v.originalStartLineNumber,j=this._originalModel.getLineTokens(P),ie=j.getLineContent(),J=_[C++],ae=to.filter(S,P,1,ie.length+1);if(J){let le=0;for(const He of J.breakOffsets){const Ri=j.sliceAndInflate(le,He,0),mr=ie.substring(le,He);E=Math.max(E,this._renderOriginalLine(R++,mr,Ri,to.extractWrapped(ae,le,He),L,a,l,n,s,h,c,d,u,g,m,i,x,k)),le=He}for(D||(D=[]);D.length<K;)D[D.length]=1;D[K]=J.breakOffsets.length,b.heightInLines+=J.breakOffsets.length-1;const Ue=document.createElement("div");Ue.className="gutter-delete",t.original.push({afterLineNumber:P,afterColumn:0,heightInLines:J.breakOffsets.length-1,domNode:jx(),marginDomNode:Ue})}else E=Math.max(E,this._renderOriginalLine(R++,ie,j,ae,L,a,l,n,s,h,c,d,u,g,m,i,x,k))}E+=o;const W=x.build();if(y.innerHTML=bw?bw.createHTML(W):W,b.minWidthInPx=E*r,D){const P=v.originalEndLineNumber-v.originalStartLineNumber;for(;D.length<=P;)D[D.length]=1}b.diff.viewLineCounts=D}t.original.sort((w,v)=>w.afterLineNumber-v.afterLineNumber)}_renderOriginalLine(t,e,i,n,s,r,o,a,l,h,c,d,u,g,m,_,C,w){C.appendASCIIString('
107<div class="view-line'),s||C.appendASCIIString(" char-delete"),C.appendASCIIString('" style="top:'),C.appendASCIIString(String(t*h)),C.appendASCIIString('px;width:1000000px;">');const v=vn.isBasicASCII(e,r),b=vn.containsRTL(e,v,o),y=Lv(new za(a.isMonospace&&!l,a.canUseHalfwidthRightwardsArrow,e,!1,v,b,0,i,n,_,0,a.spaceWidth,a.middotWidth,a.wsmiddotWidth,d,u,g,m!==ho.OFF,null),C);if(C.appendASCIIString("</div>"),this._renderIndicators){const k=document.createElement("div");k.className=`delete-sign ${ft.asClassName(Ux)}`,k.setAttribute("style",`position:absolute;top:${t*h}px;width:${c}px;height:${h}px;right:0;`),w.appendChild(k)}return y.characterMapping.getAbsoluteOffset(y.characterMapping.length)}};function l8(t,e){return jt(t,e,["off","on","inherit"])}function pa(t){return t.modifiedEndLineNumber>0}function _a(t){return t.originalEndLineNumber>0}function jx(){const t=document.createElement("div");return t.className="diagonal-fill",t}function ph(t,e,i,n){const s=t.getLineCount();return i=Math.min(s,Math.max(1,i)),n=Math.min(s,Math.max(1,n)),e.coordinatesConverter.convertModelRangeToViewRange(new T(i,t.getLineMinColumn(i),n,t.getLineMaxColumn(n)))}function yw(t,e){return{enableSplitViewResizing:U(t.enableSplitViewResizing,e.enableSplitViewResizing),renderSideBySide:U(t.renderSideBySide,e.renderSideBySide),maxComputationTime:Zg(t.maxComputationTime,e.maxComputationTime,0,1073741824),maxFileSize:Zg(t.maxFileSize,e.maxFileSize,0,1073741824),ignoreTrimWhitespace:U(t.ignoreTrimWhitespace,e.ignoreTrimWhitespace),renderIndicators:U(t.renderIndicators,e.renderIndicators),originalEditable:U(t.originalEditable,e.originalEditable),diffCodeLens:U(t.diffCodeLens,e.diffCodeLens),renderOverviewRuler:U(t.renderOverviewRuler,e.renderOverviewRuler),diffWordWrap:l8(t.diffWordWrap,e.diffWordWrap)}}function h8(t,e){return{enableSplitViewResizing:t.enableSplitViewResizing!==e.enableSplitViewResizing,renderSideBySide:t.renderSideBySide!==e.renderSideBySide,maxComputationTime:t.maxComputationTime!==e.maxComputationTime,maxFileSize:t.maxFileSize!==e.maxFileSize,ignoreTrimWhitespace:t.ignoreTrimWhitespace!==e.ignoreTrimWhitespace,renderIndicators:t.renderIndicators!==e.renderIndicators,originalEditable:t.originalEditable!==e.originalEditable,diffCodeLens:t.diffCodeLens!==e.diffCodeLens,renderOverviewRuler:t.renderOverviewRuler!==e.renderOverviewRuler,diffWordWrap:t.diffWordWrap!==e.diffWordWrap}}Yt((t,e)=>{const i=t.getColor(J2);i&&e.addRule(`.monaco-editor .char-insert, .monaco-diff-editor .char-insert { background-color: ${i}; }`);const n=t.getColor(BR)||i;n&&e.addRule(`.monaco-editor .line-insert, .monaco-diff-editor .line-insert { background-color: ${n}; }`);const s=t.getColor(WR)||n;s&&(e.addRule(`.monaco-editor .inline-added-margin-view-zone { background-color: ${s}; }`),e.addRule(`.monaco-editor .gutter-insert, .monaco-diff-editor .gutter-insert { background-color: ${s}; }`));const r=t.getColor(ek);r&&e.addRule(`.monaco-editor .char-delete, .monaco-diff-editor .char-delete { background-color: ${r}; }`);const o=t.getColor(VR)||r;o&&e.addRule(`.monaco-editor .line-delete, .monaco-diff-editor .line-delete { background-color: ${o}; }`);const a=t.getColor(HR)||o;a&&(e.addRule(`.monaco-editor .inline-deleted-margin-view-zone { background-color: ${a}; }`),e.addRule(`.monaco-editor .gutter-delete, .monaco-diff-editor .gutter-delete { background-color: ${a}; }`));const l=t.getColor($R);l&&e.addRule(`.monaco-editor .line-insert, .monaco-editor .char-insert { border: 1px ${t.type==="hc"?"dashed":"solid"} ${l}; }`);const h=t.getColor(KR);h&&e.addRule(`.monaco-editor .line-delete, .monaco-editor .char-delete { border: 1px ${t.type==="hc"?"dashed":"solid"} ${h}; }`);const c=t.getColor($a);c&&e.addRule(`.monaco-diff-editor.side-by-side .editor.modified { box-shadow: -6px 0 5px -5px ${c}; }`);const d=t.getColor(jR);d&&e.addRule(`.monaco-diff-editor.side-by-side .editor.modified { border-left: 1px solid ${d}; }`);const u=t.getColor(aa);u&&e.addRule(`
108			.monaco-diff-editor .diffViewport {
109				background: ${u};
110			}
111		`);const g=t.getColor(la);g&&e.addRule(`
112			.monaco-diff-editor .diffViewport:hover {
113				background: ${g};
114			}
115		`);const m=t.getColor(ha);m&&e.addRule(`
116			.monaco-diff-editor .diffViewport:active {
117				background: ${m};
118			}
119		`);const _=t.getColor(qR);e.addRule(`
120	.monaco-editor .diagonal-fill {
121		background-image: linear-gradient(
122			-45deg,
123			${_} 12.5%,
124			#0000 12.5%, #0000 50%,
125			${_} 50%, ${_} 62.5%,
126			#0000 62.5%, #0000 100%
127		);
128		background-size: 8px 8px;
129	}
130	`)});
130var c8=function(t,e,i,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r},d8=function(t,e){return function(i,n){e(i,n,t)}},I_=class extends V{constructor(e){super(),this._themeService=e,this._onCodeEditorAdd=this._register(new M),this.onCodeEditorAdd=this._onCodeEditorAdd.event,this._onCodeEditorRemove=this._register(new M),this.onCodeEditorRemove=this._onCodeEditorRemove.event,this._onDiffEditorAdd=this._register(new M),this.onDiffEditorAdd=this._onDiffEditorAdd.event,this._onDiffEditorRemove=this._register(new M),this.onDiffEditorRemove=this._onDiffEditorRemove.event,this._decorationOptionProviders=new Map,this._modelProperties=new Map,this._codeEditors=Object.create(null),this._diffEditors=Object.create(null),this._globalStyleSheet=null}addCodeEditor(e){this._codeEditors[e.getId()]=e,this._onCodeEditorAdd.fire(e)}removeCodeEditor(e){delete this._codeEditors[e.getId()]&&this._onCodeEditorRemove.fire(e)}listCodeEditors(){return Object.keys(this._codeEditors).map(e=>this._codeEditors[e])}addDiffEditor(e){this._diffEditors[e.getId()]=e,this._onDiffEditorAdd.fire(e)}removeDiffEditor(e){delete this._diffEditors[e.getId()]&&this._onDiffEditorRemove.fire(e)}listDiffEditors(){return Object.keys(this._diffEditors).map(e=>this._diffEditors[e])}getFocusedCodeEditor(){let e=null;const i=this.listCodeEditors();for(const n of i){if(n.hasTextFocus())return n;n.hasWidgetFocus()&&(e=n)}return e}removeDecorationType(e){const i=this._decorationOptionProviders.get(e);i&&(i.refCount--,i.refCount<=0&&(this._decorationOptionProviders.delete(e),i.dispose(),this.listCodeEditors().forEach(n=>n.removeDecorations(e))))}setModelProperty(e,i,n){const s=e.toString();let r;this._modelProperties.has(s)?r=this._modelProperties.get(s):(r=new Map,this._modelProperties.set(s,r)),r.set(i,n)}getModelProperty(e,i){const n=e.toString();if(this._modelProperties.has(n))return this._modelProperties.get(n).get(i)}};I_=c8([d8(0,et)],I_);var u8=function(t,e,i,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r},Lw=function(t,e){return function(i,n){e(i,n,t)}},bu=class extends I_{constructor(e,i){super(i),this.onCodeEditorAdd(()=>this._checkContextKey()),this.onCodeEditorRemove(()=>this._checkContextKey()),this._editorIsOpen=e.createKey("editorIsOpen",!1),this._activeCodeEditor=null}_checkContextKey(){let e=!1;for(const i of this.listCodeEditors())if(!i.isSimpleWidget){e=!0;break}this._editorIsOpen.set(e)}setActiveCodeEditor(e){this._activeCodeEditor=e}getActiveCodeEditor(){return this._activeCodeEditor}openCodeEditor(e,i,n){return i?Promise.resolve(this.doOpenEditor(i,e)):Promise.resolve(null)}doOpenEditor(e,i){if(!this.findModel(e,i.resource)){if(i.resource){const s=i.resource.scheme;if(s===_e.http||s===_e.https)return XL(i.resource.toString()),e}return null}const n=i.options?i.options.selection:null;if(n)if(typeof n.endLineNumber=="number"&&typeof n.endColumn=="number")e.setSelection(n),e.revealRangeInCenter(n,1);else{const s={lineNumber:n.startLineNumber,column:n.startColumn};e.setPosition(s),e.revealPositionInCenter(s,1)}return e}findModel(e,i){const n=e.getModel();return n&&n.uri.toString()!==i.toString()?null:n}};bu=u8([Lw(0,Ie),Lw(1,et)],bu);ve(pt,bu);var Uh=ge("layoutService"),qx=function(t,e,i,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r},Gx=function(t,e){return function(i,n){e(i,n,t)}},wu=class{constructor(e){this._codeEditorService=e,this.onDidLayout=$.None}get dimension(){return this._dimension||(this._dimension=$L(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 e;(e=this._codeEditorService.getFocusedCodeEditor())===null||e===void 0||e.focus()}};wu=qx([Gx(0,pt)],wu);var E_=class extends wu{constructor(e,i){super(i),this._container=e}get hasContainer(){return!1}get container(){return this._container}}
130;E_=qx([Gx(1,pt)],E_);ve(Uh,wu);var Zx=ge("dialogService"),f8=function(t,e,i,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r},kw=function(t,e){return function(i,n){e(i,n,t)}},wc=function(t,e,i,n){function s(r){return r instanceof i?r:new i(function(o){o(r)})}return new(i||(i=Promise))(function(r,o){function a(c){try{h(n.next(c))}catch(d){o(d)}}function l(c){try{h(n.throw(c))}catch(d){o(d)}}function h(c){c.done?r(c.value):s(c.value).then(a,l)}h((n=n.apply(t,e||[])).next())})};function Sc(t){return t.scheme===_e.file?t.fsPath:t.path}var Yx=0,yc=class{constructor(t,e,i,n,s,r,o){this.id=++Yx,this.type=0,this.actual=t,this.label=t.label,this.confirmBeforeUndo=t.confirmBeforeUndo||!1,this.resourceLabel=e,this.strResource=i,this.resourceLabels=[this.resourceLabel],this.strResources=[this.strResource],this.groupId=n,this.groupOrder=s,this.sourceId=r,this.sourceOrder=o,this.isValid=!0}setValid(t){this.isValid=t}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.isValid?"  VALID":"INVALID"}] ${this.actual.constructor.name} - ${this.actual}`}},xw=class{constructor(t,e){this.resourceLabel=t,this.reason=e}},Iw=class{constructor(){this.elements=new Map}createMessage(){const t=[],e=[];for(const[,n]of this.elements)(n.reason===0?t:e).push(n.resourceLabel);let i=[];return t.length>0&&i.push(p({key:"externalRemoval",comment:["{0} is a list of filenames"]},"The following files have been closed and modified on disk: {0}.",t.join(", "))),e.length>0&&i.push(p({key:"noParallelUniverses",comment:["{0} is a list of filenames"]},"The following files have been modified in an incompatible way: {0}.",e.join(", "))),i.join(`
131`)}get size(){return this.elements.size}has(t){return this.elements.has(t)}set(t,e){this.elements.set(t,e)}delete(t){return this.elements.delete(t)}},g8=class{constructor(t,e,i,n,s,r,o){this.id=++Yx,this.type=1,this.actual=t,this.label=t.label,this.confirmBeforeUndo=t.confirmBeforeUndo||!1,this.resourceLabels=e,this.strResources=i,this.groupId=n,this.groupOrder=s,this.sourceId=r,this.sourceOrder=o,this.removedResources=null,this.invalidatedResources=null}canSplit(){return typeof this.actual.split=="function"}removeResource(t,e,i){this.removedResources||(this.removedResources=new Iw),this.removedResources.has(e)||this.removedResources.set(e,new xw(t,i))}setValid(t,e,i){i?this.invalidatedResources&&(this.invalidatedResources.delete(e),this.invalidatedResources.size===0&&(this.invalidatedResources=null)):(this.invalidatedResources||(this.invalidatedResources=new Iw),this.invalidatedResources.has(e)||this.invalidatedResources.set(e,new xw(t,0)))}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.invalidatedResources?"INVALID":"  VALID"}] ${this.actual.constructor.name} - ${this.actual}`}},Xx=class{constructor(t,e){this.resourceLabel=t,this.strResource=e,this._past=[],this._future=[],this.locked=!1,this.versionId=1}dispose(){for(const t of this._past)t.type===1&&t.removeResource(this.resourceLabel,this.strResource,0);for(const t of this._future)t.type===1&&t.removeResource(this.resourceLabel,this.strResource,0);this.versionId++}toString(){let t=[];t.push(`* ${this.strResource}:`);for(let e=0;e<this._past.length;e++)t.push(`   * [UNDO] ${this._past[e]}`);for(let e=this._future.length-1;e>=0;e--)t.push(`   * [REDO] ${this._future[e]}`);return t.join(`
132`)}flushAllElements(){this._past=[],this._future=[],this.versionId++}_setElementValidFlag(t,e){t.type===1?t.setValid(this.resourceLabel,this.strResource,e):t.setValid(e)}setElementsValidFlag(t,e){for(const i of this._past)e(i.actual)&&this._setElementValidFlag(i,t);for(const i of this._future)e(i.actual)&&this._setElementValidFlag(i,t)}pushElement(t){for(const e of this._future)e.type===1&&e.removeResource(this.resourceLabel,this.strResource,1);this._future=[],this._past.push(t),this.versionId++}createSnapshot(t){const e=[];for(let i=0,n=this._past.length;i<n;i++)e.push(this._past[i].id);for(let i=this._future.length-1;i>=0;i--)e.push(this._future[i].id);return new Dx(t,e)}restoreSnapshot(t){const e=t.elements.length;let i=!0,n=0,s=-1;for(let o=0,a=this._past.length;o<a;o++,n++){const l=this._past[o];i&&(n>=e||l.id!==t.elements[n])&&(i=!1,s=0),!i&&l.type===1&&l.removeResource(this.resourceLabel,this.strResource,0)}let r=-1;for(let o=this._future.length-1;o>=0;o--,n++){const a=this._future[o];i&&(n>=e||a.id!==t.elements[n])&&(i=!1,r=o),!i&&a.type===1&&a.removeResource(this.resourceLabel,this.strResource,0)}s!==-1&&(this._past=this._past.slice(0,s)),r!==-1&&(this._future=this._future.slice(r+1)),this.versionId++}getElements(){const t=[],e=[];for(const i of this._past)t.push(i.actual);for(const i of this._future)e.push(i.actual);return{past:t,future:e}}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}
vendor: 5,097 bytes, line 132
132splitPastWorkspaceElement(t,e){for(let i=this._past.length-1;i>=0;i--)if(this._past[i]===t){e.has(this.strResource)?this._past[i]=e.get(this.strResource):this._past.splice(i,1);break}this.versionId++}splitFutureWorkspaceElement(t,e){for(let i=this._future.length-1;i>=0;i--)if(this._future[i]===t){e.has(this.strResource)?this._future[i]=e.get(this.strResource):this._future.splice(i,1);break}this.versionId++}moveBackward(t){this._past.pop(),this._future.push(t),this.versionId++}moveForward(t){this._future.pop(),this._past.push(t),this.versionId++}},Dg=class{constructor(t){this.editStacks=t,this._versionIds=[];for(let e=0,i=this.editStacks.length;e<i;e++)this._versionIds[e]=this.editStacks[e].versionId}isValid(){for(let t=0,e=this.editStacks.length;t<e;t++)if(this._versionIds[t]!==this.editStacks[t].versionId)return!1;return!0}},Qx=new Xx("","");Qx.locked=!0;var D_=class{constructor(e,i){this._dialogService=e,this._notificationService=i,this._editStacks=new Map,this._uriComparisonKeyComputers=[]}getUriComparisonKey(e){for(const i of this._uriComparisonKeyComputers)if(i[0]===e.scheme)return i[1].getComparisonKey(e);return e.toString()}_print(e){let i=[];for(const n of this._editStacks)i.push(n[1].toString())}pushElement(e,i=fu.None,n=zs.None){if(e.type===0){const s=Sc(e.resource),r=this.getUriComparisonKey(e.resource);this._pushElement(new yc(e,s,r,i.id,i.nextOrder(),n.id,n.nextOrder()))}else{const s=new Set,r=[],o=[];for(const a of e.resources){const l=Sc(a),h=this.getUriComparisonKey(a);s.has(h)||(s.add(h),r.push(l),o.push(h))}r.length===1?this._pushElement(new yc(e,r[0],o[0],i.id,i.nextOrder(),n.id,n.nextOrder())):this._pushElement(new g8(e,r,o,i.id,i.nextOrder(),n.id,n.nextOrder()))}}_pushElement(e){for(let i=0,n=e.strResources.length;i<n;i++){const s=e.resourceLabels[i],r=e.strResources[i];let o;this._editStacks.has(r)?o=this._editStacks.get(r):(o=new Xx(s,r),this._editStacks.set(r,o)),o.pushElement(e)}}getLastElement(e){const i=this.getUriComparisonKey(e);if(this._editStacks.has(i)){const n=this._editStacks.get(i);if(n.hasFutureElements())return null;const s=n.getClosestPastElement();return s?s.actual:null}return null}_splitPastWorkspaceElement(e,i){const n=e.actual.split(),s=new Map;for(const r of n){const o=Sc(r.resource),a=this.getUriComparisonKey(r.resource),l=new yc(r,o,a,0,0,0,0);s.set(l.strResource,l)}for(const r of e.strResources)i&&i.has(r)||this._editStacks.get(r).splitPastWorkspaceElement(e,s)}_splitFutureWorkspaceElement(e,i){const n=e.actual.split(),s=new Map;for(const r of n){const o=Sc(r.resource),a=this.getUriComparisonKey(r.resource),l=new yc(r,o,a,0,0,0,0);s.set(l.strResource,l)}for(const r of e.strResources)i&&i.has(r)||this._editStacks.get(r).splitFutureWorkspaceElement(e,s)}removeElements(e){const i=typeof e=="string"?e:this.getUriComparisonKey(e);this._editStacks.has(i)&&(this._editStacks.get(i).dispose(),this._editStacks.delete(i))}setElementsValidFlag(e,i,n){const s=this.getUriComparisonKey(e);this._editStacks.has(s)&&this._editStacks.get(s).setElementsValidFlag(i,n)}createSnapshot(e){const i=this.getUriComparisonKey(e);return this._editStacks.has(i)?this._editStacks.get(i).createSnapshot(e):new Dx(e,[])}restoreSnapshot(e){const i=this.getUriComparisonKey(e.resource);if(this._editStacks.has(i)){const n=this._editStacks.get(i);n.restoreSnapshot(e),!n.hasPastElements()&&!n.hasFutureElements()&&(n.dispose(),this._editStacks.delete(i))}}getElements(e){const i=this.getUriComparisonKey(e);return this._editStacks.has(i)?this._editStacks.get(i).getElements():{past:[],future:[]}}_findClosestUndoElementWithSource(e){if(!e)return[null,null];let i=null,n=null;for(const[s,r]of this._editStacks){const o=r.getClosestPastElement();o&&o.sourceId===e&&(!i||o.sourceOrder>i.sourceOrder)&&(i=o,n=s)}return[i,n]}canUndo(e){if(e instanceof zs){const[,n]=this._findClosestUndoElementWithSource(e.id);return!!n}const i=this.getUriComparisonKey(e);return this._editStacks.has(i)?this._editStacks.get(i).hasPastElements():!1}_onError(e,i){We(e);for(const n of i.strResources)this.removeElements(n);this._notificationService.error(e)}_acquireLocks(e){for(const i of e.editStacks)if(i.locked)throw new Error("Cannot acquire edit stack lock");for(const i of e.editStacks)i.locked=!0;return()=>{for(const i of e.editStacks)i.locked=!1}}_safeInvokeWithLocks(e,i,n,s,r){const o=this._acquireLocks(n);let a;try{a=i()}catch(l){return o(),s.dispose(),this._onError(l,e)}return a?a.then(()=>(o(),s.dispose(),r()),l=>(o(),s.dispose(),this._onError(l,e))):(o(),s.dispose(),r())}_invokeWorkspacePrepare(e){return wc(this,void 0,void 0,function*(){if(typeof e.actual.prepareUndoRedo>"u")return V.None;const i=e.actual.prepareUndoRedo();return typeof i>"u"?V.None:i})}_invokeResourcePrepare(e,i){if(e.actual.type!==1||typeof e.actual.prepareUndoRedo>"u")return i(V.None);const n=e.actual.prepareUndoRedo();return n?JN(n)?i(n):n.then(s=>i(s)):i(V.None)}_getAffectedEditStacks(e){const i=[];for(const n of e.strResources)i.push(this._editStacks.get(n)||Qx);return new Dg(i)}_tryToSplitAndUndo(e,i,n,s){if(i.canSplit())return this._splitPastWorksp
132aceElement(i,n),this._notificationService.warn(s),new Lc(this._undo(e,0,!0));for(const r of i.strResources)this.removeElements(r);return this._notificationService.warn(s),new Lc}_checkWorkspaceUndo(e,i,n,s){if(i.removedResources)return this._tryToSplitAndUndo(e,i,i.removedResources,p({key:"cannotWorkspaceUndo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not undo '{0}' across all files. {1}",i.label,i.removedResources.createMessage()));if(s&&i.invalidatedResources)return this._tryToSplitAndUndo(e,i,i.invalidatedResources,p({key:"cannotWorkspaceUndo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not undo '{0}' across all files. {1}",i.label,i.invalidatedResources.createMessage()));const r=[];for(const a of n.editStacks)a.getClosestPastElement()!==i&&r.push(a.resourceLabel);if(r.length>0)return this._tryToSplitAndUndo(e,i,null,p({key:"cannotWorkspaceUndoDueToChanges",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because changes were made to {1}",i.label,r.join(", ")));const o=[];for(const a of n.editStacks)a.locked&&o.push(a.resourceLabel);return o.length>0?this._tryToSplitAndUndo(e,i,null,p({key:"cannotWorkspaceUndoDueToInProgressUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because there is already an undo or redo operation running on {1}",i.label,o.join(", "))):n.isValid()?null:this._tryToSplitAndUndo(e,i,null,p({key:"cannotWorkspaceUndoDueToInMeantimeUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because an undo or redo operation occurred in the meantime",i.label))}_workspaceUndo(e,i,n){const s=this._getAffectedEditStacks(i),r=this._checkWorkspaceUndo(e,i,s,!1);return r?r.returnValue:this._confirmAndExecuteWorkspaceUndo(e,i,s,n)}_isPartOfUndoGroup(e){if(!e.groupId)return!1;for(const[,i]of this._editStacks){const n=i.getClosestPastElement();if(n){if(n===e){const s=i.getSecondClosestPastElement();if(s&&s.groupId===e.groupId)return!0}if(n.groupId===e.groupId)return!0}}return!1}_confirmAndExecuteWorkspaceUndo(e,i,n,s){return wc(this,void 0,void 0,function*(){if(i.canSplit()&&!this._isPartOfUndoGroup(i)){const a=yield this._dialogService.show(it.Info,p("confirmWorkspace","Would you like to undo '{0}' across all files?",i.label),[p({key:"ok",comment:["{0} denotes a number that is > 1"]},"Undo in {0} Files",n.editStacks.length),p("nok","Undo this File"),p("cancel","Cancel")],{cancelId:2});if(a.choice===2)return;
132if(a.choice===1)return this._splitPastWorkspaceElement(i,null),this._undo(e,0,!0);const l=this._checkWorkspaceUndo(e,i,n,!1);if(l)return l.returnValue;s=!0}let r;try{r=yield this._invokeWorkspacePrepare(i)}catch(a){return this._onError(a,i)}const o=this._checkWorkspaceUndo(e,i,n,!0);if(o)return r.dispose(),o.returnValue;for(const a of n.editStacks)a.moveBackward(i);return this._safeInvokeWithLocks(i,()=>i.actual.undo(),n,r,()=>this._continueUndoInGroup(i.groupId,s))})}_resourceUndo(e,i,n){if(!i.isValid){e.flushAllElements();return}if(e.locked){const s=p({key:"cannotResourceUndoDueToInProgressUndoRedo",comment:["{0} is a label for an operation."]},"Could not undo '{0}' because there is already an undo or redo operation running.",i.label);this._notificationService.warn(s);return}return this._invokeResourcePrepare(i,s=>(e.moveBackward(i),this._safeInvokeWithLocks(i,()=>i.actual.undo(),new Dg([e]),s,()=>this._continueUndoInGroup(i.groupId,n))))}_findClosestUndoElementInGroup(e){if(!e)return[null,null];let i=null,n=null;for(const[s,r]of this._editStacks){const o=r.getClosestPastElement();o&&o.groupId===e&&(!i||o.groupOrder>i.groupOrder)&&(i=o,n=s)}return[i,n]}_continueUndoInGroup(e,i){if(!e)return;const[,n]=this._findClosestUndoElementInGroup(e);if(n)return this._undo(n,0,i)}undo(e){if(e instanceof zs){const[,i]=this._findClosestUndoElementWithSource(e.id);return i?this._undo(i,e.id,!1):void 0}return typeof e=="string"?this._undo(e,0,!1):this._undo(this.getUriComparisonKey(e),0,!1)}_undo(e,i=0,n){if(!this._editStacks.has(e))return;const s=this._editStacks.get(e),r=s.getClosestPastElement();if(r){if(r.groupId){const[o,a]=this._findClosestUndoElementInGroup(r.groupId);if(r!==o&&a)return this._undo(a,i,n)}return(r.sourceId!==i||r.confirmBeforeUndo)&&!n?this._confirmAndContinueUndo(e,i,r):r.type===1?this._workspaceUndo(e,r,n):this._resourceUndo(s,r,n)}}_confirmAndContinueUndo(e,i,n){return wc(this,void 0,void 0,function*(){if((yield this._dialogService.show(it.Info,p("confirmDifferentSource","Would you like to undo '{0}'?",n.label),[p("confirmDifferentSource.yes","Yes"),p("confirmDifferentSource.no","No")],{cancelId:1})).choice!==1)return this._undo(e,i,!0)})}_findClosestRedoElementWithSource(e){if(!e)return[null,null];let i=null,n=null;for(const[s,r]of this._editStacks){const o=r.getClosestFutureElement();o&&o.sourceId===e&&(!i||o.sourceOrder<i.sourceOrder)&&(i=o,n=s)}return[i,n]}canRedo(e){if(e instanceof zs){const[,n]=this._findClosestRedoElementWithSource(e.id);return!!n}const i=this.getUriComparisonKey(e);return this._editStacks.has(i)?this._editStacks.get(i).hasFutureElements():!1}_tryToSplitAndRedo(e,i,n,s){if(i.canSplit())return this._splitFutureWorkspaceElement(i,n),this._notificationService.warn(s),new Lc(this._redo(e));for(const r of i.strResources)this.removeElements(r);return this._notificationService.warn(s),new Lc}_checkWorkspaceRedo(e,i,n,s){if(i.removedResources)return this._tryToSplitAndRedo(e,i,i.removedResources,p({key:"cannotWorkspaceRedo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not redo '{0}' across all files. {1}",i.label,i.removedResources.createMessage()));if(s&&i.invalidatedResources)return this._tryToSplitAndRedo(e,i,i.invalidatedResources,p({key:"cannotWorkspaceRedo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not redo '{0}' across all files. {1}",i.label,i.invalidatedResources.createMessage()));const r=[];for(const a of n.editStacks)a.getClosestFutureElement()!==i&&r.push(a.resourceLabel);if(r.length>0)return this._tryToSplitAndRedo(e,i,null,p({key:"cannotWorkspaceRedoDueToChanges",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because changes were made to {1}",i.label,r.join(", ")));const o=[];for(const a of n.editStacks)a.locked&&o.push(a.resourceLabel);return o.length>0?this._tryToSplitAndRedo(e,i,null,p({key:"cannotWorkspaceRedoDueToInProgressUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because there is already an undo or redo operation running on {1}",i.label,o.join(", "))):n.isValid()?null:this._tryToSplitAndRedo(e,i,null,p({key:"cannotWorkspaceRedoDueToInMeantimeUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because an undo or redo operation occurred in the meantime",i.label))}_workspaceRedo(e,i){const n=this._getAffectedEditStacks(i),s=this._checkWorkspaceRedo(e,i,n,!1);return s?s.returnValue:this._executeWorkspaceRedo(e,i,n)}_executeWorkspaceRedo(e,i,n){return wc(this,void 0,void 0,function*(){let s;try{s=yield this._invokeWorkspacePrepare(i)}catch(o){return this._onError(o,i)}const r=this._checkWorkspaceRedo(e,i,n,!0);if(r)return s.dispose(),r.returnValue;for(const o of n.editStacks)o.moveForward(i);return this._safeInvokeWithLocks(i,()=>i.actual.redo(),n,s,()=>this._continueRedoInGroup(i.groupId))})}_resourceRedo(e,i){if(!i.isValid){e.flushAllElements();return}if(e.locked){const n=p({key:"cannotResourceRedoDueToInProgressUndoRedo",comment:["{0} is a label for an operation."]},"Could not redo '{0}' because there is already an undo or redo operation running.",i.label);this._notificationService.warn(n);return}return this._invokeResourcePrepare(i,n=>(e.moveForward(i),this._safeInvokeWithLocks(i,()=>i.actual.redo(),new Dg([e]),n,()=>this._continueRedoInGroup(i.groupId))))}
132_findClosestRedoElementInGroup(e){if(!e)return[null,null];let i=null,n=null;for(const[s,r]of this._editStacks){const o=r.getClosestFutureElement();o&&o.groupId===e&&(!i||o.groupOrder<i.groupOrder)&&(i=o,n=s)}return[i,n]}_continueRedoInGroup(e){if(!e)return;const[,i]=this._findClosestRedoElementInGroup(e);if(i)return this._redo(i)}redo(e){if(e instanceof zs){const[,i]=this._findClosestRedoElementWithSource(e.id);return i?this._redo(i):void 0}return typeof e=="string"?this._redo(e):this._redo(this.getUriComparisonKey(e))}_redo(e){if(!this._editStacks.has(e))return;const i=this._editStacks.get(e),n=i.getClosestFutureElement();if(n){if(n.groupId){const[s,r]=this._findClosestRedoElementInGroup(n.groupId);if(n!==s&&r)return this._redo(r)}return n.type===1?this._workspaceRedo(e,n):this._resourceRedo(i,n)}}};D_=f8([kw(0,Zx),kw(1,wn)],D_);var Lc=class{constructor(t){this.returnValue=t}};ve(e0,D_);var Ew,Dw,m8=class{constructor(){this._value="",this._pos=0}reset(t){return this._value=t,this._pos=0,this}next(){return this._pos+=1,this}hasNext(){return this._pos<this._value.length-1}cmp(t){return t.charCodeAt(0)-this._value.charCodeAt(this._pos)}value(){return this._value[this._pos]}},p8=class{constructor(t=!0){this._caseSensitive=t}reset(t){return this._value=t,this._from=0,this._to=0,this.next()}hasNext(){return this._to<this._value.length}next(){this._from=this._to;let t=!0;for(;this._to<this._value.length;this._to++)if(this._value.charCodeAt(this._to)===46)if(t)this._from++;else break;else t=!1;return this}cmp(t){return this._caseSensitive?nv(t,this._value,0,t.length,this._from,this._to):Mh(t,this._value,0,t.length,this._from,this._to)}value(){return this._value.substring(this._from,this._to)}},_8=class{constructor(t=!0,e=!0){this._splitOnBackslash=t,this._caseSensitive=e}reset(t){this._from=0,this._to=0,this._value=t,this._valueLen=t.length;for(let e=t.length-1;e>=0;e--,this._valueLen--){const i=this._value.charCodeAt(e);if(!(i===47||this._splitOnBackslash&&i===92))break}return this.next()}hasNext(){return this._to<this._valueLen}next(){this._from=this._to;let t=!0;for(;this._to<this._valueLen;this._to++){const e=this._value.charCodeAt(this._to);if(e===47||this._splitOnBackslash&&e===92)if(t)this._from++;else break;else t=!1}return this}cmp(t){return this._caseSensitive?nv(t,this._value,0,t.length,this._from,this._to):Mh(t,this._value,0,t.length,this._from,this._to)}value(){return this._value.substring(this._from,this._to)}},v8=class{constructor(t){this._ignorePathCasing=t,this._states=[],this._stateIdx=0}reset(t){return this._value=t,this._states=[],this._value.scheme&&this._states.push(1),this._value.authority&&this._states.push(2),this._value.path&&(this._pathIterator=new _8(!1,!this._ignorePathCasing(t)),this._pathIterator.reset(t.path),this._pathIterator.value()&&this._states.push(3)),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(t){if(this._states[this._stateIdx]===1)return iC(t,this._value.scheme);if(this._states[this._stateIdx]===2)return iC(t,this._value.authority);if(this._states[this._stateIdx]===3)return this._pathIterator.cmp(t);if(this._states[this._stateIdx]===4)return zm(t,this._value.query);if(this._states[this._stateIdx]===5)return zm(t,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}},kc=class{constructor(){this.height=1}rotateLeft(){const t=this.right;return this.right=t.left,t.left=this,this.updateHeight(),t.updateHeight(),t}rotateRight(){const t=this.left;return this.left=t.right,t.right=this,this.updateHeight(),t.updateHeight(),t}updateHeight(){this.height=1+Math.max(this.heightLeft,this.heightRight)}balanceFactor(){return this.heightRight-this.heightLeft}get heightLeft(){var t,e;return(e=(t=this.left)===null||t===void 0?void 0:t.height)!==null&&e!==void 0?e:0}get heightRight(){var t,e;return(e=(t=this.right)===null||t===void 0?void 0:t.height)!==null&&e!==void 0?e:0}},C8=class _d{constructor(e){this._iter=e}static forUris(e=()=>!1){return new _d(new v8(e))}static forStrings(){return new _d(new m8)}static forConfigKeys(){return new _d(new p8)}clear(){this._root=void 0}set(e,i){const n=this._iter.reset(e);let s;this._root||(this._root=new kc,this._root.segment=n.value());const r=[];for(s=this._root;;){const a=n.cmp(s.segment);if(a>
1320)s.left||(s.left=new kc,s.left.segment=n.value()),r.push([-1,s]),s=s.left;else if(a<0)s.right||(s.right=new kc,s.right.segment=n.value()),r.push([1,s]),s=s.right;else if(n.hasNext())n.next(),s.mid||(s.mid=new kc,s.mid.segment=n.value()),r.push([0,s]),s=s.mid;else break}const o=s.value;s.value=i,s.key=e;for(let a=r.length-1;a>=0;a--){const l=r[a][1];l.updateHeight();const h=l.balanceFactor();if(h<-1||h>1){const c=r[a][0],d=r[a+1][0];if(c===1&&d===1)r[a][1]=l.rotateLeft();else if(c===-1&&d===-1)r[a][1]=l.rotateRight();else if(c===1&&d===-1)l.right=r[a+1][1]=r[a+1][1].rotateRight(),r[a][1]=l.rotateLeft();else if(c===-1&&d===1)l.left=r[a+1][1]=r[a+1][1].rotateLeft(),r[a][1]=l.rotateRight();else throw new Error;if(a>0)switch(r[a-1][0]){case-1:r[a-1][1].left=r[a][1];break;case 1:r[a-1][1].right=r[a][1];break;case 0:r[a-1][1].mid=r[a][1]}else this._root=r[0][1]}}return o}get(e){var i;return(i=this._getNode(e))===null||i===void 0?void 0:i.value}_getNode(e){const i=this._iter.reset(e);let n=this._root;for(;n;){const s=i.cmp(n.segment);if(s>0)n=n.left;else if(s<0)n=n.right;else if(i.hasNext())i.next(),n=n.mid;else break}return n}has(e){const i=this._getNode(e);return!(i?.value===void 0&&i?.mid===void 0)}delete(e){return this._delete(e,!1)}deleteSuperstr(e){return this._delete(e,!0)}_delete(e,i){var n;const s=this._iter.reset(e),r=[];let o=this._root;for(;o;){const a=s.cmp(o.segment);if(a>0)r.push([-1,o]),o=o.left;else if(a<0)r.push([1,o]),o=o.right;else if(s.hasNext())s.next(),r.push([0,o]),o=o.mid;else break}if(o){if(i?(o.left=void 0,o.mid=void 0,o.right=void 0,o.height=1):(o.key=void 0,o.value=void 0),!o.mid&&!o.value)if(o.left&&o.right){const a=this._min(o.right),{key:l,value:h,segment:c}=a;this._delete(a.key,!1),o.key=l,o.value=h,o.segment=c}else{const a=(n=o.left)!==null&&n!==void 0?n:o.right;if(r.length>0){const[l,h]=r[r.length-1];switch(l){case-1:h.left=a;break;case 0:h.mid=a;break;case 1:h.right=a}}else this._root=a}for(let a=r.length-1;a>=0;a--){const l=r[a][1];l.updateHeight();const h=l.balanceFactor();if(h>1?(l.right.balanceFactor()>=0||(l.right=l.right.rotateRight()),r[a][1]=l.rotateLeft()):h<-1&&(l.left.balanceFactor()<=0||(l.left=l.left.rotateLeft()),r[a][1]=l.rotateRight()),a>0)switch(r[a-1][0]){case-1:r[a-1][1].left=r[a][1];break;case 1:r[a-1][1].right=r[a][1];break;case 0:r[a-1][1].mid=r[a][1]}else this._root=r[0][1]}}}_min(e){for(;e.left;)e=e.left;return e}findSubstr(e){const i=this._iter.reset(e);let n=this._root,s;for(;n;){const r=i.cmp(n.segment);if(r>0)n=n.left;else if(r<0)n=n.right;else if(i.hasNext())i.next(),s=n.value||s,n=n.mid;else break}return n&&n.value||s}findSuperstr(e){const i=this._iter.reset(e);let n=this._root;for(;n;){const s=i.cmp(n.segment);if(s>0)n=n.left;else if(s<0)n=n.right;else if(i.hasNext())i.next(),n=n.mid;else return n.mid?this._entries(n.mid):void 0}}forEach(e){for(const[i,n]of this)e(n,i)}*[Symbol.iterator](){yield*this._entries(this._root)}*_entries(e){e&&(e.left&&(yield*this._entries(e.left)),e.value&&(yield[e.key,e.value]),e.mid&&(yield*this._entries(e.mid)),e.right&&(yield*this._entries(e.right)))}},b8=class{constructor(t,e){this.uri=t,this.value=e}},$i=class vd{constructor(e,i){this[Ew]="ResourceMap",e instanceof vd?(this.map=new Map(e.map),this.toKey=i??vd.defaultToKey):(this.map=new Map,this.toKey=e??vd.defaultToKey)}set(e,i){return this.map.set(this.toKey(e),new b8(e,i)),this}get(e){var i;return(i=this.map.get(this.toKey(e)))===null||i===void 0?void 0:i.value}has(e){return this.map.has(this.toKey(e))}get size(){return this.map.size}clear(){this.map.clear()}delete(e){return this.map.delete(this.toKey(e))}forEach(e,i){typeof i<"u"&&(e=e.bind(i));for(let[n,s]of this.map)e(s.value,s.uri,this)}*values(){for(let e of this.map.values())yield e.value}*keys(){for(let e of this.map.values())yield e.uri}*entries(){for(let e of this.map.values())yield[e.uri,e.value]}*[(Ew=Symbol.toStringTag,Symbol.iterator)](){for(let[,e]of this.map)yield[e.uri,e.value]}};$i.defaultToKey=t=>t.toString();var w8=class{constructor(){this[Dw]="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
vendor: 4,734 bytes, line 132
132++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){var t;return(t=this._head)===null||t===void 0?void 0:t.value}get last(){var t;return(t=this._tail)===null||t===void 0?void 0:t.value}has(t){return this._map.has(t)}get(t,e=0){const i=this._map.get(t);if(i)return e!==0&&this.touch(i,e),i.value}set(t,e,i=0){let n=this._map.get(t);if(n)n.value=e,i!==0&&this.touch(n,i);else{switch(n={key:t,value:e,next:void 0,previous:void 0},i){case 0:this.addItemLast(n);break;case 1:this.addItemFirst(n);break;case 2:this.addItemLast(n);break;default:this.addItemLast(n)}this._map.set(t,n),this._size++}return this}delete(t){return!!this.remove(t)}remove(t){const e=this._map.get(t);if(e)return this._map.delete(t),this.removeItem(e),this._size--,e.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const t=this._head;return this._map.delete(t.key),this.removeItem(t),this._size--,t.value}forEach(t,e){const i=this._state;let n=this._head;for(;n;){if(e?t.bind(e)(n.value,n.key,this):t(n.value,n.key,this),this._state!==i)throw new Error("LinkedMap got modified during iteration.");n=n.next}}keys(){const t=this,e=this._state;let i=this._head;const n={[Symbol.iterator](){return n},next(){if(t._state!==e)throw new Error("LinkedMap got modified during iteration.");if(i){const s={value:i.key,done:!1};return i=i.next,s}else return{value:void 0,done:!0}}};return n}values(){const t=this,e=this._state;let i=this._head;const n={[Symbol.iterator](){return n},next(){if(t._state!==e)throw new Error("LinkedMap got modified during iteration.");if(i){const s={value:i.value,done:!1};return i=i.next,s}else return{value:void 0,done:!0}}};return n}entries(){const t=this,e=this._state;let i=this._head;const n={[Symbol.iterator](){return n},next(){if(t._state!==e)throw new Error("LinkedMap got modified during iteration.");if(i){const s={value:[i.key,i.value],done:!1};return i=i.next,s}else return{value:void 0,done:!0}}};return n}[(Dw=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(t){if(t>=this.size)return;if(t===0){this.clear();return}let e=this._head,i=this.size;for(;e&&i>t;)this._map.delete(e.key),e=e.next,i--;this._head=e,this._size=i,e&&(e.previous=void 0),this._state++}addItemFirst(t){if(!this._head&&!this._tail)this._tail=t;else if(this._head)t.next=this._head,this._head.previous=t;else throw new Error("Invalid list");this._head=t,this._state++}addItemLast(t){if(!this._head&&!this._tail)this._head=t;else if(this._tail)t.previous=this._tail,this._tail.next=t;else throw new Error("Invalid list");this._tail=t,this._state++}removeItem(t){if(t===this._head&&t===this._tail)this._head=void 0,this._tail=void 0;else if(t===this._head){if(!t.next)throw new Error("Invalid list");t.next.previous=void 0,this._head=t.next}else if(t===this._tail){if(!t.previous)throw new Error("Invalid list");t.previous.next=void 0,this._tail=t.previous}else{const e=t.next,i=t.previous;if(!e||!i)throw new Error("Invalid list");e.previous=i,i.next=e}t.next=void 0,t.previous=void 0,this._state++}touch(t,e){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(e!==1&&e!==2)){if(e===1){if(t===this._head)return;const i=t.next,n=t.previous;t===this._tail?(n.next=void 0,this._tail=n):(i.previous=n,n.next=i),t.previous=void 0,t.next=this._head,this._head.previous=t,this._head=t,this._state++}else if(e===2){if(t===this._tail)return;const i=t.next,n=t.previous;t===this._head?(i.previous=void 0,this._head=i):(i.previous=n,n.next=i),t.next=void 0,t.previous=this._tail,this._tail.next=t,this._tail=t,this._state++}}}toJSON(){const t=[];return this.forEach((e,i)=>{t.push([i,e])}),t}fromJSON(t){this.clear();for(const[e,i]of t)this.set(e,i)}},r0=class extends w8{constructor(t,e=1){super(),this._limit=t,this._ratio=Math.min(Math.max(0,e),1)}get limit(){return this._limit}set limit(t){this._limit=t,this.checkTrim()}get(t,e=2){return super.get(t,e)}peek(t){return super.get(t,0)}set(t,e){return super.set(t,e,2),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};function ai(t,e,i){return Math.min(Math.max(t,e),i)}var Jx=class{constructor(){this._n=1,this._val=0}update(t){return this._val=this._val+(t-this._val)/this._n,this._n+=1,this._val}get value(){return this._val}},S8=class{constructor(t){this._n=0,this._val=0,this._values=[],this._index=0,this._sum=0,this._values=new Array(t),this._values.fill(0,0,t)}update(t){const e=this._values[this._index];return this._values[this._index]=t,this._index=(this._index+1)%this._values.length,this._sum-=e,this._sum+=t,this._n<this._values.length&&(this._n+=1),this._val=this._sum/this._n,this._val}get value(){return this._val}}
132,y8=function(t,e,i,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r},L8=function(t,e){return function(i,n){e(i,n,t)}},lf=ge("ILanguageFeatureDebounceService"),Su;(function(t){const e=new WeakMap;let i=0;function n(s){let r=e.get(s);return r===void 0&&(r=++i,e.set(s,r)),r}t.of=n})(Su||(Su={}));var k8=class{constructor(t,e,i,n,s,r){this._logService=t,this._name=e,this._registry=i,this._default=n,this._min=s,this._max=r,this._cache=new r0(50,.7)}_key(t){return t.id+this._registry.all(t).reduce((e,i)=>vv(Su.of(i),e),0)}get(t){const e=this._key(t),i=this._cache.get(e);return i?ai(i.value,this._min,this._max):this.default()}update(t,e){const i=this._key(t);let n=this._cache.get(i);n||(n=new S8(6),this._cache.set(i,n));const s=ai(n.update(e),this._min,this._max);return this._logService.trace(`[DEBOUNCE: ${this._name}] for ${t.uri.toString()} is ${s}ms`),s}_overall(){const t=new Jx;for(const[,e]of this._cache)t.update(e.value);return t.value}default(){const t=this._overall()|0||this._default;return ai(t,this._min,this._max)}},N_=class{constructor(e){this._logService=e,this._data=new Map}for(e,i,n){var s,r,o;const a=(s=n?.min)!==null&&s!==void 0?s:50,l=(r=n?.max)!==null&&r!==void 0?r:Math.pow(a,2),h=(o=n?.key)!==null&&o!==void 0?o:void 0,c=`${Su.of(e)},${a}${h?","+h:""}`;let d=this._data.get(c);return d||(d=new k8(this._logService,i,e,this._overallAverage()|0||a*1.5,a,l),this._data.set(c,d)),d}_overallAverage(){let e=new Jx;for(let i of this._data.values())e.update(i.default());return e.value}};N_=y8([L8(0,cr)],N_);ve(lf,N_,!0);var x8=ge("IWorkspaceEditService");function I8(t){return Li(t)&&(!!t.newUri||!!t.oldUri)}function E8(t){return Li(t)&&Le.isUri(t.resource)&&Li(t.edit)}var eI=class{constructor(t){this.metadata=t}static convert(t){return t.edits.map(e=>{if(E8(e))return new tI(e.resource,e.edit,e.modelVersionId,e.metadata);if(I8(e))return new D8(e.oldUri,e.newUri,e.options,e.metadata);throw new Error("Unsupported edit")})}},tI=class extends eI{constructor(t,e,i,n){super(n),this.resource=t,this.textEdit=e,this.versionId=i}},D8=class extends eI{constructor(t,e,i,n){super(n),this.oldResource=t,this.newResource=e,this.options=i}},N8=Object.freeze({id:"editor",order:5,type:"object",title:p("editorConfigurationTitle","Editor"),scope:5}),yu=Object.assign(Object.assign({},N8),{properties:{"editor.tabSize":{type:"number",default:Et.tabSize,minimum:1,markdownDescription:p("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:Et.insertSpaces,markdownDescription:p("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:Et.detectIndentation,markdownDescription:p("detectIndentation","Controls whether `#editor.tabSize#` and `#editor.insertSpaces#` will be automatically detected when a file is o
132pened based on the file contents.")},"editor.trimAutoWhitespace":{type:"boolean",default:Et.trimAutoWhitespace,description:p("trimAutoWhitespace","Remove trailing auto inserted whitespace.")},"editor.largeFileOptimizations":{type:"boolean",default:Et.largeFileOptimizations,description:p("largeFileOptimizations","Special handling for large files to disable certain memory intensive features.")},"editor.wordBasedSuggestions":{type:"boolean",default:!0,description:p("wordBasedSuggestions","Controls whether completions should be computed based on words in the document.")},"editor.wordBasedSuggestionsMode":{enum:["currentDocument","matchingDocuments","allDocuments"],default:"matchingDocuments",enumDescriptions:[p("wordBasedSuggestionsMode.currentDocument","Only suggest words from the active document."),p("wordBasedSuggestionsMode.matchingDocuments","Suggest words from all open documents of the same language."),p("wordBasedSuggestionsMode.allDocuments","Suggest words from all open documents.")],description:p("wordBasedSuggestionsMode","Controls from which documents word based completions are computed.")},"editor.semanticHighlighting.enabled":{enum:[!0,!1,"configuredByTheme"],enumDescriptions:[p("semanticHighlighting.true","Semantic highlighting enabled for all color themes."),p("semanticHighlighting.false","Semantic highlighting disabled for all color themes."),p("semanticHighlighting.configuredByTheme","Semantic highlighting is configured by the current color theme's `semanticHighlighting` setting.")],default:"configuredByTheme",description:p("semanticHighlighting.enabled","Controls whether the semanticHighlighting is shown for the languages that support it.")},"editor.stablePeek":{type:"boolean",default:!1,markdownDescription:p("stablePeek","Keep peek editors open even when double clicking their content or when hitting `Escape`.")},"editor.maxTokenizationLineLength":{type:"integer",default:2e4,description:p("maxTokenizationLineLength","Lines above this length will not be tokenized for performance reasons")},"editor.language.brackets":{type:"array",default:!1,description:p("schema.brackets","Defines the bracket symbols that increase or decrease the indentation."),items:{type:"array",items:[{type:"string",description:p("schema.openBracket","The opening bracket character or string sequence.")},{type:"string",description:p("schema.closeBracket","The closing bracket character or string sequence.")}]}},"editor.language.colorizedBracketPairs":{type:"array",default:!1,description:p("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:p("schema.openBracket","The opening bracket character or string sequence.")},{type:"string",description:p("schema.closeBracket","The closing bracket character or string sequence.")}]}},"diffEditor.maxComputationTime":{type:"number",default:5e3,description:p("maxComputationTime","Timeout in milliseconds after which diff computation is cancelled. Use 0 for no timeout.")},"diffEditor.maxFileSize":{type:"number",default:50,description:p("maxFileSize","Maximum file size in MB for which to compute diffs. Use 0 for no limit.")},"diffEditor.renderSideBySide":{type:"boolean",default:!0,description:p("sideBySide","Controls whether the diff editor shows the diff side by side or inline.")},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:!0,description:p("ignoreTrimWhitespace","When enabled, the diff editor ignores changes in leading or trailing whitespace.")},"diffEditor.renderIndicators":{type:"boolean",default:!0,description:p("renderIndicators","Controls whether the diff editor shows +/- indicators for added/removed changes.")},"diffEditor.codeLens":{type:"boolean",default:!1,description:p("codeLens","Controls whether the editor shows CodeLens.")},"diffEditor.wordWrap":{type:"string",enum:["off","on","inherit"],default:"inherit",markdownEnumDescriptions:[p("wordWrap.off","Lines will never wrap."),p("wordWrap.on","Lines will wrap at the viewport width."),p("wordWrap.inherit","Lines will wrap according to the `#editor.wordWrap#` setting.")]}}});function T8(t){return typeof t.type<"u"||typeof t.anyOf<"u"}for(const t of $o){const e=t.schema;if(typeof e<"u")if(T8(e))yu.properties[`editor.${t.name}`]=e;else for(const i in e)Object.hasOwnProperty.call(e,i)&&(yu.properties[i]=e[i])}var xc=null;function iI(){return xc===null&&(xc=Object.create(null),Object.keys(yu.properties).forEac
132h(t=>{xc[t]=!0})),xc}function M8(t){return iI()[`editor.${t}`]||!1}function R8(t){return iI()[`diffEditor.${t}`]||!1}vt.as(Ga.Configuration).registerConfiguration(yu);var A8=class{static insert(t,e){return{range:new T(t.lineNumber,t.column,t.lineNumber,t.column),text:e,forceMoveMarkers:!0}}static delete(t){return{range:t,text:null}}static replace(t,e){return{range:t,text:e}}static replaceMove(t,e){return{range:t,text:e,forceMoveMarkers:!0}}},Nn=class T_{constructor(e={},i=[],n=[]){this._contents=e,this._keys=i,this._overrides=n,this.isFrozen=!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(e){return e?dC(this.contents,e):this.contents}getOverrideValue(e,i){const n=this.getContentsForOverrideIdentifer(i);return n?e?dC(n,e):n:void 0}override(e){let i=this.overrideConfigurations.get(e);return i||(i=this.createOverrideConfigurationModel(e),this.overrideConfigurations.set(e,i)),i}merge(...e){const i=As(this.contents),n=As(this.overrides),s=[...this.keys];for(const r of e){this.mergeContents(i,r.contents);for(const o of r.overrides){const[a]=n.filter(l=>Rn(l.identifiers,o.identifiers));a?(this.mergeContents(a.contents,o.contents),a.keys.push(...o.keys),a.keys=tr(a.keys)):n.push(As(o))}for(const o of r.keys)s.indexOf(o)===-1&&s.push(o)}return new T_(i,s,n)}freeze(){return this.isFrozen=!0,this}createOverrideConfigurationModel(e){const i=this.getContentsForOverrideIdentifer(e);if(!i||typeof i!="object"||!Object.keys(i).length)return this;let n={};for(const s of tr([...Object.keys(this.contents),...Object.keys(i)])){let r=this.contents[s],o=i[s];o&&(typeof r=="object"&&typeof o=="object"?(r=As(r),this.mergeContents(r,o)):r=o),n[s]=r}return new T_(n,this.keys,this.overrides)}mergeContents(e,i){for(const n of Object.keys(i)){if(n in e&&Li(e[n])&&Li(i[n])){this.mergeContents(e[n],i[n]);continue}e[n]=As(i[n])}}checkAndFreeze(e){return this.isFrozen&&!Object.isFrozen(e)?lN(e):e}getContentsForOverrideIdentifer(e){let i=null,n=null;const s=r=>{r&&(n?this.mergeContents(n,r):n=As(r))};for(const r of this.overrides)Rn(r.identifiers,[e])?i=r.contents:r.identifiers.includes(e)&&s(r.contents);return s(i),n}toJSON(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}}setValue(e,i){this.addKey(e),_v(this.contents,e,i,n=>{throw new Error(n)})}removeValue(e){this.removeKey(e)&&ET(this.contents,e)}addKey(e){let i=this.keys.length;for(let n=0;n<i;n++)e.indexOf(this.keys[n])===0&&(i=n);this.keys.splice(i,1,e)}removeKey(e){let i=this.keys.indexOf(e);return i!==-1?(this.keys.splice(i,1),!0):!1}},O8=class extends Nn{constructor(t={}){const e=vt.as(Ga.Configuration).getConfigurationProperties(),i=Object.keys(e),n=Object.create(null),s=[];for(const r in e){const o=t[r],a=o!==void 0?o:e[r].default;_v(n,r,a,l=>{})}for(const r of Object.keys(n))gh.test(r)&&s.push({identifiers:ox(r),keys:Object.keys(n[r]),contents:oL(n[r],o=>{})});super(n,i,s)}},nI=class sI{constructor(e,i,n=new Nn,s=new Nn,r=new $i,o=new Nn,a=new $i,l=!0){this._defaultConfiguration=e,this._localUserConfiguration=i,this._remoteUserConfiguration=n,this._workspaceConfiguration=s,this._folderConfigurations=r,this._memoryConfiguration=o,this._memoryConfigurationByResource=a,this._freeze=l,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations=new $i,this._userConfiguration=null}getValue(e,i,n){return this.getConsolidateConfigurationModel(i,n).getValue(e)}updateValue(e,i,n={}){let s;n.resource?(s=this._memoryConfigurationByResource.get(n.resource),s||(s=new Nn,this._memoryConfigurationByResource.set(n.resource,s))):s=this._memoryConfiguration,i===void 0?s.removeValue(e):s.setValue(e,i),n.resource||(this._workspaceConsolidatedConfiguration=null)}inspect(e,i,n){const s=this.getConsolidateConfigurationModel(i,n),r=this.getFolderConfigurationModelForResource(i.resource,n),o=i.resource?this._memoryConfigurationByResource.get(i.resource)||this._memoryConfiguration:this._memoryConfiguration,a=i.overrideIdentifier?this._defaultConfiguration.freeze().override(i.overrideIdentifier).getValue(e):this._defaultConfiguration.freeze().getValue(e),l=i.overrideIdentifier?this.userConfiguration.freeze().override(i.overrideIdentifier).getValue(e):this.userConfiguration.freeze().getValue(e),h=i.overrideIdentifier?this.localUserConfiguration.freeze().override(i.overrideIdentifier).getValue(e):this.localUserConfiguration.freeze().getValue(e),c=i.overrideIdentifier?this.remoteUserConfiguration.freeze().override(i.overrideIdentifier).getValue(e):this.remoteUserConfiguration.freeze().getValue(e),d=n?i.overrideIdentifier?this._workspaceConfiguration.freeze().override(i.overrideIdentifier).getValue(e):this._workspaceConfiguration.freeze().getValue(e):void 0,u=r?i.overrideIdentifier?r.freeze().override(i.overrideIdentifier).getValue(e):r.freeze().getValue(e):void 0,g=i.overrideIdentifier?o.override(i.overrideIdentifier).getValue(e):o.getValue(e),m=s.getValue(e),_=tr(QD(s.overrides.map(C=>C.identifiers))).filter(C=>s.getOverrideValue(e,C)!==void 0);return{defaultValue:a,userValue:l,userLocalValue:h,userRemoteValue:c,workspaceValue:d,workspaceFolderValue:u,memoryValue:g,value:m,default:a!==void 0?{value:this._defaultConfiguration.freeze().getValue(e),override:i.overrideIdentifier?this._defaultConfiguration.freeze().getOverrideValue(e,i.overrideIdentifier):void 0}:void 0,user:l!==void 0?{value:this.userConfiguration.freeze().getValue(e),override:i.overrideIdentifier?this.userConfiguration.freeze().getOverrideValue(e,i.overrideIdentifier):void 0}:void 0,userLocal:h!==void 0?{value:this.localUserConfiguration.freeze().getValue(e),override:i.overrideIdentifier?this.localUserConfiguration.freeze().getOverrideValue(e,i.overrideIdentifier):void 0}:void 0,userRemote:c!==void 0?{value:this.remoteUserConfiguration.freeze().getValue(e),override:i.overrideIdentifier?this.remoteUserConfiguration.freeze().getOverrideValue(e,i.overrideIdentifier):void 0}:void 0,workspace:d!==void 0?{value:this._workspaceConfiguration.freeze().getValue(e),override:i.overrideIdentifier?this._workspaceConfiguration.freeze().getOverrideValue(e,i.overrideIdentifier):void 0}:void 0,workspaceFolder:u!==void 0?{value:r?.freeze().getValue(e),override:i.overrideIdentifier?r?.freeze().getOverrideValue(e,i.overrideIdentifier):void 0}:void 0,memory:g!==void 0?{value:o.getValue(e),override:i.overrideIdentifier?o.getOverrideValue(e,i.overrideIdentifier):void 0}:void 0,overrideIdentifiers:_.length?_:void 0}}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}getConsolidateConfigurationModel(e,i){let n=this.getConsolidatedConfigurationModelForResource(e,i);return e.overrideIdentifier?n.override(e.overrideIdentifier):n}getConsolidatedConfigurationModelForResource({resource:e},i){let n=this.getWorkspaceConsolidatedConfiguration();if(i&&e){const s=i.getFolder(e);s&&(n=this.getFolderConsolidatedConfiguration(s.uri)||n);const r=this._memoryConfigurationByResource.get(e);
132r&&(n=n.merge(r))}return n}getWorkspaceConsolidatedConfiguration(){return this._workspaceConsolidatedConfiguration||(this._workspaceConsolidatedConfiguration=this._defaultConfiguration.merge(this.userConfiguration,this._workspaceConfiguration,this._memoryConfiguration),this._freeze&&(this._workspaceConfiguration=this._workspaceConfiguration.freeze())),this._workspaceConsolidatedConfiguration}getFolderConsolidatedConfiguration(e){let i=this._foldersConsolidatedConfigurations.get(e);if(!i){const n=this.getWorkspaceConsolidatedConfiguration(),s=this._folderConfigurations.get(e);s?(i=n.merge(s),this._freeze&&(i=i.freeze()),this._foldersConsolidatedConfigurations.set(e,i)):i=n}return i}getFolderConfigurationModelForResource(e,i){if(i&&e){const n=i.getFolder(e);if(n)return this._folderConfigurations.get(n.uri)}}toData(){return{defaults:{contents:this._defaultConfiguration.contents,overrides:this._defaultConfiguration.overrides,keys:this._defaultConfiguration.keys},user:{contents:this.userConfiguration.contents,overrides:this.userConfiguration.overrides,keys:this.userConfiguration.keys},workspace:{contents:this._workspaceConfiguration.contents,overrides:this._workspaceConfiguration.overrides,keys:this._workspaceConfiguration.keys},folders:[...this._folderConfigurations.keys()].reduce((e,i)=>{const{contents:n,overrides:s,keys:r}=this._folderConfigurations.get(i);return e.push([i,{contents:n,overrides:s,keys:r}]),e},[])}}static parse(e){const i=this.parseConfigurationModel(e.defaults),n=this.parseConfigurationModel(e.user),s=this.parseConfigurationModel(e.workspace),r=e.folders.reduce((o,a)=>(o.set(Le.revive(a[0]),this.parseConfigurationModel(a[1])),o),new $i);return new sI(i,n,new Nn,s,r,new Nn,new $i,!1)}static parseConfigurationModel(e){return new Nn(e.contents,e.keys,e.overrides).freeze()}},P8=class{constructor(t,e,i,n){this.change=t,this.previous=e,this.currentConfiguraiton=i,this.currentWorkspace=n,this._previousConfiguration=void 0;const s=new Set;t.keys.forEach(o=>s.add(o)),t.overrides.forEach(([,o])=>o.forEach(a=>s.add(a))),this.affectedKeys=[...s.values()];const r=new Nn;this.affectedKeys.forEach(o=>r.setValue(o,{})),this.affectedKeysTree=r.contents}get previousConfiguration(){return!this._previousConfiguration&&this.previous&&(this._previousConfiguration=nI.parse(this.previous.data)),this._previousConfiguration}affectsConfiguration(t,e){var i;if(this.doesAffectedKeysTreeContains(this.affectedKeysTree,t)){if(e){const n=this.previousConfiguration?this.previousConfiguration.getValue(t,e,(i=this.previous)===null||i===void 0?void 0:i.workspace):void 0,s=this.currentConfiguraiton.getValue(t,e,this.currentWorkspace);return!ki(n,s)}return!0}return!1}doesAffectedKeysTreeContains(t,e){let i=oL({[e]:!0},()=>{}),n;for(;typeof i=="object"&&(n=Object.keys(i)[0]);){if(t=t[n],!t)return!1;i=i[n]}return!0}},F8=/^(cursor|delete)/,B8=class extends V{constructor(t,e,i,n,s){super(),this._contextKeyService=t,this._commandService=e,this._telemetryService=i,this._notificationService=n,this._logService=s,this._onDidUpdateKeybindings=this._register(new M),this._currentChord=null,this._currentChordChecker=new Rh,this._currentChordStatusMessage=null,this._ignoreSingleModifiers=Yo.EMPTY,this._currentSingleModifier=null,this._currentSingleModifierClearTimeout=new jn,this._logging=!1}get onDidUpdateKeybindings(){return this._onDidUpdateKeybindings?this._onDidUpdateKeybindings.event:$.None}dispose(){super.dispose()}_log(t){this._logging&&this._logService.info(`[KeybindingService]: ${t}`)}getKeybindings(){return this._getResolver().getKeybindings()}lookupKeybinding(t,e){const i=this._getResolver().lookupPrimaryKeybinding(t,e||this._contextKeyService);if(i)return i.resolvedKeybinding}dispatchEvent(t,e){return this._dispatch(t,e)}softDispatch(t,e){const i=this.resolveKeyboardEvent(t);if(i.isChord())return null;const[n]=i.getDispatchParts();if(n===null)return null;const s=this._contextKeyService.getContext(e),r=this._currentChord?this._currentChord.keypress:null;return this._getResolver().resolve(s,r,n)}_enterChordMode(t,e){this._currentChord={keypress:t,label:e},this._currentChordStatusMessage=this._notificationService.status(p("first.chord","({0}) was pressed. Waiting for second key of chord...",e));const i=Date.now();this._currentChordChecker.cancelAndSet(()=>{if(!this._documentHasFocus()){this._leaveChordMode();return}Date.now()-i>5e3&&this._leaveChordMode()},500)}_leaveChordMode(){this._currentChordStatusMessage&&(this._currentChordStatusMessage.dispose(),this._currentChordStatusMessage=null),this._currentChordChecker.cancel(),this._currentChord=null}
132_dispatch(t,e){return this._doDispatch(this.resolveKeyboardEvent(t),e,!1)}_singleModifierDispatch(t,e){const i=this.resolveKeyboardEvent(t),[n]=i.getSingleModifierDispatchParts();if(n)return this._ignoreSingleModifiers.has(n)?(this._log(`+ Ignoring single modifier ${n} due to it being pressed together with other keys.`),this._ignoreSingleModifiers=Yo.EMPTY,this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1):(this._ignoreSingleModifiers=Yo.EMPTY,this._currentSingleModifier===null?(this._log(`+ Storing single modifier for possible chord ${n}.`),this._currentSingleModifier=n,this._currentSingleModifierClearTimeout.cancelAndSet(()=>{this._log("+ Clearing single modifier due to 300ms elapsed."),this._currentSingleModifier=null},300),!1):n===this._currentSingleModifier?(this._log(`/ Dispatching single modifier chord ${n} ${n}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,this._doDispatch(i,e,!0)):(this._log(`+ Clearing single modifier due to modifier mismatch: ${this._currentSingleModifier} ${n}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1));const[s]=i.getParts();return this._ignoreSingleModifiers=new Yo(s),this._currentSingleModifier!==null&&this._log("+ Clearing single modifier due to other key up."),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1}_doDispatch(t,e,i=!1){let n=!1;if(t.isChord())return!1;let s=null,r=null;if(i){const[h]=t.getSingleModifierDispatchParts();s=h,r=h}else[s]=t.getDispatchParts(),r=this._currentChord?this._currentChord.keypress:null;if(s===null)return this._log("\\ Keyboard event cannot be dispatched in keydown phase."),n;const o=this._contextKeyService.getContext(e),a=t.getLabel(),l=this._getResolver().resolve(o,r,s);return this._logService.trace("KeybindingService#dispatch",a,l?.commandId),l&&l.enterChord?(n=!0,this._enterChordMode(s,a),n):(this._currentChord&&(!l||!l.commandId)&&(this._notificationService.status(p("missing.chord","The key combination ({0}, {1}) is not a command.",this._currentChord.label,a),{hideAfter:1e4}),n=!0),this._leaveChordMode(),l&&l.commandId&&(l.bubble||(n=!0),typeof l.commandArgs>"u"?this._commandService.executeCommand(l.commandId).then(void 0,h=>this._notificationService.warn(h)):this._commandService.executeCommand(l.commandId,l.commandArgs).then(void 0,h=>this._notificationService.warn(h)),F8.test(l.commandId)||this._telemetryService.publicLog2("workbenchActionExecuted",{id:l.commandId,from:"keybinding"})),n)}mightProducePrintableCharacter(t){return t.ctrlKey||t.metaKey?!1:t.keyCode>=31&&t.keyCode<=56||t.keyCode>=21&&t.keyCode<=30}},Yo=class{constructor(t){this._ctrlKey=t?t.ctrlKey:!1,this._shiftKey=t?t.shiftKey:!1,this._altKey=t?t.altKey:!1,this._metaKey=t?t.metaKey:!1}has(t){switch(t){case"ctrl":return this._ctrlKey;case"shift":return this._shiftKey;case"alt":return this._altKey;case"meta":return this._metaKey}}};Yo.EMPTY=new Yo(null);var vi=ge("keybindingService"),V8=class Cd{constructor(e,i,n){this._log=n,this._defaultKeybindings=e,this._defaultBoundCommands=new Map;for(const s of e){const r=s.command;r&&r.charAt(0)!=="-"&&this._defaultBoundCommands.set(r,!0)}this._map=new Map,this._lookupMap=new Map,this._keybindings=Cd.handleRemovals([].concat(e).concat(i));for(let s=0,r=this._keybindings.length;s<r;s++){let o=this._keybindings[s];o.keypressParts.length!==0&&(o.when&&o.when.type===0||this._addKeyPress(o.keypressParts[0],o))}}static _isTargetedForRemoval(e,i,n,s){return!(i&&e.keypressParts[0]!==i||n&&e.keypressParts[1]!==n||s&&(!e.when||!AM(s,e.when)))}static handleRemovals(e){const i=new Map;for(let s=0,r=e.length;s<r;s++){const o=e[s];if(o.command&&o.command.charAt(0)==="-"){const a=o.command.substring(1);i.has(a)?i.get(a).push(o):i.set(a,[o])}}if(i.size===0)return e;const n=[];for(let s=0,r=e.length;s<r;s++){const o=e[s];if(!o.command||o.command.length===0){n.push(o);continue}if(o.command.charAt(0)==="-")continue;const a=i.get(o.command);if(!a||!o.isDefault){n.push(o);continue}let l=!1;for(const h of a){const c=h.keypressParts[0],d=h.keypressParts[1],u=h.when;if(this._isTargetedForRemoval(o,c,d,u)){l=!0;break}}if(!l){n.push(o);continue}}return n}_addKeyPress(e,i){const n=this._map.get(e);if(typeof n>"u"){this._map.set(e,[i]),this._addToLookupMap(i);return}for(let s=n.length-1;s>=0;s--){let r=n[s];if(r.command===i.command)continue;const o=r.keypressParts.length>1,a=i.keypressParts.length>1;o&&a&&r.keypressParts[1]!==i.keypressParts[1]||Cd.whenIsEntirelyIncluded(r.when,i.when)&&this._removeFromLookupMap(r)}n.push(i),this._addToLookupMap(i)}_addToLookupMap(e){if(!e.command)return;let i=this._lookupMap.get(e.command);typeof i>"u"?(i=[e],this._lookupMap.set(e.command,i)):i.push(e)}_removeFromLookupMap(e){if(!e.command)return;let i=this._lookupMap.get(e.command);if(!(typeof i>"u")){for(let n=0,s=i.length;n<s;n++)if(i[n]===e){i.splice(n,1);return}}}static whenIsEntirelyIncluded(e,i){return!i||i.type===1?!0:!e||e.type===1?!1:S2(e,i)}getKeybindings(){return this._keybindings}lookupPrimaryKeybinding(e,i){const n=this._lookupMap.get(e);if(typeof n>"u"||n.length===0)return null;if(n.length===1)return n[0];for(let s=n.length-1;s>=0;s--){const r=n[s];if(i.contextMatchesRules(r.when))return r}return n[n.length-1]}resolve(e,i,n){this._log(`| Resolving ${n}${i?` chorded from ${i}`:""}`);let s=null;if(i!==null){const o=this._map.get(i);if(typeof o>
132"u")return this._log("\\ No keybinding entries."),null;s=[];for(let a=0,l=o.length;a<l;a++){let h=o[a];h.keypressParts[1]===n&&s.push(h)}}else{const o=this._map.get(n);if(typeof o>"u")return this._log("\\ No keybinding entries."),null;s=o}let r=this._findCommand(e,s);return r?i===null&&r.keypressParts.length>1&&r.keypressParts[1]!==null?(this._log(`\\ From ${s.length} keybinding entries, matched chord, when: ${Nw(r.when)}, source: ${Tw(r)}.`),{enterChord:!0,leaveChord:!1,commandId:null,commandArgs:null,bubble:!1}):(this._log(`\\ From ${s.length} keybinding entries, matched ${r.command}, when: ${Nw(r.when)}, source: ${Tw(r)}.`),{enterChord:!1,leaveChord:r.keypressParts.length>1,commandId:r.command,commandArgs:r.commandArgs,bubble:r.bubble}):(this._log(`\\ From ${s.length} keybinding entries, no when clauses matched the context.`),null)}_findCommand(e,i){for(let n=i.length-1;n>=0;n--){let s=i[n];if(Cd._contextMatchesRules(e,s.when))return s}return null}static _contextMatchesRules(e,i){return i?i.evaluate(e):!0}};function Nw(t){return t?`${t.serialize()}`:"no when condition"}function Tw(t){return t.extensionId?t.isBuiltinExtension?`built-in extension ${t.extensionId}`:`user extension ${t.extensionId}`:t.isDefault?"built-in":"user"}var Mw=class{constructor(t,e,i,n,s,r,o){this._resolvedKeybindingItemBrand=void 0,this.resolvedKeybinding=t,this.keypressParts=t?M_(t.getDispatchParts()):[],t&&this.keypressParts.length===0&&(this.keypressParts=M_(t.getSingleModifierDispatchParts())),this.bubble=e?e.charCodeAt(0)===94:!1,this.command=this.bubble?e.substr(1):e,this.commandArgs=i,this.when=n,this.isDefault=s,this.extensionId=r,this.isBuiltinExtension=o}};function M_(t){let e=[];for(let i=0,n=t.length;i<n;i++){const s=t[i];if(!s)return e;e.push(s)}return e}var hf=class{constructor(t,e,i=e){this.modifierLabels=[null],this.modifierLabels[2]=t,this.modifierLabels[1]=e,this.modifierLabels[3]=i}toLabel(t,e,i){if(e.length===0)return null;const n=[];for(let s=0,r=e.length;s<r;s++){const o=e[s],a=i(o);if(a===null)return null;n[s]=z8(o,a,this.modifierLabels[t])}return n.join(" ")}},rI=new hf({ctrlKey:"⌃",shiftKey:"⇧",altKey:"⌥",metaKey:"⌘",separator:""},{ctrlKey:p({key:"ctrlKey",comment:["This is the short form for the Control key on the keyboard"]},"Ctrl"),shiftKey:p({key:"shiftKey",comment:["This is the short form for the Shift key on the keyboard"]},"Shift"),altKey:p({key:"altKey",comment:["This is the short form for the Alt key on the keyboard"]},"Alt"),metaKey:p({key:"windowsKey",comment:["This is the short form for the Windows key on the keyboard"]},"Windows"),separator:"+"},{ctrlKey:p({key:"ctrlKey",comment:["This is the short form for the Control key on the keyboard"]},"Ctrl"),shiftKey:p({key:"shiftKey",comment:["This is the short form for the Shift key on the keyboard"]},"Shift"),altKey:p({key:"altKey",comment:["This is the short form for the Alt key on the keyboard"]},"Alt"),metaKey:p({key:"superKey",comment:["This is the short form for the Super key on the keyboard"]},"Super"),separator:"+"}),W8=new hf({ctrlKey:p({key:"ctrlKey.long",comment:["This is the long form for the Control key on the keyboard"]},"Control"),shiftKey:p({key:"shiftKey.long",comment:["This is the long form for the Shift key on the keyboard"]},"Shift"),altKey:p({key:"optKey.long",comment:["This is the long form for the Alt/Option key on the keyboard"]},"Option"),metaKey:p({key:"cmdKey.long",comment:["This is the long form for the Command key on the keyboard"]},"Command"),separator:"+"},{ctrlKey:p({key:"ctrlKey.long",comment:["This is the long form for the Control key on the keyboard"]},"Control"),shiftKey:p({key:"shiftKey.long",comment:["This is the long form for the Shift key on the keyboard"]},"Shift"),altKey:p({key:"altKey.long",comment:["This is the long form for the Alt key on the keyboard"]},"Alt"),metaKey:p({key:"windowsKey.long",comment:["This is the long form for the Windows key on the keyboard"]},"Windows"),separator:"+"},{ctrlKey:p({key:"ctrlKey.long",comment:["This is the long form for the Control key on the keyboard"]},"Control"),shiftKey:p({key:"shiftKey.long",comment:["This is the long form for the Shift key on the keyboard"]},"Shift"),altKey:p({key:"altKey.long",comment:["This is the long form for the Alt key on the keyboard"]},"Alt"),metaKey:p({key:"superKey.long",comment:["This is the long form for the Super key on the keyboard"]},"Super"),separator:"+"}),H8=new hf({ctrlKey:"Ctrl",shiftKey:"Shift",altKey:"Alt",metaKey:"Cmd",separator:"+"},{ctrlKey:"Ctrl",shiftKey:"Shift",altKey:"Alt",metaKey:"Super",separator:"+"}),V$=new hf({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 z8(t,e,i){if(e===null)return"";const n=[];return t.ctrlKey&&n.push(i.ctrlKey),t.shiftKey&&n.push(i.shiftKey),t.altKey&&n.push(i.altKey),t.metaKey&&n.push(i.metaKey),e!==""&&n.push(e),n.join(i.separator)}var U8=class extends oM{constructor(t,e){if(super(),e.length===0)throw Q1("parts");this._os=t,this._parts=e}getLabel(){return rI.toLabel(this._os,this._parts,t=>this._getLabel(t))}getAriaLabel(){return W8.toLabel(this._os,this._parts,t=>this._getAriaLabel(t))}getElectronAccelerator(){return this._parts.length>1||this._parts[0].isDuplicateModifierCase()?null:H8.toLabel(this._os,this._parts,t=>this._getElectronAccelerator(t))}isChord(){return this._parts.length>1}getParts(){return this._parts.map(t=>this._getPart(t))}_getPart(t){return new rM(t.ctrlKey,t.shiftKey,t.altKey,t.metaKey,this._getLabel(t),this._getAriaLabel(t))}getDispatchParts(){return this._parts.map(t=>this._getDispatchPart(t))}getSingleModifierDispatchParts(){return this._parts.map(t=>this._getSingleModifierDispatchPart(t))}},Rw=class R_ extends U8{constructor(e,i){super(i,e.parts)}_keyCodeToUILabel(e){if(this._os===2)switch(e){case 15:return"←";case 16:return"↑";case 17:return"→";case 18:return"↓"}return Vr.toString(e)}_getLabel(e){return e.isDuplicateModifierCase()?"":this._keyCodeToUILabel(e.keyCode)}_getAriaLabel(e){return e.isDuplicateModifierCase()?"":Vr.toString(e.keyCode)}_getElectronAccelerator(e){return Vr.toElectronAccelerator(e.keyCode)}_getDispatchPart(e){return R_.getDispatchStr(e)}static getDispatchStr(e){if(e.isModifierKey())return null;let i="";return e.ctrlKey&&(i+="ctrl+"),e.shiftKey&&(i+="shift+"),e.altKey&&
132(i+="alt+"),e.metaKey&&(i+="meta+"),i+=Vr.toString(e.keyCode),i}_getSingleModifierDispatchPart(e){return e.keyCode===5&&!e.shiftKey&&!e.altKey&&!e.metaKey?"ctrl":e.keyCode===4&&!e.ctrlKey&&!e.altKey&&!e.metaKey?"shift":e.keyCode===6&&!e.ctrlKey&&!e.shiftKey&&!e.metaKey?"alt":e.keyCode===57&&!e.ctrlKey&&!e.shiftKey&&!e.altKey?"meta":null}static _scanCodeToKeyCode(e){const i=tv[e];if(i!==-1)return i;switch(e){case 10:return 31;case 11:return 32;case 12:return 33;case 13:return 34;case 14:return 35;case 15:return 36;case 16:return 37;case 17:return 38;case 18:return 39;case 19:return 40;case 20:return 41;case 21:return 42;case 22:return 43;case 23:return 44;case 24:return 45;case 25:return 46;case 26:return 47;case 27:return 48;case 28:return 49;case 29:return 50;case 30:return 51;case 31:return 52;case 32:return 53;case 33:return 54;case 34:return 55;case 35:return 56;case 36:return 22;case 37:return 23;case 38:return 24;case 39:return 25;case 40:return 26;case 41:return 27;case 42:return 28;case 43:return 29;case 44:return 30;case 45:return 21;case 51:return 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(e){if(!e)return null;if(e instanceof lh)return e;const i=this._scanCodeToKeyCode(e.scanCode);return i===0?null:new lh(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,i)}static resolveUserBinding(e,i){const n=M_(e.map(s=>this._resolveSimpleUserBinding(s)));return n.length>0?[new R_(new Yd(n),i)]:[]}},$8=ge("labelService"),K8=ge("contextService"),j8=class{constructor(t,e){this.raw=e,this.uri=t.uri,this.index=t.index,this.name=t.name}toJSON(){return{uri:this.uri,name:this.name,index:this.index}}},q8="code-workspace",W$=[{name:p("codeWorkspace","Code Workspace"),extensions:[q8]}],Aw;(function(t){t.noSelection=p("noSelection","No selection"),t.singleSelectionRange=p("singleSelectionRange","Line {0}, Column {1} ({2} selected)"),t.singleSelection=p("singleSelection","Line {0}, Column {1}"),t.multiSelectionRange=p("multiSelectionRange","{0} selections ({1} characters selected)"),t.multiSelection=p("multiSelection","{0} selections"),t.emergencyConfOn=p("emergencyConfOn","Now changing the setting `accessibilitySupport` to 'on'."),t.openingDocs=p("openingDocs","Now opening the Editor Accessibility documentation page."),t.readonlyDiffEditor=p("readonlyDiffEditor"," in a read-only pane of a diff editor."),t.editableDiffEditor=p("editableDiffEditor"," in a pane of a diff editor."),t.readonlyEditor=p("readonlyEditor"," in a read-only code editor"),t.editableEditor=p("editableEditor"," in a code editor"),t.changeConfigToOnMac=p("changeConfigToOnMac","To configure the editor to be optimized for usage with a Screen Reader press Command+E now."),t.changeConfigToOnWinLinux=p("changeConfigToOnWinLinux","To configure the editor to be optimized for usage with a Screen Reader press Control+E now."),t.auto_on=p("auto_on","The editor is configured to be optimized for usage with a Screen Reader."),t.auto_off=p("auto_off","The editor is configured to never be optimized for usage with a Screen Reader, which is not the case at this time."),t.tabFocusModeOnMsg=p("tabFocusModeOnMsg","Pressing Tab in the current editor will move focus to the next focusable element. Toggle this behavior by pressing {0}."),t.tabFocusModeOnMsgNoKb=p("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."),t.tabFocusModeOffMsg=p("tabFocusModeOffMsg","Pressing Tab in the current editor will insert the tab character. Toggle this behavior by pressing {0}."),t.tabFocusModeOffMsgNoKb=p("tabFocusModeOffMsgNoKb","Pressing Tab in the current editor will insert the tab character. The command {0} is currently not triggerable by a keybinding."),t.openDocMac=p("openDocMac","Press Command+H now to open a browser window with more information related to editor accessibility."),t.openDocWinLinux=p("openDocWinLinux","Press Control+H now to open a browser window with more information related to editor accessibility."),t.outroMsg=p("outroMsg","You can dismiss this tooltip and return to the editor by pressing Escape or Shift+Escape."),t.showAccessibilityHelpAction=p("showAccessibilityHelpAction","Show Accessibility Help")})(Aw||(Aw={}));var Ow;(function(t){t.inspectTokensAction=p("inspectTokens","Developer: Inspect Tokens")})(Ow||(Ow={}));var Pw;(function(t){t.gotoLineActionLabel=p("gotoLineActionLabel","Go to Line/Column...")})(Pw||(Pw={}));var Fw;(function(t){t.helpQuickAccessActionLabel=p("helpQuickAccess","Show all Quick Access Providers")})(Fw||(Fw={}));var Bw;(function(t){t.quickCommandActionLabel=p("quickCommandActionLabel","Command Palette"),t.quickCommandHelp=p("quickCommandActionHelp","Show And Run Commands")})(Bw||(Bw={}));var Vw;(function(t){t.quickOutlineActionLabel=p("quickOutlineActionLabel","Go to Symbol..."),t.quickOutlineByCategoryActionLabel=p("quickOutlineByCategoryActionLabel","Go to Symbol by Category...")})(Vw||(Vw={}));var Lu;(function(t){t.editorViewAccessibleLabel=p("editorViewAccessibleLabel","Editor content"),t.accessibilityHelpMessage=p("accessibilityHelpMessage","Press Alt+F1 for Accessibility Options.")})(Lu||(Lu={}));var Ww;(function(t){t.toggleHighContrast=p("toggleHighContrast","Toggle High Contrast Theme")})(Ww||(Ww={}));var A_;(function(t){t.bulkEditServiceSummary=p("bulkEditServiceSummary","Made {0} edits in {1} files")})(A_||(A_={}));var G8=ge("workspaceTrustManagementService"),wt;(function(t){function e(r,o){if(r.start>=o.end||o.start>
132=r.end)return{start:0,end:0};const a=Math.max(r.start,o.start),l=Math.min(r.end,o.end);return l-a<=0?{start:0,end:0}:{start:a,end:l}}t.intersect=e;function i(r){return r.end-r.start<=0}t.isEmpty=i;function n(r,o){return!i(e(r,o))}t.intersects=n;function s(r,o){const a=[],l={start:r.start,end:Math.min(o.start,r.end)},h={start:Math.max(o.end,r.start),end:r.end};return i(l)||a.push(l),i(h)||a.push(h),a}t.relativeComplement=s})(wt||(wt={}));var $s;(function(t){t[t.AVOID=0]="AVOID",t[t.ALIGN=1]="ALIGN"})($s||($s={}));function Xo(t,e,i){const n=i.mode===$s.ALIGN?i.offset:i.offset+i.size,s=i.mode===$s.ALIGN?i.offset+i.size:i.offset;return i.position===0?e<=t-n?n:e<=s?s-e:Math.max(t-e,0):e<=s?s-e:e<=t-n?n:0}var o0=class O_ extends V{constructor(e,i){super(),this.container=null,this.delegate=null,this.toDisposeOnClean=V.None,this.toDisposeOnSetContainer=V.None,this.shadowRoot=null,this.shadowRootHostElement=null,this.view=Q(".context-view"),this.useFixedPosition=!1,this.useShadowDOM=!1,VC(this.view),this.setContainer(e,i),this._register(Ae(()=>this.setContainer(null,1)))}setContainer(e,i){var n;if(this.container&&(this.toDisposeOnSetContainer.dispose(),this.shadowRoot?(this.shadowRoot.removeChild(this.view),this.shadowRoot=null,(n=this.shadowRootHostElement)===null||n===void 0||n.remove(),this.shadowRootHostElement=null):this.container.removeChild(this.view),this.container=null),e){if(this.container=e,this.useFixedPosition=i!==1,this.useShadowDOM=i===3,this.useShadowDOM){this.shadowRootHostElement=Q(".shadow-root-host"),this.container.appendChild(this.shadowRootHostElement),this.shadowRoot=this.shadowRootHostElement.attachShadow({mode:"open"});const r=document.createElement("style");r.textContent=Z8,this.shadowRoot.appendChild(r),this.shadowRoot.appendChild(this.view),this.shadowRoot.appendChild(Q("slot"))}else this.container.appendChild(this.view);const s=new ne;O_.BUBBLE_UP_EVENTS.forEach(r=>{s.add(gi(this.container,r,o=>{this.onDOMEvent(o,!1)}))}),O_.BUBBLE_DOWN_EVENTS.forEach(r=>{s.add(gi(this.container,r,o=>{this.onDOMEvent(o,!0)},!0))}),this.toDisposeOnSetContainer=s}}show(e){this.isVisible()&&this.hide(),Ei(this.view),this.view.className="context-view",this.view.style.top="0px",this.view.style.left="0px",this.view.style.zIndex="2500",this.view.style.position=this.useFixedPosition?"fixed":"absolute",YL(this.view),this.toDisposeOnClean=e.render(this.view)||V.None,this.delegate=e,this.doLayout(),this.delegate.focus&&this.delegate.focus()}getViewElement(){return this.view}layout(){if(this.isVisible()){if(this.delegate.canRelayout===!1&&!(Xr&&VL.pointerEvents)){this.hide();return}this.delegate.layout&&this.delegate.layout(),this.doLayout()}}doLayout(){if(!this.isVisible())return;let e=this.delegate.getAnchor(),i;if(GL(e)){let d=qi(e);i={top:d.top,left:d.left,width:d.width,height:d.height}}else i={top:e.y,left:e.x,width:e.width||1,height:e.height||2};const n=Vi(this.view),s=Cp(this.view),r=this.delegate.anchorPosition||0,o=this.delegate.anchorAlignment||0,a=this.delegate.anchorAxisAlignment||0;let l,h;if(a===0){const d={offset:i.top-window.pageYOffset,size:i.height,position:r===0?0:1},u={offset:i.left,size:i.width,position:o===0?0:1,mode:$s.ALIGN};l=Xo(window.innerHeight,s,d)+window.pageYOffset,wt.intersects({start:l,end:l+s},{start:d.offset,end:d.offset+d.size})&&(u.mode=$s.AVOID),h=Xo(window.innerWidth,n,u)}else{const d={offset:i.left,size:i.width,position:o===0?0:1},u={offset:i.top,size:i.height,position:r===0?0:1,mode:$s.ALIGN};h=Xo(window.innerWidth,n,d),wt.intersects({start:h,end:h+n},{start:d.offset,end:d.offset+d.size})&&(u.mode=$s.AVOID),l=Xo(window.innerHeight,s,u)+window.pageYOffset}this.view.classList.remove("top","bottom","left","right"),this.view.classList.add(r===0?"bottom":"top"),this.view.classList.add(o===0?"left":"right"),this.view.classList.toggle("fixed",this.useFixedPosition);const c=qi(this.container);this.view.style.top=`${l-(this.useFixedPosition?qi(this.view).top:c.top)}px`,this.view.style.left=`${h-(this.useFixedPosition?qi(this.view).left:c.left)}px`,this.view.style.width="initial"}hide(e){const i=this.delegate;this.delegate=null,i?.onHide&&i.onHide(e),this.toDisposeOnClean.dispose(),VC(this.view)}isVisible(){return!!this.delegate}onDOMEvent(e,i){this.delegate&&(this.delegate.onDOMEvent?this.delegate.onDOMEvent(e,document.activeElement):i&&!_s(e.target,this.container)&&this.hide())}dispose(){this.hide(),super.dispose()}};o0.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"];o0.BUBBLE_DOWN_EVENTS=["click"];var Z8=`
133	:host {
134		all: initial; /* 1st rule so subsequent properties are reset. */
135	}
136
137	@font-face {
138		font-family: "codicon";
139		font-display: block;
140		src: url("./codicon.ttf?5d4d76ab2ce5108968ad644d591a16a6") format("truetype");
141	}
142
143	.codicon[class*='codicon-'] {
144		font: normal normal normal 16px/1 codicon;
145		display: inline-block;
146		text-decoration: none;
147		text-rendering: auto;
148		text-align: center;
149		-webkit-font-smoothing: antialiased;
150		-moz-osx-font-smoothing: grayscale;
151		user-select: none;
152		-webkit-user-select: none;
153		-ms-user-select: none;
154	}
155
156	:host {
157		font-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", system-ui, "Ubuntu", "Droid Sans", sans-serif;
158	}
159
160	:host-context(.mac) { font-family: -apple-system, BlinkMacSystemFont, sans-serif; }
161	:host-context(.mac:lang(zh-Hans)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", sans-serif; }
162	:host-context(.mac:lang(zh-Hant)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", sans-serif; }
163	:host-context(.mac:lang(ja)) { font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic Pro", sans-serif; }
164	:host-context(.mac:lang(ko)) { font-family: -apple-system, BlinkMacSystemFont, "Nanum Gothic", "Apple SD Gothic Neo", "AppleGothic", sans-serif; }
165
166	:host-context(.windows) { font-family: "Segoe WPC", "Segoe UI", sans-serif; }
167	:host-context(.windows:lang(zh-Hans)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft YaHei", sans-serif; }
168	:host-context(.windows:lang(zh-Hant)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft Jhenghei", sans-serif; }
169	:host-context(.windows:lang(ja)) { font-family: "Segoe WPC", "Segoe UI", "Yu Gothic UI", "Meiryo UI", sans-serif; }
170	:host-context(.windows:lang(ko)) { font-family: "Segoe WPC", "Segoe UI", "Malgun Gothic", "Dotom", sans-serif; }
171
172	:host-context(.linux) { font-family: system-ui, "Ubuntu", "Droid Sans", sans-serif; }
173	: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; }
174	: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; }
175	: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; }
176	: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; }
177`,Y8=function(t,e,i,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r},X8=function(t,e){return function(i,n){e(i,n,t)}},P_=class extends V{constructor(e){super(),this.layoutService=e,this.currentViewDisposable=V.None,this.container=e.hasContainer?e.container:null,this.contextView=this._register(new o0(this.container,1)),this.layout(),this._register(e.onDidLayout(()=>this.layout()))}setContainer(e,i){this.contextView.setContainer(e,i||1)}showContextView(e,i,n){i?i!==this.container&&(this.container=i,this.setContainer(i,n?3:2)):this.layoutService.hasContainer&&this.container!==this.layoutService.container&&(this.container=this.layoutService.container,this.setContainer(this.container,1)),this.contextView.show(e);const s=Ae(()=>{this.currentViewDisposable===s&&this.hideContextView()});return this.currentViewDisposable=s,s}getContextViewElement(){return this.contextView.getViewElement()}layout(){this.contextView.layout()}hideContextView(e){this.contextView.hide(e)}};P_=Y8([X8(0,Uh)],P_);var bd="[/\\\\]",wd="[^/\\\\]",Q8=/\//g;function Hw(t){switch(t){case 0:return"";case 1:return`${wd}*?`;default:return`(?:${bd}|${wd}+${bd}|${bd}${wd}+)*?`}}function zw(t,e){if(!t)return[];const i=[];let n=!1,s=!1,r="";for(const o of t){switch(o){case e:if(!n&&!s){i.push(r),r="";
177continue}break;case"{":n=!0;break;case"}":n=!1;break;case"[":s=!0;break;case"]":s=!1}r+=o}return r&&i.push(r),i}function oI(t){if(!t)return"";let e="";const i=zw(t,"/");if(i.every(n=>n==="**"))e=".*";else{let n=!1;i.forEach((s,r)=>{if(s==="**"){n||(e+=Hw(2),n=!0);return}let o=!1,a="",l=!1,h="";for(const c of s){if(c!=="}"&&o){a+=c;continue}if(l&&(c!=="]"||!h)){let d;c==="-"?d=c:(c==="^"||c==="!")&&!h?d="^":c==="/"?d="":d=Vn(c),h+=d;continue}switch(c){case"{":o=!0;continue;case"[":l=!0;continue;case"}":{const d=`(?:${zw(a,",").map(u=>oI(u)).join("|")})`;e+=d,o=!1,a="";break}case"]":e+="["+h+"]",l=!1,h="";break;case"?":e+=wd;continue;case"*":e+=Hw(1);continue;default:e+=Vn(c)}}r<i.length-1&&(i[r+1]!=="**"||r+2<i.length)&&(e+=bd),n=!1})}return e}var J8=/^\*\*\/\*\.[\w\.-]+$/,e6=/^\*\*\/([\w\.-]+)\/?$/,t6=/^{\*\*\/\*?[\w\.-]+\/?(,\*\*\/\*?[\w\.-]+\/?)*}$/,i6=/^{\*\*\/\*?[\w\.-]+(\/(\*\*)?)?(,\*\*\/\*?[\w\.-]+(\/(\*\*)?)?)*}$/,n6=/^\*\*((\/[\w\.-]+)+)\/?$/,s6=/^([\w\.-]+(\/[\w\.-]+)*)\/?$/,Uw=new r0(1e4),$w=function(){return!1},Fn=function(){return null};function a0(t,e){if(!t)return Fn;let i;typeof t!="string"?i=t.pattern:i=t,i=i.trim();const n=`${i}_${!!e.trimForExclusions}`;let s=Uw.get(n);if(s)return Kw(s,t);let r;if(J8.test(i)){const o=i.substr(4);s=function(a,l){return typeof a=="string"&&a.endsWith(o)?i:null}}else(r=e6.exec(Ng(i,e)))?s=r6(r[1],i):(e.trimForExclusions?i6:t6).test(i)?s=o6(i,e):(r=n6.exec(Ng(i,e)))?s=jw(r[1].substr(1),i,!0):(r=s6.exec(Ng(i,e)))?s=jw(r[1],i,!1):s=a6(i);return Uw.set(n,s),Kw(s,t)}function Kw(t,e){return typeof e=="string"?t:function(i,n){return m_(i,e.base,!Bt)?t(i.substr(e.base.length+1),n):null}}function Ng(t,e){return e.trimForExclusions&&t.endsWith("/**")?t.substr(0,t.length-2):t}function r6(t,e){const i=`/${t}`,n=`\\${t}`,s=function(o,a){return typeof o!="string"?null:a?a===t?e:null:o===t||o.endsWith(i)||o.endsWith(n)?e:null},r=[t];return s.basenames=r,s.patterns=[e],s.allBasenames=r,s}function o6(t,e){const i=lI(t.slice(1,-1).split(",").map(a=>a0(a,e)).filter(a=>a!==Fn),t),n=i.length;if(!n)return Fn;if(n===1)return i[0];const s=function(a,l){for(let h=0,c=i.length;h<c;h++)if(i[h](a,l))return t;return null},r=i.find(a=>!!a.allBasenames);r&&(s.allBasenames=r.allBasenames);const o=i.reduce((a,l)=>l.allPaths?a.concat(l.allPaths):a,[]);return o.length&&(s.allPaths=o),s}function jw(t,e,i){const n=$r===Ze.sep,s=n?t:t.replace(Q8,$r),r=$r+s,o=Ze.sep+t,a=i?function(l,h){return typeof l=="string"&&(l===s||l.endsWith(r)||!n&&(l===t||l.endsWith(o)))?e:null}:function(l,h){return typeof l=="string"&&(l===s||!n&&l===t)?e:null};return a.allPaths=[(i?"*/":"./")+t],a}function a6(t){try{const e=new RegExp(`^${oI(t)}$`);return function(i){return e.lastIndex=0,typeof i=="string"&&e.test(i)?t:null}}catch{return Fn}}function l6(t,e,i){return!t||typeof e!="string"?!1:aI(t)(e,void 0,i)}function aI(t,e={}){if(!t)return $w;if(typeof t=="string"||h6(t)){const i=a0(t,e);if(i===Fn)return $w;const n=function(s,r){return!!i(s,r)};return i.allBasenames&&(n.allBasenames=i.allBasenames),i.allPaths&&(n.allPaths=i.allPaths),n}return c6(t,e)}function h6(t){const e=t;return e?typeof e.base=="string"&&typeof e.pattern=="string":!1}function c6(t,e){const i=lI(Object.getOwnPropertyNames(t).map(a=>d6(a,t[a],e)).filter(a=>a!==Fn)),n=i.length;if(!n)return Fn;if(!i.some(a=>!!a.requiresSiblings)){if(n===1)return i[0];const a=function(c,d){for(let u=0,g=i.length;u<g;u++){const m=i[u](c,d);if(m)return m}return null},l=i.find(c=>!!c.allBasenames);l&&(a.allBasenames=l.allBasenames);const h=i.reduce((c,d)=>d.allPaths?c.concat(d.allPaths):c,[]);return h.length&&(a.allPaths=h),a}const s=function(a,l,h){let c;for(let d=0,u=i.length;d<u;d++){const g=i[d];g.requiresSiblings&&h&&(l||(l=My(a)),c||(c=l.substr(0,l.length-b4(a).length)));const m=g(a,l,c,h);if(m)return m}return null},r=i.find(a=>!!a.allBasenames);r&&(s.allBasenames=r.allBasenames);const o=i.reduce((a,l)=>l.allPaths?a.concat(l.allPaths):a,[]);return o.length&&(s.allPaths=o),s}function d6(t,e,i){if(e===!1)return Fn;const n=a0(t,i);if(n===Fn)return Fn;if(typeof e=="boolean")return n;if(e){const s=e.when;if(typeof s=="string"){const r=(o,a,l,h)=>
177{if(!h||!n(o,a))return null;const c=h(s.replace("$(basename)",l));return PT(c)?c.then(d=>d?t:null):c?t:null};return r.requiresSiblings=!0,r}}return n}function lI(t,e){const i=t.filter(a=>!!a.basenames);if(i.length<2)return t;const n=i.reduce((a,l)=>{const h=l.basenames;return h?a.concat(h):a},[]);let s;if(e){s=[];for(let a=0,l=n.length;a<l;a++)s.push(e)}else s=i.reduce((a,l)=>{const h=l.patterns;return h?a.concat(h):a},[]);const r=function(a,l){if(typeof a!="string")return null;if(!l){let c;for(c=a.length;c>0;c--){const d=a.charCodeAt(c-1);if(d===47||d===92)break}l=a.substr(c)}const h=n.indexOf(l);return h!==-1?s[h]:null};r.basenames=n,r.patterns=s,r.allBasenames=n;const o=t.filter(a=>!a.basenames);return o.push(r),o}var Ra=[],l0=[],hI=[];function Ic(t,e=!1){u6(t,!1,e)}function u6(t,e,i){const n=f6(t,e);Ra.push(n),n.userConfigured?hI.push(n):l0.push(n),i&&!n.userConfigured&&Ra.forEach(s=>{s.mime===n.mime||s.userConfigured||(n.extension&&(s.extension,n.extension),n.filename&&(s.filename,n.filename),n.filepattern&&(s.filepattern,n.filepattern),n.firstline&&(s.firstline,n.firstline))})}function f6(t,e){return{id:t.id,mime:t.mime,filename:t.filename,extension:t.extension,filepattern:t.filepattern,firstline:t.firstline,userConfigured:e,filenameLowercase:t.filename?t.filename.toLowerCase():void 0,extensionLowercase:t.extension?t.extension.toLowerCase():void 0,filepatternLowercase:t.filepattern?aI(t.filepattern.toLowerCase()):void 0,filepatternOnPath:t.filepattern?t.filepattern.indexOf(Ze.sep)>=0:!1}}function g6(){Ra=Ra.filter(t=>t.userConfigured),l0=[]}function m6(t,e){let i;if(t)switch(t.scheme){case _e.file:i=t.fsPath;break;case _e.data:i=uu.parseMetaData(t).get(uu.META_DATA_LABEL);break;default:i=t.path}if(!i)return[dn.unknown];i=i.toLowerCase();const n=My(i),s=qw(i,n,hI);if(s)return[s,dn.text];const r=qw(i,n,l0);if(r)return[r,dn.text];if(e){const o=p6(e);if(o)return[o,dn.text]}return[dn.unknown]}function qw(t,e,i){var n;let s,r,o;for(let a=i.length-1;a>=0;a--){const l=i[a];if(e===l.filenameLowercase){s=l;break}if(l.filepattern&&(!r||l.filepattern.length>r.filepattern.length)){const h=l.filepatternOnPath?t:e;!((n=l.filepatternLowercase)===null||n===void 0)&&n.call(l,h)&&(r=l)}l.extension&&(!o||l.extension.length>o.extension.length)&&e.endsWith(l.extensionLowercase)&&(o=l)}if(s)return s.mime;if(r)return r.mime;if(o)return o.mime}function p6(t){if(dv(t)&&(t=t.substr(1)),t.length>0)for(let e=Ra.length-1;e>=0;e--){const i=Ra[e];if(!i.firstline)continue;const n=t.match(i.firstline);if(n&&n.length>0)return i.mime}}var Ec=Object.prototype.hasOwnProperty,F_="vs.editor.nullLanguage";Wi.register(F_,{});var _6=class{constructor(){this._languageIdToLanguage=[],this._languageToLanguageId=new Map,this._register(F_,0),this._register(Hh,1),this._nextLanguageId=2}_register(t,e){this._languageIdToLanguage[e]=t,this._languageToLanguageId.set(t,e)}register(t){if(this._languageToLanguageId.has(t))return;const e=this._nextLanguageId++;this._register(t,e)}encodeLanguageId(t){return this._languageToLanguageId.get(t)||0}decodeLanguageId(t){return this._languageIdToLanguage[t]||F_}},cI=class B_ extends V{constructor(e=!0,i=!1){super(),this._onDidChange=this._register(new M),this.onDidChange=this._onDidChange.event,B_.instanceCount++,this._warnOnOverwrite=i,this.languageIdCodec=new _6,this._dynamicLanguages=[],this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},e&&(this._initializeFromRegistry(),this._register(Na.onDidChangeLanguages(n=>{this._initializeFromRegistry()})))}dispose(){B_.instanceCount--,super.dispose()}_initializeFromRegistry(){this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},g6();const e=[].concat(Na.getLanguages()).concat(this._dynamicLanguages);this._registerLanguages(e)}_registerLanguages(e){for(const i of e)this._registerLanguage(i);this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Object.keys(this._languages).forEach(i=>{const n=this._languages[i];n.name&&(this._nameMap[n.name]=n.identifier),n.aliases.forEach(s=>{this._lowercaseNameMap[s.toLowerCase()]=n.identifier}
177),n.mimetypes.forEach(s=>{this._mimeTypesMap[s]=n.identifier})}),vt.as(Ga.Configuration).registerOverrideIdentifiers(this.getRegisteredLanguageIds()),this._onDidChange.fire()}_registerLanguage(e){const i=e.id;let n;Ec.call(this._languages,i)?n=this._languages[i]:(this.languageIdCodec.register(i),n={identifier:i,name:null,mimetypes:[],aliases:[],extensions:[],filenames:[],configurationFiles:[],icons:[]},this._languages[i]=n),this._mergeLanguage(n,e)}_mergeLanguage(e,i){const n=i.id;let s=null;if(Array.isArray(i.mimetypes)&&i.mimetypes.length>0&&(e.mimetypes.push(...i.mimetypes),s=i.mimetypes[0]),s||(s=`text/x-${n}`,e.mimetypes.push(s)),Array.isArray(i.extensions)){i.configuration?e.extensions=i.extensions.concat(e.extensions):e.extensions=e.extensions.concat(i.extensions);for(let a of i.extensions)Ic({id:n,mime:s,extension:a},this._warnOnOverwrite)}if(Array.isArray(i.filenames))for(let a of i.filenames)Ic({id:n,mime:s,filename:a},this._warnOnOverwrite),e.filenames.push(a);if(Array.isArray(i.filenamePatterns))for(let a of i.filenamePatterns)Ic({id:n,mime:s,filepattern:a},this._warnOnOverwrite);if(typeof i.firstLine=="string"&&i.firstLine.length>0){let a=i.firstLine;a.charAt(0)!=="^"&&(a="^"+a);try{const l=new RegExp(a);F4(l)||Ic({id:n,mime:s,firstline:l},this._warnOnOverwrite)}catch(l){We(l)}}e.aliases.push(n);let r=null;if(typeof i.aliases<"u"&&Array.isArray(i.aliases)&&(i.aliases.length===0?r=[null]:r=i.aliases),r!==null)for(const a of r)!a||a.length===0||e.aliases.push(a);const o=r!==null&&r.length>0;if(!(o&&r[0]===null)){const a=(o?r[0]:null)||n;(o||!e.name)&&(e.name=a)}i.configuration&&e.configurationFiles.push(i.configuration),i.icon&&e.icons.push(i.icon)}isRegisteredLanguageId(e){return e?Ec.call(this._languages,e):!1}getRegisteredLanguageIds(){return Object.keys(this._languages)}getLanguageIdByLanguageName(e){const i=e.toLowerCase();return Ec.call(this._lowercaseNameMap,i)?this._lowercaseNameMap[i]:null}getLanguageIdByMimeType(e){return e&&Ec.call(this._mimeTypesMap,e)?this._mimeTypesMap[e]:null}guessLanguageIdByFilepathOrFirstLine(e,i){if(!e&&!i)return[];const n=m6(e,i);return cy(n.map(s=>this.getLanguageIdByMimeType(s)))}};cI.instanceCount=0;var dI=class V_ extends V{constructor(e=!1){super(),this._onDidEncounterLanguage=this._register(new M),this.onDidEncounterLanguage=this._onDidEncounterLanguage.event,this._onDidChange=this._register(new M({leakWarningThreshold:200})),this.onDidChange=this._onDidChange.event,V_.instanceCount++,this._encounteredLanguages=new Set,this._registry=this._register(new cI(!0,e)),this.languageIdCodec=this._registry.languageIdCodec,this._register(this._registry.onDidChange(()=>this._onDidChange.fire()))}dispose(){V_.instanceCount--,super.dispose()}isRegisteredLanguageId(e){return this._registry.isRegisteredLanguageId(e)}getLanguageIdByLanguageName(e){return this._registry.getLanguageIdByLanguageName(e)}getLanguageIdByMimeType(e){return this._registry.getLanguageIdByMimeType(e)}guessLanguageIdByFilepathOrFirstLine(e,i){const n=this._registry.guessLanguageIdByFilepathOrFirstLine(e,i);return dy(n,null)}createById(e){return new Gw(this.onDidChange,()=>this._createAndGetLanguageIdentifier(e))}createByFilepathOrFirstLine(e,i){return new Gw(this.onDidChange,()=>{const n=this.guessLanguageIdByFilepathOrFirstLine(e,i);return this._createAndGetLanguageIdentifier(n)})}_createAndGetLanguageIdentifier(e){return(!e||!this.isRegisteredLanguageId(e))&&(e=Hh),this._encounteredLanguages.has(e)||(this._encounteredLanguages.add(e),Ge.getOrCreate(e),this._onDidEncounterLanguage.fire(e)),e}};dI.instanceCount=0;var Gw=class{constructor(t,e){this._onDidChangeLanguages=t,this._selector=e,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 M({onLastListenerRemove:()=>{this._dispose()}})),this._emitter.event}_evaluate(){const t=this._selector();t!==this.languageId&&(this.languageId=t,this._emitter&&this._emitter.fire(this.languageId))}};function Zw(t){let e=t.definition;for(;e instanceof f;)e=e.definition;return`.codicon-${t.id}:before { content: '${e.fontCharacter}'; }`}function uI(...t){return function(e,i){for(let n=0,s=t.length;n<s;n++){const r=t[n](e,i);if(r)return r}return null}}var z$=fI.bind(void 0,!1),h0=fI.bind(void 0,!0);function fI(t,e,i){if(!i||i.length<e.length)return null;let n;return t?n=sv(i,e):n=i.indexOf(e)===0,n?e.length>0?[{start:0,end:e.length}]:[]:null}function v6(t,e){const i=e.toLowerCase().indexOf(t.toLowerCase());return i===-1?null:[{start:i,end:i+t.length}]}function C6(t,e){return W_(t.toLowerCase(),e.toLowerCase(),0,0)}function W_(t,e,i,n){if(i===t.length)return[];if(n===e.length)return null;if(t[i]===e[n]){let s=null;return(s=W_(t,e,i+1,n+1))?mI({start:n,end:n+1},s):null}return W_(t,e,i,n+1)}function c0(t){return 97<=t&&t<=122}function cf(t){return 65<=t&&t<=90}function d0(t){return 48<=t&&t<=57}function b6(t){return t===32||t===9||t===10||t===13}var w6=new Set;"()[]{}<>`'\"-/;:,.?!".split("").forEach(t=>w6.add(t.charCodeAt(0)));function gI(t){return c0(t)||cf(t)||d0(t)}function mI(t,e){return e.length===0?e=[t]:t.end===e[0].start?e[0].start=t.start:e.unshift(t),e}function pI(t,e){for(let i=e;i<t.length;i++){const n=t.charCodeAt(i);if(cf(n)||d0(n)||i>0&&!gI(t.charCodeAt(i-1)))return i}return t.length}function H_(t,e,i,n){if(i===t.length)return[];if(n===e.length)return null;if(t[i]!==e[n].toLowerCase())return null;{let s=null,r=n+1;for(s=H_(t,e,i+1,n+1);!s&&(r=pI(e,r))<e.length;)s=H_(t,e,i+1,r),r++;return s===null?null:mI({start:n,end:n+1},s)}}function S6(t){let e=0,i=0,n=0,s=0,r=0;for(let o=0;o<t.length;o++)r=t.charCodeAt(o),cf(r)&&e++,c0(r)&&i++,gI(r)&&n++,d0(r)&&s++;return{upperPercent:e/t.length,lowerPercent:i/t.length,alphaPercent:n/t.length,numericPercent:s/t.length}}function y6(t){const{upperPercent:e,lowerPercent:i}=t;return i===0&&e>.6}function L6(t){const{upperPercent:e,lowerPercent:i,alphaPercent:n,numericPercent:s}=t;return i>.2&&e<.8&&n>.6&&s<.2}function k6(t){let e=0,i=0,n=0,s=0;for(let r=0;r<t.length;r++)n=t.charCodeAt(r),cf(n)&&e++,c0(n)&&i++,b6(n)&&s++;return(e===0||i===0)&&s===0?t.length<=30:e<=5}function _I(t,e){if(!e||(e=e.trim(),e.length===0)||!k6(t)||e.length>60)return null;const i=S6(e);if(!L6(i)){if(!y6(i))return null;e=e.toLowerCase()}let n=null,s=0;for(t=t.toLowerCase();
177s<e.length&&(n=H_(t,e,0,s))===null;)s=pI(e,s+1);return n}var x6=uI(h0,_I,v6),I6=uI(h0,_I,C6),Yw=new r0(1e4);function Xw(t,e,i=!1){if(typeof t!="string"||typeof e!="string")return null;let n=Yw.get(t);n||(n=new RegExp(P4(t),"i"),Yw.set(t,n));const s=n.exec(e);return s?[{start:s.index,end:s.index+s[0].length}]:i?I6(t,e):x6(t,e)}var Qo=128;function u0(){const t=[],e=[];for(let i=0;i<=Qo;i++)e[i]=0;for(let i=0;i<=Qo;i++)t.push(e.slice(0));return t}function vI(t){const e=[];for(let i=0;i<=t;i++)e[i]=0;return e}var CI=vI(256),z_=vI(256),Jn=u0(),br=u0(),Dc=u0();function Nc(t,e){if(e<0||e>=t.length)return!1;const i=t.codePointAt(e);switch(i){case 95:case 45:case 46:case 32:case 47:case 92:case 39:case 34:case 58:case 36:case 60:case 40:case 91:return!0;case void 0:return!1;default:return!!cv(i)}}function Qw(t,e){if(e<0||e>=t.length)return!1;switch(t.charCodeAt(e)){case 32:case 9:return!0;default:return!1}}function Sd(t,e,i){return e[t]!==i[t]}function E6(t,e,i,n,s,r,o=!1){for(;e<i&&s<r;)t[e]===n[s]&&(o&&(CI[e]=s),e+=1),s+=1;return e===i}var Yr;(function(t){t.Default=[-100,0];function e(i){return!i||i.length===2&&i[0]===-100&&i[1]===0}t.isDefault=e})(Yr||(Yr={}));function D6(t,e,i,n,s,r,o){const a=t.length>Qo?Qo:t.length,l=n.length>Qo?Qo:n.length;if(i>=a||r>=l||a-i>l-r||!E6(e,i,a,s,r,l,!0))return;N6(a,l,i,r,e,s);let h=1,c=1,d=i,u=r;const g=[!1];for(h=1,d=i;d<a;h++,d++){const v=CI[d],b=z_[d],y=d+1<a?z_[d+1]:l;for(c=v-r+1,u=v;u<y;c++,u++){let k=Number.MIN_SAFE_INTEGER,S=!1;u<=b&&(k=T6(t,e,d,i,n,s,u,l,r,Jn[h-1][c-1]===0,g));let L=0;k!==Number.MAX_SAFE_INTEGER&&(S=!0,L=k+br[h-1][c-1]);const x=u>v,E=x?br[h][c-1]+(Jn[h][c-1]>0?-5:0):0,R=u>v+1&&Jn[h][c-1]>0,D=R?br[h][c-2]+(Jn[h][c-2]>0?-5:0):0;if(R&&(!x||D>=E)&&(!S||D>=L))br[h][c]=D,Dc[h][c]=3,Jn[h][c]=0;else if(x&&(!S||E>=L))br[h][c]=E,Dc[h][c]=2,Jn[h][c]=0;else if(S)br[h][c]=L,Dc[h][c]=1,Jn[h][c]=Jn[h-1][c-1]+1;else throw new Error("not possible")}}if(!g[0]&&!o)return;h--,c--;const m=[br[h][c],r];let _=0,C=0;for(;h>=1;){let v=c;do{const b=Dc[h][v];if(b===3)v=v-2;else if(b===2)v=v-1;else break}while(v>=1);_>1&&e[i+h-1]===s[r+c-1]&&!Sd(v+r-1,n,s)&&_+1>Jn[h][v]&&(v=c),v===c?_++:_=1,C||(C=v),h--,c=v-1,m.push(c)}l===a&&(m[0]+=2);const w=C-a;return m[0]-=w,m}function N6(t,e,i,n,s,r){let o=t-1,a=e-1;for(;o>=i&&a>=n;)s[o]===r[a]&&(z_[o]=a,o--),a--}function T6(t,e,i,n,s,r,o,a,l,h,c){if(e[i]!==r[o])return Number.MIN_SAFE_INTEGER;let d=1,u=!1;return o===i-n?d=t[i]===s[o]?7:5:Sd(o,s,r)&&(o===0||!Sd(o-1,s,r))?(d=t[i]===s[o]?7:5,u=!0):Nc(r,o)&&(o===0||!Nc(r,o-1))?d=5:(Nc(r,o-1)||Qw(r,o-1))&&(d=5,u=!0),d>1&&i===n&&(c[0]=!0),u||(u=Sd(o,s,r)||Nc(r,o-1)||Qw(r,o-1)),i===n?o>l&&(d-=u?3:5):h?d+=u?2:0:d+=u?0:1,o+1===a&&(d-=u?3:5),d}var f0=new RegExp(`\\$\\(${qt.iconNameExpression}(?:${qt.iconModifierExpression})?\\)`,"g"),M6=new RegExp(qt.iconNameCharacter),R6=new RegExp(`(\\\\)?${f0.source}`,"g");function A6(t){return t.replace(R6,(e,i)=>i?e:`\\${e}`)}var U$=new RegExp(`\\\\${f0.source}`,"g"),O6=new RegExp(`(\\s)?(\\\\)?${f0.source}(\\s)?`,"g");function bI(t){return t.indexOf("$(")===-1?t:t.replace(O6,(e,i,n,s)=>n?e:i||s||"")}function Tc(t){const e=t.indexOf("$(");return e===-1?{text:t}:P6(t,e)}function P6(t,e){const i=[];let n="";function s(u){if(u){n+=u;for(const g of u)i.push(a)}}let r=-1,o="",a=0,l,h,c=e;const d=t.length;for(s(t.substr(0,e));c<d;){if(l=t[c],h=t[c+1],l==="$"&&h==="(")r=c,s(o),o="$(",c++;else if(l===")"&&r!==-1){const u=c-r+1;a+=u,r=-1,o=""}else r!==-1?M6.test(l)?o+=l:(s(o),r=-1,o=""):s(l);c++}return s(o),{text:n,iconOffsets:i}}function Mc(t,e,i=!1){const{text:n,iconOffsets:s}=e;if(!s||s.length===0)return Xw(t,n,i);const r=Vy(n," "),o=n.length-r.length,a=Xw(t,r,i);if(a)for(const l of a){const h=s[l.start+o]+o;l.start+=h,l.end+=h}return a}var U_=/\(&([^\s&])\)|(^|[^&])&([^\s&])/,Tg=/(&amp;)?(&amp;)([^\s&])/g,ku;(function(t){t[t.Right=0]="Right",t[t.Left=1]="Left"})(ku||(ku={}));var wI=class yd extends Ma{constructor(e,i,n={}){e.classList.add("monaco-menu-container"),e.setAttribute("role","presentation");const s=document.createElement("div");s.classList.add("monaco-menu"),s.setAttribute("role","presentation"),super(s,{orientation:1,actionViewItemProvider:a=>this.doGetActionViewItem(a,n,r),context:n.context,actionRunner:n.actionRunner,ariaLabel:n.ariaLabel,focusOnlyEnabledItems:!0,triggerKeys:{keys:[3,...fe||Bt?[10]:[]],keyDown:!0}}),this.menuElement=s,this.actionsList.setAttribute("role","menu"),this.actionsList.tabIndex=0,this.menuDisposables=this._register(new ne),this.initializeOrUpdateStyleSheet(e,{}),this._register(ii.addTarget(s)),B(s,Z.KEY_DOWN,a=>{new Pe(a).equals(2)&&a.preventDefault()}),n.enableMnemonics&&this.menuDisposables.add(B(s,Z.KEY_DOWN,a=>{const l=a.key.toLocaleLowerCase();if(this.mnemonics.has(l)){ye.stop(a,!0);const h=this.mnemonics.get(l);if(h.length===1&&(h[0]instanceof Jw&&h[0].container&&this.focusItemByElement(h[0].container),h[0].onClick(a)),h.length>1){const c=h.shift();c&&c.container&&(this.focusItemByElement(c.container),h.push(c)),this.mnemonics.set(l,h)}}})),Bt&&this._register(B(s,Z.KEY_DOWN,a=>{const l=new Pe(a);l.equals(14)||l.equals(11)?(this.focusedItem=this.viewItems.length-1,this.focusNext(),ye.stop(a,!0)):(l.equals(13)||l.equals(12))&&(this.focusedItem=0,this.focusPrevious(),ye.stop(a,!0))})),this._register(B(this.domNode,Z.MOUSE_OUT,a=>{let l=a.relatedTarget;_s(l,this.domNode)||(this.focusedItem=void 0,this.updateFocus(),a.stopPropagation())})),this._register(B(this.actionsList,Z.MOUSE_OVER,a=>{let l=a.target;if(!(!l||!_s(l,this.actionsList)||l===this.actionsList)){for(;l.parentElement!==this.actionsList&&l.parentElement!==null;)l=l.parentElement;if(l.classList.contains("action-item")){const h=this.focusedItem;this.setFocusedItem(l),h!==this.focusedItem&&this.updateFocus()}}})),this._register(ii.addTarget(this.actionsList)),this._register(B(this.actionsList,Me.Tap,a=>{let l=a.initialTarget;if(!(!l||!_s(l,this.actionsList)||l===this.actionsList)){for(;l.parentElement!==this.actionsList&&l.parentElement!==null;)l=l.parentElement;if(l.classList.contains("action-item")){const h=this.focusedItem;this.setFocusedItem(l),h!==this.focusedItem&&this.updateFocus()}}}));let r={parent:this};this.mnemonics=new Map,this.scrollableElement=this._register(new Uk(s,{alwaysConsumeMouseWheel:!0,horizontal:2,vertical:3,verticalScrollbarSize:7,handleMouseWheel:!0,useShadows:!0}));const o=this.scrollableElement.getDomNode();o.style.position="",this._register(B(s,Me.Change,a=>{ye.stop(a,!0);const l=this.scrollableElement.getScrollPosition().scrollTop;this.scrollableElement.setScrollPosition({scrollTop:l-a.translationY})})),this._register(B(o,Z.MOUSE_UP,a=>{a.preventDefault()})),s.style.maxHeight=`${Math.max(10,window.innerHeight-e.getBoundingClientRect().top-35)}px`,i=i.filter(a=>{var l;return!(!((l=n.submenuIds)===null||l===void 0)&&l.has(a.id))}),this.push(i,{icon:!0,label:!0,isMenu:!0}),e.appendChild(this.scrollableElement.getDomNode()),this.scrollableElement.scanDomNode(),this.viewItems.filter(a=>
177!(a instanceof Mg)).forEach((a,l,h)=>{a.updatePositionInSet(l+1,h.length)})}initializeOrUpdateStyleSheet(e,i){this.styleSheet||(Xd(e)?this.styleSheet=Yi(e):(yd.globalStyleSheet||(yd.globalStyleSheet=Yi()),this.styleSheet=yd.globalStyleSheet)),this.styleSheet.textContent=B6(i,Xd(e))}style(e){const i=this.getContainer();this.initializeOrUpdateStyleSheet(i,e);const n=e.foregroundColor?`${e.foregroundColor}`:"",s=e.backgroundColor?`${e.backgroundColor}`:"",r=e.borderColor?`1px solid ${e.borderColor}`:"",o=e.shadowColor?`0 2px 4px ${e.shadowColor}`:"";i.style.border=r,this.domNode.style.color=n,this.domNode.style.backgroundColor=s,i.style.boxShadow=o,this.viewItems&&this.viewItems.forEach(a=>{(a instanceof $_||a instanceof Mg)&&a.style(e)})}getContainer(){return this.scrollableElement.getDomNode()}get onScroll(){return this.scrollableElement.onScroll}focusItemByElement(e){const i=this.focusedItem;this.setFocusedItem(e),i!==this.focusedItem&&this.updateFocus()}setFocusedItem(e){for(let i=0;i<this.actionsList.children.length;i++)if(e===this.actionsList.children[i]){this.focusedItem=i;break}}updateFocus(e){super.updateFocus(e,!0,!0),typeof this.focusedItem<"u"&&this.scrollableElement.setScrollPosition({scrollTop:Math.round(this.menuElement.scrollTop)})}doGetActionViewItem(e,i,n){if(e instanceof Ah)return new Mg(i.context,e,{icon:!0});if(e instanceof e2){const s=new Jw(e,e.actions,n,Object.assign(Object.assign({},i),{submenuIds:new Set([...i.submenuIds||[],e.id])}));if(i.enableMnemonics){const r=s.getMnemonic();if(r&&s.isEnabled()){let o=[];this.mnemonics.has(r)&&(o=this.mnemonics.get(r)),o.push(s),this.mnemonics.set(r,o)}}return s}else{const s={enableMnemonics:i.enableMnemonics,useEventAsContext:i.useEventAsContext};if(i.getKeyBinding){const o=i.getKeyBinding(e);if(o){const a=o.getLabel();a&&(s.keybinding=a)}}const r=new $_(i.context,e,s);if(i.enableMnemonics){const o=r.getMnemonic();if(o&&r.isEnabled()){let a=[];this.mnemonics.has(o)&&(a=this.mnemonics.get(o)),a.push(r),this.mnemonics.set(o,a)}}return r}}},$_=class extends Ps{constructor(t,e,i={}){if(i.isMenu=!0,super(e,e,i),this.options=i,this.options.icon=i.icon!==void 0?i.icon:!1,this.options.label=i.label!==void 0?i.label:!0,this.cssClass="",this.options.label&&i.enableMnemonics){let n=this.getAction().label;if(n){let s=U_.exec(n);s&&(this.mnemonic=(s[1]?s[1]:s[3]).toLocaleLowerCase())}}this.runOnceToEnableMouseUp=new _t(()=>{this.element&&(this._register(B(this.element,Z.MOUSE_UP,n=>{if(ye.stop(n,!0),Ii){if(new ji(n).rightButton)return;this.onClick(n)}else setTimeout(()=>{this.onClick(n)},0)})),this._register(B(this.element,Z.CONTEXT_MENU,n=>{ye.stop(n,!0)})))},100),this._register(this.runOnceToEnableMouseUp)}render(t){super.render(t),this.element&&(this.container=t,this.item=z(this.element,Q("a.action-menu-item")),this._action.id===Ah.ID?this.item.setAttribute("role","presentation"):(this.item.setAttribute("role","menuitem"),this.mnemonic&&this.item.setAttribute("aria-keyshortcuts",`${this.mnemonic}`)),this.check=z(this.item,Q("span.menu-item-check"+f.menuSelection.cssSelector)),this.check.setAttribute("role","none"),this.label=z(this.item,Q("span.action-label")),this.options.label&&this.options.keybinding&&(z(this.item,Q("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(t,e){this.item&&(this.item.setAttribute("aria-posinset",`${t}`),this.item.setAttribute("aria-setsize",`${e}`))}updateLabel(){if(this.label&&this.options.label){Ei(this.label);let t=bI(this.getAction().label);if(t){const e=F6(t);this.options.enableMnemonics||(t=e),this.label.setAttribute("aria-label",e.replace(/&&/g,"&"));const i=U_.exec(t);if(i){t=A4(t),Tg.lastIndex=0;let n=Tg.exec(t);for(;n&&n[1];)n=Tg.exec(t);const s=r=>r.replace(/&amp;&amp;/g,"&amp;");n?this.label.append(Vy(s(t.substr(0,n.index))," "),Q("u",{"aria-hidden":"true"},n[3]),O4(s(t.substr(n.index+n[0].length))," ")):this.label.innerText=s(t).trim(),this.item&&this.item.setAttribute("aria-keyshortcuts",(i[1]?i[1]:i[3]).toLocaleLowerCase())}else this.label.innerText=t.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 t=this.getAction().checked;this.item.classList.toggle("checked",!!t),t!==void 0?(this.item.setAttribute("role","menuitemcheckbox"),this.item.setAttribute("aria-checked",t?"true":"false")):(this.item.setAttribute("role","menuitem"),this.item.setAttribute("aria-checked",""))}getMnemonic(){return this.mnemonic}applyStyle(){if(!this.menuStyle)return;const t=this.element&&this.element.classList.contains("focused"),e=t&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor,i=t&&this.menuStyle.selectionBackgroun
177dColor?this.menuStyle.selectionBackgroundColor:void 0,n=t&&this.menuStyle.selectionBorderColor?`thin solid ${this.menuStyle.selectionBorderColor}`:"";this.item&&(this.item.style.color=e?e.toString():"",this.item.style.backgroundColor=i?i.toString():""),this.check&&(this.check.style.color=e?e.toString():""),this.container&&(this.container.style.border=n)}style(t){this.menuStyle=t,this.applyStyle()}},Jw=class extends $_{constructor(t,e,i,n){super(t,t,n),this.submenuActions=e,this.parentData=i,this.submenuOptions=n,this.mysubmenu=null,this.submenuDisposables=this._register(new ne),this.mouseOver=!1,this.expandDirection=n&&n.expandDirection!==void 0?n.expandDirection:ku.Right,this.showScheduler=new _t(()=>{this.mouseOver&&(this.cleanupExistingSubmenu(!1),this.createSubmenu(!1))},250),this.hideScheduler=new _t(()=>{this.element&&!_s(sa(),this.element)&&this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))},750)}render(t){super.render(t),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=z(this.item,Q("span.submenu-indicator"+f.menuSubmenu.cssSelector)),this.submenuIndicator.setAttribute("aria-hidden","true")),this._register(B(this.element,Z.KEY_UP,e=>{let i=new Pe(e);(i.equals(17)||i.equals(3))&&(ye.stop(e,!0),this.createSubmenu(!0))})),this._register(B(this.element,Z.KEY_DOWN,e=>{let i=new Pe(e);sa()===this.item&&(i.equals(17)||i.equals(3))&&ye.stop(e,!0)})),this._register(B(this.element,Z.MOUSE_OVER,e=>{this.mouseOver||(this.mouseOver=!0,this.showScheduler.schedule())})),this._register(B(this.element,Z.MOUSE_LEAVE,e=>{this.mouseOver=!1})),this._register(B(this.element,Z.FOCUS_OUT,e=>{this.element&&!_s(sa(),this.element)&&this.hideScheduler.schedule()})),this._register(this.parentData.parent.onScroll(()=>{this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!1)})))}updateEnabled(){}onClick(t){ye.stop(t,!0),this.cleanupExistingSubmenu(!1),this.createSubmenu(!0)}cleanupExistingSubmenu(t){if(this.parentData.submenu&&(t||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(t,e,i,n){const s={top:0,left:0};return s.left=Xo(t.width,e.width,{position:n===ku.Right?0:1,offset:i.left,size:i.width}),s.left>=i.left&&s.left<i.left+i.width&&(i.left+10+e.width<=t.width&&(s.left=i.left+10),i.top+=10,i.height=0),s.top=Xo(t.height,e.height,{position:0,offset:i.top,size:0}),s.top+e.height===i.top&&s.top+i.height+e.height<=t.height&&(s.top+=i.height),s}createSubmenu(t=!0){if(this.element)if(this.parentData.submenu)this.parentData.submenu.focus(!1);else{this.updateAriaExpanded("true"),this.submenuContainer=z(this.element,Q("div.monaco-submenu")),this.submenuContainer.classList.add("menubar-menu-items-holder","context-view");const e=getComputedStyle(this.parentData.parent.domNode),i=parseFloat(e.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 wI(this.submenuContainer,this.submenuActions.length?this.submenuActions:[new t2],this.submenuOptions),this.menuStyle&&this.parentData.submenu.style(this.menuStyle);const n=this.element.getBoundingClientRect(),s={top:n.top-i,left:n.left,height:n.height+2*i,width:n.width},r=this.submenuContainer.getBoundingClientRect(),{top:o,left:a}=this.calculateSubmenuMenuLayout(new us(window.innerWidth,window.innerHeight),us.lift(r),s,this.expandDirection);this.submenuContainer.style.left=`${a-r.left}px`,this.submenuContainer.style.top=`${o-r.top}px`,this.submenuDisposables.add(B(this.submenuContainer,Z.KEY_UP,l=>{new Pe(l).equals(15)&&(ye.stop(l,!0),this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0))})),this.submenuDisposables.add(B(this.submenuContainer,Z.KEY_DOWN,l=>{new Pe(l).equals(15)&&ye.stop(l,!0)})),this.submenuDisposables.add(this.parentData.submenu.onDidCancel(()=>{this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0)})),this.parentData.submenu.focus(t),this.mysubmenu=this.parentData.submenu}}updateAriaExpanded(t){var e;this.item&&((e=this.item)===null||e===void 0||e.setAttribute("aria-expanded",t))}applyStyle(){if(super.applyStyle(),!this.menuStyle)return;const t=this.element&&this.element.classList.contains("focused")&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor;this.submenuIndicator&&(this.submenuIndicator.style.color=t?`${t}`:""),this.parentData.submenu&&this.parentData.submenu.style(this.menuStyle)}dispose(){super.dispose(),this.hideScheduler.dispose(),this.mysubmenu&&(this.mysubmenu.dispose(),this.mysubmenu=null),this.submenuContainer&&(this.submenuContainer=void 0)}},Mg=class extends Bx{style(t){this.label&&(this.label.style.borderBottomColor=t.separatorColor?`${t.separatorColor}`:"")}};function F6(t){const e=U_,i=e.exec(t);if(!i)return t;const n=!i[1];return t.replace(e,n?"$2$3":"").trim()}function B6(t,e){let i=`
178.monaco-menu {
179	font-size: 13px;
180
181}
182
183${Zw(f.menuSelection)}
184${Zw(f.menuSubmenu)}
185
186.monaco-menu .monaco-action-bar {
187	text-align: right;
188	overflow: hidden;
189	white-space: nowrap;
190}
191
192.monaco-menu .monaco-action-bar .actions-container {
193	display: flex;
194	margin: 0 auto;
195	padding: 0;
196	width: 100%;
197	justify-content: flex-end;
198}
199
200.monaco-menu .monaco-action-bar.vertical .actions-container {
201	display: inline-block;
202}
203
204.monaco-menu .monaco-action-bar.reverse .actions-container {
205	flex-direction: row-reverse;
206}
207
208.monaco-menu .monaco-action-bar .action-item {
209	cursor: pointer;
210	display: inline-block;
211	transition: transform 50ms ease;
212	position: relative;  /* DO NOT REMOVE - this is the key to preventing the ghosting icon bug in Chrome 42 */
213}
214
215.monaco-menu .monaco-action-bar .action-item.disabled {
216	cursor: default;
217}
218
219.monaco-menu .monaco-action-bar.animated .action-item.active {
220	transform: scale(1.272019649, 1.272019649); /* 1.272019649 = √φ */
221}
222
223.monaco-menu .monaco-action-bar .action-item .icon,
224.monaco-menu .monaco-action-bar .action-item .codicon {
225	display: inline-block;
226}
227
228.monaco-menu .monaco-action-bar .action-item .codicon {
229	display: flex;
230	align-items: center;
231}
232
233.monaco-menu .monaco-action-bar .action-label {
234	font-size: 11px;
235	margin-right: 4px;
236}
237
238.monaco-menu .monaco-action-bar .action-item.disabled .action-label,
239.monaco-menu .monaco-action-bar .action-item.disabled .action-label:hover {
240	opacity: 0.4;
241}
242
243/* Vertical actions */
244
245.monaco-menu .monaco-action-bar.vertical {
246	text-align: left;
247}
248
249.monaco-menu .monaco-action-bar.vertical .action-item {
250	display: block;
251}
252
253.monaco-menu .monaco-action-bar.vertical .action-label.separator {
254	display: block;
255	border-bottom: 1px solid #bbb;
256	padding-top: 1px;
257	margin-left: .8em;
258	margin-right: .8em;
259}
260
261.monaco-menu .secondary-actions .monaco-action-bar .action-label {
262	margin-left: 6px;
263}
264
265/* Action Items */
266.monaco-menu .monaco-action-bar .action-item.select-container {
267	overflow: hidden; /* somehow the dropdown overflows its container, we prevent it here to not push */
268	flex: 1;
269	max-width: 170px;
270	min-width: 60px;
271	display: flex;
272	align-items: center;
273	justify-content: center;
274	margin-right: 10px;
275}
276
277.monaco-menu .monaco-action-bar.vertical {
278	margin-left: 0;
279	overflow: visible;
280}
281
282.monaco-menu .monaco-action-bar.vertical .actions-container {
283	display: block;
284}
285
286.monaco-menu .monaco-action-bar.vertical .action-item {
287	padding: 0;
288	transform: none;
289	display: flex;
290}
291
292.monaco-menu .monaco-action-bar.vertical .action-item.active {
293	transform: none;
294}
295
296.monaco-menu .monaco-action-bar.vertical .action-menu-item {
297	flex: 1 1 auto;
298	display: flex;
299	height: 2em;
300	align-items: center;
301	position: relative;
302}
303
304.monaco-menu .monaco-action-bar.vertical .action-label {
305	flex: 1 1 auto;
306	text-decoration: none;
307	padding: 0 1em;
308	background: none;
309	font-size: 12px;
310	line-height: 1;
311}
312
313.monaco-menu .monaco-action-bar.vertical .keybinding,
314.monaco-menu .monaco-action-bar.vertical .submenu-indicator {
315	display: inline-block;
316	flex: 2 1 auto;
317	padding: 0 1em;
318	text-align: right;
319	font-size: 12px;
320	line-height: 1;
321}
322
323.monaco-menu .monaco-action-bar.vertical .submenu-indicator {
324	height: 100%;
325}
326
327.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon {
328	font-size: 16px !important;
329	display: flex;
330	align-items: center;
331}
332
333.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon::before {
334	margin-left: auto;
335	margin-right: -20px;
336}
337
338.monaco-menu .monaco-action-bar.vertical .action-item.disabled .keybinding,
339.monaco-menu .monaco-action-bar.vertical .action-item.disabled .submenu-indicator {
340	opacity: 0.4;
341}
342
343.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator) {
344	display: inline-block;
345	box-sizing: border-box;
346	margin: 0;
347}
348
349.monaco-menu .monaco-action-bar.vertical .action-item {
350	position: static;
351	overflow: visible;
352}
353
354.monaco-menu .monaco-action-bar.vertical .action-item .monaco-submenu {
355	position: absolute;
356}
357
358.monaco-menu .monaco-action-bar.vertical .action-label.separator {
359	padding: 0.5em 0 0 0;
360	margin-bottom: 0.5em;
361	width: 100%;
362	height: 0px !important;
363	margin-left: .8em !important;
364	margin-right: .8em !important;
365}
366
367.monaco-menu .monaco-action-bar.vertical .action-label.separator.text {
368	padding: 0.7em 1em 0.1em 1em;
369	font-weight: bold;
370	opacity: 1;
371}
372
373.monaco-menu .monaco-action-bar.vertical .action-label:hover {
374	color: inherit;
375}
376
377.monaco-menu .monaco-action-bar.vertical .menu-item-check {
378	position: absolute;
379	visibility: hidden;
380	width: 1em;
381	height: 100%;
382}
383
384.monaco-menu .monaco-action-bar.vertical .action-menu-item.checked .menu-item-check {
385	visibility: visible;
386	display: flex;
387	align-items: center;
388	justify-content: center;
389}
390
391/* Context Menu */
392
393.context-view.monaco-menu-container {
394	outline: 0;
395	border: none;
396	animation: fadeIn 0.083s linear;
397	-webkit-app-region: no-drag;
398}
399
400.context-view.monaco-menu-container :focus,
401.context-view.monaco-menu-container .monaco-action-bar.vertical:focus,
402.context-view.monaco-menu-container .monaco-action-bar.vertical :focus {
403	outline: 0;
404}
405
406.monaco-menu .monaco-action-bar.vertical .action-item {
407	border: thin solid transparent; /* prevents jumping behaviour on hover or focus */
408}
409
410
411/* High Contrast Theming */
412:host-context(.hc-black) .context-view.monaco-menu-container {
413	box-shadow: none;
414}
415
416:host-context(.hc-black) .monaco-menu .monaco-action-bar.vertical .action-item.focused {
417	background: none;
418}
419
420/* Vertical Action Bar Styles */
421
422.monaco-menu .monaco-action-bar.vertical {
423	padding: .5em 0;
424}
425
426.monaco-menu .monaco-action-bar.vertical .action-menu-item {
427	height: 1.8em;
428}
429
430.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator),
431.monaco-menu .monaco-action-bar.vertical .keybinding {
432	font-size: inherit;
433	padding: 0 2em;
434}
435
436.monaco-menu .monaco-action-bar.vertical .menu-item-check {
437	font-size: inherit;
438	width: 2em;
439}
440
441.monaco-menu .monaco-action-bar.vertical .action-label.separator {
442	font-size: inherit;
443	padding: 0.2em 0 0 0;
444	margin-bottom: 0.2em;
445}
446
447:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .action-label.separator {
448	margin-left: 0;
449	margin-right: 0;
450}
451
452.monaco-menu .monaco-action-bar.vertical .submenu-indicator {
453	font-size: 60%;
454	padding: 0 1.8em;
455}
456
457:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .submenu-indicator {
458	height: 100%;
459	mask-size: 10px 10px;
460	-webkit-mask-size: 10px 10px;
461}
462
463.monaco-menu .action-item {
464	cursor: default;
465}`;if(e){i+=`
466			/* Arrows */
467			.monaco-scrollable-element > .scrollbar > .scra {
468				cursor: pointer;
469				font-size: 11px !important;
470			}
471
472			.monaco-scrollable-element > .visible {
473				opacity: 1;
474
475				/* Background rule added for IE9 - to allow clicks on dom node */
476				background:rgba(0,0,0,0);
477
478				transition: opacity 100ms linear;
479			}
480			.monaco-scrollable-element > .invisible {
481				opacity: 0;
482				pointer-events: none;
483			}
484			.monaco-scrollable-element > .invisible.fade {
485				transition: opacity 800ms linear;
486			}
487
488			/* Scrollable Content Inset Shadow */
489			.monaco-scrollable-element > .shadow {
490				position: absolute;
491				display: none;
492			}
493			.monaco-scrollable-element > .shadow.top {
494				display: block;
495				top: 0;
496				left: 3px;
497				height: 3px;
498				width: 100%;
499			}
500			.monaco-scrollable-element > .shadow.left {
501				display: block;
502				top: 3px;
503				left: 0;
504				height: 100%;
505				width: 3px;
506			}
507			.monaco-scrollable-element > .shadow.top-left-corner {
508				display: block;
509				top: 0;
510				left: 0;
511				height: 3px;
512				width: 3px;
513			}
514		`;const n=t.scrollbarShadow;n&&(i+=`
515				.monaco-scrollable-element > .shadow.top {
516					box-shadow: ${n} 0 6px 6px -6px inset;
517				}
518
519				.monaco-scrollable-element > .shadow.left {
520					box-shadow: ${n} 6px 0 6px -6px inset;
521				}
522
523				.monaco-scrollable-element > .shadow.top.left {
524					box-shadow: ${n} 6px 6px 6px -6px inset;
525				}
526			`);
526const s=t.scrollbarSliderBackground;s&&(i+=`
527				.monaco-scrollable-element > .scrollbar > .slider {
528					background: ${s};
529				}
530			`);const r=t.scrollbarSliderHoverBackground;r&&(i+=`
531				.monaco-scrollable-element > .scrollbar > .slider:hover {
532					background: ${r};
533				}
534			`);const o=t.scrollbarSliderActiveBackground;o&&(i+=`
535				.monaco-scrollable-element > .scrollbar > .slider.active {
536					background: ${o};
537				}
538			`)}return i}function ln(t,e){const i=Object.create(null);for(let n in e){const s=e[n];s&&(i[n]=ss(s,t))}return i}function SI(t,e,i){function n(){const s=ln(t.getColorTheme(),e);typeof i=="function"?i(s):i.style(s)}return n(),t.onDidColorThemeChange(n)}function Aa(t,e,i){return SI(e,Object.assign(Object.assign({},df),i||{}),t)}var df={listFocusBackground:GR,listFocusForeground:ZR,listFocusOutline:YR,listActiveSelectionBackground:Xs,listActiveSelectionForeground:Qs,listActiveSelectionIconForeground:ad,listFocusAndSelectionBackground:Xs,listFocusAndSelectionForeground:Qs,listInactiveSelectionBackground:XR,listInactiveSelectionIconForeground:JR,listInactiveSelectionForeground:QR,listInactiveFocusBackground:eA,listInactiveFocusOutline:tA,listHoverBackground:iA,listHoverForeground:nA,listDropBackground:sA,listSelectionOutline:_i,listHoverOutline:_i,listFilterWidgetBackground:rA,listFilterWidgetOutline:oA,listFilterWidgetNoMatchesOutline:aA,listMatchesShadow:Ea,treeIndentGuidesStroke:lA,tableColumnsBorder:hA,tableOddRowsBackgroundColor:cA},V6={shadowColor:Ea,borderColor:gA,foregroundColor:mA,backgroundColor:pA,selectionForegroundColor:_A,selectionBackgroundColor:vA,selectionBorderColor:CA,separatorColor:bA,scrollbarShadow:$a,scrollbarSliderBackground:aa,scrollbarSliderHoverBackground:la,scrollbarSliderActiveBackground:ha};function W6(t,e,i){return SI(e,Object.assign(Object.assign({},V6),i),t)}var H6=class{constructor(t,e,i,n,s){this.contextViewService=t,this.telemetryService=e,this.notificationService=i,this.keybindingService=n,this.themeService=s,this.focusToReturn=null,this.block=null,this.options={blockMouse:!0}}configure(t){this.options=t}showContextMenu(t){const e=t.getActions();if(!e.length)return;this.focusToReturn=document.activeElement;let i,n=GL(t.domForShadowRoot)?t.domForShadowRoot:void 0;this.contextViewService.showContextView({getAnchor:()=>t.getAnchor(),canRelayout:!1,anchorAlignment:t.anchorAlignment,anchorAxisAlignment:t.anchorAxisAlignment,render:s=>{let r=t.getMenuClassName?t.getMenuClassName():"";r&&(s.className+=" "+r),this.options.blockMouse&&(this.block=s.appendChild(Q(".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",B(this.block,Z.MOUSE_DOWN,l=>l.stopPropagation()));const o=new ne,a=t.actionRunner||new Mv;return a.onBeforeRun(this.onActionRun,this,o),a.onDidRun(this.onDidActionRun,this,o),i=new wI(s,e,{actionViewItemProvider:t.getActionViewItem,context:t.getActionsContext?t.getActionsContext():null,actionRunner:a,getKeyBinding:t.getKeyBinding?t.getKeyBinding:l=>this.keybindingService.lookupKeybinding(l.id)}),o.add(W6(i,this.themeService)),i.onDidCancel(()=>this.contextViewService.hideContextView(!0),null,o),i.onDidBlur(()=>this.contextViewService.hideContextView(!0),null,o),o.add(B(window,Z.BLUR,()=>this.contextViewService.hideContextView(!0))),o.add(B(window,Z.MOUSE_DOWN,l=>{if(l.defaultPrevented)return;let h=new ji(l),c=h.target;if(!h.rightButton){for(;c;){if(c===s)return;c=c.parentElement}this.contextViewService.hideContextView(!0)}})),Ur(o,i)},focus:()=>{i&&i.focus(!!t.autoSelectFirstItem)},onHide:s=>{t.onHide&&t.onHide(!!s),this.block&&(this.block.remove(),this.block=null),this.focusToReturn&&this.focusToReturn.focus()}},n,!!n)}onActionRun(t){this.telemetryService.publicLog2("workbenchActionExecuted",{id:t.action.id,from:"contextMenu"}),this.contextViewService.hideContextView(!1),this.focusToReturn&&this.focusToReturn.focus()}onDidActionRun(t){t.error&&!kh(t.error)&&this.notificationService.error(t.error)}}
538,z6=function(t,e,i,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r},ml=function(t,e){return function(i,n){e(i,n,t)}},K_=class extends V{constructor(e,i,n,s,r){super(),this._onDidShowContextMenu=new M,this._onDidHideContextMenu=new M,this.contextMenuHandler=new H6(n,e,i,s,r)}configure(e){this.contextMenuHandler.configure(e)}showContextMenu(e){this.contextMenuHandler.showContextMenu(Object.assign(Object.assign({},e),{onHide:i=>{e.onHide&&e.onHide(i),this._onDidHideContextMenu.fire()}})),NM.getInstance().resetKeyStatus(),this._onDidShowContextMenu.fire()}};K_=z6([ml(0,Oh),ml(1,wn),ml(2,af),ml(3,vi),ml(4,et)],K_);function eS(t){let e=JSON.parse(t);return e=j_(e),e}function j_(t,e=0){if(!t||e>200)return t;if(typeof t=="object"){switch(t.$mid){case 1:return Le.revive(t);case 2:return new RegExp(t.source,t.flags);case 14:return new Date(t.source)}if(t instanceof Qy||t instanceof Uint8Array)return t;if(Array.isArray(t))for(let i=0;i<t.length;++i)t[i]=j_(t[i],e+1);else for(const i in t)Object.hasOwnProperty.call(t,i)&&(t[i]=j_(t[i],e+1))}return t}var xu;(function(t){t[t.API=0]="API",t[t.USER=1]="USER"})(xu||(xu={}));var tS=function(t,e,i,n){function s(r){return r instanceof i?r:new i(function(o){o(r)})}return new(i||(i=Promise))(function(r,o){function a(c){try{h(n.next(c))}catch(d){o(d)}}function l(c){try{h(n.throw(c))}catch(d){o(d)}}function h(c){c.done?r(c.value):s(c.value).then(a,l)}h((n=n.apply(t,e||[])).next())})},U6=ge("openerService"),K$=Object.freeze({_serviceBrand:void 0,registerOpener(){return V.None},registerValidator(){return V.None},registerExternalUriResolver(){return V.None},setDefaultExternalOpener(){},registerExternalOpener(){return V.None},open(){return tS(this,void 0,void 0,function*(){return!1})},resolveExternalUri(t){return tS(this,void 0,void 0,function*(){return{resolved:t,dispose(){}}})}});function yI(t,e){return Le.isUri(t)?jo(t.scheme,e):sv(t,e+":")}function iS(t,...e){return e.some(i=>yI(t,i))}function $6(t){let e;const i=/^L?(\d+)(?:,(\d+))?(-L?(\d+)(?:,(\d+))?)?/.exec(t.fragment);return i&&(e={startLineNumber:parseInt(i[1]),startColumn:i[2]?parseInt(i[2]):1,endLineNumber:i[4]?parseInt(i[4]):void 0,endColumn:i[4]?i[5]?parseInt(i[5]):1:void 0},t=t.with({fragment:""})),{selection:e,uri:t}}var g0=function(t,e,i,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r},Iu=function(t,e){return function(i,n){e(i,n,t)}},Pr=function(t,e,i,n){function s(r){return r instanceof i?r:new i(function(o){o(r)})}return new(i||(i=Promise))(function(r,o){function a(c){try{h(n.next(c))}catch(d){o(d)}}function l(c){try{h(n.throw(c))}catch(d){o(d)}}function h(c){c.done?r(c.value):s(c.value).then(a,l)}h((n=n.apply(t,e||[])).next())})},q_=class{constructor(e){this._commandService=e}open(e,i){return Pr(this,void 0,void 0,function*(){if(!yI(e,_e.command))return!1;if(!i?.allowCommands)return!0;typeof e=="string"&&(e=Le.parse(e));let n=[];try{n=eS(decodeURIComponent(e.query))}catch{try{n=eS(e.query)}catch{}}return Array.isArray(n)||(n=[n]),yield this._commandService.executeCommand(e.path,...n),!0})}};q_=g0([Iu(0,Ni)],q_);var G_=class{constructor(e){this._editorService=e}open(e,i){return Pr(this,void 0,void 0,function*(){typeof e=="string"&&(e=Le.parse(e));const{selection:n,uri:s}=$6(e);return e=s,e.scheme===_e.file&&(e=vP(e)),yield this._editorService.openCodeEditor({resource:e,options:Object.assign({selection:n,source:i?.fromUserGesture?xu.USER:xu.API},i?.editorOptions)},this._editorService.getFocusedCodeEditor(),i?.openToSide),!0})}};G_=g0([Iu(0,pt)],G_);var Z_=class{constructor(e,i){this._openers=new Ki,this._validators=new Ki,this._resolvers=new Ki,this._resolvedUriTargets=new $i(n=>n.with({path:null,fragment:null,query:null}).toString()),this._externalOpeners=new Ki,this._defaultExternalOpener={openExternal:n=>Pr(this,void 0,void 0,function*(){return iS(n,_e.http,_e.https)?XL(n):window.location.href=n,!0})},this._openers.push({open:(n,s)=>Pr(this,void 0,void 0,function*(){return s?.openExternal||iS(n,_e.mailto,_e.http,_e.https,_e.vsls)?(yield this._doOpenExternal(n,s),!0):!1})}),this._openers.push(new q_(i)),this._openers.push(new G_(e))}registerOpener(e){return{dispose:this._openers.unshift(e)}}
538registerValidator(e){return{dispose:this._validators.push(e)}}registerExternalUriResolver(e){return{dispose:this._resolvers.push(e)}}setDefaultExternalOpener(e){this._defaultExternalOpener=e}registerExternalOpener(e){return{dispose:this._externalOpeners.push(e)}}open(e,i){var n;return Pr(this,void 0,void 0,function*(){const s=typeof e=="string"?Le.parse(e):e,r=(n=this._resolvedUriTargets.get(s))!==null&&n!==void 0?n:e;for(const o of this._validators)if(!(yield o.shouldOpen(r)))return!1;for(const o of this._openers)if(yield o.open(e,i))return!0;return!1})}resolveExternalUri(e,i){return Pr(this,void 0,void 0,function*(){for(const n of this._resolvers)try{const s=yield n.resolveExternalUri(e,i);if(s)return this._resolvedUriTargets.has(s.resolved)||this._resolvedUriTargets.set(s.resolved,e),s}catch{}throw new Error("Could not resolve external URI: "+e.toString())})}_doOpenExternal(e,i){return Pr(this,void 0,void 0,function*(){const n=typeof e=="string"?Le.parse(e):e;let s;try{s=(yield this.resolveExternalUri(n,i)).resolved}catch{s=n}let r;if(typeof e=="string"&&n.toString()===s.toString()?r=e:r=encodeURI(s.toString(!0)),i?.allowContributedOpeners){const o=typeof i?.allowContributedOpeners=="string"?i?.allowContributedOpeners:void 0;for(const a of this._externalOpeners)if(yield a.openExternal(r,{sourceUri:n,preferredOpenerId:o},ti.None))return!0}return this._defaultExternalOpener.openExternal(r,{sourceUri:n},ti.None)})}dispose(){this._validators.clear()}};Z_=g0([Iu(0,pt),Iu(1,Ni)],Z_);var Si;(function(t){t[t.Hint=1]="Hint",t[t.Info=2]="Info",t[t.Warning=4]="Warning",t[t.Error=8]="Error"})(Si||(Si={}));(function(t){function e(o,a){return a-o}t.compare=e;const i=Object.create(null);i[t.Error]=p("sev.error","Error"),i[t.Warning]=p("sev.warning","Warning"),i[t.Info]=p("sev.info","Info");function n(o){return i[o]||""}t.toString=n;function s(o){switch(o){case it.Error:return t.Error;case it.Warning:return t.Warning;case it.Info:return t.Info;case it.Ignore:return t.Hint}}t.fromSeverity=s;function r(o){switch(o){case t.Error:return it.Error;case t.Warning:return it.Warning;case t.Info:return it.Info;case t.Hint:return it.Ignore}}t.toSeverity=r})(Si||(Si={}));var nS;(function(t){function i(s){return n(s,!0)}t.makeKey=i;function n(s,r){let o=[""];return s.source?o.push(s.source.replace("¦","\\¦")):o.push(""),s.code?typeof s.code=="string"?o.push(s.code.replace("¦","\\¦")):o.push(s.code.value.replace("¦","\\¦")):o.push(""),s.severity!==void 0&&s.severity!==null?o.push(Si.toString(s.severity)):o.push(""),s.message&&r?o.push(s.message.replace("¦","\\¦")):o.push(""),s.startLineNumber!==void 0&&s.startLineNumber!==null?o.push(s.startLineNumber.toString()):o.push(""),s.startColumn!==void 0&&s.startColumn!==null?o.push(s.startColumn.toString()):o.push(""),s.endLineNumber!==void 0&&s.endLineNumber!==null?o.push(s.endLineNumber.toString()):o.push(""),s.endColumn!==void 0&&s.endColumn!==null?o.push(s.endColumn.toString()):o.push(""),o.push(""),o.join("¦")}t.makeKeyOptionalMessage=n})(nS||(nS={}));var Xa=ge("markerService"),K6=function(t,e,i,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r},sS=function(t,e){return function(i,n){e(i,n,t)}},j6=class extends V{constructor(t){super(),this.model=t,this._markersData=new Map,this._register(Ae(()=>{this.model.deltaDecorations([...this._markersData.keys()],[]),this._markersData.clear()}))}update(t,e){const i=[...this._markersData.keys()];this._markersData.clear();const n=this.model.deltaDecorations(i,e);for(let s=0;s<n.length;s++)this._markersData.set(n[s],t[s]);return i.length!==0||n.length!==0}getMarker(t){return this._markersData.get(t.id)}},Y_=class extends V{constructor(e,i){super(),this._markerService=i,this._onDidChangeMarker=this._register(new M),this._markerDecorations=new $i,e.getModels().forEach(n=>this._onModelAdded(n)),this._register(e.onModelAdded(this._onModelAdded,this)),this._register(e.onModelRemoved(this._onModelRemoved,this)),this._register(this._markerService.onMarkerChanged(this._handleMarkerChange,this))}
538dispose(){super.dispose(),this._markerDecorations.forEach(e=>e.dispose()),this._markerDecorations.clear()}getMarker(e,i){const n=this._markerDecorations.get(e);return n&&n.getMarker(i)||null}_handleMarkerChange(e){e.forEach(i=>{const n=this._markerDecorations.get(i);n&&this._updateDecorations(n)})}_onModelAdded(e){const i=new j6(e);this._markerDecorations.set(e.uri,i),this._updateDecorations(i)}_onModelRemoved(e){const i=this._markerDecorations.get(e.uri);i&&(i.dispose(),this._markerDecorations.delete(e.uri)),(e.uri.scheme===_e.inMemory||e.uri.scheme===_e.internal||e.uri.scheme===_e.vscode)&&this._markerService&&this._markerService.read({resource:e.uri}).map(n=>n.owner).forEach(n=>this._markerService.remove(n,[e.uri]))}_updateDecorations(e){const i=this._markerService.read({resource:e.model.uri,take:500}),n=i.map(s=>({range:this._createDecorationRange(e.model,s),options:this._createDecorationOption(s)}));e.update(i,n)&&this._onDidChangeMarker.fire(e.model)}_createDecorationRange(e,i){let n=T.lift(i);if(i.severity===Si.Hint&&!this._hasMarkerTag(i,1)&&!this._hasMarkerTag(i,2)&&(n=n.setEndPosition(n.startLineNumber,n.startColumn+2)),n=e.validateRange(n),n.isEmpty()){const s=e.getLineLastNonWhitespaceColumn(n.startLineNumber)||e.getLineMaxColumn(n.startLineNumber);if(s===1||n.endColumn>=s)return n;const r=e.getWordAtPosition(n.getStartPosition());r&&(n=new T(n.startLineNumber,r.startColumn,n.endLineNumber,r.endColumn))}else if(i.endColumn===Number.MAX_VALUE&&i.startColumn===1&&n.startLineNumber===n.endLineNumber){let s=e.getLineFirstNonWhitespaceColumn(i.startLineNumber);s<n.endColumn&&(n=new T(n.startLineNumber,s,n.endLineNumber,n.endColumn),i.startColumn=s)}return n}_createDecorationOption(e){let i,n,s,r,o;switch(e.severity){case Si.Hint:this._hasMarkerTag(e,2)?i=void 0:this._hasMarkerTag(e,1)?i="squiggly-unnecessary":i="squiggly-hint",s=0;break;case Si.Warning:i="squiggly-warning",n=cn(b7),s=20,o={color:cn(SA),position:ms.Inline};break;case Si.Info:i="squiggly-info",n=cn(w7),s=10;break;case Si.Error:default:i="squiggly-error",n=cn(C7),s=30,o={color:cn(wA),position:ms.Inline}}return e.tags&&(e.tags.indexOf(1)!==-1&&(r="squiggly-inline-unnecessary"),e.tags.indexOf(2)!==-1&&(r="squiggly-inline-deprecated")),{description:"marker-decoration",stickiness:1,className:i,showIfCollapsed:!0,overviewRuler:{color:n,position:eo.Right},minimap:o,zIndex:s,inlineClassName:r}}_hasMarkerTag(e,i){return e.tags?e.tags.indexOf(i)>=0:!1}};Y_=K6([sS(0,Lt),sS(1,Xa)],Y_);var q6=class Ld{constructor(e,i){this._startLineNumber=e,this._tokens=i,this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}static create(e,i){return new Ld(e,new G6(i))}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(e){return this._startLineNumber<=e&&e<=this._endLineNumber?this._tokens.getLineTokens(e-this._startLineNumber):null}getRange(){const e=this._tokens.getRange();return e&&new T(this._startLineNumber+e.startLineNumber,e.startColumn,this._startLineNumber+e.endLineNumber,e.endColumn)}removeTokens(e){const i=e.startLineNumber-this._startLineNumber,n=e.endLineNumber-this._startLineNumber;this._startLineNumber+=this._tokens.removeTokens(i,e.startColumn-1,n,e.endColumn-1),this._updateEndLineNumber()}split(e){const i=e.startLineNumber-this._startLineNumber,n=e.endLineNumber-this._startLineNumber,[s,r,o]=this._tokens.split(i,e.startColumn-1,n,e.endColumn-1);return[new Ld(this._startLineNumber,s),new Ld(this._startLineNumber+o,r)]}applyEdit(e,i){const[n,s,r]=Ta(i);this.acceptEdit(e,n,s,r,i.length>
vendor: 4,188 bytes, line 538
5380?i.charCodeAt(0):0)}acceptEdit(e,i,n,s,r){this._acceptDeleteRange(e),this._acceptInsertText(new A(e.startLineNumber,e.startColumn),i,n,s,r),this._updateEndLineNumber()}_acceptDeleteRange(e){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return;const i=e.startLineNumber-this._startLineNumber,n=e.endLineNumber-this._startLineNumber;if(n<0){const r=n-i;this._startLineNumber-=r;return}const s=this._tokens.getMaxDeltaLine();if(!(i>=s+1)){if(i<0&&n>=s+1){this._startLineNumber=0,this._tokens.clear();return}if(i<0){const r=-i;this._startLineNumber-=r,this._tokens.acceptDeleteRange(e.startColumn-1,0,0,n,e.endColumn-1)}else this._tokens.acceptDeleteRange(0,i,e.startColumn-1,n,e.endColumn-1)}}_acceptInsertText(e,i,n,s,r){if(i===0&&n===0)return;const o=e.lineNumber-this._startLineNumber;if(o<0){this._startLineNumber+=i;return}o>=this._tokens.getMaxDeltaLine()+1||this._tokens.acceptInsertText(o,e.column-1,i,n,s,r)}},G6=class X_{constructor(e){this._tokens=e,this._tokenCount=e.length/4}toString(e){const i=[];for(let n=0;n<this._tokenCount;n++)i.push(`(${this._getDeltaLine(n)+e},${this._getStartCharacter(n)}-${this._getEndCharacter(n)})`);return`[${i.join(",")}]`}getMaxDeltaLine(){const e=this._getTokenCount();return e===0?-1:this._getDeltaLine(e-1)}getRange(){const e=this._getTokenCount();if(e===0)return null;const i=this._getStartCharacter(0),n=this._getDeltaLine(e-1),s=this._getEndCharacter(e-1);return new T(0,i+1,n,s+1)}_getTokenCount(){return this._tokenCount}_getDeltaLine(e){return this._tokens[4*e]}_getStartCharacter(e){return this._tokens[4*e+1]}_getEndCharacter(e){return this._tokens[4*e+2]}isEmpty(){return this._getTokenCount()===0}getLineTokens(e){let i=0,n=this._getTokenCount()-1;for(;i<n;){const s=i+Math.floor((n-i)/2),r=this._getDeltaLine(s);if(r<e)i=s+1;else if(r>e)n=s-1;else{let o=s;for(;o>i&&this._getDeltaLine(o-1)===e;)o--;let a=s;for(;a<n&&this._getDeltaLine(a+1)===e;)a++;return new rS(this._tokens.subarray(4*o,4*a+4))}}return this._getDeltaLine(i)===e?new rS(this._tokens.subarray(4*i,4*i+4)):null}clear(){this._tokenCount=0}removeTokens(e,i,n,s){const r=this._tokens,o=this._tokenCount;let a=0,l=!1,h=0;for(let c=0;c<o;c++){const d=4*c,u=r[d],g=r[d+1],m=r[d+2],_=r[d+3];if((u>e||u===e&&m>=i)&&(u<n||u===n&&g<=s))l=!0;else{if(a===0&&(h=u),l){const C=4*a;r[C]=u-h,r[C+1]=g,r[C+2]=m,r[C+3]=_}a++}}return this._tokenCount=a,h}split(e,i,n,s){const r=this._tokens,o=this._tokenCount,a=[],l=[];let h=a,c=0,d=0;for(let u=0;u<o;u++){const g=4*u,m=r[g],_=r[g+1],C=r[g+2],w=r[g+3];if(m>e||m===e&&C>=i){if(m<n||m===n&&_<=s)continue;h!==l&&(h=l,c=0,d=m)}h[c++]=m-d,h[c++]=_,h[c++]=C,h[c++]=w}return[new X_(new Uint32Array(a)),new X_(new Uint32Array(l)),d]}acceptDeleteRange(e,i,n,s,r){const o=this._tokens,a=this._tokenCount,l=s-i;let h=0,c=!1;for(let d=0;d<a;d++){const u=4*d;let g=o[u],m=o[u+1],_=o[u+2];const C=o[u+3];if(g<i||g===i&&_<=n){h++;continue}else if(g===i&&m<n)g===s&&_>r?_-=r-n:_=n;else if(g===i&&m===n)if(g===s&&_>r)_-=r-n;else{c=!0;continue}else if(g<s||g===s&&m<r)if(g===s&&_>r)g===i?(m=n,_=m+(_-r)):(m=0,_=m+(_-r));else{c=!0;continue}else if(g>s){if(l===0&&!c){h=a;break}g-=l}else if(g===s&&m>=r)e&&g===0&&(m+=e,_+=e),g-=l,m-=r-n,_-=r-n;else throw new Error("Not possible!");const w=4*h;o[w]=g,o[w+1]=m,o[w+2]=_,o[w+3]=C,h++}this._tokenCount=h}acceptInsertText(e,i,n,s,r,o){const a=n===0&&s===1&&(o>=48&&o<=57||o>=65&&o<=90||o>=97&&o<=122),l=this._tokens,h=this._tokenCount;for(let c=0;c<h;c++){const d=4*c;let u=l[d],g=l[d+1],m=l[d+2];if(!(u<e||u===e&&m<i)){if(u===e&&m===i)if(a)m+=1;else continue;else if(u===e&&g<i&&i<m)n===0?m+=s:m=i;else{if(u===e&&g===i&&a)continue;if(u===e)if(u+=n,n===0)g+=s,m+=s;else{const _=m-g;g=r+(g-i),m=g+_}else u+=n}l[d]=u,l[d+1]=g,l[d+2]=m}}}},rS=class{constructor(t){this._tokens=t}getCount(){return this._tokens.length/4}getStartCharacter(t){return this._tokens[4*t+1]}getEndCharacter(t){return this._tokens[4*t+2]}getMetadata(t){return this._tokens[4*t+3]}},Z6=function(t,e,i,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;
538a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r},Rg=function(t,e){return function(i,n){e(i,n,t)}},Q_=class{constructor(e,i,n,s){this._legend=e,this._themeService=i,this._languageService=n,this._logService=s,this._hashTable=new LI,this._hasWarnedOverlappingTokens=!1}getMetadata(e,i,n){const s=this._languageService.languageIdCodec.encodeLanguageId(n),r=this._hashTable.get(e,i,s);let o;if(r)o=r.metadata,this._logService.getLevel()===fn.Trace&&this._logService.trace(`SemanticTokensProviderStyling [CACHED] ${e} / ${i}: foreground ${li.getForeground(o)}, fontStyle ${li.getFontStyle(o).toString(2)}`);else{let a=this._legend.tokenTypes[e];const l=[];if(a){let h=i;for(let d=0;h>0&&d<this._legend.tokenModifiers.length;d++)h&1&&l.push(this._legend.tokenModifiers[d]),h=h>>1;h>0&&this._logService.getLevel()===fn.Trace&&(this._logService.trace(`SemanticTokensProviderStyling: unknown token modifier index: ${i.toString(2)} for legend: ${JSON.stringify(this._legend.tokenModifiers)}`),l.push("not-in-legend"));const c=this._themeService.getColorTheme().getTokenStyleMetadata(a,l,n);if(typeof c>"u")o=2147483647;else{if(o=0,typeof c.italic<"u"){const d=(c.italic?1:0)<<10;o|=d|1}if(typeof c.bold<"u"){const d=(c.bold?2:0)<<10;o|=d|2}if(typeof c.underline<"u"){const d=(c.underline?4:0)<<10;o|=d|4}if(typeof c.strikethrough<"u"){const d=(c.strikethrough?8:0)<<10;o|=d|8}if(c.foreground){const d=c.foreground<<14;o|=d|16}o===0&&(o=2147483647)}}else this._logService.getLevel()===fn.Trace&&this._logService.trace(`SemanticTokensProviderStyling: unknown token type index: ${e} for legend: ${JSON.stringify(this._legend.tokenTypes)}`),o=2147483647,a="not-in-legend";this._hashTable.add(e,i,s,o),this._logService.getLevel()===fn.Trace&&this._logService.trace(`SemanticTokensProviderStyling ${e} (${a}) / ${i} (${l.join(" ")}): foreground ${li.getForeground(o)}, fontStyle ${li.getFontStyle(o).toString(2)}`)}return o}warnOverlappingSemanticTokens(e,i){this._hasWarnedOverlappingTokens||(this._hasWarnedOverlappingTokens=!0)}};Q_=Z6([Rg(1,et),Rg(2,Nt),Rg(3,cr)],Q_);function Y6(t,e,i){const n=t.data,s=t.data.length/5|0,r=Math.max(Math.ceil(s/1024),400),o=[];let a=0,l=1,h=0;for(;a<s;){const c=a;let d=Math.min(c+r,s);if(d<s){let b=d;for(;b-1>c&&n[5*b]===0;)b--;if(b-1===c){let y=d;for(;y+1<s&&n[5*y]===0;)y++;d=y}else d=b}let u=new Uint32Array((d-c)*4),g=0,m=0,_=0,C=0,w=0;for(;a<d;){const b=5*a,y=n[b],k=n[b+1],S=l+y|0,L=y===0?h+k|0:k,x=n[b+2],E=n[b+3],R=n[b+4],D=e.getMetadata(E,R,i);D!==2147483647&&(m===0&&(m=S),_===S&&w>L&&(e.warnOverlappingSemanticTokens(S,L+1),C<L?u[g-4+2]=L:g-=4),u[g]=S-m,u[g+1]=L,u[g+2]=L+x,u[g+3]=D,g+=4,_=S,C=L,w=L+x),l=S,h=L,a++}g!==u.length&&(u=u.subarray(0,g));const v=q6.create(m,u);o.push(v)}return o}var X6=class{constructor(t,e,i,n){this.tokenTypeIndex=t,this.tokenModifierSet=e,this.languageId=i,this.metadata=n,this.next=null}},LI=class Dr{constructor(){this._elementsCount=0,this._currentLengthIndex=0,this._currentLength=Dr._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1<Dr._SIZES.length?2/3*this._currentLength:0),this._elements=[],Dr._nullOutEntries(this._elements,this._currentLength)}static _nullOutEntries(e,i){for(let n=0;n<i;n++)e[n]=null}_hash2(e,i){return(e<<5)-e+i|0}_hashFunc(e,i,n){return this._hash2(this._hash2(e,i),n)%this._currentLength}get(e,i,n){const s=this._hashFunc(e,i,n);let r=this._elements[s];for(;r;){if(r.tokenTypeIndex===e&&r.tokenModifierSet===i&&r.languageId===n)return r;r=r.next}return null}add(e,i,n,s){if(this._elementsCount++,this._growCount!==0&&this._elementsCount>=this._growCount){const r=this._elements;this._currentLengthIndex++,this._currentLength=Dr._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1<Dr._SIZES.length?2/3*this._currentLength:0),this._elements=[],Dr._nullOutEntries(this._elements,this._currentLength);for(const o of r){let a=o;for(;a;){const l=a.next;a.next=null,this._add(a),a=l}}}this._add(new X6(e,i,n,s))}_add(e){const i=this._hashFunc(e.tokenTypeIndex,e.tokenModifierSet,e.languageId);e.next=this._elements[i],this._elements[i]=e}};LI._SIZES=[3,7,13,31,61,127,251,509,1021,2039,4093,8191,16381,32749,65521,131071,262139,524287,1048573,2097143];function Q6(t){for(let e=0,i=t.length;e<i;e+=4){const n=t[e+0],s=t[e+1],r=t[e+2],o=t[e+3];t[e+0]=o,t[e+1]=r,t[e+2]=s,t[e+3]=n}}function J6(t){const e=new Uint8Array(t.buffer,t.byteOffset,t.length*4);return oy()||Q6(e),Qy.wrap(e)}function kI(t){const e=new Uint32Array(eF(t));let i=0;if(e[i++]=t.id,t.type==="full")e[i++]=1,e[i++]=t.data.length,e.set(t.data,i),i+=t.data.length;else{e[i++]=2,e[i++]=t.deltas.length;for(const n of t.deltas)e[i++]=n.start,e[i++]=n.deleteCount,n.data?(e[i++]=n.data.length,e.set(n.data,i),i+=n.data.length):e[i++]=0}return J6(e)}function eF(t){let e=0;if(e+=2,t.type==="full")e+=1+t.data.length;else{e+=1,e+=3*t.deltas.length;for(const i of t.deltas)i.data&&(e+=i.data.length)}return e}
538var ar=function(t,e,i,n){function s(r){return r instanceof i?r:new i(function(o){o(r)})}return new(i||(i=Promise))(function(r,o){function a(c){try{h(n.next(c))}catch(d){o(d)}}function l(c){try{h(n.throw(c))}catch(d){o(d)}}function h(c){c.done?r(c.value):s(c.value).then(a,l)}h((n=n.apply(t,e||[])).next())})};function uf(t){return t&&!!t.data}function xI(t){return t&&Array.isArray(t.edits)}var tF=class{constructor(t,e,i){this.provider=t,this.tokens=e,this.error=i}};function II(t,e){return t.has(e)}function iF(t,e){const i=t.orderedGroups(e);return i.length>0?i[0]:[]}function EI(t,e,i,n,s){return ar(this,void 0,void 0,function*(){const r=iF(t,e),o=yield Promise.all(r.map(a=>ar(this,void 0,void 0,function*(){let l,h=null;try{l=yield a.provideDocumentSemanticTokens(e,a===i?n:null,s)}catch(c){h=c,l=null}return(!l||!uf(l)&&!xI(l))&&(l=null),new tF(a,l,h)})));for(const a of o){if(a.error)throw a.error;if(a.tokens)return a}return o.length>0?o[0]:null})}function nF(t,e){const i=t.orderedGroups(e);return i.length>0?i[0]:null}var sF=class{constructor(t,e){this.provider=t,this.tokens=e}};function DI(t,e){const i=t.orderedGroups(e);return i.length>0?i[0]:[]}function NI(t,e,i,n){return ar(this,void 0,void 0,function*(){const s=DI(t,e),r=yield Promise.all(s.map(o=>ar(this,void 0,void 0,function*(){let a;try{a=yield o.provideDocumentRangeSemanticTokens(e,i,n)}catch(l){zu(l),a=null}return(!a||!uf(a))&&(a=null),new sF(o,a)})));for(const o of r)if(o.tokens)return o;return r.length>0?r[0]:null})}Tt.registerCommand("_provideDocumentSemanticTokensLegend",(t,...e)=>ar(void 0,void 0,void 0,function*(){const[i]=e;mn(i instanceof Le);const n=t.get(Lt).getModel(i);if(!n)return;const{documentSemanticTokensProvider:s}=t.get(pe),r=nF(s,n);return r?r[0].getLegend():t.get(Ni).executeCommand("_provideDocumentRangeSemanticTokensLegend",i)}));Tt.registerCommand("_provideDocumentSemanticTokens",(t,...e)=>ar(void 0,void 0,void 0,function*(){const[i]=e;mn(i instanceof Le);const n=t.get(Lt).getModel(i);if(!n)return;const{documentSemanticTokensProvider:s}=t.get(pe);if(!II(s,n))return t.get(Ni).executeCommand("_provideDocumentRangeSemanticTokens",i,n.getFullModelRange());const r=yield EI(s,n,null,null,ti.None);if(!r)return;const{provider:o,tokens:a}=r;if(!a||!uf(a))return;const l=kI({id:0,type:"full",data:a.data});return a.resultId&&o.releaseDocumentSemanticTokens(a.resultId),l}));Tt.registerCommand("_provideDocumentRangeSemanticTokensLegend",(t,...e)=>ar(void 0,void 0,void 0,function*(){const[i,n]=e;mn(i instanceof Le);const s=t.get(Lt).getModel(i);if(!s)return;const{documentRangeSemanticTokensProvider:r}=t.get(pe),o=DI(r,s);if(o.length===0)return;if(o.length===1||!n||!T.isIRange(n))return o[0].getLegend();const a=yield NI(r,s,T.lift(n),ti.None);if(a)return a.provider.getLegend()}));Tt.registerCommand("_provideDocumentRangeSemanticTokens",(t,...e)=>ar(void 0,void 0,void 0,function*(){const[i,n]=e;mn(i instanceof Le),mn(T.isIRange(n));const s=t.get(Lt).getModel(i);if(!s)return;const{documentRangeSemanticTokensProvider:r}=t.get(pe),o=yield NI(r,s,T.lift(n),ti.None);if(!(!o||!o.tokens))return kI({id:0,type:"full",data:o.tokens.data})}));var m0=function(t,e,i,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r},Pt=function(t,e){return function(i,n){e(i,n,t)}};function Es(t){return t.toString()}function oS(t){const e=new vL,i=t.createSnapshot();let n;for(;n=i.read();)e.update(n);return e.digest()}var rF=class{constructor(t,e,i){this._modelEventListeners=new ne,this.model=t,this._languageSelection=null,this._languageSelectionListener=null,this._modelEventListeners.add(t.onWillDispose(()=>e(t))),this._modelEventListeners.add(t.onDidChangeLanguage(n=>i(t,n)))}_disposeLanguageSelection(){this._languageSelectionListener&&(this._languageSelectionListener.dispose(),this._languageSelectionListener=null)}dispose(){this._modelEventListeners.dispose(),this._disposeLanguageSelection()}setLanguage(t){this._disposeLanguageSelection(),this._languageSelection=t,this._languageSelectionListener=this._languageSelection.onDidChange(()=>this.model.setMode(t.languageId)),this.model.setMode(t.languageId)}},oF=Bt||fe?1:2,aF=class{constructor(t,e,i,n,s,r,o,a){this.uri=t,this.initialUndoRedoSnapshot=e,this.time=i,this.sharesUndoRedoStack=n,this.heapSize=s,this.sha1=r,this.versionId=o,this.alternativeVersionId=a}},Eu=class Al extends V{constructor(e,i,n,s,r,o,a,l,h){super(),this._configurationService=e,this._resourcePropertiesService=i,this._themeService=n,this._logService=s,this._und
538oRedoService=r,this._languageService=o,this._languageConfigurationService=a,this._languageFeatureDebounceService=l,this._onModelAdded=this._register(new M),this.onModelAdded=this._onModelAdded.event,this._onModelRemoved=this._register(new M),this.onModelRemoved=this._onModelRemoved.event,this._onModelModeChanged=this._register(new M),this.onModelLanguageChanged=this._onModelModeChanged.event,this._modelCreationOptionsByLanguageAndResource=Object.create(null),this._models={},this._disposedModels=new Map,this._disposedModelsHeapSize=0,this._semanticStyling=this._register(new lF(this._themeService,this._languageService,this._logService)),this._register(this._configurationService.onDidChangeConfiguration(()=>this._updateModelOptions())),this._updateModelOptions(),this._register(new J_(this._semanticStyling,this,this._themeService,this._configurationService,this._languageFeatureDebounceService,h))}static _readModelOptions(e,i){var n;let s=Et.tabSize;if(e.editor&&typeof e.editor.tabSize<"u"){const g=parseInt(e.editor.tabSize,10);isNaN(g)||(s=g),s<1&&(s=1)}let r=s;if(e.editor&&typeof e.editor.indentSize<"u"&&e.editor.indentSize!=="tabSize"){const g=parseInt(e.editor.indentSize,10);isNaN(g)||(r=g),r<1&&(r=1)}let o=Et.insertSpaces;e.editor&&typeof e.editor.insertSpaces<"u"&&(o=e.editor.insertSpaces==="false"?!1:!!e.editor.insertSpaces);let a=oF;const l=e.eol;l===`\r
539`?a=2:l===`
540`&&(a=1);let h=Et.trimAutoWhitespace;e.editor&&typeof e.editor.trimAutoWhitespace<"u"&&(h=e.editor.trimAutoWhitespace==="false"?!1:!!e.editor.trimAutoWhitespace);let c=Et.detectIndentation;e.editor&&typeof e.editor.detectIndentation<"u"&&(c=e.editor.detectIndentation==="false"?!1:!!e.editor.detectIndentation);let d=Et.largeFileOptimizations;e.editor&&typeof e.editor.largeFileOptimizations<"u"&&(d=e.editor.largeFileOptimizations==="false"?!1:!!e.editor.largeFileOptimizations);let u=Et.bracketPairColorizationOptions;return!((n=e.editor)===null||n===void 0)&&n.bracketPairColorization&&typeof e.editor.bracketPairColorization=="object"&&(u={enabled:!!e.editor.bracketPairColorization.enabled}),{isForSimpleWidget:i,tabSize:s,indentSize:r,insertSpaces:o,detectIndentation:c,defaultEOL:a,trimAutoWhitespace:h,largeFileOptimizations:d,bracketPairColorizationOptions:u}}_getEOL(e,i){if(e)return this._resourcePropertiesService.getEOL(e,i);const n=this._configurationService.getValue("files.eol",{overrideIdentifier:i});return n&&typeof n=="string"&&n!=="auto"?n:Hi===3||Hi===2?`
541`:`\r
542`}_shouldRestoreUndoStack(){const e=this._configurationService.getValue("files.restoreUndoStack");return typeof e=="boolean"?e:!0}getCreationOptions(e,i,n){let s=this._modelCreationOptionsByLanguageAndResource[e+i];if(!s){const r=this._configurationService.getValue("editor",{overrideIdentifier:e,resource:i}),o=this._getEOL(i,e);s=Al._readModelOptions({editor:r,eol:o},n),this._modelCreationOptionsByLanguageAndResource[e+i]=s}return s}_updateModelOptions(){const e=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);const i=Object.keys(this._models);for(let n=0,s=i.length;n<s;n++){const r=i[n],o=this._models[r],a=o.model.getLanguageId(),l=o.model.uri,h=e[a+l],c=this.getCreationOptions(a,l,o.model.isForSimpleWidget);Al._setModelOptionsForModel(o.model,c,h)}}static _setModelOptionsForModel(e,i,n){n&&n.defaultEOL!==i.defaultEOL&&e.getLineCount()===1&&e.setEOL(i.defaultEOL===1?0:1),!(n&&n.detectIndentation===i.detectIndentation&&n.insertSpaces===i.insertSpaces&&n.tabSize===i.tabSize&&n.indentSize===i.indentSize&&n.trimAutoWhitespace===i.trimAutoWhitespace&&ki(n.bracketPairColorizationOptions,i.bracketPairColorizationOptions))&&(i.detectIndentation?(e.detectIndentation(i.insertSpaces,i.tabSize),e.updateOptions({trimAutoWhitespace:i.trimAutoWhitespace,bracketColorizationOptions:i.bracketPairColorizationOptions})):e.updateOptions({insertSpaces:i.insertSpaces,tabSize:i.tabSize,indentSize:i.indentSize,trimAutoWhitespace:i.trimAutoWhitespace,bracketColorizationOptions:i.bracketPairColorizationOptions}))}_insertDisposedModel(e){this._disposedModels.set(Es(e.uri),e),this._disposedModelsHeapSize+=e.heapSize}_removeDisposedModel(e){const i=this._disposedModels.get(Es(e));return i&&(this._disposedModelsHeapSize-=i.heapSize),this._disposedModels.delete(Es(e)),i}_ensureDisposedModelsHeapSize(e){if(this._disposedModelsHeapSize>e){const i=[];
542for(this._disposedModels.forEach(n=>{n.sharesUndoRedoStack||i.push(n)}),i.sort((n,s)=>n.time-s.time);i.length>0&&this._disposedModelsHeapSize>e;){const n=i.shift();this._removeDisposedModel(n.uri),n.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(n.initialUndoRedoSnapshot)}}}_createModelData(e,i,n,s){const r=this.getCreationOptions(i,n,s),o=new so(e,i,r,n,this._undoRedoService,this._languageService,this._languageConfigurationService);if(n&&this._disposedModels.has(Es(n))){const h=this._removeDisposedModel(n),c=this._undoRedoService.getElements(n),d=oS(o)===h.sha1;if(d||h.sharesUndoRedoStack){for(const u of c.past)cs(u)&&u.matchesResource(n)&&u.setModel(o);for(const u of c.future)cs(u)&&u.matchesResource(n)&&u.setModel(o);this._undoRedoService.setElementsValidFlag(n,!0,u=>cs(u)&&u.matchesResource(n)),d&&(o._overwriteVersionId(h.versionId),o._overwriteAlternativeVersionId(h.alternativeVersionId),o._overwriteInitialUndoRedoSnapshot(h.initialUndoRedoSnapshot))}else h.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(h.initialUndoRedoSnapshot)}const a=Es(o.uri);if(this._models[a])throw new Error("ModelService: Cannot add model because it already exists!");const l=new rF(o,h=>this._onWillDispose(h),(h,c)=>this._onDidChangeLanguage(h,c));return this._models[a]=l,l}createModel(e,i,n,s=!1){let r;return i?(r=this._createModelData(e,i.languageId,n,s),this.setMode(r.model,i)):r=this._createModelData(e,Hh,n,s),this._onModelAdded.fire(r.model),r.model}setMode(e,i){if(!i)return;const n=this._models[Es(e.uri)];n&&n.setLanguage(i)}getModels(){const e=[],i=Object.keys(this._models);for(let n=0,s=i.length;n<s;n++){const r=i[n];e.push(this._models[r].model)}return e}getModel(e){const i=Es(e),n=this._models[i];return n?n.model:null}getSemanticTokensProviderStyling(e){return this._semanticStyling.get(e)}_schemaShouldMaintainUndoRedoElements(e){return e.scheme===_e.file||e.scheme===_e.vscodeRemote||e.scheme===_e.userData||e.scheme===_e.vscodeNotebookCell||e.scheme==="fake-fs"}_onWillDispose(e){const i=Es(e.uri),n=this._models[i],s=this._undoRedoService.getUriComparisonKey(e.uri)!==e.uri.toString();let r=!1,o=0;if(s||this._shouldRestoreUndoStack()&&this._schemaShouldMaintainUndoRedoElements(e.uri)){const l=this._undoRedoService.getElements(e.uri);if(l.past.length>0||l.future.length>0){for(const h of l.past)cs(h)&&h.matchesResource(e.uri)&&(r=!0,o+=h.heapSize(e.uri),h.setModel(e.uri));for(const h of l.future)cs(h)&&h.matchesResource(e.uri)&&(r=!0,o+=h.heapSize(e.uri),h.setModel(e.uri))}}const a=Al.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK;if(r)if(!s&&o>a){const l=n.model.getInitialUndoRedoSnapshot();l!==null&&this._undoRedoService.restoreSnapshot(l)}else this._ensureDisposedModelsHeapSize(a-o),this._undoRedoService.setElementsValidFlag(e.uri,!1,l=>cs(l)&&l.matchesResource(e.uri)),this._insertDisposedModel(new aF(e.uri,n.model.getInitialUndoRedoSnapshot(),Date.now(),s,o,oS(e),e.getVersionId(),e.getAlternativeVersionId()));else if(!s){const l=n.model.getInitialUndoRedoSnapshot();l!==null&&this._undoRedoService.restoreSnapshot(l)}delete this._models[i],n.dispose(),delete this._modelCreationOptionsByLanguageAndResource[e.getLanguageId()+e.uri],this._onModelRemoved.fire(e)}_onDidChangeLanguage(e,i){const n=i.oldLanguage,s=e.getLanguageId(),r=this.getCreationOptions(n,e.uri,e.isForSimpleWidget),o=this.getCreationOptions(s,e.uri,e.isForSimpleWidget);Al._setModelOptionsForModel(e,o,r),this._onModelModeChanged.fire({model:e,oldLanguageId:n})}};Eu.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK=20971520;Eu=m0([Pt(0,yt),Pt(1,xL),Pt(2,et),Pt(3,cr),Pt(4,e0),Pt(5,Nt),Pt(6,hr),Pt(7,lf),Pt(8,pe)],Eu);function aS(t,e,i){var n;const s=(n=i.getValue("editor.semanticHighlighting",{overrideIdentifier:t.getLanguageId(),resource:t.uri}))===null||n===void 0?void 0:n.enabled;return typeof s=="boolean"?s:e.getColorTheme().semanticHighlighting}var J_=class extends V{constructor(e,i,n,s,r,o){super(),this._watchers=Object.create(null),this._semanticStyling=e;const a=c=>{this._watchers[c.uri.toString()]=new _h(c,this._semanticStyling,n,r,o)},l=(c,d)=>{d.dispose(),delete this._watchers[c.uri.toString()]},h=()=>{for(let c of i.getModels()){const d=this._watchers[c.uri.toString()];aS(c,n,s)?d||a(c):d&&l(c,d)}};this._register(i.onModelAdded(c=>{aS(c,n,s)&&a(c)})),this._register(i.onModelRemoved(c=>{const d=this._watchers[c.uri.toString()];d&&l(c,d)})),this._register(s.onDidChangeConfiguration(c=>{c.affectsConfiguration("editor.semanticHighlighting")&&h()})),this._register(n.onDidColorThemeChange(h))}};J_=m0([Pt(1,Lt),Pt(2,et),Pt(3,yt),Pt(4,lf),Pt(5,pe)],J_);var lF=class extends V{constructor(t,e,i){super(),this._themeService=t,this._languageService=e,this._logService=i,this._caches=new WeakMap,this._register(this._themeService.onDidColorThemeChange(()=>{this._caches=new WeakMap}))}get(t){return this._caches.has(t)||this._caches.set(t,new Q_(t.getLegend(),this._themeService,this._languageService,this._logService)),this._caches.get(t)}},hF=class{constructor(t,e,i){this.provider=t,this.resultId=e,this.data=i}dispose(){this.provider.releaseDocumentSemanticTokens(this.resultId)}},_h=class Nr extends V{constructor(e,i,n,s,r){super(),this._isDisposed=!1,this._model=e,this._semanticStyling=i,this._provider=r.documentSemanticTokensProvider,this._debounceInformation=s.for(this._provider,"DocumentSemanticTokens",{min:Nr.REQUEST_MIN_DELAY,max:Nr.REQUEST_MAX_DELAY}),this._fetchDocumentSemanticTokens=this._register(new _t(()=>this._fetchDocumentSemanticTokensNow(),Nr.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 o=()=>{De(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[];for(const a of this._provider.all(e))typeof a.onDidChange=="function"&&this._documentProvidersChangeListeners.push(a.onDidChange(()=>this._fetchDocumentSemanticTokens.schedule(0)))};o(),this._register(this._provider.onDidChange(()=>{o(),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(n.onDidColorThemeChange(a=>{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(!II(this._provider,this._model)){this._currentDocumentResponse&&this._model.setSemanticTokens(null,!1);return}const e=new Ba,i=this._currentDocumentResponse?this._currentDocumentResponse.provider:null,n=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,s=EI(this._provider,this._model,i,n,e.token);this._currentDocumentRequestCancellationTokenSource=e;const r=[],o=this._model.onDidChangeContent(l=>{r.push(l)}
542),a=new Dh(!1);s.then(l=>{if(this._debounceInformation.update(this._model,a.elapsed()),this._currentDocumentRequestCancellationTokenSource=null,o.dispose(),!l)this._setDocumentSemanticTokens(null,null,null,r);else{const{provider:h,tokens:c}=l,d=this._semanticStyling.get(h);this._setDocumentSemanticTokens(h,c||null,d,r)}},l=>{l&&(kh(l)||typeof l.message=="string"&&l.message.indexOf("busy")!==-1)||We(l),this._currentDocumentRequestCancellationTokenSource=null,o.dispose(),r.length>0&&(this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model)))})}static _copy(e,i,n,s,r){for(let o=0;o<r;o++)n[s+o]=e[i+o]}_setDocumentSemanticTokens(e,i,n,s){const r=this._currentDocumentResponse,o=()=>{s.length>0&&!this._fetchDocumentSemanticTokens.isScheduled()&&this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))};if(this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._isDisposed){e&&i&&e.releaseDocumentSemanticTokens(i.resultId);return}if(!e||!n){this._model.setSemanticTokens(null,!1);return}if(!i){this._model.setSemanticTokens(null,!0),o();return}if(xI(i)){if(!r){this._model.setSemanticTokens(null,!0);return}if(i.edits.length===0)i={resultId:i.resultId,data:r.data};else{let a=0;for(const u of i.edits)a+=(u.data?u.data.length:0)-u.deleteCount;const l=r.data,h=new Uint32Array(l.length+a);let c=l.length,d=h.length;for(let u=i.edits.length-1;u>=0;u--){const g=i.edits[u],m=c-(g.start+g.deleteCount);m>0&&(Nr._copy(l,c-m,h,d-m,m),d-=m),g.data&&(Nr._copy(g.data,0,h,d-g.data.length,g.data.length),d-=g.data.length),c=g.start}c>0&&Nr._copy(l,0,h,0,c),i={resultId:i.resultId,data:h}}}if(uf(i)){this._currentDocumentResponse=new hF(e,i.resultId,i.data);const a=Y6(i,n,this._model.getLanguageId());if(s.length>0)for(const l of s)for(const h of a)for(const c of l.changes)h.applyEdit(c.range,c.text);this._model.setSemanticTokens(a,!0)}else this._model.setSemanticTokens(null,!0);o()}};_h.REQUEST_MIN_DELAY=300;_h.REQUEST_MAX_DELAY=2e3;_h=m0([Pt(2,et),Pt(3,lf),Pt(4,pe)],_h);var cF=new RegExp(`(\\\\)?\\$\\((${qt.iconNameExpression}(?:${qt.iconModifierExpression})?)\\)`,"g");function Jl(t){const e=new Array;let i,n=0,s=0;for(;(i=cF.exec(t))!==null;){s=i.index||0,e.push(t.substring(n,s)),n=(i.index||0)+i[0].length;const[,r,o]=i;e.push(r?`$(${o})`:dF({id:o}))}return n<t.length&&e.push(t.substring(n)),e}function dF(t){const e=Q("span");return e.classList.add(...qt.asClassNameArray(t)),e}var uF={buttonBackground:O.fromHex("#0E639C"),buttonHoverBackground:O.fromHex("#006BB3"),buttonForeground:O.white},lS=class extends V{constructor(t,e){super(),this._onDidClick=this._register(new M),this.options=e||Object.create(null),ao(this.options,uF,!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"),t.appendChild(this._element),this._register(ii.addTarget(this._element)),[Z.CLICK,Me.Tap].forEach(i=>{this._register(B(this._element,i,n=>{if(!this.enabled){ye.stop(n);return}this._onDidClick.fire(n)}))}),this._register(B(this._element,Z.KEY_DOWN,i=>{const n=new Pe(i);let s=!1;this.enabled&&(n.equals(3)||n.equals(10))?(this._onDidClick.fire(i),s=!0):n.equals(9)&&(this._element.blur(),s=!0),s&&ye.stop(n,!0)})),this._register(B(this._element,Z.MOUSE_OVER,i=>{this._element.classList.contains("disabled")||this.setHoverBackground()})),this._register(B(this._element,Z.MOUSE_OUT,i=>{this.applyStyles()})),this.focusTracker=this._register(xa(this._element)),this._register(this.focusTracker.onDidFocus(()=>
542this.setHoverBackground())),this._register(this.focusTracker.onDidBlur(()=>this.applyStyles())),this.applyStyles()}get onDidClick(){return this._onDidClick.event}setHoverBackground(){let t;this.options.secondary?t=this.buttonSecondaryHoverBackground?this.buttonSecondaryHoverBackground.toString():null:t=this.buttonHoverBackground?this.buttonHoverBackground.toString():null,t&&(this._element.style.backgroundColor=t)}style(t){this.buttonForeground=t.buttonForeground,this.buttonBackground=t.buttonBackground,this.buttonHoverBackground=t.buttonHoverBackground,this.buttonSecondaryForeground=t.buttonSecondaryForeground,this.buttonSecondaryBackground=t.buttonSecondaryBackground,this.buttonSecondaryHoverBackground=t.buttonSecondaryHoverBackground,this.buttonBorder=t.buttonBorder,this.applyStyles()}applyStyles(){if(this._element){let t,e;this.options.secondary?(e=this.buttonSecondaryForeground?this.buttonSecondaryForeground.toString():"",t=this.buttonSecondaryBackground?this.buttonSecondaryBackground.toString():""):(e=this.buttonForeground?this.buttonForeground.toString():"",t=this.buttonBackground?this.buttonBackground.toString():"");const i=this.buttonBorder?this.buttonBorder.toString():"";this._element.style.color=e,this._element.style.backgroundColor=t,this._element.style.borderWidth=i?"1px":"",this._element.style.borderStyle=i?"solid":"",this._element.style.borderColor=i}}get element(){return this._element}set label(t){this._element.classList.add("monaco-text-button"),this.options.supportIcons?Gu(this._element,...Jl(t)):this._element.textContent=t,typeof this.options.title=="string"?this._element.title=this.options.title:this.options.title&&(this._element.title=t)}set enabled(t){t?(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")}}
542,fF={badgeBackground:O.fromHex("#4D4D4D"),badgeForeground:O.fromHex("#FFFFFF")},hS=class{constructor(t,e){this.count=0,this.options=e||Object.create(null),ao(this.options,fF,!1),this.badgeBackground=this.options.badgeBackground,this.badgeForeground=this.options.badgeForeground,this.badgeBorder=this.options.badgeBorder,this.element=z(t,Q(".monaco-count-badge")),this.countFormat=this.options.countFormat||"{0}",this.titleFormat=this.options.titleFormat||"",this.setCount(this.options.count||0)}setCount(t){this.count=t,this.render()}setTitleFormat(t){this.titleFormat=t,this.render()}render(){this.element.textContent=Hd(this.countFormat,this.count),this.element.title=Hd(this.titleFormat,this.count),this.applyStyles()}style(t){this.badgeBackground=t.badgeBackground,this.badgeForeground=t.badgeForeground,this.badgeBorder=t.badgeBorder,this.applyStyles()}applyStyles(){if(this.element){const t=this.badgeBackground?this.badgeBackground.toString():"",e=this.badgeForeground?this.badgeForeground.toString():"",i=this.badgeBorder?this.badgeBorder.toString():"";this.element.style.backgroundColor=t,this.element.style.color=e,this.element.style.borderWidth=i?"1px":"",this.element.style.borderStyle=i?"solid":"",this.element.style.borderColor=i}}},cS="done",dS="active",Ag="infinite",Og="infinite-long-running",uS="discrete",gF={progressBarBackgroun
542d:O.fromHex("#0E70C0")},TI=class MI extends V{constructor(e,i){super(),this.options=i||Object.create(null),ao(this.options,gF,!1),this.workedVal=0,this.progressBarBackground=this.options.progressBarBackground,this.showDelayedScheduler=this._register(new _t(()=>YL(this.element),0)),this.longRunningScheduler=this._register(new _t(()=>this.infiniteLongRunning(),MI.LONG_RUNNING_INFINITE_THRESHOLD)),this.create(e)}create(e){this.element=document.createElement("div"),this.element.classList.add("monaco-progress-container"),this.element.setAttribute("role","progressbar"),this.element.setAttribute("aria-valuemin","0"),e.appendChild(this.element),this.bit=document.createElement("div"),this.bit.classList.add("progress-bit"),this.element.appendChild(this.bit),this.applyStyles()}off(){this.bit.style.width="inherit",this.bit.style.opacity="1",this.element.classList.remove(dS,Ag,Og,uS),this.workedVal=0,this.totalWork=void 0,this.longRunningScheduler.cancel()}stop(){return this.doDone(!1)}doDone(e){return this.element.classList.add(cS),this.element.classList.contains(Ag)?(this.bit.style.opacity="0",e?setTimeout(()=>this.off(),200):this.off()):(this.bit.style.width="inherit",e?setTimeout(()=>this.off(),200):this.off()),this}infinite(){return this.bit.style.width="2%",this.bit.style.opacity="1",this.element.classList.remove(uS,cS,Og),this.element.classList.add(dS,Ag),this.longRunningScheduler.schedule(),this}infiniteLongRunning(){this.element.classList.add(Og)}getContainer(){return this.element}
542style(e){this.progressBarBackground=e.progressBarBackground,this.applyStyles()}applyStyles(){if(this.bit){const e=this.progressBarBackground?this.progressBarBackground.toString():"";this.bit.style.backgroundColor=e}}};TI.LONG_RUNNING_INFINITE_THRESHOLD=1e4;var RI=class{constructor(t){this._prefix=t,this._lastId=0}nextId(){return this._prefix+ ++this._lastId}},Q$=new RI("id#"),Pg={},mF=new RI("quick-input-button-icon-");function e1(t){if(!t)return;let e;const i=t.dark.toString();return Pg[i]?e=Pg[i]:(e=mF.nextId(),BC(`.${e}`,`background-image: ${wp(t.light||t.dark)}`),BC(`.vs-dark .${e}, .hc-black .${e}`,`background-image: ${wp(t.dark)}`),Pg[i]=e),e}var pF={ctrlCmd:!1,alt:!1},vh;(function(t){t[t.Blur=1]="Blur",t[t.Gesture=2]="Gesture",t[t.Other=3]="Other"})(vh||(vh={}));var an;(function(t){t[t.NONE=0]="NONE",t[t.FIRST=1]="FIRST",t[t.SECOND=2]="SECOND",t[t.LAST=3]="LAST"})(an||(an={}));var _F=class{constructor(t){this.options=t}},J$=new _F;function vF(t,e={}){const i=AI(e);return i.textContent=t,i}function CF(t,e={}){const i=AI(e);return OI(i,wF(t,!!e.renderCodeSegments),e.actionHandler,e.renderCodeSegments),i}function AI(t){const e=t.inline?"span":"div",i=document.createElement(e);return t.className&&(i.className=t.className),i}var bF=class{constructor(t){this.source=t,this.index=0}eos(){return this.index>=this.source.length}next(){const t=this.peek();return this.advance(),t}peek(){return this.source[this.index]}advance(){this.index++}};function OI(t,e,i,n){let s;if(e.type===2)s=document.createTextNode(e.content||"");else if(e.type===3)s=document.createElement("b");else if(e.type===4)s=document.createElement("i");else if(e.type===7&&n)s=document.createElement("code");else if(e.type===5&&i){const r=document.createElement("a");i.disposables.add(gi(r,"click",o=>{i.callback(String(e.index),o)})),s=r}else e.type===8?s=document.createElement("br"):e.type===1&&(s=t);s&&t!==s&&t.appendChild(s),s&&Array.isArray(e.children)&&e.children.forEach(r=>{OI(s,r,i,n)})}function wF(t,e){const i={type:1,children:[]};let n=0,s=i;const r=[],o=new bF(t);for(;!o.eos();){let a=o.next();const l=a==="\\"&&t1(o.peek(),e)!==0;if(l&&(a=o.next()),!l&&SF(a,e)&&a===o.peek()){o.advance(),s.type===2&&(s=r.pop());const h=t1(a,e);if(s.type===h||s.type===5&&h===6)s=r.pop();else{const c={type:h,children:[]};h===5&&(c.index=n,n++),s.children.push(c),r.push(s),s=c}}else if(a===`
543`)s.type===2&&(s=r.pop()),s.children.push({type:8});else if(s.type!==2){const h={type:2,content:a};s.children.push(h),r.push(s),s=h}else s.content+=a}return s.type===2&&(s=r.pop()),r.length,i}function SF(t,e){return t1(t,e)!==0}function t1(t,e){switch(t){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;case"`":return e?7:0;default:return 0}}var yF=class{constructor(t,e=0,i=t.length,n=e-1){this.items=t,this.start=e,this.end=i,this.index=n}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()}},LF=class{constructor(t=[],e=10){this._initialize(t),this._limit=e,this._onChange()}getHistory(){return this._elements}add(t){this._history.delete(t),this._history.add(t),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(t){return this._history.has(t)}_onChange(){this._reduceToLimit();const t=this._elements;this._navigator=new yF(t,0,t.length,t.length)}_reduceToLimit(){const t=this._elements;t.length>this._limit&&this._initialize(t.slice(t.length-this._limit))}_currentPosition(){const t=this._navigator.current();return t?this._elements.indexOf(t):-1}_initialize(t){this._history=new Set;for(const e of t)this._history.add(e)}get _elements(){const t=[];
543return this._history.forEach(e=>t.push(e)),t}},pl=Q,kF={inputBackground:O.fromHex("#3C3C3C"),inputForeground:O.fromHex("#CCCCCC"),inputValidationInfoBorder:O.fromHex("#55AAFF"),inputValidationInfoBackground:O.fromHex("#063B49"),inputValidationWarningBorder:O.fromHex("#B89500"),inputValidationWarningBackground:O.fromHex("#352A05"),inputValidationErrorBorder:O.fromHex("#BE1100"),inputValidationErrorBackground:O.fromHex("#5A1D1D")},PI=class extends qn{constructor(t,e,i){var n;super(),this.state="idle",this.maxHeight=Number.POSITIVE_INFINITY,this._onDidChange=this._register(new M),this.onDidChange=this._onDidChange.event,this._onDidHeightChange=this._register(new M),this.onDidHeightChange=this._onDidHeightChange.event,this.contextViewProvider=e,this.options=i||Object.create(null),ao(this.options,kF,!1),this.message=null,this.placeholder=this.options.placeholder||"",this.tooltip=(n=this.options.tooltip)!==null&&n!==void 0?n: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=z(t,pl(".monaco-inputbox.idle"));let s=this.options.flexibleHeight?"textarea":"input",r=z(this.element,pl(".ibwrapper"));if(this.input=z(r,pl(s+".input.empty")),this.input.setAttribute("autocorrect","off"),this.input.setAttribute("autocapitalize","off"),this.input.setAttribute("spellcheck","false"),this.onfocus(this.input,()=>this.element.classList.add("synthetic-focus")),this.onblur(this.input,()=>this.element.classList.remove("synthetic-focus")),this.options.flexibleHeight){this.maxHeight=typeof this.options.flexibleMaxHeight=="number"?this.options.flexibleMaxHeight:Number.POSITIVE_INFINITY,this.mirror=z(r,pl("div.mirror")),this.mirror.innerText=" ",this.scrollableElement=new f9(this.element,{vertical:1}),this.options.flexibleWidth&&(this.input.setAttribute("wrap","off"),this.mirror.style.whiteSpace="pre",this.mirror.style.wordWrap="initial"),z(t,this.scrollableElement.getDomNode()),this._register(this.scrollableElement),this._register(this.scrollableElement.onScroll(l=>this.input.scrollTop=l.scrollTop));const o=this._register(new Ee(document,"selectionchange")),a=$.filter(o.event,()=>{const l=document.getSelection();return l?.anchorNode===r});this._register(a(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 Ma(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(t){this.placeholder=t,this.input.setAttribute("placeholder",t)}setTooltip(t){this.tooltip=t,this.input.title=t}setAriaLabel(t){this.ariaLabel=t,t?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(t){this.input.value!==t&&(this.input.value=t,this.onValueChange())}get height(){return typeof this.cachedHeight=="number"?this.cachedHeight:Cp(this.element)}focus(){this.input.focus()}blur(){this.input.blur()}hasFocus(){return document.activeElement===this.input}select(t=null){this.input.select(),t&&(this.input.setSelectionRange(t.start,t.end),t.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 Vi(this.input)}set width(t){if(this.options.flexibleHeight&&this.options.flexibleWidth){let e=0;this.mirror&&(e=(parseFloat(this.mirror.style.paddingLeft||"")||0)+(parseFloat(this.mirror.style.paddingRight||"")||0)),this.input.style.width=t-e+"px"}else this.input.style.width=t+"px";this.mirror&&(this.mirror.style.width=t+"px")}set paddingRight(t){this.input.style.width=`calc(100% - ${t}px)`,this.mirror&&(this.mirror.style.paddingRight=t+"px")}updateScrollDimensions(){if(typeof this.cachedContentHeight!="number"||typeof this.cachedHeight!="number"||!this.scrollableElement)return;const t=this.cachedContentHeight,e=this.cachedHeight,i=this.input.scrollTop;this.scrollableElement.setScrollDimensions({scrollHeight:t,height:e}),this.scrollableElement.setScrollPosition({scrollTop:i})}
543showMessage(t,e){this.message=t,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(t.type));const i=this.stylesForType(this.message.type);this.element.style.border=i.border?`1px solid ${i.border}`:"",(this.hasFocus()||e)&&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 t=null;return this.validation&&(t=this.validation(this.value),t?(this.inputElement.setAttribute("aria-invalid","true"),this.showMessage(t)):this.inputElement.hasAttribute("aria-invalid")&&(this.inputElement.removeAttribute("aria-invalid"),this.hideMessage())),t?.type}stylesForType(t){switch(t){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(t){switch(t){case 1:return"info";case 2:return"warning";default:return"error"}}_showMessage(){if(!this.contextViewProvider||!this.message)return;let t,e=()=>t.style.width=Vi(this.element)+"px";this.contextViewProvider.showContextView({getAnchor:()=>this.element,anchorAlignment:1,render:n=>{if(!this.message)return null;t=z(n,pl(".monaco-inputbox-container")),e();const s={inline:!0,className:"monaco-inputbox-message"},r=this.message.formatContent?CF(this.message.content,s):vF(this.message.content,s);r.classList.add(this.classForType(this.message.type));const o=this.stylesForType(this.message.type);return r.style.backgroundColor=o.background?o.background.toString():"",r.style.color=o.foreground?o.foreground.toString():"",r.style.border=o.border?`1px solid ${o.border}`:"",z(t,r),null},onHide:()=>{this.state="closed"},layout:e});let i;this.message.type===3?i=p("alertErrorMessage","Error: {0}",this.message.content):this.message.type===2?i=p("alertWarningMessage","Warning: {0}",this.message.content):i=p("alertInfoMessage","Info: {0}",this.message.content),Zu(i),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 t=this.value,e=t.charCodeAt(t.length-1)===10?" ":"";(t+e).replace(/\u000c/g,"")?this.mirror.textContent=t+e:this.mirror.innerText=" ",this.layout()}style(t){this.inputBackground=t.inputBackground,this.inputForeground=t.inputForeground,this.inputBorder=t.inputBorder,this.inputValidationInfoBackground=t.inputValidationInfoBackground,this.inputValidationInfoForeground=t.inputValidationInfoForeground,this.inputValidationInfoBorder=t.inputValidationInfoBorder,this.inputValidationWarningBackground=t.inputValidationWarningBackground,this.inputValidationWarningForeground=t.inputValidationWarningForeground,this.inputValidationWarningBorder=t.inputValidationWarningBorder,this.inputValidationErrorBackground=t.inputValidationErrorBackground,this.inputValidationErrorForeground=t.inputValidationErrorForeground,this.inputValidationErrorBorder=t.inputValidationErrorBorder,this.applyStyles()}applyStyles(){const t=this.inputBackground?this.inputBackground.toString():"",e=this.inputForeground?this.inputForeground.toString():"",i=this.inputBorder?this.inputBorder.toString():"";this.element.style.backgroundColor=t,this.element.style.color=e,this.input.style.backgroundColor="inherit",this.input.style.color=e,this.element.style.borderWidth=i?"1px":"",this.element.style.borderStyle=i?"solid":"",this.element.style.borderColor=i}layout(){if(!this.mirror)return;const t=this.cachedContentHeight;this.cachedContentHeight=Cp(this.mirror),t!==this.cachedContentHeight&&(this.cachedHeight=Math.min(this.cachedContentHeight,this.maxHeight),this.input.style.height=this.cachedHeight+"px",this._onDidHeightChange.fire(this.cachedContentHeight))}insertAtCursor(t){const e=this.inputElement,i=e.selectionStart,n=e.selectionEnd,s=e.value;i!==null&&n!==null&&(this.value=s.substr(0,i)+t+s.substr(n),e.setSelectionRange(i+1,i+1),this.layout())}dispose(){this._hideMessage(),this.message=null,this.actionbar&&this.actionbar.dispose(),super.dispose()}},FI=class extends PI{constructor(t,e,i){const n=p({key:"history.inputbox.hint",comment:["Text will be prefixed with ⇅ plus a single space, then used as a hint where input field keeps history"]},"for history"),s=` or ⇅ ${n}`,r=` (⇅ ${n})`;super(t,e,i),this.history=new LF(i.history,100);const o=()=>
543{if(i.showHistoryHint&&i.showHistoryHint()&&!this.placeholder.endsWith(s)&&!this.placeholder.endsWith(r)&&this.history.getHistory().length){const a=this.placeholder.endsWith(")")?s:r,l=this.placeholder+a;i.showPlaceholderOnFocus&&document.activeElement!==this.input?this.placeholder=l:this.setPlaceHolder(l)}};this.observer=new MutationObserver((a,l)=>{a.forEach(h=>{h.target.textContent||o()})}),this.observer.observe(this.input,{attributeFilter:["class"]}),this.onfocus(this.input,()=>o()),this.onblur(this.input,()=>{const a=l=>{if(this.placeholder.endsWith(l)){const h=this.placeholder.slice(0,this.placeholder.length-l.length);return i.showPlaceholderOnFocus?this.placeholder=h:this.setPlaceHolder(h),!0}else return!1};a(r)||a(s)})}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 t=this.getNextValue();t&&(t=t===this.value?this.getNextValue():t),t&&(this.value=t,Lp(this.value))}showPreviousValue(){this.history.has(this.value)||this.addToHistory();let t=this.getPreviousValue();t&&(t=t===this.value?this.getPreviousValue():t),t&&(this.value=t,Lp(this.value))}getCurrentValue(){let t=this.history.current();return t||(t=this.history.last(),this.history.next()),t}getPreviousValue(){return this.history.previous()||this.history.first()}getNextValue(){return this.history.next()||this.history.last()}},xF=Q,IF=class extends V{constructor(t){super(),this.parent=t,this.onKeyDown=e=>B(this.inputBox.inputElement,Z.KEY_DOWN,i=>{e(new Pe(i))}),this.onMouseDown=e=>B(this.inputBox.inputElement,Z.MOUSE_DOWN,i=>{e(new ji(i))}),this.onDidChange=e=>this.inputBox.onDidChange(e),this.container=z(this.parent,xF(".quick-input-box")),this.inputBox=this._register(new PI(this.container,void 0))}get value(){return this.inputBox.value}set value(t){this.inputBox.value=t}select(t=null){this.inputBox.select(t)}isSelectionAtEnd(){return this.inputBox.isSelectionAtEnd()}get placeholder(){return this.inputBox.inputElement.getAttribute("placeholder")||""}set placeholder(t){this.inputBox.setPlaceHolder(t)}get ariaLabel(){return this.inputBox.getAriaLabel()}set ariaLabel(t){this.inputBox.setAriaLabel(t)}get password(){return this.inputBox.inputElement.type==="password"}set password(t){this.inputBox.inputElement.type=t?"password":"text"}setAttribute(t,e){this.inputBox.inputElement.setAttribute(t,e)}removeAttribute(t){this.inputBox.inputElement.removeAttribute(t)}showDecoration(t){t===it.Ignore?this.inputBox.hideMessage():this.inputBox.showMessage({type:t===it.Info?1:t===it.Warning?2:3,content:""})}stylesForType(t){return this.inputBox.stylesForType(t===it.Info?1:t===it.Warning?2:3)}setFocus(){this.inputBox.focus()}layout(){this.inputBox.layout()}style(t){this.inputBox.style(t)}},Du=class BI{constructor(e,i){var n;this.text="",this.title="",this.highlights=[],this.didEverRender=!1,this.supportIcons=(n=i?.supportIcons)!==null&&n!==void 0?n:!1,this.domNode=z(e,Q("span.monaco-highlighted-label"))}get element(){return this.domNode}set(e,i=[],n="",s){e||(e=""),s&&(e=BI.escapeNewLines(e,i)),!(this.didEverRender&&this.text===e&&this.title===n&&ki(this.highlights,i))&&(this.text=e,this.title=n,this.highlights=i,this.render())}render(){const e=[];let i=0;for(const n of this.highlights){if(n.end===n.start)continue;if(i<n.start){const o=this.text.substring(i,n.start);e.push(Q("span",void 0,...this.supportIcons?Jl(o):[o])),i=n.end}const s=this.text.substring(n.start,n.end),r=Q("span.highlight",void 0,...this.supportIcons?Jl(s):[s]);n.extraClasses&&r.classList.add(...n.extraClasses),e.push(r),i=n.end}if(i<this.text.length){const n=this.text.substring(i);e.push(Q("span",void 0,...this.supportIcons?Jl(n):[n]))}Gu(this.domNode,...e),this.title?this.domNode.title=this.title:this.domNode.removeAttribute("title"),this.didEverRender=!0}static escapeNewLines(e,i){let n=0,s=0;return e.replace(/\r\n|\r|\n/g,(r,o)=>{s=r===`\r
544`?-1:0,o+=n;for(const a of i)a.end<=o||(a.start>=o&&(a.start+=s),a.end>=o&&(a.end+=s));return n+=s,"⏎"})}},EF=class{constructor(t="",e=!1){var i,n,s;if(this.value=t,typeof this.value!="string")throw Q1("value");typeof e=="boolean"?(this.isTrusted=e,this.supportThemeIcons=!1,this.supportHtml=!1):(this.isTrusted=(i=e.isTrusted)!==null&&i!==void 0?i:void 0,this.supportThemeIcons=(n=e.supportThemeIcons)!==null&&n!==void 0?n:!1,this.supportHtml=(s=e.supportHtml)!==null&&s!==void 0?s:!1)}appendText(t,e=0){return this.value+=NF(this.supportThemeIcons?A6(t):t).replace(/([ \t]+)/g,(i,n)=>"&nbsp;".repeat(n.length)).replace(/\>/gm,"\\>").replace(/\n/g,e===1?`\\
545`:`
546
547`),this}
547appendMarkdown(t){return this.value+=t,this}appendCodeblock(t,e){return this.value+="\n```",this.value+=t,this.value+=`
548`,this.value+=e,this.value+="\n```\n",this}};function DF(t){return t instanceof EF?!0:t&&typeof t=="object"?typeof t.value=="string"&&(typeof t.isTrusted=="boolean"||t.isTrusted===void 0)&&(typeof t.supportThemeIcons=="boolean"||t.supportThemeIcons===void 0):!1}function NF(t){return t.replace(/[\\`*_{}[\]()#+\-!]/g,"\\$&")}var i1=function(t,e,i,n){function s(r){return r instanceof i?r:new i(function(o){o(r)})}return new(i||(i=Promise))(function(r,o){function a(c){try{h(n.next(c))}catch(d){o(d)}}function l(c){try{h(n.throw(c))}catch(d){o(d)}}function h(c){c.done?r(c.value):s(c.value).then(a,l)}h((n=n.apply(t,e||[])).next())})};function TF(t,e){_n(e)?t.title=bI(e):e?.markdownNotSupportedFallback?t.title=e.markdownNotSupportedFallback:t.removeAttribute("title")}var MF=class{constructor(t,e,i){this.hoverDelegate=t,this.target=e,this.fadeInAnimation=i}update(t,e){var i;return i1(this,void 0,void 0,function*(){if(this._cancellationTokenSource&&(this._cancellationTokenSource.dispose(!0),this._cancellationTokenSource=void 0),this.isDisposed)return;let n;if(t===void 0||_n(t)||t instanceof HTMLElement)n=t;else if(!Ad(t.markdown))n=(i=t.markdown)!==null&&i!==void 0?i:t.markdownNotSupportedFallback;else{this._hoverWidget||this.show(p("iconLabel.loading","Loading..."),e),this._cancellationTokenSource=new Ba;const s=this._cancellationTokenSource.token;if(n=yield t.markdown(s),n===void 0&&(n=t.markdownNotSupportedFallback),this.isDisposed||s.isCancellationRequested)return}this.show(n,e)})}show(t,e){const i=this._hoverWidget;if(this.hasContent(t)){const n={content:t,target:this.target,showPointer:this.hoverDelegate.placement==="element",hoverPosition:2,skipFadeInAnimation:!this.fadeInAnimation||!!i};this._hoverWidget=this.hoverDelegate.showHover(n,e)}i?.dispose()}hasContent(t){return t?DF(t)?!!t.value:!0:!1}get isDisposed(){var t;return(t=this._hoverWidget)===null||t===void 0?void 0:t.isDisposed}dispose(){var t,e;(t=this._hoverWidget)===null||t===void 0||t.dispose(),(e=this._cancellationTokenSource)===null||e===void 0||e.dispose(!0),this._cancellationTokenSource=void 0}};function RF(t,e,i){let n,s;const r=(h,c)=>{var d;h&&(s?.dispose(),s=void 0),c&&(n?.dispose(),n=void 0),(d=t.onDidHideHover)===null||d===void 0||d.call(t)},o=(h,c,d)=>new jn(()=>i1(this,void 0,void 0,function*(){(!s||s.isDisposed)&&(s=new MF(t,d||e,h>0),yield s.update(i,c))}),h),a=()=>{if(n)return;const h=new ne,c=g=>r(!1,g.fromElement===e);h.add(B(e,Z.MOUSE_LEAVE,c,!0));const d=()=>r(!0,!0);h.add(B(e,Z.MOUSE_DOWN,d,!0));const u={targetElements:[e],dispose:()=>{}};if(t.placement===void 0||t.placement==="mouse"){const g=m=>u.x=m.x+10;h.add(B(e,Z.MOUSE_MOVE,g,!0))}h.add(o(t.delay,!1,u)),n=h},l=B(e,Z.MOUSE_OVER,a,!0);return{show:h=>{r(!1,!0),o(0,h)},hide:()=>{r(!0,!0)},update:h=>i1(this,void 0,void 0,function*(){i=h,yield s?.update(i)}),dispose:()=>{l.dispose(),r(!0,!0)}}}var Fg=class{constructor(t){this._element=t}get element(){return this._element}set textContent(t){this.disposed||t===this._textContent||(this._textContent=t,this._element.textContent=t)}set className(t){this.disposed||t===this._className||(this._className=t,this._element.className=t)}set empty(t){this.disposed||t===this._empty||(this._empty=t,this._element.style.marginLeft=t?"0":"")}dispose(){this.disposed=!0}},fS=class extends V{constructor(t,e){super(),this.customHovers=new Map,this.domNode=this._register(new Fg(z(t,Q(".monaco-icon-label")))),this.labelContainer=z(this.domNode.element,Q(".monaco-icon-label-container"));const i=z(this.labelContainer,Q("span.monaco-icon-name-container"));this.descriptionContainer=this._register(new Fg(z(this.labelContainer,Q("span.monaco-icon-description-container")))),e?.supportHighlights||e?.supportIcons?this.nameNode=new PF(i,!!e.supportIcons):this.nameNode=new AF(i),e?.supportDescriptionHighlights?this.descriptionNodeFactory=()=>new Du(z(this.descriptionContainer.element,Q("span.label-description")),{supportIcons:!!e.supportIcons}):this.descriptionNodeFactory=()=>this._register(new Fg(z(this.descriptionContainer.element,Q("span.label-description")))),this.hoverDelegate=e?.hoverDelegate}
548get element(){return this.domNode.element}setLabel(t,e,i){const n=["monaco-icon-label"];i&&(i.extraClasses&&n.push(...i.extraClasses),i.italic&&n.push("italic"),i.strikethrough&&n.push("strikethrough")),this.domNode.className=n.join(" "),this.setupHover(i?.descriptionTitle?this.labelContainer:this.element,i?.title),this.nameNode.setLabel(t,i),(e||this.descriptionNode)&&(this.descriptionNode||(this.descriptionNode=this.descriptionNodeFactory()),this.descriptionNode instanceof Du?(this.descriptionNode.set(e||"",i?i.descriptionMatches:void 0),this.setupHover(this.descriptionNode.element,i?.descriptionTitle)):(this.descriptionNode.textContent=e||"",this.setupHover(this.descriptionNode.element,i?.descriptionTitle||""),this.descriptionNode.empty=!e))}setupHover(t,e){const i=this.customHovers.get(t);if(i&&(i.dispose(),this.customHovers.delete(t)),!e){t.removeAttribute("title");return}if(!this.hoverDelegate)TF(t,e);else{const n=RF(this.hoverDelegate,t,e);n&&this.customHovers.set(t,n)}}dispose(){super.dispose();for(const t of this.customHovers.values())t.dispose();this.customHovers.clear()}},AF=class{constructor(t){this.container=t,this.label=void 0,this.singleLabel=void 0}setLabel(t,e){if(!(this.label===t&&ki(this.options,e)))if(this.label=t,this.options=e,typeof t=="string")this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=z(this.container,Q("a.label-name",{id:e?.domId}))),this.singleLabel.textContent=t;else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;for(let i=0;i<t.length;i++){const n=t[i],s=e?.domId&&`${e?.domId}_${i}`;z(this.container,Q("a.label-name",{id:s,"data-icon-label-count":t.length,"data-icon-label-index":i,role:"treeitem"},n)),i<t.length-1&&z(this.container,Q("span.label-separator",void 0,e?.separator||"/"))}}}};function OF(t,e,i){if(!i)return;let n=0;return t.map(s=>{const r={start:n,end:n+s.length},o=i.map(a=>wt.intersect(r,a)).filter(a=>!wt.isEmpty(a)).map(({start:a,end:l})=>({start:a-n,end:l-n}));return n=r.end+e.length,o})}var PF=class{constructor(t,e){this.container=t,this.supportIcons=e,this.label=void 0,this.singleLabel=void 0}setLabel(t,e){if(!(this.label===t&&ki(this.options,e)))if(this.label=t,this.options=e,typeof t=="string")this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=new Du(z(this.container,Q("a.label-name",{id:e?.domId})),{supportIcons:this.supportIcons})),this.singleLabel.set(t,e?.matches,void 0,e?.labelEscapeNewLines);else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;const i=e?.separator||"/",n=OF(t,i,e?.matches);for(let s=0;s<t.length;s++){const r=t[s],o=n?n[s]:void 0,a=e?.domId&&`${e?.domId}_${s}`,l=Q("a.label-name",{id:a,"data-icon-label-count":t.length,"data-icon-label-index":s,role:"treeitem"});new Du(z(this.container,l),{supportIcons:this.supportIcons}).set(r,o,void 0,e?.labelEscapeNewLines),s<t.length-1&&z(l,Q("span.label-separator",void 0,i))}}}},Rc=Q,FF=class VI{constructor(e,i,n){this.os=i,this.keyElements=new Set,this.options=n||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=z(e,Rc(".monaco-keybinding")),this.didEverRender=!1,e.appendChild(this.domNode)}get element(){return this.domNode}set(e,i){this.didEverRender&&this.keybinding===e&&VI.areSame(this.matches,i)||(this.keybinding=e,this.matches=i,this.render())}render(){if(this.clear(),this.keybinding){let[e,i]=this.keybinding.getParts();e&&this.renderPart(this.domNode,e,this.matches?this.matches.firstPart:null),i&&(z(this.domNode,Rc("span.monaco-keybinding-key-chord-separator",void 0," ")),this.renderPart(this.domNode,i,this.matches?this.matches.chordPart:null)),this.domNode.title=this.keybinding.getAriaLabel()||""}
548else this.options&&this.options.renderUnboundKeybindings&&this.renderUnbound(this.domNode);this.applyStyles(),this.didEverRender=!0}clear(){Ei(this.domNode),this.keyElements.clear()}renderPart(e,i,n){const s=rI.modifierLabels[this.os];i.ctrlKey&&this.renderKey(e,s.ctrlKey,!!n?.ctrlKey,s.separator),i.shiftKey&&this.renderKey(e,s.shiftKey,!!n?.shiftKey,s.separator),i.altKey&&this.renderKey(e,s.altKey,!!n?.altKey,s.separator),i.metaKey&&this.renderKey(e,s.metaKey,!!n?.metaKey,s.separator);const r=i.keyLabel;r&&this.renderKey(e,r,!!n?.keyCode,"")}renderKey(e,i,n,s){z(e,this.createKeyElement(i,n?".highlight":"")),s&&z(e,Rc("span.monaco-keybinding-key-separator",void 0,s))}renderUnbound(e){z(e,this.createKeyElement(p("unbound","Unbound")))}createKeyElement(e,i=""){const n=Rc("span.monaco-keybinding-key"+i,void 0,e);return this.keyElements.add(n),n}style(e){this.labelBackground=e.keybindingLabelBackground,this.labelForeground=e.keybindingLabelForeground,this.labelBorder=e.keybindingLabelBorder,this.labelBottomBorder=e.keybindingLabelBottomBorder,this.labelShadow=e.keybindingLabelShadow,this.applyStyles()}applyStyles(){var e;if(this.element){for(const i of this.keyElements)this.labelBackground&&(i.style.backgroundColor=(e=this.labelBackground)===null||e===void 0?void 0:e.toString()),this.labelBorder&&(i.style.borderColor=this.labelBorder.toString()),this.labelBottomBorder&&(i.style.borderBottomColor=this.labelBottomBorder.toString()),this.labelShadow&&(i.style.boxShadow=`inset 0 -1px 0 ${this.labelShadow}`);this.labelForeground&&(this.element.style.color=this.labelForeground.toString())}}static areSame(e,i){return e===i||!e&&!i?!0:!!e&&!!i&&ki(e.firstPart,i.firstPart)&&ki(e.chordPart,i.chordPart)}},gS=new ju(()=>{const t=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});return{collator:t,collatorIsNumeric:t.resolvedOptions().numeric}});new ju(()=>({collator:new Intl.Collator(void 0,{numeric:!0})}));new ju(()=>({collator:new Intl.Collator(void 0,{numeric:!0,sensitivity:"accent"})}));function BF(t,e,i=!1){const n=t||"",s=e||"",r=gS.value.collator.compare(n,s);return gS.value.collatorIsNumeric&&r===0&&n!==s?n<s?-1:1:r}function VF(t,e,i){const n=t.toLowerCase(),s=e.toLowerCase(),r=WF(t,e,i);if(r)return r;const o=n.endsWith(i);if(o!==s.endsWith(i))return o?-1:1;const a=BF(n,s);return a!==0?a:n.localeCompare(s)}function WF(t,e,i){const n=t.toLowerCase(),s=e.toLowerCase(),r=n.startsWith(i),o=s.startsWith(i);if(r!==o)return r?-1:1;if(r&&o){if(n.length<s.length)return-1;if(n.length>s.length)return 1}return 0}var WI=function(t,e,i,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r},HF=function(t,e,i,n){function s(r){return r instanceof i?r:new i(function(o){o(r)})}return new(i||(i=Promise))(function(r,o){function a(c){try{h(n.next(c))}catch(d){o(d)}}function l(c){try{h(n.throw(c))}catch(d){o(d)}}function h(c){c.done?r(c.value):s(c.value).then(a,l)}h((n=n.apply(t,e||[])).next())})},En=Q,zF=class{constructor(t){this.hidden=!1,this._onChecked=new M,this.onChecked=this._onChecked.event,Object.assign(this,t)}get checked(){return!!this._checked}set checked(t){t!==this._checked&&(this._checked=t,this._onChecked.fire(t))}dispose(){this._onChecked.dispose()}},p0=class HI{get templateId(){return HI.ID}renderTemplate(e){const i=Object.create(null);i.toDisposeElement=[],i.toDisposeTemplate=[],i.entry=z(e,En(".quick-input-list-entry"));const n=z(i.entry,En("label.quick-input-list-label"));i.toDisposeTemplate.push(gi(n,Z.CLICK,h=>{i.checkbox.offsetParent||h.preventDefault()})),i.checkbox=z(n,En("input.quick-input-list-checkbox")),i.checkbox.type="checkbox",i.toDisposeTemplate.push(gi(i.checkbox,Z.CHANGE,h=>{i.element.checked=i.checkbox.checked}));const s=z(n,En(".quick-input-list-rows")),r=z(s,En(".quick-input-list-row")),o=z(s,En(".quick-input-list-row"));i.label=new fS(r,{supportHighlights:!0,supportDescriptionHighlights:!0,supportIcons:!0});const a=z(r,En(".quick-input-list-entry-keybinding"));i.keybinding=new FF(a,Hi);const l=z(o,En(".quick-input-list-label-meta"));return i.detail=new fS(l,{supportHighlights:!0,supportIcons:!0}),i.separator=z(i.entry,En(".quick-input-list-separator")),i.actionBar=new Ma(i.entry),i.actionBar.domNode.classList.add("quick-input-list-entry-action-bar"),i.toDisposeTemplate.push(i.actionBar),i}renderElement(e,i,n){n.toDisposeElement=De(n.toDisposeElement),n.element=e,n.checkbox.checked=e.checked,n.toDisposeElement.push(e.onChecked(h=>n.checkbox.checked=h));const{labelHighlights:s,descriptionHighlights:r,detailHighlights:o}=e,a=Object.create(null);
548a.matches=s||[],a.descriptionTitle=e.saneDescription,a.descriptionMatches=r||[],a.extraClasses=e.item.iconClasses,a.italic=e.item.italic,a.strikethrough=e.item.strikethrough,n.label.setLabel(e.saneLabel,e.saneDescription,a),n.keybinding.set(e.item.keybinding),e.saneDetail&&n.detail.setLabel(e.saneDetail,void 0,{matches:o,title:e.saneDetail}),e.separator&&e.separator.label?(n.separator.textContent=e.separator.label,n.separator.style.display=""):n.separator.style.display="none",n.entry.classList.toggle("quick-input-list-separator-border",!!e.separator),n.actionBar.clear();const l=e.item.buttons;l&&l.length?(n.actionBar.push(l.map((h,c)=>{let d=h.iconClass||(h.iconPath?e1(h.iconPath):void 0);h.alwaysVisible&&(d=d?`${d} always-visible`:"always-visible");const u=new An(`id-${c}`,"",d,!0,()=>HF(this,void 0,void 0,function*(){e.fireButtonTriggered({button:h,item:e.item})}));return u.tooltip=h.tooltip||"",u}),{icon:!0,label:!1}),n.entry.classList.add("has-actions")):n.entry.classList.remove("has-actions")}disposeElement(e,i,n){n.toDisposeElement=De(n.toDisposeElement)}disposeTemplate(e){e.toDisposeElement=De(e.toDisposeElement),e.toDisposeTemplate=De(e.toDisposeTemplate)}};p0.ID="listelement";var UF=class{getHeight(t){return t.saneDetail?44:22}getTemplateId(t){return p0.ID}},ze;(function(t){t[t.First=1]="First",t[t.Second=2]="Second",t[t.Last=3]="Last",t[t.Next=4]="Next",t[t.Previous=5]="Previous",t[t.NextPage=6]="NextPage",t[t.PreviousPage=7]="PreviousPage"})(ze||(ze={}));var _0=class{constructor(t,e,i){this.parent=t,this.inputElements=[],this.elements=[],this.elementsToIndexes=new Map,this.matchOnDescription=!1,this.matchOnDetail=!1,this.matchOnLabel=!0,this.matchOnMeta=!0,this.sortByLabel=!0,this._onChangedAllVisibleChecked=new M,this.onChangedAllVisibleChecked=this._onChangedAllVisibleChecked.event,this._onChangedCheckedCount=new M,this.onChangedCheckedCount=this._onChangedCheckedCount.event,this._onChangedVisibleCount=new M,this.onChangedVisibleCount=this._onChangedVisibleCount.event,this._onChangedCheckedElements=new M,this.onChangedCheckedElements=this._onChangedCheckedElements.event,this._onButtonTriggered=new M,this.onButtonTriggered=this._onButtonTriggered.event,this._onKeyDown=new M,this.onKeyDown=this._onKeyDown.event,this._onLeave=new M,this.onLeave=this._onLeave.event,this._fireCheckedEvents=!0,this.elementDisposables=[],this.disposables=[],this.id=e,this.container=z(this.parent,En(".quick-input-list"));const n=new UF,s=new KF;this.list=i.createList("QuickInput",this.container,n,[new p0],{identityProvider:{getId:r=>r.saneLabel},setRowLineHeight:!1,multipleSelectionSupport:!1,horizontalScrolling:!1,accessibilityProvider:s}),this.list.getHTMLElement().id=e,this.disposables.push(this.list),this.disposables.push(this.list.onKeyDown(r=>{const o=new Pe(r);switch(o.keyCode){case 10:this.toggleCheckbox();break;case 31:(fe?r.metaKey:r.ctrlKey)&&this.list.setFocus(At(this.list.length));break;case 16:{const a=this.list.getFocus();a.length===1&&a[0]===0&&this._onLeave.fire();break}case 18:{const a=this.list.getFocus();a.length===1&&a[0]===this.list.length-1&&this._onLeave.fire();break}}this._onKeyDown.fire(o)})),this.disposables.push(this.list.onMouseDown(r=>{r.browserEvent.button!==2&&r.browserEvent.preventDefault()})),this.disposables.push(B(this.container,Z.CLICK,r=>{(r.x||r.y)&&this._onLeave.fire()})),this.disposables.push(this.list.onMouseMiddleClick(r=>{this._onLeave.fire()})),this.disposables.push(this.list.onContextMenu(r=>{typeof r.index=="number"&&(r.browserEvent.preventDefault(),this.list.setSelection([r.index]))})),this.disposables.push(this._onChangedAllVisibleChecked,this._onChangedCheckedCount,this._onChangedVisibleCount,this._onChangedCheckedElements,this._onButtonTriggered,this._onLeave,this._onKeyDown)}get onDidChangeFocus(){return $.map(this.list.onDidChangeFocus,t=>t.elements.map(e=>e.item))}get onDidChangeSelection(){return $.map(this.list.onDidChangeSelection,t=>({items:t.elements.map(e=>e.item),event:t.browserEvent}))}get scrollTop(){return this.list.scrollTop}set scrollTop(t){this.list.scrollTop=t}getAllVisibleChecked(){return this.allVisibleChecked(this.elements,!1)}allVisibleChecked(t,e=!0){for(let i=0,n=t.length;i<n;i++){const s=t[i];if(!s.hidden)if(s.checked)e=!0;else return!1}return e}getCheckedCount(){let t=0;const e=this.elements;for(let i=0,n=e.length;i<n;i++)e[i].checked&&t++;return t}getVisibleCount(){let t=0;const e=this.elements;for(let i=0,n=e.length;i<n;i++)e[i].hidden||t++;return t}setAllVisibleChecked(t){try{this._fireCheckedEvents=!1,this.elements.forEac
548h(e=>{e.hidden||(e.checked=t)})}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}setElements(t){this.elementDisposables=De(this.elementDisposables);const e=i=>this.fireButtonTriggered(i);this.inputElements=t,this.elements=t.reduce((i,n,s)=>{var r,o,a;if(n.type!=="separator"){const l=s&&t[s-1],h=n.label&&n.label.replace(/\r?\n/g," "),c=n.meta&&n.meta.replace(/\r?\n/g," "),d=n.description&&n.description.replace(/\r?\n/g," "),u=n.detail&&n.detail.replace(/\r?\n/g," "),g=n.ariaLabel||[h,d,u].map(_=>N4(_)).filter(_=>!!_).join(", "),m=this.parent.classList.contains("show-checkboxes");i.push(new zF({hasCheckbox:m,index:s,item:n,saneLabel:h,saneMeta:c,saneAriaLabel:g,saneDescription:d,saneDetail:u,labelHighlights:(r=n.highlights)===null||r===void 0?void 0:r.label,descriptionHighlights:(o=n.highlights)===null||o===void 0?void 0:o.description,detailHighlights:(a=n.highlights)===null||a===void 0?void 0:a.detail,checked:!1,separator:l&&l.type==="separator"?l:void 0,fireButtonTriggered:e}))}return i},[]),this.elementDisposables.push(...this.elements),this.elementDisposables.push(...this.elements.map(i=>i.onChecked(()=>this.fireCheckedEvents()))),this.elementsToIndexes=this.elements.reduce((i,n,s)=>(i.set(n.item,s),i),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(t=>t.item)}setFocusedElements(t){if(this.list.setFocus(t.filter(e=>this.elementsToIndexes.has(e)).map(e=>this.elementsToIndexes.get(e))),t.length>0){const e=this.list.getFocus()[0];typeof e=="number"&&this.list.reveal(e)}}getActiveDescendant(){return this.list.getHTMLElement().getAttribute("aria-activedescendant")}setSelectedElements(t){this.list.setSelection(t.filter(e=>this.elementsToIndexes.has(e)).map(e=>this.elementsToIndexes.get(e)))}getCheckedElements(){return this.elements.filter(t=>t.checked).map(t=>t.item)}setCheckedElements(t){try{this._fireCheckedEvents=!1;const e=new Set;for(const i of t)e.add(i);for(const i of this.elements)i.checked=e.has(i.item)}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}set enabled(t){this.list.getHTMLElement().style.pointerEvents=t?"":"none"}focus(t){if(!this.list.length)return;switch(t===ze.Next&&this.list.getFocus()[0]===this.list.length-1&&(t=ze.First),t===ze.Previous&&this.list.getFocus()[0]===0&&(t=ze.Last),t===ze.Second&&this.list.length<2&&(t=ze.First),t){case ze.First:this.list.focusFirst();break;case ze.Second:this.list.focusNth(1);break;case ze.Last:this.list.focusLast();break;case ze.Next:this.list.focusNext();break;case ze.Previous:this.list.focusPrevious();break;case ze.NextPage:this.list.focusNextPage();break;case ze.PreviousPage:this.list.focusPreviousPage()}const e=this.list.getFocus()[0];typeof e=="number"&&this.list.reveal(e)}clearFocus(){this.list.setFocus([])}domFocus(){this.list.domFocus()}layout(t){this.list.getHTMLElement().style.maxHeight=t?`calc(${Math.floor(t/44)*44}px)`:"",this.list.layout()}filter(t){if(!(this.sortByLabel||this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))return this.list.layout(),!1;if(t=t.trim(),!t||!(this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))this.elements.forEach(i=>{i.labelHighlights=void 0,i.descriptionHighlights=void 0,i.detailHighlights=void 0,i.hidden=!1;const n=i.index&&this.inputElements[i.index-1];i.separator=n&&n.type==="separator"?n:void 0});else{let i;this.elements.forEach(n=>{const s=this.matchOnLabel?Br(Mc(t,Tc(n.saneLabel))):void 0,r=this.matchOnDescription?Br(Mc(t,Tc(n.saneDescription||""))):void 0,o=this.matchOnDetail?Br(Mc(t,Tc(n.saneDetail||""))):void 0,a=this.matchOnMeta?Br(Mc(t,Tc(n.saneMeta||""))):void 0;if(s||r||o||a?(n.labelHighlights=s,n.descriptionHighlights=r,n.detailHighlights=o,n.hidden=!1):(n.labelHighlights=void 0,n.descriptionHighlights=void 0,n.detailHighlights=void 0,n.hidden=!n.item.alwaysShow),n.separator=void 0,!this.sortByLabel){const l=n.index&&this.inputElements[n.index-1];i=l&&l.type==="separator"?l:i,i&&!n.hidden&&(n.separator=i,i=void 0)}})}const e=this.elements.filter(i=>!i.hidden);if(this.sortByLabel&&t){const i=t.toLowerCase();e.sort((n,s)=>$F(n,s,i))}return this.elementsToIndexes=e.reduce((i,n,s)=>(i.set(n.item,s),i),new Map),this.list.splice(0,this.list.length,e),this.list.setFocus([]),this.list.layout(),this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedVisibleCount.fire(e.length),!0}toggleCheckbox(){try{this._fireCheckedEvents=!1;const t=this.list.getFocusedElements(),e=this.allVisibleChecked(t);for(const i of t)i.checked=!e}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}display(t){this.container.style.display=t?"":"none"}isDisplayed(){return this.container.style.display!=="none"}dispose(){this.elementDisposables=De(this.elementDisposables),this.disposables=De(this.disposables)}fireCheckedEvents(){this._fireCheckedEvents&&(this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedCheckedCount.fire(this.getCheckedCount()),this._onChangedCheckedElements.fire(this.getCheckedElements()))}fireButtonTriggered(t){this._onButtonTriggered.fire(t)}
548style(t){this.list.style(t)}};WI([tt],_0.prototype,"onDidChangeFocus",null);WI([tt],_0.prototype,"onDidChangeSelection",null);function $F(t,e,i){const n=t.labelHighlights||[],s=e.labelHighlights||[];return n.length&&!s.length?-1:!n.length&&s.length?1:n.length===0&&s.length===0?0:VF(t.saneLabel,e.saneLabel,i)}var KF=class{getWidgetAriaLabel(){return p("quickInput","Quick Input")}getAriaLabel(t){return t.saneAriaLabel}getWidgetRole(){return"listbox"}getRole(t){return t.hasCheckbox?"checkbox":"option"}isChecked(t){if(t.hasCheckbox)return{value:t.checked,onDidChange:t.onChecked}}},mS=function(t,e,i,n){function s(r){return r instanceof i?r:new i(function(o){o(r)})}return new(i||(i=Promise))(function(r,o){function a(c){try{h(n.next(c))}catch(d){o(d)}}function l(c){try{h(n.throw(c))}catch(d){o(d)}}function h(c){c.done?r(c.value):s(c.value).then(a,l)}h((n=n.apply(t,e||[])).next())})},si=Q,n1={iconClass:f.quickInputBack.classNames,tooltip:p("quickInput.back","Back"),handle:-1},zI=class UI extends V{constructor(e){super(),this.ui=e,this.visible=!1,this._enabled=!0,this._busy=!1,this._ignoreFocusOut=!1,this._buttons=[],this.noValidationMessage=UI.noPromptMessage,this._severity=it.Ignore,this.buttonsUpdated=!1,this.onDidTriggerButtonEmitter=this._register(new M),this.onDidHideEmitter=this._register(new M),this.onDisposeEmitter=this._register(new M),this.visibleDisposables=this._register(new ne),this.onDidHide=this.onDidHideEmitter.event}get title(){return this._title}set title(e){this._title=e,this.update()}get description(){return this._description}set description(e){this._description=e,this.update()}get step(){return this._steps}set step(e){this._steps=e,this.update()}get totalSteps(){return this._totalSteps}set totalSteps(e){this._totalSteps=e,this.update()}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this.update()}get contextKey(){return this._contextKey}set contextKey(e){this._contextKey=e,this.update()}get busy(){return this._busy}set busy(e){this._busy=e,this.update()}get ignoreFocusOut(){return this._ignoreFocusOut}set ignoreFocusOut(e){const i=this._ignoreFocusOut!==e&&!Xr;this._ignoreFocusOut=e&&!Xr,i&&this.update()}get buttons(){return this._buttons}set buttons(e){this._buttons=e,this.buttonsUpdated=!0,this.update()}get validationMessage(){return this._validationMessage}set validationMessage(e){this._validationMessage=e,this.update()}get severity(){return this._severity}set severity(e){this._severity=e,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.onDidTriggerButton(e=>{this.buttons.indexOf(e)!==-1&&this.onDidTriggerButtonEmitter.fire(e)})),this.ui.show(this),this.visible=!0,this._lastValidationMessage=void 0,this._lastSeverity=void 0,this.buttons.length&&(this.buttonsUpdated=!0),this.update())}hide(){this.visible&&this.ui.hide()}didHide(e=vh.Other){this.visible=!1,this.visibleDisposables.clear(),this.onDidHideEmitter.fire({reason:e})}update(){if(!this.visible)return;const e=this.getTitle();e&&this.ui.title.textContent!==e?this.ui.title.textContent=e:!e&&this.ui.title.innerHTML!=="&nbsp;"&&(this.ui.title.innerText=" ");const i=this.getDescription();if(this.ui.description1.textContent!==i&&(this.ui.description1.textContent=i),this.ui.description2.textContent!==i&&(this.ui.description2.textContent=i),this.busy&&!this.busyDelay&&(this.busyDelay=new jn,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 s=this.buttons.filter(o=>o===n1);this.ui.leftActionBar.push(s.map((o,a)=>{const l=new An(`id-${a}`,"",o.iconClass||e1(o.iconPath),!0,()=>mS(this,void 0,void 0,function*(){this.onDidTriggerButtonEmitter.fire(o)}));return l.tooltip=o.tooltip||"",l}),{icon:!0,label:!1}),this.ui.rightActionBar.clear();const r=this.buttons.filter(o=>o!==n1);this.ui.rightActionBar.push(r.map((o,a)=>{const l=new An(`id-${a}`,"",o.iconClass||e1(o.iconPath),!0,()=>mS(this,void 0,void 0,function*(){this.onDidTriggerButtonEmitter.f
548ire(o)}));return l.tooltip=o.tooltip||"",l}),{icon:!0,label:!1})}this.ui.ignoreFocusOut=this.ignoreFocusOut,this.ui.setEnabled(this.enabled),this.ui.setContextKey(this.contextKey);const n=this.validationMessage||this.noValidationMessage;this._lastValidationMessage!==n&&(this._lastValidationMessage=n,Gu(this.ui.message,...Jl(n))),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?p("quickInput.steps","{0}/{1}",this.step,this.totalSteps):this.step?String(this.step):""}showMessageDecoration(e){if(this.ui.inputBox.showDecoration(e),e!==it.Ignore){const i=this.ui.inputBox.stylesForType(e);this.ui.message.style.color=i.foreground?`${i.foreground}`:"",this.ui.message.style.backgroundColor=i.background?`${i.background}`:"",this.ui.message.style.border=i.border?`1px solid ${i.border}`:"",this.ui.message.style.marginBottom="-2px"}else this.ui.message.style.color="",this.ui.message.style.backgroundColor="",this.ui.message.style.border="",this.ui.message.style.marginBottom=""}dispose(){this.hide(),this.onDisposeEmitter.fire(),super.dispose()}};zI.noPromptMessage=p("inputModeEntry","Press 'Enter' to confirm your input or 'Escape' to cancel");var s1=class $I extends zI{constructor(){super(...arguments),this._value="",this.onDidChangeValueEmitter=this._register(new M),this.onWillAcceptEmitter=this._register(new M),this.onDidAcceptEmitter=this._register(new M),this.onDidCustomEmitter=this._register(new M),this._items=[],this.itemsUpdated=!1,this._canSelectMany=!1,this._canAcceptInBackground=!1,this._matchOnDescription=!1,this._matchOnDetail=!1,this._matchOnLabel=!0,this._sortByLabel=!0,this._autoFocusOnList=!0,this._keepScrollPosition=!1,this._itemActivation=this.ui.isScreenReaderOptimized()?an.NONE:an.FIRST,this._activeItems=[],this.activeItemsUpdated=!1,this.activeItemsToConfirm=[],this.onDidChangeActiveEmitter=this._register(new M),this._selectedItems=[],this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=[],this.onDidChangeSelectionEmitter=this._register(new M),this.onDidTriggerItemButtonEmitter=this._register(new M),this.valueSelectionUpdated=!0,this._ok="default",this._customButton=!1,this.filterValue=e=>e,this.onDidChangeValue=this.onDidChangeValueEmitter.event,this.onWillAccept=this.onWillAcceptEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event,this.onDidChangeActive=this.onDidChangeActiveEmitter.event,this.onDidChangeSelection=this.onDidChangeSelectionEmitter.event,this.onDidTriggerItemButton=this.onDidTriggerItemButtonEmitter.event}get quickNavigate(){return this._quickNavigate}set quickNavigate(e){this._quickNavigate=e,this.update()}get value(){return this._value}set value(e){this.doSetValue(e)}doSetValue(e,i){this._value!==e&&(this._value=e,i||this.update(),this.visible&&this.ui.list.filter(this.filterValue(this._value))&&this.trySelectFirst(),this.onDidChangeValueEmitter.fire(this._value))}set ariaLabel(e){this._ariaLabel=e,this.update()}get ariaLabel(){return this._ariaLabel}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.update()}get items(){return this._items}get scrollTop(){return this.ui.list.scrollTop}set scrollTop(e){this.ui.list.scrollTop=e}set items(e){this._items=e,this.itemsUpdated=!0,this.update()}get canSelectMany(){return this._canSelectMany}set canSelectMany(e){this._canSelectMany=e,this.update()}get canAcceptInBackground(){return this._canAcceptInBackground}set canAcceptInBackground(e){this._canAcceptInBackground=e}get matchOnDescription(){return this._matchOnDescription}set matchOnDescription(e){this._matchOnDescription=e,this.update()}get matchOnDetail(){return this._matchOnDetail}set matchOnDetail(e){this._matchOnDetail=e,this.update()}get matchOnLabel(){return this._matchOnLabel}set matchOnLabel(e){this._matchOnLabel=e,this.update()}get sortByLabel(){return this._sortByLabel}set sortByLabel(e){this._sortByLabel=e,this.update()}get autoFocusOnList(){return this._autoFocusOnList}set autoFocusOnList(e){this._autoFocusOnList=e,this.update()}get keepScrollPosition(){return this._keepScrollPosition}set keepScrollPosition(e){this._keepScrollPosition=e}get itemActivation(){return this._itemActivation}set itemActivation(e){this._itemActivation=e}get activeItems(){return this._activeItems}set activeItems(e){this._activeItems=e,this.activeItemsUpdated=!0,this.update()}get selectedItems(){return this._selectedItems}set selectedItems(e){this._selectedItems=e,this.selectedItemsUpdated=!0,this.update()}get keyMods(){return this._quickNavigate?pF:this.ui.keyMods}set valueSelection(e){this._valueSelection=e,this.valueSelectionUpdated=!0,this.update()}get customButton(){return this._customButton}set customButton(e){this._customButton=e,this.update()}get customLabel(){return this._customButtonLabel}set customLabel(e){this._customButtonLabel=e,this.update()}get customHover(){return this._customButtonHover}set customHover(e){this._customButtonHover=e,this.update()}get ok(){return this._ok}set ok(e){this._ok=e,this.update()}get hideInput(){return!!this._hideInput}set hideInput(e){this._hideInput=e,this.update()}trySelectFirst(){this.autoFocusOnList&&(this.canSelectMany||this.ui.list.focus(ze.First))}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange(e=>{this.doSetValue(e,!0)})),this.visibleDisposables.add(this.ui.inputBox.onMouseDown(e=>{this.autoFocusOnList||this.ui.list.clearFocus()})),this.visibleDisposables.add((this._hideInput?this.ui.list:this.ui.inputBox).onKeyDown(e=>{switch(e.keyCode){case 18:this.ui.list.focus(ze.Next),this.canSelectMany&&this.ui.list.domFocus(),ye.stop(e,!0);break;case 16:this.ui.list.getFocusedElements().length?this.ui.list.focus(ze.Previous):this.ui.list.focus(ze.Last),this.canSelectMany&&this.ui.list.domFocus(),ye.stop(e,!0);break;case 12:this.ui.list.focus(ze.NextPage),this.canSelectMany&&this.ui.list.domFocus(),ye.stop(e,!0);break;case 11:this.ui.list.focus(ze.PreviousPage),this.canSelectMany&&this.ui.list.domFocus(),ye.stop(e,!0);break;
548case 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:(e.ctrlKey||e.metaKey)&&!e.shiftKey&&!e.altKey&&(this.ui.list.focus(ze.First),ye.stop(e,!0));break;case 13:(e.ctrlKey||e.metaKey)&&!e.shiftKey&&!e.altKey&&(this.ui.list.focus(ze.Last),ye.stop(e,!0))}})),this.visibleDisposables.add(this.ui.onDidAccept(()=>{this.canSelectMany?this.ui.list.getCheckedElements().length||(this._selectedItems=[],this.onDidChangeSelectionEmitter.fire(this.selectedItems)):this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems)),this.handleAccept(!1)})),this.visibleDisposables.add(this.ui.onDidCustom(()=>{this.onDidCustomEmitter.fire()})),this.visibleDisposables.add(this.ui.list.onDidChangeFocus(e=>{this.activeItemsUpdated||this.activeItemsToConfirm!==this._activeItems&&Rn(e,this._activeItems,(i,n)=>i===n)||(this._activeItems=e,this.onDidChangeActiveEmitter.fire(e))})),this.visibleDisposables.add(this.ui.list.onDidChangeSelection(({items:e,event:i})=>{if(this.canSelectMany){e.length&&this.ui.list.setSelectedElements([]);return}this.selectedItemsToConfirm!==this._selectedItems&&Rn(e,this._selectedItems,(n,s)=>n===s)||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e),e.length&&this.handleAccept(i instanceof MouseEvent&&i.button===1))})),this.visibleDisposables.add(this.ui.list.onChangedCheckedElements(e=>{this.canSelectMany&&(this.selectedItemsToConfirm!==this._selectedItems&&Rn(e,this._selectedItems,(i,n)=>i===n)||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e)))})),this.visibleDisposables.add(this.ui.list.onButtonTriggered(e=>this.onDidTriggerItemButtonEmitter.fire(e))),this.visibleDisposables.add(this.registerQuickNavigation()),this.valueSelectionUpdated=!0),super.show()}handleAccept(e){let i=!1;this.onWillAcceptEmitter.fire({veto:()=>i=!0}),i||this.onDidAcceptEmitter.fire({inBackground:e})}registerQuickNavigation(){return B(this.ui.container,Z.KEY_UP,e=>{if(this.canSelectMany||!this._quickNavigate)return;const i=new Pe(e),n=i.keyCode;this._quickNavigate.keybindings.some(s=>{const[r,o]=s.getParts();return o?!1:r.shiftKey&&n===4?!(i.ctrlKey||i.altKey||i.metaKey):!!(r.altKey&&n===6||r.ctrlKey&&n===5||r.metaKey&&n===57)})&&(this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(!1)),this._quickNavigate=void 0)})}update(){if(!this.visible)return;const e=this.keepScrollPosition?this.scrollTop:0,i=!!this._hideInput&&this._items.length>0;this.ui.container.classList.toggle("hidden-input",i&&!this.description);const n={title:!!this.title||!!this.step||!!this.buttons.length,description:!!this.description,checkAll:this.canSelectMany&&!this._hideCheckAll,checkBox:this.canSelectMany,inputBox:!i,progressBar:!i,visibleCount:!0,count:this.canSelectMany,ok:this.ok==="default"?this.canSelectMany:this.ok,list:!0,message:!!this.validationMessage,customButton:this.customButton};this.ui.setVisibilities(n),super.update(),this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.valueSelectionUpdated&&(this.valueSelectionUpdated=!1,this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||"");const s=this.ariaLabel||this.placeholder||$I.DEFAULT_ARIA_LABEL;if(this.ui.inputBox.ariaLabel!==s&&(this.ui.inputBox.ariaLabel=s),this.ui.list.matchOnDescription=this.matchOnDescription,this.ui.list.matchOnDetail=this.matchOnDetail,this.ui.list.matchOnLabel=this.matchOnLabel,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 an.NONE:this._itemActivation=an.FIRST;break;case an.SECOND:this.ui.list.focus(ze.Second),this._itemActivation=an.FIRST;break;case an.LAST:this.ui.list.focus(ze.Last),this._itemActivation=an.FIRST;break;default:this.trySelectFirst()}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),n.inputBox||(this.ui.list.domFocus(),this.canSelectMany&&this.ui.list.focus(ze.First)),this.keepScrollPosition&&(this.scrollTop=e)}};s1.DEFAULT_ARIA_LABEL=p("quickInputBox.ariaLabel","Type to narrow down results.");var KI=class jI extends V{constructor(e){super(),this.options=e,this.comboboxAccessibility=!1,this.enabled=!0,this.onDidAcceptEmitter=this._register(new M),this.onDidCustomEmitter=this._register(new M),this.onDidTriggerButtonEmitter=this._register(new M),this.keyMods={ctrlCmd:!1,alt:!1},this.controller=null,this.onShowEmitter=this._register(new M),this.onShow=this.onShowEmitter.event,this.onHideEmitter=this._register(new M),this.onHide=this.onHideEmitter.event,this.idPrefix=e.idPrefix,this.parentElement=e.container,this.styles=e.styles,this.registerKeyModsListeners()}registerKeyModsListeners(){const e=i=>{this.keyMods.ctrlCmd=i.ctrlKey||i.metaKey,this.keyMods.alt=i.altKey};this._register(B(window,Z.KEY_DOWN,e,!0)),this._register(B(window,Z.KEY_UP,e,!0)),this._register(B(window,Z.MOUSE_DOWN,e,!0))}getUI(){if(this.ui)return this.ui;const e=z(this.parentElement,si(".quick-input-widget.show-file-icons"));e.tabIndex=-1,e.style.display="none";const i=Yi(e),n=z(e,si(".quick-input-titlebar")),s=this._register(new Ma(n));s.domNode.classList.add("quick-input-left-action-bar");const r=z(n,si(".quick-input-title")),o=this._register(new Ma(n));o.domNode.classList.add("quick-input-right-action-bar");const a=z(e,si(".quick-input-description")),l=z(e,si(".quick-input-header")),h=z(l,si("input.quick-input-c
548heck-all"));h.type="checkbox",this._register(gi(h,Z.CHANGE,R=>{const D=h.checked;L.setAllVisibleChecked(D)})),this._register(B(h,Z.CLICK,R=>{(R.x||R.y)&&g.setFocus()}));const c=z(l,si(".quick-input-description")),d=z(l,si(".quick-input-and-message")),u=z(d,si(".quick-input-filter")),g=this._register(new IF(u));g.setAttribute("aria-describedby",`${this.idPrefix}message`);const m=z(u,si(".quick-input-visible-count"));m.setAttribute("aria-live","polite"),m.setAttribute("aria-atomic","true");const _=new hS(m,{countFormat:p({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")}),C=z(u,si(".quick-input-count"));C.setAttribute("aria-live","polite");const w=new hS(C,{countFormat:p({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")}),v=z(l,si(".quick-input-action")),b=new lS(v);b.label=p("ok","OK"),this._register(b.onDidClick(R=>{this.onDidAcceptEmitter.fire()}));const y=z(l,si(".quick-input-action")),k=new lS(y);k.label=p("custom","Custom"),this._register(k.onDidClick(R=>{this.onDidCustomEmitter.fire()}));const S=z(d,si(`#${this.idPrefix}message.quick-input-message`)),L=this._register(new _0(e,this.idPrefix+"list",this.options));this._register(L.onChangedAllVisibleChecked(R=>{h.checked=R})),this._register(L.onChangedVisibleCount(R=>{_.setCount(R)})),this._register(L.onChangedCheckedCount(R=>{w.setCount(R)})),this._register(L.onLeave(()=>{setTimeout(()=>{g.setFocus(),this.controller instanceof s1&&this.controller.canSelectMany&&L.clearFocus()},0)})),this._register(L.onDidChangeFocus(()=>{this.comboboxAccessibility&&this.getUI().inputBox.setAttribute("aria-activedescendant",this.getUI().list.getActiveDescendant()||"")}));const x=new TI(e);x.getContainer().classList.add("quick-input-progress");const E=xa(e);return this._register(E),this._register(B(e,Z.FOCUS,R=>{this.previousFocusElement=R.relatedTarget instanceof HTMLElement?R.relatedTarget:void 0},!0)),this._register(E.onDidBlur(()=>{!this.getUI().ignoreFocusOut&&!this.options.ignoreFocusOut()&&this.hide(vh.Blur),this.previousFocusElement=void 0})),this._register(B(e,Z.FOCUS,R=>{g.setFocus()})),this._register(B(e,Z.KEY_DOWN,R=>{const D=new Pe(R);switch(D.keyCode){case 3:ye.stop(R,!0),this.onDidAcceptEmitter.fire();break;case 9:ye.stop(R,!0),this.hide(vh.Gesture);break;case 2:if(!D.altKey&&!D.ctrlKey&&!D.metaKey){const W=[".action-label.codicon"];e.classList.contains("show-checkboxes")?W.push("input"):W.push("input[type=text]"),this.getUI().list.isDisplayed()&&W.push(".monaco-list");const P=e.querySelectorAll(W.join(", "));D.shiftKey&&D.target===P[0]?(ye.stop(R,!0),P[P.length-1].focus()):!D.shiftKey&&D.target===P[P.length-1]&&(ye.stop(R,!0),P[0].focus())}}})),this.ui={container:e,styleSheet:i,leftActionBar:s,titleBar:n,title:r,description1:a,description2:c,rightActionBar:o,checkAll:h,filterContainer:u,inputBox:g,visibleCountContainer:m,visibleCount:_,countContainer:C,count:w,okContainer:v,ok:b,message:S,customButtonContainer:y,customButton:k,list:L,progressBar:x,onDidAccept:this.onDidAcceptEmitter.event,onDidCustom:this.onDidCustomEmitter.event,onDidTriggerButton:this.onDidTriggerButtonEmitter.event,ignoreFocusOut:!1,keyMods:this.keyMods,isScreenReaderOptimized:()=>this.options.isScreenReaderOptimized(),show:R=>this.show(R),hide:()=>this.hide(),setVisibilities:R=>this.setVisibilities(R),setComboboxAccessibility:R=>this.setComboboxAccessibility(R),setEnabled:R=>this.setEnabled(R),setContextKey:R=>this.options.setContextKey(R)},this.updateStyles(),this.ui}pick(e,i={},n=ti.None){return new Promise((s,r)=>{let o=c=>{o=s,i.onKeyMods&&i.onKeyMods(a.keyMods),s(c)};if(n.isCancellationRequested){o(void 0);return}const a=this.createQuickPick();let l;const h=[a,a.onDidAccept(()=>{if(a.canSelectMany)o(a.selectedItems.slice()),a.hide();else{const c=a.activeItems[0];c&&(o(c),a.hide())}}),a.onDidChangeActive(c=>{const d=c[0];d&&i.onDidFocus&&i.onDidFocus(d)}),a.onDidChangeSelection(c=>{if(!a.canSelectMany){const d=c[0];d&&(o(d),a.hide())}}),a.onDidTriggerItemButton(c=>i.onDidTriggerItemButton&&i.onDidTriggerItemButton(Object.assign(Object.assign({},c),{removeItem:()=>{const d=a.items.indexOf(c.item);if(d!==-1){const u=a.items.slice(),g=u.splice(d,1),m=a.activeItems.filter(C=>C!==g[0]),_=a.keepScrollPosition;a.keepScrollPosition=!0,a.items=u,m&&(a.activeItems=m),a.keepScrollPosition=_}}}))),a.onDidChangeValue(c=>{l&&!c&&(a.activeItems.length!==1||a.activeItems[0]!==l)&&(a.activeItems=[l])}),n.onCancellationRequested(()=>{a.hide()}),a.onDidHide(()=>{De(h),o(void 0)})];a.title=i.title,a.canSelectMany=!!i.canPickMany,a.placeholder=i.placeHolder,a.ignoreFocusOut=!!i.ignoreFocusLost,a.matchOnDescription=!!i.matchOnDescription,a.matchOnDetail=!!i.matchOnDetail,a.matchOnLabel=i.matchOnLabel===void 0||i.matchOnLabel,a.autoFocusOnList=i.autoFocusOnList===void 0||i.autoFocusOnList,a.quickNavigate=i.quickNavigate,a.contextKey=i.contextKey,a.busy=!0,Promise.all([e,i.activeItem]).then(([c,d])=>{l=d,a.busy=!1,a.items=c,a.canSelectMany&&(a.selectedItems=c.filter(u=>u.type!=="separator"&&u.picked)),l&&(a.activeItems=[l])}),a.show(),Promise.resolve(e).then(void 0,c=>{r(c),a.hide()})})}createQuickPick(){const e=this.getUI();return new s1(e)}show(e){const i=this.getUI();
548this.onShowEmitter.fire();const n=this.controller;this.controller=e,n&&n.didHide(),this.setEnabled(!0),i.leftActionBar.clear(),i.title.textContent="",i.description1.textContent="",i.description2.textContent="",i.rightActionBar.clear(),i.checkAll.checked=!1,i.inputBox.placeholder="",i.inputBox.password=!1,i.inputBox.showDecoration(it.Ignore),i.visibleCount.setCount(0),i.count.setCount(0),Gu(i.message),i.progressBar.stop(),i.list.setElements([]),i.list.matchOnDescription=!1,i.list.matchOnDetail=!1,i.list.matchOnLabel=!0,i.list.sortByLabel=!0,i.ignoreFocusOut=!1,this.setComboboxAccessibility(!1),i.inputBox.ariaLabel="";const s=this.options.backKeybindingLabel();n1.tooltip=s?p("quickInput.backWithKeybinding","Back ({0})",s):p("quickInput.back","Back"),i.container.style.display="",this.updateLayout(),i.inputBox.setFocus()}setVisibilities(e){const i=this.getUI();i.title.style.display=e.title?"":"none",i.description1.style.display=e.description&&(e.inputBox||e.checkAll)?"":"none",i.description2.style.display=e.description&&!(e.inputBox||e.checkAll)?"":"none",i.checkAll.style.display=e.checkAll?"":"none",i.filterContainer.style.display=e.inputBox?"":"none",i.visibleCountContainer.style.display=e.visibleCount?"":"none",i.countContainer.style.display=e.count?"":"none",i.okContainer.style.display=e.ok?"":"none",i.customButtonContainer.style.display=e.customButton?"":"none",i.message.style.display=e.message?"":"none",i.progressBar.getContainer().style.display=e.progressBar?"":"none",i.list.display(!!e.list),i.container.classList[e.checkBox?"add":"remove"]("show-checkboxes"),this.updateLayout()}setComboboxAccessibility(e){if(e!==this.comboboxAccessibility){const i=this.getUI();this.comboboxAccessibility=e,this.comboboxAccessibility?(i.inputBox.setAttribute("role","combobox"),i.inputBox.setAttribute("aria-haspopup","true"),i.inputBox.setAttribute("aria-autocomplete","list"),i.inputBox.setAttribute("aria-activedescendant",i.list.getActiveDescendant()||"")):(i.inputBox.removeAttribute("role"),i.inputBox.removeAttribute("aria-haspopup"),i.inputBox.removeAttribute("aria-autocomplete"),i.inputBox.removeAttribute("aria-activedescendant"))}}setEnabled(e){if(e!==this.enabled){this.enabled=e;for(const i of this.getUI().leftActionBar.viewItems)i.getAction().enabled=e;for(const i of this.getUI().rightActionBar.viewItems)i.getAction().enabled=e;this.getUI().checkAll.disabled=!e,this.getUI().ok.enabled=e,this.getUI().list.enabled=e}}hide(e){var i;const n=this.controller;
548if(n){const s=!(!((i=this.ui)===null||i===void 0)&&i.container.contains(document.activeElement));if(this.controller=null,this.onHideEmitter.fire(),this.getUI().container.style.display="none",!s){let r=this.previousFocusElement;for(;r&&!r.offsetParent;)r=Br(r.parentElement);r?.offsetParent?(r.focus(),this.previousFocusElement=void 0):this.options.returnFocus()}n.didHide(e)}}layout(e,i){this.dimension=e,this.titleBarOffset=i,this.updateLayout()}updateLayout(){if(this.ui){this.ui.container.style.top=`${this.titleBarOffset}px`;const e=this.ui.container.style,i=Math.min(this.dimension.width*.62,jI.MAX_WIDTH);e.width=i+"px",e.marginLeft="-"+i/2+"px",this.ui.inputBox.layout(),this.ui.list.layout(this.dimension&&this.dimension.height*.4)}}applyStyles(e){this.styles=e,this.updateStyles()}updateStyles(){if(this.ui){const{quickInputTitleBackground:e,quickInputBackground:i,quickInputForeground:n,contrastBorder:s,widgetShadow:r}=this.styles.widget;this.ui.titleBar.style.backgroundColor=e?e.toString():"",this.ui.container.style.backgroundColor=i?i.toString():"",this.ui.container.style.color=n?n.toString():"",this.ui.container.style.border=s?`1px solid ${s}`:"",this.ui.container.style.boxShadow=r?`0 0 8px 2px ${r}`:"",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 o=[];this.styles.list.pickerGroupBorder&&o.push(`.quick-input-list .quick-input-list-entry { border-top-color:  ${this.styles.list.pickerGroupBorder}; }`),this.styles.list.pickerGroupForeground&&o.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)&&(o.push(".quick-input-list .monaco-keybinding > .monaco-keybinding-key {"),this.styles.keybindingLabel.keybindingLabelBackground&&o.push(`background-color: ${this.styles.keybindingLabel.keybindingLabelBackground};`),this.styles.keybindingLabel.keybindingLabelBorder&&o.push(`border-color: ${this.styles.keybindingLabel.keybindingLabelBorder};`),this.styles.keybindingLabel.keybindingLabelBottomBorder&&o.push(`border-bottom-color: ${this.styles.keybindingLabel.keybindingLabelBottomBorder};`),this.styles.keybindingLabel.keybindingLabelShadow&&o.push(`box-shadow: inset 0 -1px 0 ${this.styles.keybindingLabel.keybindingLabelShadow};`),this.styles.keybindingLabel.keybindingLabelForeground&&o.push(`color: ${this.styles.keybindingLabel.keybindingLabelForeground};`),o.push("}"));const a=o.join(`
549`);a!==this.ui.styleSheet.textContent&&(this.ui.styleSheet.textContent=a)}}};KI.MAX_WIDTH=600;var jF=class{constructor(t){this.spliceables=t}splice(t,e,i){this.spliceables.forEach(n=>n.splice(t,e,i))}},wr=class extends Error{constructor(t,e){super(`ListError [${t}] ${e}`)}};function pS(t,e){const i=[];for(let n of e){if(t.start>=n.range.end)continue;if(t.end<n.range.start)break;const s=wt.intersect(t,n.range);wt.isEmpty(s)||i.push({range:s,size:n.size})}return i}function r1({start:t,end:e},i){return{start:t+i,end:e+i}}function qF(t){const e=[];let i=null;for(let n of t){const s=n.range.start,r=n.range.end,o=n.size;if(i&&o===i.size){i.range.end=r;continue}i={range:{start:s,end:r},size:o},e.push(i)}return e}function GF(...t){return qF(t.reduce((e,i)=>e.concat(i),[]))}var _S=class{constructor(){this.groups=[],this._size=0}splice(t,e,i=[]){const n=i.length-e,s=pS({start:0,end:t},this.groups),r=pS({start:t+e,end:Number.POSITIVE_INFINITY},this.groups).map(a=>({range:r1(a.range,n),size:a.size})),o=i.map((a,l)=>({range:{start:t+l,end:t+l+1},size:a.size}));this.groups=GF(s,o,r),this._size=this.groups.reduce((a,l)=>a+l.size*(l.range.end-l.range.start),0)}get count(){const t=this.groups.length;return t?this.groups[t-1].range.end:0}get size(){return this._size}indexAt(t){if(t<0)return-1;let e=0,i=0;for(let n of this.groups){const s=n.range.end-n.range.start,r=i+s*n.size;if(t<r)return e+Math.floor((t-i)/n.size);e+=s,i=r}return e}indexAfter(t){return Math.min(this.indexAt(t)+1,this.count)}positionAt(t){if(t<0)return-1;let e=0,i=0;for(let n of this.groups){const s=n.range.end-n.range.start,r=i+s;if(t<r)return e+(t-i)*n.size;e+=s*n.size,i=r}return-1}};function ZF(t){try{t.parentElement&&t.parentElement.removeChild(t)}catch{}}var YF=class{constructor(t){this.renderers=t,this.cache=new Map}alloc(t){let e=this.getTemplateCache(t).pop();if(!e){const i=Q(".monaco-list-row");e={domNode:i,templateId:t,templateData:this.getRenderer(t).renderTemplate(i)}}return e}release(t){t&&this.releaseRow(t)}releaseRow(t){const{domNode:e,templateId:i}=t;e&&(e.classList.remove("scrolling"),ZF(e)),this.getTemplateCache(i).push(t)}getTemplateCache(t){let e=this.cache.get(t);return e||(e=[],this.cache.set(t,e)),e}dispose(){this.cache.forEach((t,e)=>{for(const i of t)this.getRenderer(e).disposeTemplate(i.templateData),i.templateData=null}),this.cache.clear()}getRenderer(t){const e=this.renderers.get(t);if(!e)throw new Error(`No renderer found for ${t}`);return e}}
vendor: 1,178 bytes, line 549
549,_o=function(t,e,i,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r},Ln={useShadows:!0,verticalScrollMode:1,setRowLineHeight:!0,setRowHeight:!0,supportDynamicHeights:!1,dnd:{getDragElements(t){return[t]},getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){}},horizontalScrolling:!1,transformOptimization:!0,alwaysConsumeMouseWheel:!0},$h=class{constructor(t){this.elements=t}update(){}getData(){return this.elements}},XF=class{constructor(t){this.elements=t}update(){}getData(){return this.elements}},QF=class{constructor(){this.types=[],this.files=[]}update(t){if(t.types&&this.types.splice(0,this.types.length,...t.types),t.files){this.files.splice(0,this.files.length);for(let e=0;e<t.files.length;e++){const i=t.files.item(e);i&&(i.size||i.type)&&this.files.push(i)}}}getData(){return{types:this.types,files:this.files}}};function JF(t,e){return Array.isArray(t)&&Array.isArray(e)?Rn(t,e):t===e}
549var eB=class{constructor(t){t?.getSetSize?this.getSetSize=t.getSetSize.bind(t):this.getSetSize=(e,i,n)=>n,t?.getPosInSet?this.getPosInSet=t.getPosInSet.bind(t):this.getPosInSet=(e,i)=>i+1,t?.getRole?this.getRole=t.getRole.bind(t):this.getRole=e=>"listitem",t?.isChecked?this.isChecked=t.isChecked.bind(t):this.isChecked=e=>{}}},ws=class qI{constructor(e,i,n,s=Ln){if(this.virtualDelegate=i,this.domId=`list_id_${++qI.InstanceCount}`,this.renderers=new Map,this.renderWidth=0,this._scrollHeight=0,this.scrollableElementUpdateDisposable=null,this.scrollableElementWidthDelayer=new Ha(50),this.splicing=!1,this.dragOverAnimationStopDisposable=V.None,this.dragOverMouseY=0,this.canDrop=!1,this.currentDragFeedbackDisposable=V.None,this.onDragLeaveTimeout=V.None,this.disposables=new ne,this._onDidChangeContentHeight=new M,this._horizontalScrolling=!1,s.horizontalScrolling&&s.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");this.items=[],this.itemId=0,this.rangeMap=new _S;for(const r of n)this.renderers.set(r.templateId,r);this.cache=this.disposables.add(new YF(this.renderers)),this.lastRenderTop=0,this.lastRenderHeight=0,this.domNode=document.createElement("div"),this.domNode.className="monaco-list",this.domNode.classList.add(this.domId),this.domNode.tabIndex=0,this.domNode.classList.toggle("mouse-support",typeof s.mouseSupport=="boolean"?s.mouseSupport:!0),this._horizontalScrolling=yn(s,r=>r.horizontalScrolling,Ln.horizontalScrolling),this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this.additionalScrollHeight=typeof s.additionalScrollHeight>"u"?0:s.additionalScrollHeight,this.accessibilityProvider=new eB(s.accessibilityProvider),this.rowsContainer=document.createElement("div"),this.rowsContainer.className="monaco-list-rows",yn(s,r=>r.transformOptimization,Ln.transformOptimization)&&(this.rowsContainer.style.transform="translate3d(0px, 0px, 0px)"),this.disposables.add(ii.addTarget(this.rowsContainer)),this.scrollable=new Wh({forceIntegerValues:!0,smoothScrollDuration:yn(s,r=>r.smoothScrolling,!1)?125:0,scheduleAtNextAnimationFrame:r=>Cn(r)}),this.scrollableElement=this.disposables.add(new $v(this.rowsContainer,{alwaysConsumeMouseWheel:yn(s,r=>r.alwaysConsumeMouseWheel,Ln.alwaysConsumeMouseWheel),horizontal:1,vertical:yn(s,r=>r.verticalScrollMode,Ln.verticalScrollMode),useShadows:yn(s,r=>r.useShadows,Ln.useShadows),mouseWheelScrollSensitivity:s.mouseWheelScrollSensitivity,fastScrollSensitivity:s.fastScrollSensitivity},this.scrollable)),this.domNode.appendChild(this.scrollableElement.getDomNode()),e.appendChild(this.domNode),this.scrollableElement.onScroll(this.onScroll,this,this.disposables),this.disposables.add(B(this.rowsContainer,Me.Change,r=>this.onTouchChange(r))),this.disposables.add(B(this.scrollableElement.getDomNode(),"scroll",r=>r.target.scrollTop=0)),this.disposables.add(B(this.domNode,"dragover",r=>this.onDragOver(this.toDragEvent(r)))),this.disposables.add(B(this.domNode,"drop",r=>this.onDrop(this.toDragEvent(r)))),this.disposables.add(B(this.domNode,"dragleave",r=>this.onDragLeave(this.toDragEvent(r)))),this.disposables.add(B(this.domNode,"dragend",r=>this.onDragEnd(r))),this.setRowLineHeight=yn(s,r=>r.setRowLineHeight,Ln.setRowLineHeight),this.setRowHeight=yn(s,r=>r.setRowHeight,Ln.setRowHeight),this.supportDynamicHeights=yn(s,r=>r.supportDynamicHeights,Ln.supportDynamicHeights),this.dnd=yn(s,r=>r.dnd,Ln.dnd),this.layout()}get contentHeight(){return this.rangeMap.size}get horizontalScrolling(){return this._horizontalScrolling}set horizontalScrolling(e){if(e!==this._horizontalScrolling){if(e&&this.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");if(this._horizontalScrolling=e,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this._horizontalScrolling){for(const i of this.items)this.measureItemWidth(i);this.updateScrollWidth(),this.scrollableElement.setScrollDimensions({width:zf(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(e){e.additionalScrollHeight!==void 0&&(this.additionalScrollHeight=e.additionalScrollHeight,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),e.smoothScrolling!==void 0&&this.scrollable.setSmoothScrollDuration(e.smoothScrolling?125:0),e.horizontalScrolling!==void 0&&(this.horizontalScrolling=e.horizontalScrolling),e.mouseWheelScrollSensitivity!==void 0&&this.scrollableElement.updateOptions({mouseWheelScrollSensitivity:e.mouseWheelScrollSensitivity}),e.fastScrollSensitivity!==void 0&&this.scrollableElement.updateOptions({fastScrollSensitivity:e.fastScrollSensitivity})}splice(e,i,n=[]){if(this.splicing)throw new Error("Can't run recursive splices.");this.splicing=!0;try{return this._splice(e,i,n)}finally{this.splicing=!1,this._onDidChangeContentHeight.fire(this.contentHeight)}}_splice(e,i,n=[]){const s=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),r={start:e,end:e+i},o=wt.intersect(s,r),a=new Map;for(let k=o.end-1;k>=o.start;k--){const S=this.items[k];if(S.dragStartDisposable.dispose(),S.row){let L=a.get(S.templateId);L||(L=[],a.set(S.templateId,L));const x=this.renderers.get(S.templateId);x&&x.disposeElement&&x.disposeElement(S.element,k,S.row.templateData,S.size),L.push(S.row)}S.row=null}const l={start:e+i,end:this.items.length},h=wt.intersect(l,s),c=wt.relativeComplement(l,s),d=n.map(k=>({id:String(this.itemId++),element:k,templateId:this.virtualDelegate.getTemplateId(k),size:this.virtualDelegate.getHeight(k),width:void 0,hasDynamicHeight:!!this.virtualDelegate.hasDynamicHeight&&this.virtualDelegate.hasDynamicHeight(k),lastDynamicHeightWidth:void 0,row:null,uri:void 0,dropTarget:!1,dragStartDisposable:V.None,checkedDisposable:V.None}));let u;e===0&&i>=this.items.length?(this.rangeMap=new _S,this.rangeMap.splice(0,0,d),u=this.items,this.items=d):(this.rangeMap.splice(e,i,d),u=this.items.splice(e,i,...d));const g=n.length-i,m=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),_=r1(h,g),C=wt.intersect(m,_);for(let k=C.start;k<C.end;k++)this.updateItemInDOM(this.items[k],k);const w=wt.relativeComplement(_,m);for(const k of w)for(let S=k.start;S<k.end;S++)this.removeItemFromDOM(S);const v=c.map(k=>r1(k,g)),b=[{start:e,end:e+n.length},...v].map(k=>wt.intersect(m,k)),y=this.getNextToLastElement(b);for(const k of b)for(let S=k.start;S<k.end;S++){const L=this.items[S],x=a.get(L.templateId),E=x?.pop();this.insertItemInDOM(S,y,E)}for(const k of a.values())for(const S of k)this.cache.release(S);return this.eventuallyUpdateScrollDimensions(),this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight),u.map(k=>k.element)}eventuallyUpdateScrollDimensions(){this._scrollHeight=this.contentHeight,this.rowsContainer.style.height=`${this._scrollHeight}px`,this.scrollableElementUpdateDisposable||(this.scrollableElementUpdateDisposable=Cn(()=>{this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight}),this.updateScrollWidth(),this.scrollableElementUpdateDisposable=null}))}eventuallyUpdateScrollWidth(){if(!this.horizontalScrolling){this.scrollableElementWidthDelayer.cancel();return}this.scrollableElementWidthDelayer.trigger(()=>this.updateScrollWidth())}updateScrollWidth(){if(!this.horizontalScrolling)return;let e=0;for(const i of this.items)typeof i.width<"u"&&(e=Math.max(e,i.width));this.scrollWidth=e,this.scrollableElement.setScrollDimensions({scrollWidth:e===0?0:e+10})}
549rerender(){if(this.supportDynamicHeights){for(const e of this.items)e.lastDynamicHeightWidth=void 0;this._rerender(this.lastRenderTop,this.lastRenderHeight)}}get length(){return this.items.length}get renderHeight(){return this.scrollableElement.getScrollDimensions().height}element(e){return this.items[e].element}domElement(e){const i=this.items[e].row;return i&&i.domNode}elementHeight(e){return this.items[e].size}elementTop(e){return this.rangeMap.positionAt(e)}indexAt(e){return this.rangeMap.indexAt(e)}indexAfter(e){return this.rangeMap.indexAfter(e)}layout(e,i){let n={height:typeof e=="number"?e:SM(this.domNode)};this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,n.scrollHeight=this.scrollHeight),this.scrollableElement.setScrollDimensions(n),typeof i<"u"&&(this.renderWidth=i,this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight)),this.horizontalScrolling&&this.scrollableElement.setScrollDimensions({width:typeof i=="number"?i:zf(this.domNode)})}render(e,i,n,s,r,o=!1){const a=this.getRenderRange(i,n),l=wt.relativeComplement(a,e),h=wt.relativeComplement(e,a),c=this.getNextToLastElement(l);if(o){const d=wt.intersect(e,a);for(let u=d.start;u<d.end;u++)this.updateItemInDOM(this.items[u],u)}for(const d of l)for(let u=d.start;u<d.end;u++)this.insertItemInDOM(u,c);for(const d of h)for(let u=d.start;u<d.end;u++)this.removeItemFromDOM(u);s!==void 0&&(this.rowsContainer.style.left=`-${s}px`),this.rowsContainer.style.top=`-${i}px`,this.horizontalScrolling&&r!==void 0&&(this.rowsContainer.style.width=`${Math.max(r,this.renderWidth)}px`),this.lastRenderTop=i,this.lastRenderHeight=n}insertItemInDOM(e,i,n){const s=this.items[e];s.row||(s.row=n??this.cache.alloc(s.templateId));const r=this.accessibilityProvider.getRole(s.element)||"listitem";s.row.domNode.setAttribute("role",r);const o=this.accessibilityProvider.isChecked(s.element);if(typeof o=="boolean")s.row.domNode.setAttribute("aria-checked",String(!!o));else if(o){const h=c=>s.row.domNode.setAttribute("aria-checked",String(!!c));h(o.value),s.checkedDisposable=o.onDidChange(h)}s.row.domNode.parentElement||(i?this.rowsContainer.insertBefore(s.row.domNode,i):this.rowsContainer.appendChild(s.row.domNode)),this.updateItemInDOM(s,e);const a=this.renderers.get(s.templateId);if(!a)throw new Error(`No renderer found for template id ${s.templateId}`);a&&a.renderElement(s.element,e,s.row.templateData,s.size);const l=this.dnd.getDragURI(s.element);s.dragStartDisposable.dispose(),s.row.domNode.draggable=!!l,l&&(s.dragStartDisposable=B(s.row.domNode,"dragstart",h=>this.onDragStart(s.element,l,h))),this.horizontalScrolling&&(this.measureItemWidth(s),this.eventuallyUpdateScrollWidth())}measureItemWidth(e){if(!e.row||!e.row.domNode)return;e.row.domNode.style.width=Ii?"-moz-fit-content":"fit-content",e.width=zf(e.row.domNode);const i=window.getComputedStyle(e.row.domNode);i.paddingLeft&&(e.width+=parseFloat(i.paddingLeft)),i.paddingRight&&(e.width+=parseFloat(i.paddingRight)),e.row.domNode.style.width=""}updateItemInDOM(e,i){e.row.domNode.style.top=`${this.elementTop(i)}px`,this.setRowHeight&&(e.row.domNode.style.height=`${e.size}px`),this.setRowLineHeight&&(e.row.domNode.style.lineHeight=`${e.size}px`),e.row.domNode.setAttribute("data-index",`${i}`),e.row.domNode.setAttribute("data-last-element",i===this.length-1?"true":"false"),e.row.domNode.setAttribute("data-parity",i%2===0?"even":"odd"),e.row.domNode.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(e.element,i,this.length))),e.row.domNode.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(e.element,i))),e.row.domNode.setAttribute("id",this.getElementDomId(i)),e.row.domNode.classList.toggle("drop-target",e.dropTarget)}removeItemFromDOM(e){const i=this.items[e];if(i.dragStartDisposable.dispose(),i.checkedDisposable.dispose(),i.row){const n=this.renderers.get(i.templateId);n&&n.disposeElement&&n.disposeElement(i.element,e,i.row.templateData,i.size),this.cache.release(i.row),i.row=null}this.horizontalScrolling&&this.eventuallyUpdateScrollWidth()}getScrollTop(){return this.scrollableElement.getScrollPosition().scrollTop}setScrollTop(e,i){this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),this.scrollableElement.setScrollPosition({scrollTop:e,reuseAnimation:i})}
549get scrollTop(){return this.getScrollTop()}set scrollTop(e){this.setScrollTop(e)}get scrollHeight(){return this._scrollHeight+(this.horizontalScrolling?10:0)+this.additionalScrollHeight}get onMouseClick(){return $.map(this.disposables.add(new Ee(this.domNode,"click")).event,e=>this.toMouseEvent(e))}get onMouseDblClick(){return $.map(this.disposables.add(new Ee(this.domNode,"dblclick")).event,e=>this.toMouseEvent(e))}get onMouseMiddleClick(){return $.filter($.map(this.disposables.add(new Ee(this.domNode,"auxclick")).event,e=>this.toMouseEvent(e)),e=>e.browserEvent.button===1)}get onMouseDown(){return $.map(this.disposables.add(new Ee(this.domNode,"mousedown")).event,e=>this.toMouseEvent(e))}get onContextMenu(){return $.any($.map(this.disposables.add(new Ee(this.domNode,"contextmenu")).event,e=>this.toMouseEvent(e)),$.map(this.disposables.add(new Ee(this.domNode,Me.Contextmenu)).event,e=>this.toGestureEvent(e)))}get onTouchStart(){return $.map(this.disposables.add(new Ee(this.domNode,"touchstart")).event,e=>this.toTouchEvent(e))}get onTap(){return $.map(this.disposables.add(new Ee(this.rowsContainer,Me.Tap)).event,e=>this.toGestureEvent(e))}toMouseEvent(e){const i=this.getItemIndexFromEventTarget(e.target||null),n=typeof i>"u"?void 0:this.items[i];return{browserEvent:e,index:i,element:n&&n.element}}toTouchEvent(e){const i=this.getItemIndexFromEventTarget(e.target||null),n=typeof i>"u"?void 0:this.items[i];return{browserEvent:e,index:i,element:n&&n.element}}toGestureEvent(e){const i=this.getItemIndexFromEventTarget(e.initialTarget||null),n=typeof i>"u"?void 0:this.items[i];return{browserEvent:e,index:i,element:n&&n.element}}toDragEvent(e){const i=this.getItemIndexFromEventTarget(e.target||null),n=typeof i>"u"?void 0:this.items[i];return{browserEvent:e,index:i,element:n&&n.element}}onScroll(e){try{const i=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);this.render(i,e.scrollTop,e.height,e.scrollLeft,e.scrollWidth),this.supportDynamicHeights&&this._rerender(e.scrollTop,e.height,e.inSmoothScrolling)}catch(i){throw i}}onTouchChange(e){e.preventDefault(),e.stopPropagation(),this.scrollTop-=e.translationY}onDragStart(e,i,n){if(!n.dataTransfer)return;const s=this.dnd.getDragElements(e);if(n.dataTransfer.effectAllowed="copyMove",n.dataTransfer.setData(Fx.TEXT,i),n.dataTransfer.setDragImage){let r;this.dnd.getDragLabel&&(r=this.dnd.getDragLabel(s,n)),typeof r>"u"&&(r=String(s.length));const o=Q(".monaco-drag-image");o.textContent=r,document.body.appendChild(o),n.dataTransfer.setDragImage(o,-10,-10),setTimeout(()=>document.body.removeChild(o),0)}this.currentDragData=new $h(s),as.CurrentDragAndDropData=new XF(s),this.dnd.onDragStart&&this.dnd.onDragStart(this.currentDragData,n)}onDragOver(e){if(e.browserEvent.preventDefault(),this.onDragLeaveTimeout.dispose(),as.CurrentDragAndDropData&&as.CurrentDragAndDropData.getData()==="vscode-ui"||(this.setupDragAndDropScrollTopAnimation(e.browserEvent),!e.browserEvent.dataTransfer))return!1;if(!this.currentDragData)if(as.CurrentDragAndDropData)this.currentDragData=as.CurrentDragAndDropData;else{if(!e.browserEvent.dataTransfer.types)return!1;this.currentDragData=new QF}const i=this.dnd.onDragOver(this.currentDragData,e.element,e.index,e.browserEvent);if(this.canDrop=typeof i=="boolean"?i:i.accept,!this.canDrop)return this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),!1;e.browserEvent.dataTransfer.dropEffect=typeof i!="boolean"&&i.effect===0?"copy":"move";let n;if(typeof i!="boolean"&&i.feedback?n=i.feedback:typeof e.index>"u"?n=[-1]:n=[e.index],n=tr(n).filter(s=>s>=-1&&s<this.length).sort((s,r)=>s-r),n=n[0]===-1?[-1]:n,JF(this.currentDragFeedback,n))return!0;if(this.currentDragFeedback=n,this.currentDragFeedbackDisposable.dispose(),n[0]===-1)this.domNode.classList.add("drop-target"),this.rowsContainer.classList.add("drop-target"),this.currentDragFeedbackDisposable=Ae(()=>{this.domNode.classList.remove("drop-target"),this.rowsContainer.classList.remove("drop-target")});else{for(const s of n){const r=this.items[s];r.dropTarget=!0,r.row&&r.row.domNode.classList.add("drop-target")}this.currentDragFeedbackDisposable=Ae(()=>{for(const s of n){const r=this.items[s];r.dropTarget=!1,r.row&&r.row.domNode.classList.remove("drop-target")}})}return!0}onDragLeave(e){var i,n;this.onDragLeaveTimeout.dispose(),this.onDragLeaveTimeout=Jm(()=>this.clearDragOverFeedback(),100),this.currentDragData&&((n=(i=this.dnd).onDragLeave)===null||n===void 0||n.call(i,this.currentDragData,e.element,e.index,e.browserEvent))}onDrop(e){if(!this.canDrop)return;const i=this.currentDragData;this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.currentDragData=void 0,as.CurrentDragAndDropData=void 0,!(!i||!e.browserEvent.dataTransfer)&&(e.browserEvent.preventDefault(),i.update(e.browserEvent.dataTransfer),this.dnd.drop(i,e.element,e.index,e.browserEvent))}onDragEnd(e){this.canDrop=!1,this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.currentDragData=void 0,as.CurrentDragAndDropData=void 0,this.dnd.onDragEnd&&this.dnd.onDragEnd(e)}clearDragOverFeedback(){this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),this.currentDragFeedbackDisposable=V.None}setupDragAndDropScrollTopAnimation(e){if(!this.dragOverAnimationDisposable){const i=KL(this.domNode).top;this.dragOverAnimationDisposable=DM(this.animateDragAndDropScrollTop.bind(this,i))}this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationStopDisposable=Jm(()=>{this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)},1e3),this.dragOverMouseY=e.pageY}animateDragAndDropScrollTop(e){if(this.dragOverMouseY===void 0)return;const i=this.dragOverMouseY-e,n=this.renderHeight-35;i<35?this.scrollTop+=Math.max(-14,Math.floor(.3*(i-35))):i>n&&(this.scrollTop+=Math.min(14,Math.floor(.3*(i-n))))}teardownDragAndDropScrollTopAnimation(){this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}getItemIndexFromEventTarget(e){const i=this.scrollableElement.getDomNode();let n=e;for(;n instanceof HTMLElement&&n!==this.rowsContainer&&i.contains(n);){const s=n.getAttribute("data-index");if(s){const r=Number(s);if(!isNaN(r))return r}n=n.parentElement}}getRenderRange(e,i){return{start:this.rangeMap.indexAt(e),end:this.rangeMap.indexAfter(e+i-1)}}_rerender(e,i,n){const s=this.getRenderRange(e,i);let r,o;e===this.elementTop(s.start)?(r=s.start,o=0):s.end-s.start>1&&(r=s.start+1,o=this.elementTop(r)-e);let a=0;for(;;){const l=this.getRenderRange(e,i);let h=!1;for(let c=l.start;c<l.end;c++){const d=this.probeDynamicHeight(c);d!==0&&this.rangeMap.splice(c,1,[this.items[c]]),a+=d,h=h||d!==0}if(!h){a!==0&&this.eventuallyUpdateScrollDimensions();const c=wt.relativeComplement(s,l);for(const u of c)for(let g=u.start;g<u.end;g++)this.items[g].row&&this.removeItemFromDOM(g);const d=wt.relativeComplement(l,s);for(const u of d)for(let g=u.start;g<u.end;g++){const m=g+1,_=m<this.items.length?this.items[m].row:null,C=_?_.domNode:null;this.insertItemInDOM(g,C)}for(let u=l.start;u<l.end;u++)this.items[u].row&&this.updateItemInDOM(this.items[u],u);
549if(typeof r=="number"){const u=this.scrollable.getFutureScrollPosition().scrollTop-e,g=this.elementTop(r)-o+u;this.setScrollTop(g,n)}this._onDidChangeContentHeight.fire(this.contentHeight);return}}}probeDynamicHeight(e){const i=this.items[e];if(this.virtualDelegate.getDynamicHeight){const o=this.virtualDelegate.getDynamicHeight(i.element);if(o!==null){const a=i.size;return i.size=o,i.lastDynamicHeightWidth=this.renderWidth,o-a}}if(!i.hasDynamicHeight||i.lastDynamicHeightWidth===this.renderWidth||this.virtualDelegate.hasDynamicHeight&&!this.virtualDelegate.hasDynamicHeight(i.element))return 0;const n=i.size;if(!this.setRowHeight&&i.row){let o=i.row.domNode.offsetHeight;return i.size=o,i.lastDynamicHeightWidth=this.renderWidth,o-n}const s=this.cache.alloc(i.templateId);s.domNode.style.height="",this.rowsContainer.appendChild(s.domNode);const r=this.renderers.get(i.templateId);return r&&(r.renderElement(i.element,e,s.templateData,void 0),r.disposeElement&&r.disposeElement(i.element,e,s.templateData,void 0)),i.size=s.domNode.offsetHeight,this.virtualDelegate.setDynamicHeight&&this.virtualDelegate.setDynamicHeight(i.element,i.size),i.lastDynamicHeightWidth=this.renderWidth,this.rowsContainer.removeChild(s.domNode),this.cache.release(s),i.size-n}getNextToLastElement(e){const i=e[e.length-1];if(!i)return null;const n=this.items[i.end];return!n||!n.row?null:n.row.domNode}getElementDomId(e){return`${this.domId}_${e}`}dispose(){if(this.items){for(const e of this.items)if(e.row){const i=this.renderers.get(e.row.templateId);i&&(i.disposeElement&&i.disposeElement(e.element,-1,e.row.templateData,void 0),i.disposeTemplate(e.row.templateData))}this.items=[]}this.domNode&&this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),De(this.disposables)}};ws.InstanceCount=0;_o([tt],ws.prototype,"onMouseClick",null);_o([tt],ws.prototype,"onMouseDblClick",null);_o([tt],ws.prototype,"onMouseMiddleClick",null);_o([tt],ws.prototype,"onMouseDown",null);_o([tt],ws.prototype,"onContextMenu",null);_o([tt],ws.prototype,"onTouchStart",null);_o([tt],ws.prototype,"onTap",null);var vo=function(t,e,i,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r},vS=function(t,e,i,n){function s(r){return r instanceof i?r:new i(function(o){o(r)})}return new(i||(i=Promise))(function(r,o){function a(c){try{h(n.next(c))}catch(d){o(d)}}function l(c){try{h(n.throw(c))}catch(d){o(d)}}function h(c){c.done?r(c.value):s(c.value).then(a,l)}h((n=n.apply(t,e||[])).next())})},tB=class{constructor(t){this.trait=t,this.renderedElements=[]}get templateId(){return`template:${this.trait.name}`}renderTemplate(t){return t}renderElement(t,e,i){const n=this.renderedElements.findIndex(s=>s.templateData===i);if(n>=0){const s=this.renderedElements[n];this.trait.unrender(i),s.index=e}else{const s={index:e,templateData:i};this.renderedElements.push(s)}this.trait.renderIndex(e,i)}splice(t,e,i){const n=[];for(const s of this.renderedElements)s.index<t?n.push(s):s.index>=t+e&&n.push({index:s.index+i-e,templateData:s.templateData});this.renderedElements=n}renderIndexes(t){for(const{index:e,templateData:i}of this.renderedElements)t.indexOf(e)>-1&&this.trait.renderIndex(e,i)}disposeTemplate(t){const e=this.renderedElements.findIndex(i=>i.templateData===t);e<0||this.renderedElements.splice(e,1)}},Nu=class{constructor(t){this._trait=t,this.length=0,this.indexes=[],this.sortedIndexes=[],this._onChange=new M,this.onChange=this._onChange.event}get name(){return this._trait}get renderer(){return new tB(this)}splice(t,e,i){var n;e=Math.max(0,Math.min(e,this.length-t));const s=i.length-e,r=t+e,o=[...this.sortedIndexes.filter(l=>l<t),...i.map((l,h)=>l?h+t:-1).filter(l=>l!==-1),...this.sortedIndexes.filter(l=>l>=r).map(l=>l+s)],a=this.length+s;if(this.sortedIndexes.length>0&&o.length===0&&a>0){const l=(n=this.sortedIndexes.find(h=>h>=t))!==null&&n!==void 0?n:a-1;o.push(Math.min(l,a-1))}this.renderer.splice(t,e,i.length),this._set(o,o),this.length=a}renderIndex(t,e){e.classList.toggle(this._trait,this.contains(t))}unrender(t){t.classList.remove(this._trait)}set(t,e){return this._set(t,[...t].sort(bS),e)}_set(t,e,i){const n=this.indexes,s=this.sortedIndexes;this.indexes=t,this.sortedIndexes=e;const r=o1(s,t);return this.renderer.renderIndexes(r),this._onChange.fire({indexes:t,browserEvent:i}),n}get(){return this.indexes}contains(t){return qD(this.sortedIndexes,t,bS)>=0}dispose(){De(this._onChange)}};vo([tt],Nu.prototype,"renderer",null);var iB=class extends Nu{constructor(t){super("selected"),this.setAriaSelected=t}renderIndex(t,e){super.renderIndex(t,e),this.setAriaSelected&&(this.contains(t)?e.setAttribute("aria-selected","true"):e.setAttribute("aria-selected","false"))}},Bg=class{constructor(t,e,i){this.trait=t,this.view=e,this.identityProvi
549der=i}splice(t,e,i){if(!this.identityProvider)return this.trait.splice(t,e,i.map(()=>!1));const n=this.trait.get().map(r=>this.identityProvider.getId(this.view.element(r)).toString()),s=i.map(r=>n.indexOf(this.identityProvider.getId(r).toString())>-1);this.trait.splice(t,e,s)}};function lr(t){return t.tagName==="INPUT"||t.tagName==="TEXTAREA"}function Jo(t){return t.classList.contains("monaco-editor")?!0:t.classList.contains("monaco-list")||!t.parentElement?!1:Jo(t.parentElement)}var GI=class{constructor(t,e,i){this.list=t,this.view=e,this.disposables=new ne,this.multipleSelectionDisposables=new ne,this.onKeyDown.filter(n=>n.keyCode===3).on(this.onEnter,this,this.disposables),this.onKeyDown.filter(n=>n.keyCode===16).on(this.onUpArrow,this,this.disposables),this.onKeyDown.filter(n=>n.keyCode===18).on(this.onDownArrow,this,this.disposables),this.onKeyDown.filter(n=>n.keyCode===11).on(this.onPageUpArrow,this,this.disposables),this.onKeyDown.filter(n=>n.keyCode===12).on(this.onPageDownArrow,this,this.disposables),this.onKeyDown.filter(n=>n.keyCode===9).on(this.onEscape,this,this.disposables),i.multipleSelectionSupport!==!1&&this.onKeyDown.filter(n=>(fe?n.metaKey:n.ctrlKey)&&n.keyCode===31).on(this.onCtrlA,this,this.multipleSelectionDisposables)}get onKeyDown(){return $.chain(this.disposables.add(new Ee(this.view.domNode,"keydown")).event).filter(t=>!lr(t.target)).map(t=>new Pe(t))}updateOptions(t){t.multipleSelectionSupport!==void 0&&(this.multipleSelectionDisposables.clear(),t.multipleSelectionSupport&&this.onKeyDown.filter(e=>(fe?e.metaKey:e.ctrlKey)&&e.keyCode===31).on(this.onCtrlA,this,this.multipleSelectionDisposables))}onEnter(t){t.preventDefault(),t.stopPropagation(),this.list.setSelection(this.list.getFocus(),t.browserEvent)}onUpArrow(t){t.preventDefault(),t.stopPropagation(),this.list.focusPrevious(1,!1,t.browserEvent);const e=this.list.getFocus()[0];this.list.setAnchor(e),this.list.reveal(e),this.view.domNode.focus()}onDownArrow(t){t.preventDefault(),t.stopPropagation(),this.list.focusNext(1,!1,t.browserEvent);const e=this.list.getFocus()[0];this.list.setAnchor(e),this.list.reveal(e),this.view.domNode.focus()}onPageUpArrow(t){t.preventDefault(),t.stopPropagation(),this.list.focusPreviousPage(t.browserEvent);const e=this.list.getFocus()[0];this.list.setAnchor(e),this.list.reveal(e),this.view.domNode.focus()}onPageDownArrow(t){t.preventDefault(),t.stopPropagation(),this.list.focusNextPage(t.browserEvent);const e=this.list.getFocus()[0];this.list.setAnchor(e),this.list.reveal(e),this.view.domNode.focus()}onCtrlA(t){t.preventDefault(),t.stopPropagation(),this.list.setSelection(At(this.list.length),t.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus()}onEscape(t){this.list.getSelection().length&&(t.preventDefault(),t.stopPropagation(),this.list.setSelection([],t.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus())}dispose(){this.disposables.dispose(),this.multipleSelectionDisposables.dispose()}};vo([tt],GI.prototype,"onKeyDown",null);var ea;(function(t){t[t.Idle=0]="Idle",t[t.Typing=1]="Typing"})(ea||(ea={}));var ZI=new class{mightProducePrintableCharacter(t){return t.ctrlKey||t.metaKey||t.altKey?!1:t.keyCode>=31&&t.keyCode<=56||t.keyCode>=21&&t.keyCode<=30||t.keyCode>=93&&t.keyCode<=102||t.keyCode>=80&&t.keyCode<=90}},nB=class{constructor(t,e,i,n){this.list=t,this.view=e,this.keyboardNavigationLabelProvider=i,this.delegate=n,this.enabled=!1,this.state=ea.Idle,this.automaticKeyboardNavigation=!0,this.triggered=!1,this.previouslyFocused=-1,this.enabledDisposables=new ne,this.disposables=new ne,this.updateOptions(t.options)}updateOptions(t){typeof t.enableKeyboardNavigation>"u"||t.enableKeyboardNavigation?this.enable():this.disable(),typeof t.automaticKeyboardNavigation<"u"&&(this.automaticKeyboardNavigation=t.automaticKeyboardNavigation)}enable(){if(this.enabled)return;const t=$.chain(this.enabledDisposables.add(new Ee(this.view.domNode,"keydown")).event).filter(i=>!lr(i.target)).filter(()=>this.automaticKeyboardNavigation||this.triggered).map(i=>new Pe(i)).filter(i=>
549this.delegate.mightProducePrintableCharacter(i)).forEach(i=>i.preventDefault()).map(i=>i.browserEvent.key).event,e=$.debounce(t,()=>null,800);$.reduce($.any(t,e),(i,n)=>n===null?null:(i||"")+n)(this.onInput,this,this.enabledDisposables),e(this.onClear,this,this.enabledDisposables),this.enabled=!0,this.triggered=!1}disable(){this.enabled&&(this.enabledDisposables.clear(),this.enabled=!1,this.triggered=!1)}onClear(){var t;const e=this.list.getFocus();if(e.length>0&&e[0]===this.previouslyFocused){const i=(t=this.list.options.accessibilityProvider)===null||t===void 0?void 0:t.getAriaLabel(this.list.element(e[0]));i&&Zu(i)}this.previouslyFocused=-1}onInput(t){if(!t){this.state=ea.Idle,this.triggered=!1;return}const e=this.list.getFocus(),i=e.length>0?e[0]:0,n=this.state===ea.Idle?1:0;this.state=ea.Typing;for(let s=0;s<this.list.length;s++){const r=(i+s+n)%this.list.length,o=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(this.view.element(r)),a=o&&o.toString();if(typeof a>"u"||h0(t,a)){this.previouslyFocused=i,this.list.setFocus([r]),this.list.reveal(r);return}}}dispose(){this.disable(),this.enabledDisposables.dispose(),this.disposables.dispose()}},sB=class{constructor(t,e){this.list=t,this.view=e,this.disposables=new ne,$.chain(this.disposables.add(new Ee(e.domNode,"keydown")).event).filter(i=>!lr(i.target)).map(i=>new Pe(i)).filter(i=>i.keyCode===2&&!i.ctrlKey&&!i.metaKey&&!i.shiftKey&&!i.altKey).on(this.onTab,this,this.disposables)}onTab(t){if(t.target!==this.view.domNode)return;const e=this.list.getFocus();if(e.length===0)return;const i=this.view.domElement(e[0]);if(!i)return;const n=i.querySelector("[tabIndex]");if(!n||!(n instanceof HTMLElement)||n.tabIndex===-1)return;const s=window.getComputedStyle(n);s.visibility==="hidden"||s.display==="none"||(t.preventDefault(),t.stopPropagation(),n.focus())}dispose(){this.disposables.dispose()}};function YI(t){return fe?t.browserEvent.metaKey:t.browserEvent.ctrlKey}function XI(t){return t.browserEvent.shiftKey}function rB(t){return t instanceof MouseEvent&&t.button===2}var CS={isSelectionSingleChangeEvent:YI,isSelectionRangeChangeEvent:XI},QI=class{constructor(t){this.list=t,this.disposables=new ne,this._onPointer=new M,this.onPointer=this._onPointer.event,t.options.multipleSelectionSupport!==!1&&(this.multipleSelectionController=this.list.options.multipleSelectionController||CS),this.mouseSupport=typeof t.options.mouseSupport>"u"||!!t.options.mouseSupport,this.mouseSupport&&(t.onMouseDown(this.onMouseDown,this,this.disposables),t.onContextMenu(this.onContextMenu,this,this.disposables),t.onMouseDblClick(this.onDoubleClick,this,this.disposables),t.onTouchStart(this.onMouseDown,this,this.disposables),this.disposables.add(ii.addTarget(t.getHTMLElement()))),$.any(t.onMouseClick,t.onMouseMiddleClick,t.onTap)(this.onViewPointer,this,this.disposables)}updateOptions(t){t.multipleSelectionSupport!==void 0&&(this.multipleSelectionController=void 0,t.multipleSelectionSupport&&(this.multipleSelectionController=this.list.options.multipleSelectionController||CS))}isSelectionSingleChangeEvent(t){return this.multipleSelectionController?this.multipleSelectionController.isSelectionSingleChangeEvent(t):!1}isSelectionRangeChangeEvent(t){return this.multipleSelectionController?this.multipleSelectionController.isSelectionRangeChangeEvent(t):!1}isSelectionChangeEvent(t){return this.isSelectionSingleChangeEvent(t)||this.isSelectionRangeChangeEvent(t)}onMouseDown(t){Jo(t.browserEvent.target)||document.activeElement!==t.browserEvent.target&&this.list.domFocus()}onContextMenu(t){if(Jo(t.browserEvent.target))return;const e=typeof t.index>"u"?[]:[t.index];this.list.setFocus(e,t.browserEvent)}onViewPointer(t){if(!this.mouseSupport||lr(t.browserEvent.target)||Jo(t.browserEvent.target))return;const e=t.index;if(typeof e>"u"){this.list.setFocus([],t.browserEvent),this.list.setSelection([],t.browserEvent),this.list.setAnchor(void 0);return}if(this.isSelectionRangeChangeEvent(t))return this.changeSelection(t);if(this.isSelectionChangeEvent(t))return this.changeSelection(t);this.list.setFocus([e],t.browserEvent),this.list.setAnchor(e),rB(t.browserEvent)||this.list.setSelection([e],t.browserEvent),this._onPointer.fire(t)}onDoubleClick(t){if(lr(t.browserEvent.target)||Jo(t.browserEvent.target)||this.isSelectionChangeEvent(t))return;const e=this.list.getFocus();this.list.setSelection(e,t.browserEvent)}changeSelection(t){const e=t.index;let i=this.list.getAnchor();if(this.isSelectionRangeChangeEvent(t)){if(typeof i>"u"){const a=this.list.getFocus()[0];i=a??e,this.list.setAnchor(i)}const n=At(Math.min(i,e),Math.max(i,e)+1),s=this.list.getSelection(),r=lB(o1(s,[i]),i);if(r.length===0)return;const o=o1(n,hB(s,r));this.list.setSelection(o,t.browserEvent),this.list.setFocus([e],t.browserEvent)}else if(this.isSelectionSingleChangeEvent(t)){const n=this.list.getSelection(),s=n.filter(r=>r!==e);this.list.setFocus([e]),this.list.setAnchor(e),n.length===s.length?this.list.setSelection([...s,e],t.browserEvent):this.list.setSelection(s,t.browserEvent)}}dispose(){this.disposables.dispose()}},JI=class{constructor(t,e){this.styleElement=t,this.selectorSuffix=e}style(t){const e=this.selectorSuffix&&`.${this.selectorSuffix}`,i=[];
549t.listBackground&&t.listBackground.isOpaque()&&i.push(`.monaco-list${e} .monaco-list-rows { background: ${t.listBackground}; }`),t.listFocusBackground&&(i.push(`.monaco-list${e}:focus .monaco-list-row.focused { background-color: ${t.listFocusBackground}; }`),i.push(`.monaco-list${e}:focus .monaco-list-row.focused:hover { background-color: ${t.listFocusBackground}; }`)),t.listFocusForeground&&i.push(`.monaco-list${e}:focus .monaco-list-row.focused { color: ${t.listFocusForeground}; }`),t.listActiveSelectionBackground&&(i.push(`.monaco-list${e}:focus .monaco-list-row.selected { background-color: ${t.listActiveSelectionBackground}; }`),i.push(`.monaco-list${e}:focus .monaco-list-row.selected:hover { background-color: ${t.listActiveSelectionBackground}; }`)),t.listActiveSelectionForeground&&i.push(`.monaco-list${e}:focus .monaco-list-row.selected { color: ${t.listActiveSelectionForeground}; }`),t.listActiveSelectionIconForeground&&i.push(`.monaco-list${e}:focus .monaco-list-row.selected .codicon { color: ${t.listActiveSelectionIconForeground}; }`),t.listFocusAndSelectionBackground&&i.push(`
550				.monaco-drag-image,
551				.monaco-list${e}:focus .monaco-list-row.selected.focused { background-color: ${t.listFocusAndSelectionBackground}; }
552			`),t.listFocusAndSelectionForeground&&i.push(`
553				.monaco-drag-image,
554				.monaco-list${e}:focus .monaco-list-row.selected.focused { color: ${t.listFocusAndSelectionForeground}; }
555			`),t.listInactiveFocusForeground&&(i.push(`.monaco-list${e} .monaco-list-row.focused { color:  ${t.listInactiveFocusForeground}; }`),i.push(`.monaco-list${e} .monaco-list-row.focused:hover { color:  ${t.listInactiveFocusForeground}; }`)),t.listInactiveSelectionIconForeground&&i.push(`.monaco-list${e} .monaco-list-row.focused .codicon { color:  ${t.listInactiveSelectionIconForeground}; }`),t.listInactiveFocusBackground&&(i.push(`.monaco-list${e} .monaco-list-row.focused { background-color:  ${t.listInactiveFocusBackground}; }`),i.push(`.monaco-list${e} .monaco-list-row.focused:hover { background-color:  ${t.listInactiveFocusBackground}; }`)),t.listInactiveSelectionBackground&&(i.push(`.monaco-list${e} .monaco-list-row.selected { background-color:  ${t.listInactiveSelectionBackground}; }`),i.push(`.monaco-list${e} .monaco-list-row.selected:hover { background-color:  ${t.listInactiveSelectionBackground}; }`)),t.listInactiveSelectionForeground&&i.push(`.monaco-list${e} .monaco-list-row.selected { color: ${t.listInactiveSelectionForeground}; }`),t.listHoverBackground&&i.push(`.monaco-list${e}:not(.drop-target) .monaco-list-row:hover:not(.selected):not(.focused) { background-color: ${t.listHoverBackground}; }`),t.listHoverForeground&&i.push(`.monaco-list${e} .monaco-list-row:hover:not(.selected):not(.focused) { color:  ${t.listHoverForeground}; }`),t.listSelectionOutline&&i.push(`.monaco-list${e} .monaco-list-row.selected { outline: 1px dotted ${t.listSelectionOutline}; outline-offset: -1px; }`),t.listFocusOutline&&i.push(`
556				.monaco-drag-image,
557				.monaco-list${e}:focus .monaco-list-row.focused { outline: 1px solid ${t.listFocusOutline}; outline-offset: -1px; }
558				.monaco-workbench.context-menu-visible .monaco-list${e}.last-focused .monaco-list-row.focused { outline: 1px solid ${t.listFocusOutline}; outline-offset: -1px; }
559			`),t.listInactiveFocusOutline&&i.push(`.monaco-list${e} .monaco-list-row.focused { outline: 1px dotted ${t.listInactiveFocusOutline}; outline-offset: -1px; }`),t.listHoverOutline&&i.push(`.monaco-list${e} .monaco-list-row:hover { outline: 1px dashed ${t.listHoverOutline}; outline-offset: -1px; }`),t.listDropBackground&&i.push(`
560				.monaco-list${e}.drop-target,
561				.monaco-list${e} .monaco-list-rows.drop-target,
562				.monaco-list${e} .monaco-list-row.drop-target { background-color: ${t.listDropBackground} !important; color: inherit !important; }
563			`),t.listFilterWidgetBackground&&i.push(`.monaco-list-type-filter { background-color: ${t.listFilterWidgetBackground} }`),t.listFilterWidgetOutline&&i.push(`.monaco-list-type-filter { border: 1px solid ${t.listFilterWidgetOutline}; }`),t.listFilterWidgetNoMatchesOutline&&i.push(`.monaco-list-type-filter.no-matches { border: 1px solid ${t.listFilterWidgetNoMatchesOutline}; }`),t.listMatchesShadow&&i.push(`.monaco-list-type-filter { box-shadow: 1px 1px 1px ${t.listMatchesShadow}; }`),t.tableColumnsBorder&&i.push(`
564				.monaco-table:hover > .monaco-split-view2,
565				.monaco-table:hover > .monaco-split-view2 .monaco-sash.vertical::before {
566					border-color: ${t.tableColumnsBorder};
567			}
567`),t.tableOddRowsBackgroundColor&&i.push(`
568				.monaco-table .monaco-list-row[data-parity=odd]:not(.focused):not(.selected):not(:hover) .monaco-table-tr,
569				.monaco-table .monaco-list:not(:focus) .monaco-list-row[data-parity=odd].focused:not(.selected):not(:hover) .monaco-table-tr,
570				.monaco-table .monaco-list:not(.focused) .monaco-list-row[data-parity=odd].focused:not(.selected):not(:hover) .monaco-table-tr {
571					background-color: ${t.tableOddRowsBackgroundColor};
572				}
573			`),this.styleElement.textContent=i.join(`
574`)}},oB={listFocusBackground:O.fromHex("#7FB0D0"),listActiveSelectionBackground:O.fromHex("#0E639C"),listActiveSelectionForeground:O.fromHex("#FFFFFF"),listActiveSelectionIconForeground:O.fromHex("#FFFFFF"),listFocusAndSelectionBackground:O.fromHex("#094771"),listFocusAndSelectionForeground:O.fromHex("#FFFFFF"),listInactiveSelectionBackground:O.fromHex("#3F3F46"),listInactiveSelectionIconForeground:O.fromHex("#FFFFFF"),listHoverBackground:O.fromHex("#2A2D2E"),listDropBackground:O.fromHex("#383B3D"),treeIndentGuidesStroke:O.fromHex("#a9a9a9"),tableColumnsBorder:O.fromHex("#cccccc").transparent(.2),tableOddRowsBackgroundColor:O.fromHex("#cccccc").transparent(.04)},aB={keyboardSupport:!0,mouseSupport:!0,multipleSelectionSupport:!0,dnd:{getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){}}};function lB(t,e){const i=t.indexOf(e);if(i===-1)return[];const n=[];let s=i-1;for(;s>=0&&t[s]===e-(i-s);)n.push(t[s--]);for(n.reverse(),s=i;s<t.length&&t[s]===e+(s-i);)n.push(t[s++]);return n}function o1(t,e){const i=[];let n=0,s=0;for(;n<t.length||s<e.length;)if(n>=t.length)i.push(e[s++]);else if(s>=e.length)i.push(t[n++]);else if(t[n]===e[s]){i.push(t[n]),n++,s++;continue}else t[n]<e[s]?i.push(t[n++]):i.push(e[s++]);return i}function hB(t,e){const i=[];let n=0,s=0;for(;n<t.length||s<e.length;)if(n>=t.length)i.push(e[s++]);else if(s>=e.length)i.push(t[n++]);else if(t[n]===e[s]){n++,s++;continue}else t[n]<e[s]?i.push(t[n++]):s++;return i}var bS=(t,e)=>t-e,cB=class{constructor(t,e){this._templateId=t,this.renderers=e}get templateId(){return this._templateId}renderTemplate(t){return this.renderers.map(e=>e.renderTemplate(t))}renderElement(t,e,i,n){let s=0;for(const r of this.renderers)r.renderElement(t,e,i[s++],n)}disposeElement(t,e,i,n){let s=0;for(const r of this.renderers)r.disposeElement&&r.disposeElement(t,e,i[s],n),s+=1}disposeTemplate(t){let e=0;for(const i of this.renderers)i.disposeTemplate(t[e++])}},dB=class{constructor(t){this.accessibilityProvider=t,this.templateId="a18n"}renderTemplate(t){return t}renderElement(t,e,i){const n=this.accessibilityProvider.getAriaLabel(t);n?i.setAttribute("aria-label",n):i.removeAttribute("aria-label");const s=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(t);typeof s=="number"?i.setAttribute("aria-level",`${s}`):i.removeAttribute("aria-level")}disposeTemplate(t){}},uB=class{constructor(t,e){this.list=t,this.dnd=e}getDragElements(t){const e=this.list.getSelectedElements();return e.indexOf(t)>-1?e:[t]}getDragURI(t){return this.dnd.getDragURI(t)}getDragLabel(t,e){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(t,e)}onDragStart(t,e){this.dnd.onDragStart&&this.dnd.onDragStart(t,e)}onDragOver(t,e,i,n){return this.dnd.onDragOver(t,e,i,n)}onDragLeave(t,e,i,n){var s,r;(r=(s=this.dnd).onDragLeave)===null||r===void 0||r.call(s,t,e,i,n)}onDragEnd(t){this.dnd.onDragEnd&&this.dnd.onDragEnd(t)}drop(t,e,i,n){this.dnd.drop(t,e,i,n)}},Ss=class{constructor(t,e,i,n,s=aB){var r;this.user=t,this._options=s,this.focus=new Nu("focused"),this.anchor=new Nu("anchor"),this.eventBufferer=new J1,this._ariaLabel="",this.disposables=new ne,this._onDidDispose=new M,this.onDidDispose=this._onDidDispose.event;const o=this._options.accessibilityProvider&&this._options.accessibilityProvider.getWidgetRole?(r=this._options.accessibilityProvider)===null||r===void 0?void 0:r.getWidgetRole():"list";this.selection=new iB(o!=="listbox"),ao(s,oB,!1);const a=[this.focus.renderer,this.selection.renderer];this.accessibilityProvider=s.accessibilityProvider,this.accessibilityProvi
574der&&(a.push(new dB(this.accessibilityProvider)),this.accessibilityProvider.onDidChangeActiveDescendant&&this.accessibilityProvider.onDidChangeActiveDescendant(this.onDidChangeActiveDescendant,this,this.disposables)),n=n.map(h=>new cB(h.templateId,[...a,h]));const l=Object.assign(Object.assign({},s),{dnd:s.dnd&&new uB(this,s.dnd)});if(this.view=new ws(e,i,n,l),this.view.domNode.setAttribute("role",o),s.styleController)this.styleController=s.styleController(this.view.domId);else{const h=Yi(this.view.domNode);this.styleController=new JI(h,this.view.domId)}if(this.spliceable=new jF([new Bg(this.focus,this.view,s.identityProvider),new Bg(this.selection,this.view,s.identityProvider),new Bg(this.anchor,this.view,s.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 sB(this,this.view)),(typeof s.keyboardSupport!="boolean"||s.keyboardSupport)&&(this.keyboardController=new GI(this,this.view,s),this.disposables.add(this.keyboardController)),s.keyboardNavigationLabelProvider){const h=s.keyboardNavigationDelegate||ZI;this.typeLabelController=new nB(this,this.view,s.keyboardNavigationLabelProvider,h),this.disposables.add(this.typeLabelController)}this.mouseController=this.createMouseController(s),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 $.map(this.eventBufferer.wrapEvent(this.focus.onChange),t=>this.toListEvent(t))}get onDidChangeSelection(){return $.map(this.eventBufferer.wrapEvent(this.selection.onChange),t=>this.toListEvent(t))}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 onTouchStart(){return this.view.onTouchStart}get onTap(){return this.view.onTap}get onContextMenu(){let t=!1;const e=$.chain(this.disposables.add(new Ee(this.view.domNode,"keydown")).event).map(s=>new Pe(s)).filter(s=>t=s.keyCode===58||s.shiftKey&&s.keyCode===68).map(gw).filter(()=>!1).event,i=$.chain(this.disposables.add(new Ee(this.view.domNode,"keyup")).event).forEach(()=>t=!1).map(s=>new Pe(s)).filter(s=>s.keyCode===58||s.shiftKey&&s.keyCode===68).map(gw).map(({browserEvent:s})=>{const r=this.getFocus(),o=r.length?r[0]:void 0;
574return{index:o,element:typeof o<"u"?this.view.element(o):void 0,anchor:typeof o<"u"?this.view.domElement(o):this.view.domNode,browserEvent:s}}).event,n=$.chain(this.view.onContextMenu).filter(s=>!t).map(({element:s,index:r,browserEvent:o})=>({element:s,index:r,anchor:{x:o.pageX+1,y:o.pageY},browserEvent:o})).event;return $.any(e,i,n)}get onKeyDown(){return this.disposables.add(new Ee(this.view.domNode,"keydown")).event}get onDidFocus(){return $.signal(this.disposables.add(new Ee(this.view.domNode,"focus",!0)).event)}createMouseController(t){return new QI(this)}updateOptions(t={}){var e;this._options=Object.assign(Object.assign({},this._options),t),this.typeLabelController&&this.typeLabelController.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(t),(e=this.keyboardController)===null||e===void 0||e.updateOptions(t),this.view.updateOptions(t)}get options(){return this._options}splice(t,e,i=[]){if(t<0||t>this.view.length)throw new wr(this.user,`Invalid start index: ${t}`);if(e<0)throw new wr(this.user,`Invalid delete count: ${e}`);e===0&&i.length===0||this.eventBufferer.bufferEvents(()=>this.spliceable.splice(t,e,i))}rerender(){this.view.rerender()}
574element(t){return this.view.element(t)}get length(){return this.view.length}get contentHeight(){return this.view.contentHeight}get scrollTop(){return this.view.getScrollTop()}set scrollTop(t){this.view.setScrollTop(t)}get ariaLabel(){return this._ariaLabel}set ariaLabel(t){this._ariaLabel=t,this.view.domNode.setAttribute("aria-label",t)}domFocus(){this.view.domNode.focus({preventScroll:!0})}layout(t,e){this.view.layout(t,e)}setSelection(t,e){for(const i of t)if(i<0||i>=this.length)throw new wr(this.user,`Invalid index ${i}`);this.selection.set(t,e)}getSelection(){return this.selection.get()}getSelectedElements(){return this.getSelection().map(t=>this.view.element(t))}setAnchor(t){if(typeof t>"u"){this.anchor.set([]);return}if(t<0||t>=this.length)throw new wr(this.user,`Invalid index ${t}`);this.anchor.set([t])}getAnchor(){return dy(this.anchor.get(),void 0)}getAnchorElement(){const t=this.getAnchor();return typeof t>"u"?void 0:this.element(t)}setFocus(t,e){for(const i of t)if(i<0||i>=this.length)throw new wr(this.user,`Invalid index ${i}`);this.focus.set(t,e)}focusNext(t=1,e=!1,i,n){if(this.length===0)return;const s=this.focus.get(),r=this.findNextIndex(s.length>0?s[0]+t:0,e,n);r>-1&&this.setFocus([r],i)}focusPrevious(t=1,e=!1,i,n){if(this.length===0)return;const s=this.focus.get(),r=this.findPreviousIndex(s.length>0?s[0]-t:0,e,n);r>-1&&this.setFocus([r],i)}focusNextPage(t,e){return vS(this,void 0,void 0,function*(){let i=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);i=i===0?0:i-1;
574const n=this.view.element(i),s=this.getFocusedElements()[0];if(s!==n){const r=this.findPreviousIndex(i,!1,e);r>-1&&s!==this.view.element(r)?this.setFocus([r],t):this.setFocus([i],t)}else{const r=this.view.getScrollTop();this.view.setScrollTop(r+this.view.renderHeight-this.view.elementHeight(i)),this.view.getScrollTop()!==r&&(this.setFocus([]),yield oh(0),yield this.focusNextPage(t,e))}})}focusPreviousPage(t,e){return vS(this,void 0,void 0,function*(){let i;const n=this.view.getScrollTop();n===0?i=this.view.indexAt(n):i=this.view.indexAfter(n-1);const s=this.view.element(i),r=this.getFocusedElements()[0];if(r!==s){const o=this.findNextIndex(i,!1,e);o>-1&&r!==this.view.element(o)?this.setFocus([o],t):this.setFocus([i],t)}else{const o=n;this.view.setScrollTop(n-this.view.renderHeight),this.view.getScrollTop()!==o&&(this.setFocus([]),yield oh(0),yield this.focusPreviousPage(t,e))}})}focusLast(t,e){if(this.length===0)return;const i=this.findPreviousIndex(this.length-1,!1,e);i>-1&&this.setFocus([i],t)}focusFirst(t,e){this.focusNth(0,t,e)}focusNth(t,e,i){if(this.length===0)return;const n=this.findNextIndex(t,!1,i);n>-1&&this.setFocus([n],e)}findNextIndex(t,e=!1,i){for(let n=0;n<this.length;n++){if(t>=this.length&&!e)return-1;if(t=t%this.length,!i||i(this.element(t)))return t;t++}return-1}findPreviousIndex(t,e=!1,i){for(let n=0;n<this.length;n++){if(t<0&&!e)return-1;if(t=(this.length+t%this.length)%this.length,!i||i(this.element(t)))return t;t--}return-1}getFocus(){return this.focus.get()}getFocusedElements(){return this.getFocus().map(t=>
574this.view.element(t))}reveal(t,e){if(t<0||t>=this.length)throw new wr(this.user,`Invalid index ${t}`);const i=this.view.getScrollTop(),n=this.view.elementTop(t),s=this.view.elementHeight(t);if(Lh(e)){const r=s-this.view.renderHeight;this.view.setScrollTop(r*ai(e,0,1)+n)}else{const r=n+s,o=i+this.view.renderHeight;n<i&&r>=o||(n<i||r>=o&&s>=this.view.renderHeight?this.view.setScrollTop(n):r>=o&&this.view.setScrollTop(r-this.view.renderHeight))}}getRelativeTop(t){if(t<0||t>=this.length)throw new wr(this.user,`Invalid index ${t}`);const e=this.view.getScrollTop(),i=this.view.elementTop(t),n=this.view.elementHeight(t);if(i<e||i+n>e+this.view.renderHeight)return null;const s=n-this.view.renderHeight;return Math.abs((e-i)/s)}getHTMLElement(){return this.view.domNode}style(t){this.styleController.style(t)}toListEvent({indexes:t,browserEvent:e}){return{indexes:t,elements:t.map(i=>this.view.element(i)),browserEvent:e}}_onFocusChange(){const t=this.focus.get();this.view.domNode.classList.toggle("element-focused",t.length>0),this.onDidChangeActiveDescendant()}onDidChangeActiveDescendant(){var t;const e=this.focus.get();if(e.length>0){let i;!((t=this.accessibilityProvider)===null||t===void 0)&&t.getActiveDescendantId&&(i=this.accessibilityProvider.getActiveDescendantId(this.view.element
574(e[0]))),this.view.domNode.setAttribute("aria-activedescendant",i||this.view.getElementDomId(e[0]))}else this.view.domNode.removeAttribute("aria-activedescendant")}_onSelectionChange(){const t=this.selection.get();this.view.domNode.classList.toggle("selection-none",t.length===0),this.view.domNode.classList.toggle("selection-single",t.length===1),this.view.domNode.classList.toggle("selection-multiple",t.length>1)}dispose(){this._onDidDispose.fire(),this.disposables.dispose(),this._onDidDispose.dispose()}};vo([tt],Ss.prototype,"onDidChangeFocus",null);vo([tt],Ss.prototype,"onDidChangeSelection",null);vo([tt],Ss.prototype,"onContextMenu",null);vo([tt],Ss.prototype,"onKeyDown",null);vo([tt],Ss.prototype,"onDidFocus",null);var fB=class{constructor(t,e){this.renderer=t,this.modelProvider=e}get templateId(){return this.renderer.templateId}renderTemplate(t){return{data:this.renderer.renderTemplate(t),disposable:V.None}}renderElement(t,e,i,n){if(i.disposable&&i.disposable.dispose(),!i.data)return;const s=this.modelProvider();if(s.isResolved(t))return this.renderer.renderElement(s.get(t),t,i.data,n);const r=new Ba,o=s.resolve(t,r.token);i.disposable={dispose:()=>r.cancel()},this.renderer.renderPlaceholder(t,i.data),o.then(a=>this.renderer.renderElement(a,t,i.data,n))}disposeTemplate(t){t.disposable&&(t.disposable.dispose(),t.disposable=void 0),t.data&&(this.renderer.disposeTemplate(t.data),t.data=void 0)}},gB=class{constructor(t,e){this.modelProvider=t,this.accessibilityProvider=e}getWidgetAriaLabel(){return this.accessibilityProvider.getWidgetAriaLabel()}getAriaLabel(t){const e=this.modelProvider();return e.isResolved(t)?this.accessibilityProvider.getAriaLabel(e.get(t)):null}};function mB(t,e){return Object.assign(Object.assign({},e),{accessibilityProvider:e.accessibilityProvider&&new gB(t,e.accessibilityProvider)})}var pB=class{constructor(t,e,i,n,s={}){const r=()=>this.model,o=n.map(a=>new fB(a,r));
574this.list=new Ss(t,e,i,o,mB(r,s))}updateOptions(t){this.list.updateOptions(t)}getHTMLElement(){return this.list.getHTMLElement()}get onDidFocus(){return this.list.onDidFocus}get onDidDispose(){return this.list.onDidDispose}get onMouseDblClick(){return $.map(this.list.onMouseDblClick,({element:t,index:e,browserEvent:i})=>({element:t===void 0?void 0:this._model.get(t),index:e,browserEvent:i}))}get onPointer(){return $.map(this.list.onPointer,({element:t,index:e,browserEvent:i})=>({element:t===void 0?void 0:this._model.get(t),index:e,browserEvent:i}))}get onDidChangeSelection(){return $.map(this.list.onDidChangeSelection,({elements:t,indexes:e,browserEvent:i})=>({elements:t.map(n=>this._model.get(n)),indexes:e,browserEvent:i}))}get model(){return this._model}set model(t){this._model=t,this.list.splice(0,this.list.length,At(t.length))}getFocus(){return this.list.getFocus()}getSelection(){return this.list.getSelection()}getSelectedElements(){return this.getSelection().map(t=>this.model.get(t))}style(t){this.list.style(t)}dispose(){this.list.dispose()}},_B={separatorBorder:O.transparent},eE=class{constructor(t,e,i,n){this.container=t,this.view=e,this.disposable=n,this._cachedVisibleSize=void 0,typeof i=="number"?(this._size=i,this._cachedVisibleSize=void 0,t.classList.add("visible")):(this._size=0,this._cachedVisibleSize=i.cachedVisibleSize)}set size(t){this._size=t}get size(){return this._size}get visible(){return typeof this._cachedVisibleSize>"u"}setVisible(t,e){t!==this.visible&&(t?(this.size=ai(this._cachedVisibleSize,this.viewMinimumSize,this.viewMaximumSize),this._cachedVisibleSize=void 0):(this._cachedVisibleSize=typeof e=="number"?e:this.size,this.size=0),this.container.classList.toggle("visible",t),this.view.setVisible&&this.view.setVisible(t))}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(t){this.container.style.pointerEvents=t?"":"none"}layout(t,e){this.layoutContainer(t),this.view.layout(this.size,t,e)}dispose(){return this.disposable.dispose(),this.view}},vB=class extends eE{layoutContainer(t){this.container.style.top=`${t}px`,this.container.style.height=`${this.size}px`}},CB=class extends eE{layoutContainer(t){this.container.style.left=`${t}px`,this.container.style.width=`${this.size}px`}},ls;(function(t){t[t.Idle=0]="Idle",t[t.Busy=1]="Busy"})(ls||(ls={}));var wS;(function(t){t.Distribute={type:"distribute"};function e(n){return{type:"split",index:n}}t.Split=e;function i(n){return{type:"invisible",cachedVisibleSize:n}}t.Invisible=i})(wS||(wS={}));var bB=class extends V{constructor(t,e={}){var i,n,s,r,o;super(),this.size=0,this.contentSize=0,this.proportions=void 0,this.viewItems=[],this.sashItems=[],this.state=ls.Idle,this._onDidSashChange=this._register(new M),this._onDidSashReset=this._register(new M),this._startSnappingEnabled=!0,this._endSnappingEnabled=!0,this.onDidSashChange=this._onDidSashChange.event,this.onDidSashReset=this._onDidSashReset.event,this.orientation=(i=e.orientation)!==null&&i!==void 0?i:0,this.inverseAltBehavior=(n=e.inverseAltBehavior)!==null&&n!==void 0?n:!1,this.proportionalLayout=(s=e.proportionalLayout)!==null&&s!==void 0?s:!0,this.getSashOrthogonalSize=e.getSashOrthogonalSize,this.el=document.createElement("div"),this.el.classList.add("monaco-split-view2"),this.el.classList.add(this.orientation===0?"vertical":"horizontal"),t.appendChild(this.el),this.sashContainer=z(this.el,Q(".sash-container")),this.viewContainer=Q(".split-view-container"),this.scrollable=new Wh({forceIntegerValues:!0,smoothScrollDuration:125,scheduleAtNextAnimationFrame:Cn}),this.scrollableElement=this._register(new $v(this.viewContainer,{vertical:this.orientation===0?(r=e.scrollbarVisibility)!==null&&r!==void 0?r:1:2,horizontal:this.orientation===1?(o=e.scrollbarVisibility)!==null&&o!==void 0?o:1:2},this.scrollable)),this.onDidScroll=this.scrollableElement.onScroll,this._register(this.onDidScroll(a=>{this.viewContainer.scrollTop=a.scrollTop,this.viewContainer.scrollLeft=a.scrollLeft})),z(this.el,this.scrollableElement.getDomNode()),this.style(e.styles||_B),e.descriptor&&(this.size=e.descriptor.size,e.descriptor.views.forEach((a,l)=>{const h=gn(a.visible)||a.visible?a.size:{type:"invisible",cachedVisibleSize:a.size},c=a.view;this.doAddView(c,h,l,!0)}),this.contentSize=this.viewItems.reduce((a,l)=>a+l.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(t){for(const e of this.sashItems)e.sash.orthogonalStartSash=t;this._orthogonalStartSash=t}set orthogonalEndSash(t){for(const e of this.sashItems)e.sash.orthogonalEndSash=t;this._orthogonalEndSash=t}set startSnappingEnabled(t){this._startSnappingEnabled!==t&&(this._startSnappingEnabled=t,this.updateSashEnablement())}set endSnappingEnabled(t){this._endSnappingEnabled!==t&&(this._endSnappingEnabled=t,this.updateSashEnablement())}
574style(t){t.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",t.separatorBorder.toString()))}addView(t,e,i=this.viewItems.length,n){this.doAddView(t,e,i,n)}layout(t,e){const i=Math.max(this.size,this.contentSize);if(this.size=t,this.layoutContext=e,this.proportions)for(let n=0;n<this.viewItems.length;n++){const s=this.viewItems[n];s.size=ai(Math.round(this.proportions[n]*t),s.minimumSize,s.maximumSize)}else{const n=At(this.viewItems.length),s=n.filter(o=>this.viewItems[o].priority===1),r=n.filter(o=>this.viewItems[o].priority===2);this.resize(this.viewItems.length-1,t-i,void 0,s,r)}this.distributeEmptySpace(),this.layoutViews()}saveProportions(){this.proportionalLayout&&this.contentSize>0&&(this.proportions=this.viewItems.map(t=>t.size/this.contentSize))}onSashStart({sash:t,start:e,alt:i}){for(const o of this.viewItems)o.enabled=!1;const n=this.sashItems.findIndex(o=>o.sash===t),s=Ur(B(document.body,"keydown",o=>r(this.sashDragState.current,o.altKey)),B(document.body,"keyup",()=>r(this.sashDragState.current,!1))),r=(o,a)=>{const l=this.viewItems.map(g=>g.size);let h=Number.NEGATIVE_INFINITY,c=Number.POSITIVE_INFINITY;if(this.inverseAltBehavior&&(a=!a),a)if(n===this.sashItems.length-1){const g=this.viewItems[n];h=(g.minimumSize-g.size)/2,c=(g.maximumSize-g.size)/2}else{const g=this.viewItems[n+1];h=(g.size-g.maximumSize)/2,c=(g.size-g.minimumSize)/2}let d,u;if(!a){const g=At(n,-1),m=At(n+1,this.viewItems.length),_=g.reduce((L,x)=>L+(this.viewItems[x].minimumSize-l[x]),0),C=g.reduce((L,x)=>L+(this.viewItems[x].viewMaximumSize-l[x]),0),w=m.length===0?Number.POSITIVE_INFINITY:m.reduce((L,x)=>L+(l[x]-this.viewItems[x].minimumSize),0),v=m.length===0?Number.NEGATIVE_INFINITY:m.reduce((L,x)=>L+(l[x]-this.viewItems[x].viewMaximumSize),0),b=Math.max(_,v),y=Math.min(w,C),k=this.findFirstSnapIndex(g),S=this.findFirstSnapIndex(m);if(typeof k=="number"){const L=this.viewItems[k],x=Math.floor(L.viewMinimumSize/2);d={index:k,limitDelta:L.visible?b-x:b+x,size:L.size}}if(typeof S=="number"){const L=this.viewItems[S],x=Math.floor(L.viewMinimumSize/2);u={index:S,limitDelta:L.visible?y+x:y-x,size:L.size}}}this.sashDragState={start:o,current:o,index:n,sizes:l,minDelta:h,maxDelta:c,alt:a,snapBefore:d,snapAfter:u,disposable:s}};r(e,i)}onSashChange({current:t}){const{index:e,start:i,sizes:n,alt:s,minDelta:r,maxDelta:o,snapBefore:a,snapAfter:l}=this.sashDragState;this.sashDragState.current=t;const h=t-i,c=this.resize(e,h,n,void 0,void 0,r,o,a,l);if(s){const d=e===this.sashItems.length-1,u=this.viewItems.map(v=>v.size),g=d?e:e+1,m=this.viewItems[g],_=m.size-m.maximumSize,C=m.size-m.minimumSize,w=d?e-1:e+1;this.resize(w,-c,u,void 0,void 0,_,C)}this.distributeEmptySpace(),this.layoutViews()}onSashEnd(t){this._onDidSashChange.fire(t),this.sashDragState.disposable.dispose(),this.saveProportions();for(const e of this.viewItems)e.enabled=!0}onViewChange(t,e){const i=this.viewItems.indexOf(t);i<0||i>=this.viewItems.length||(e=typeof e=="number"?e:t.size,e=ai(e,t.minimumSize,t.maximumSize),this.inverseAltBehavior&&i>0?(this.resize(i-1,Math.floor((t.size-e)/2)),this.distributeEmptySpace(),this.layoutViews()):(t.size=e,this.relayout([i],void 0)))}resizeView(t,e){if(this.state!==ls.Idle)throw new Error("Cant modify splitview");if(this.state=ls.Busy,t<0||t>=this.viewItems.length)return;const i=At(this.viewItems.length).filter(o=>o!==t),n=[...i.filter(o=>this.viewItems[o].priority===1),t],s=i.filter(o=>this.viewItems[o].priority===2),r=this.viewItems[t];e=Math.round(e),e=ai(e,r.minimumSize,Math.min(r.maximumSize,this.size)),r.size=e,this.relayout(n,s),this.state=ls.Idle}distributeViewSizes(){const t=[];let e=0;for(const o of this.viewItems)o.maximumSize-o.minimumSize>0&&(t.push(o),e+=o.size);const i=Math.floor(e/t.length);for(const o of t)o.size=ai(i,o.minimumSize,o.maximumSize);const n=At(this.viewItems.length),s=n.filter(o=>this.viewItems[o].priority===1),r=n.filter(o=>this.viewItems[o].priority===2);this.relayout(s,r)}getViewSize(t){return t<0||t>=this.viewItems.length?-1:this.viewItems[t].size}
574doAddView(t,e,i=this.viewItems.length,n){if(this.state!==ls.Idle)throw new Error("Cant modify splitview");this.state=ls.Busy;const s=Q(".split-view-view");i===this.viewItems.length?this.viewContainer.appendChild(s):this.viewContainer.insertBefore(s,this.viewContainer.children.item(i));const r=t.onDidChange(d=>this.onViewChange(h,d)),o=Ae(()=>this.viewContainer.removeChild(s)),a=Ur(r,o);let l;typeof e=="number"?l=e:e.type==="split"?l=this.getViewSize(e.index)/2:e.type==="invisible"?l={cachedVisibleSize:e.cachedVisibleSize}:l=t.minimumSize;const h=this.orientation===0?new vB(s,t,l,a):new CB(s,t,l,a);if(this.viewItems.splice(i,0,h),this.viewItems.length>1){let d={orthogonalStartSash:this.orthogonalStartSash,orthogonalEndSash:this.orthogonalEndSash};const u=this.orientation===0?new vu(this.sashContainer,{getHorizontalSashTop:b=>this.getSashPosition(b),getHorizontalSashWidth:this.getSashOrthogonalSize},Object.assign(Object.assign({},d),{orientation:1})):new vu(this.sashContainer,{getVerticalSashLeft:b=>this.getSashPosition(b),getVerticalSashHeight:this.getSashOrthogonalSize},Object.assign(Object.assign({},d),{orientation:0})),g=this.orientation===0?b=>({sash:u,start:b.startY,current:b.currentY,alt:b.altKey}):b=>({sash:u,start:b.startX,current:b.currentX,alt:b.altKey}),m=$.map(u.onDidStart,g)(this.onSashStart,this),_=$.map(u.onDidChange,g)(this.onSashChange,this),C=$.map(u.onDidEnd,()=>this.sashItems.findIndex(b=>b.sash===u))(this.onSashEnd,this),w=u.onDidReset(()=>{const b=this.sashItems.findIndex(x=>x.sash===u),y=At(b,-1),k=At(b+1,this.viewItems.length),S=this.findFirstSnapIndex(y),L=this.findFirstSnapIndex(k);typeof S=="number"&&!this.viewItems[S].visible||typeof L=="number"&&!this.viewItems[L].visible||this._onDidSashReset.fire(b)}),v={sash:u,disposable:Ur(m,_,C,w,u)};this.sashItems.splice(i-1,0,v)}s.appendChild(t.element);let c;typeof e!="number"&&e.type==="split"&&(c=[e.index]),n||this.relayout([i],c),this.state=ls.Idle,!n&&typeof e!="number"&&e.type==="distribute"&&this.distributeViewSizes()}relayout(t,e){const i=this.viewItems.reduce((n,s)=>n+s.size,0);this.resize(this.viewItems.length-1,this.size-i,void 0,t,e),this.distributeEmptySpace(),this.layoutViews(),this.saveProportions()}resize(t,e,i=this.viewItems.map(h=>h.size),n,s,r=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY,a,l){if(t<0||t>=this.viewItems.length)return 0;const h=At(t,-1),c=At(t+1,this.viewItems.length);if(s)for(const S of s)bf(h,S),bf(c,S);if(n)for(const S of n)Zh(h,S),Zh(c,S);const d=h.map(S=>this.viewItems[S]),u=h.map(S=>i[S]),g=c.map(S=>this.viewItems[S]),m=c.map(S=>i[S]),_=h.reduce((S,L)=>S+(this.viewItems[L].minimumSize-i[L]),0),C=h.reduce((S,L)=>S+(this.viewItems[L].maximumSize-i[L]),0),w=c.length===0?Number.POSITIVE_INFINITY:c.reduce((S,L)=>S+(i[L]-this.viewItems[L].minimumSize),0),v=c.length===0?Number.NEGATIVE_INFINITY:c.reduce((S,L)=>S+(i[L]-this.viewItems[L].maximumSize),0),b=Math.max(_,v,r),y=Math.min(w,C,o);let k=!1;if(a){const S=this.viewItems[a.index],L=e>=a.limitDelta;k=L!==S.visible,S.setVisible(L,a.size)}if(!k&&l){const S=this.viewItems[l.index],L=e<l.limitDelta;k=L!==S.visible,S.setVisible(L,l.size)}if(k)return this.resize(t,e,i,n,s,r,o);e=ai(e,b,y);for(let S=0,L=e;S<d.length;S++){const x=d[S],E=ai(u[S]+L,x.minimumSize,x.maximumSize),R=E-u[S];L-=R,x.size=E}for(let S=0,L=e;S<g.length;S++){const x=g[S],E=ai(m[S]-L,x.minimumSize,x.maximumSize),R=E-m[S];L+=R,x.size=E}return e}distributeEmptySpace(t){const e=this.viewItems.reduce((o,a)=>o+a.size,0);let i=this.size-e;const n=At(this.viewItems.length-1,-1),s=n.filter(o=>this.viewItems[o].priority===1),r=n.filter(o=>this.viewItems[o].priority===2);for(const o of r)bf(n,o);for(const o of s)Zh(n,o);typeof t=="number"&&Zh(n,t);for(let o=0;i!==0&&o<n.length;o++){const a=this.viewItems[n[o]],l=ai(a.size+i,a.minimumSize,a.maximumSize),h=l-a.size;i-=h,a.size=l}}layoutViews(){this.contentSize=this.viewItems.reduce((e,i)=>e+i.size,0);let t=0;for(const e of this.viewItems)e.layout(t,this.layoutContext),t+=e.size;this.sashItems.forEach(e=>e.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 t=!1;const e=this.viewItems.map(a=>t=a.size-a.minimumSize>0||t);t=!1;const i=this.viewItems.map(a=>t=a.maximumSize-a.size>0||t),n=[...this.viewItems].reverse();t=!1;const s=n.map(a=>t=a.size-a.minimumSize>0||t).reverse();t=!1;const r=n.map(a=>t=a.maximumSize-a.size>0||t).reverse();let o=0;for(let a=0;a<this.sashItems.length;a++){const{sash:l}=this.sashItems[a],h=this.viewItems[a];o+=h.size;const c=!(e[a]&&r[a+1]),d=!(i[a]&&s[a+1]);if(c&&d){const u=At(a,-1),g=At(a+1,this.viewItems.length),m=this.findFirstSnapIndex(u),_=this.findFirstSnapIndex(g),C=typeof m=="number"&&!this.viewItems[m].visible,w=typeof _=="number"&&!this.viewItems[_].visible;C&&s[a]&&(o>0||this.startSnappingEnabled)?l.state=1:w&&e[a]&&(o<this.contentSize||this.endSnappingEnabled)?l.state=2:l.state=0}else c&&!d?l.state=1:!c&&d?l.state=2:l.state=3}}getSashPosition(t){let e=0;for(let i=0;i<this.sashItems.length;i++)if(e+=this.viewItems[i].size,this.sashItems[i].sash===t)return e;return 0}findFirstSnapIndex(t){for(const e of t){const i=this.viewItems[e];if(i.visible&&i.snap)return e}for(const e of t){const i=this.viewItems[e];if(i.visible&&i.maximumSize-i.minimumSize>0)return;if(!i.visible&&i.snap)return e}}dispose(){super.dispose(),De(this.viewItems),this.viewItems=[],this.sashItems.forEac
574h(t=>t.disposable.dispose()),this.sashItems=[]}},v0=class tE{constructor(e,i,n){this.columns=e,this.getColumnSize=n,this.templateId=tE.TemplateId,this.renderedTemplates=new Set;const s=new Map(i.map(r=>[r.templateId,r]));this.renderers=[];for(const r of e){const o=s.get(r.templateId);if(!o)throw new Error(`Table cell renderer for template id ${r.templateId} not found.`);this.renderers.push(o)}}renderTemplate(e){const i=z(e,Q(".monaco-table-tr")),n=[],s=[];for(let o=0;o<this.columns.length;o++){const a=this.renderers[o],l=z(i,Q(".monaco-table-td",{"data-col-index":o}));l.style.width=`${this.getColumnSize(o)}px`,n.push(l),s.push(a.renderTemplate(l))}const r={container:e,cellContainers:n,cellTemplateData:s};return this.renderedTemplates.add(r),r}renderElement(e,i,n,s){for(let r=0;r<this.columns.length;r++){const o=this.columns[r].project(e);this.renderers[r].renderElement(o,i,n.cellTemplateData[r],s)}}disposeElement(e,i,n,s){for(let r=0;r<this.columns.length;r++){const o=this.renderers[r];if(o.disposeElement){const a=this.columns[r].project(e);o.disposeElement(a,i,n.cellTemplateData[r],s)}}}disposeTemplate(e){for(let i=0;i<this.columns.length;i++)this.renderers[i].disposeTemplate(e.cellTemplateData[i]);Ei(e.container),this.renderedTemplates.delete(e)}layoutColumn(e,i){for(const{cellContainers:n}of this.renderedTemplates)n[e].style.width=`${i}px`}};v0.TemplateId="row";function wB(t){return{getHeight(e){return t.getHeight(e)},getTemplateId(){return v0.TemplateId}}}var SB=class{constructor(t,e){this.column=t,this.index=e,this._onDidLayout=new M,this.onDidLayout=this._onDidLayout.event,this.element=Q(".monaco-table-th",{"data-col-index":e,title:t.tooltip},t.label)}get minimumSize(){var t;return(t=this.column.minimumWidth)!==null&&t!==void 0?t:120}get maximumSize(){var t;return(t=this.column.maximumWidth)!==null&&t!==void 0?t:Number.POSITIVE_INFINITY}get onDidChange(){var t;return(t=this.column.onDidChangeWidthConstraints)!==null&&t!==void 0?t:$.None}layout(t){this._onDidLayout.fire([this.index,t])}},iE=class nE{constructor(e,i,n,s,r,o){this.virtualDelegate=n,this.domId=`table_id_${++nE.InstanceCount}`,this.disposables=new ne,this.cachedWidth=0,this.cachedHeight=0,this.domNode=z(i,Q(`.monaco-table.${this.domId}`));const a=s.map((c,d)=>new SB(c,d)),l={size:a.reduce((c,d)=>c+d.column.weight,0),views:a.map(c=>({size:c.column.weight,view:c}))};this.splitview=this.disposables.add(new bB(this.domNode,{orientation:1,scrollbarVisibility:2,getSashOrthogonalSize:()=>this.cachedHeight,descriptor:l})),this.splitview.el.style.height=`${n.headerRowHeight}px`,this.splitview.el.style.lineHeight=`${n.headerRowHeight}px`;const h=new v0(s,r,c=>this.splitview.getViewSize(c));this.list=this.disposables.add(new Ss(e,this.domNode,wB(n),[h],o)),$.any(...a.map(c=>c.onDidLayout))(([c,d])=>h.layoutColumn(c,d),null,this.disposables),this.splitview.onDidSashReset(c=>{const d=s.reduce((g,m)=>g+m.weight,0),u=s[c].weight/d*this.cachedWidth;this.splitview.resizeView(c,u)},null,this.disposables),this.styleElement=Yi(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(e){this.list.updateOptions(e)}splice(e,i,n=[]){this.list.splice(e,i,n)}getHTMLElement(){return this.domNode}style(e){const i=[];i.push(`.monaco-table.${this.domId} > .monaco-split-view2 .monaco-sash.vertical::before {
575			top: ${this.virtualDelegate.headerRowHeight+1}px;
576			height: calc(100% - ${this.virtualDelegate.headerRowHeight}px);
577		}`),this.styleElement.textContent=i.join(`
578`),this.list.style(e)}getSelectedElements(){return this.list.getSelectedElements()}getSelection(){return this.list.getSelection()}getFocus(){return this.list.getFocus()}dispose(){this.disposables.dispose()}};iE.InstanceCount=0;var eh;(function(t){t[t.Unknown=0]="Unknown",t[t.Twistie=1]="Twistie",t[t.Element=2]="Element"})(eh||(eh={}));
578var yi=class extends Error{constructor(t,e){super(`TreeError [${t}] ${e}`)}},C0=class{constructor(t){this.fn=t,this._map=new WeakMap}map(t){let e=this._map.get(t);return e||(e=this.fn(t),this._map.set(t,e)),e}};function b0(t){return typeof t=="object"&&"visibility"in t&&"data"in t}function Ch(t){switch(t){case!0:return 1;case!1:return 0;default:return t}}function Vg(t){return typeof t.collapsible=="boolean"}var yB=class{constructor(t,e,i,n={}){this.user=t,this.list=e,this.rootRef=[],this.eventBufferer=new J1,this._onDidChangeCollapseState=new M,this.onDidChangeCollapseState=this.eventBufferer.wrapEvent(this._onDidChangeCollapseState.event),this._onDidChangeRenderNodeCount=new M,this.onDidChangeRenderNodeCount=this.eventBufferer.wrapEvent(this._onDidChangeRenderNodeCount.event),this._onDidSplice=new M,this.onDidSplice=this._onDidSplice.event,this.refilterDelayer=new Ha(uL),this.collapseByDefault=typeof n.collapseByDefault>"u"?!1:n.collapseByDefault,this.filter=n.filter,this.autoExpandSingleChildren=typeof n.autoExpandSingleChildren>"u"?!1:n.autoExpandSingleChildren,this.root={parent:void 0,element:i,children:[],depth:0,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:!1,collapsed:!1,renderNodeCount:0,visibility:1,visible:!0,filterData:void 0}}splice(t,e,i=he.empty(),n={}){if(t.length===0)throw new yi(this.user,"Invalid tree location");n.diffIdentityProvider?this.spliceSmart(n.diffIdentityProvider,t,e,i,n):this.spliceSimple(t,e,i,n)}spliceSmart(t,e,i,n,s,r){var o;n===void 0&&(n=he.empty()),r===void 0&&(r=(o=s.diffDepth)!==null&&o!==void 0?o:0);const{parentNode:a}=this.getParentNodeWithListIndex(e);if(!a.lastDiffIds)return this.spliceSimple(e,i,n,s);const l=[...n],h=e[e.length-1],c=new bv({getElements:()=>a.lastDiffIds},{getElements:()=>[...a.children.slice(0,h),...l,...a.children.slice(h+i)].map(_=>t.getId(_.element).toString())}).ComputeDiff(!1);if(c.quitEarly)return a.lastDiffIds=void 0,this.spliceSimple(e,i,l,s);const d=e.slice(0,-1),u=(_,C,w)=>{if(r>0)for(let v=0;v<w;v++)_--,C--,this.spliceSmart(t,[...d,_,0],Number.MAX_SAFE_INTEGER,l[C].children,s,r-1)};let g=Math.min(a.children.length,h+i),m=l.length;for(const _ of c.changes.sort((C,w)=>w.originalStart-C.originalStart))u(g,m,g-(_.originalStart+_.originalLength)),g=_.originalStart,m=_.modifiedStart-h,this.spliceSimple([...d,g],_.originalLength,he.slice(l,m,m+_.modifiedLength),s);u(g,m,g)}spliceSimple(t,e,i=he.empty(),{onDidCreateNode:n,onDidDeleteNode:s,diffIdentityProvider:r}){const{parentNode:o,listIndex:a,revealed:l,visible:h}=this.getParentNodeWithListIndex(t),c=[],d=he.map(i,S=>this.createTreeNode(S,o,o.visible?1:0,l,c,n)),u=t[t.length-1],g=o.children.length>0;let m=0;for(let S=u;S>=0&&S<o.children.length;S--){const L=o.children[S];if(L.visible){m=L.visibleChildIndex;break}}const _=[];let C=0,w=0;
578for(const S of d)_.push(S),w+=S.renderNodeCount,S.visible&&(S.visibleChildIndex=m+C++);const v=H0(o.children,u,e,_);r?o.lastDiffIds?H0(o.lastDiffIds,u,e,_.map(S=>r.getId(S.element).toString())):o.lastDiffIds=o.children.map(S=>r.getId(S.element).toString()):o.lastDiffIds=void 0;let b=0;for(const S of v)S.visible&&b++;if(b!==0)for(let S=u+_.length;S<o.children.length;S++){const L=o.children[S];L.visible&&(L.visibleChildIndex-=b)}if(o.visibleChildrenCount+=C-b,l&&h){const S=v.reduce((L,x)=>L+(x.visible?x.renderNodeCount:0),0);this._updateAncestorsRenderNodeCount(o,w-S),this.list.splice(a,S,c)}if(v.length>0&&s){const S=L=>{s(L),L.children.forEach(S)};v.forEach(S)}this._onDidSplice.fire({insertedNodes:_,deletedNodes:v});const y=o.children.length>0;g!==y&&this.setCollapsible(t.slice(0,-1),y);let k=o;for(;k;){if(k.visibility===2){this.refilterDelayer.trigger(()=>this.refilter());break}k=k.parent}}rerender(t){if(t.length===0)throw new yi(this.user,"Invalid tree location");const{node:e,listIndex:i,revealed:n}=this.getTreeNodeWithListIndex(t);e.visible&&n&&this.list.splice(i,1,[e])}has(t){return this.hasTreeNode(t)}getListIndex(t){const{listIndex:e,visible:i,revealed:n}=this.getTreeNodeWithListIndex(t);return i&&n?e:-1}getListRenderCount(t){return this.getTreeNode(t).renderNodeCount}isCollapsible(t){return this.getTreeNode(t).collapsible}setCollapsible(t,e){const i=this.getTreeNode(t);typeof e>"u"&&(e=!i.collapsible);const n={collapsible:e};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(t,n))}isCollapsed(t){return this.getTreeNode(t).collapsed}setCollapsed(t,e,i){const n=this.getTreeNode(t);typeof e>"u"&&(e=!n.collapsed);const s={collapsed:e,recursive:i||!1};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(t,s))}_setCollapseState(t,e){const{node:i,listIndex:n,revealed:s}=this.getTreeNodeWithListIndex(t),r=this._setListNodeCollapseState(i,n,s,e);if(i!==this.root&&this.autoExpandSingleChildren&&r&&!Vg(e)&&i.collapsible&&!i.collapsed&&!e.recursive){let o=-1;for(let a=0;a<i.children.length;a++)if(i.children[a].visible)if(o>-1){o=-1;break}else o=a;o>-1&&this._setCollapseState([...t,o],e)}return r}_setListNodeCollapseState(t,e,i,n){const s=this._setNodeCollapseState(t,n,!1);if(!i||!t.visible||!s)return s;const r=t.renderNodeCount,o=this.updateNodeAfterCollapseChange(t),a=r-(e===-1?0:1);return this.list.splice(e+1,a,o.slice(1)),s}_setNodeCollapseState(t,e,i){let n;if(t===this.root?n=!1:(Vg(e)?(n=t.collapsible!==e.collapsible,t.collapsible=e.collapsible):t.collapsible?(n=t.collapsed!==e.collapsed,t.collapsed=e.collapsed):n=!1,n&&this._onDidChangeCollapseState.fire({node:t,deep:i})),!Vg(e)&&e.recursive)for(const s of t.children)n=this._setNodeCollapseState(s,e,!0)||n;return n}expandTo(t){this.eventBufferer.bufferEvents(()=>{let e=this.getTreeNode(t);for(;e.parent;)e=e.parent,t=t.slice(0,t.length-1),e.collapsed&&this._setCollapseState(t,{collapsed:!1,recursive:!1})})}refilter(){const t=this.root.renderNodeCount,e=this.updateNodeAfterFilterChange(this.root);this.list.splice(0,t,e),this.refilterDelayer.cancel()}createTreeNode(t,e,i,n,s,r){const o={parent:e,element:t.element,children:[],depth:e.depth+1,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:typeof t.collapsible=="boolean"?t.collapsible:typeof t.collapsed<"u",collapsed:typeof t.collapsed>"u"?this.collapseByDefault:t.collapsed,renderNodeCount:1,visibility:1,visible:!0,filterData:void 0},a=this._filterNode(o,i);o.visibility=a,n&&s.push(o);const l=t.children||he.empty(),h=n&&a!==0&&!o.collapsed,c=he.map(l,g=>this.createTreeNode(g,o,a,h,s,r));let d=0,u=1;for(const g of c)o.children.push(g),u+=g.renderNodeCount,g.visible&&(g.visibleChildIndex=d++);return o.collapsible=o.collapsible||o.children.length>0,o.visibleChildrenCount=d,o.visible=a===2?d>0:a===1,o.visible?o.collapsed||(o.renderNodeCount=u):(o.renderNodeCount=0,n&&s.pop()),r&&r(o),o}updateNodeAfterCollapseChange(t){const e=t.renderNodeCount,i=[];return this._updateNodeAfterCollapseChange(t,i),this._updateAncestorsRenderNodeCount(t.parent,i.length-e),i}_updateNodeAfterCollapseChange(t,e){if(t.visible===!1)return 0;if(e.push(t),t.renderNodeCount=1,!t.collapsed)for(const i of t.children)t.renderNodeCount+=this._updateNodeAfterCollapseChange(i,e);return this._onDidChangeRenderNodeCount.fire(t),t.renderNodeCount}updateNodeAfterFilterChange(t){const e=t.renderNodeCount,i=[];return this._updateNodeAfterFilterChange(t,t.visible?1:0,i),this._updateAncestorsRenderNodeCount(t.parent,i.length-e),i}_updateNodeAfterFilterChange(t,e,i,n=!0){let s;if(t!==this.root){if(s=this._filterNode(t,e),s===0)return t.visible=!1,t.renderNodeCount=0,!1;n&&i.push(t)}const r=i.length;t.renderNodeCount=t===this.root?0:1;let o=!1;if(!t.collapsed||s!==0){let a=0;for(const l of t.children)o=this._updateNodeAfterFilterChange(l,s,i,n&&!t.collapsed)||o,l.visible&&(l.visibleChildIndex=a++);t.visibleChildrenCount=a}else t.visibleChildrenCount=0;return t!==this.root&&(t.visible=s===2?o:s===1,t.visibility=s),t.visible?t.collapsed||(t.renderNodeCount+=i.length-r):(t.renderNodeCount=0,n&&i.pop()),this._onDidChangeRenderNodeCount.fire(t),t.visible}_updateAncestorsRenderNodeCount(t,e){if(e!==0)for(;t;)t.renderNodeCount+=e,this._onDidChangeRenderNodeCount.fire(t),t=t.parent}_filterNode(t,e){const i=this.filter?this.filter.filter(t.element,e):1;return typeof i=="boolean"?(t.filterData=void 0,i?1:0):b0(i)?(t.filterData=i.data,Ch(i.visibility)):(t.filterData=void 0,Ch(i))}hasTreeNode(t,e=this.root){if(!t||t.length===0)return!0;const[i,...n]=t;return i<0||i>e.children.length?!1:this.hasTreeNode(n,e.children[i])}getTreeNode(t,e=this.root){if(!t||t.length===0)return e;const[i,...n]=t;if(i<0||i>e.children.length)throw new yi(this.user,"Invalid tree location");return this.getTreeNode(n,e.children[i])}getTreeNodeWithListIndex(t){if(t.length===0)return{node:this.root,listIndex:-1,revealed:!0,visible:!1};const{parentNode:e,listIndex:i,revealed:n,visible:s}=this.getParentNodeWithListIndex(t),r=t[t.length-1];if(r<0||r>e.children.length)throw new yi(this.user,"Invalid tree location");const o=e.children[r];return{node:o,listIndex:i,revealed:n,visible:s&&o.visible}}getParentNodeWithListIndex(t,e=this.root,i=0,n=!0,s=!0){const[r,...o]=t;if(r<0||r>e.children.length)throw new yi(this.user,"Invalid tree location");for(let a=0;a<r;a++)i+=e.children[a].renderNodeCount;return n=n&&!e.collapsed,s=s&&e.visible,o.length===0?{parentNode:e,listIndex:i,revealed:n,visible:s}:this.getParentNodeWithListIndex(o,e.children[r],i+1,n,s)}getNode(t=[]){return this.getTreeNode(t)}
578getNodeLocation(t){const e=[];let i=t;for(;i.parent;)e.push(i.parent.children.indexOf(i)),i=i.parent;return e.reverse()}getParentNodeLocation(t){if(t.length!==0)return t.length===1?[]:jD(t)[0]}getFirstElementChild(t){const e=this.getTreeNode(t);if(e.children.length!==0)return e.children[0].element}},LB=class extends $h{constructor(t){super(t.elements.map(e=>e.element)),this.data=t}};function Wg(t){return t instanceof $h?new LB(t):t}var kB=class{constructor(t,e){this.modelProvider=t,this.dnd=e,this.autoExpandDisposable=V.None}getDragURI(t){return this.dnd.getDragURI(t.element)}getDragLabel(t,e){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(t.map(i=>i.element),e)}onDragStart(t,e){this.dnd.onDragStart&&this.dnd.onDragStart(Wg(t),e)}onDragOver(t,e,i,n,s=!0){const r=this.dnd.onDragOver(Wg(t),e&&e.element,i,n),o=this.autoExpandNode!==e;if(o&&(this.autoExpandDisposable.dispose(),this.autoExpandNode=e),typeof e>"u")return r;if(o&&typeof r!="boolean"&&r.autoExpand&&(this.autoExpandDisposable=Jm(()=>{const d=this.modelProvider(),u=d.getNodeLocation(e);d.isCollapsed(u)&&d.setCollapsed(u,!1),this.autoExpandNode=void 0},500)),typeof r=="boolean"||!r.accept||typeof r.bubble>"u"||r.feedback)return s?r:{accept:typeof r=="boolean"?r:r.accept,effect:typeof r=="boolean"?void 0:r.effect,feedback:[i]};if(r.bubble===1){const d=this.modelProvider(),u=d.getNodeLocation(e),g=d.getParentNodeLocation(u),m=d.getNode(g),_=g&&d.getListIndex(g);return this.onDragOver(t,m,_,n,!1)}const a=this.modelProvider(),l=a.getNodeLocation(e),h=a.getListIndex(l),c=a.getListRenderCount(l);return Object.assign(Object.assign({},r),{feedback:At(h,h+c)})}drop(t,e,i,n){this.autoExpandDisposable.dispose(),this.autoExpandNode=void 0,this.dnd.drop(Wg(t),e&&e.element,i,n)}onDragEnd(t){this.dnd.onDragEnd&&this.dnd.onDragEnd(t)}};function xB(t,e){return e&&Object.assign(Object.assign({},e),{identityProvider:e.identityProvider&&{getId(i){return e.identityProvider.getId(i.element)}},dnd:e.dnd&&new kB(t,e.dnd),multipleSelectionController:e.multipleSelectionController&&{isSelectionSingleChangeEvent(i){return e.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},i),{element:i.element}))},isSelectionRangeChangeEvent(i){return e.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},i),{element:i.element}))}},accessibilityProvider:e.accessibilityProvider&&Object.assign(Object.assign({},e.accessibilityProvider),{getSetSize(i){const n=t(),s=n.getNodeLocation(i),r=n.getParentNodeLocation(s);return n.getNode(r).visibleChildrenCount},getPosInSet(i){return i.visibleChildIndex+1},isChecked:e.accessibilityProvider&&e.accessibilityProvider.isChecked?i=>e.accessibilityProvider.isChecked(i.element):void 0,getRole:e.accessibilityProvider&&e.accessibilityProvider.getRole?i=>e.accessibilityProvider.getRole(i.element):()=>"treeitem",getAriaLabel(i){return e.accessibilityProvider.getAriaLabel(i.element)},getWidgetAriaLabel(){return e.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:e.accessibilityProvider&&e.accessibilityProvider.getWidgetRole?()=>e.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:e.accessibilityProvider&&e.accessibilityProvider.getAriaLevel?i=>e.accessibilityProvider.getAriaLevel(i.element):i=>i.depth,getActiveDescendantId:e.accessibilityProvider.getActiveDescendantId&&(i=>e.accessibilityProvider.getActiveDescendantId(i.element))}),keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},e.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel(i){return e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(i.element)}}),enableKeyboardNavigation:e.simpleKeyboardNavigation})}var w0=class{constructor(t){this.delegate=t}getHeight(t){return this.delegate.getHeight(t.element)}getTemplateId(t){return this.delegate.getTemplateId(t.element)}hasDynamicHeight(t){return!!this.delegate.hasDynamicHeight&&this.delegate.hasDynamicHeight(t.element)}setDynamicHeight(t,e){this.delegate.setDynamicHeight&&this.delegate.setDynamicHeight(t.element,e)}},bh;(function(t){t.None="none",t.OnHover="onHover",t.Always="always"})(bh||(bh={}));var IB=class{constructor(t,e=[]){this._elements=e,this.onDidChange=$.forEach(t,i=>this._elements=i)}get elements(){return this._elements}},sE=class a1{constructor(e,i,n,s,r={}){this.renderer=e,this.modelProvider=i,this.activeNodes=s,this.renderedElements=new Map,this.renderedNodes=new Map,this.indent=a1.DefaultIndent,this.hideTwistiesOfChildlessElements=!1,this.shouldRenderIndentGuides=!1,this.renderedIndentGuides=new JM,this.activeIndentNodes=new Set,this.indentGuidesDisposable=V.None,this.disposables=new ne,this.templateId=e.templateId,this.updateOptions(r),$.map(n,o=>o.node)(this.onDidChangeNodeTwistieState,this,this.disposables),e.onDidChangeTwistieState&&e.onDidChangeTwistieState(this.onDidChangeTwistieState,this,this.disposables)}updateOptions(e={}){if(typeof e.indent<"u"&&(this.indent=ai(e.indent,0,40)),typeof e.renderIndentGuides<"u"){const i=e.renderIndentGuides!==bh.None;if(i!==this.shouldRenderIndentGuides&&(this.shouldRenderIndentGuides=i,this.indentGuidesDisposable.dispose(),i)){const n=new ne;this.activeNodes.onDidChange(this._onDidChangeActiveNodes,this,n),this.indentGuidesDisposable=n,this._onDidChangeActiveNodes(this.activeNodes.elements)}}typeof e.hideTwistiesOfChildlessElements<"u"&&(this.hideTwistiesOfChildlessElements=e.hideTwistiesOfChildlessElements)}renderTemplate(e){const i=z(e,Q(".monaco-tl-row")),n=z(i,Q(".monaco-tl-indent")),s=z(i,Q(".monaco-tl-twistie")),r=z(i,Q(".monaco-tl-contents")),o=this.renderer.renderTemplate(r);return{container:e,indent:n,twistie:s,indentGuidesDisposable:V.None,templateData:o}}renderElement(e,i,n,s){typeof s=="number"&&(this.renderedNodes.set(e,{templateData:n,height:s}),this.renderedElements.set(e.element,e));const r=a1.DefaultIndent+(e.depth-1)*this.indent;n.twistie.style.paddingLeft=`${r}px`,n.indent.style.width=`${r+this.indent-16}px`,this.renderTwistie(e,n),typeof s=="number"&&this.renderIndentGuides(e,n),this.renderer.renderElement(e,i,n.templateData,s)}disposeElement(e,i,n,s){n.indentGuidesDisposable.dispose(),this.renderer.disposeElement&&this.renderer.disposeElement(e,i,n.templateData,s),typeof s=="number"&&(this.renderedNodes.delete(e),this.renderedElements.delete(e.element))}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}onDidChangeTwistieState(e){const i=this.renderedElements.get(e);i&&this.onDidChangeNodeTwistieState(i)}onDidChangeNodeTwistieState(e){const i=this.renderedNodes.get(e);i&&(this.renderTwistie(e,i.templateData),this._onDidChangeActiveNodes(this.activeNodes.elements),this.renderIndentGuides(e,i.templateData))}renderTwistie(e,i){i.twistie.classList.remove(...f.treeItemExpanded.classNamesArray);let n=!1;this.renderer.renderTwistie&&(n=this.renderer.renderTwistie(e.element,i.twistie)),e.collapsible&&(!this.hideTwistiesOfChildlessElements||e.visibleChildrenCount>0)?(n||i.twistie.classList.add(...f.treeItemExpanded.classNamesArray),i.twistie.classList.add("collapsible"),i.twistie.classList.toggle("collapsed",e.collapsed)):i.twistie.classList.remove("collapsible","collapsed"),e.collapsible?i.container.setAttribute("aria-expanded",String(!e.collapsed)):i.container.removeAttribute("aria-expanded")}renderIndentGuides(e,i){if(Ei(i.indent),i.indentGuidesDisposable.dispose(),!this.shouldRenderIndentGuides)return;const n=new ne,s=this.modelProvider();let r=e;for(;;){const o=s.getNodeLocation(r),a=s.getParentNodeLocation(o);if(!a)break;const l=s.getNode(a),h=Q(".indent-guide",{style:`width: ${this.indent}px`});this.activeIndentNodes.has(l)&&h.classList.add("active"),i.indent.childElementCount===0?i.indent.appendChild(h):i.indent.insertBefore(h,i.indent.firstElementChild),this.renderedIndentGuides.add(l,h),n.add(Ae(()=>this.renderedIndentGuides.delete(l,h))),r=l}i.indentGuidesDisposable=n}_onDidChangeActiveNodes(e){if(!this.shouldRenderIndentGuides)return;const i=new Set,n=this.modelProvider();e.forEach(s=>{const r=n.getNodeLocation(s);try{const o=n.getParentNodeLocation(r);s.collapsible&&s.children.length>0&&!s.collapsed?i.add(s):o&&i.add(n.getNode(o))}catch{}}
578),this.activeIndentNodes.forEach(s=>{i.has(s)||this.renderedIndentGuides.forEach(s,r=>r.classList.remove("active"))}),i.forEach(s=>{this.activeIndentNodes.has(s)||this.renderedIndentGuides.forEach(s,r=>r.classList.add("active"))}),this.activeIndentNodes=i}dispose(){this.renderedNodes.clear(),this.renderedElements.clear(),this.indentGuidesDisposable.dispose(),De(this.disposables)}};sE.DefaultIndent=8;var EB=class{constructor(t,e,i){this.tree=t,this.keyboardNavigationLabelProvider=e,this._filter=i,this._totalCount=0,this._matchCount=0,this._pattern="",this._lowercasePattern="",this.disposables=new ne,t.onWillRefilter(this.reset,this,this.disposables)}get totalCount(){return this._totalCount}get matchCount(){return this._matchCount}set pattern(t){this._pattern=t,this._lowercasePattern=t.toLowerCase()}filter(t,e){if(this._filter){const s=this._filter.filter(t,e);if(this.tree.options.simpleKeyboardNavigation)return s;let r;if(typeof s=="boolean"?r=s?1:0:b0(s)?r=Ch(s.visibility):r=s,r===0)return!1}if(this._totalCount++,this.tree.options.simpleKeyboardNavigation||!this._pattern)return this._matchCount++,{data:Yr.Default,visibility:!0};const i=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(t),n=Array.isArray(i)?i:[i];for(const s of n){const r=s&&s.toString();if(typeof r>"u")return{data:Yr.Default,visibility:!0};const o=D6(this._pattern,this._lowercasePattern,0,r,r.toLowerCase(),0,!0);if(o)return this._matchCount++,n.length===1?{data:o,visibility:!0}:{data:{label:r,score:o},visibility:!0}}return this.tree.options.filterOnType?2:{data:Yr.Default,visibility:!0}}reset(){this._totalCount=0,this._matchCount=0}dispose(){De(this.disposables)}},DB=class{constructor(t,e,i,n,s){this.tree=t,this.view=i,this.filter=n,this.keyboardNavigationDelegate=s,this._enabled=!1,this._pattern="",this._empty=!1,this._onDidChangeEmptyState=new M,this.positionClassName="ne",this.automaticKeyboardNavigation=!0,this.triggered=!1,this._onDidChangePattern=new M,this.enabledDisposables=new ne,this.disposables=new ne,this.domNode=Q(`.monaco-list-type-filter.${this.positionClassName}`),this.domNode.draggable=!0,this.disposables.add(B(this.domNode,"dragstart",()=>this.onDragStart())),this.messageDomNode=z(i.getHTMLElement(),Q(".monaco-list-type-filter-message")),this.labelDomNode=z(this.domNode,Q("span.label"));const r=z(this.domNode,Q(".controls"));this._filterOnType=!!t.options.filterOnType,this.filterOnTypeDomNode=z(r,Q("input.filter")),this.filterOnTypeDomNode.type="checkbox",this.filterOnTypeDomNode.checked=this._filterOnType,this.filterOnTypeDomNode.tabIndex=-1,this.updateFilterOnTypeTitleAndIcon(),this.disposables.add(B(this.filterOnTypeDomNode,"input",()=>this.onDidChangeFilterOnType())),this.clearDomNode=z(r,Q("button.clear"+f.treeFilterClear.cssSelector)),this.clearDomNode.tabIndex=-1,this.clearDomNode.title=p("clear","Clear"),this.keyboardNavigationEventFilter=t.options.keyboardNavigationEventFilter,e.onDidSplice(this.onDidSpliceModel,this,this.disposables),this.updateOptions(t.options)}get enabled(){return this._enabled}get pattern(){return this._pattern}get filterOnType(){return this._filterOnType}updateOptions(t){t.simpleKeyboardNavigation?this.disable():this.enable(),typeof t.filterOnType<"u"&&(this._filterOnType=!!t.filterOnType,this.filterOnTypeDomNode.checked=this._filterOnType,this.updateFilterOnTypeTitleAndIcon()),typeof t.automaticKeyboardNavigation<"u"&&(this.automaticKeyboardNavigation=t.automaticKeyboardNavigation),this.tree.refilter(),this.render(),this.automaticKeyboardNavigation||this.onEventOrInput("")}enable(){if(this._enabled)return;const t=this.enabledDisposables.add(new Ee(this.view.getHTMLElement(),"keydown")),e=$.chain(t.event).filter(n=>!lr(n.target)||n.target===this.filterOnTypeDomNode).filter(n=>n.key!=="Dead"&&!/^Media/.test(n.key)).map(n=>new Pe(n)).filter(this.keyboardNavigationEventFilter||(()=>!0)).filter(()=>this.automaticKeyboardNavigation||this.triggered).filter(n=>this.keyboardNavigationDelegate.mightProducePrintableCharacter(n)&&!(n.keyCode===18||n.keyCode===16||n.keyCode===15||n.keyCode===17)||(this.pattern.length>0||this.triggered)&&(n.keyCode===9||n.keyCode===1)&&!n.altKey&&!n.ctrlKey&&!n.metaKey||n.keyCode===1&&(fe?n.altKey&&!n.metaKey:n.ctrlKey)&&!n.shiftKey).forEac
578h(n=>{n.stopPropagation(),n.preventDefault()}).event,i=this.enabledDisposables.add(new Ee(this.clearDomNode,"click"));$.chain($.any(e,i.event)).event(this.onEventOrInput,this,this.enabledDisposables),this.filter.pattern="",this.tree.refilter(),this.render(),this._enabled=!0,this.triggered=!1}disable(){this._enabled&&(this.domNode.remove(),this.enabledDisposables.clear(),this.tree.refilter(),this.render(),this._enabled=!1,this.triggered=!1)}onEventOrInput(t){typeof t=="string"?this.onInput(t):t instanceof MouseEvent||t.keyCode===9||t.keyCode===1&&(fe?t.altKey:t.ctrlKey)?this.onInput(""):t.keyCode===1?this.onInput(this.pattern.length===0?"":this.pattern.substr(0,this.pattern.length-1)):this.onInput(this.pattern+t.browserEvent.key)}onInput(t){const e=this.view.getHTMLElement();t&&!this.domNode.parentElement?e.append(this.domNode):!t&&this.domNode.parentElement&&(this.domNode.remove(),this.tree.domFocus()),this._pattern=t,this._onDidChangePattern.fire(t),this.filter.pattern=t,this.tree.refilter(),t&&this.tree.focusNext(0,!0,void 0,n=>!Yr.isDefault(n.filterData));const i=this.tree.getFocus();if(i.length>0){const n=i[0];this.tree.getRelativeTop(n)===null&&this.tree.reveal(n,.5)}this.render(),t||(this.triggered=!1)}onDragStart(){const t=this.view.getHTMLElement(),{left:e}=qi(t),i=t.clientWidth,n=i/2,s=this.domNode.clientWidth,r=new ne;let o=this.positionClassName;const a=()=>{switch(o){case"nw":this.domNode.style.top="4px",this.domNode.style.left="4px";break;case"ne":this.domNode.style.top="4px",this.domNode.style.left=`${i-s-6}px`}},l=c=>{c.preventDefault();const d=c.clientX-e;c.dataTransfer&&(c.dataTransfer.dropEffect="none"),d<n?o="nw":o="ne",a()},h=()=>{this.positionClassName=o,this.domNode.className=`monaco-list-type-filter ${this.positionClassName}`,this.domNode.style.top="",this.domNode.style.left="",De(r)};a(),this.domNode.classList.remove(o),this.domNode.classList.add("dragging"),r.add(Ae(()=>this.domNode.classList.remove("dragging"))),r.add(B(document,"dragover",c=>l(c))),r.add(B(this.domNode,"dragend",()=>h())),as.CurrentDragAndDropData=new W3("vscode-ui"),r.add(Ae(()=>as.CurrentDragAndDropData=void 0))}onDidSpliceModel(){!this._enabled||this.pattern.length===0||(this.tree.refilter(),this.render())}onDidChangeFilterOnType(){this.tree.updateOptions({filterOnType:this.filterOnTypeDomNode.checked}),this.tree.refilter(),this.tree.domFocus(),this.render(),this.updateFilterOnTypeTitleAndIcon()}updateFilterOnTypeTitleAndIcon(){this.filterOnType?(this.filterOnTypeDomNode.classList.remove(...f.treeFilterOnTypeOff.classNamesArray),this.filterOnTypeDomNode.classList.add(...f.treeFilterOnTypeOn.classNamesArray),this.filterOnTypeDomNode.title=p("disable filter on type","Disable Filter on Type")):(this.filterOnTypeDomNode.classList.remove(...f.treeFilterOnTypeOn.classNamesArray),this.filterOnTypeDomNode.classList.add(...f.treeFilterOnTypeOff.classNamesArray),this.filterOnTypeDomNode.title=p("enable filter on type","Enable Filter on Type"))}render(){const t=this.filter.totalCount>0&&this.filter.matchCount===0;this.pattern&&this.tree.options.filterOnType&&t?(this.messageDomNode.textContent=p("empty","No elements found"),this._empty=!0):(this.messageDomNode.innerText="",this._empty=!1),this.domNode.classList.toggle("no-matches",t),this.domNode.title=p("found","Matched {0} out of {1} elements",this.filter.matchCount,this.filter.totalCount),this.labelDomNode.textContent=this.pattern.length>16?"…"+this.pattern.substr(this.pattern.length-16):this.pattern,this._onDidChangeEmptyState.fire(this._empty)}shouldAllowFocus(t){return!this.enabled||!this.pattern||this.filterOnType||this.filter.totalCount>0&&this.filter.matchCount<=1?!0:!Yr.isDefault(t.filterData)}dispose(){this._enabled&&(this.domNode.remove(),this.enabledDisposables.dispose(),this._enabled=!1,this.triggered=!1),this._onDidChangePattern.dispose(),De(this.disposables)}};function SS(t){let e=eh.Unknown;return FC(t.browserEvent.target,"monaco-tl-twistie","monaco-tl-row")?e=eh.Twistie:FC(t.browserEvent.target,"monaco-tl-contents","monaco-tl-row")&&(e=eh.Element),{browserEvent:t.browserEvent,element:t.element?t.element.element:null,target:e}}
578function kd(t,e){e(t),t.children.forEach(i=>kd(i,e))}var Hg=class{constructor(t,e){this.getFirstViewElementWithTrait=t,this.identityProvider=e,this.nodes=[],this._onDidChange=new M,this.onDidChange=this._onDidChange.event}get nodeSet(){return this._nodeSet||(this._nodeSet=this.createNodeSet()),this._nodeSet}set(t,e){!e?.__forceEvent&&Rn(this.nodes,t)||this._set(t,!1,e)}_set(t,e,i){if(this.nodes=[...t],this.elements=void 0,this._nodeSet=void 0,!e){const n=this;this._onDidChange.fire({get elements(){return n.get()},browserEvent:i})}}get(){return this.elements||(this.elements=this.nodes.map(t=>t.element)),[...this.elements]}getNodes(){return this.nodes}has(t){return this.nodeSet.has(t)}onDidModelSplice({insertedNodes:t,deletedNodes:e}){if(!this.identityProvider){const a=this.createNodeSet(),l=h=>a.delete(h);e.forEach(h=>kd(h,l)),this.set([...a.values()]);return}const i=new Set,n=a=>i.add(this.identityProvider.getId(a.element).toString());e.forEach(a=>kd(a,n));const s=new Map,r=a=>s.set(this.identityProvider.getId(a.element).toString(),a);t.forEach(a=>kd(a,r));const o=[];for(const a of this.nodes){const l=this.identityProvider.getId(a.element).toString();if(!i.has(l))o.push(a);else{const h=s.get(l);h&&o.push(h)}}if(this.nodes.length>0&&o.length===0){const a=this.getFirstViewElementWithTrait();a&&o.push(a)}this._set(o,!0)}createNodeSet(){const t=new Set;for(const e of this.nodes)t.add(e);return t}},NB=class extends QI{constructor(t,e){super(t),this.tree=e}onViewPointer(t){if(lr(t.browserEvent.target)||Jo(t.browserEvent.target))return;const e=t.element;if(!e)return super.onViewPointer(t);if(this.isSelectionRangeChangeEvent(t)||this.isSelectionSingleChangeEvent(t))return super.onViewPointer(t);const i=t.browserEvent.target,n=i.classList.contains("monaco-tl-twistie")||i.classList.contains("monaco-icon-label")&&i.classList.contains("folder-icon")&&t.browserEvent.offsetX<16;let s=!1;if(typeof this.tree.expandOnlyOnTwistieClick=="function"?s=this.tree.expandOnlyOnTwistieClick(e.element):s=!!this.tree.expandOnlyOnTwistieClick,s&&!n&&t.browserEvent.detail!==2)return super.onViewPointer(t);if(!this.tree.expandOnDoubleClick&&t.browserEvent.detail===2)return super.onViewPointer(t);if(e.collapsible){const r=this.tree.model,o=r.getNodeLocation(e),a=t.browserEvent.altKey;if(this.tree.setFocus([o]),r.setCollapsed(o,void 0,a),s&&n)return}super.onViewPointer(t)}onDoubleClick(t){t.browserEvent.target.classList.contains("monaco-tl-twistie")||!this.tree.expandOnDoubleClick||super.onDoubleClick(t)}},TB=class extends Ss{constructor(t,e,i,n,s,r,o,a){super(t,e,i,n,a),this.focusTrait=s,this.selectionTrait=r,this.anchorTrait=o}createMouseController(t){return new NB(this,t.tree)}splice(t,e,i=[]){if(super.splice(t,e,i),i.length===0)return;const n=[],s=[];let r;i.forEach((o,a)=>{this.focusTrait.has(o)&&n.push(t+a),this.selectionTrait.has(o)&&s.push(t+a),this.anchorTrait.has(o)&&(r=t+a)}),n.length>0&&super.setFocus(tr([...super.getFocus(),...n])),s.length>0&&super.setSelection(tr([...super.getSelection(),...s])),typeof r=="number"&&super.setAnchor(r)}setFocus(t,e,i=!1){super.setFocus(t,e),i||this.focusTrait.set(t.map(n=>this.element(n)),e)}setSelection(t,e,i=!1){super.setSelection(t,e),i||this.selectionTrait.set(t.map(n=>this.element(n)),e)}setAnchor(t,e=!1){super.setAnchor(t),e||(typeof t>"u"?this.anchorTrait.set([]):this.anchorTrait.set([this.element(t)]))}},rE=class{constructor(t,e,i,n,s={}){this._user=t,this._options=s,this.eventBufferer=new J1,this.disposables=new ne,this._onWillRefilter=new M,this.onWillRefilter=this._onWillRefilter.event,this._onDidUpdateOptions=new M;const r=new w0(i),o=new K0,a=new K0,l=new IB(a.event);this.renderers=n.map(d=>new sE(d,()=>this.model,o.event,l,s));for(let d of this.renderers)this.disposables.add(d);let h;s.keyboardNavigationLabelProvider&&(h=new EB(this,s.keyboardNavigationLabelProvider,s.filter),s=Object.assign(Object.assign({},s),{filter:h}),this.disposables.add(h)),this.focus=new Hg(()=>this.view.getFocusedElements()[0],s.identityProvider),this.selection=new Hg(()=>
578this.view.getSelectedElements()[0],s.identityProvider),this.anchor=new Hg(()=>this.view.getAnchorElement(),s.identityProvider),this.view=new TB(t,e,r,this.renderers,this.focus,this.selection,this.anchor,Object.assign(Object.assign({},xB(()=>this.model,s)),{tree:this})),this.model=this.createModel(t,this.view,s),o.input=this.model.onDidChangeCollapseState;const c=$.forEach(this.model.onDidSplice,d=>{this.eventBufferer.bufferEvents(()=>{this.focus.onDidModelSplice(d),this.selection.onDidModelSplice(d)})});if(c(()=>null,null,this.disposables),a.input=$.chain($.any(c,this.focus.onDidChange,this.selection.onDidChange)).debounce(()=>null,0).map(()=>{const d=new Set;for(const u of this.focus.getNodes())d.add(u);for(const u of this.selection.getNodes())d.add(u);return[...d.values()]}).event,s.keyboardSupport!==!1){const d=$.chain(this.view.onKeyDown).filter(u=>!lr(u.target)).map(u=>new Pe(u));d.filter(u=>u.keyCode===15).on(this.onLeftArrow,this,this.disposables),d.filter(u=>u.keyCode===17).on(this.onRightArrow,this,this.disposables),d.filter(u=>u.keyCode===10).on(this.onSpace,this,this.disposables)}if(s.keyboardNavigationLabelProvider){const d=s.keyboardNavigationDelegate||ZI;this.typeFilterController=new DB(this,this.model,this.view,h,d),this.focusNavigationFilter=u=>this.typeFilterController.shouldAllowFocus(u),this.disposables.add(this.typeFilterController)}this.styleElement=Yi(this.view.getHTMLElement()),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===bh.Always)}get onDidChangeFocus(){return this.eventBufferer.wrapEvent(this.focus.onDidChange)}get onDidChangeSelection(){return this.eventBufferer.wrapEvent(this.selection.onDidChange)}get onMouseDblClick(){return $.map(this.view.onMouseDblClick,SS)}get onPointer(){return $.map(this.view.onPointer,SS)}get onDidFocus(){return this.view.onDidFocus}get onDidChangeModel(){return $.signal(this.model.onDidSplice)}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}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(t={}){this._options=Object.assign(Object.assign({},this._options),t);for(const e of this.renderers)e.updateOptions(t);this.view.updateOptions(Object.assign(Object.assign({},this._options),{enableKeyboardNavigation:this._options.simpleKeyboardNavigation})),this.typeFilterController&&this.typeFilterController.updateOptions(this._options),this._onDidUpdateOptions.fire(this._options),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===bh.Always)}get options(){return this._options}getHTMLElement(){return this.view.getHTMLElement()}get scrollTop(){return this.view.scrollTop}set scrollTop(t){this.view.scrollTop=t}domFocus(){this.view.domFocus()}layout(t,e){this.view.layout(t,e)}style(t){const e=`.${this.view.domId}`,i=[];t.treeIndentGuidesStroke&&(i.push(`.monaco-list${e}:hover .monaco-tl-indent > .indent-guide, .monaco-list${e}.always .monaco-tl-indent > .indent-guide  { border-color: ${t.treeIndentGuidesStroke.transparent(.4)}; }`),i.push(`.monaco-list${e} .monaco-tl-indent > .indent-guide.active { border-color: ${t.treeIndentGuidesStroke}; }`)),this.styleElement.textContent=i.join(`
579`),this.view.style(t)}getParentElement(t){const e=this.model.getParentNodeLocation(t);return this.model.getNode(e).element}getFirstElementChild(t){return this.model.getFirstElementChild(t)}getNode(t){return this.model.getNode(t)}collapse(t,e=!1){return this.model.setCollapsed(t,!0,e)}expand(t,e=!1){return this.model.setCollapsed(t,!1,e)}isCollapsible(t){return this.model.isCollapsible(t)}setCollapsible(t,e){return this.model.setCollapsible(t,e)}isCollapsed(t){return this.model.isCollapsed(t)}refilter(){this._onWillRefilter.fire(void 0),this.model.refilter()}setSelection(t,e){const i=t.map(s=>this.model.getNode(s));this.selection.set(i,e);const n=t.map(s=>this.model.getListIndex(s)).filter(s=>s>-1);this.view.setSelection(n,e,!0)}getSelection(){return this.selection.get()}setFocus(t,e){const i=t.map(s=>this.model.getNode(s));this.focus.set(i,e);const n=t.map(s=>this.model.getListIndex(s)).filter(s=>s>-1);this.view.setFocus(n,e,!0)}focusNext(t=1,e=!1,i,n=this.focusNavigationFilter){this.view.focusNext(t,e,i,n)}getFocus(){return this.focus.get()}reveal(t,e){this.model.expandTo(t);const i=this.model.getListIndex(t);i!==-1&&this.view.reveal(i,e)}getRelativeTop(t){const e=this.model.getListIndex(t);return e===-1?null:this.view.getRelativeTop(e)}onLeftArrow(t){t.preventDefault(),t.stopPropagation();const e=this.view.getFocusedElements();if(e.length===0)return;const i=e[0],n=this.model.getNodeLocation(i);if(!this.model.setCollapsed(n,!0)){const s=this.model.getParentNodeLocation(n);if(!s)return;const r=this.model.getListIndex(s);this.view.reveal(r),this.view.setFocus([r])}}onRightArrow(t){t.preventDefault(),t.stopPropagation();const e=this.view.getFocusedElements();if(e.length===0)return;const i=e[0],n=this.model.getNodeLocation(i);if(!this.model.setCollapsed(n,!1)){if(!i.children.some(o=>o.visible))return;const[s]=this.view.getFocus(),r=s+1;this.view.reveal(r),this.view.setFocus([r])}}onSpace(t){t.preventDefault(),t.stopPropagation();const e=this.view.getFocusedElements();if(e.length===0)return;const i=e[0],n=this.model.getNodeLocation(i),s=t.browserEvent.altKey;this.model.setCollapsed(n,void 0,s)}dispose(){De(this.disposables),this.view.dispose()}},S0=class{constructor(t,e,i={}){this.user=t,this.rootRef=null,this.nodes=new Map,this.nodesByIdentity=new Map,this.model=new yB(t,e,null,i),this.onDidSplice=this.model.onDidSplice,this.onDidChangeCollapseState=this.model.onDidChangeCollapseState,this.onDidChangeRenderNodeCount=this.model.onDidChangeRenderNodeCount,i.sorter&&(this.sorter={compare(n,s){return i.sorter.compare(n.element,s.element)}}
579),this.identityProvider=i.identityProvider}setChildren(t,e=he.empty(),i={}){const n=this.getElementLocation(t);this._setChildren(n,this.preserveCollapseState(e),i)}_setChildren(t,e=he.empty(),i){const n=new Set,s=new Set,r=a=>{var l;if(a.element===null)return;const h=a;if(n.add(h.element),this.nodes.set(h.element,h),this.identityProvider){const c=this.identityProvider.getId(h.element).toString();s.add(c),this.nodesByIdentity.set(c,h)}(l=i.onDidCreateNode)===null||l===void 0||l.call(i,h)},o=a=>{var l;if(a.element===null)return;const h=a;if(n.has(h.element)||this.nodes.delete(h.element),this.identityProvider){const c=this.identityProvider.getId(h.element).toString();s.has(c)||this.nodesByIdentity.delete(c)}(l=i.onDidDeleteNode)===null||l===void 0||l.call(i,h)};this.model.splice([...t,0],Number.MAX_VALUE,e,Object.assign(Object.assign({},i),{onDidCreateNode:r,onDidDeleteNode:o}))}preserveCollapseState(t=he.empty()){return this.sorter&&(t=[...t].sort(this.sorter.compare.bind(this.sorter))),he.map(t,e=>{let i=this.nodes.get(e.element);if(!i&&this.identityProvider){const r=this.identityProvider.getId(e.element).toString();i=this.nodesByIdentity.get(r)}if(!i)return Object.assign(Object.assign({},e),{children:this.preserveCollapseState(e.children)});const n=typeof e.collapsible=="boolean"?e.collapsible:i.collapsible,s=typeof e.collapsed<"u"?e.collapsed:i.collapsed;return Object.assign(Object.assign({},e),{collapsible:n,collapsed:s,children:this.preserveCollapseState(e.children)})})}rerender(t){const e=this.getElementLocation(t);this.model.rerender(e)}getFirstElementChild(t=null){const e=this.getElementLocation(t);return this.model.getFirstElementChild(e)}has(t){return this.nodes.has(t)}getListIndex(t){const e=this.getElementLocation(t);return this.model.getListIndex(e)}getListRenderCount(t){const e=this.getElementLocation(t);return this.model.getListRenderCount(e)}isCollapsible(t){const e=this.getElementLocation(t);return this.model.isCollapsible(e)}setCollapsible(t,e){const i=this.getElementLocation(t);return this.model.setCollapsible(i,e)}isCollapsed(t){const e=this.getElementLocation(t);return this.model.isCollapsed(e)}setCollapsed(t,e,i){const n=this.getElementLocation(t);return this.model.setCollapsed(n,e,i)}expandTo(t){const e=this.getElementLocation(t);this.model.expandTo(e)}refilter(){this.model.refilter()}getNode(t=null){if(t===null)return this.model.getNode(this.model.rootRef);const e=this.nodes.get(t);if(!e)throw new yi(this.user,`Tree element not found: ${t}`);return e}getNodeLocation(t){return t.element}getParentNodeLocation(t){if(t===null)throw new yi(this.user,"Invalid getParentNodeLocation call");const e=this.nodes.get(t);if(!e)throw new yi(this.user,`Tree element not found: ${t}`);const i=this.model.getNodeLocation(e),n=this.model.getParentNodeLocation(i);return this.model.getNode(n).element}getElementLocation(t){if(t===null)return[];const e=this.nodes.get(t);if(!e)throw new yi(this.user,`Tree element not found: ${t}`);return this.model.getNodeLocation(e)}};function xd(t){return{element:{elements:[t.element],incompressible:t.incompressible||!1},children:he.map(he.from(t.children),xd),collapsible:t.collapsible,collapsed:t.collapsed}}function Id(t){const e=[t.element],i=t.incompressible||!1;let n,s;for(;[s,n]=he.consume(he.from(t.children),2),!(s.length!==1||s[0].incompressible);)t=s[0],e.push(t.element);return{element:{elements:e,incompressible:i},children:he.map(he.concat(s,n),Id),collapsible:t.collapsible,collapsed:t.collapsed}}function l1(t,e=0){let i;return e<t.element.elements.length-1?i=[l1(t,e+1)]:i=he.map(he.from(t.children),n=>l1(n,0)),e===0&&t.element.incompressible?{element:t.element.elements[e],children:i,incompressible:!0,collapsible:t.collapsible,collapsed:t.collapsed}:{element:t.element.elements[e],children:i,collapsible:t.collapsible,collapsed:t.collapsed}}function yS(t){return l1(t,0)}function oE(t,e,i){return t.element===e?Object.assign(Object.assign({},t),{children:i}):Object.assign(Object.assign({},t),{children:he.map(he.from(t.children),n=>oE(n,e,i))})}var MB=t=>({getId(e){return e.elements.map(i=>t.getId(i).toString()).join("\0")}}),RB=class{constructor(t,e,i={}){this.user=t,this.rootRef=null,this.nodes=new Map,this.model=new S0(t,e,i),this.enabled=typeof i.compressionEnabled>
579"u"?!0:i.compressionEnabled,this.identityProvider=i.identityProvider}get onDidSplice(){return this.model.onDidSplice}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get onDidChangeRenderNodeCount(){return this.model.onDidChangeRenderNodeCount}setChildren(t,e=he.empty(),i){const n=i.diffIdentityProvider&&MB(i.diffIdentityProvider);if(t===null){const d=he.map(e,this.enabled?Id:xd);this._setChildren(null,d,{diffIdentityProvider:n,diffDepth:1/0});return}const s=this.nodes.get(t);if(!s)throw new Error("Unknown compressed tree node");const r=this.model.getNode(s),o=this.model.getParentNodeLocation(s),a=this.model.getNode(o),l=oE(yS(r),t,e),h=(this.enabled?Id:xd)(l),c=a.children.map(d=>d===r?h:d);this._setChildren(a.element,c,{diffIdentityProvider:n,diffDepth:r.depth-a.depth})}setCompressionEnabled(t){if(t===this.enabled)return;this.enabled=t;const e=this.model.getNode().children,i=he.map(e,yS),n=he.map(i,t?Id:xd);this._setChildren(null,n,{diffIdentityProvider:this.identityProvider,diffDepth:1/0})}_setChildren(t,e,i){const n=new Set,s=o=>{for(const a of o.element.elements)n.add(a),this.nodes.set(a,o.element)},r=o=>{for(const a of o.element.elements)n.has(a)||this.nodes.delete(a)};this.model.setChildren(t,e,Object.assign(Object.assign({},i),{onDidCreateNode:s,onDidDeleteNode:r}))}has(t){return this.nodes.has(t)}getListIndex(t){const e=this.getCompressedNode(t);return this.model.getListIndex(e)}getListRenderCount(t){const e=this.getCompressedNode(t);return this.model.getListRenderCount(e)}getNode(t){if(typeof t>"u")return this.model.getNode();const e=this.getCompressedNode(t);return this.model.getNode(e)}getNodeLocation(t){const e=this.model.getNodeLocation(t);return e===null?null:e.elements[e.elements.length-1]}getParentNodeLocation(t){const e=this.getCompressedNode(t),i=this.model.getParentNodeLocation(e);return i===null?null:i.elements[i.elements.length-1]}getFirstElementChild(t){const e=this.getCompressedNode(t);return this.model.getFirstElementChild(e)}isCollapsible(t){const e=this.getCompressedNode(t);return this.model.isCollapsible(e)}setCollapsible(t,e){const i=this.getCompressedNode(t);return this.model.setCollapsible(i,e)}isCollapsed(t){const e=this.getCompressedNode(t);return this.model.isCollapsed(e)}setCollapsed(t,e,i){const n=this.getCompressedNode(t);return this.model.setCollapsed(n,e,i)}expandTo(t){const e=this.getCompressedNode(t);this.model.expandTo(e)}rerender(t){const e=this.getCompressedNode(t);this.model.rerender(e)}refilter(){this.model.refilter()}getCompressedNode(t){if(t===null)return null;const e=this.nodes.get(t);if(!e)throw new yi(this.user,`Tree element not found: ${t}`);return e}},AB=t=>t[t.length-1],OB=class aE{constructor(e,i){this.unwrapper=e,this.node=i}get element(){return this.node.element===null?null:this.unwrapper(this.node.element)}get children(){return this.node.children.map(e=>new aE(this.unwrapper,e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}};function PB(t,e){return{splice(i,n,s){e.splice(i,n,s.map(r=>t.map(r)))},updateElementHeight(i,n){e.updateElementHeight(i,n)}}}function FB(t,e){return Object.assign(Object.assign({},e),{identityProvider:e.identityProvider&&{getId(i){return e.identityProvider.getId(t(i))}},sorter:e.sorter&&{compare(i,n){return e.sorter.compare(i.elements[0],n.elements[0])}},filter:e.filter&&{filter(i,n){return e.filter.filter(t(i),n)}}})}var BB=class{constructor(t,e,i={}){this.rootRef=null,this.elementMapper=i.elementMapper||AB;const n=s=>this.elementMapper(s.elements);this.nodeMapper=new C0(s=>new OB(n,s)),this.model=new RB(t,PB(this.nodeMapper,e),FB(n,i))}get onDidSplice(){return $.map(this.model.onDidSplice,({insertedNodes:t,deletedNodes:e})=>({insertedNodes:t.map(i=>this.nodeMapper.map(i)),deletedNodes:e.map(i=>this.nodeMapper.map(i))}))}get onDidChangeCollapseState(){return $.map(this.model.onDidChangeCollapseState,({node:t,deep:e})=>({node:this.nodeMapper.map(t),deep:e}))}get onDidChangeRenderNodeCount(){return $.map(this.model.onDidChangeRenderNodeCount,t=>this.nodeMapper.map(t))}setChildren(t,e=he.empty(),i={}){this.model.setChildren(t,e,i)}setCompressionEnabled(t){this.model.setCompressionEnabled(t)}has(t){return this.model.has(t)}getListIndex(t){return this.model.getListIndex(t)}getListRenderCount(t){return this.model.getListRenderCount(t)}getNode(t){return this.nodeMapper.map(this.model.getNode(t))}getNodeLocation(t){return t.element}getParentNodeLocation(t){return this.model.getParentNodeLocation(t)}getFirstElementChild(t){const e=this.model.getFirstElementChild(t);return e===null||typeof e>"u"?e:this.elementMapper(e.elements)}isCollapsible(t){return this.model.isCollapsible(t)}setCollapsible(t,e){return this.model.setCollapsible(t,e)}isCollapsed(t){return this.model.isCollapsed(t)}setCollapsed(t,e,i){return this.model.setCollapsed(t,e,i)}expandTo(t){return this.model.expandTo(t)}rerender(t){return this.model.rerender(t)}refilter(){return this.model.refilter()}getCompressedTreeNode(t=null){return this.model.getNode(t)}}
579,VB=function(t,e,i,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r},y0=class extends rE{constructor(t,e,i,n,s={}){super(t,e,i,n,s),this.user=t}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}setChildren(t,e=he.empty(),i){this.model.setChildren(t,e,i)}rerender(t){if(t===void 0){this.view.rerender();return}this.model.rerender(t)}hasElement(t){return this.model.has(t)}createModel(t,e,i){return new S0(t,e,i)}},lE=class{constructor(t,e){this._compressedTreeNodeProvider=t,this.renderer=e,this.templateId=e.templateId,e.onDidChangeTwistieState&&(this.onDidChangeTwistieState=e.onDidChangeTwistieState)}get compressedTreeNodeProvider(){return this._compressedTreeNodeProvider()}renderTemplate(t){return{compressedTreeNode:void 0,data:this.renderer.renderTemplate(t)}}renderElement(t,e,i,n){const s=this.compressedTreeNodeProvider.getCompressedTreeNode(t.element);s.element.elements.length===1?(i.compressedTreeNode=void 0,this.renderer.renderElement(t,e,i.data,n)):(i.compressedTreeNode=s,this.renderer.renderCompressedElements(s,e,i.data,n))}disposeElement(t,e,i,n){i.compressedTreeNode?this.renderer.disposeCompressedElements&&this.renderer.disposeCompressedElements(i.compressedTreeNode,e,i.data,n):this.renderer.disposeElement&&this.renderer.disposeElement(t,e,i.data,n)}disposeTemplate(t){this.renderer.disposeTemplate(t.data)}renderTwistie(t,e){return this.renderer.renderTwistie?this.renderer.renderTwistie(t,e):!1}};VB([tt],lE.prototype,"compressedTreeNodeProvider",null);function WB(t,e){return e&&Object.assign(Object.assign({},e),{keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&{getKeyboardNavigationLabel(i){let n;try{n=t().getCompressedTreeNode(i)}catch{return e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(i)}return n.element.elements.length===1?e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(i):e.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(n.element.elements)}}})}var hE=class extends y0{constructor(t,e,i,n,s={}){const r=()=>this,o=n.map(a=>new lE(r,a));super(t,e,i,o,WB(r,s))}setChildren(t,e=he.empty(),i){this.model.setChildren(t,e,i)}createModel(t,e,i){return new BB(t,e,i)}updateOptions(t={}){super.updateOptions(t),typeof t.compressionEnabled<"u"&&this.model.setCompressionEnabled(t.compressionEnabled)}getCompressedTreeNode(t=null){return this.model.getCompressedTreeNode(t)}},Ds=function(t,e,i,n){function s(r){return r instanceof i?r:new i(function(o){o(r)})}return new(i||(i=Promise))(function(r,o){function a(c){try{h(n.next(c))}catch(d){o(d)}}function l(c){try{h(n.throw(c))}catch(d){o(d)}}function h(c){c.done?r(c.value):s(c.value).then(a,l)}h((n=n.apply(t,e||[])).next())})};function zg(t){return Object.assign(Object.assign({},t),{children:[],refreshPromise:void 0,stale:!0,slow:!1,collapsedByDefault:void 0})}function h1(t,e){return e.parent?e.parent===t?!0:h1(t,e.parent):!1}function HB(t,e){return t===e||h1(t,e)||h1(e,t)}var zB=class cE{constructor(e){this.node=e}get element(){return this.node.element.element}get children(){return this.node.children.map(e=>new cE(e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}},UB=class{constructor(t,e,i){this.renderer=t,this.nodeMapper=e,this.onDidChangeTwistieState=i,this.renderedNodes=new Map,this.templateId=t.templateId}renderTemplate(t){return{templateData:this.renderer.renderTemplate(t)}}renderElement(t,e,i,n){this.renderer.renderElement(this.nodeMapper.map(t),e,i.templateData,n)}renderTwistie(t,e){return t.slow?(e.classList.add(...f.treeItemLoading.classNamesArray),!0):(e.classList.remove(...f.treeItemLoading.classNamesArray),!1)}disposeElement(t,e,i,n){this.renderer.disposeElement&&this.renderer.disposeElement(this.nodeMapper.map(t),e,i.templateData,n)}disposeTemplate(t){this.renderer.disposeTemplate(t.templateData)}dispose(){this.renderedNodes.clear()}};function LS(t){return{browserEvent:t.browserEvent,elements:t.elements.map(e=>e.element)}}function kS(t){return{browserEvent:t.browserEvent,element:t.element&&t.element.element,target:t.target}}var $B=class extends $h{constructor(t){super(t.elements.map(e=>e.element)),this.data=t}};function Ug(t){return t instanceof $h?new $B(t):t}var KB=class{constructor(t){this.dnd=t}getDragURI(t){return this.dnd.getDragURI(t.element)}getDragLabel(t,e){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(t.map(i=>i.element),e)}onDragStart(t,e){this.dnd.onDragStart&&this.dnd.onDragStart(Ug(t),e)}onDragOver(t,e,i,n,s=!0){return this.dnd.onDragOver(Ug(t),e&&e.element,i,n)}drop(t,e,i,n){this.dnd.drop(Ug(t),e&&e.element,i,n)}onDragEnd(t){this.dnd.onDragEnd&&this.dnd.onDragEnd(t)}};function dE(t){return t&&Object.assign(Object.assign({}
579,t),{collapseByDefault:!0,identityProvider:t.identityProvider&&{getId(e){return t.identityProvider.getId(e.element)}},dnd:t.dnd&&new KB(t.dnd),multipleSelectionController:t.multipleSelectionController&&{isSelectionSingleChangeEvent(e){return t.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},e),{element:e.element}))},isSelectionRangeChangeEvent(e){return t.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},e),{element:e.element}))}},accessibilityProvider:t.accessibilityProvider&&Object.assign(Object.assign({},t.accessibilityProvider),{getPosInSet:void 0,getSetSize:void 0,getRole:t.accessibilityProvider.getRole?e=>t.accessibilityProvider.getRole(e.element):()=>"treeitem",isChecked:t.accessibilityProvider.isChecked?e=>{var i;return!!(!((i=t.accessibilityProvider)===null||i===void 0)&&i.isChecked(e.element))}:void 0,getAriaLabel(e){return t.accessibilityProvider.getAriaLabel(e.element)},getWidgetAriaLabel(){return t.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:t.accessibilityProvider.getWidgetRole?()=>t.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:t.accessibilityProvider.getAriaLevel&&(e=>t.accessibilityProvider.getAriaLevel(e.element)),getActiveDescendantId:t.accessibilityProvider.getActiveDescendantId&&(e=>t.accessibilityProvider.getActiveDescendantId(e.element))}),filter:t.filter&&{filter(e,i){return t.filter.filter(e.element,i)}},keyboardNavigationLabelProvider:t.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},t.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel(e){return t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e.element)}}),sorter:void 0,expandOnlyOnTwistieClick:typeof t.expandOnlyOnTwistieClick>"u"?void 0:typeof t.expandOnlyOnTwistieClick!="function"?t.expandOnlyOnTwistieClick:(e=>t.expandOnlyOnTwistieClick(e.element)),additionalScrollHeight:t.additionalScrollHeight})}function c1(t,e){e(t),t.children.forEach(i=>c1(i,e))}var uE=class{constructor(t,e,i,n,s,r={}){this.user=t,this.dataSource=s,this.nodes=new Map,this.subTreeRefreshPromises=new Map,this.refreshPromises=new Map,this._onDidRender=new M,this._onDidChangeNodeSlowState=new M,this.nodeMapper=new C0(o=>new zB(o)),this.disposables=new ne,this.identityProvider=r.identityProvider,this.autoExpandSingleChildren=typeof r.autoExpandSingleChildren>"u"?!1:r.autoExpandSingleChildren,this.sorter=r.sorter,this.collapseByDefault=r.collapseByDefault,this.tree=this.createTree(t,e,i,n,r),this.root=zg({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 $.map(this.tree.onDidChangeFocus,LS)}get onDidChangeSelection(){return $.map(this.tree.onDidChangeSelection,LS)}get onMouseDblClick(){return $.map(this.tree.onMouseDblClick,kS)}get onPointer(){return $.map(this.tree.onPointer,kS)}get onDidFocus(){return this.tree.onDidFocus}get onDidChangeModel(){return this.tree.onDidChangeModel}get onDidChangeCollapseState(){return this.tree.onDidChangeCollapseState}get onDidDispose(){return this.tree.onDidDispose}createTree(t,e,i,n,s){const r=new w0(i),o=n.map(l=>new UB(l,this.nodeMapper,this._onDidChangeNodeSlowState.event)),a=dE(s)||{};return new y0(t,e,r,o,a)}updateOptions(t={}){this.tree.updateOptions(t)}getHTMLElement(){return this.tree.getHTMLElement()}get scrollTop(){return this.tree.scrollTop}set scrollTop(t){this.tree.scrollTop=t}domFocus(){this.tree.domFocus()}layout(t,e){this.tree.layout(t,e)}style(t){this.tree.style(t)}getInput(){return this.root.element}setInput(t,e){return Ds(this,void 0,void 0,function*(){this.refreshPromises.forEach(n=>n.cancel()),this.refreshPromises.clear(),this.root.element=t;const i=e&&{viewState:e,focus:[],selection:[]};yield this._updateChildren(t,!0,!1,i),i&&(this.tree.setFocus(i.focus),this.tree.setSelection(i.selection)),e&&typeof e.scrollTop=="number"&&(this.scrollTop=e.scrollTop)})}_updateChildren(t=this.root.element,e=!0,i=!1,n,s){return Ds(this,void 0,void 0,function*(){if(typeof this.root.element>"u")throw new yi(this.user,"Tree input not set");this.root.refreshPromise&&(yield this.root.refreshPromise,yield $.toPromise(this._onDidRender.event));const r=this.getDataNode(t);if(yield this.refreshAndRenderNode(r,e,n,s),i)try{this.tree.rerender(r)}catch{}})}rerender(t){if(t===void 0||t===this.root.element){this.tree.rerender();return}const e=this.getDataNode(t);this.tree.rerender(e)}getNode(t=this.root.element){const e=this.getDataNode(t),i=this.tree.getNode(e===this.root?null:e);return this.nodeMapper.map(i)}collapse(t,e=!1){const i=this.getDataNode(t);return this.tree.collapse(i===this.root?null:i,e)}expand(t,e=!1){return Ds(this,void 0,void 0,function*(){if(typeof this.root.element>"u")throw new yi(this.user,"Tree input not set");this.root.refreshPromise&&(yield this.root.refreshPromise,yield $.toPromise(this._onDidRender.event));const i=this.getDataNode(t);if(this.tree.hasElement(i)&&!this.tree.isCollapsible(i)||(i.refreshPromise&&(yield this.root.refreshPromise,yield $.toPromise(this._onDidRender.event)),i!==this.root&&!i.refreshPromise&&!this.tree.isCollapsed(i)))return!1;const n=this.tree.expand(i===this.root?null:i,e);return i.refreshPromise&&(yield this.root.refreshPromise,yield $.toPromise(this._onDidRender.event)),n})}setSelection(t,e){const i=t.map(n=>this.getDataNode(n));this.tree.setSelection(i,e)}getSelection(){return this.tree.getSelection().map(t=>t.element)}setFocus(t,e){const i=t.map(n=>this.getDataNode(n));this.tree.setFocus(i,e)}getFocus(){return this.tree.getFocus().map(t=>t.element)}reveal(t,e){this.tree.reveal(this.getDataNode(t),e)}getParentElement(t){const e=this.tree.getParentElement(this.getDataNode(t));return e&&e.element}getFirstElementChild(t=this.root.element){const e=this.getDataNode(t),i=this.tree.getFirstElementChild(e===this.root?null:e);return i&&i.element}getDataNode(t){const e=this.nodes.get(t===this.root.element?null:t);if(!e)throw new yi(this.user,`Data tree node not found: ${t}`);return e}refreshAndRenderNode(t,e,i,n){return Ds(this,void 0,void 0,function*(){yield this.refreshNode(t,e,i),this.render(t,i,n)})}refreshNode(t,e,i){return Ds(this,void 0,void 0,function*(){let n;
579return this.subTreeRefreshPromises.forEach((s,r)=>{!n&&HB(r,t)&&(n=s.then(()=>this.refreshNode(t,e,i)))}),n||this.doRefreshSubTree(t,e,i)})}doRefreshSubTree(t,e,i){return Ds(this,void 0,void 0,function*(){let n;t.refreshPromise=new Promise(s=>n=s),this.subTreeRefreshPromises.set(t,t.refreshPromise),t.refreshPromise.finally(()=>{t.refreshPromise=void 0,this.subTreeRefreshPromises.delete(t)});try{const s=yield this.doRefreshNode(t,e,i);t.stale=!1,yield ep.settled(s.map(r=>this.doRefreshSubTree(r,e,i)))}finally{n()}})}doRefreshNode(t,e,i){return Ds(this,void 0,void 0,function*(){t.hasChildren=!!this.dataSource.hasChildren(t.element);let n;if(!t.hasChildren)n=Promise.resolve(he.empty());else{const s=this.doGetChildren(t);if(z0(s))n=Promise.resolve(s);else{const r=oh(800);r.then(()=>{t.slow=!0,this._onDidChangeNodeSlowState.fire(t)},o=>null),n=s.finally(()=>r.cancel())}}try{const s=yield n;return this.setChildren(t,s,e,i)}catch(s){if(t!==this.root&&this.tree.hasElement(t)&&this.tree.collapse(t),kh(s))return[];throw s}finally{t.slow&&(t.slow=!1,this._onDidChangeNodeSlowState.fire(t))}})}doGetChildren(t){let e=this.refreshPromises.get(t);if(e)return e;const i=this.dataSource.getChildren(t.element);return z0(i)?this.processChildren(i):(e=dL(()=>Ds(this,void 0,void 0,function*(){return this.processChildren(yield i)})),this.refreshPromises.set(t,e),e.finally(()=>{this.refreshPromises.delete(t)}))}_onDidChangeCollapseState({node:t,deep:e}){t.element!==null&&!t.collapsed&&t.element.stale&&(e?this.collapse(t.element.element):this.refreshAndRenderNode(t.element,!1).catch(We))}setChildren(t,e,i,n){const s=[...e];if(t.children.length===0&&s.length===0)return[];const r=new Map,o=new Map;for(const h of t.children)if(r.set(h.element,h),this.identityProvider){const c=this.tree.isCollapsed(h);o.set(h.id,{node:h,collapsed:c})}const a=[],l=s.map(h=>{const c=!!this.dataSource.hasChildren(h);if(!this.identityProvider){const m=zg({element:h,parent:t,hasChildren:c});return c&&this.collapseByDefault&&!this.collapseByDefault(h)&&(m.collapsedByDefault=!1,a.push(m)),m}const d=this.identityProvider.getId(h).toString(),u=o.get(d);if(u){const m=u.node;return r.delete(m.element),this.nodes.delete(m.element),this.nodes.set(h,m),m.element=h,m.hasChildren=c,i?u.collapsed?(m.children.forEach(_=>c1(_,C=>this.nodes.delete(C.element))),m.children.splice(0,m.children.length),m.stale=!0):a.push(m):c&&this.collapseByDefault&&!this.collapseByDefault(h)&&(m.collapsedByDefault=!1,a.push(m)),m}const g=zg({element:h,parent:t,id:d,hasChildren:c});return n&&n.viewState.focus&&n.viewState.focus.indexOf(d)>-1&&n.focus.push(g),n&&n.viewState.selection&&n.viewState.selection.indexOf(d)>-1&&n.selection.push(g),n&&n.viewState.expanded&&n.viewState.expanded.indexOf(d)>-1?a.push(g):c&&this.collapseByDefault&&!this.collapseByDefault(h)&&(g.collapsedByDefault=!1,a.push(g)),g});for(const h of r.values())c1(h,c=>this.nodes.delete(c.element));for(const h of l)this.nodes.set(h.element,h);return t.children.splice(0,t.children.length,...l),t!==this.root&&this.autoExpandSingleChildren&&l.length===1&&a.length===0&&(l[0].collapsedByDefault=!1,a.push(l[0])),a}render(t,e,i){const n=t.children.map(r=>this.asTreeElement(r,e)),s=i&&Object.assign(Object.assign({},i),{diffIdentityProvider:i.diffIdentityProvider&&{getId(r){return i.diffIdentityProvider.getId(r.element)}}});this.tree.setChildren(t===this.root?null:t,n,s),t!==this.root&&this.tree.setCollapsible(t,t.hasChildren),this._onDidRender.fire()}asTreeElement(t,e){if(t.stale)return{element:t,collapsible:t.hasChildren,collapsed:!0};let i;return e&&e.viewState.expanded&&t.id&&e.viewState.expanded.indexOf(t.id)>-1?i=!1:i=t.collapsedByDefault,t.collapsedByDefault=void 0,{element:t,children:t.hasChildren?he.map(t.children,n=>this.asTreeElement(n,e)):[],collapsible:t.hasChildren,collapsed:i}}processChildren(t){return this.sorter&&(t=[...t].sort(this.sorter.compare.bind(this.sorter))),t}dispose(){this.disposables.dispose()}},jB=class fE{constructor(e){this.node=e}get element(){return{elements:this.node.element.elements.map(e=>e.element),incompressible:this.node.element.incompressible}}get children(){return this.node.children.map(e=>new fE(e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}},qB=class{constructor(t,e,i,n){this.renderer=t,this.nodeMapper=e,this.compressibleNodeMapperProvider=i,this.onDidChangeTwistieState=n,this.renderedNodes=new Map,this.disposables=[],this.templateId=t.templateId}renderTemplate(t){return{templateData:this.renderer.renderTemplate(t)}
579}renderElement(t,e,i,n){this.renderer.renderElement(this.nodeMapper.map(t),e,i.templateData,n)}renderCompressedElements(t,e,i,n){this.renderer.renderCompressedElements(this.compressibleNodeMapperProvider().map(t),e,i.templateData,n)}renderTwistie(t,e){return t.slow?(e.classList.add(...f.treeItemLoading.classNamesArray),!0):(e.classList.remove(...f.treeItemLoading.classNamesArray),!1)}disposeElement(t,e,i,n){this.renderer.disposeElement&&this.renderer.disposeElement(this.nodeMapper.map(t),e,i.templateData,n)}disposeCompressedElements(t,e,i,n){this.renderer.disposeCompressedElements&&this.renderer.disposeCompressedElements(this.compressibleNodeMapperProvider().map(t),e,i.templateData,n)}disposeTemplate(t){this.renderer.disposeTemplate(t.templateData)}dispose(){this.renderedNodes.clear(),this.disposables=De(this.disposables)}};function GB(t){const e=t&&dE(t);return e&&Object.assign(Object.assign({},e),{keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},e.keyboardNavigationLabelProvider),{getCompressedNodeKeyboardNavigationLabel(i){return t.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(i.map(n=>n.element))}})})}var ZB=class extends uE{constructor(t,e,i,n,s,r,o={}){super(t,e,i,s,r,o),this.compressionDelegate=n,this.compressibleNodeMapper=new C0(a=>new jB(a)),this.filter=o.filter}createTree(t,e,i,n,s){const r=new w0(i),o=n.map(l=>new qB(l,this.nodeMapper,()=>this.compressibleNodeMapper,this._onDidChangeNodeSlowState.event)),a=GB(s)||{};return new hE(t,e,r,o,a)}asTreeElement(t,e){return Object.assign({incompressible:this.compressionDelegate.isIncompressible(t.element)},super.asTreeElement(t,e))}updateOptions(t={}){this.tree.updateOptions(t)}render(t,e){if(!this.identityProvider)return super.render(t,e);const i=d=>this.identityProvider.getId(d).toString(),n=d=>{const u=new Set;for(const g of d){const m=this.tree.getCompressedTreeNode(g===this.root?null:g);if(m.element)for(const _ of m.element.elements)u.add(i(_.element))}return u},s=n(this.tree.getSelection()),r=n(this.tree.getFocus());super.render(t,e);const o=this.getSelection();let a=!1;const l=this.getFocus();let h=!1;const c=d=>{const u=d.element;if(u)for(let g=0;g<u.elements.length;g++){const m=i(u.elements[g].element),_=u.elements[u.elements.length-1].element;s.has(m)&&o.indexOf(_)===-1&&(o.push(_),a=!0),r.has(m)&&l.indexOf(_)===-1&&(l.push(_),h=!0)}d.children.forEach(c)};c(this.tree.getCompressedTreeNode(t===this.root?null:t)),a&&this.setSelection(o),h&&this.setFocus(l)}processChildren(t){return this.filter&&(t=he.filter(t,e=>{const i=YB(this.filter.filter(e,1));if(i===2)throw new Error("Recursive tree visibility not supported in async data compressed trees");return i===1})),super.processChildren(t)}};function YB(t){return typeof t=="boolean"?t?1:0:b0(t)?Ch(t.visibility):Ch(t)}var XB=class extends rE{constructor(t,e,i,n,s,r={}){super(t,e,i,n,r),this.user=t,this.dataSource=s,this.identityProvider=r.identityProvider}createModel(t,e,i){return new S0(t,e,i)}},eK=new Y("isMac",fe,p("isMac","Whether the operating system is macOS")),tK=new Y("isLinux",Bt,p("isLinux","Whether the operating system is Linux")),iK=new Y("isWindows",ei,p("isWindows","Whether the operating system is Windows")),nK=new Y("isWeb",Pa,p("isWeb","Whether the platform is a web browser")),sK=new Y("isMacNative",fe&&!Pa,p("isMacNative","Whether the operating system is macOS on a non-browser platform")),rK=new Y("isIOS",Xr,p("isIOS","Whether the operating system is iOS")),oK=new Y("isDevelopment",!1,!0),gE="inputFocus",aK=new Y(gE,!1,p("inputFocus","Whether keyboard focus is inside an input box")),Gn=function(t,e,i,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r},se=function(t,e){return function(i,n){e(i,n,t)}},Zn=ge("listService"),d1=class{constructor(e){this._themeService=e,this.disposables=new ne,this.lists=[],this._lastFocusedWidget=void 0,this._hasCreatedStyleController=!1}get lastFocusedList(){return this._lastFocusedWidget}setLastFocusedList(e){var i,n;e!==this._lastFocusedWidget&&((i=this._lastFocusedWidget)===null||i===void 0||i.getHTMLElement().classList.remove("last-focused"),this._lastFocusedWidget=e,(n=this._lastFocusedWidget)===null||n===void 0||n.getHTMLElement().classList.add("last-focused"))}register(e,i){if(!this._hasCreatedStyleController){this._hasCreatedStyleController=!0;const s=new JI(Yi(),"");this.disposables.add(Aa(s,this._themeService))}if(this.lists.some(s=>s.widget===e))throw new Error("Cannot register the same widget multiple times");const n={widget:e,extraContextKeys:i};return this.lists.push(n),e.getHTMLElement()===document.activeElement&&this.setLastFocusedList(e),Ur(e.onDidFocus(()=>this.setLastFocusedList(e)),Ae(()=>this.lists.splice(this.lists.indexOf(n),1)),e.onDidDispose(()=>{this.lists=this.lists.filter(s=>s!==n),this._lastFocusedWidget===e&&this.setLastFocusedList(void 0)}))}dispose(){this.disposables.dispose()}};d1=Gn([se(0,et)],d1);var mE=new Y("listFocus",!0),ff=new Y("listSupportsMultiselect",!0),hK=Re.and(mE,Re.not(gE)),L0=new Y("listHasSelectionOrFocus",!1),k0=new Y("listDoubleSelection",!1),x0=new Y("listMultiSelection",!1),gf=new Y("listSelectionNavigation",!1),QB=new Y("treeElementCanCollapse",!1),JB=new Y("treeElementHasParent",!1),eV=new Y("treeElementCanExpand",!1),tV=new Y("treeElementHasChild",!1),pE="listAutomaticKeyboardNavigation";function mf(t,e){const i=t.createScoped(e.getHTMLElement());return mE.bindTo(i),i}var Co="workbench.list.multiSelectModifier",u1="workbench.list.openMode",xi="workbench.list.horizontalScrolling",Tu="workbench.list.keyboardNavigation",I0="workbench.list.automaticKeyboardNavigation",wh="workbench.tree.indent",Mu="workbench.tree.renderIndentGuides",bn="workbench.list.smoothScrolling",Un="workbench.list.mouseWheelScrollSensitivity",$n="workbench.list.fastScrollSensitivity",Ru="workbench.tree.expandMode";function Kn(t){return t.getValue(Co)==="alt"}var iV=class extends V{constructor(t){super(),this.configurationService=t,this.useAltAsMultipleSelectionModifier=Kn(t),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(t=>{t.affectsConfiguration(Co)&&(this.useAltAsMultipleSelectionModifier=Kn(this.configurationService))}))}isSelectionSingleChangeEvent(t){return this.useAltAsMultipleSelectionModifier?t.browserEvent.altKey:YI(t)}isSelectionRangeChangeEvent(t){return XI(t)}};function pf(t,e,i){var n;const s=new ne;return[Object.assign(Object.assign({},t),{keyboardNavigationDelegate:{mightProducePrintableCharacter(r){return i.mightProducePrintableCharacter(r)}},smoothScrolling:!!e.getValue(bn),mouseWheelScrollSensitivity:e.getValue(Un),fastScrollSensitivity:e.getValue($n),multipleSelectionController:(n=t.multipleSelectionController)!==null&&n!==void 0?n:s.add(new iV(e))}),s]}var f1=class extends Ss{constructor(e,i,n,s,r,o,a,l,h,c){const d=typeof r.horizontalScrolling<"u"?r.horizontalScrolling:!!h.getValue(xi),[u,g]=pf(r,h,c);super(e,i,n,s,Object.assign(Object.assign(Object.assign({keyboardSupport:!1}
579,ln(l.getColorTheme(),df)),u),{horizontalScrolling:d})),this.disposables.add(g),this.contextKeyService=mf(o,this),this.themeService=l,this.listSupportsMultiSelect=ff.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(r.multipleSelectionSupport!==!1),gf.bindTo(this.contextKeyService).set(!!r.selectionNavigation),this.listHasSelectionOrFocus=L0.bindTo(this.contextKeyService),this.listDoubleSelection=k0.bindTo(this.contextKeyService),this.listMultiSelection=x0.bindTo(this.contextKeyService),this.horizontalScrolling=r.horizontalScrolling,this._useAltAsMultipleSelectionModifier=Kn(h),this.disposables.add(this.contextKeyService),this.disposables.add(a.register(this)),r.overrideStyles&&this.updateStyles(r.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{const m=this.getSelection(),_=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(m.length>0||_.length>0),this.listMultiSelection.set(m.length>1),this.listDoubleSelection.set(m.length===2)})})),this.disposables.add(this.onDidChangeFocus(()=>{const m=this.getSelection(),_=this.getFocus();this.listHasSelectionOrFocus.set(m.length>0||_.length>0)})),this.disposables.add(h.onDidChangeConfiguration(m=>{m.affectsConfiguration(Co)&&(this._useAltAsMultipleSelectionModifier=Kn(h));let _={};if(m.affectsConfiguration(xi)&&this.horizontalScrolling===void 0){const C=!!h.getValue(xi);_=Object.assign(Object.assign({},_),{horizontalScrolling:C})}if(m.affectsConfiguration(bn)){const C=!!h.getValue(bn);_=Object.assign(Object.assign({},_),{smoothScrolling:C})}if(m.affectsConfiguration(Un)){const C=h.getValue(Un);_=Object.assign(Object.assign({},_),{mouseWheelScrollSensitivity:C})}if(m.affectsConfiguration($n)){const C=h.getValue($n);_=Object.assign(Object.assign({},_),{fastScrollSensitivity:C})}Object.keys(_).length>0&&this.updateOptions(_)})),this.navigator=new _E(this,Object.assign({configurationService:h},r)),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles&&this.updateStyles(e.overrideStyles),e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){var i;(i=this._styler)===null||i===void 0||i.dispose(),this._styler=Aa(this,this.themeService,e)}dispose(){var e;(e=this._styler)===null||e===void 0||e.dispose(),super.dispose()}};f1=Gn([se(5,Ie),se(6,Zn),se(7,et),se(8,yt),se(9,vi)],f1);var xS=class extends pB{constructor(e,i,n,s,r,o,a,l,h,c){const d=typeof r.horizontalScrolling<"u"?r.horizontalScrolling:!!h.getValue(xi),[u,g]=pf(r,h,c);super(e,i,n,s,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},ln(l.getColorTheme(),df)),u),{horizontalScrolling:d})),this.disposables=new ne,this.disposables.add(g),this.contextKeyService=mf(o,this),this.themeService=l,this.horizontalScrolling=r.horizontalScrolling,this.listSupportsMultiSelect=ff.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(r.multipleSelectionSupport!==!1),gf.bindTo(this.contextKeyService).set(!!r.selectionNavigation),this._useAltAsMultipleSelectionModifier=Kn(h),this.disposables.add(this.contextKeyService),this.disposables.add(a.register(this)),r.overrideStyles&&this.updateStyles(r.overrideStyles),r.overrideStyles&&this.disposables.add(Aa(this,l,r.overrideStyles)),this.disposables.add(h.onDidChangeConfiguration(m=>{m.affectsConfiguration(Co)&&(this._useAltAsMultipleSelectionModifier=Kn(h));let _={};if(m.affectsConfiguration(xi)&&this.horizontalScrolling===void 0){const C=!!h.getValue(xi);_=Object.assign(Object.assign({},_),{horizontalScrolling:C})}if(m.affectsConfiguration(bn)){const C=!!h.getValue(bn);_=Object.assign(Object.assign({},_),{smoothScrolling:C})}if(m.affectsConfiguration(Un)){const C=h.getValue(Un);_=Object.assign(Object.assign({},_),{mouseWheelScrollSensitivity:C})}if(m.affectsConfiguration($n)){const C=h.getValue($n);_=Object.assign(Object.assign({},_),{fastScrollSensitivity:C})}Object.keys(_).length>0&&this.updateOptions(_)})),this.navigator=new _E(this,Object.assign({configurationService:h},r)),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles&&this.updateStyles(e.overrideStyles),e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){var i;(i=this._styler)===null||i===void 0||i.dispose(),this._styler=Aa(this,this.themeService,e)}dispose(){var e;(e=this._styler)===null||e===void 0||e.dispose(),this.disposables.dispose(),super.dispose()}};xS=Gn([se(5,Ie),se(6,Zn),se(7,et),se(8,yt),se(9,vi)],xS);var IS=class extends iE{constructor(e,i,n,s,r,o,a,l,h,c,d){const u=typeof o.horizontalScrolling<"u"?o.horizontalScrolling:!!c.getValue(xi),[g,m]=pf(o,c,d);super(e,i,n,s,r,Object.assign(Object.assign(Object.assign({keyboardSupport:!1}
579,ln(h.getColorTheme(),df)),g),{horizontalScrolling:u})),this.disposables.add(m),this.contextKeyService=mf(a,this),this.themeService=h,this.listSupportsMultiSelect=ff.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(o.multipleSelectionSupport!==!1),gf.bindTo(this.contextKeyService).set(!!o.selectionNavigation),this.listHasSelectionOrFocus=L0.bindTo(this.contextKeyService),this.listDoubleSelection=k0.bindTo(this.contextKeyService),this.listMultiSelection=x0.bindTo(this.contextKeyService),this.horizontalScrolling=o.horizontalScrolling,this._useAltAsMultipleSelectionModifier=Kn(c),this.disposables.add(this.contextKeyService),this.disposables.add(l.register(this)),o.overrideStyles&&this.updateStyles(o.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{const _=this.getSelection(),C=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(_.length>0||C.length>0),this.listMultiSelection.set(_.length>1),this.listDoubleSelection.set(_.length===2)})})),this.disposables.add(this.onDidChangeFocus(()=>{const _=this.getSelection(),C=this.getFocus();this.listHasSelectionOrFocus.set(_.length>0||C.length>0)})),this.disposables.add(c.onDidChangeConfiguration(_=>{_.affectsConfiguration(Co)&&(this._useAltAsMultipleSelectionModifier=Kn(c));let C={};if(_.affectsConfiguration(xi)&&this.horizontalScrolling===void 0){const w=!!c.getValue(xi);C=Object.assign(Object.assign({},C),{horizontalScrolling:w})}if(_.affectsConfiguration(bn)){const w=!!c.getValue(bn);C=Object.assign(Object.assign({},C),{smoothScrolling:w})}if(_.affectsConfiguration(Un)){const w=c.getValue(Un);C=Object.assign(Object.assign({},C),{mouseWheelScrollSensitivity:w})}if(_.affectsConfiguration($n)){const w=c.getValue($n);C=Object.assign(Object.assign({},C),{fastScrollSensitivity:w})}Object.keys(C).length>0&&this.updateOptions(C)})),this.navigator=new nV(this,Object.assign({configurationService:c},o)),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles&&this.updateStyles(e.overrideStyles),e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){var i;(i=this._styler)===null||i===void 0||i.dispose(),this._styler=Aa(this,this.themeService,e)}dispose(){var e;(e=this._styler)===null||e===void 0||e.dispose(),this.disposables.dispose(),super.dispose()}};IS=Gn([se(6,Ie),se(7,Zn),se(8,et),se(9,yt),se(10,vi)],IS);var E0=class extends V{constructor(t,e){var i;super(),this.widget=t,this._onDidOpen=this._register(new M),this.onDidOpen=this._onDidOpen.event,this._register($.filter(this.widget.onDidChangeSelection,n=>n.browserEvent instanceof KeyboardEvent)(n=>this.onSelectionFromKeyboard(n))),this._register(this.widget.onPointer(n=>this.onPointer(n.element,n.browserEvent))),this._register(this.widget.onMouseDblClick(n=>this.onMouseDblClick(n.element,n.browserEvent))),typeof e?.openOnSingleClick!="boolean"&&e?.configurationService?(this.openOnSingleClick=e?.configurationService.getValue(u1)!=="doubleClick",this._register(e?.configurationService.onDidChangeConfiguration(()=>{this.openOnSingleClick=e?.configurationService.getValue(u1)!=="doubleClick"}))):this.openOnSingleClick=(i=e?.openOnSingleClick)!==null&&i!==void 0?i:!0}onSelectionFromKeyboard(t){if(t.elements.length!==1)return;const e=t.browserEvent,i=typeof e.preserveFocus=="boolean"?e.preserveFocus:!0,n=typeof e.pinned=="boolean"?e.pinned:!i;this._open(this.getSelectedElement(),i,n,!1,t.browserEvent)}onPointer(t,e){if(!this.openOnSingleClick||e.detail===2)return;const i=e.button===1,n=!0,s=i,r=e.ctrlKey||e.metaKey||e.altKey;this._open(t,n,s,r,e)}onMouseDblClick(t,e){if(!e)return;const i=e.target;if(i.classList.contains("monaco-tl-twistie")||i.classList.contains("monaco-icon-label")&&i.classList.contains("folder-icon")&&e.offsetX<16)return;const n=!1,s=!0,r=e.ctrlKey||e.metaKey||e.altKey;this._open(t,n,s,r,e)}_open(t,e,i,n,s){t&&this._onDidOpen.fire({editorOptions:{preserveFocus:e,pinned:i,revealIfVisible:!0},sideBySide:n,element:t,browserEvent:s})}},_E=class extends E0{constructor(t,e){super(t,e),this.widget=t}getSelectedElement(){return this.widget.getSelectedElements()[0]}}
579,nV=class extends E0{constructor(t,e){super(t,e)}getSelectedElement(){return this.widget.getSelectedElements()[0]}},sV=class extends E0{constructor(t,e){super(t,e)}getSelectedElement(){var t;return(t=this.widget.getSelection()[0])!==null&&t!==void 0?t:void 0}};function rV(t,e){let i=!1;return n=>{if(n.toKeybinding().isModifierKey())return!1;if(i)return i=!1,!1;const s=e.softDispatch(n,t);return s&&s.enterChord?(i=!0,!1):(i=!1,!0)}}var ES=class extends y0{constructor(e,i,n,s,r,o,a,l,h,c,d){const{options:u,getAutomaticKeyboardNavigation:g,disposable:m}=Kh(i,r,o,h,c,d);super(e,i,n,s,u),this.disposables.add(m),this.internals=new ro(this,r,g,r.overrideStyles,o,a,l,h,d),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};ES=Gn([se(5,Ie),se(6,Zn),se(7,et),se(8,yt),se(9,vi),se(10,Ti)],ES);var DS=class extends hE{constructor(e,i,n,s,r,o,a,l,h,c,d){const{options:u,getAutomaticKeyboardNavigation:g,disposable:m}=Kh(i,r,o,h,c,d);super(e,i,n,s,u),this.disposables.add(m),this.internals=new ro(this,r,g,r.overrideStyles,o,a,l,h,d),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};DS=Gn([se(5,Ie),se(6,Zn),se(7,et),se(8,yt),se(9,vi),se(10,Ti)],DS);var NS=class extends XB{constructor(e,i,n,s,r,o,a,l,h,c,d,u){const{options:g,getAutomaticKeyboardNavigation:m,disposable:_}=Kh(i,o,a,c,d,u);super(e,i,n,s,r,g),this.disposables.add(_),this.internals=new ro(this,o,m,o.overrideStyles,a,l,h,c,u),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};NS=Gn([se(6,Ie),se(7,Zn),se(8,et),se(9,yt),se(10,vi),se(11,Ti)],NS);var TS=class extends uE{constructor(e,i,n,s,r,o,a,l,h,c,d,u){const{options:g,getAutomaticKeyboardNavigation:m,disposable:_}=Kh(i,o,a,c,d,u);super(e,i,n,s,r,g),this.disposables.add(_),this.internals=new ro(this,o,m,o.overrideStyles,a,l,h,c,u),this.disposables.add(this.internals)}get onDidOpen(){return this.internals.onDidOpen}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};TS=Gn([se(6,Ie),se(7,Zn),se(8,et),se(9,yt),se(10,vi),se(11,Ti)],TS);var MS=class extends ZB{constructor(e,i,n,s,r,o,a,l,h,c,d,u,g){const{options:m,getAutomaticKeyboardNavigation:_,disposable:C}=Kh(i,a,l,d,u,g);super(e,i,n,s,r,o,m),this.disposables.add(C),this.internals=new ro(this,a,_,a.overrideStyles,l,h,c,d,g),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};MS=Gn([se(7,Ie),se(8,Zn),se(9,et),se(10,yt),se(11,vi),se(12,Ti)],MS);function Kh(t,e,i,n,s,r){var o;const a=()=>{let m=!!i.getContextKeyValue(pE);return m&&(m=!!n.getValue(I0)),m},l=r.isScreenReaderOptimized(),h=e.simpleKeyboardNavigation||l?"simple":n.getValue(Tu),c=e.horizontalScrolling!==void 0?e.horizontalScrolling:!!n.getValue(xi),[d,u]=pf(e,n,s),g=e.additionalScrollHeight;return{getAutomaticKeyboardNavigation:a,disposable:u,options:Object.assign(Object.assign({keyboardSupport:!1},d),{indent:typeof n.getValue(wh)=="number"?n.getValue(wh):void 0,renderIndentGuides:n.getValue(Mu),smoothScrolling:!!n.getValue(bn),automaticKeyboardNavigation:a(),simpleKeyboardNavigation:h==="simple",filterOnType:h==="filter",horizontalScrolling:c,keyboardNavigationEventFilter:rV(t,s),additionalScrollHeight:g,hideTwistiesOfChildlessElements:e.hideTwistiesOfChildlessElements,expandOnlyOnTwistieClick:(o=e.expandOnlyOnTwistieClick)!==null&&o!==void 0?o:n.getValue(Ru)==="doubleClick"})}}var ro=class{constructor(e,i,n,s,r,o,a,l,h){this.tree=e,this.themeService=a,this.disposables=[],this.contextKeyService=mf(r,e),this.listSupportsMultiSelect=ff.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(i.multipleSelectionSupport!==!1),gf.bindTo(this.contextKeyService).set(!!i.selectionNavigation),this.hasSelectionOrFocus=L0.bindTo(this.contextKeyService),this.hasDoubleSelection=k0.bindTo(this.contextKeyService),this.hasMultiSelection=x0.bindTo(this.contextKeyService),this.treeElementCanCollapse=QB.bindTo(this.contextKeyService),this.treeElementHasParent=JB.bindTo(this.contextKeyService),this.treeElementCanExpand=eV.bindTo(this.contextKeyService),this.treeElementHasChild=tV.bindTo(this.contextKeyService),this._useAltAsMultipleSelectionModifier=Kn(l);const c=new Set;c.add(pE);const d=()=>{const g=h.isScreenReaderOptimized()?"simple":l.getValue(Tu);e.updateOptions({simpleKeyboardNavigation:g==="simple",filterOnType:g==="filter"})};this.updateStyleOverrides(s);const u=()=>{const g=e.getFocus()[0];if(!g)return;const m=e.getNode(g);this.treeElementCanCollapse.set(m.collapsible&&!m.collapsed),this.treeElementHasParent.set(!!e.getParentElement(g)),this.treeElementCanExpand.set(m.collapsible&&m.collapsed),this.treeElementHasChild.set(!!e.getFirstElementChild(g))};this.disposables.push(this.contextKeyService,o.register(e),e.onDidChangeSelection(()=>{const g=e.getSelection(),m=e.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.hasSelectionOrFocus.set(g.length>0||m.length>0),this.hasMultiSelection.set(g.length>1),this.hasDoubleSelection.set(g.length===2)})}),e.onDidChangeFocus(()=>{const g=e.getSelection(),m=e.getFocus();this.hasSelectionOrFocus.set(g.length>0||m.length>0),u()}),e.onDidChangeCollapseState(u),e.onDidChangeModel(u),l.onDidChangeConfiguration(g=>{let m={};if(g.affectsConfiguration(Co)&&(this._useAltAsMultipleSelectionModifier=Kn(l)),g.affectsConfiguration(wh)){const _=l.getValue(wh);m=Object.assign(Object.assign({},m),{indent:_})}if(g.affectsConfiguration(Mu)){const _=l.getValue(Mu);m=Object.assign(Object.assign({},m),{renderIndentGuides:_})}if(g.affectsConfiguration(bn)){const _=!!l.getValue(bn);m=Object.assign(Object.assign({},m),{smoothScrolling:_})}if(g.affectsConfiguration(Tu)&&d(),g.affectsConfiguration(I0)&&(m=Object.assign(Object.assign({},m),{automaticKeyboardNavigation:n()})),g.affectsConfiguration(xi)&&i.horizontalScrolling===void 0){const _=!!l.getValue(xi);m=Object.assign(Object.assign({},m),{horizontalScrolling:_})}if(g.affectsConfiguration(Ru)&&i.expandOnlyOnTwistieClick===void 0&&(m=Object.assign(Object.assign({}
579,m),{expandOnlyOnTwistieClick:l.getValue(Ru)==="doubleClick"})),g.affectsConfiguration(Un)){const _=l.getValue(Un);m=Object.assign(Object.assign({},m),{mouseWheelScrollSensitivity:_})}if(g.affectsConfiguration($n)){const _=l.getValue($n);m=Object.assign(Object.assign({},m),{fastScrollSensitivity:_})}Object.keys(m).length>0&&e.updateOptions(m)}),this.contextKeyService.onDidChangeContext(g=>{g.affectsSome(c)&&e.updateOptions({automaticKeyboardNavigation:n()})}),h.onDidChangeScreenReaderOptimized(()=>d())),this.navigator=new sV(e,Object.assign({configurationService:l},i)),this.disposables.push(this.navigator)}get onDidOpen(){return this.navigator.onDidOpen}updateOptions(e){e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyleOverrides(e){De(this.styler),this.styler=e?Aa(this.tree,this.themeService,e):V.None}dispose(){this.disposables=De(this.disposables),De(this.styler),this.styler=void 0}};ro=Gn([se(4,Ie),se(5,Zn),se(6,et),se(7,yt),se(8,Ti)],ro);vt.as(Ga.Configuration).registerConfiguration({id:"workbench",order:7,title:p("workbenchConfigurationTitle","Workbench"),type:"object",properties:{[Co]:{type:"string",enum:["ctrlCmd","alt"],enumDescriptions:[p("multiSelectModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),p("multiSelectModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],default:"ctrlCmd",description:p({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.")},[u1]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:p({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.")},[xi]:{type:"boolean",default:!1,description:p("horizontalScrolling setting","Controls whether lists and trees support horizontal scrolling in the workbench. Warning: turning on this setting has a performance implication.")},[wh]:{type:"number",default:8,minimum:4,maximum:40,description:p("tree indent setting","Controls tree indentation in pixels.")},[Mu]:{type:"string",enum:["none","onHover","always"],default:"onHover",description:p("render tree indent guides","Controls whether the tree should render indent guides.")},[bn]:{type:"boolean",default:!1,description:p("list smoothScrolling setting","Controls whether lists and trees have smooth scrolling.")},[Un]:{type:"number",default:1,description:p("Mouse Wheel Scroll Sensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")},[$n]:{type:"number",default:5,description:p("Fast Scroll Sensitivity","Scrolling speed multiplier when pressing `Alt`.")},[Tu]:{type:"string",enum:["simple","highlight","filter"],enumDescriptions:[p("keyboardNavigationSettingKey.simple","Simple keyboard navigation focuses elements which match the keyboard input. Matching is done only on prefixes."),p("keyboardNavigationSettingKey.highlight","Highlight keyboard navigation highlights elements which match the keyboard input. Further up and down navigation will traverse only the highlighted elements."),p("keyboardNavigationSettingKey.filter","Filter keyboard navigation will filter out and hide all the elements which do not match the keyboard input.")],default:"highlight",description:p("keyboardNavigationSettingKey","Controls the keyboard navigation style for lists and trees in the workbench. Can be simple, highlight and filter.")},[I0]:{type:"boolean",default:!0,markdownDescription:p("automatic keyboard navigation setting","Controls whether keyboard navigation in lists and trees is automatically triggered simply by typing. If set to `false`, keyboard navigation is only triggered when executing the `list.toggleKeyboardNavigation` command, for which you can assign a keyboard shortcut.")},[Ru]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:p("expand mode","Controls how tree folders are expanded when clicking the folder names. Note that some trees and lists might cho
579ose to ignore this setting if it is not applicable.")}}});var g1;(function(t){t[t.PRESERVE=0]="PRESERVE",t[t.LAST=1]="LAST"})(g1||(g1={}));var vE={Quickaccess:"workbench.contributions.quickaccess"},oV=class{constructor(){this.providers=[],this.defaultProvider=void 0}registerQuickAccessProvider(t){return t.prefix.length===0?this.defaultProvider=t:this.providers.push(t),this.providers.sort((e,i)=>i.prefix.length-e.prefix.length),Ae(()=>{this.providers.splice(this.providers.indexOf(t),1),this.defaultProvider===t&&(this.defaultProvider=void 0)})}getQuickAccessProviders(){return cy([this.defaultProvider,...this.providers])}getQuickAccessProvider(t){return t&&this.providers.find(e=>t.startsWith(e.prefix))||void 0||this.defaultProvider}};vt.add(vE.Quickaccess,new oV);var CE=ge("quickInputService"),aV=function(t,e,i,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r},RS=function(t,e){return function(i,n){e(i,n,t)}},m1=class extends V{constructor(e,i){super(),this.quickInputService=e,this.instantiationService=i,this.registry=vt.as(vE.Quickaccess),this.mapProviderToDescriptor=new Map,this.lastAcceptedPickerValues=new Map,this.visibleQuickAccess=void 0}show(e="",i){this.doShowOrPick(e,!1,i)}doShowOrPick(e,i,n){var s;const[r,o]=this.getOrInstantiateProvider(e),a=this.visibleQuickAccess,l=a?.descriptor;if(a&&o&&l===o){e!==o.prefix&&!n?.preserveValue&&(a.picker.value=e),this.adjustValueSelection(a.picker,o,n);return}if(o&&!n?.preserveValue){let g;if(a&&l&&l!==o){const m=a.value.substr(l.prefix.length);m&&(g=`${o.prefix}${m}`)}if(!g){const m=r?.defaultFilterValue;m===g1.LAST?g=this.lastAcceptedPickerValues.get(o):typeof m=="string"&&(g=`${o.prefix}${m}`)}typeof g=="string"&&(e=g)}const h=new ne,c=h.add(this.quickInputService.createQuickPick());c.value=e,this.adjustValueSelection(c,o,n),c.placeholder=o?.placeholder,c.quickNavigate=n?.quickNavigateConfiguration,c.hideInput=!!c.quickNavigate&&!a,(typeof n?.itemActivation=="number"||n?.quickNavigateConfiguration)&&(c.itemActivation=(s=n?.itemActivation)!==null&&s!==void 0?s:an.SECOND),c.contextKey=o?.contextKey,c.filterValue=g=>g.substring(o?o.prefix.length:0),o?.placeholder&&(c.ariaLabel=o?.placeholder);let d;i&&(d=new fL,h.add(Qr(c.onWillAccept)(g=>{g.veto(),c.hide()}))),h.add(this.registerPickerListeners(c,r,o,e));const u=h.add(new Ba);if(r&&h.add(r.provide(c,u.token)),Qr(c.onDidHide)(()=>{c.selectedItems.length===0&&u.cancel(),h.dispose(),d?.complete(c.selectedItems.slice(0))}),c.show(),i)return d?.p}adjustValueSelection(e,i,n){var s;let r;n?.preserveValue?r=[e.value.length,e.value.length]:r=[(s=i?.prefix.length)!==null&&s!==void 0?s:0,e.value.length],e.valueSelection=r}registerPickerListeners(e,i,n,s){const r=new ne,o=this.visibleQuickAccess={picker:e,descriptor:n,value:s};return r.add(Ae(()=>{o===this.visibleQuickAccess&&(this.visibleQuickAccess=void 0)})),r.add(e.onDidChangeValue(a=>{const[l]=this.getOrInstantiateProvider(a);l!==i?this.show(a,{preserveValue:!0}):o.value=a})),n&&r.add(e.onDidAccept(()=>{this.lastAcceptedPickerValues.set(n,e.value)})),r}getOrInstantiateProvider(e){const i=this.registry.getQuickAccessProvider(e);if(!i)return[void 0,void 0];let n=this.mapProviderToDescriptor.get(i);return n||(n=this.instantiationService.createInstance(i.ctor),this.mapProviderToDescriptor.set(i,n)),[n,i]}};m1=aV([RS(0,CE),RS(1,Qi)],m1);var lV=function(t,e,i,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r},_l=function(t,e){return function(i,n){e(i,n,t)}},p1=class extends HM{constructor(e,i,n,s,r){super(n),this.instantiationService=e,this.contextKeyService=i,this.accessibilityService=s,this.layoutService=r,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(m1))),this._quickAccess}createController(e=this.layoutService,i){var n,s;const r={idPrefix:"quickInput_",container:e.container,ignoreFocusOut:()=>!1,isScreenReaderOptimized:()=>this.accessibilityService.isScreenReaderOptimized(),backKeybindingLabel:()=>{},setContextKey:a=>this.setContextKey(a),returnFocus:()=>e.focus(),createList:(a,l,h,c,d)=>this.instantiationService.createInstance(f1,a,l,h,c,d),styles:this.computeStyles()},o=this._register(new KI(Object.assign(Object.assign({},r),i)));return o.layout(e.dimension,(s=(n=e.offset)===null||n===void 0?void 0:n.top)!==null&&s!==void 0?s:0),this._register(e.onDidLayout(a=>{var l,h;return o.layout(a,(h=(l=e.offset)===null||l===void 0?void 0:l.top)!==null&&h!==void 0?h:0)})),this._register(o.onShow(()=>this.resetContextKeys())),this._register(o.onHide(()=>this.resetContextKeys())),o}setContextKey(e){let i;e&&(i=this.contexts.get(e),i||(i=new Y(e,!1).bindTo(this.contextKeyService),this.contexts.set(e,i))),!(i&&i.get())&&(this.resetContextKeys(),i&&i.set(!0))}
579resetContextKeys(){this.contexts.forEach(e=>{e.get()&&e.reset()})}pick(e,i={},n=ti.None){return this.controller.pick(e,i,n)}createQuickPick(){return this.controller.createQuickPick()}updateStyles(){this.controller.applyStyles(this.computeStyles())}computeStyles(){return{widget:Object.assign({},ln(this.theme,{quickInputBackground:GC,quickInputForeground:kR,quickInputTitleBackground:xR,contrastBorder:Ye,widgetShadow:Ea})),inputBox:ln(this.theme,{inputForeground:W2,inputBackground:V2,inputBorder:H2,inputValidationInfoBackground:z2,inputValidationInfoForeground:U2,inputValidationInfoBorder:$2,inputValidationWarningBackground:K2,inputValidationWarningForeground:j2,inputValidationWarningBorder:q2,inputValidationErrorBackground:G2,inputValidationErrorForeground:Z2,inputValidationErrorBorder:Y2}),countBadge:ln(this.theme,{badgeBackground:sd,badgeForeground:rd,badgeBorder:Ye}),button:ln(this.theme,{buttonForeground:mR,buttonBackground:Ap,buttonHoverBackground:pR,buttonBorder:Ye}),progressBar:ln(this.theme,{progressBarBackground:_R}),keybindingLabel:ln(this.theme,{keybindingLabelBackground:DR,keybindingLabelForeground:NR,keybindingLabelBorder:TR,keybindingLabelBottomBorder:MR,keybindingLabelShadow:Ea}),list:ln(this.theme,{listBackground:GC,listInactiveFocusForeground:dA,listInactiveSelectionIconForeground:uA,listInactiveFocusBackground:fA,listFocusOutline:_i,listInactiveFocusOutline:_i,pickerGroupBorder:ER,pickerGroupForeground:IR})}}};p1=lV([_l(0,Qi),_l(1,Ie),_l(2,et),_l(3,Ti),_l(4,Uh)],p1);var bE=function(t,e,i,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r},Fr=function(t,e){return function(i,n){e(i,n,t)}},_1=class extends p1{constructor(e,i,n,s,r,o){super(i,n,s,r,new E_(e.getContainerDomNode(),o)),this.host=void 0;const a=Au.get(e);if(a){const l=a.widget;this.host={_serviceBrand:void 0,get hasContainer(){return!0},get container(){return l.getDomNode()},get dimension(){return e.getLayoutInfo()},get onDidLayout(){return e.onDidLayoutChange},focus:()=>e.focus()}}else this.host=void 0}createController(){return super.createController(this.host)}};_1=bE([Fr(1,Qi),Fr(2,Ie),Fr(3,et),Fr(4,Ti),Fr(5,pt)],_1);var v1=class{constructor(e,i){this.instantiationService=e,this.codeEditorService=i,this.mapEditorToService=new Map}get activeService(){const e=this.codeEditorService.getFocusedCodeEditor();if(!e)throw new Error("Quick input service needs a focused editor to work.");let i=this.mapEditorToService.get(e);if(!i){const n=i=this.instantiationService.createInstance(_1,e);this.mapEditorToService.set(e,i),Qr(e.onDidDispose)(()=>{n.dispose(),this.mapEditorToService.delete(e)})}return i}get quickAccess(){return this.activeService.quickAccess}pick(e,i={},n=ti.None){return this.activeService.pick(e,i,n)}createQuickPick(){return this.activeService.createQuickPick()}};v1=bE([Fr(0,Qi),Fr(1,pt)],v1);var Au=class wE{constructor(e){this.editor=e,this.widget=new SE(this.editor)}static get(e){return e.getContribution(wE.ID)}
579dispose(){this.widget.dispose()}};Au.ID="editor.controller.quickInput";var SE=class yE{constructor(e){this.codeEditor=e,this.domNode=document.createElement("div"),this.codeEditor.addOverlayWidget(this)}getId(){return yE.ID}getDomNode(){return this.domNode}getPosition(){return{preference:2}}dispose(){this.codeEditor.removeOverlayWidget(this)}};SE.ID="editor.contrib.quickInputWidget";Av(Au.ID,Au);var hV=class{constructor(t,e,i,n,s){this._parsedThemeRuleBrand=void 0,this.token=t,this.index=e,this.fontStyle=i,this.foreground=n,this.background=s}};function cV(t){if(!t||!Array.isArray(t))return[];const e=[];let i=0;for(let n=0,s=t.length;n<s;n++){const r=t[n];let o=-1;if(typeof r.fontStyle=="string"){o=0;const h=r.fontStyle.split(" ");for(let c=0,d=h.length;c<d;c++)switch(h[c]){case"italic":o=o|1;break;case"bold":o=o|2;break;case"underline":o=o|4;break;case"strikethrough":o=o|8}}let a=null;typeof r.foreground=="string"&&(a=r.foreground);let l=null;typeof r.background=="string"&&(l=r.background),e[i++]=new hV(r.token||"",n,o,a,l)}return e}function dV(t,e){t.sort((c,d)=>{const u=pV(c.token,d.token);return u!==0?u:c.index-d.index});let i=0,n="000000",s="ffffff";for(;t.length>=1&&t[0].token==="";){const c=t.shift();c.fontStyle!==-1&&(i=c.fontStyle),c.foreground!==null&&(n=c.foreground),c.background!==null&&(s=c.background)}const r=new fV;for(let c of e)r.getId(c);const o=r.getId(n),a=r.getId(s),l=new _V(i,o,a),h=new vV(l);for(let c=0,d=t.length;c<d;c++){const u=t[c];h.insert(u.token,u.fontStyle,r.getId(u.foreground),r.getId(u.background))}return new LE(r,h)}var uV=/^#?([0-9A-Fa-f]{6})([0-9A-Fa-f]{2})?$/,fV=class{constructor(){this._lastColorId=0,this._id2color=[],this._color2id=new Map}getId(t){if(t===null)return 0;const e=t.match(uV);if(!e)throw new Error("Illegal value for token color: "+t);t=e[1].toUpperCase();let i=this._color2id.get(t);return i||(i=++this._lastColorId,this._color2id.set(t,i),this._id2color[i]=O.fromHex("#"+t),i)}getColorMap(){return this._id2color.slice(0)}},LE=class{constructor(t,e){this._colorMap=t,this._root=e,this._cache=new Map}static createFromRawTokenTheme(t,e){return this.createFromParsedTokenTheme(cV(t),e)}static createFromParsedTokenTheme(t,e){return dV(t,e)}getColorMap(){return this._colorMap.getColorMap()}_match(t){return this._root.match(t)}match(t,e){let i=this._cache.get(e);if(typeof i>"u"){const n=this._match(e),s=mV(e);i=(n.metadata|s<<8)>>>0,this._cache.set(e,i)}return(i|t<<0)>>>0}},gV=/\b(comment|string|regex|regexp)\b/;function mV(t){const e=t.match(gV);if(!e)return 0;switch(e[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"regexp":return 3}throw new Error("Unexpected match for standard token type!")}function pV(t,e){return t<e?-1:t>e?1:0}var _V=class kE{constructor(e,i,n){this._themeTrieElementRuleBrand=void 0,this._fontStyle=e,this._foreground=i,this._background=n,this.metadata=(this._fontStyle<<10|this._foreground<<14|this._background<<23)>>>0}clone(){return new kE(this._fontStyle,this._foreground,this._background)}acceptOverwrite(e,i,n){e!==-1&&(this._fontStyle=e),i!==0&&(this._foreground=i),n!==0&&(this._background=n),this.metadata=(this._fontStyle<<10|this._foreground<<14|this._background<<23)>>>0}},vV=class xE{constructor(e){this._themeTrieElementBrand=void 0,this._mainRule=e,this._children=new Map}match(e){if(e==="")return this._mainRule;const i=e.indexOf(".");let n,s;i===-1?(n=e,s=""):(n=e.substring(0,i),s=e.substring(i+1));const r=this._children.get(n);return typeof r<"u"?r.match(s):this._mainRule}insert(e,i,n,s){if(e===""){this._mainRule.acceptOverwrite(i,n,s);return}const r=e.indexOf(".");let o,a;r===-1?(o=e,a=""):(o=e.substring(0,r),a=e.substring(r+1));let l=this._children.get(o);typeof l>"u"&&(l=new xE(this._mainRule.clone()),this._children.set(o,l)),l.insert(a,i,n,s)}};function CV(t){const e=[];for(let i=1,n=t.length;i<n;i++){const s=t[i];e[i]=`.mtk${i} { color: ${s}; }`}return e.push(".mtki { font-style: italic; }"),e.push(".mtkb { font-weight: bold; }"),e.push(".mtku { text-decoration: underline; text-underline-position: under; }"),e.push(".mtks { text-decoration: line-through; }"),e.push(".mtks.mtku { text-decoration: underline line-through; text-underline-position: under; }"),e.join(`
580`)}var bV={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"}
580,{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:{[Gi]:"#FFFFFE",[Bh]:"#000000",[Fv]:"#E5EBF1",[nf]:"#D3D3D3",[sf]:"#939393",[Q2]:"#ADD6FF4D"}},wV={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:{[Gi]:"#1E1E1E",[Bh]:"#D4D4D4",[Fv]:"#3A3D41",[nf]:"#404040",[sf]:"#707070",[Q2]:"#ADD6FF26"}},SV={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"}
580,{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:{[Gi]:"#000000",[Bh]:"#FFFFFF",[nf]:"#FFFFFF",[sf]:"#FFFFFF"}};function yV(t){const e=new M,i=Vx();return i.onDidChange(()=>e.fire()),t?.onDidProductIconThemeChange(()=>e.fire()),{onDidChange:e.event,getCSS(){const n=t?t.getProductIconTheme():new IE,s={},r=a=>{const l=n.getIcon(a);if(!l)return;const h=l.font;return h?(s[h.id]=h.definition,`.codicon-${a.id}:before { content: '${l.fontCharacter}'; font-family: ${HC(h.id)}; }`):`.codicon-${a.id}:before { content: '${l.fontCharacter}'; }`},o=[];for(let a of i.getIcons()){const l=r(a);l&&o.push(l)}for(let a in s){const l=s[a],h=l.weight?`font-weight: ${l.weight};`:"",c=l.style?`font-style: ${l.style};`:"",d=l.src.map(u=>`${wp(u.location)} format('${u.format}')`).join(", ");o.push(`@font-face { src: ${d}; font-family: ${HC(a)};${h}${c} font-display: block; }`)}return o.join(`
581`)}}}var IE=class{getIcon(t){const e=Vx();let i=t.defaults;for(;ft.isThemeIcon(i);){const n=e.getIcon(i.id);if(!n)return;i=n.defaults}return i}},zr="vs",Ou="vs-dark",va="hc-black",EE=vt.as(B2.ColorContribution),LV=vt.as(y2.ThemingContribution),DE=class{constructor(t,e){this.semanticHighlighting=!1,this.themeData=e;const i=e.base;t.length>0?(Ed(t)?this.id=t:this.id=i+" "+t,this.themeName=t):(this.id=i,this.themeName=i),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 t=new Map;for(let e in this.themeData.colors)t.set(e,O.fromHex(this.themeData.colors[e]));if(this.themeData.inherit){const e=C1(this.themeData.base);for(let i in e.colors)t.has(i)||t.set(i,O.fromHex(e.colors[i]))}this.colors=t}return this.colors}getColor(t,e){const i=this.getColors().get(t);if(i)return i;if(e!==!1)return this.getDefault(t)}getDefault(t){let e=this.defaultColors[t];return e||(e=EE.resolveDefaultColor(t,this),this.defaultColors[t]=e,e)}defines(t){return Object.prototype.hasOwnProperty.call(this.getColors(),t)}get type(){switch(this.base){case zr:return On.LIGHT;case va:return On.HIGH_CONTRAST;default:return On.DARK}}get tokenTheme(){if(!this._tokenTheme){let t=[],e=[];if(this.themeData.inherit){const s=C1(this.themeData.base);t=s.rules,s.encodedTokensColors&&(e=s.encodedTokensColors)}const i=this.themeData.colors["editor.foreground"],n=this.themeData.colors["editor.background"];if(i||n){const s={token:""};i&&(s.foreground=i),n&&(s.background=n),t.push(s)}t=t.concat(this.themeData.rules),this.themeData.encodedTokensColors&&(e=this.themeData.encodedTokensColors),this._tokenTheme=LE.createFromRawTokenTheme(t,e)}return this._tokenTheme}getTokenStyleMetadata(t,e,i){const n=this.tokenTheme._match([t].concat(e).join(".")).metadata,s=li.getForeground(n),r=li.getFontStyle(n);return{foreground:s,italic:!!(r&1),bold:!!(r&2),underline:!!(r&4),strikethrough:!!(r&8)}}};function Ed(t){return t===zr||t===Ou||t===va}function C1(t){switch(t){case zr:return bV;case Ou:return wV;case va:return SV}}function $g(t){const e=C1(t);return new DE(t,e)}var kV=class extends V{constructor(){super(),this._onColorThemeChange=this._register(new M),this.onDidColorThemeChange=this._onColorThemeChange.event,this._onProductIconThemeChange=this._register(new M),this.onDidProductIconThemeChange=this._onProductIconThemeChange.event,this._environment=Object.create(null),this._builtInProductIconTheme=new IE,this._autoDetectHighContrast=!0,this._knownThemes=new Map,this._knownThemes.set(zr,$g(zr)),this._knownThemes.set(Ou,$g(Ou)),this._knownThemes.set(va,$g(va));const t=yV(this);this._codiconCSS=t.getCSS(),this._themeCSS="",this._allCSS=`${this._codiconCSS}
582${this._themeCSS}`,this._globalStyleElement=null,this._styleElements=[],this._colorMapOverride=null,this.setTheme(zr),t.onDidChange(()=>{this._codiconCSS=t.getCSS(),this._updateCSS()}),TM("(forced-colors: active)",()=>{this._updateActualTheme()})}
582registerEditorContainer(t){return Xd(t)?this._registerShadowDomContainer(t):this._registerRegularEditorContainer()}_registerRegularEditorContainer(){return this._globalStyleElement||(this._globalStyleElement=Yi(),this._globalStyleElement.className="monaco-colors",this._globalStyleElement.textContent=this._allCSS,this._styleElements.push(this._globalStyleElement)),V.None}_registerShadowDomContainer(t){const e=Yi(t);return e.className="monaco-colors",e.textContent=this._allCSS,this._styleElements.push(e),{dispose:()=>{for(let i=0;i<this._styleElements.length;i++)if(this._styleElements[i]===e){this._styleElements.splice(i,1);return}}}}defineTheme(t,e){if(!/^[a-z0-9\-]+$/i.test(t))throw new Error("Illegal theme name!");if(!Ed(e.base)&&!Ed(t))throw new Error("Illegal theme base!");this._knownThemes.set(t,new DE(t,e)),Ed(t)&&this._knownThemes.forEach(i=>{i.base===t&&i.notifyBaseUpdated()}),this._theme.themeName===t&&this.setTheme(t)}getColorTheme(){return this._theme}setColorMapOverride(t){this._colorMapOverride=t,this._updateThemeOrColorMap()}setTheme(t){let e;this._knownThemes.has(t)?e=this._knownThemes.get(t):e=this._knownThemes.get(zr),this._desiredTheme=e,this._updateActualTheme()}_updateActualTheme(){const t=this._autoDetectHighContrast&&window.matchMedia("(forced-colors: active)").matches?this._knownThemes.get(va):this._desiredTheme;this._theme!==t&&(this._theme=t,this._updateThemeOrColorMap())}setAutoDetectHighContrast(t){this._autoDetectHighContrast=t,this._updateActualTheme()}_updateThemeOrColorMap(){const t=[],e={},i={addRule:r=>{e[r]||(t.push(r),e[r]=!0)}};
582LV.getThemingParticipants().forEach(r=>r(this._theme,i,this._environment));const n=[];for(const r of EE.getColors()){const o=this._theme.getColor(r.id,!0);o&&n.push(`${F2(r.id)}: ${o.toString()};`)}i.addRule(`.monaco-editor { ${n.join(`
583`)} }`);const s=this._colorMapOverride||this._theme.tokenTheme.getColorMap();i.addRule(CV(s)),this._themeCSS=t.join(`
584`),this._updateCSS(),Ge.setColorMap(s),this._onColorThemeChange.fire(this._theme)}_updateCSS(){this._allCSS=`${this._codiconCSS}
585${this._themeCSS}`,this._styleElements.forEach(t=>t.textContent=this._allCSS)}getFileIconTheme(){return{hasFileIcons:!1,hasFolderIcons:!1,hidesExplorerArrows:!1}}getProductIconTheme(){return this._builtInProductIconTheme}},Ji=ge("themeService"),xV=function(t,e,i,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r},AS=function(t,e){return function(i,n){e(i,n,t)}},b1=class extends V{constructor(e,i){super(),this._contextKeyService=e,this._configurationService=i,this._accessibilitySupport=0,this._onDidChangeScreenReaderOptimized=new M,this._accessibilityModeEnabledContext=iR.bindTo(this._contextKeyService);const n=()=>this._accessibilityModeEnabledContext.set(this.isScreenReaderOptimized());this._register(this._configurationService.onDidChangeConfiguration(s=>{s.affectsConfiguration("editor.accessibilitySupport")&&(n(),this._onDidChangeScreenReaderOptimized.fire())})),n(),this.onDidChangeScreenReaderOptimized(()=>n())}get onDidChangeScreenReaderOptimized(){return this._onDidChangeScreenReaderOptimized.event}isScreenReaderOptimized(){const e=this._configurationService.getValue("editor.accessibilitySupport");return e==="on"||e==="auto"&&this._accessibilitySupport===2}getAccessibilitySupport(){return this._accessibilitySupport}};b1=xV([AS(0,Ie),AS(1,yt)],b1);var NE=function(t,e,i,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r},Dd=function(t,e){return function(i,n){e(i,n,t)}},w1=class{constructor(e){this._commandService=e}createMenu(e,i,n){return new S1(e,Object.assign({emitEventsForSubmenuChanges:!1,eventDebounceDelay:50},n),this._commandService,i,this)}};w1=NE([Dd(0,Ni)],w1);var S1=class Ho{constructor(e,i,n,s,r){this._id=e,this._options=i,this._commandService=n,this._contextKeyService=s,this._menuService=r,this._disposables=new ne,this._menuGroups=[],this._contextKeys=new Set,this._build();const o=new _t(()=>{this._build(),this._onDidChange.fire(this)},i.eventDebounceDelay);this._disposables.add(o),this._disposables.add(Wl.onDidChangeMenu(h=>{h.has(e)&&o.schedule()}));const a=this._disposables.add(new ne),l=()=>{const h=new _t(()=>this._onDidChange.fire(this),i.eventDebounceDelay);a.add(h),a.add(s.onDidChangeContext(c=>{c.affectsSome(this._contextKeys)&&h.schedule()}))};this._onDidChange=new M({onFirstListenerAdd:l,onLastListenerRemove:a.clear.bind(a)}),this.onDidChange=this._onDidChange.event}dispose(){this._disposables.dispose(),this._onDidChange.dispose()}_build(){this._menuGroups.length=0,this._contextKeys.clear();const e=Wl.getMenuItems(this._id);let i;e.sort(Ho._compareMenuItems);for(const n of e){const s=n.group||"";(!i||i[0]!==s)&&(i=[s,[]],this._menuGroups.push(i)),i[1].push(n),this._collectContextKeys(n)}}_collectContextKeys(e){if(Ho._fillInKbExprKeys(e.when,this._contextKeys),xl(e)){if(e.command.precondition&&Ho._fillInKbExprKeys(e.command.precondition,this._contextKeys),e.command.toggled){const i=e.command.toggled.condition||e.command.toggled;Ho._fillInKbExprKeys(i,this._contextKeys)}}else this._options.emitEventsForSubmenuChanges&&Wl.getMenuItems(e.submenu).forEach(this._collectContextKeys,this)}getActions(e){const i=[];for(let n of this._menuGroups){const[s,r]=n,o=[];for(const a of r)if(this._contextKeyService.contextMatchesRules(a.when)){const l=xl(a)?new Ip(a.command,a.alt,e,this._contextKeyService,this._commandService):new UM(a,this._menuService,this._contextKeyService,e);o.push(l)}o.length>
5850&&i.push([s,o])}return i}static _fillInKbExprKeys(e,i){if(e)for(let n of e.keys())i.add(n)}static _compareMenuItems(e,i){let n=e.group,s=i.group;if(n!==s){if(n){if(!s)return-1}else return 1;if(n==="navigation")return-1;if(s==="navigation")return 1;let a=n.localeCompare(s);if(a!==0)return a}let r=e.order||0,o=i.order||0;return r<o?-1:r>o?1:Ho._compareTitles(xl(e)?e.command.title:e.title,xl(i)?i.command.title:i.title)}static _compareTitles(e,i){const n=typeof e=="string"?e:e.original,s=typeof i=="string"?i:i.original;return n.localeCompare(s)}};S1=NE([Dd(2,Ni),Dd(3,Ie),Dd(4,x2)],S1);var IV=function(t,e,i,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r},OS=function(t,e){return function(i,n){e(i,n,t)}},vl=function(t,e,i,n){function s(r){return r instanceof i?r:new i(function(o){o(r)})}return new(i||(i=Promise))(function(r,o){function a(c){try{h(n.next(c))}catch(d){o(d)}}function l(c){try{h(n.throw(c))}catch(d){o(d)}}function h(c){c.done?r(c.value):s(c.value).then(a,l)}h((n=n.apply(t,e||[])).next())})},y1=class extends V{constructor(e,i){super(),this.layoutService=e,this.logService=i,this.mapTextToType=new Map,this.findText="",(Wn||fv)&&this.installWebKitWriteTextWorkaround()}installWebKitWriteTextWorkaround(){const e=()=>{const i=new fL;this.webKitPendingClipboardWritePromise&&!this.webKitPendingClipboardWritePromise.isSettled&&this.webKitPendingClipboardWritePromise.cancel(),this.webKitPendingClipboardWritePromise=i,navigator.clipboard.write([new ClipboardItem({"text/plain":i.p})]).catch(n=>vl(this,void 0,void 0,function*(){(!(n instanceof Error)||n.name!=="NotAllowedError"||!i.isRejected)&&this.logService.error(n)}))};this.layoutService.hasContainer&&(this._register(B(this.layoutService.container,"click",e)),this._register(B(this.layoutService.container,"keydown",e)))}writeText(e,i){return vl(this,void 0,void 0,function*(){if(i){this.mapTextToType.set(i,e);return}if(this.webKitPendingClipboardWritePromise)return this.webKitPendingClipboardWritePromise.complete(e);try{return yield navigator.clipboard.writeText(e)}catch{}const n=document.activeElement,s=document.body.appendChild(Q("textarea",{"aria-hidden":!0}));s.style.height="1px",s.style.width="1px",s.style.position="absolute",s.value=e,s.focus(),s.select(),document.execCommand("copy"),n instanceof HTMLElement&&n.focus(),document.body.removeChild(s)})}readText(e){return vl(this,void 0,void 0,function*(){if(e)return this.mapTextToType.get(e)||"";try{return yield navigator.clipboard.readText()}catch{return""}})}readFindText(){return vl(this,void 0,void 0,function*(){return this.findText})}writeFindText(e){return vl(this,void 0,void 0,function*(){this.findText=e})}};y1=IV([OS(0,Uh),OS(1,cr)],y1);var EV=function(t,e,i,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r},DV=function(t,e){return function(i,n){e(i,n,t)}},th="data-keybinding-context",D0=class{constructor(t,e){this._id=t,this._parent=e,this._value=Object.create(null),this._value._contextId=t}setValue(t,e){return this._value[t]!==e?(this._value[t]=e,!0):!1}removeValue(t){return t in this._value?(delete this._value[t],!0):!1}getValue(t){const e=this._value[t];return typeof e>"u"&&this._parent?this._parent.getValue(t):e}},Oa=class extends D0{constructor(){super(-1,null)}setValue(t,e){return!1}removeValue(t){return!1}getValue(t){}};Oa.INSTANCE=new Oa;var TE=class L1 extends D0{constructor(e,i,n){super(e,null),this._configurationService=i,this._values=C8.forConfigKeys(),this._listener=this._configurationService.onDidChangeConfiguration(s=>{if(s.source===6){const r=Array.from(he.map(this._values,([o])=>o));this._values.clear(),n.fire(new FS(r))}else{const r=[];for(const o of s.affectedKeys){const a=`config.${o}`,l=this._values.findSuperstr(a);l!==void 0&&(r.push(...he.map(l,([h])=>h)),this._values.deleteSuperstr(a)),this._values.has(a)&&(r.push(a),this._values.delete(a))}n.fire(new FS(r))}})}dispose(){this._listener.dispose()}getValue(e){if(e.indexOf(L1._keyPrefix)!==0)return super.getValue(e);if(this._values.has(e))return this._values.get(e);const i=e.substr(L1._keyPrefix.length),n=this._configurationService.getValue(i);let s;switch(typeof n){case"number":case"boolean":case"string":s=n;break;default:Array.isArray(n)?s=JSON.stringify(n):s=n}return this._values.set(e,s),s}setValue(e,i){return super.setValue(e,i)}removeValue(e){return super.removeValue(e)}};
585TE._keyPrefix="config.";var NV=class{constructor(t,e,i){this._service=t,this._key=e,this._defaultValue=i,this.reset()}set(t){this._service.setContext(this._key,t)}reset(){typeof this._defaultValue>"u"?this._service.removeContext(this._key):this._service.setContext(this._key,this._defaultValue)}get(){return this._service.getContextKeyValue(this._key)}},PS=class{constructor(t){this.key=t}affectsSome(t){return t.has(this.key)}},FS=class{constructor(t){this.keys=t}affectsSome(t){for(const e of this.keys)if(t.has(e))return!0;return!1}},TV=class{constructor(t){this.events=t}affectsSome(t){for(const e of this.events)if(e.affectsSome(t))return!0;return!1}},ME=class{constructor(t){this._onDidChangeContext=new Bd({merge:e=>new TV(e)}),this.onDidChangeContext=this._onDidChangeContext.event,this._isDisposed=!1,this._myContextId=t}createKey(t,e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new NV(this,t,e)}bufferChangeEvents(t){this._onDidChangeContext.pause();try{t()}finally{this._onDidChangeContext.resume()}}createScoped(t){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new MV(this,t)}contextMatchesRules(t){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");const e=this.getContextValuesContainer(this._myContextId);return t?t.evaluate(e):!0}getContextKeyValue(t){if(!this._isDisposed)return this.getContextValuesContainer(this._myContextId).getValue(t)}setContext(t,e){if(this._isDisposed)return;const i=this.getContextValuesContainer(this._myContextId);i&&i.setValue(t,e)&&this._onDidChangeContext.fire(new PS(t))}removeContext(t){this._isDisposed||this.getContextValuesContainer(this._myContextId).removeValue(t)&&this._onDidChangeContext.fire(new PS(t))}getContext(t){return this._isDisposed?Oa.INSTANCE:this.getContextValuesContainer(RV(t))}},k1=class extends ME{constructor(e){super(0),this._contexts=new Map,this._toDispose=new ne,this._lastContextId=0;const i=new TE(this._myContextId,e,this._onDidChangeContext);this._contexts.set(this._myContextId,i),this._toDispose.add(i)}dispose(){this._onDidChangeContext.dispose(),this._isDisposed=!0,this._toDispose.dispose()}getContextValuesContainer(e){return this._isDisposed?Oa.INSTANCE:this._contexts.get(e)||Oa.INSTANCE}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ContextKeyService has been disposed");let i=++this._lastContextId;return this._contexts.set(i,new D0(i,this.getContextValuesContainer(e))),i}disposeContext(e){this._isDisposed||this._contexts.delete(e)}};k1=EV([DV(0,yt)],k1);var MV=class extends ME{constructor(t,e){if(super(t.createChildContext()),this._parentChangeListener=new Sy,this._parent=t,this._updateParentChangeListener(),this._domNode=e,this._domNode.hasAttribute(th)){let i="";this._domNode.classList&&(i=Array.from(this._domNode.classList.values()).join(", "))}this._domNode.setAttribute(th,String(this._myContextId))}_updateParentChangeListener(){this._parentChangeListener.value=this._parent.onDidChangeContext(this._onDidChangeContext.fire,this._onDidChangeContext)}dispose(){this._isDisposed||(this._onDidChangeContext.dispose(),this._parent.disposeContext(this._myContextId),this._parentChangeListener.dispose(),this._domNode.removeAttribute(th),this._isDisposed=!0)}getContextValuesContainer(t){return this._isDisposed?Oa.INSTANCE:this._parent.getContextValuesContainer(t)}createChildContext(t=this._myContextId){if(this._isDisposed)throw new Error("ScopedContextKeyService has been disposed");return this._parent.createChildContext(t)}
585disposeContext(t){this._isDisposed||this._parent.disposeContext(t)}};function RV(t){for(;t;){if(t.hasAttribute(th)){const e=t.getAttribute(th);return e?parseInt(e,10):NaN}t=t.parentElement}return 0}Tt.registerCommand(BM,function(t,e,i){t.get(Ie).createKey(String(e),i)});Tt.registerCommand({id:"getContextKeyInfo",handler(){return[...Y.all()].sort((t,e)=>t.key.localeCompare(e.key))},description:{description:p("getContextKeyInfo","A command that returns information about context keys"),args:[]}});Tt.registerCommand("_generateContextKeyInfo",function(){const t=[],e=new Set;for(let i of Y.all())e.has(i.key)||(e.add(i.key),t.push(i));t.sort((i,n)=>i.key.localeCompare(n.key))});var AV=class{constructor(t){this.incoming=new Map,this.outgoing=new Map,this.data=t}},OV=class{constructor(t){this._hashFn=t,this._nodes=new Map}roots(){const t=[];for(let e of this._nodes.values())e.outgoing.size===0&&t.push(e);return t}insertEdge(t,e){const i=this.lookupOrInsertNode(t),n=this.lookupOrInsertNode(e);i.outgoing.set(this._hashFn(e),n),n.incoming.set(this._hashFn(t),i)}removeNode(t){const e=this._hashFn(t);this._nodes.delete(e);for(let i of this._nodes.values())i.outgoing.delete(e),i.incoming.delete(e)}lookupOrInsertNode(t){const e=this._hashFn(t);let i=this._nodes.get(e);return i||(i=new AV(t),this._nodes.set(e,i)),i}isEmpty(){return this._nodes.size===0}toString(){let t=[];for(let[e,i]of this._nodes)t.push(`${e}, (incoming)[${[...i.incoming.keys()].join(", ")}], (outgoing)[${[...i.outgoing.keys()].join(",")}]`);return t.join(`
586`)}findCycleSlow(){for(let[t,e]of this._nodes){const i=new Set([t]),n=this._findCycle(e,i);if(n)return n}}_findCycle(t,e){for(let[i,n]of t.outgoing){if(e.has(i))return[...e,i].join(" -> ");e.add(i);const s=this._findCycle(n,e);if(s)return s;e.delete(i)}}},BS=class extends Error{constructor(t){var e;super("cyclic dependency between services"),this.message=(e=t.findCycleSlow())!==null&&e!==void 0?e:`UNABLE to detect cycle, dumping graph: 
587${t.toString()}`}},PV=class RE{constructor(e=new of,i=!1,n){this._activeInstantiations=new Set,this._services=e,this._strict=i,this._parent=n,this._services.set(Qi,this)}createChild(e){return new RE(e,this._strict,this)}invokeFunction(e,...i){let n=Ca.traceInvocation(e),s=!1;try{return e({get:r=>{if(s)throw GN("service accessor is only valid during the invocation of its target method");const o=this._getOrCreateServiceInstance(r,n);if(!o)throw new Error(`[invokeFunction] unknown service '${r}'`);return o}},...i)}finally{s=!0,n.stop()}}createInstance(e,...i){let n,s;return e instanceof Mn?(n=Ca.traceCreation(e.ctor),s=this._createInstance(e.ctor,e.staticArguments.concat(i),n)):(n=Ca.traceCreation(e),s=this._createInstance(e,i,n)),n.stop(),s}_createInstance(e,i=[],n){let s=un.getServiceDependencies(e).sort((a,l)=>a.index-l.index),r=[];for(const a of s){let l=this._getOrCreateServiceInstance(a.id,n);l||this._throwIfStrict(`[createInstance] ${e.name} depends on UNKNOWN service ${a.id}.`,!1),r.push(l)}let o=s.length>0?s[0].index:i.length;if(i.length!==o){let a=o-i.length;a>0?i=i.concat(new Array(a)):i=i.slice(0,o)}return new e(...i,...r)}_setServiceInstance(e,i){if(this._services.get(e)instanceof Mn)this._services.set(e,i);else if(this._parent)this._parent._setServiceInstance(e,i);else throw new Error("illegalState - setting UNKNOWN service instance")}_getServiceInstanceOrDescriptor(e){let i=this._services.get(e);return!i&&this._parent?this._parent._getServiceInstanceOrDescriptor(e):i}_getOrCreateServiceInstance(e,i){let n=this._getServiceInstanceOrDescriptor(e);return n instanceof Mn?this._safeCreateAndCacheServiceInstance(e,n,i.branch(e,!0)):(i.branch(e,!1),n)}_safeCreateAndCacheServiceInstance(e,i,n){if(this._activeInstantiations.has(e))throw new Error(`illegal state - RECURSIVELY instantiating service '${e}'`);this._activeInstantiations.add(e);try{return this._createAndCacheServiceInstance(e,i,n)}finally{this._activeInstantiations.delete(e)}}_createAndCacheServiceInstance(e,i,n){const s=new OV(a=>a.id.toString());let r=0;const o=[{id:e,desc:i,_trace:n}];for(;o.length;){const a=o.pop();if(s.lookupOrInsertNode(a),r++>1e3)throw new BS(s);for(let l of un.getServiceDependencies(a.desc.ctor)){let h=this._getServiceInstanceOrDescriptor(l.id);if(h||this._throwIfStrict(`[createInstance] ${e} depends on ${l.id} which is NOT registered.`,!0),h instanceof Mn){const c={id:l.id,desc:h,_trace:a._trace.branch(l.id,!0)};s.insertEdge(a,c),o.push(c)}}}for(;;){const a=s.roots();if(a.length===0){if(!s.isEmpty())throw new BS(s);break}for(const{data:l}of a){if(this._getServiceInstanceOrDescriptor(l.id)instanceof Mn){const h=this._createServiceInstanceWithOwner(l.id,l.desc.ctor,l.desc.staticArguments,l.desc.supportsDelayedInstantiation,l._trace);this._setServiceInstance(l.id,h)}s.removeNode(l)}}return this._getServiceInstanceOrDescriptor(e)}_createServiceInstanceWithOwner(e,i,n=[],s,r){if(this._services.get(e)instanceof Mn)return this._createServiceInstance(i,n,s,r);if(this._parent)return this._parent._createServiceInstanceWithOwner(e,i,n,s,r);throw new Error(`illegalState - creating UNKNOWN service instance ${i.name}`)}_createServiceInstance(e,i=[],n,s){if(n){const r=new ju(()=>this._createInstance(e,i,s));return new Proxy(Object.create(null),{get(o,a){if(a in o)return o[a];let l=r.value,h=l[a];
587return typeof h!="function"||(h=h.bind(l),o[a]=h),h},set(o,a,l){return r.value[a]=l,!0}})}else return this._createInstance(e,i,s)}_throwIfStrict(e,i){if(this._strict)throw new Error(e)}},Ca=class zo{constructor(e,i){this.type=e,this.name=i,this._start=Date.now(),this._dep=[]}static traceInvocation(e){return zo._None}static traceCreation(e){return zo._None}branch(e,i){let n=new zo(2,e.toString());return this._dep.push([e,i,n]),n}stop(){let e=Date.now()-this._start;zo._totals+=e;let i=!1;function n(r,o){let a=[],l=new Array(r+1).join("	");for(const[h,c,d]of o._dep)if(c&&d){i=!0,a.push(`${l}CREATES -> ${h}`);let u=n(r+1,d);u&&a.push(u)}else a.push(`${l}uses -> ${h}`);return a.join(`
588`)}let s=[`${this.type===0?"CREATE":"CALL"} ${this.name}`,`${n(1,this)}`,`DONE, took ${e.toFixed(2)}ms (grand total ${zo._totals.toFixed(2)}ms)`];e>2}};Ca._None=new class extends Ca{constructor(){super(-1,null)}stop(){}branch(){return this}};Ca._totals=0;var FV=class{constructor(){this._byResource=new $i,this._byOwner=new Map}set(t,e,i){let n=this._byResource.get(t);n||(n=new Map,this._byResource.set(t,n)),n.set(e,i);let s=this._byOwner.get(e);s||(s=new $i,this._byOwner.set(e,s)),s.set(t,i)}get(t,e){let i=this._byResource.get(t);return i?.get(e)}delete(t,e){let i=!1,n=!1,s=this._byResource.get(t);s&&(i=s.delete(e));let r=this._byOwner.get(e);if(r&&(n=r.delete(t)),i!==n)throw new Error("illegal state");return i&&n}values(t){var e,i,n,s;return typeof t=="string"?(i=(e=this._byOwner.get(t))===null||e===void 0?void 0:e.values())!==null&&i!==void 0?i:he.empty():Le.isUri(t)?(s=(n=this._byResource.get(t))===null||n===void 0?void 0:n.values())!==null&&s!==void 0?s:he.empty():he.map(he.concat(...this._byOwner.values()),r=>r[1])}},BV=class{constructor(t){this.errors=0,this.infos=0,this.warnings=0,this.unknowns=0,this._data=new $i,this._service=t,this._subscription=t.onMarkerChanged(this._update,this)}dispose(){this._subscription.dispose()}_update(t){for(const e of t){const i=this._data.get(e);i&&this._substract(i);const n=this._resourceStats(e);this._add(n),this._data.set(e,n)}}_resourceStats(t){const e={errors:0,warnings:0,infos:0,unknowns:0};if(t.scheme===_e.inMemory||t.scheme===_e.walkThrough||t.scheme===_e.walkThroughSnippet)return e;for(const{severity:i}of this._service.read({resource:t}))i===Si.Error?e.errors+=1:i===Si.Warning?e.warnings+=1:i===Si.Info?e.infos+=1:e.unknowns+=1;return e}_substract(t){this.errors-=t.errors,this.warnings-=t.warnings,this.infos-=t.infos,this.unknowns-=t.unknowns}_add(t){this.errors+=t.errors,this.warnings+=t.warnings,this.infos+=t.infos,this.unknowns+=t.unknowns}},VV=class Uo{constructor(){this._onMarkerChanged=new r4({delay:0,merge:Uo._merge}),this.onMarkerChanged=this._onMarkerChanged.event,this._data=new FV,this._stats=new BV(this)}dispose(){this._stats.dispose(),this._onMarkerChanged.dispose()}remove(e,i){for(const n of i||[])this.changeOne(e,n,[])}changeOne(e,i,n){if(ZD(n))this._data.delete(i,e)&&this._onMarkerChanged.fire([i]);else{const s=[];for(const r of n){const o=Uo._toMarker(e,i,r);o&&s.push(o)}this._data.set(i,e,s),this._onMarkerChanged.fire([i])}}static _toMarker(e,i,n){let{code:s,severity:r,message:o,source:a,startLineNumber:l,startColumn:h,endLineNumber:c,endColumn:d,relatedInformation:u,tags:g}=n;if(o)return l=l>0?l:1,h=h>0?h:1,c=c>=l?c:l,d=d>0?d:h,{resource:i,owner:e,code:s,severity:r,message:o,source:a,startLineNumber:l,startColumn:h,endLineNumber:c,endColumn:d,relatedInformation:u,tags:g}}read(e=Object.create(null)){let{owner:i,resource:n,severities:s,take:r}=e;if((!r||r<0)&&(r=-1),i&&n){const o=this._data.get(n,i);if(o){const a=[];for(const l of o)if(Uo._accept(l,s)){const h=a.push(l);if(r>0&&h===r)break}return a}else return[]}else if(!i&&!n){const o=[];for(let a of this._data.values())for(let l of a)if(Uo._accept(l,s)){const h=o.push(l);if(r>0&&h===r)return o}return o}else{const o=this._data.values(n??i),a=[];for(const l of o)for(const h of l)if(Uo._accept(h,s)){const c=a.push(h);if(r>0&&c===r)return a}return a}}static _accept(e,i){return i===void 0||(i&e.severity)===e.severity}static _merge(e){const i=new $i;for(let n of e)for(let s of n)i.set(s,!0);return Array.from(i.keys())}}
588,Ol=function(t,e,i,n){function s(r){return r instanceof i?r:new i(function(o){o(r)})}return new(i||(i=Promise))(function(r,o){function a(c){try{h(n.next(c))}catch(d){o(d)}}function l(c){try{h(n.throw(c))}catch(d){o(d)}}function h(c){c.done?r(c.value):s(c.value).then(a,l)}h((n=n.apply(t,e||[])).next())})},ta;(function(t){t[t.None=0]="None",t[t.Initialized=1]="Initialized",t[t.Closed=2]="Closed"})(ta||(ta={}));var x1=class AE extends V{constructor(e,i=Object.create(null)){super(),this.database=e,this.options=i,this._onDidChangeStorage=this._register(new M),this.onDidChangeStorage=this._onDidChangeStorage.event,this.state=ta.None,this.cache=new Map,this.flushDelayer=new WT(AE.DEFAULT_FLUSH_DELAY),this.pendingDeletes=new Set,this.pendingInserts=new Map,this.whenFlushedCallbacks=[],this.registerListeners()}registerListeners(){this._register(this.database.onDidChangeItemsExternal(e=>this.onDidChangeItemsExternal(e)))}onDidChangeItemsExternal(e){var i,n;(i=e.changed)===null||i===void 0||i.forEach((s,r)=>this.accept(r,s)),(n=e.deleted)===null||n===void 0||n.forEach(s=>this.accept(s,void 0))}accept(e,i){if(this.state===ta.Closed)return;let n=!1;zi(i)?n=this.cache.delete(e):this.cache.get(e)!==i&&(this.cache.set(e,i),n=!0),n&&this._onDidChangeStorage.fire(e)}get(e,i){const n=this.cache.get(e);return zi(n)?i:n}getBoolean(e,i){const n=this.get(e);return zi(n)?i:n==="true"}getNumber(e,i){const n=this.get(e);return zi(n)?i:parseInt(n,10)}set(e,i){return Ol(this,void 0,void 0,function*(){if(this.state===ta.Closed)return;if(zi(i))return this.delete(e);const n=String(i);if(this.cache.get(e)!==n)return this.cache.set(e,n),this.pendingInserts.set(e,n),this.pendingDeletes.delete(e),this._onDidChangeStorage.fire(e),this.doFlush()})}delete(e){return Ol(this,void 0,void 0,function*(){if(this.state!==ta.Closed&&this.cache.delete(e))return this.pendingDeletes.has(e)||this.pendingDeletes.add(e),this.pendingInserts.delete(e),this._onDidChangeStorage.fire(e),this.doFlush()})}get hasPending(){return this.pendingInserts.size>0||this.pendingDeletes.size>0}flushPending(){return Ol(this,void 0,void 0,function*(){if(!this.hasPending)return;const e={insert:this.pendingInserts,delete:this.pendingDeletes};return this.pendingDeletes=new Set,this.pendingInserts=new Map,this.database.updateItems(e).finally(()=>{var i;if(!this.hasPending)for(;this.whenFlushedCallbacks.length;)(i=this.whenFlushedCallbacks.pop())===null||i===void 0||i()})})}doFlush(e){return Ol(this,void 0,void 0,function*(){return this.flushDelayer.trigger(()=>this.flushPending(),e)})}dispose(){this.flushDelayer.dispose(),super.dispose()}};x1.DEFAULT_FLUSH_DELAY=100;var VS=class{constructor(){this.onDidChangeItemsExternal=$.None,this.items=new Map}updateItems(t){return Ol(this,void 0,void 0,function*(){t.insert&&t.insert.forEach((e,i)=>this.items.set(i,e)),t.delete&&t.delete.forEach(e=>this.items.delete(e))})}},Ac="__$__targetStorageMarker",N0=ge("storageService"),WS;(function(t){t[t.NONE=0]="NONE",t[t.SHUTDOWN=1]="SHUTDOWN"})(WS||(WS={}));var OE=class PE extends V{constructor(e={flushInterval:PE.DEFAULT_FLUSH_INTERVAL}){super(),this.options=e,this._onDidChangeValue=this._register(new Bd),this._onDidChangeTarget=this._register(new Bd),this._onWillSaveState=this._register(new M),this.onWillSaveState=this._onWillSaveState.event,this._workspaceKeyTargets=void 0,this._globalKeyTargets=void 0}emitDidChangeValue(e,i){i===Ac?(e===0?this._globalKeyTargets=void 0:e===1&&(this._workspaceKeyTargets=void 0),this._onDidChangeTarget.fire({scope:e})):this._onDidChangeValue.fire({scope:e,key:i,target:this.getKeyTargets(e)[i]})}get(e,i,n){var s;return(s=this.getStorage(i))===null||s===void 0?void 0:s.get(e,n)}getBoolean(e,i,n){var s;return(s=this.getStorage(i))===null||s===void 0?void 0:s.getBoolean(e,n)}getNumber(e,i,n){var s;return(s=this.getStorage(i))===null||s===void 0?void 0:s.getNumber(e,n)}store(e,i,n,s){if(zi(i)){this.remove(e,n);return}this.withPausedEmitters(()=>{var r;this.updateKeyTarget(e,n,s),(r=this.getStorage(n))===null||r===void 0||r.set(e,i)})}remove(e,i){this.withPausedEmitters(()=>{var n;this.updateKeyTarget(e,i,void 0),(n=this.getStorage(i))===null||n===void 0||n.delete(e)})}withPausedEmitters(e){this._onDidChangeValue.pause(),this._onDidChangeTarget.pause();try{e()}finally{this._onDidChangeValue.resume(),this._onDidChangeTarget.resume()}}updateKeyTarget(e,i,n){var s,r;const o=this.getKeyTargets(i);typeof n=="number"?o[e]!==n&&(o[e]=n,(s=this.getStorage(i))===null||s===void 0||s.set(Ac,JSON.stringify(o))):typeof o[e]=="number"&&(delete o[e],(r=this.getStorage(i))===null||r===void 0||r.set(Ac,JSON.stringify(o)))}get workspaceKeyTargets(){return this._workspaceKeyTargets||(this._workspaceKeyTargets=this.loadKeyTargets(1)),this._workspaceKeyTargets}get globalKeyTargets(){return this._globalKeyTargets||(this._globalKeyTargets=this.loadKeyTargets(0)),this._globalKeyTargets}getKeyTargets(e){return e===0?this.globalKeyTargets:this.workspaceKeyTargets}loadKeyTargets(e){const i=this.get(Ac,e);if(i)try{return JSON.parse(i)}catch{}return Object.create(null)}};OE.DEFAULT_FLUSH_INTERVAL=6e4;var WV=class extends OE{constructor(){super(),this.globalStorage=this._register(new x1(new VS)),this.workspaceStorage=this._register(new x1(new VS)),this._register(this.workspaceStorage.onDidChangeStorage(t=>this.emitDidChangeValue(1,t))),this._register(this.globalStorage.onDidChangeStorage(t=>this.emitDidChangeValue(0,t)))}getStorage(t){return t===0?this.globalStorage:this.workspaceStorage}};function FE(t,e,i,n,s){if(Array.isArray(t)){let r=0;for(const o of t){const a=FE(o,e,i,n,s);if(a===10)return a;a>r&&(r=a)}return r}else{if(typeof t=="string")return n?t==="*"?5:t===i?10:0:0;if(t){const{language:r,pattern:o,scheme:a,hasAccessToAllModels:l,notebookType:h}=t;if(!n&&!l)return 0;let c=0;if(a)if(a===e.scheme)c=10;else if(a==="*")c=5;else return 0;if(r)if(r===i)c=10;else if(r==="*")c=Math.max(c,5);else return 0;if(h)if(h===s)c=10;else if(h==="*")c=Math.max(c,5);else return 0;if(o){let d;
588if(typeof o=="string"?d=o:d=Object.assign(Object.assign({},o),{base:Ty(o.base)}),d===e.fsPath||l6(d,e.fsPath))c=10;else return 0}return c}else return 0}}function BE(t){return typeof t=="string"?!1:Array.isArray(t)?t.every(BE):!!t.exclusive}var Ke=class VE{constructor(e){this._notebookTypeResolver=e,this._clock=0,this._entries=[],this._onDidChange=new M,this.onDidChange=this._onDidChange.event}register(e,i){let n={selector:e,provider:i,_score:-1,_time:this._clock++};return this._entries.push(n),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),Ae(()=>{if(n){const s=this._entries.indexOf(n);s>=0&&(this._entries.splice(s,1),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),n=void 0)}})}has(e){return this.all(e).length>0}all(e){if(!e)return[];this._updateScores(e);const i=[];for(let n of this._entries)n._score>0&&i.push(n.provider);return i}ordered(e){const i=[];return this._orderedForEach(e,n=>i.push(n.provider)),i}orderedGroups(e){const i=[];let n,s;return this._orderedForEach(e,r=>{n&&s===r._score?n.push(r.provider):(s=r._score,n=[r.provider],i.push(n))}),i}_orderedForEach(e,i){if(e){this._updateScores(e);for(const n of this._entries)n._score>0&&i(n)}}_updateScores(e){var i;const n=(i=this._notebookTypeResolver)===null||i===void 0?void 0:i.call(this,e.uri),s={uri:e.uri.toString(),language:e.getLanguageId(),notebookType:n};if(!(this._lastCandidate&&this._lastCandidate.language===s.language&&this._lastCandidate.uri===s.uri&&this._lastCandidate.notebookType===s.notebookType)){this._lastCandidate=s;for(let r of this._entries)if(r._score=FE(r.selector,e.uri,e.getLanguageId(),lT(e),n),BE(r.selector)&&r._score>0){for(let o of this._entries)o._score=0;r._score=1e3;break}this._entries.sort(VE._compareByScoreAndTime)}}static _compareByScoreAndTime(e,i){return e._score<i._score?1:e._score>i._score?-1:e._time<i._time?1:e._time>i._time?-1:0}},HV=class{constructor(){this.referenceProvider=new Ke(this._score.bind(this)),this.renameProvider=new Ke(this._score.bind(this)),this.codeActionProvider=new Ke(this._score.bind(this)),this.definitionProvider=new Ke(this._score.bind(this)),this.typeDefinitionProvider=new Ke(this._score.bind(this)),this.declarationProvider=new Ke(this._score.bind(this)),this.implementationProvider=new Ke(this._score.bind(this)),this.documentSymbolProvider=new Ke(this._score.bind(this)),this.inlayHintsProvider=new Ke(this._score.bind(this)),this.colorProvider=new Ke(this._score.bind(this)),this.codeLensProvider=new Ke(this._score.bind(this)),this.documentFormattingEditProvider=new Ke(this._score.bind(this)),this.documentRangeFormattingEditProvider=new Ke(this._score.bind(this)),this.onTypeFormattingEditProvider=new Ke(this._score.bind(this)),this.signatureHelpProvider=new Ke(this._score.bind(this)),this.hoverProvider=new Ke(this._score.bind(this)),this.documentHighlightProvider=new Ke(this._score.bind(this)),this.selectionRangeProvider=new Ke(this._score.bind(this)),this.foldingRangeProvider=new Ke(this._score.bind(this)),this.linkProvider=new Ke(this._score.bind(this)),this.inlineCompletionsProvider=new Ke(this._score.bind(this)),this.completionProvider=new Ke(this._score.bind(this)),this.linkedEditingRangeProvider=new Ke(this._score.bind(this)),this.documentRangeSemanticTokensProvider=new Ke(this._score.bind(this)),this.documentSemanticTokensProvider=new Ke(this._score.bind(this))}_score(t){var e;return(e=this._notebookTypeResolver)===null||e===void 0?void 0:e.call(this,t)}};ve(pe,HV,!0);var fr=function(t,e,i,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r},Dt=function(t,e){return function(i,n){e(i,n,t)}},WE=function(t,e,i,n){function s(r){return r instanceof i?r:new i(function(o){o(r)})}return new(i||(i=Promise))(function(r,o){function a(c){try{h(n.next(c))}catch(d){o(d)}}function l(c){try{h(n.throw(c))}catch(d){o(d)}}function h(c){c.done?r(c.value):s(c.value).then(a,l)}h((n=n.apply(t,e||[])).next())})},zV=class{constructor(t){this.disposed=!1,this.model=t,this._onWillDispose=new M}get textEditorModel(){return this.model}dispose(){this.disposed=!0,this._onWillDispose.fire()}},I1=class{constructor(e){this.modelService=e}createModelReference(e){const i=this.modelService.getModel(e);return i?Promise.resolve(new t4(new zV(i))):Promise.reject(new Error("Model not found"))}};I1=fr([Dt(0,Lt)],I1);var HE=class zE{show(){return zE.NULL_PROGRESS_RUNNER}showWhile(e,i){return WE(this,void 0,void 0,function*(){yield e})}};HE.NULL_PROGRESS_RUNNER={done:()=>{},total:()=>{},worked:()=>{}};var UV=class{confirm(t){return this.doConfirm(t).then(e=>({confirmed:e,checkboxChecked:!1}
588))}doConfirm(t){let e=t.message;return t.detail&&(e=e+`
589
590`+t.detail),Promise.resolve(window.confirm(e))}show(t,e,i,n){return Promise.resolve({choice:0})}},UE=class $E{info(e){return this.notify({severity:it.Info,message:e})}warn(e){return this.notify({severity:it.Warning,message:e})}error(e){return this.notify({severity:it.Error,message:e})}notify(e){switch(e.severity){case it.Error:break;case it.Warning:break;default:}return $E.NO_OP}status(e,i){return V.None}};UE.NO_OP=new g3;var E1=class{constructor(e){this._onWillExecuteCommand=new M,this._onDidExecuteCommand=new M,this.onWillExecuteCommand=this._onWillExecuteCommand.event,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this._instantiationService=e}executeCommand(e,...i){const n=Tt.getCommand(e);if(!n)return Promise.reject(new Error(`command '${e}' not found`));try{this._onWillExecuteCommand.fire({commandId:e,args:i});const s=this._instantiationService.invokeFunction.apply(this._instantiationService,[n.handler,...i]);return this._onDidExecuteCommand.fire({commandId:e,args:i}),Promise.resolve(s)}catch(s){return Promise.reject(s)}}};E1=fr([Dt(0,Qi)],E1);var Pu=class extends B8{constructor(e,i,n,s,r,o){super(e,i,n,s,r),this._cachedResolver=null,this._dynamicKeybindings=[],this._domNodeListeners=[];const a=g=>{const m=new ne;m.add(B(g,Z.KEY_DOWN,_=>{const C=new Pe(_);this._dispatch(C,C.target)&&(C.preventDefault(),C.stopPropagation())})),m.add(B(g,Z.KEY_UP,_=>{const C=new Pe(_);this._singleModifierDispatch(C,C.target)&&C.preventDefault()})),this._domNodeListeners.push(new $V(g,m))},l=g=>{for(let m=0;m<this._domNodeListeners.length;m++){const _=this._domNodeListeners[m];_.domNode===g&&(this._domNodeListeners.splice(m,1),_.dispose())}},h=g=>{g.getOption(54)||a(g.getContainerDomNode())},c=g=>{g.getOption(54)||l(g.getContainerDomNode())};this._register(o.onCodeEditorAdd(h)),this._register(o.onCodeEditorRemove(c)),o.listCodeEditors().forEach(h);const d=g=>{a(g.getContainerDomNode())},u=g=>{l(g.getContainerDomNode())};this._register(o.onDiffEditorAdd(d)),this._register(o.onDiffEditorRemove(u)),o.listDiffEditors().forEach(d)}addDynamicKeybinding(e,i,n,s){const r=mp(i,Hi),o=new ne;return r&&(this._dynamicKeybindings.push({keybinding:r.parts,command:e,when:s,weight1:1e3,weight2:0,extensionId:null,isBuiltinExtension:!1}),o.add(Ae(()=>{for(let a=0;a<this._dynamicKeybindings.length;a++)if(this._dynamicKeybindings[a].command===e){this._dynamicKeybindings.splice(a,1),this.updateResolver({source:1});return}}))),o.add(Tt.registerCommand(e,n)),this.updateResolver({source:1}),o}updateResolver(e){this._cachedResolver=null,this._onDidUpdateKeybindings.fire(e)}_getResolver(){if(!this._cachedResolver){const e=this._toNormalizedKeybindingItems(Ua.getDefaultKeybindings(),!0),i=this._toNormalizedKeybindingItems(this._dynamicKeybindings,!1);this._cachedResolver=new V8(e,i,n=>this._log(n))}return this._cachedResolver}_documentHasFocus(){return document.hasFocus()}_toNormalizedKeybindingItems(e,i){const n=[];let s=0;for(const r of e){const o=r.when||void 0,a=r.keybinding;if(!a)n[s++]=new Mw(void 0,r.command,r.commandArgs,o,i,null,!1);else{const l=Rw.resolveUserBinding(a,Hi);for(const h of l)n[s++]=new Mw(h,r.command,r.commandArgs,o,i,null,!1)}}return n}resolveKeyboardEvent(e){const i=new lh(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,e.keyCode).toChord();return new Rw(i,Hi)}};Pu=fr([Dt(0,Ie),Dt(1,Ni),Dt(2,Oh),Dt(3,wn),Dt(4,cr),Dt(5,pt)],Pu);var $V=class extends V{constructor(t,e){super(),this.domNode=t,this._register(e)}};function HS(t){return t&&typeof t=="object"&&(!t.overrideIdentifier||typeof t.overrideIdentifier=="string")&&(!t.resource||t.resource instanceof Le)}var KE=class{constructor(){this._onDidChangeConfiguration=new M,this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._configuration=new nI(new O8,new Nn)}getValue(t,e){const i=typeof t=="string"?t:void 0,n=HS(t)?t:HS(e)?e:{};return this._configuration.getValue(i,n,void 0)}updateValues(t){const e={data:this._configuration.toData()},i=[];for(const n of t){const[s,r]=n;
590this.getValue(s)!==r&&(this._configuration.updateValue(s,r),i.push(s))}if(i.length>0){const n=new P8({keys:i,overrides:[]},e,this._configuration);n.source=7,n.sourceConfig=null,this._onDidChangeConfiguration.fire(n)}return Promise.resolve()}updateValue(t,e,i,n){return this.updateValues([[t,e]])}inspect(t,e={}){return this._configuration.inspect(t,e,void 0)}},D1=class{constructor(e){this.configurationService=e,this._onDidChangeConfiguration=new M,this.configurationService.onDidChangeConfiguration(i=>{this._onDidChangeConfiguration.fire({affectedKeys:i.affectedKeys,affectsConfiguration:(n,s)=>i.affectsConfiguration(s)})})}getValue(e,i,n){const s=A.isIPosition(i)&&i?typeof n=="string"?n:void 0:typeof i=="string"?i:void 0;return typeof s>"u"?this.configurationService.getValue():this.configurationService.getValue(s)}};D1=fr([Dt(0,yt)],D1);var N1=class{constructor(e){this.configurationService=e}getEOL(e,i){const n=this.configurationService.getValue("files.eol",{overrideIdentifier:i,resource:e});return n&&typeof n=="string"&&n!=="auto"?n:Bt||fe?`
591`:`\r
592`}};N1=fr([Dt(0,yt)],N1);var KV=class{publicLog(t,e){return Promise.resolve(void 0)}publicLog2(t,e){return this.publicLog(t,e)}},jE=class qE{constructor(){const e=Le.from({scheme:qE.SCHEME,authority:"model",path:"/"});this.workspace={id:"4064f6ec-cb38-4ad0-af64-ee6467e63c82",folders:[new j8({uri:e,name:"",index:0})]}}getWorkspace(){return this.workspace}};jE.SCHEME="inmemory";function Fu(t,e,i){if(!e||!(t instanceof KE))return;const n=[];Object.keys(e).forEach(s=>{M8(s)&&n.push([`editor.${s}`,e[s]]),i&&R8(s)&&n.push([`diffEditor.${s}`,e[s]])}),n.length>0&&t.updateValues(n)}var T1=class{constructor(e){this._modelService=e}hasPreviewHandler(){return!1}apply(e,i){return WE(this,void 0,void 0,function*(){const n=new Map;for(let o of e){if(!(o instanceof tI))throw new Error("bad edit - only text edits are supported");const a=this._modelService.getModel(o.resource);if(!a)throw new Error("bad edit - model not found");if(typeof o.versionId=="number"&&a.getVersionId()!==o.versionId)throw new Error("bad state - model changed in the meantime");let l=n.get(a);l||(l=[],n.set(a,l)),l.push(A8.replaceMove(T.lift(o.textEdit.range),o.textEdit.text))}let s=0,r=0;for(const[o,a]of n)o.pushStackElement(),o.pushEditOperations([],a,()=>[]),o.pushStackElement(),r+=1,s+=a.length;return{ariaSummary:Hd(A_.bulkEditServiceSummary,s,r)}})}};T1=fr([Dt(0,Lt)],T1);var jV=class{getUriLabel(t,e){return t.scheme==="file"?t.fsPath:t.path}},M1=class extends P_{constructor(e,i){super(e),this._codeEditorService=i}showContextView(e,i,n){if(!i){const s=this._codeEditorService.getFocusedCodeEditor()||this._codeEditorService.getActiveCodeEditor();s&&(i=s.getContainerDomNode())}return super.showContextView(e,i,n)}};M1=fr([Dt(0,Uh),Dt(1,pt)],M1);var qV=class{constructor(){this._neverEmitter=new M,this.onDidChangeTrust=this._neverEmitter.event}isWorkspaceTrusted(){return!0}},GV=class extends dI{constructor(){super()}},ZV=class extends I5{constructor(){super(new x5)}},R1=class extends K_{constructor(e,i,n,s,r){super(e,i,n,s,r),this.configure({blockMouse:!1})}};R1=fr([Dt(0,Oh),Dt(1,wn),Dt(2,af),Dt(3,vi),Dt(4,et)],R1);ve(yt,KE);ve(kL,D1);ve(xL,N1);ve(K8,jE);ve($8,jV);ve(Oh,KV);ve(Zx,UV);ve(wn,UE);ve(Xa,VV);ve(Nt,GV);ve(Ji,kV);ve(cr,ZV);ve(Lt,Eu);ve(QL,Y_);ve(Ie,k1);ve(s0,HE);ve(N0,WV);ve(Ya,hp);ve(x8,T1);ve(G8,qV);ve(Yu,I1);ve(Ti,b1);ve(Zn,d1);ve(Ni,E1);ve(vi,Pu);ve(CE,v1);ve(af,M1);ve(U6,Z_);ve(zh,y1);ve(n0,R1);ve(x2,w1);var X;(function(t){const e=new of;
592for(const[o,a]of uC())e.set(o,a);const i=new PV(e,!0);e.set(Qi,i);function n(o){const a=e.get(o);if(!a)throw new Error("Missing service "+o);return a instanceof Mn?i.invokeFunction(l=>l.get(o)):a}t.get=n;let s=!1;function r(o){if(s)return i;s=!0;for(const[a,l]of uC())e.get(a)||e.set(a,l);for(const a in o)if(o.hasOwnProperty(a)){const l=ge(a);e.get(l)instanceof Mn&&e.set(l,o[a])}return i}t.initialize=r})(X||(X={}));var T0=function(t,e,i,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r},ke=function(t,e){return function(i,n){e(i,n,t)}},YV=0,zS=!1;function XV(t){if(!t){if(zS)return;zS=!0}MM(t||document.body)}var Bu=class extends pu{constructor(e,i,n,s,r,o,a,l,h,c,d,u){const g=Object.assign({},i);g.ariaLabel=g.ariaLabel||Lu.editorViewAccessibleLabel,g.ariaLabel=g.ariaLabel+";"+Lu.accessibilityHelpMessage,super(e,g,{},n,s,r,o,l,h,c,d,u),a instanceof Pu?this._standaloneKeybindingService=a:this._standaloneKeybindingService=null,XV(g.ariaContainerElement)}addCommand(e,i,n){if(!this._standaloneKeybindingService)return null;const s="DYNAMIC_"+ ++YV,r=Re.deserialize(n);return this._standaloneKeybindingService.addDynamicKeybinding(s,e,i,r),s}createContextKey(e,i){return this._contextKeyService.createKey(e,i)}addAction(e){if(typeof e.id!="string"||typeof e.label!="string"||typeof e.run!="function")throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");if(!this._standaloneKeybindingService)return V.None;const i=e.id,n=e.label,s=Re.and(Re.equals("editorId",this.getId()),Re.deserialize(e.precondition)),r=e.keybindings,o=Re.and(s,Re.deserialize(e.keybindingContext)),a=e.contextMenuGroupId||null,l=e.contextMenuOrder||0,h=(g,...m)=>Promise.resolve(e.run(this,...m)),c=new ne,d=this.getId()+":"+i;if(c.add(Tt.registerCommand(d,h)),a){const g={command:{id:d,title:n},when:s,group:a,order:l};c.add(Wl.appendMenuItem(N.EditorContext,g))}if(Array.isArray(r))for(const g of r)c.add(this._standaloneKeybindingService.addDynamicKeybinding(d,g,h,o));const u=new sx(d,n,n,s,h,this._contextKeyService);return this._actions[i]=u,c.add(Ae(()=>{delete this._actions[i]})),c}_triggerCommand(e,i){if(this._codeEditorService instanceof bu)try{this._codeEditorService.setActiveCodeEditor(this),super._triggerCommand(e,i)}finally{this._codeEditorService.setActiveCodeEditor(null)}else super._triggerCommand(e,i)}};Bu=T0([ke(2,Qi),ke(3,pt),ke(4,Ni),ke(5,Ie),ke(6,vi),ke(7,et),ke(8,wn),ke(9,Ti),ke(10,hr),ke(11,pe)],Bu);var A1=class extends Bu{constructor(e,i,n,s,r,o,a,l,h,c,d,u,g,m,_){const C=Object.assign({},i);Fu(c,C,!1);const w=l.registerEditorContainer(e);typeof C.theme=="string"&&l.setTheme(C.theme),typeof C.autoDetectHighContrast<"u"&&l.setAutoDetectHighContrast(!!C.autoDetectHighContrast);const v=C.model;delete C.model,super(e,C,n,s,r,o,a,l,h,d,m,_),this._configurationService=c,this._standaloneThemeService=l,this._register(w);let b;if(typeof v>"u"){const y=g.getLanguageIdByMimeType(C.language)||C.language||"plaintext";b=GE(u,g,C.value||"",y,void 0),this._ownsModel=!0}else b=v,this._ownsModel=!1;if(this._attachModel(b),b){const y={oldModelUrl:null,newModelUrl:b.uri};this._onDidChangeModel.fire(y)}}dispose(){super.dispose()}updateOptions(e){Fu(this._configurationService,e,!1),typeof e.theme=="string"&&this._standaloneThemeService.setTheme(e.theme),typeof e.autoDetectHighContrast<"u"&&this._standaloneThemeService.setAutoDetectHighContrast(!!e.autoDetectHighContrast),super.updateOptions(e)}_postDetachModelCleanup(e){super._postDetachModelCleanup(e),e&&this._ownsModel&&(e.dispose(),this._ownsModel=!1)}};A1=T0([ke(2,Qi),ke(3,pt),ke(4,Ni),ke(5,Ie),ke(6,vi),ke(7,Ji),ke(8,wn),ke(9,yt),ke(10,Ti),ke(11,Lt),ke(12,Nt),ke(13,hr),ke(14,pe)],A1);var O1=class extends or{constructor(e,i,n,s,r,o,a,l,h,c,d,u){const g=Object.assign({},i);Fu(h,g,!0);const m=a.registerEditorContainer(e);typeof g.theme=="string"&&a.setTheme(g.theme),typeof g.autoDetectHighContrast<"u"&&a.setAutoDetectHighContrast(!!g.autoDetectHighContrast),super(e,g,{},u,r,s,n,o,a,l,c,d),this._configurationService=h,this._standaloneThemeService=a,this._register(m)}dispose(){super.dispose()}updateOptions(e){Fu(this._configurationService,e,!0),typeof e.theme=="string"&&this._standaloneThemeService.setTheme(e.theme),typeof e.autoDetectHighContrast<"u"&&this._standaloneThemeService.setAutoDetectHighContrast(!!e.autoDetectHighContrast),super.updateOptions(e)}_createInnerEditor(e,i,n){return e.createInstance(Bu,i,n)}getOriginalEditor(){return super.getOriginalEditor()}getModifiedEditor(){return super.getModifiedEditor()}addCommand(e,i,n){return this.getModifiedEditor().addCommand(e,i,n)}createContextKey(e,i){return this.getModifiedEditor().createContextKey(e,i)}addAction(e){return this.getModifiedEditor().addAction(e)}};O1=T0([ke(2,Qi),ke(3,Ie),ke(4,Ya),ke(5,pt),ke(6,Ji),ke(7,wn),ke(8,yt),ke(9,n0),ke(10,s0),ke(11,zh)],O1);function GE(t,e,i,n,s){if(i=i||"",!n){const r=i.indexOf(`
593`);let o=i;return r!==-1&&(o=i.substring(0,r)),US(t,i,e.createByFilepathOrFirstLine(s||null,o),s)}return US(t,i,e.createById(n),s)}function US(t,e,i,n){return t.createModel(e,i,n)}
593function QV(t,e,i){return X.initialize(i||{}).createInstance(A1,t,e)}function JV(t){return X.get(pt).onCodeEditorAdd(e=>{t(e)})}function eW(t,e,i){return X.initialize(i||{}).createInstance(O1,t,e)}function tW(t,e){return new rT(t,e)}function iW(t,e,i){const n=X.get(Nt),s=n.getLanguageIdByMimeType(e)||e;return GE(X.get(Lt),n,t,s,i)}function nW(t,e){const i=X.get(Nt);X.get(Lt).setMode(t,i.createById(e))}function sW(t,e,i){t&&X.get(Xa).changeOne(e,t.uri,i)}function rW(t){return X.get(Xa).read(t)}function oW(t){return X.get(Xa).onMarkerChanged(t)}function aW(t){return X.get(Lt).getModel(t)}function lW(){return X.get(Lt).getModels()}function hW(t){return X.get(Lt).onModelAdded(t)}function cW(t){return X.get(Lt).onModelRemoved(t)}function dW(t){return X.get(Lt).onModelLanguageChanged(e=>{t({model:e.model,oldLanguage:e.oldLanguageId})})}function uW(t){return M5(X.get(Lt),X.get(hr),t)}function fW(t,e){const i=X.get(Nt),n=X.get(Ji);return n.registerEditorContainer(t),Iv.colorizeElement(n,i,t,e)}function gW(t,e,i){const n=X.get(Nt);return X.get(Ji).registerEditorContainer(document.body),Iv.colorize(n,t,e,i)}function mW(t,e,i=4){return X.get(Ji).registerEditorContainer(document.body),Iv.colorizeModelLine(t,e,i)}function pW(t){const e=Ge.get(t);return e||{getInitialState:()=>jd,tokenize:(i,n,s)=>AT(t,s)}}function _W(t,e){Ge.getOrCreate(e);const i=pW(e),n=Th(t),s=[];let r=i.getInitialState();for(let o=0,a=n.length;o<a;o++){const l=n[o],h=i.tokenize(l,!0,r);s[o]=h.tokens,r=h.endState}return s}function vW(t,e){X.get(Ji).defineTheme(t,e)}function CW(t){X.get(Ji).setTheme(t)}function bW(){qm.clearAllFontInfos()}function wW(t,e){return Tt.registerCommand({id:t,handler:e})}function SW(){return{create:QV,onDidCreateEditor:JV,createDiffEditor:eW,createDiffNavigator:tW,createModel:iW,setModelLanguage:nW,setModelMarkers:sW,getModelMarkers:rW,onDidChangeMarkers:oW,getModels:lW,getModel:aW,onDidCreateModel:hW,onWillDisposeModel:cW,onDidChangeModelLanguage:dW,createWebWorker:uW,colorizeElement:fW,colorize:gW,colorizeModelLine:mW,tokenize:_W,defineTheme:vW,setTheme:CW,remeasureFonts:bW,registerCommand:wW,AccessibilitySupport:rm,ContentWidgetPositionPreference:cm,CursorChangeReason:dm,DefaultEndOfLine:um,EditorAutoIndentStrategy:gm,EditorOption:mm,EndOfLinePreference:pm,EndOfLineSequence:_m,MinimapPosition:km,MouseTargetType:xm,OverlayWidgetPositionPreference:Im,OverviewRulerLane:Em,RenderLineNumbersType:Nm,RenderMinimap:Tm,ScrollbarVisibility:Rm,ScrollType:Mm,TextEditorCursorBlinkingStyle:Bm,TextEditorCursorStyle:Vm,TrackedRangeStickiness:Wm,WrappingIndent:Hm,InjectedTextCursorStops:Cm,PositionAffinity:Dm,ConfigurationChangedEvent:gy,BareFontInfo:gv,FontInfo:jm,TextModelResolvedOptions:Qc,FindMatch:rh,ApplyUpdateResult:Fl,EditorType:mv,EditorOptions:co}}function yW(t,e){if(!e||!Array.isArray(e))return!1;for(const i of e)if(!t(i))return!1;return!0}function Oc(t,e){return typeof t=="boolean"?t:e}function $S(t,e){return typeof t=="string"?t:e}function LW(t){const e={};for(const i of t)e[i]=!0;return e}function KS(t,e=!1){e&&(t=t.map(function(n){return n.toLowerCase()}));const i=LW(t);return e?function(n){return i[n.toLowerCase()]!==void 0&&i.hasOwnProperty(n.toLowerCase())}:function(n){return i[n]!==void 0&&i.hasOwnProperty(n)}}function P1(t,e){e=e.replace(/@@/g,"�");let i=0,n;do n=!1,e=e.replace(/@(\w+)/g,function(r,o){n=!0;let a="";if(typeof t[o]=="string")a=t[o];else if(t[o]&&t[o]instanceof RegExp)a=t[o].source;else throw t[o]===void 0?we(t,"language definition does not contain attribute '"+o+"', used at: "+e):we(t,"attribute reference '"+o+"' must be a string, used at: "+e);return Po(a)?"":"(?:"+a+")"}),i++;while(n&&i<5);e=e.replace(/\x01/g,"@");const s=(t.ignoreCase?"i":"")+(t.unicode?"u":"");return new RegExp(e,s)}function kW(t,e,i,n){if(n<0)return t;if(n<e.length)return e[n];if(n>=100){n=n-100;const s=i.split(".");if(s.unshift(i),n<s.length)return s[n]}return null}function xW(t,e,i,n){let s=-1,r=i,o=i.match(/^\$(([sS]?)(\d\d?)|#)(.*)$/);o&&(o[3]&&(s=parseInt(o[3]),o[2]&&(s=s+100)),r=o[4]);let a="~",l=r;!r||r.length===0?(a="!=",l=""):/^\w*$/.test(l)?a="==":(o=r.match(/^(@|!@|~|!~|==|!=)(.*)$/),o&&(a=o[1],l=o[2]));let h;if((a==="~"||a==="!~")&&/^(\w|\|)*$/.test(l)){const c=KS(l.split("|"),t.ignoreCase);h=function(d){return a==="~"?c(d):!c(d)}}else if(a==="@"||a==="!@"){const c=t[l];if(!c)throw we(t,"the @ match target '"+l+"' is not defined, in rule: "+e);if(!yW(function(u){return typeof u=="string"},c))throw we(t,"the @ match target '"+l+"' must be an array of str
593ings, in rule: "+e);const d=KS(c,t.ignoreCase);h=function(u){return a==="@"?d(u):!d(u)}}else if(a==="~"||a==="!~")if(l.indexOf("$")<0){const c=P1(t,"^"+l+"$");h=function(d){return a==="~"?c.test(d):!c.test(d)}}else h=function(c,d,u,g){return P1(t,"^"+Fs(t,l,d,u,g)+"$").test(c)};else if(l.indexOf("$")<0){const c=qs(t,l);h=function(d){return a==="=="?d===c:d!==c}}else{const c=qs(t,l);h=function(d,u,g,m,_){const C=Fs(t,c,u,g,m);return a==="=="?d===C:d!==C}}return s===-1?{name:i,value:n,test:function(c,d,u,g){return h(c,c,d,u,g)}}:{name:i,value:n,test:function(c,d,u,g){const m=kW(c,d,u,s);return h(m||"",c,d,u,g)}}}function F1(t,e,i){if(i){if(typeof i=="string")return i;if(i.token||i.token===""){if(typeof i.token!="string")throw we(t,"a 'token' attribute must be of type string, in rule: "+e);{const n={token:i.token};if(i.token.indexOf("$")>=0&&(n.tokenSubst=!0),typeof i.bracket=="string")if(i.bracket==="@open")n.bracket=1;else if(i.bracket==="@close")n.bracket=-1;else throw we(t,"a 'bracket' attribute must be either '@open' or '@close', in rule: "+e);if(i.next){if(typeof i.next!="string")throw we(t,"the next state must be a string value in rule: "+e);{let s=i.next;if(!/^(@pop|@push|@popall)$/.test(s)&&(s[0]==="@"&&(s=s.substr(1)),s.indexOf("$")<0&&!Q5(t,Fs(t,s,"",[],""))))throw we(t,"the next state '"+i.next+"' is not defined in rule: "+e);n.next=s}}return typeof i.goBack=="number"&&(n.goBack=i.goBack),typeof i.switchTo=="string"&&(n.switchTo=i.switchTo),typeof i.log=="string"&&(n.log=i.log),typeof i.nextEmbedded=="string"&&(n.nextEmbedded=i.nextEmbedded,t.usesEmbedded=!0),n}}else if(Array.isArray(i)){const n=[];for(let s=0,r=i.length;s<r;s++)n[s]=F1(t,e,i[s]);return{group:n}}else if(i.cases){const n=[];for(let r in i.cases)if(i.cases.hasOwnProperty(r)){const o=F1(t,e,i.cases[r]);r==="@default"||r==="@"||r===""?n.push({test:void 0,value:o,name:r}):r==="@eos"?n.push({test:function(a,l,h,c){return c},value:o,name:r}):n.push(xW(t,e,r,o))}const s=t.defaultToken;return{test:function(r,o,a,l){for(const h of n)if(!h.test||h.test(r,o,a,l))return h.value;return s}}}else throw we(t,"an action must be a string, an object with a 'token' or 'cases' attribute, or an array of actions; in rule: "+e)}else return{token:""}}var IW=class{constructor(t){this.regex=new RegExp(""),this.action={token:""},this.matchOnlyAtLineStart=!1,this.name="",this.name=t}setRegex(t,e){let i;if(typeof e=="string")i=e;else if(e instanceof RegExp)i=e.source;else throw we(t,"rules must start with a match string or regular expression: "+this.name);this.matchOnlyAtLineStart=i.length>0&&i[0]==="^",this.name=this.name+": "+i,this.regex=P1(t,"^(?:"+(this.matchOnlyAtLineStart?i.substr(1):i)+")")}setAction(t,e){this.action=F1(t,this.name,e)}};function ZE(t,e){if(!e||typeof e!="object")throw new Error("Monarch: expecting a language definition object");const i={};i.languageId=t,i.includeLF=Oc(e.includeLF,!1),i.noThrow=!1,i.maxStack=100,i.start=typeof e.start=="string"?e.start:null,i.ignoreCase=Oc(e.ignoreCase,!1),i.unicode=Oc(e.unicode,!1),i.tokenPostfix=$S(e.tokenPostfix,"."+i.languageId),i.defaultToken=$S(e.defaultToken,"source"),i.usesEmbedded=!1;const n=e;n.languageId=t,n.includeLF=i.includeLF,n.ignoreCase=i.ignoreCase,n.unicode=i.unicode,n.noThrow=i.noThrow,n.usesEmbedded=i.usesEmbedded,n.stateNames=e.tokenizer,n.defaultToken=i.defaultToken;function s(o,a,l){for(const h of l){let c=h.include;if(c){if(typeof c!="string")throw we(i,"an 'include' attribute must be a string at: "+o);if(c[0]==="@"&&(c=c.substr(1)),!e.tokenizer[c])throw we(i,"include target '"+c+"' is not defined at: "+o);s(o+"."+c,a,e.tokenizer[c])}else{const d=new IW(o);if(Array.isArray(h)&&h.length>=1&&h.length<=3)if(d.setRegex(n,h[0]),h.length>=3)if(typeof h[1]=="string")d.setAction(n,{token:h[1],next:h[2]});else if(typeof h[1]=="object"){const u=h[1];u.next=h[2],d.setAction(n,u)}else throw we(i,"a next state as the last element of a rule can only be given if the action is either an object or a string, at: "+o);else d.setAction(n,h[1]);else{if(!h.regex)throw we(i,"a rule must either be an array, or an object with a 'regex' or 'include' field at: "+o);h.name&&typeof h.name=="string"&&(d.name=h.name),h.matchOnlyAtStart&&(d.matchOnlyAtLineStart=Oc(h.matchOnlyAtLineStart,!1)),d.setRegex(n,h.regex),d.setAction(n,h.action)}a.push(d)}}}if(!e.tokenizer||typeof e.tokenizer!="object")throw we(i,"a language definition must define the 'tokenizer' attribute as an object");i.tokenizer=[];for(let o in e.tokenizer)if(e.tokenizer.hasOwnProperty(o)){i.start||(i.start=o);const a=e.tokenizer[o];i.tokenizer[o]=new Array,s("tokenizer."+o,i.tokenizer[o],a)}if(i.usesEmbedded=n.usesEmbedded,e.brackets){if(!Array.isArray(e.brackets))throw we(i,"the 'brackets' attribute must be defined as an array")}else e.brackets=[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}];const r=[];for(let o of e.brackets){let a=o;if(a&&Array.isArray(a)&&a.length===3&&(a={token:a[2],open:a[0],close:a[1]}),a.open===a.close)throw we(i,"open and close brackets in a 'brackets' attribute must be different: "+a.open+`
594 hint: use the 'bracket' attribute if matching on equal brackets is required.`);if(typeof a.open=="string"&&typeof a.token=="string"&&typeof a.close=="string")r.push({token:a.token+i.tokenPostfix,open:qs(i,a.open),close:qs(i,a.close)});else throw we(i,"every element in the 'brackets' array must be a '{open,close,token}' object or array")}return i.brackets=r,i.noThrow=!0,i}
594var EW=function(t,e,i,n){function s(r){return r instanceof i?r:new i(function(o){o(r)})}return new(i||(i=Promise))(function(r,o){function a(c){try{h(n.next(c))}catch(d){o(d)}}function l(c){try{h(n.throw(c))}catch(d){o(d)}}function h(c){c.done?r(c.value):s(c.value).then(a,l)}h((n=n.apply(t,e||[])).next())})};function DW(t){Na.registerLanguage(t)}function NW(){let t=[];return t=t.concat(Na.getLanguages()),t}function TW(t){return X.get(Nt).languageIdCodec.encodeLanguageId(t)}function MW(t,e){const i=X.get(Nt).onDidEncounterLanguage(n=>{n===t&&(i.dispose(),e())});return i}function RW(t,e){if(!X.get(Nt).isRegisteredLanguageId(t))throw new Error(`Cannot set configuration for unknown language ${t}`);return Wi.register(t,e,100)}var AW=class{constructor(t,e){this._languageId=t,this._actual=e}getInitialState(){return this._actual.getInitialState()}tokenize(t,e,i){if(typeof this._actual.tokenize=="function")return YE.adaptTokenize(this._languageId,this._actual,t,i);throw new Error("Not supported!")}tokenizeEncoded(t,e,i){const n=this._actual.tokenizeEncoded(t,i);return new Uu(n.tokens,n.endState)}},YE=class B1{constructor(e,i,n,s){this._languageId=e,this._actual=i,this._languageService=n,this._standaloneThemeService=s}getInitialState(){return this._actual.getInitialState()}static _toClassicTokens(e,i){const n=[];let s=0;for(let r=0,o=e.length;r<o;r++){const a=e[r];let l=a.startIndex;r===0?l=0:l<s&&(l=s),n[r]=new nh(l,a.scopes,i),s=l}return n}static adaptTokenize(e,i,n,s){const r=i.tokenize(n,s),o=B1._toClassicTokens(r.tokens,e);let a;return r.endState.equals(s)?a=s:a=r.endState,new iv(o,a)}tokenize(e,i,n){return B1.adaptTokenize(this._languageId,this._actual,e,n)}_toBinaryTokens(e,i){const n=e.encodeLanguageId(this._languageId),s=this._standaloneThemeService.getColorTheme().tokenTheme,r=[];let o=0,a=0;for(let h=0,c=i.length;h<c;h++){const d=i[h],u=s.match(n,d.scopes);if(o>0&&r[o-1]===u)continue;let g=d.startIndex;h===0?g=0:g<a&&(g=a),r[o++]=g,r[o++]=u,a=g}const l=new Uint32Array(o);for(let h=0;h<o;h++)l[h]=r[h];return l}tokenizeEncoded(e,i,n){const s=this._actual.tokenize(e,n),r=this._toBinaryTokens(this._languageService.languageIdCodec,s.tokens);let o;return s.endState.equals(n)?o=n:o=s.endState,new Uu(r,o)}};function OW(t){return typeof t.getInitialState=="function"}function PW(t){return"tokenizeEncoded"in t}function XE(t){return t&&typeof t.then=="function"}function FW(t){const e=X.get(Ji);if(t){const i=[null];for(let n=1,s=t.length;n<s;n++)i[n]=O.fromHex(t[n]);e.setColorMapOverride(i)}else e.setColorMapOverride(null)}function QE(t,e){return PW(e)?new AW(t,e):new YE(t,e,X.get(Nt),X.get(Ji))}function M0(t,e){return Ge.registerFactory(t,{createTokenizationSupport:()=>EW(this,void 0,void 0,function*(){const i=yield Promise.resolve(e.create());return i?OW(i)?QE(t,i):new xv(X.get(Nt),X.get(Ji),t,ZE(t,i)):null})})}function BW(t,e){if(!X.get(Nt).isRegisteredLanguageId(t))throw new Error(`Cannot set tokens provider for unknown language ${t}`);return XE(e)?M0(t,{create:()=>e}):Ge.register(t,QE(t,e))}function VW(t,e){const i=n=>new xv(X.get(Nt),X.get(Ji),t,ZE(t,n));return XE(e)?M0(t,{create:()=>e}):Ge.register(t,i(e))}function WW(t,e){return X.get(pe).referenceProvider.register(t,e)}function HW(t,e){return X.get(pe).renameProvider.register(t,e)}function zW(t,e){return X.get(pe).signatureHelpProvider.register(t,e)}function UW(t,e){return X.get(pe).hoverProvider.register(t,{provideHover:(i,n,s)=>{const r=i.getWordAtPosition(n);return Promise.resolve(e.provideHover(i,n,s)).then(o=>{if(o)return!o.range&&r&&(o.range=new T(n.lineNumber,r.startColumn,n.lineNumber,r.endColumn)),o.range||(o.range=new T(n.lineNumber,n.column,n.lineNumber,n.column)),o})}})}function $W(t,e){return X.get(pe).documentSymbolProvider.register(t,e)}function KW(t,e){return X.get(pe).documentHighlightProvider.register(t,e)}function jW(t,e){return X.get(pe).linkedEditingRangeProvider.register(t,e)}function qW(t,e){return X.get(pe).definitionProvider.register(t,e)}function GW(t,e){return X.get(pe).implementationProvider.register(t,e)}function ZW(t,e){return X.get(pe).typeDefinitionProvider.register(t,e)}function YW(t,e){return X.get(pe).codeLensProvider.register(t,e)}function XW(t,e,i){return X.get(pe).codeActionProvider.register(t,{providedCodeActionKinds:i?.providedCodeActionKinds,provideCodeActions:(n,s,r,o)=>{const a=X.get(Xa).read({resource:n.uri}).filter(l=>T.areIntersectingOrTouching(l,s));return e.provideCodeActions(n,s,{markers:a,only:r.only},o)}
594,resolveCodeAction:e.resolveCodeAction})}function QW(t,e){return X.get(pe).documentFormattingEditProvider.register(t,e)}function JW(t,e){return X.get(pe).documentRangeFormattingEditProvider.register(t,e)}function eH(t,e){return X.get(pe).onTypeFormattingEditProvider.register(t,e)}function tH(t,e){return X.get(pe).linkProvider.register(t,e)}function iH(t,e){return X.get(pe).completionProvider.register(t,e)}function nH(t,e){return X.get(pe).colorProvider.register(t,e)}function sH(t,e){return X.get(pe).foldingRangeProvider.register(t,e)}function rH(t,e){return X.get(pe).declarationProvider.register(t,e)}function oH(t,e){return X.get(pe).selectionRangeProvider.register(t,e)}function aH(t,e){return X.get(pe).documentSemanticTokensProvider.register(t,e)}function lH(t,e){return X.get(pe).documentRangeSemanticTokensProvider.register(t,e)}function hH(t,e){return X.get(pe).inlineCompletionsProvider.register(t,e)}function cH(t,e){return X.get(pe).inlayHintsProvider.register(t,e)}function dH(){return{register:DW,getLanguages:NW,onLanguage:MW,getEncodedLanguageId:TW,setLanguageConfiguration:RW,setColorMap:FW,registerTokensProviderFactory:M0,setTokensProvider:BW,setMonarchTokensProvider:VW,registerReferenceProvider:WW,registerRenameProvider:HW,registerCompletionItemProvider:iH,registerSignatureHelpProvider:zW,registerHoverProvider:UW,registerDocumentSymbolProvider:$W,registerDocumentHighlightProvider:KW,registerLinkedEditingRangeProvider:jW,registerDefinitionProvider:qW,registerImplementationProvider:GW,registerTypeDefinitionProvider:ZW,registerCodeLensProvider:YW,registerCodeActionProvider:XW,registerDocumentFormattingEditProvider:QW,registerDocumentRangeFormattingEditProvider:JW,registerOnTypeFormattingEditProvider:eH,registerLinkProvider:tH,registerColorProvider:nH,registerFoldingRangeProvider:sH,registerDeclarationProvider:rH,registerSelectionRangeProvider:oH,registerDocumentSemanticTokensProvider:aH,registerDocumentRangeSemanticTokensProvider:lH,registerInlineCompletionsProvider:hH,registerInlayHintsProvider:cH,DocumentHighlightKind:fm,CompletionItemKind:am,CompletionItemTag:lm,CompletionItemInsertTextRule:om,SymbolKind:Pm,SymbolTag:Fm,IndentAction:vm,CompletionTriggerKind:hm,SignatureHelpTriggerKind:Om,InlayHintKind:bm,InlineCompletionTriggerKind:wm,FoldingRangeKind:Jr}}var JE=ge("IEditorCancelService"),eD=new Y("cancellableOperation",!1,p("cancellableOperation","Whether the editor runs a cancellable operation, e.g. like 'Peek References'"));ve(JE,class{constructor(){this._tokens=new WeakMap}add(t,e){let i=this._tokens.get(t);i||(i=t.invokeWithinContext(s=>({key:eD.bindTo(s.get(Ie)),tokens:new Ki})),this._tokens.set(t,i));let n;return i.key.set(!0),n=i.tokens.push(e),()=>{n&&(n(),i.key.set(!i.tokens.isEmpty()),n=void 0)}}cancel(t){const e=this._tokens.get(t);if(!e)return;const i=e.tokens.pop();i&&(i.cancel(),e.key.set(!e.tokens.isEmpty()))}},!0);q(new class extends Ph{constructor(){super({id:"editor.cancelOperation",kbOpts:{weight:100,primary:9},precondition:eD})}runEditorCommand(t,e){t.get(JE).cancel(e)}});var Kg=class{constructor(t){this.value=t,this._lower=t.toLowerCase()}static toKey(t){return typeof t=="string"?t.toLowerCase():t._lower}},Qa=function(t,e,i,n){function s(r){return r instanceof i?r:new i(function(o){o(r)})}return new(i||(i=Promise))(function(r,o){function a(c){try{h(n.next(c))}catch(d){o(d)}}function l(c){try{h(n.throw(c))}catch(d){o(d)}}function h(c){c.done?r(c.value):s(c.value).then(a,l)}h((n=n.apply(t,e||[])).next())})};function uH(t,e,i){const n=[],s=new Set,r=t.ordered(i);for(const a of r)n.push(a),a.extensionId&&s.add(Kg.toKey(a.extensionId));const o=e.ordered(i);for(const a of o){if(a.extensionId){if(s.has(Kg.toKey(a.extensionId)))continue;s.add(Kg.toKey(a.extensionId))}n.push({displayName:a.displayName,extensionId:a.extensionId,provideDocumentFormattingEdits(l,h,c){return a.provideDocumentRangeFormattingEdits(l,l.getFullModelRange(),h,c)}})}return n}var tD=class V1{static setFormatterSelector(e){return{dispose:V1._selectors.unshift(e)}}static select(e,i,n){return Qa(this,void 0,void 0,function*(){if(e.length===0)return;const s=he.first(V1._selectors);if(s)return yield s(e,i,n)})}};tD._selectors=new Ki;
594function fH(t,e,i,n,s,r){return Qa(this,void 0,void 0,function*(){const o=e.documentRangeFormattingEditProvider.ordered(i);for(const a of o){let l=yield Promise.resolve(a.provideDocumentRangeFormattingEdits(i,n,s,r)).catch(zu);if(Z1(l))return yield t.computeMoreMinimalEdits(i.uri,l)}})}function gH(t,e,i,n,s){return Qa(this,void 0,void 0,function*(){const r=uH(e.documentFormattingEditProvider,e.documentRangeFormattingEditProvider,i);for(const o of r){let a=yield Promise.resolve(o.provideDocumentFormattingEdits(i,n,s)).catch(zu);if(Z1(a))return yield t.computeMoreMinimalEdits(i.uri,a)}})}function mH(t,e,i,n,s,r,o){const a=e.onTypeFormattingEditProvider.ordered(i);return a.length===0||a[0].autoFormatTriggerCharacters.indexOf(s)<0?Promise.resolve(void 0):Promise.resolve(a[0].provideOnTypeFormattingEdits(i,n,s,r,o)).catch(zu).then(l=>t.computeMoreMinimalEdits(i.uri,l))}Tt.registerCommand("_executeFormatRangeProvider",function(t,...e){return Qa(this,void 0,void 0,function*(){const[i,n,s]=e;mn(Le.isUri(i)),mn(T.isIRange(n));const r=t.get(Yu),o=t.get(Ya),a=t.get(pe),l=yield r.createModelReference(i);try{return fH(o,a,l.object.textEditorModel,T.lift(n),s,ti.None)}finally{l.dispose()}})});Tt.registerCommand("_executeFormatDocumentProvider",function(t,...e){return Qa(this,void 0,void 0,function*(){const[i,n]=e;mn(Le.isUri(i));const s=t.get(Yu),r=t.get(Ya),o=t.get(pe),a=yield s.createModelReference(i);try{return gH(r,o,a.object.textEditorModel,n,ti.None)}finally{a.dispose()}})});Tt.registerCommand("_executeFormatOnTypeProvider",function(t,...e){return Qa(this,void 0,void 0,function*(){const[i,n,s,r]=e;mn(Le.isUri(i)),mn(A.isIPosition(n)),mn(typeof s=="string");const o=t.get(Yu),a=t.get(Ya),l=t.get(pe),h=yield o.createModelReference(i);try{return mH(a,l,h.object.textEditorModel,A.lift(n),s,r,ti.None)}finally{h.dispose()}})});var pH=ny({CancellationTokenSource:()=>_H,Emitter:()=>vH,KeyCode:()=>CH,KeyMod:()=>bH,MarkerSeverity:()=>kH,MarkerTag:()=>xH,Position:()=>wH,Range:()=>SH,Selection:()=>yH,SelectionDirection:()=>LH,Token:()=>EH,Uri:()=>IH,editor:()=>iD,languages:()=>DH}),jg;co.wrappingIndent.defaultValue=0;co.glyphMargin.defaultValue=!1;co.autoIndent.defaultValue=3;co.overviewRulerLanes.defaultValue=2;tD.setFormatterSelector((t,e,i)=>
594Promise.resolve(t[0]));var Vt=Py();Vt.editor=SW();Vt.languages=dH();var _H=Vt.CancellationTokenSource,vH=Vt.Emitter,CH=Vt.KeyCode,bH=Vt.KeyMod,wH=Vt.Position,SH=Vt.Range,yH=Vt.Selection,LH=Vt.SelectionDirection,kH=Vt.MarkerSeverity,xH=Vt.MarkerTag,IH=Vt.Uri,EH=Vt.Token,iD=Vt.editor,DH=Vt.languages;(!((jg=Ve.MonacoEnvironment)===null||jg===void 0)&&jg.globalAPI||typeof define=="function"&&define.amd)&&(self.monaco=Vt);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"]});var NH=Object.defineProperty,TH=Object.getOwnPropertyDescriptor,MH=Object.getOwnPropertyNames,RH=Object.prototype.hasOwnProperty,AH=(t,e,i,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of MH(e))!RH.call(t,s)&&(i||s!=="default")&&NH(t,s,{get:()=>e[s],enumerable:!(n=TH(e,s))||n.enumerable});return t},Pl={};AH(Pl,pH);var nD={},qg={},sD=class{static getOrCreate(t){return qg[t]||(qg[t]=new sD(t)),qg[t]}constructor(t){Ja(this,"_languageId",void 0),Ja(this,"_loadingTriggered",void 0),Ja(this,"_lazyLoadPromise",void 0),Ja(this,"_lazyLoadPromiseResolve",void 0),Ja(this,"_lazyLoadPromiseReject",void 0),this._languageId=t,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((e,i)=>{this._lazyLoadPromiseResolve=e,this._lazyLoadPromiseReject=i})}load(){return this._loadingTriggered||(this._loadingTriggered=!0,nD[this._languageId].loader().then(t=>this._lazyLoadPromiseResolve(t),t=>this._lazyLoadPromiseReject(t))),this._lazyLoadPromise}};function jh(t){const e=t.id;nD[e]=t,Pl.languages.register(t);const i=sD.getOrCreate(e);Pl.languages.registerTokensProviderFactory(e,{create:async()=>(await i.load()).language}),Pl.languages.onLanguage(e,async()=>{const n=await i.load();Pl.languages.setLanguageConfiguration(e,n.conf)})}jh({id:"javascript",extensions:[".js",".es6",".jsx",".mjs",".cjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:()=>yh(()=>import("./javascript-C5tul0Su.js"),[])});jh({id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],mimetypes:["application/x-php"],loader:()=>yh(()=>import("./php-DAYG5k_E.js"),[])});jh({id:"mysql",extensions:[],aliases:["MySQL","mysql"],loader:()=>yh(()=>import("./mysql-CQYXESU5.js"),[])});jh({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:()=>yh(()=>import("./html-B_ZjHL_x.js"),[])});jh({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:()=>yh(()=>import("./css-BNMHCmEw.js"),[])});var bo=class sn{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.deltaDecorations(this._allDecorations(),[]),this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}reset(){this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}getCount(){return this._decorations.length}getFindScope(){return this._findScopeDecorationIds[0]?this._editor.getModel().getDecorationRange(this._findScopeDecorationIds[0]):null}getFindScopes(){if(this._findScopeDecorationIds.length){const e=this._findScopeDecorationIds.map(i=>this._editor.getModel().getDecorationRange(i)).filter(i=>!!i);if(e.length)return e}return null}getStartPosition(){return this._startPosition}setStartPosition(e){this._startPosition=e,this.setCurrentFindMatch(null)}_getDecorationIndex(e){const i=this._decorations.indexOf(e);return i>=0?i+1:1}getCurrentMatchesPosition(e){let i=this._editor.getModel().getDecorationsInRange(e);for(const n of i){const s=n.options;if(s===sn._FIND_MATCH_DECORATION||s===sn._CURRENT_FIND_MATCH_DECORATION)return this._getDecorationIndex(n.id)}return 0}setCurrentFindMatch(e){let i=null,n=0;if(e)for(let s=0,r=this._decorations.length;s<r;s++){let o=this._editor.getModel().getDecorationRange(this._decorations[s]);if(e.equalsRange(o)){i=this._decorations[s],n=s+1;break}}return(this._highlightedDecorationId!==null||i!==null)&&this._editor.changeDecorations(s=>{if(this._highlightedDecorationId!==null&&(s.changeDecorationOptions(this._highlightedDecorationId,sn._FIND_MATCH_DECORATION),this._highlightedDecorationId=null),i!==null&&(this._highlightedDecorationId=i,s.changeDecorationOptions(this._highlightedDecorationId,sn._CURRENT_FIND_MATCH_DECORATION)),this._rangeHighlightDecorationId!==null&&(s.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),i!==null){let r=this._editor.getModel().getDecorationRange(i);if(r.startLineNumber!==r.endLineNumber&&r.endColumn===1){let o=r.endLineNumber-1,a=this._editor.getModel().getLineMaxColumn(o);r=new T(r.startLineNumber,r.startColumn,o,a)}this._rangeHighlightDecorationId=s.addDecoration(r,sn._RANGE_HIGHLIGHT_DECORATION)}}),n}set(e,i){this._editor.changeDecorations(n=>{let s=sn._FIND_MATCH_DECORATION,r=[];if(e.length>1e3){s=sn._FIND_MATCH_NO_OVERVIEW_DECORATION;const a=this._editor.getModel().getLineCount(),l=this._editor.getLayoutInfo().height/a,h=Math.max(2,Math.ceil(3/l));let c=e[0].range.startLineNumber,d=e[0].range.endLineNumber;for(let u=1,g=e.length;u<g;u++){const m=e[u].range;d+h>=m.startLineNumber?m.endLineNumber>d&&(d=m.endLineNumber):(r.push({range:new T(c,1,d,1),options:sn._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),c=m.startLineNumber,d=m.endLineNumber)}r.push({range:new T(c,1,d,1),options:sn._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}let o=new Array(e.length);for(let a=0,l=e.length;a<l;a++)o[a]={range:e[a].range,options:s};this._decorations=n.deltaDecorations(this._decorations,o),this._overviewRulerApproximateDecorations=n.deltaDecorations(this._overviewRulerApproximateDecorations,r),this._rangeHighlightDecorationId&&(n.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),this._findScopeDecorationIds.length&&(this._findScopeDecorationIds.forEach(a=>n.removeDecoration(a)),this._findScopeDecorationIds=[]),i?.length&&(this._findScopeDecorationIds=i.map(a=>n.addDecoration(a,sn._FIND_SCOPE_DECORATION)))})}matchBeforePosition(e){if(this._decorations.length===0)return null;for(let i=this._decorations.length-1;i>=0;i--){let n=this._decorations[i],s=this._editor.getModel().getDecorationRange(n);if(!(!s||s.endLineNumber>e.lineNumber)){if(s.endLineNumber<e.lineNumber)return s;if(!(s.endColumn>e.column))return s}}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])}matchAfterPosition(e){if(this._decorations.length===0)return null;for(let i=0,n=this._decorations.length;i<n;i++){let s=this._decorations[i],r=this._editor.getModel().getDecorationRange(s);if(!(!r||r.startLineNumber<e.lineNumber)){if(r.startLineNumber>e.lineNumber)return r;if(!(r.startColumn<e.column))return r}}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}};bo._CURRENT_FIND_MATCH_DECORATION=Je.register({description:"current-find-match",stickiness:1,zIndex:13,className:"currentFindMatch",showIfCollapsed:!0,overviewRuler:{color:cn(Vv),position:eo.Center},minimap:{color:cn(Kl),position:ms.Inline}});bo._FIND_MATCH_DECORATION=Je.register({description:"find-match",stickiness:1,zIndex:10,className:"findMatch",showIfCollapsed:!0,overviewRuler:{color:cn(Vv),position:eo.Center},minimap:{color:cn(Kl),position:ms.Inline}});bo._FIND_MATCH_NO_OVERVIEW_DECORATION=Je.register({description:"find-match-no-overview",stickiness:1,className:"findMatch",showIfCollapsed:!0});bo._FIND_MATCH_ONLY_OVERVIEW_DECORATION=Je.register({description:"find-match-only-overview",stickiness:1,overviewRuler:{color:cn(Vv),position:eo.Center}});bo._RANGE_HIGHLIGHT_DECORATION=Je.register({description:"find-range-highlight",stickiness:1,className:"rangeHighlight",isWholeLine:!0});bo._FIND_SCOPE_DECORATION=Je.register({description:"find-scope",className:"findScope",isWholeLine:!0});var OH=class{constructor(t,e,i){this._editorSelection=t,this._ranges=e,this._replaceStrings=i,this._trackedEditorSelectionId=null}getEditOperations(t,e){if(this._ranges.length>0){let i=[];for(let r=0;r<this._ranges.length;r++)i.push({range:this._ranges[r],text:this._replaceStrings[r]});i.sort((r,o)=>T.compareRangesUsingStarts(r.range,o.range));let n=[],s=i[0];for(let r=1;r<i.length;r++)s.range.endLineNumber===i[r].range.startLineNumber&&s.range.endColumn===i[r].range.startColumn?(s.range=s.range.plusRange(i[r].range),s.text=s.text+i[r].text):(n.push(s),s=i[r]);n.push(s);for(const r of n)e.addEditOperation(r.range,r.text)}this._trackedEditorSelectionId=e.trackSelection(this._editorSelection)}computeCursorState(t,e){return e.getTrackedSelection(this._trackedEditorSelectionId)}};function rD(t,e){if(t&&t[0]!==""){const i=jS(t,e,"-"),n=jS(t,e,"_");return i&&!n?qS(t,e,"-"):!i&&n?qS(t,e,"_"):t[0].toUpperCase()===t[0]?e.toUpperCase():t[0].toLowerCase()===t[0]?e.toLowerCase():z4(t[0][0])&&e.length>0?e[0].toUpperCase()+e.substr(1):t[0][0].toUpperCase()!==t[0][0]&&e.length>0?e[0].toLowerCase()+e.substr(1):e}else return e}function jS(t,e,i){return t[0].indexOf(i)!==-1&&e.indexOf(i)!==-1&&t[0].split(i).length===e.split(i).length}function qS(t,e,i){const n=e.split(i),s=t[0].split(i);let r="";
vendor: 9,511 bytes, lines 594-595
594return n.forEach((o,a)=>{r+=rD([s[a]],o)+i}),r.slice(0,-1)}var GS=class{constructor(t){this.staticValue=t,this.kind=0}},PH=class{constructor(t){this.pieces=t,this.kind=1}},R0=class W1{constructor(e){!e||e.length===0?this._state=new GS(""):e.length===1&&e[0].staticValue!==null?this._state=new GS(e[0].staticValue):this._state=new PH(e)}static fromStaticValue(e){return new W1([Nd.staticValue(e)])}get hasReplacementPatterns(){return this._state.kind===1}buildReplaceString(e,i){if(this._state.kind===0)return i?rD(e,this._state.staticValue):this._state.staticValue;let n="";for(let s=0,r=this._state.pieces.length;s<r;s++){let o=this._state.pieces[s];if(o.staticValue!==null){n+=o.staticValue;continue}let a=W1._substitute(o.matchIndex,e);if(o.caseOps!==null&&o.caseOps.length>0){let l=[],h=o.caseOps.length,c=0;for(let d=0,u=a.length;d<u;d++){if(c>=h){l.push(a.slice(d));break}switch(o.caseOps[c]){case"U":l.push(a[d].toUpperCase());break;case"u":l.push(a[d].toUpperCase()),c++;break;case"L":l.push(a[d].toLowerCase());break;case"l":l.push(a[d].toLowerCase()),c++;break;default:l.push(a[d])}}a=l.join("")}n+=a}return n}static _substitute(e,i){if(i===null)return"";if(e===0)return i[0];let n="";for(;e>0;){if(e<i.length)return(i[e]||"")+n;n=String(e%10)+n,e=Math.floor(e/10)}return"$"+n}},Nd=class H1{constructor(e,i,n){this.staticValue=e,this.matchIndex=i,!n||n.length===0?this.caseOps=null:this.caseOps=n.slice(0)}static staticValue(e){return new H1(e,-1,null)}static caseOps(e,i){return new H1(null,e,i)}},FH=class{constructor(t){this._source=t,this._lastCharIndex=0,this._result=[],this._resultLen=0,this._currentStaticPiece=""}emitUnchanged(t){this._emitStatic(this._source.substring(this._lastCharIndex,t)),this._lastCharIndex=t}emitStatic(t,e){this._emitStatic(t),this._lastCharIndex=e}_emitStatic(t){t.length!==0&&(this._currentStaticPiece+=t)}emitMatchIndex(t,e,i){this._currentStaticPiece.length!==0&&(this._result[this._resultLen++]=Nd.staticValue(this._currentStaticPiece),this._currentStaticPiece=""),this._result[this._resultLen++]=Nd.caseOps(t,i),this._lastCharIndex=e}finalize(){return this.emitUnchanged(this._source.length),this._currentStaticPiece.length!==0&&(this._result[this._resultLen++]=Nd.staticValue(this._currentStaticPiece),this._currentStaticPiece=""),new R0(this._result)}};function BH(t){if(!t||t.length===0)return new R0(null);let e=[],i=new FH(t);for(let n=0,s=t.length;n<s;n++){let r=t.charCodeAt(n);if(r===92){if(n++,n>=s)break;let o=t.charCodeAt(n);switch(o){case 92:i.emitUnchanged(n-1),i.emitStatic("\\",n+1);break;case 110:i.emitUnchanged(n-1),i.emitStatic(`
595`,n+1);break;case 116:i.emitUnchanged(n-1),i.emitStatic("	",n+1);break;case 117:case 85:case 108:case 76:i.emitUnchanged(n-1),i.emitStatic("",n+1),e.push(String.fromCharCode(o))}continue}if(r===36){if(n++,n>=s)break;let o=t.charCodeAt(n);if(o===36){i.emitUnchanged(n-1),i.emitStatic("$",n+1);continue}if(o===48||o===38){i.emitUnchanged(n-1),i.emitMatchIndex(0,n+1,e),e.length=0;continue}if(49<=o&&o<=57){let a=o-48;if(n+1<s){let l=t.charCodeAt(n+1);if(48<=l&&l<=57){n++,a=a*10+(l-48),i.emitUnchanged(n-2),i.emitMatchIndex(a,n+1,e),e.length=0;continue}}i.emitUnchanged(n-1),i.emitMatchIndex(a,n+1,e),e.length=0;continue}}}return i.finalize()}var gr=new Y("findWidgetVisible",!1),BK=gr.toNegated(),_f=new Y("findInputFocussed",!1),A0=new Y("replaceInputFocussed",!1),Pc={primary:545,mac:{primary:2593}},Fc={primary:565,mac:{primary:2613}},Bc={primary:560,mac:{primary:2608}},Vc={primary:554,mac:{primary:2602}},Wc={primary:558,mac:{primary:2606}},Se={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"},oD=19999,VH=240,WH=class Td{constructor(e,i){this._toDispose=new ne,this._editor=e,this._state=i,this._isDisposed=!1,this._startSearchingTimer=new jn,this._decorations=new bo(e),this._toDispose.add(this._decorations),this._updateDecorationsScheduler=new _t(()=>this.research(!1),100),this._toDispose.add(this._updateDecorationsScheduler),this._toDispose.add(this._editor.onDidChangeCursorPosition(n=>{(n.reason===3||n.reason===5||n.reason===6)&&this._decorations.setStartPosition(this._editor.getPosition())})),this._ignoreModelContentChanged=!1,this._toDispose.add(this._editor.onDidChangeModelContent(n=>{this._ignoreModelContentChanged||(n.isFlush&&this._decorations.reset(),this._decorations.setStartPosition(this._editor.getPosition()),this._updateDecorationsScheduler.schedule())})),this._toDispose.add(this._state.onFindReplaceStateChange(n=>this._onStateChanged(n))),this.research(!1,this._state.searchScope)}dispose(){this._isDisposed=!0,De(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)},VH)):e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor))}static _getSearchRange(e,i){return i||e.getFullModelRange()}research(e,i){let n=null;typeof i<"u"?i!==null&&(Array.isArray(i)?n=i:n=[i]):n=this._decorations.getFindScopes(),n!==null&&(n=n.map(a=>{if(a.startLineNumber!==a.endLineNumber){let l=a.endLineNumber;return a.endColumn===1&&(l=l-1),new T(a.startLineNumber,1,l,this._editor.getModel().getLineMaxColumn(l))}return a}));let s=this._findMatches(n,!1,oD);this._decorations.set(s,n);const r=this._editor.getSelection();let o=this._decorations.getCurrentMatchesPosition(r);if(o===0&&s.length>0){const a=GD(s.map(l=>l.range),l=>T.compareRangesUsingStarts(l,r)>=0);o=a>0?a-1+1:o}this._state.changeMatchInfo(o,this._decorations.getCount(),void 0),e&&this._editor.getOption(35).cursorMoveOnType&&this._moveToNextMatch(this._decorations.getStartPosition())}_hasMatches(){return this._state.matchesCount>0}_cannotFind(){if(!this._hasMatches()){let e=this._decorations.getFindScope();return e&&this._editor.revealRangeInCenterIfOutsideViewport(e,0),!0}return!1}_setCurrentFindMatch(e){let i=this._decorations.setCurrentFindMatch(e);this._state.changeMatchInfo(i,this._decorations.getCount(),e),this._editor.setSelection(e),this._editor.revealRangeInCenterIfOutsideViewport(e,0)}_prevSearchPosition(e){let i=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0),{lineNumber:n,column:s}=e,r=this._editor.getModel();return i||s===1?(n===1?n=r.getLineCount():n--,s=r.getLineMaxColumn(n)):s--,new A(n,s)}_moveToPrevMatch(e,i=!1){if(!this._state.canNavigateBack()){const c=this._decorations.matchAfterPosition(e);c&&this._setCurrentFindMatch(c);return}if(this._decorations.getCount()<19999){let c=this._decorations.matchBeforePosition(e);c&&c.isEmpty()&&c.getStartPosition().equals(e)&&(e=this._prevSearchPosition(e),c=this._decorations.matchBeforePosition(e)),c&&this._setCurrentFindMatch(c);return}if(this._cannotFind())return;let n=this._decorations.getFindScope(),s=Td._getSearchRange(this._editor.getModel(),n);s.getEndPosition().isBefore(e)&&(e=s.getEndPosition()),e.isBefore(s.getStartPosition())&&(e=s.getEndPosition());let{lineNumber:r,column:o}=e,a=this._editor.getModel(),l=new A(r,o),h=a.findPreviousMatch(this._state.searchString,l,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(117):null,!1);if(h&&h.range.isEmpty()&&h.range.getStartPosition().equals(l)&&(l=this._prevSearchPosition(l),h=a.findPreviousMatch(this._state.searchString,l,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(117):null,!1)),!!h){if(!i&&!s.containsRange(h.range))return this._moveToPrevMatch(h.range.getStartPosition(),!0);this._setCurrentFindMatch(h.range)}}moveToPrevMatch(){this._moveToPrevMatch(this._editor.getSelection().getStartPosition())}_nextSearchPosition(e){let i=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0),{lineNumber:n,column:s}=e,r=this._editor.getModel();return i||s===r.getLineMaxColumn(n)?(n===r.getLineCount()?n=1:n++,s=1):s++,new A(n,s)}_moveToNextMatch(e){if(!this._state.canNavigateForward()){const n=this._decorations.matchBeforePosition(e);n&&this._setCurrentFindMatch(n);return}if(this._decorations.getCount()<19999){let n=this._decorations.matchAfterPosition(e);n&&n.isEmpty()&&n.getStartPosition().equals(e)&&(e=this._nextSearchPosition(e),n=this._decorations.matchAfterPosition(e)),n&&this._setCurrentFindMatch(n);return}let i=this._getNextMatch(e,!1,!0);i&&this._setCurrentFindMatch(i.range)}_getNextMatch(e,i,n,s=!1){if(this._cannotFind())return null;
595let r=this._decorations.getFindScope(),o=Td._getSearchRange(this._editor.getModel(),r);o.getEndPosition().isBefore(e)&&(e=o.getStartPosition()),e.isBefore(o.getStartPosition())&&(e=o.getStartPosition());let{lineNumber:a,column:l}=e,h=this._editor.getModel(),c=new A(a,l),d=h.findNextMatch(this._state.searchString,c,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(117):null,i);return n&&d&&d.range.isEmpty()&&d.range.getStartPosition().equals(c)&&(c=this._nextSearchPosition(c),d=h.findNextMatch(this._state.searchString,c,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(117):null,i)),d?!s&&!o.containsRange(d.range)?this._getNextMatch(d.range.getEndPosition(),i,n,!0):d:null}moveToNextMatch(){this._moveToNextMatch(this._editor.getSelection().getEndPosition())}_getReplacePattern(){return this._state.isRegex?BH(this._state.replaceString):R0.fromStaticValue(this._state.replaceString)}replace(){if(!this._hasMatches())return;let e=this._getReplacePattern(),i=this._editor.getSelection(),n=this._getNextMatch(i.getStartPosition(),!0,!1);if(n)if(i.equalsRange(n.range)){let s=e.buildReplaceString(n.matches,this._state.preserveCase),r=new zt(i,s);this._executeEditorCommand("replace",r),this._decorations.setStartPosition(new A(i.startLineNumber,i.startColumn+s.length)),this.research(!0)}else this._decorations.setStartPosition(this._editor.getPosition()),this._setCurrentFindMatch(n.range)}_findMatches(e,i,n){const s=(e||[null]).map(r=>Td._getSearchRange(this._editor.getModel(),r));return this._editor.getModel().findMatches(this._state.searchString,s,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(117):null,i,n)}replaceAll(){if(!this._hasMatches())return;const e=this._decorations.getFindScopes();e===null&&this._state.matchesCount>=19999?this._largeReplaceAll():this._regularReplaceAll(e),this.research(!1)}_largeReplaceAll(){const e=new Lr(this._state.searchString,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(117):null).parseSearchRequest();if(!e)return;let i=e.regex;if(!i.multiline){let c="mu";i.ignoreCase&&(c+="i"),i.global&&(c+="g"),i=new RegExp(i.source,c)}const n=this._editor.getModel(),s=n.getValue(1),r=n.getFullModelRange(),o=this._getReplacePattern();let a;const l=this._state.preserveCase;o.hasReplacementPatterns||l?a=s.replace(i,function(){return o.buildReplaceString(arguments,l)}):a=s.replace(i,o.buildReplaceString(null,l));let h=new Mk(r,a,this._editor.getSelection());this._executeEditorCommand("replaceAll",h)}_regularReplaceAll(e){const i=this._getReplacePattern();let n=this._findMatches(e,i.hasReplacementPatterns||this._state.preserveCase,1073741824),s=[];for(let o=0,a=n.length;o<a;o++)s[o]=i.buildReplaceString(n[o].matches,this._state.preserveCase);let r=new OH(this._editor.getSelection(),n.map(o=>o.range),s);this._executeEditorCommand("replaceAll",r)}selectAllMatches(){if(!this._hasMatches())return;let e=this._decorations.getFindScopes(),i=this._findMatches(e,!1,1073741824).map(s=>new xe(s.range.startLineNumber,s.range.startColumn,s.range.endLineNumber,s.range.endColumn)),n=this._editor.getSelection();for(let s=0,r=i.length;s<r;s++)if(i[s].equalsRange(n)){i=[n].concat(i.slice(0,s)).concat(i.slice(s+1));break}this._editor.setSelections(i)}_executeEditorCommand(e,i){try{this._ignoreModelContentChanged=!0,this._editor.pushUndoStop(),this._editor.executeCommand(e,i),this._editor.pushUndoStop()}finally{this._ignoreModelContentChanged=!1}}},HH={inputActiveOptionBorder:O.fromHex("#007ACC00"),inputActiveOptionForeground:O.fromHex("#FFFFFF"),inputActiveOptionBackground:O.fromHex("#0E639C50")},qh=class extends qn{constructor(t){super(),this._onChange=this._register(new M),this.onChange=this._onChange.event,this._onKeyDown=this._register(new M),this.onKeyDown=this._onKeyDown.event,this._opts=Object.assign(Object.assign({},HH),t),this._checked=this._opts.isChecked;const e=["monaco-custom-checkbox"];this._opts.icon&&e.push(...qt.asClassNameArray(this._opts.icon)),this._opts.actionClassName&&e.push(...this._opts.actionClassName.split(" ")),this._checked&&e.push("checked"),this.domNode=document.createElement("div"),this.domNode.title=this._opts.title,this.domNode.classList.add(...e),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,i=>{this.enabled&&(this.checked=!this._checked,this._onChange.fire(!1),i.preventDefault())}),this.ignoreGesture(this.domNode),this.onkeydown(this.domNode,i=>{if(i.keyCode===10||i.keyCode===3){this.checked=!this._checked,this._onChange.fire(!0),i.preventDefault();return}this._onKeyDown.fire(i)})}get enabled(){return this.domNode.getAttribute("aria-disabled")!=="true"}focus(){this.domNode.focus()}get checked(){return this._checked}set checked(t){this._checked=t,this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.classList.toggle("checked",this._checked),this.applyStyles()}width(){return 22}
595style(t){t.inputActiveOptionBorder&&(this._opts.inputActiveOptionBorder=t.inputActiveOptionBorder),t.inputActiveOptionForeground&&(this._opts.inputActiveOptionForeground=t.inputActiveOptionForeground),t.inputActiveOptionBackground&&(this._opts.inputActiveOptionBackground=t.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))}},zH=p("caseDescription","Match Case"),UH=p("wordsDescription","Match Whole Word"),$H=p("regexDescription","Use Regular Expression"),aD=class extends qh{constructor(t){super({icon:f.caseSensitive,title:zH+t.appendTitle,isChecked:t.isChecked,inputActiveOptionBorder:t.inputActiveOptionBorder,inputActiveOptionForeground:t.inputActiveOptionForeground,inputActiveOptionBackground:t.inputActiveOptionBackground})}},lD=class extends qh{constructor(t){super({icon:f.wholeWord,title:UH+t.appendTitle,isChecked:t.isChecked,inputActiveOptionBorder:t.inputActiveOptionBorder,inputActiveOptionForeground:t.inputActiveOptionForeground,inputActiveOptionBackground:t.inputActiveOptionBackground})}},hD=class extends qh{constructor(t){super({icon:f.regex,title:$H+t.appendTitle,isChecked:t.isChecked,inputActiveOptionBorder:t.inputActiveOptionBorder,inputActiveOptionForeground:t.inputActiveOptionForeground,inputActiveOptionBackground:t.inputActiveOptionBackground})}},cD=class dD extends qn{constructor(e,i,n,s){super(),this._hideSoon=this._register(new _t(()=>this._hide(),2e3)),this._isVisible=!1,this._editor=e,this._state=i,this._keybindingService=n,this._domNode=document.createElement("div"),this._domNode.className="findOptionsWidget",this._domNode.style.display="none",this._domNode.style.top="10px",this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true");const r=s.getColorTheme().getColor(Tp),o=s.getColorTheme().getColor(Rp),a=s.getColorTheme().getColor(Mp);this.caseSensitive=this._register(new aD({appendTitle:this._keybindingLabelFor(Se.ToggleCaseSensitiveCommand),isChecked:this._state.matchCase,inputActiveOptionBorder:r,inputActiveOptionForeground:o,inputActiveOptionBackground:a})),this._domNode.appendChild(this.caseSensitive.domNode),this._register(this.caseSensitive.onChange(()=>{this._state.change({matchCase:this.caseSensitive.checked},!1)})),this.wholeWords=this._register(new lD({appendTitle:this._keybindingLabelFor(Se.ToggleWholeWordCommand),isChecked:this._state.wholeWord,inputActiveOptionBorder:r,inputActiveOptionForeground:o,inputActiveOptionBackground:a})),this._domNode.appendChild(this.wholeWords.domNode),this._register(this.wholeWords.onChange(()=>{this._state.change({wholeWord:this.wholeWords.checked},!1)})),this.regex=this._register(new hD({appendTitle:this._keybindingLabelFor(Se.ToggleRegexCommand),isChecked:this._state.isRegex,inputActiveOptionBorder:r,inputActiveOptionForeground:o,inputActiveOptionBackground:a})),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(l=>{let h=!1;l.isRegex&&(this.regex.checked=this._state.isRegex,h=!0),l.wholeWord&&(this.wholeWords.checked=this._state.wholeWord,h=!0),l.matchCase&&(this.caseSensitive.checked=this._state.matchCase,h=!0),!this._state.isRevealed&&h&&this._revealTemporarily()})),this._register(Dv(this._domNode,l=>
595this._onMouseOut())),this._register(B(this._domNode,"mouseover",l=>this._onMouseOver())),this._applyTheme(s.getColorTheme()),this._register(s.onDidColorThemeChange(this._applyTheme.bind(this)))}_keybindingLabelFor(e){let i=this._keybindingService.lookupKeybinding(e);return i?` (${i.getLabel()})`:""}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return dD.ID}getDomNode(){return this._domNode}getPosition(){return{preference:0}}highlightFindOptions(){this._revealTemporarily()}_revealTemporarily(){this._show(),this._hideSoon.schedule()}_onMouseOut(){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){let i={inputActiveOptionBorder:e.getColor(Tp),inputActiveOptionForeground:e.getColor(Rp),inputActiveOptionBackground:e.getColor(Mp)};this.caseSensitive.style(i),this.wholeWords.style(i),this.regex.style(i)}};cD.ID="editor.contrib.findOptionsWidget";Yt((t,e)=>{const i=t.getColor(Zi);i&&e.addRule(`.monaco-editor .findOptionsWidget { background-color: ${i}; }`);const n=t.getColor(Zs);n&&e.addRule(`.monaco-editor .findOptionsWidget { color: ${n}; }`);const s=t.getColor(Ea);s&&e.addRule(`.monaco-editor .findOptionsWidget { box-shadow: 0 0 8px 2px ${s}; }`);const r=t.getColor(Ye);r&&e.addRule(`.monaco-editor .findOptionsWidget { border: 2px solid ${r}; }`)});function Hc(t,e){return t===1?!0:t===2?!1:e}var KH=class extends V{constructor(){super(),this._onFindReplaceStateChange=this._register(new M),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 Hc(this._isRegexOverride,this._isRegex)}get wholeWord(){return Hc(this._wholeWordOverride,this._wholeWord)}get matchCase(){return Hc(this._matchCaseOverride,this._matchCase)}get preserveCase(){return Hc(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(t,e,i){let n={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},s=!1;e===0&&(t=0),t>e&&(t=e),this._matchesPosition!==t&&(this._matchesPosition=t,n.matchesPosition=!0,s=!0),this._matchesCount!==e&&(this._matchesCount=e,n.matchesCount=!0,s=!0),typeof i<"u"&&(T.equalsRange(this._currentMatch,i)||(this._currentMatch=i,n.currentMatch=!0,s=!0)),s&&this._onFindReplaceStateChange.fire(n)}change(t,e,i=!0){var n;let s={moveCursor:e,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},r=!1;const o=this.isRegex,a=this.wholeWord,l=this.matchCase,h=this.preserveCase;typeof t.searchString<"u"&&this._searchString!==t.searchString&&(this._searchString=t.searchString,s.searchString=!0,r=!0),typeof t.replaceString<"u"&&this._replaceString!==t.replaceString&&(this._replaceString=t.replaceString,s.replaceString=!0,r=!0),typeof t.isRevealed<"u"&&this._isRevealed!==t.isRevealed&&(this._isRevealed=t.isRevealed,s.isRevealed=!0,r=!0),typeof t.isReplaceRevealed<"u"&&this._isReplaceRevealed!==t.isReplaceRevealed&&(this._isReplaceRevealed=t.isReplaceRevealed,s.isReplaceRevealed=!0,r=!0),typeof t.isRegex<"u"&&(this._isRegex=t.isRegex),typeof t.wholeWord<"u"&&(this._wholeWord=t.wholeWord),typeof t.matchCase<"u"&&(this._matchCase=t.matchCase),typeof t.preserveCase<"u"&&(this._preserveCase=t.preserveCase),typeof t.searchScope<"u"&&(!((n=t.searchScope)===null||n===void 0)&&n.every(c=>{var d;return(d=this._searchScope)===null||d===void 0?void 0:d.some(u=>!T.equalsRange(u,c))})||(this._searchScope=t.searchScope,s.searchScope=!0,r=!0)),typeof t.loop<"u"&&this._loop!==t.loop&&(this._loop=t.loop,s.loop=!0,r=!0),typeof t.isSearching<"u"&&this._isSearching!==t.isSearching&&(this._isSearching=t.isSearching,s.isSearching=!0,r=!0),typeof t.filters<"u"&&(this._filters?this._filters.update(t.filters):this._filters=t.filters,s.filters=!0,r=!0),this._isRegexOverride=typeof t.isRegexOverride<"u"?t.isRegexOverride:0,this._wholeWordOverride=typeof t.wholeWordOverride<"u"?t.wholeWordOverride:0,this._matchCaseOverride=typeof t.matchCaseOverride<"u"?t.matchCaseOverride:0,this._preserveCaseOverride=typeof t.preserveCaseOverride<"u"?t.preserveCaseOverride:0,o!==this.isRegex&&(r=!0,s.isRegex=!0),a!==this.wholeWord&&(r=!0,s.wholeWord=!0),l!==this.matchCase&&(r=!0,s.matchCase=!0),h!==this.preserveCase&&(r=!0,s.preserveCase=!0),r&&this._onFindReplaceStateChange.fire(s)}canNavigateBack(){return this.canNavigateInLoop()||this.matchesPosition!==1}canNavigateForward(){return this.canNavigateInLoop()||this.matchesPosition<this.matchesCount}canNavigateInLoop(){return this._loop||this.matchesCount>=19999}},jH=p("defaultLabel","input"),qH=class extends qn{constructor(t,e,i,n){super(),this._showOptionButtons=i,this.fixFocusOnOptionClickEnabled=!0,this.imeSessionInProgress=!1,this._onDidOptionChange=this._register(new M),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new M),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new M),this.onMouseDown=this._onMouseDown.event,this._onInput=this._register(new M),this._onKeyUp=this._register(new M),this._onCaseSensitiveKeyDown=this._register(new M),this.onCaseSensitiveKeyDown=this._onCaseSensitiveKeyDown.event,this._onRegexKeyDown=this._register(new M),this.onRegexKeyDown=this._onRegexKeyDown.event,this._lastHighlightFindOptions=0,this.contextViewProvider=e,this.placeholder=n.placeholder||"",this.validation=n.validation,this.label=n.label||jH,this.inputActiveOptionBorder=n.inputActiveOptionBorder,this.inputActiveOptionForeground=n.inputActiveOptionForeground,this.inputActiveOptionBackgroun
595d=n.inputActiveOptionBackground,this.inputBackground=n.inputBackground,this.inputForeground=n.inputForeground,this.inputBorder=n.inputBorder,this.inputValidationInfoBorder=n.inputValidationInfoBorder,this.inputValidationInfoBackground=n.inputValidationInfoBackground,this.inputValidationInfoForeground=n.inputValidationInfoForeground,this.inputValidationWarningBorder=n.inputValidationWarningBorder,this.inputValidationWarningBackground=n.inputValidationWarningBackground,this.inputValidationWarningForeground=n.inputValidationWarningForeground,this.inputValidationErrorBorder=n.inputValidationErrorBorder,this.inputValidationErrorBackground=n.inputValidationErrorBackground,this.inputValidationErrorForeground=n.inputValidationErrorForeground;const s=n.appendCaseSensitiveLabel||"",r=n.appendWholeWordsLabel||"",o=n.appendRegexLabel||"",a=n.history||[],l=!!n.flexibleHeight,h=!!n.flexibleWidth,c=n.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new FI(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:a,showHistoryHint:n.showHistoryHint,flexibleHeight:l,flexibleWidth:h,flexibleMaxHeight:c})),this.regex=this._register(new hD({appendTitle:o,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.regex.onChange(u=>{this._onDidOptionChange.fire(u),!u&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.regex.onKeyDown(u=>{this._onRegexKeyDown.fire(u)})),this.wholeWords=this._register(new lD({appendTitle:r,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.wholeWords.onChange(u=>{this._onDidOptionChange.fire(u),!u&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this.caseSensitive=this._register(new aD({appendTitle:s,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.caseSensitive.onChange(u=>{this._onDidOptionChange.fire(u),!u&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.caseSensitive.onKeyDown(u=>{this._onCaseSensitiveKeyDown.fire(u)})),this._showOptionButtons&&(this.inputBox.paddingRight=this.caseSensitive.width()+this.wholeWords.width()+this.regex.width());let d=[this.caseSensitive.domNode,this.wholeWords.domNode,this.regex.domNode];this.onkeydown(this.domNode,u=>{if(u.equals(15)||u.equals(17)||u.equals(9)){let g=d.indexOf(document.activeElement);if(g>=0){let m=-1;u.equals(17)?m=(g+1)%d.length:u.equals(15)&&(g===0?m=d.length-1:m=g-1),u.equals(9)?(d[g].blur(),this.inputBox.focus()):m>=0&&d[m].focus(),ye.stop(u,!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.domNode.appendChild(this.controls),t&&t.appendChild(this.domNode),this._register(B(this.inputBox.inputElement,"compositionstart",u=>{this.imeSessionInProgress=!0})),this._register(B(this.inputBox.inputElement,"compositionend",u=>{this.imeSessionInProgress=!1,this._onInput.fire()})),this.onkeydown(this.inputBox.inputElement,u=>this._onKeyDown.fire(u)),this.onkeyup(this.inputBox.inputElement,u=>this._onKeyUp.fire(u)),this.oninput(this.inputBox.inputElement,u=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,u=>this._onMouseDown.fire(u))}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.regex.enable(),this.wholeWords.enable(),this.caseSensitive.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.regex.disable(),this.wholeWords.disable(),this.caseSensitive.disable()}setFocusInputOnOptionClick(t){this.fixFocusOnOptionClickEnabled=t}setEnabled(t){t?this.enable():this.disable()}getValue(){return this.inputBox.value}setValue(t){this.inputBox.value!==t&&(this.inputBox.value=t)}style(t){this.inputActiveOptionBorder=t.inputActiveOptionBorder,this.inputActiveOptionForeground=t.inputActiveOptionForeground,this.inputActiveOptionBackgroun
595d=t.inputActiveOptionBackground,this.inputBackground=t.inputBackground,this.inputForeground=t.inputForeground,this.inputBorder=t.inputBorder,this.inputValidationInfoBackground=t.inputValidationInfoBackground,this.inputValidationInfoForeground=t.inputValidationInfoForeground,this.inputValidationInfoBorder=t.inputValidationInfoBorder,this.inputValidationWarningBackground=t.inputValidationWarningBackground,this.inputValidationWarningForeground=t.inputValidationWarningForeground,this.inputValidationWarningBorder=t.inputValidationWarningBorder,this.inputValidationErrorBackground=t.inputValidationErrorBackground,this.inputValidationErrorForeground=t.inputValidationErrorForeground,this.inputValidationErrorBorder=t.inputValidationErrorBorder,this.applyStyles()}applyStyles(){if(this.domNode){const t={inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground};this.regex.style(t),this.wholeWords.style(t),this.caseSensitive.style(t);const e={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(e)}}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getCaseSensitive(){return this.caseSensitive.checked}setCaseSensitive(t){this.caseSensitive.checked=t}getWholeWords(){return this.wholeWords.checked}setWholeWords(t){this.wholeWords.checked=t}getRegex(){return this.regex.checked}setRegex(t){this.regex.checked=t,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()}clearMessage(){this.inputBox.hideMessage()}},GH=p("defaultLabel","input"),ZH=p("label.preserveCaseCheckbox","Preserve Case"),YH=class extends qh{constructor(t){super({icon:f.preserveCase,title:ZH+t.appendTitle,isChecked:t.isChecked,inputActiveOptionBorder:t.inputActiveOptionBorder,inputActiveOptionForeground:t.inputActiveOptionForeground,inputActiveOptionBackground:t.inputActiveOptionBackground})}},XH=class extends qn{constructor(t,e,i,n){super(),this._showOptionButtons=i,this.fixFocusOnOptionClickEnabled=!0,this.cachedOptionsWidth=0,this._onDidOptionChange=this._register(new M),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new M),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new M),this._onInput=this._register(new M),this._onKeyUp=this._register(new M),this._onPreserveCaseKeyDown=this._register(new M),this.onPreserveCaseKeyDown=this._onPreserveCaseKeyDown.event,this.contextViewProvider=e,this.placeholder=n.placeholder||"",this.validation=n.validation,this.label=n.label||GH,this.inputActiveOptionBorder=n.inputActiveOptionBorder,this.inputActiveOptionForeground=n.inputActiveOptionForeground,this.inputActiveOptionBackground=n.inputActiveOptionBackground,this.inputBackground=n.inputBackground,this.inputForeground=n.inputForeground,this.inputBorder=n.inputBorder,this.inputValidationInfoBorder=n.inputValidationInfoBorder,this.inputValidationInfoBackground=n.inputValidationInfoBackground,this.inputValidationInfoForeground=n.inputValidationInfoForeground,this.inputValidationWarningBorder=n.inputValidationWarningBorder,this.inputValidationWarningBackground=n.inputValidationWarningBackgroun
vendor: 4,119 bytes, line 595
595d,this.inputValidationWarningForeground=n.inputValidationWarningForeground,this.inputValidationErrorBorder=n.inputValidationErrorBorder,this.inputValidationErrorBackground=n.inputValidationErrorBackground,this.inputValidationErrorForeground=n.inputValidationErrorForeground;const s=n.appendPreserveCaseLabel||"",r=n.history||[],o=!!n.flexibleHeight,a=!!n.flexibleWidth,l=n.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new FI(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:r,showHistoryHint:n.showHistoryHint,flexibleHeight:o,flexibleWidth:a,flexibleMaxHeight:l})),this.preserveCase=this._register(new YH({appendTitle:s,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.preserveCase.onChange(d=>{this._onDidOptionChange.fire(d),!d&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.preserveCase.onKeyDown(d=>{this._onPreserveCaseKeyDown.fire(d)})),this._showOptionButtons?this.cachedOptionsWidth=this.preserveCase.width():this.cachedOptionsWidth=0;let h=[this.preserveCase.domNode];this.onkeydown(this.domNode,d=>{if(d.equals(15)||d.equals(17)||d.equals(9)){let u=h.indexOf(document.activeElement);if(u>=0){let g=-1;d.equals(17)?g=(u+1)%h.length:d.equals(15)&&(u===0?g=h.length-1:g=u-1),d.equals(9)?(h[u].blur(),this.inputBox.focus()):g>=0&&h[g].focus(),ye.stop(d,!0)}}});let c=document.createElement("div");c.className="controls",c.style.display=this._showOptionButtons?"block":"none",c.appendChild(this.preserveCase.domNode),this.domNode.appendChild(c),t&&t.appendChild(this.domNode),this.onkeydown(this.inputBox.inputElement,d=>this._onKeyDown.fire(d)),this.onkeyup(this.inputBox.inputElement,d=>this._onKeyUp.fire(d)),this.oninput(this.inputBox.inputElement,d=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,d=>this._onMouseDown.fire(d))}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(t){t?this.enable():this.disable()}style(t){this.inputActiveOptionBorder=t.inputActiveOptionBorder,this.inputActiveOptionForeground=t.inputActiveOptionForeground,this.inputActiveOptionBackground=t.inputActiveOptionBackground,this.inputBackground=t.inputBackground,this.inputForeground=t.inputForeground,this.inputBorder=t.inputBorder,this.inputValidationInfoBackground=t.inputValidationInfoBackground,this.inputValidationInfoForeground=t.inputValidationInfoForeground,this.inputValidationInfoBorder=t.inputValidationInfoBorder,this.inputValidationWarningBackground=t.inputValidationWarningBackground,this.inputValidationWarningForeground=t.inputValidationWarningForeground,this.inputValidationWarningBorder=t.inputValidationWarningBorder,this.inputValidationErrorBackground=t.inputValidationErrorBackground,this.inputValidationErrorForeground=t.inputValidationErrorForeground,this.inputValidationErrorBorder=t.inputValidationErrorBorder,this.applyStyles()}applyStyles(){if(this.domNode){const t={inputActiveOptionBorder:this.inputActiveOptionBorder,inputA
595ctiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground};this.preserveCase.style(t);const e={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(e)}}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getPreserveCase(){return this.preserveCase.checked}setPreserveCase(t){this.preserveCase.checked=t}focusOnPreserve(){this.preserveCase.focus()}validate(){this.inputBox&&this.inputBox.validate()}set width(t){this.inputBox.paddingRight=this.cachedOptionsWidth,this.inputBox.width=t,this.domNode.style.width=t+"px"}dispose(){super.dispose()}},uD=function(t,e,i,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r},fD=function(t,e){return function(i,n){e(i,n,t)}},gD=new Y("suggestWidgetVisible",!1,p("suggestWidgetVisible","Whether suggestion are visible")),Sh="historyNavigationWidget",mD="historyNavigationForwardsEnabled",pD="historyNavigationBackwardsEnabled";function QH(t,e,i){new Y(i,e).bindTo(t)}function JH(t,e){return t.createScoped(e.target)}function _D(t,e){return t.getContext(document.activeElement).getValue(e)}function vD(t,e){const i=JH(t,e);return QH(i,e,Sh),{scopedContextKeyService:i,historyNavigationForwardsEnablement:new Y(mD,!0).bindTo(i),historyNavigationBackwardsEnablement:new Y(pD,!0).bindTo(i)}}var z1=class extends qH{constructor(e,i,n,s,r=!1){super(e,i,r,n),this._register(vD(s,{target:this.inputBox.element,historyNavigator:this.inputBox}).scopedContextKeyService)}};z1=uD([fD(3,Ie)],z1);var U1=class extends XH{constructor(e,i,n,s,r=!1){super(e,i,r,n),this._register(vD(s,{target:this.inputBox.element,historyNavigator:this.inputBox}).scopedContextKeyService)}};U1=uD([fD(3,Ie)],U1);Ua.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:Re.and(Re.has(Sh),Re.equals(pD,!0),gD.isEqualTo(!1)),primary:16,secondary:[528],handler:t=>{const e=_D(t.get(Ie),Sh);e&&e.historyNavigator.showPreviousValue()}});Ua.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:Re.and(Re.has(Sh),Re.equals(mD,!0),gD.isEqualTo(!1)),primary:18,secondary:[530],handler:t=>{const e=_D(t.get(Ie),Sh);e&&e.historyNavigator.showNextValue()}});function ZS(t){var e,i;return((e=t.lookupKeybinding("history.showPrevious"))===null||e===void 0?void 0:e.getElectronAccelerator())==="Up"&&((i=t.lookupKeybinding("history.showNext"))===null||i===void 0?void 0:i.getElectronAccelerator())==="Down"}var ez=function(t,e,i,n){function s(r){return r instanceof i?r:new i(function(o){o(r)})}return new(i||(i=Promise))(function(r,o){function a(c){try{h(n.next(c))}catch(d){o(d)}}function l(c){try{h(n.throw(c))}catch(d){o(d)}}function h(c){c.done?r(c.value):s(c.value).then(a,l)}h((n=n.apply(t,e||[])).next())})},tz=ni("find-selection",f.selection,p("findSelectionIcon","Icon for 'Find in Selection' in the editor find widget.")),YS=ni("find-collapsed",f.chevronRight,p("findCollapsedIcon","Icon to indicate that the editor find widget is collapsed.")),XS=ni("find-expanded",f.chevronDown,p("findExpandedIcon","Icon to indicate that the editor find widget is expanded.")),iz=ni("find-replace",f.replace,p("findReplaceIcon","Icon for 'Replace' in the editor find widget.")),nz=ni("find-replace-all",f.replaceAll,p("findReplaceAllIcon","Icon for 'Replace All' in the editor find widget.")),sz=ni("find-previous-match",f.arrowUp,p("findPreviousMatchIcon","Icon for 'Find Previous' in the editor find widget.")),rz=ni("find-next-match",f.arrowDown,p("findNextMatchIcon","Icon for 'Find Next' in the editor find widget.")),oz=p("label.find","Find"),az=p("placeholder.find","Find"),lz=p("label.previousMatchButton","Previous Match"),hz=p("label.nextMatchButton","Next Match"),cz=p("label.toggleSelectionFind","Find in Selection"),dz=p("label.closeButton","Close"),uz=p("label.replace","Replace"),fz=p("placeholder.replace","Replace"),gz=p("label.replaceButton","Replace"),mz=p("label.replaceAllButton","Replace All"),pz=p("label.toggleReplaceButton","Toggle Replace"),_z=p("title.matchesCountLimit","Only the first {0} results are highlighted, but all find operations work on the entire text.",oD),vz=p("label.matchesLocation","{0} of {1}
595"),QS=p("label.noResults","No results"),Sr=419,Cz=221,Cl=69,bz=33,JS="ctrlEnterReplaceAll.windows.donotask",ey=fe?256:2048,Gg=class{constructor(t){this.afterLineNumber=t,this.heightInPx=bz,this.suppressMouseDown=!1,this.domNode=document.createElement("div"),this.domNode.className="dock-find-viewzone"}};function ty(t,e,i){const n=!!e.match(/\n/);if(i&&n&&i.selectionStart>0){t.stopPropagation();return}}function iy(t,e,i){const n=!!e.match(/\n/);if(i&&n&&i.selectionEnd<i.value.length){t.stopPropagation();return}}var CD=class bD extends qn{constructor(e,i,n,s,r,o,a,l,h){super(),this._cachedHeight=null,this._revealTimeouts=[],this._codeEditor=e,this._controller=i,this._state=n,this._contextViewProvider=s,this._keybindingService=r,this._contextKeyService=o,this._storageService=l,this._notificationService=h,this._ctrlEnterReplaceAllWarningPrompted=!!l.getBoolean(JS,0),this._isVisible=!1,this._isReplaceVisible=!1,this._ignoreChangeEvent=!1,this._updateHistoryDelayer=new Ha(500),this._register(Ae(()=>this._updateHistoryDelayer.cancel())),this._register(this._state.onFindReplaceStateChange(c=>this._onStateChanged(c))),this._buildDomNode(),this._updateButtons(),this._tryUpdateWidgetWidth(),this._findInput.inputBox.layout(),this._register(this._codeEditor.onDidChangeConfiguration(c=>{if(c.hasChanged(81)&&(this._codeEditor.getOption(81)&&this._state.change({isReplaceRevealed:!1},!1),this._updateButtons()),c.hasChanged(131)&&this._tryUpdateWidgetWidth(),c.hasChanged(2)&&this.updateAccessibilitySupport(),c.hasChanged(35)){const d=this._codeEditor.getOption(35).addExtraSpaceOnTop;d&&!this._viewZone&&(this._viewZone=new Gg(0),this._showViewZone()),!d&&this._viewZone&&this._removeViewZone()}})),this.updateAccessibilitySupport(),this._register(this._codeEditor.onDidChangeCursorSelection(()=>{this._isVisible&&this._updateToggleSelectionFindButton()})),this._register(this._codeEditor.onDidFocusEditorWidget(()=>ez(this,void 0,void 0,function*(){if(this._isVisible){let c=yield this._controller.getGlobalBufferTerm();c&&c!==this._state.searchString&&(this._state.change({searchString:c},!1),this._findInput.select())}}))),this._findInputFocused=_f.bindTo(o),this._findFocusTracker=this._register(xa(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=A0.bindTo(o),this._replaceFocusTracker=this._register(xa(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(35).addExtraSpaceOnTop&&(this._viewZone=new Gg(0)),this._applyTheme(a.getColorTheme()),this._register(a.onDidColorThemeChange(this._applyTheme.bind(this))),this._register(this._codeEditor.onDidChangeModel(()=>{this._isVisible&&(this._viewZoneId=void 0)})),this._register(this._codeEditor.onDidScrollChange(c=>{if(c.scrollTopChanged){this._layoutViewZone();return}setTimeout(()=>{this._layoutViewZone()},0)}))}getId(){return bD.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(81)&&!this._isReplaceVisible&&(this._isReplaceVisible=!0,this._replaceInput.width=Vi(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){let i=this._state.searchString.length>0&&this._state.matchesCount===0;
595this._domNode.classList.toggle("no-results",i),this._updateMatchesCount(),this._updateButtons()}(e.searchString||e.currentMatch)&&this._layoutViewZone(),e.updateHistory&&this._delayedUpdateHistory(),e.loop&&this._updateButtons()}_delayedUpdateHistory(){this._updateHistoryDelayer.trigger(this._updateHistory.bind(this)).then(void 0,We)}_updateHistory(){this._state.searchString&&this._findInput.inputBox.addToHistory(),this._state.replaceString&&this._replaceInput.inputBox.addToHistory()}_updateMatchesCount(){this._matchesCount.style.minWidth=Cl+"px",this._state.matchesCount>=19999?this._matchesCount.title=_z:this._matchesCount.title="",this._matchesCount.firstChild&&this._matchesCount.removeChild(this._matchesCount.firstChild);let e;if(this._state.matchesCount>0){let i=String(this._state.matchesCount);this._state.matchesCount>=19999&&(i+="+");let n=String(this._state.matchesPosition);n==="0"&&(n="?"),e=Hd(vz,n,i)}else e=QS;this._matchesCount.appendChild(document.createTextNode(e)),Zu(this._getAriaLabel(e,this._state.currentMatch,this._state.searchString)),Cl=Math.max(Cl,this._matchesCount.clientWidth)}_getAriaLabel(e,i,n){if(e===QS)return n===""?p("ariaSearchNoResultEmpty","{0} found",e):p("ariaSearchNoResult","{0} found for '{1}'",e,n);if(i){const s=p("ariaSearchNoResultWithLineNum","{0} found for '{1}', at {2}",e,n,i.startLineNumber+":"+i.startColumn),r=this._codeEditor.getModel();return r&&i.startLineNumber<=r.getLineCount()&&i.startLineNumber>=1?`${r.getLineContent(i.startLineNumber)}, ${s}`:s}return p("ariaSearchNoResultWithLineNumNoCurrentMatch","{0} found for '{1}'",e,n)}_updateToggleSelectionFindButton(){let e=this._codeEditor.getSelection(),i=e?e.startLineNumber!==e.endLineNumber||e.startColumn!==e.endColumn:!1,n=this._toggleSelectionFind.checked;this._isVisible&&(n||i)?this._toggleSelectionFind.enable():this._toggleSelectionFind.disable()}_updateButtons(){this._findInput.setEnabled(this._isVisible),this._replaceInput.setEnabled(this._isVisible&&this._isReplaceVisible),this._updateToggleSelectionFindButton(),this._closeBtn.setEnabled(this._isVisible);let e=this._state.searchString.length>0,i=!!this._state.matchesCount;this._prevBtn.setEnabled(this._isVisible&&e&&i&&this._state.canNavigateBack()),this._nextBtn.setEnabled(this._isVisible&&e&&i&&this._state.canNavigateForward()),this._replaceBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._replaceAllBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._domNode.classList.toggle("replaceToggled",this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);let n=!this._codeEditor.getOption(81);this._toggleReplaceBtn.setEnabled(this._isVisible&&n)}_reveal(){if(this._revealTimeouts.forEach(e=>{clearTimeout(e)}),this._revealTimeouts=[],!this._isVisible){this._isVisible=!0;const e=this._codeEditor.getSelection();switch(this._codeEditor.getOption(35).autoFindInSelection){case"always":this._toggleSelectionFind.checked=!0;break;case"never":this._toggleSelectionFind.checked=!1;break;case"multiline":{const n=!!e&&e.startLineNumber!==e.endLineNumber;this._toggleSelectionFind.checked=n;break}}this._tryUpdateWidgetWidth(),this._updateButtons(),this._revealTimeouts.push(setTimeout(()=>{this._domNode.classList.add("visible"),this._domNode.setAttribute("aria-hidden","false")},0)),this._revealTimeouts.push(setTimeout(()=>{this._findInput.validate()},200)),this._codeEditor.layoutOverlayWidget(this);let i=!0;if(this._codeEditor.getOption(35).seedSearchStringFromSelection&&e){const n=this._codeEditor.getDomNode();if(n){const s=qi(n),r=this._codeEditor.getScrolledVisiblePosition(e.getStartPosition()),o=s.left+(r?r.left:0),a=r?r.top:0;if(this._viewZone&&a<this._viewZone.heightInPx){e.endLineNumber>e.startLineNumber&&(i=!1);
595const l=KL(this._domNode).left;o>l&&(i=!1);const h=this._codeEditor.getScrolledVisiblePosition(e.getEndPosition());s.left+(h?h.left:0)>l&&(i=!1)}}}this._showViewZone(i)}}_hide(e){this._revealTimeouts.forEach(i=>{clearTimeout(i)}),this._revealTimeouts=[],this._isVisible&&(this._isVisible=!1,this._updateButtons(),this._domNode.classList.remove("visible"),this._domNode.setAttribute("aria-hidden","true"),this._findInput.clearMessage(),e&&this._codeEditor.focus(),this._codeEditor.layoutOverlayWidget(this),this._removeViewZone())}_layoutViewZone(e){if(!this._codeEditor.getOption(35).addExtraSpaceOnTop){this._removeViewZone();return}if(!this._isVisible)return;const i=this._viewZone;this._viewZoneId!==void 0||!i||this._codeEditor.changeViewZones(n=>{i.heightInPx=this._getHeight(),this._viewZoneId=n.addZone(i),this._codeEditor.setScrollTop(e||this._codeEditor.getScrollTop()+i.heightInPx)})}_showViewZone(e=!0){if(!this._isVisible||!this._codeEditor.getOption(35).addExtraSpaceOnTop)return;this._viewZone===void 0&&(this._viewZone=new Gg(0));const i=this._viewZone;this._codeEditor.changeViewZones(n=>{if(this._viewZoneId!==void 0){const s=this._getHeight();if(s===i.heightInPx)return;let r=s-i.heightInPx;i.heightInPx=s,n.layoutZone(this._viewZoneId),e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+r);return}else{let s=this._getHeight();if(s-=this._codeEditor.getOption(75).top,s<=0)return;i.heightInPx=s,this._viewZoneId=n.addZone(i),e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+s)}})}_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){let i={inputActiveOptionBorder:e.getColor(Tp),inputActiveOptionBackground:e.getColor(Mp),inputActiveOptionForeground:e.getColor(Rp),inputBackground:e.getColor(V2),inputForeground:e.getColor(W2),inputBorder:e.getColor(H2),inputValidationInfoBackground:e.getColor(z2),inputValidationInfoForeground:e.getColor(U2),inputValidationInfoBorder:e.getColor($2),inputValidationWarningBackground:e.getColor(K2),inputValidationWarningForeground:e.getColor(j2),inputValidationWarningBorder:e.getColor(q2),inputValidationErrorBackground:e.getColor(G2),inputValidationErrorForeground:e.getColor(Z2),inputValidationErrorBorder:e.getColor(Y2)};this._findInput.style(i),this._replaceInput.style(i),this._toggleSelectionFind.style(i)}_tryUpdateWidgetWidth(){if(!this._isVisible||!Ev(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,n=e.minimap.minimapWidth;let s=!1,r=!1,o=!1;
vendor: 5,480 bytes, lines 595-597
595if(this._resized&&Vi(this._domNode)>Sr){this._domNode.style.maxWidth=`${i-28-n-15}px`,this._replaceInput.width=Vi(this._findInput.domNode);return}if(447+n>=i&&(r=!0),447+n-Cl>=i&&(o=!0),447+n-Cl>=i+50&&(s=!0),this._domNode.classList.toggle("collapsed-find-widget",s),this._domNode.classList.toggle("narrow-find-widget",o),this._domNode.classList.toggle("reduced-find-widget",r),!o&&!s&&(this._domNode.style.maxWidth=`${i-28-n-15}px`),this._resized){this._findInput.inputBox.layout();let a=this._findInput.inputBox.element.clientWidth;a>0&&(this._replaceInput.width=a)}else this._isReplaceVisible&&(this._replaceInput.width=Vi(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){let e=this._codeEditor.getSelections();e.map(i=>{i.endColumn===1&&i.endLineNumber>i.startLineNumber&&(i=i.setEndPosition(i.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(i.endLineNumber-1)));const n=this._state.currentMatch;return i.startLineNumber!==i.endLineNumber&&!T.equalsRange(i,n)?i:null}).filter(i=>!!i),e.length&&this._state.change({searchScope:e},!0)}}_onFindInputMouseDown(e){e.middleButton&&e.stopPropagation()}_onFindInputKeyDown(e){if(e.equals(ey|3))if(this._keybindingService.dispatchEvent(e,e.target)){e.preventDefault();return}else{this._findInput.inputBox.insertAtCursor(`
596`),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 ty(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"));if(e.equals(18))return iy(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"))}_onReplaceInputKeyDown(e){if(e.equals(ey|3))if(this._keybindingService.dispatchEvent(e,e.target)){e.preventDefault();return}else{ei&&ia&&!this._ctrlEnterReplaceAllWarningPrompted&&(this._notificationService.info(p("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(JS,!0,0,0)),this._replaceInput.inputBox.insertAtCursor(`
597`),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 ty(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"));if(e.equals(18))return iy(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"))}getVerticalSashLeft(e){return 0}_keybindingLabelFor(e){let i=this._keybindingService.lookupKeybinding(e);return i?` (${i.getLabel()})`:""}_buildDomNode(){this._findInput=this._register(new z1(null,this._contextViewProvider,{width:Cz,label:oz,placeholder:az,appendCaseSensitiveLabel:this._keybindingLabelFor(Se.ToggleCaseSensitiveCommand),appendWholeWordsLabel:this._keybindingLabelFor(Se.ToggleWholeWordCommand),appendRegexLabel:this._keybindingLabelFor(Se.ToggleRegexCommand),validation:l=>{if(l.length===0||!this._findInput.getRegex())return null;try{return new RegExp(l,"gu"),null}catch(h){return{content:h.message}}},flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showHistoryHint:()=>ZS(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(l=>this._onFindInputKeyDown(l))),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(l=>{l.equals(1026)&&this._isReplaceVisible&&(this._replaceInput.focus(),l.preventDefault())})),this._register(this._findInput.onRegexKeyDown(l=>{l.equals(2)&&this._isReplaceVisible&&(this._replaceInput.focusOnPreserve(),l.preventDefault())})),this._register(this._findInput.inputBox.onDidHeightChange(l=>{this._tryUpdateHeight()&&this._showViewZone()})),Bt&&this._register(this._findInput.onMouseDown(l=>this._onFindInputMouseDown(l))),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount(),this._prevBtn=this._register(new To({label:lz+this._keybindingLabelFor(Se.PreviousMatchFindAction),icon:sz,onTrigger:()=>{this._codeEditor.getAction(Se.PreviousMatchFindAction).run().then(void 0,We)}
597})),this._nextBtn=this._register(new To({label:hz+this._keybindingLabelFor(Se.NextMatchFindAction),icon:rz,onTrigger:()=>{this._codeEditor.getAction(Se.NextMatchFindAction).run().then(void 0,We)}}));let n=document.createElement("div");n.className="find-part",n.appendChild(this._findInput.domNode);const s=document.createElement("div");s.className="find-actions",n.appendChild(s),s.appendChild(this._matchesCount),s.appendChild(this._prevBtn.domNode),s.appendChild(this._nextBtn.domNode),this._toggleSelectionFind=this._register(new qh({icon:tz,title:cz+this._keybindingLabelFor(Se.ToggleSearchScopeCommand),isChecked:!1})),this._register(this._toggleSelectionFind.onChange(()=>{if(this._toggleSelectionFind.checked){if(this._codeEditor.hasModel()){let l=this._codeEditor.getSelections();l.map(h=>(h.endColumn===1&&h.endLineNumber>h.startLineNumber&&(h=h.setEndPosition(h.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(h.endLineNumber-1))),h.isEmpty()?null:h)).filter(h=>!!h),l.length&&this._state.change({searchScope:l},!0)}}else this._state.change({searchScope:null},!0)})),s.appendChild(this._toggleSelectionFind.domNode),this._closeBtn=this._register(new To({label:dz+this._keybindingLabelFor(Se.CloseFindWidgetCommand),icon:K3,onTrigger:()=>{this._state.change({isRevealed:!1,searchScope:null},!1)},onKeyDown:l=>{l.equals(2)&&this._isReplaceVisible&&(this._replaceBtn.isEnabled()?this._replaceBtn.focus():this._codeEditor.focus(),l.preventDefault())}}
597)),s.appendChild(this._closeBtn.domNode),this._replaceInput=this._register(new U1(null,void 0,{label:uz,placeholder:fz,appendPreserveCaseLabel:this._keybindingLabelFor(Se.TogglePreserveCaseCommand),history:[],flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showHistoryHint:()=>ZS(this._keybindingService)},this._contextKeyService,!0)),this._replaceInput.setPreserveCase(!!this._state.preserveCase),this._register(this._replaceInput.onKeyDown(l=>this._onReplaceInputKeyDown(l))),this._register(this._replaceInput.inputBox.onDidChange(()=>{this._state.change({replaceString:this._replaceInput.inputBox.value},!1)})),this._register(this._replaceInput.inputBox.onDidHeightChange(l=>{this._isReplaceVisible&&this._tryUpdateHeight()&&this._showViewZone()})),this._register(this._replaceInput.onDidOptionChange(()=>{this._state.change({preserveCase:this._replaceInput.getPreserveCase()},!0)})),this._register(this._replaceInput.onPreserveCaseKeyDown(l=>{l.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(),l.preventDefault())})),this._replaceBtn=this._register(new To({label:gz+this._keybindingLabelFor(Se.ReplaceOneAction),icon:iz,onTrigger:()=>{this._controller.replace()},onKeyDown:l=>{l.equals(1026)&&(this._closeBtn.focus(),l.preventDefault())}})),this._replaceAllBtn=this._register(new To({label:mz+this._keybindingLabelFor(Se.ReplaceAllAction),icon:nz,onTrigger:()=>{this._controller.replaceAll()}}));let r=document.createElement("div");r.className="replace-part",r.appendChild(this._replaceInput.domNode);const o=document.createElement("div");o.className="replace-actions",r.appendChild(o),o.appendChild(this._replaceBtn.domNode),o.appendChild(this._replaceAllBtn.domNode),this._toggleReplaceBtn=this._register(new To({label:pz,className:"codicon toggle left",onTrigger:()=>{this._state.change({isReplaceRevealed:!this._isReplaceVisible},!1),this._isReplaceVisible&&(this._replaceInput.width=Vi(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=`${Sr}px`,this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._domNode.appendChild(n),this._domNode.appendChild(r),this._resizeSash=new vu(this._domNode,this,{orientation:0,size:2}),this._resized=!1;let a=Sr;this._register(this._resizeSash.onDidStart(()=>
597{a=Vi(this._domNode)})),this._register(this._resizeSash.onDidChange(l=>{this._resized=!0;let h=a+l.startX-l.currentX;h<Sr||h>(parseFloat(Tv(this._domNode).maxWidth)||0)||(this._domNode.style.width=`${h}px`,this._isReplaceVisible&&(this._replaceInput.width=Vi(this._findInput.domNode)),this._findInput.inputBox.layout(),this._tryUpdateHeight())})),this._register(this._resizeSash.onDidReset(()=>{const l=Vi(this._domNode);if(l<Sr)return;let h=Sr;if(!this._resized||l===Sr){const c=this._codeEditor.getLayoutInfo();h=c.width-28-c.minimap.minimapWidth-15,this._resized=!0}this._domNode.style.width=`${h}px`,this._isReplaceVisible&&(this._replaceInput.width=Vi(this._findInput.domNode)),this._findInput.inputBox.layout()}))}updateAccessibilitySupport(){const e=this._codeEditor.getOption(2);this._findInput.setFocusInputOnOptionClick(e!==2)}};CD.ID="editor.contrib.findWidget";var To=class extends qn{constructor(t){super(),this._opts=t;let e="button";this._opts.className&&(e=e+" "+this._opts.className),this._opts.icon&&(e=e+" "+ft.asClassName(this._opts.icon)),this._domNode=document.createElement("div"),this._domNode.title=this._opts.label,this._domNode.tabIndex=0,this._domNode.className=e,this._domNode.setAttribute("role","button"),this._domNode.setAttribute("aria-label",this._opts.label),this.onclick(this._domNo
597de,i=>{this._opts.onTrigger(),i.preventDefault()}),this.onkeydown(this._domNode,i=>{if(i.equals(10)||i.equals(3)){this._opts.onTrigger(),i.preventDefault();return}this._opts.onKeyDown&&this._opts.onKeyDown(i)})}get domNode(){return this._domNode}isEnabled(){return this._domNode.tabIndex>=0}focus(){this._domNode.focus()}setEnabled(t){this._domNode.classList.toggle("disabled",!t),this._domNode.setAttribute("aria-disabled",String(!t)),this._domNode.tabIndex=t?0:-1}setExpanded(t){this._domNode.setAttribute("aria-expanded",String(!!t)),t?(this._domNode.classList.remove(...ft.asClassNameArray(YS)),this._domNode.classList.add(...ft.asClassNameArray(XS))):(this._domNode.classList.remove(...ft.asClassNameArray(XS)),this._domNode.classList.add(...ft.asClassNameArray(YS)))}};Yt((t,e)=>{const i=(g,m)=>{m&&e.addRule(`.monaco-editor ${g} { background-color: ${m}; }`)};i(".findMatch",t.getColor(Ys)),i(".currentFindMatch",t.getColor(AR)),i(".findScope",t.getColor(OR)),i(".find-widget",t.getColor(Zi));const n=t.getColor(Ea);n&&e.addRule(`.monaco-editor .find-widget { box-shadow: 0 0 8px 2px ${n}; }`);const s=t.getColor(da);s&&e.addRule(`.monaco-editor .findMatch { border: 1px ${t.type==="hc"?"dotted":"solid"} ${s}; box-sizing: border-box; }`);const r=t.getColor(PR);r&&e.addRule(`.monaco-editor .currentFindMatch { border: 2px solid ${r}; padding: 1px; box-sizing: border-box; }`);const o=t.getColor(FR);o&&e.addRule(`.monaco-editor .findScope { border: 1px ${t.type==="hc"?"dashed":"solid"} ${o}; }`);const a=t.getColor(Ye);a&&e.addRule(`.monaco-editor .find-widget { border: 1px solid ${a}; }`);const l=t.getColor(Zs);l&&e.addRule(`.monaco-editor .find-widget { color: ${l}; }`);const h=t.getColor(gR);h&&e.addRule(`.monaco-editor .find-widget.no-results .matchesCount { color: ${h}; }`);const c=t.getColor(LR);if(c)e.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${c}; }`);else{const g=t.getColor(od);g&&e.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${g}; }`)}const d=t.getColor(Fp);d&&e.addRule(`
598		.monaco-editor .find-widget .button:not(.disabled):hover,
599		.monaco-editor .find-widget .codicon-find-selection:hover {
600			background-color: ${d} !important;
601		}
602	`);const u=t.getColor(Pn);u&&e.addRule(`.monaco-editor .find-widget .monaco-inputbox.synthetic-focus { outline-color: ${u}; }`)});var wD=function(t,e,i,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r},Tn=function(t,e){return function(i,n){e(i,n,t)}},oo=function(t,e,i,n){function s(r){return r instanceof i?r:new i(function(o){o(r)})}return new(i||(i=Promise))(function(r,o){function a(c){try{h(n.next(c))}catch(d){o(d)}}function l(c){try{h(n.throw(c))}catch(d){o(d)}}function h(c){c.done?r(c.value):s(c.value).then(a,l)}h((n=n.apply(t,e||[])).next())})},wz=524288;function $1(t,e="single",i=!1){if(!t.hasModel())return null;const n=t.getSelection();if(e==="single"&&n.startLineNumber===n.endLineNumber||e==="multiple"){if(n.isEmpty()){const s=t.getConfiguredWordAtPosition(n.getStartPosition());if(s&&i===!1)return s.word}else if(t.getModel().getValueLengthInRange(n)<wz)return t.getModel().getValueInRange(n)}return null}var Xi=class SD extends V{constructor(e,i,n,s){super(),this._editor=e,this._findWidgetVisible=gr.bindTo(i),this._contextKeyService=i,this._storageService=n,this._clipboardService=s,this._updateHistoryDelayer=new Ha(500),this._state=this._register(new KH),this.loadQueryState(),this._register(this._state.onFindReplaceStateChange(r=>this._onStateChanged(r))),this._model=null,this._register(this._editor.onDidChangeModel(()=>{let r=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),r&&this._start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!1,updateSearchScope:!1,loop:this._editor.getOption(35).loop})}))}get editor(){return this._editor}static get(e){return e.getContribution(SD.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!!_f.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()}
602toggleSearchScope(){if(this._state.searchScope)this._state.change({searchScope:null},!0);else if(this._editor.hasModel()){let e=this._editor.getSelections();e.map(i=>(i.endColumn===1&&i.endLineNumber>i.startLineNumber&&(i=i.setEndPosition(i.endLineNumber-1,this._editor.getModel().getLineMaxColumn(i.endLineNumber-1))),i.isEmpty()?null:i)).filter(i=>!!i),e.length&&this._state.change({searchScope:e},!0)}}setSearchString(e){this._state.isRegex&&(e=Vn(e)),this._state.change({searchString:e},!1)}highlightFindOptions(e=!1){}_start(e,i){return oo(this,void 0,void 0,function*(){if(this.disposeModel(),!this._editor.hasModel())return;let n=Object.assign(Object.assign({},i),{isRevealed:!0});if(e.seedSearchStringFromSelection==="single"){let s=$1(this._editor,e.seedSearchStringFromSelection,e.seedSearchStringFromNonEmptySelection);s&&(this._state.isRegex?n.searchString=Vn(s):n.searchString=s)}else if(e.seedSearchStringFromSelection==="multiple"&&!e.updateSearchScope){let s=$1(this._editor,e.seedSearchStringFromSelection);s&&(n.searchString=s)}if(!n.searchString&&e.seedSearchStringFromGlobalClipboard){let s=yield this.getGlobalBufferTerm();if(!this._editor.hasModel())return;s&&(n.searchString=s)}if(e.forceRevealReplace||n.isReplaceRevealed?n.isReplaceRevealed=!0:this._findWidgetVisible.get()||(n.isReplaceRevealed=!1),e.updateSearchScope){let s=this._editor.getSelections();s.some(r=>!r.isEmpty())&&(n.searchScope=s)}n.loop=e.loop,this._state.change(n,!1),this._model||(this._model=new WH(this._editor,this._state))})}start(e,i){return this._start(e,i)}moveToNextMatch(){return this._model?(this._model.moveToNextMatch(),!0):!1}moveToPrevMatch(){return this._model?(this._model.moveToPrevMatch(),!0):!1}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 oo(this,void 0,void 0,function*(){return this._editor.getOption(35).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()?this._clipboardService.readFindText():""})}setGlobalBufferTerm(e){this._editor.getOption(35).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()&&this._clipboardService.writeFindText(e)}};Xi.ID="editor.contrib.findController";Xi=wD([Tn(1,Ie),Tn(2,N0),Tn(3,zh)],Xi);var K1=class extends Xi{constructor(e,i,n,s,r,o,a,l){super(e,n,a,l),this._contextViewService=i,this._keybindingService=s,this._themeService=r,this._notificationService=o,this._widget=null,this._findOptionsWidget=null}_start(e,i){const n=Object.create(null,{_start:{get:()=>super._start}});return oo(this,void 0,void 0,function*(){this._widget||this._createFindWidget();const s=this._editor.getSelection();let r=!1;switch(this._editor.getOption(35).autoFindInSelection){case"always":r=!0;break;case"never":r=!1;break;case"multiline":r=!!s&&s.startLineNumber!==s.endLineNumber}e.updateSearchScope=e.updateSearchScope||r,yield n._start.call(this,e,i),this._widget&&(e.shouldFocus===2?this._widget.focusReplaceInput():e.shouldFocus===1&&this._widget.focusFindInput())})}highlightFindOptions(e=!1){this._widget||this._createFindWidget(),this._state.isRevealed&&!e?this._widget.highlightFindOptions():this._findOptionsWidget.highlightFindOptions()}_createFindWidget(){this._widget=this._register(new CD(this._editor,this,this._state,this._contextViewService,this._keybindingService,this._contextKeyService,this._themeService,this._storageService,this._notificationService)),this._findOptionsWidget=this._register(new cD(this._editor,this._state,this._keybindingService,this._themeService))}};K1=wD([Tn(1,af),Tn(2,Ie),Tn(3,vi),Tn(4,et),Tn(5,wn),Tn(6,N0),Tn(7,zh)],K1);var Sz=M2(new T2({id:Se.StartFindAction,label:p("startFindAction","Find"),alias:"Find",precondition:Re.or(H.focus,Re.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2084,weight:100},menuOpts:{menuId:N.MenubarEditMenu,group:"3_find",title:p({key:"miFind",comment:["&& denotes a mnemonic"]},"&&Find"),order:1}}));Sz.addImplementation(0,(t,e,i)=>{const n=Xi.get(e);return n?n.start({forceRevealReplace:!1,seedSearchStringFromSelection:e.getOption(35).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:e.getOption(35).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:e.getOption(35).globalFindClipboard,shouldFocus:1,shouldAnimate:!0,updateSearchScope:!1,loop:e.getOption(35).loop}):!1});var yz={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:p("actions.find.isRegexOverride",`Overrides "Use Regular Expression" flag.
603The flag will not be saved for the future.
6040: Do Nothing
6051: True
6062: False`)},wholeWord:{type:"boolean"},wholeWordOverride:{type:"number",description:p("actions.find.wholeWordOverride",`Overrides "Match Whole Word" flag.
607The flag will not be saved for the future.
6080: Do Nothing
6091: True
6102: False`)},matchCase:{type:"boolean"},matchCaseOverride:{type:"number",description:p("actions.find.matchCaseOverride",`Overrides "Math Case" flag.
611The flag will not be saved for the future.
6120: Do Nothing
6131: True
6142: False`)},preserveCase:{type:"boolean"},preserveCaseOverride:{type:"number",description:p("actions.find.preserveCaseOverride",`Overrides "Preserve Case" flag.
615The flag will not be saved for the future.
6160: Do Nothing
6171: True
6182: False`)},findInSelection:{type:"boolean"}}}}]},Lz=class extends go{constructor(){super({id:Se.StartFindWithArgs,label:p("startFindWithArgsAction","Find With Arguments"),alias:"Find With Arguments",precondition:void 0,kbOpts:{kbExpr:null,primary:0,weight:100},description:yz})}run(t,e,i){return oo(this,void 0,void 0,function*(){const n=Xi.get(e);if(n){const s=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 n.start({forceRevealReplace:!1,seedSearchStringFromSelection:n.get
618State().searchString.length===0&&e.getOption(35).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:e.getOption(35).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:1,shouldAnimate:!0,updateSearchScope:i?.findInSelection||!1,loop:e.getOption(35).loop},s),n.setGlobalBufferTerm(n.getState().searchString)}})}},kz=class extends go{constructor(){super({id:Se.StartFindWithSelection,label:p("startFindWithSelectionAction","Find With Selection"),alias:"Find With Selection",precondition:void 0,kbOpts:{kbExpr:null,primary:0,mac:{primary:2083},weight:100}})}run(t,e){return oo(this,void 0,void 0,function*(){const i=Xi.get(e);i&&(yield i.start({forceRevealReplace:!1,seedSearchStringFromSelection:"multiple",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:e.getOption(35).loop}),i.setGlobalBufferTerm(i.getState().searchString))})}},yD=class extends go{run(t,e){return oo(this,void 0,void 0,function*(){const i=Xi.get(e);i&&!this._run(i)&&(yield i.start({forceRevealReplace:!1,seedSearchStringFromSelection:i.getState().searchString.length===0&&e.getOption(35).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:e.getOption(35).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:e.getOption(35).loop}),this._run(i))})}},xz=class extends yD{constructor(){super({id:Se.NextMatchFindAction,label:p("findNextMatchAction","Find Next"),alias:"Find Next",precondition:void 0,kbOpts:[{kbExpr:H.focus,primary:61,mac:{primary:2085,secondary:[61]},weight:100},{kbExpr:Re.and(H.focus,_f),primary:3,weight:100}]})}_run(t){return t.moveToNextMatch()?(t.editor.pushUndoStop(),!0):!1}},Iz=class extends yD{constructor(){super({id:Se.PreviousMatchFindAction,label:p("findPreviousMatchAction","Find Previous"),alias:"Find Previous",precondition:void 0,kbOpts:[{kbExpr:H.focus,primary:1085,mac:{primary:3109,secondary:[1085]},weight:100},{kbExpr:Re.and(H.focus,_f),primary:1027,weight:100}]})}_run(t){return t.moveToPrevMatch()}},LD=class extends go{run(t,e){return oo(this,void 0,void 0,function*(){const i=Xi.get(e);if(!i)return;const n=e.getOption(35).seedSearchStringFromSelection==="selection";let s=null;e.getOption(35).seedSearchStringFromSelection!=="never"&&(s=$1(e,"single",n)),s&&i.setSearchString(s),this._run(i)||(yield i.start({forceRevealReplace:!1,seedSearchStringFromSelection:e.getOption(35).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:n,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:e.getOption(35).loop}),this._run(i))})}},Ez=class extends LD{constructor(){super({id:Se.NextSelectionMatchFindAction,label:p("nextSelectionMatchFindAction","Find Next Selection"),alias:"Find Next Selection",precondition:void 0,kbOpts:{kbExpr:H.focus,primary:2109,weight:100}})}_run(t){return t.moveToNextMatch()}},Dz=class extends LD{constructor(){super({id:Se.PreviousSelectionMatchFindAction,label:p("previousSelectionMatchFindAction","Find Previous Selection"),alias:"Find Previous Selection",precondition:void 0,kbOpts:{kbExpr:H.focus,primary:3133,weight:100}})}_run(t){return t.moveToPrevMatch()}},Nz=M2(new T2({id:Se.StartFindReplaceAction,label:p("startReplace","Replace"),alias:"Replace",precondition:Re.or(H.focus,Re.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2086,mac:{primary:2596},weight:100},menuOpts:{menuId:N.MenubarEditMenu,group:"3_find",title:p({key:"miReplace",comment:["&& denotes a mnemonic"]},"&&Replace"),order:2}}));Nz.addImplementation(0,(t,e,i)=>{if(!e.hasModel()||e.getOption(81))return!1;const n=Xi.get(e);if(!n)return!1;const s=e.getSelection(),r=n.isFindInputFocused(),o=!s.isEmpty()&&s.startLineNumber===s.endLineNumber&&e.getOption(35).seedSearchStringFromSelection!=="never"&&!r,a=r||o?2:1;return n.start({forceRevealReplace:!0,seedSearchStringFromSelection:o?"single":"none",seedSearchStringFromNonEmptySelection:e.getOption(35).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:e.getOption(35).seedSearchStringFromSelection!=="never",shouldFocus:a,shouldAnimate:!0,updateSearchScope:!1,loop:e.getOption(35).loop})});Av(Xi.ID,K1);dr(Lz);dr(kz);dr(xz);dr(Iz);dr(Ez);dr(Dz);var Sn=Ph.bindToContribution(Xi.get);q(new Sn({id:Se.CloseFindWidgetCommand,precondition:gr,handler:t=>t.closeFindWidget(),kbOpts:{weight:105,kbExpr:Re.and(H.focus,Re.not("isComposing")),primary:9,secondary:[1033]}}));q(new Sn({id:Se.ToggleCaseSensitiveCommand,precondition:void 0,handler:t=>t.toggleCaseSensitive(),kbOpts:{weight:105,kbExpr:H.focus,primary:Pc.primary,mac:Pc.mac,win:Pc.win,linux:Pc.linux}}));q(new Sn({id:Se.ToggleWholeWordCommand,precondition:void 0,handler:t=>t.toggleWholeWords(),kbOpts:{weight:105,kbExpr:H.focus,primary:Fc.primary,mac:Fc.mac,win:Fc.win,linux:Fc.linux}}));q(new Sn({id:Se.ToggleRegexCommand,precondition:void 0,handler:t=>t.toggleRegex(),kbOpts:{weight:105,kbExpr:H.focus,primary:Bc.primary,mac:Bc.mac,win:Bc.win,linux:Bc.linux}}));q(new Sn({id:Se.ToggleSearchScopeCommand,precondition:void 0,handler:t=>t.toggleSearchScope(),kbOpts:{weight:105,kbExpr:H.focus,primary:Vc.primary,mac:Vc.mac,win:Vc.win,linux:Vc.linux}}));q(new Sn({id:Se.TogglePreserveCaseCommand,precondition:void 0,handler:t=>t.togglePreserveCase(),kbOpts:{weight:105,kbExpr:H.focus,primary:Wc.primary,mac:Wc.mac,win:Wc.win,linux:Wc.linux}}));
618q(new Sn({id:Se.ReplaceOneAction,precondition:gr,handler:t=>t.replace(),kbOpts:{weight:105,kbExpr:H.focus,primary:3094}}));q(new Sn({id:Se.ReplaceOneAction,precondition:gr,handler:t=>t.replace(),kbOpts:{weight:105,kbExpr:Re.and(H.focus,A0),primary:3}}));q(new Sn({id:Se.ReplaceAllAction,precondition:gr,handler:t=>t.replaceAll(),kbOpts:{weight:105,kbExpr:H.focus,primary:2563}}));q(new Sn({id:Se.ReplaceAllAction,precondition:gr,handler:t=>t.replaceAll(),kbOpts:{weight:105,kbExpr:Re.and(H.focus,A0),primary:void 0,mac:{primary:2051}}}));q(new Sn({id:Se.SelectAllMatchesAction,precondition:gr,handler:t=>t.selectAllMatches(),kbOpts:{weight:105,kbExpr:H.focus,primary:515}}));MD(),DD();ID();var Tz={__name:"index",props:{modelValue:{type:[String,Object,Array],default:()=>""},isBind:{type:Boolean,default:!1},height:{type:Number,default:400},language:{type:String,default:"javascript"},readonly:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const i=PD(),n=t,s=e,r=xD();let o;return TD(()=>{o=iD.create(r.value,{value:typeof n.modelValue=="string"?n.modelValue:B0(n.modelValue),tabSize:2,automaticLayout:!0,scrollBeyondLastLine:!1,language:n.language,theme:i.mode==="light"?"vs":"vs-dark",autoIndent:!0,minimap:{enabled:!1},readOnly:n.readonly,folding:!0,acceptSuggestionOnCommitCharacter:!0,acceptSuggestionOnEnter:!0,contextmenu:!0}),o.onDidChangeModelContent(()=>{s("update:modelValue",o.getValue())})}),n.isBind&&AD(()=>n.modelValue,a=>o.setValue(typeof a=="string"?a:B0(a))),(a,l)=>(ND(),ED("div",{class:"editor",ref_key:"dom",ref:r,style:RD("width: 100%; height: "+n.height+"px")},null,4))}},zK=OD(Tz,[["__scopeId","data-v-e8fad126"]]);export{zK as default,pH as t};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.