@fuma-content/studio 1.1.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/client/assets/{app-sidebar-DmZmaTFZ.js → app-sidebar-pNmserEz.js} +1 -1
- package/build/client/assets/{client-DCkt8g_f.js → client-CiKaCnwt.js} +2 -2
- package/build/client/assets/{client-CEEVDnpu.js → client-DQSIY5Q2.js} +141 -141
- package/build/client/assets/client-DoI_730h.js +39 -0
- package/build/client/assets/{context-menu-BKCfyZyn.js → context-menu-DmqgkYYt.js} +1 -1
- package/build/client/assets/{cssMode-DLORRHDr.js → cssMode-Coi5O5zy.js} +1 -1
- package/build/client/assets/entry.rsc-Dg8bPYHW.js +1 -0
- package/build/client/assets/{freemarker2-DaJ0VeUL.js → freemarker2-1O7dsC5n.js} +1 -1
- package/build/client/assets/{handlebars-DLHw1EEJ.js → handlebars-CV8AX3NZ.js} +1 -1
- package/build/client/assets/{html-O04EC3MX.js → html-Blvbrx_-.js} +1 -1
- package/build/client/assets/{htmlMode-DQ7y7lfT.js → htmlMode-C2GytKxI.js} +1 -1
- package/build/client/assets/{index-C0ecV8RK.js → index-BJkIIQzT.js} +1 -1
- package/build/client/assets/{index-DyfAV_di.js → index-BYgxF2sp.js} +1 -1
- package/build/client/assets/{index-DYGF1SVj.js → index-DaIko2JM.js} +1 -1
- package/build/client/assets/{index-B6b4_3Hd.js → index-DcOHxMKV.js} +1 -1
- package/build/client/assets/{index-BO1u3G9x.js → index-MJySYuke.js} +1 -1
- package/build/client/assets/{index-pxp216Su.js → index-ShKFcMvP.js} +1 -1
- package/build/client/assets/{index-SdiO_PfY.js → index-oqTiWTgb.js} +1 -1
- package/build/client/assets/{javascript-CrGLGAoQ.js → javascript-Bl1Q_Nkx.js} +1 -1
- package/build/client/assets/{jsonMode-CF67c9TM.js → jsonMode-Wb-dBUwH.js} +1 -1
- package/build/client/assets/{layout-DFh-gM7Y.js → layout-BLEhq2Xc.js} +1 -1
- package/build/client/assets/{liquid-CLUvqbUj.js → liquid-CRXJh1mG.js} +1 -1
- package/build/client/assets/{lspLanguageFeatures-C4ogykLr.js → lspLanguageFeatures-CBxjayZZ.js} +1 -1
- package/build/client/assets/{mdx-I5c0PFNf.js → mdx-C5mACBRu.js} +1 -1
- package/build/client/assets/{page-Cnp0usS5.js → page-CDAXLFEn.js} +1 -1
- package/build/client/assets/{page-vw-b-9V8.js → page-DH_hjJdm.js} +1 -1
- package/build/client/assets/{popover-BTaeGuVq.js → popover-BeYx_kX_.js} +1 -1
- package/build/client/assets/{python-9pLFSYtk.js → python-WC2gRa53.js} +1 -1
- package/build/client/assets/{razor-C1F71AoJ.js → razor-DtDoIoVr.js} +1 -1
- package/build/client/assets/{react-H1IN5wR7.js → react-Dk3PRQ9V.js} +2 -2
- package/build/client/assets/root-Bxrr2p-9.js +1 -0
- package/build/client/assets/{root-CquYm4yb.js → root-OdV9Gcaa.js} +1 -1
- package/build/client/assets/route-DoJXbWq2.js +1 -0
- package/build/client/assets/{router-DNbvCK8g.js → router-Ccb8Hbb0.js} +1 -1
- package/build/client/assets/{separator-QmXXuyOl.js → separator-Sua3PhYj.js} +1 -1
- package/build/client/assets/{site-header-pChVNzpf.js → site-header-Cyiy71CX.js} +1 -1
- package/build/client/assets/{spinner-Cs2baDxX.js → spinner-C1xi9J1T.js} +1 -1
- package/build/client/assets/{suspense-DqXzPoi1.js → suspense-Be4bKxiB.js} +1 -1
- package/build/client/assets/{tsMode-C27O5pAT.js → tsMode-C-5dlAKI.js} +1 -1
- package/build/client/assets/{typescript-CdWDFqnx.js → typescript-DtZ3r-8F.js} +1 -1
- package/build/client/assets/{xml-CyqvPPRa.js → xml-2JwqkWbu.js} +1 -1
- package/build/client/assets/{yaml-BReIckoY.js → yaml-B7FthBd9.js} +3 -3
- package/build/client/assets/{yaml-CIgtTHvG.js → yaml-B8ielN8F.js} +1 -1
- package/build/server/__ssr_build/__vite_rsc_assets_manifest.js +100 -100
- package/build/server/__ssr_build/assets/{client-DZ7MH4ui.js → client-BbQZwY1s.js} +1 -1
- package/build/server/__ssr_build/assets/{client-DIrftxPs.js → client-Dm8-2ev7.js} +183 -167
- package/build/server/__ssr_build/assets/{client-CoRUI7H1.js → client-aUUPy-yC.js} +46 -27
- package/build/server/__ssr_build/assets/{route-r7ypDwBC.js → route-D3n8i03R.js} +1 -1
- package/build/server/__ssr_build/index.js +4 -4
- package/build/server/__vite_rsc_assets_manifest.js +100 -100
- package/build/server/assets/{route-Be37zvut.js → route-BDaI_mx5.js} +1 -1
- package/build/server/index.js +5 -5
- package/dist/bin/cli.mjs +1 -3
- package/dist/bin/hocuspocus.mjs +1 -3
- package/dist/bin.mjs +1 -3
- package/dist/lib/yjs/index.mjs +3 -5
- package/dist/package.mjs +2 -3
- package/package.json +26 -26
- package/build/client/assets/client-B1Ov3B6B.js +0 -39
- package/build/client/assets/entry.rsc-D-AmsoFy.js +0 -1
- package/build/client/assets/root-tlv37SRw.js +0 -1
- package/build/client/assets/route-C720h6ya.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/cssMode-
|
|
2
|
-
import{r as At,W as Ib,_ as Se,h as hoe,j as vM}from"./react-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/cssMode-Coi5O5zy.js","assets/lspLanguageFeatures-CBxjayZZ.js","assets/react-Dk3PRQ9V.js","assets/client-DoI_730h.js","assets/index-BYgxF2sp.js","assets/index-BJkIIQzT.js","assets/index-oqTiWTgb.js","assets/mutex-yV3mxE7x.js","assets/htmlMode-C2GytKxI.js","assets/jsonMode-Wb-dBUwH.js","assets/tsMode-C-5dlAKI.js","assets/freemarker2-1O7dsC5n.js","assets/handlebars-CV8AX3NZ.js","assets/html-Blvbrx_-.js","assets/javascript-Bl1Q_Nkx.js","assets/typescript-DtZ3r-8F.js","assets/liquid-CRXJh1mG.js","assets/mdx-C5mACBRu.js","assets/python-WC2gRa53.js","assets/razor-DtDoIoVr.js","assets/xml-2JwqkWbu.js","assets/yaml-B8ielN8F.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as At,W as Ib,_ as Se,h as hoe,j as vM}from"./react-Dk3PRQ9V.js";import{d as uoe,l as goe}from"./client-DoI_730h.js";import{z as foe}from"./index-oqTiWTgb.js";import{m as dD,dJ as poe,n as hD,d0 as moe,d1 as _oe,t as boe,df as voe}from"./index-BYgxF2sp.js";import{c as Coe}from"./mutex-yV3mxE7x.js";function U6(o,e){(e==null||e>o.length)&&(e=o.length);for(var t=0,i=Array(e);t<e;t++)i[t]=o[t];return i}function woe(o){if(Array.isArray(o))return o}function Soe(o,e,t){return(e=Eoe(e))in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function yoe(o,e){var t=o==null?null:typeof Symbol<"u"&&o[Symbol.iterator]||o["@@iterator"];if(t!=null){var i,n,s,r,a=[],l=!0,c=!1;try{if(s=(t=t.call(o)).next,e!==0)for(;!(l=(i=s.call(t)).done)&&(a.push(i.value),a.length!==e);l=!0);}catch(d){c=!0,n=d}finally{try{if(!l&&t.return!=null&&(r=t.return(),Object(r)!==r))return}finally{if(c)throw n}}return a}}function Loe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3
3
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $6(o,e){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(o);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(o,n).enumerable})),t.push.apply(t,i)}return t}function j6(o){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?$6(Object(t),!0).forEach(function(i){Soe(o,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(t)):$6(Object(t)).forEach(function(i){Object.defineProperty(o,i,Object.getOwnPropertyDescriptor(t,i))})}return o}function xoe(o,e){if(o==null)return{};var t,i,n=Doe(o,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(o);for(i=0;i<s.length;i++)t=s[i],e.indexOf(t)===-1&&{}.propertyIsEnumerable.call(o,t)&&(n[t]=o[t])}return n}function Doe(o,e){if(o==null)return{};var t={};for(var i in o)if({}.hasOwnProperty.call(o,i)){if(e.indexOf(i)!==-1)continue;t[i]=o[i]}return t}function koe(o,e){return woe(o)||yoe(o,e)||Noe(o,e)||Loe()}function Ioe(o,e){if(typeof o!="object"||!o)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var i=t.call(o,e);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}function Eoe(o){var e=Ioe(o,"string");return typeof e=="symbol"?e:e+""}function Noe(o,e){if(o){if(typeof o=="string")return U6(o,e);var t={}.toString.call(o).slice(8,-1);return t==="Object"&&o.constructor&&(t=o.constructor.name),t==="Map"||t==="Set"?Array.from(o):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?U6(o,e):void 0}}function Toe(o,e,t){return e in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function q6(o,e){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(o);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(o,n).enumerable})),t.push.apply(t,i)}return t}function K6(o){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?q6(Object(t),!0).forEach(function(i){Toe(o,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(t)):q6(Object(t)).forEach(function(i){Object.defineProperty(o,i,Object.getOwnPropertyDescriptor(t,i))})}return o}function Roe(){for(var o=arguments.length,e=new Array(o),t=0;t<o;t++)e[t]=arguments[t];return function(i){return e.reduceRight(function(n,s){return s(n)},i)}}function bw(o){return function e(){for(var t=this,i=arguments.length,n=new Array(i),s=0;s<i;s++)n[s]=arguments[s];return n.length>=o.length?o.apply(this,n):function(){for(var r=arguments.length,a=new Array(r),l=0;l<r;l++)a[l]=arguments[l];return e.apply(t,[].concat(n,a))}}}function uD(o){return{}.toString.call(o).includes("Object")}function Moe(o){return!Object.keys(o).length}function J1(o){return typeof o=="function"}function Poe(o,e){return Object.prototype.hasOwnProperty.call(o,e)}function Aoe(o,e){return uD(e)||fu("changeType"),Object.keys(e).some(function(t){return!Poe(o,t)})&&fu("changeField"),e}function Ooe(o){J1(o)||fu("selectorType")}function Foe(o){J1(o)||uD(o)||fu("handlerType"),uD(o)&&Object.values(o).some(function(e){return!J1(e)})&&fu("handlersType")}function Woe(o){o||fu("initialIsRequired"),uD(o)||fu("initialType"),Moe(o)&&fu("initialContent")}function Boe(o,e){throw new Error(o[e]||o.default)}var Hoe={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},fu=bw(Boe)(Hoe),jy={changes:Aoe,selector:Ooe,handler:Foe,initial:Woe};function Voe(o){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};jy.initial(o),jy.handler(e);var t={current:o},i=bw($oe)(t,e),n=bw(Uoe)(t),s=bw(jy.changes)(o),r=bw(zoe)(t);function a(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(d){return d};return jy.selector(c),c(t.current)}function l(c){Roe(i,n,s,r)(c)}return[a,l]}function zoe(o,e){return J1(e)?e(o.current):e}function Uoe(o,e){return o.current=K6(K6({},o.current),e),e}function $oe(o,e,t){return J1(e)?e(o.current):Object.keys(t).forEach(function(i){var n;return(n=e[i])===null||n===void 0?void 0:n.call(e,o.current[i])}),t}var joe={create:Voe},qoe={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs"}};function Koe(o){return function e(){for(var t=this,i=arguments.length,n=new Array(i),s=0;s<i;s++)n[s]=arguments[s];return n.length>=o.length?o.apply(this,n):function(){for(var r=arguments.length,a=new Array(r),l=0;l<r;l++)a[l]=arguments[l];return e.apply(t,[].concat(n,a))}}}function Goe(o){return{}.toString.call(o).includes("Object")}function Zoe(o){return o||G6("configIsRequired"),Goe(o)||G6("configType"),o.urls?(Yoe(),{paths:{vs:o.urls.monacoBase}}):o}function Yoe(){console.warn(VG.deprecation)}function Xoe(o,e){throw new Error(o[e]||o.default)}var VG={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
|
|
4
4
|
You are using deprecated way of configuration.
|
|
5
5
|
|
|
@@ -911,7 +911,7 @@ ${l}
|
|
|
911
911
|
`):void 0}:{range:D.fromPositions(this.position),text:"",rejectReason:t.length>0?t.join(`
|
|
912
912
|
`):void 0}}async provideRenameEdits(e,t){return this._provideRenameEdits(e,this._providerRenameIdx,[],t)}async _provideRenameEdits(e,t,i,n){const s=this._providers[t];if(!s)return{edits:[],rejectReason:i.join(`
|
|
913
913
|
`)};const r=await s.provideRenameEdits(this.model,this.position,e,n);if(r){if(r.rejectReason)return this._provideRenameEdits(e,t+1,i.concat(r.rejectReason),n)}else return this._provideRenameEdits(e,t+1,i.concat(m(1380,"No result.")),n);return r}}async function H7e(o,e,t,i){const n=new YH(e,t,o),s=await n.resolveRenameLocation(qe.None);return s?.rejectReason?{edits:[],rejectReason:s.rejectReason}:n.provideRenameEdits(i,qe.None)}var Kp;let og=(Kp=class{static get(e){return e.getContribution(E9.ID)}constructor(e,t,i,n,s,r,a,l){this.editor=e,this._instaService=t,this._notificationService=i,this._bulkEditService=n,this._progressService=s,this._logService=r,this._configService=a,this._languageFeaturesService=l,this._disposableStore=new U,this._cts=new ei,this._renameWidget=this._disposableStore.add(this._instaService.createInstance(I9,this.editor,["acceptRenameInput","acceptRenameInputWithPreview"]))}dispose(){this._disposableStore.dispose(),this._cts.dispose(!0)}async run(){const e=this._logService.trace.bind(this._logService,"[rename]");if(this._cts.dispose(!0),this._cts=new ei,!this.editor.hasModel()){e("editor has no model");return}const t=this.editor.getPosition(),i=new YH(this.editor.getModel(),t,this._languageFeaturesService.renameProvider);if(!i.hasProvider()){e("skeleton has no provider");return}const n=new ah(this.editor,5,void 0,this._cts.token);let s;try{e("resolving rename location");const f=i.resolveRenameLocation(n.token);this._progressService.showWhile(f,250),s=await f,e("resolved rename location")}catch(f){f instanceof Kr?e("resolve rename location cancelled",JSON.stringify(f,null," ")):(e("resolve rename location failed",f instanceof Error?f:JSON.stringify(f,null," ")),(typeof f=="string"||$d(f))&&Mo.get(this.editor)?.showMessage(f||m(1381,"An unknown error occurred while resolving rename location"),t));return}finally{n.dispose()}if(!s){e("returning early - no loc");return}if(s.rejectReason){e(`returning early - rejected with reason: ${s.rejectReason}`,s.rejectReason),Mo.get(this.editor)?.showMessage(s.rejectReason,t);return}if(n.token.isCancellationRequested){e("returning early - cts1 cancelled");return}const r=new ah(this.editor,5,s.range,this._cts.token),a=this.editor.getModel(),l=this._languageFeaturesService.newSymbolNamesProvider.all(a),c=await Promise.all(l.map(async f=>[f,await f.supportsAutomaticNewSymbolNamesTriggerKind??!1])),d=(f,p)=>{let _=c.slice();return f===rS.Automatic&&(_=_.filter(([b,v])=>v)),_.map(([b])=>b.provideNewSymbolNames(a,s.range,f,p))};e("creating rename input field and awaiting its result");const h=this._bulkEditService.hasPreviewHandler()&&this._configService.getValue(this.editor.getModel().uri,"editor.rename.enablePreview"),u=await this._renameWidget.getInput(s.range,s.text,h,l.length>0?d:void 0,r);if(e("received response from rename input field"),typeof u=="boolean"){e(`returning early - rename input field response - ${u}`),u&&this.editor.focus(),r.dispose();return}this.editor.focus(),e("requesting rename edits");const g=Dv(i.provideRenameEdits(u.newName,r.token),r.token).then(async f=>{if(!f){e("returning early - no rename edits result");return}if(!this.editor.hasModel()){e("returning early - no model after rename edits are provided");return}if(f.rejectReason){e(`returning early - rejected with reason: ${f.rejectReason}`),this._notificationService.info(f.rejectReason);return}this.editor.setSelection(D.fromPositions(this.editor.getSelection().getPosition())),e("applying edits"),this._bulkEditService.apply(f,{editor:this.editor,showPreview:u.wantsPreview,label:m(1382,"Renaming '{0}' to '{1}'",s?.text,u.newName),code:"undoredo.rename",quotableLabel:m(1383,"Renaming {0} to {1}",s?.text,u.newName),respectAutoSaveConfig:!0,reason:ts.rename()}).then(p=>{e("edits applied"),p.ariaSummary&&js(m(1384,"Successfully renamed '{0}' to '{1}'. Summary: {2}",s.text,u.newName,p.ariaSummary))}).catch(p=>{e(`error when applying edits ${JSON.stringify(p,null," ")}`),this._notificationService.error(m(1385,"Rename failed to apply edits")),this._logService.error(p)})},f=>{e("error when providing rename edits",JSON.stringify(f,null," ")),this._notificationService.error(m(1386,"Rename failed to compute edits")),this._logService.error(f)}).finally(()=>{r.dispose()});return e("returning rename operation"),this._progressService.showWhile(g,250),g}acceptRenameInput(e){this._renameWidget.acceptInput(e)}cancelRenameInput(){this._renameWidget.cancelInput(!0,"cancelRenameInput command")}focusNextRenameSuggestion(){this._renameWidget.focusNextRenameSuggestion()}focusPreviousRenameSuggestion(){this._renameWidget.focusPreviousRenameSuggestion()}},E9=Kp,Kp.ID="editor.contrib.renameController",Kp);og=E9=B7e([Pg(1,me),Pg(2,Li),Pg(3,Cy),Pg(4,oh),Pg(5,Ut),Pg(6,YT),Pg(7,ue)],og);class V7e extends de{constructor(){super({id:"editor.action.rename",label:H(1388,"Rename Symbol"),precondition:K.and(T.writable,T.hasRenameProvider),kbOpts:{kbExpr:T.editorTextFocus,primary:60,weight:100},contextMenuOpts:{group:"1_modification",order:1.1},canTriggerInlineEdits:!0})}runCommand(e,t){const i=e.get(lt),[n,s]=Array.isArray(t)&&t||[void 0,void 0];return ve.isUri(n)&&M.isIPosition(s)?i.openCodeEditor({resource:n},i.getActiveCodeEditor()).then(r=>{r&&(r.setPosition(s),r.invokeWithinContext(a=>(this.reportTelemetry(a,r),this.run(a,r))))},Me):super.runCommand(e,t)}run(e,t){const i=e.get(Ut),n=og.get(t);return n?(i.trace("[RenameAction] got controller, running..."),n.run()):(i.trace("[RenameAction] returning early - controller missing"),Promise.resolve())}}ot(og.ID,og,4);oe(V7e);const XH=an.bindToContribution(og.get);re(new XH({id:"acceptRenameInput",precondition:MC,handler:o=>o.acceptRenameInput(!1),kbOpts:{weight:199,kbExpr:K.and(T.focus,K.not("isComposing")),primary:3}}));re(new XH({id:"acceptRenameInputWithPreview",precondition:K.and(MC,K.has("config.editor.rename.enablePreview")),handler:o=>o.acceptRenameInput(!0),kbOpts:{weight:199,kbExpr:K.and(T.focus,K.not("isComposing")),primary:2051}}));re(new XH({id:"cancelRenameInput",precondition:MC,handler:o=>o.cancelRenameInput(),kbOpts:{weight:199,kbExpr:T.focus,primary:9,secondary:[1033]}}));xt(class extends xn{constructor(){super({id:"focusNextRenameSuggestion",title:{...H(1389,"Focus Next Rename Suggestion")},precondition:MC,keybinding:[{primary:18,weight:199}]})}run(e){const t=e.get(lt).getFocusedCodeEditor();if(!t)return;const i=og.get(t);i&&i.focusNextRenameSuggestion()}});xt(class extends xn{constructor(){super({id:"focusPreviousRenameSuggestion",title:{...H(1390,"Focus Previous Rename Suggestion")},precondition:MC,keybinding:[{primary:16,weight:199}]})}run(e){const t=e.get(lt).getFocusedCodeEditor();if(!t)return;const i=og.get(t);i&&i.focusPreviousRenameSuggestion()}});mo("_executeDocumentRenameProvider",function(o,e,t,...i){const[n]=i;at(typeof n=="string");const{renameProvider:s}=o.get(ue);return H7e(s,e,t,n)});mo("_executePrepareRename",async function(o,e,t){const{renameProvider:i}=o.get(ue),s=await new YH(e,t,i).resolveRenameLocation(qe.None);if(s?.rejectReason)throw new Error(s.rejectReason);return s});gi.as(wl.Configuration).registerConfiguration({id:"editor",properties:{"editor.rename.enablePreview":{scope:6,description:m(1387,"Enable/disable the ability to preview changes before renaming"),default:!0,type:"boolean"}}});var z7e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},hG=function(o,e){return function(t,i){e(t,i,o)}},_v;let yE=(_v=class extends F{constructor(e,t,i){super(),this.editor=e,this.languageConfigurationService=t,this.editorWorkerService=i,this.decorations=this.editor.createDecorationsCollection(),this.options=this.createOptions(e.getOption(81)),this.computePromise=null,this.currentOccurrences={},this._register(e.onDidChangeModel(n=>{this.currentOccurrences={},this.options=this.createOptions(e.getOption(81)),this.stop(),this.computeSectionHeaders.schedule(0)})),this._register(e.onDidChangeModelLanguage(n=>{this.currentOccurrences={},this.options=this.createOptions(e.getOption(81)),this.stop(),this.computeSectionHeaders.schedule(0)})),this._register(t.onDidChange(n=>{const s=this.editor.getModel()?.getLanguageId();s&&n.affects(s)&&(this.currentOccurrences={},this.options=this.createOptions(e.getOption(81)),this.stop(),this.computeSectionHeaders.schedule(0))})),this._register(e.onDidChangeConfiguration(n=>{this.options&&!n.hasChanged(81)||(this.options=this.createOptions(e.getOption(81)),this.updateDecorations([]),this.stop(),this.computeSectionHeaders.schedule(0))})),this._register(this.editor.onDidChangeModelContent(n=>{this.computeSectionHeaders.schedule()})),this._register(e.onDidChangeModelTokens(n=>{this.computeSectionHeaders.isScheduled()||this.computeSectionHeaders.schedule(1e3)})),this.computeSectionHeaders=this._register(new Et(()=>{this.findSectionHeaders()},250)),this.computeSectionHeaders.schedule(0)}createOptions(e){if(!e||!this.editor.hasModel())return;const t=this.editor.getModel().getLanguageId();if(!t)return;const i=this.languageConfigurationService.getLanguageConfiguration(t).comments,n=this.languageConfigurationService.getLanguageConfiguration(t).foldingRules;if(!(!i&&!n?.markers))return{foldingRules:n,markSectionHeaderRegex:e.markSectionHeaderRegex,findMarkSectionHeaders:e.showMarkSectionHeaders,findRegionSectionHeaders:e.showRegionSectionHeaders}}findSectionHeaders(){if(!this.editor.hasModel()||!this.options?.findMarkSectionHeaders&&!this.options?.findRegionSectionHeaders)return;const e=this.editor.getModel();if(e.isDisposed()||e.isTooLargeForSyncing())return;const t=e.getVersionId();this.editorWorkerService.findSectionHeaders(e.uri,this.options).then(i=>{e.isDisposed()||e.getVersionId()!==t||this.updateDecorations(i)})}updateDecorations(e){const t=this.editor.getModel();t&&(e=e.filter(s=>{if(!s.shouldBeInComments)return!0;const r=t.validateRange(s.range),a=t.tokenization.getLineTokens(r.startLineNumber),l=a.findTokenIndexAtOffset(r.startColumn-1),c=a.getStandardTokenType(l);return a.getLanguageId(l)===t.getLanguageId()&&c===1}));const i=Object.values(this.currentOccurrences).map(s=>s.decorationId),n=e.map(s=>U7e(s));this.editor.changeDecorations(s=>{const r=s.deltaDecorations(i,n);this.currentOccurrences={};for(let a=0,l=r.length;a<l;a++){const c={sectionHeader:e[a],decorationId:r[a]};this.currentOccurrences[c.decorationId]=c}})}stop(){this.computeSectionHeaders.cancel(),this.computePromise&&(this.computePromise.cancel(),this.computePromise=null)}dispose(){super.dispose(),this.stop(),this.decorations.clear()}},_v.ID="editor.sectionHeaderDetector",_v);yE=z7e([hG(1,ai),hG(2,_o)],yE);function U7e(o){return{range:o.range,options:Ae.createDynamic({description:"section-header",stickiness:3,collapseOnReplaceEdit:!0,minimap:{color:void 0,position:1,sectionHeaderStyle:o.hasSeparatorLine?2:1,sectionHeaderText:o.text}})}}ot(yE.ID,yE,1);function $7e(o){for(let e=0,t=o.length;e<t;e+=4){const i=o[e+0],n=o[e+1],s=o[e+2],r=o[e+3];o[e+0]=r,o[e+1]=s,o[e+2]=n,o[e+3]=i}}function j7e(o){const e=new Uint8Array(o.buffer,o.byteOffset,o.length*4);return rZ()||$7e(e),mu.wrap(e)}function zne(o){const e=new Uint32Array(q7e(o));let t=0;if(e[t++]=o.id,o.type==="full")e[t++]=1,e[t++]=o.data.length,e.set(o.data,t),t+=o.data.length;else{e[t++]=2,e[t++]=o.deltas.length;for(const i of o.deltas)e[t++]=i.start,e[t++]=i.deleteCount,i.data?(e[t++]=i.data.length,e.set(i.data,t),t+=i.data.length):e[t++]=0}return j7e(e)}function q7e(o){let e=0;if(e+=2,o.type==="full")e+=1+o.data.length;else{e+=1,e+=3*o.deltas.length;for(const t of o.deltas)t.data&&(e+=t.data.length)}return e}function tM(o){return o&&!!o.data}function Une(o){return o&&Array.isArray(o.edits)}class K7e{constructor(e,t,i){this.provider=e,this.tokens=t,this.error=i}}function $ne(o,e){return o.has(e)}function G7e(o,e){const t=o.orderedGroups(e);return t.length>0?t[0]:[]}async function jne(o,e,t,i,n){const s=G7e(o,e),r=await Promise.all(s.map(async a=>{let l,c=null;try{l=await a.provideDocumentSemanticTokens(e,a===t?i:null,n)}catch(d){c=d,l=null}return(!l||!tM(l)&&!Une(l))&&(l=null),new K7e(a,l,c)}));for(const a of r){if(a.error)throw a.error;if(a.tokens)return a}return r.length>0?r[0]:null}function Z7e(o,e){const t=o.orderedGroups(e);return t.length>0?t[0]:null}class Y7e{constructor(e,t){this.provider=e,this.tokens=t}}function X7e(o,e){return o.has(e)}function qne(o,e){const t=o.orderedGroups(e);return t.length>0?t[0]:[]}async function QH(o,e,t,i){const n=qne(o,e),s=await Promise.all(n.map(async r=>{let a;try{a=await r.provideDocumentRangeSemanticTokens(e,t,i)}catch(l){zi(l),a=null}return(!a||!tM(a))&&(a=null),new Y7e(r,a)}));for(const r of s)if(r.tokens)return r;return s.length>0?s[0]:null}st.registerCommand("_provideDocumentSemanticTokensLegend",async(o,...e)=>{const[t]=e;at(t instanceof ve);const i=o.get(ri).getModel(t);if(!i)return;const{documentSemanticTokensProvider:n}=o.get(ue),s=Z7e(n,i);return s?s[0].getLegend():o.get($t).executeCommand("_provideDocumentRangeSemanticTokensLegend",t)});st.registerCommand("_provideDocumentSemanticTokens",async(o,...e)=>{const[t]=e;at(t instanceof ve);const i=o.get(ri).getModel(t);if(!i)return;const{documentSemanticTokensProvider:n}=o.get(ue);if(!$ne(n,i))return o.get($t).executeCommand("_provideDocumentRangeSemanticTokens",t,i.getFullModelRange());const s=await jne(n,i,null,null,qe.None);if(!s)return;const{provider:r,tokens:a}=s;if(!a||!tM(a))return;const l=zne({id:0,type:"full",data:a.data});return a.resultId&&r.releaseDocumentSemanticTokens(a.resultId),l});st.registerCommand("_provideDocumentRangeSemanticTokensLegend",async(o,...e)=>{const[t,i]=e;at(t instanceof ve);const n=o.get(ri).getModel(t);if(!n)return;const{documentRangeSemanticTokensProvider:s}=o.get(ue),r=qne(s,n);if(r.length===0)return;if(r.length===1)return r[0].getLegend();if(!i||!D.isIRange(i))return console.warn("provideDocumentRangeSemanticTokensLegend might be out-of-sync with provideDocumentRangeSemanticTokens unless a range argument is passed in"),r[0].getLegend();const a=await QH(s,n,D.lift(i),qe.None);if(a)return a.provider.getLegend()});st.registerCommand("_provideDocumentRangeSemanticTokens",async(o,...e)=>{const[t,i]=e;at(t instanceof ve),at(D.isIRange(i));const n=o.get(ri).getModel(t);if(!n)return;const{documentRangeSemanticTokensProvider:s}=o.get(ue),r=await QH(s,n,D.lift(i),qe.None);if(!(!r||!r.tokens))return zne({id:0,type:"full",data:r.tokens.data})});const JH="editor.semanticHighlighting";function rD(o,e,t){const i=t.getValue(JH,{overrideIdentifier:o.getLanguageId(),resource:o.uri})?.enabled;return typeof i=="boolean"?i:e.getColorTheme().semanticHighlighting}var Kne=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Yl=function(o,e){return function(t,i){e(t,i,o)}},Th;let N9=class extends F{constructor(e,t,i,n,s,r){super(),this._watchers=new Ai;const a=d=>{this._watchers.get(d.uri)?.dispose(),this._watchers.set(d.uri,new T9(d,e,i,s,r))},l=(d,h)=>{h.dispose(),this._watchers.delete(d.uri)},c=()=>{for(const d of t.getModels()){const h=this._watchers.get(d.uri);rD(d,i,n)?h||a(d):h&&l(d,h)}};t.getModels().forEach(d=>{rD(d,i,n)&&a(d)}),this._register(t.onModelAdded(d=>{rD(d,i,n)&&a(d)})),this._register(t.onModelRemoved(d=>{const h=this._watchers.get(d.uri);h&&l(d,h)})),this._register(n.onDidChangeConfiguration(d=>{d.affectsConfiguration(JH)&&c()})),this._register(i.onDidColorThemeChange(c))}dispose(){wt(this._watchers.values()),this._watchers.clear(),super.dispose()}};N9=Kne([Yl(0,mR),Yl(1,ri),Yl(2,fi),Yl(3,We),Yl(4,sa),Yl(5,ue)],N9);var Vu;let T9=(Vu=class extends F{constructor(e,t,i,n,s){super(),this._semanticTokensStylingService=t,this._isDisposed=!1,this._model=e,this._provider=s.documentSemanticTokensProvider,this._debounceInformation=n.for(this._provider,"DocumentSemanticTokens",{min:Th.REQUEST_MIN_DELAY,max:Th.REQUEST_MAX_DELAY}),this._fetchDocumentSemanticTokens=this._register(new Et(()=>this._fetchDocumentSemanticTokensNow(),Th.REQUEST_MIN_DELAY)),this._currentDocumentResponse=null,this._currentDocumentRequestCancellationTokenSource=null,this._documentProvidersChangeListeners=[],this._providersChangedDuringRequest=!1,this._register(this._model.onDidChangeContent(()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(this._model.onDidChangeAttached(()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(this._model.onDidChangeLanguage(()=>{this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(0)}));const r=()=>{wt(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[];for(const a of this._provider.all(e))typeof a.onDidChange=="function"&&this._documentProvidersChangeListeners.push(a.onDidChange(()=>{if(this._currentDocumentRequestCancellationTokenSource){this._providersChangedDuringRequest=!0;return}this._fetchDocumentSemanticTokens.schedule(0)}))};r(),this._register(this._provider.onDidChange(()=>{r(),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(i.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),wt(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[],this._setDocumentSemanticTokens(null,null,null,[]),this._isDisposed=!0,super.dispose()}_fetchDocumentSemanticTokensNow(){if(this._currentDocumentRequestCancellationTokenSource)return;if(!$ne(this._provider,this._model)){this._currentDocumentResponse&&this._model.tokenization.setSemanticTokens(null,!1);return}if(!this._model.isAttachedToEditor())return;const e=new ei,t=this._currentDocumentResponse?this._currentDocumentResponse.provider:null,i=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,n=jne(this._provider,this._model,t,i,e.token);this._currentDocumentRequestCancellationTokenSource=e,this._providersChangedDuringRequest=!1;const s=[],r=this._model.onDidChangeContent(l=>{s.push(l)}),a=new _n(!1);n.then(l=>{if(this._debounceInformation.update(this._model,a.elapsed()),this._currentDocumentRequestCancellationTokenSource=null,r.dispose(),!l)this._setDocumentSemanticTokens(null,null,null,s);else{const{provider:c,tokens:d}=l,h=this._semanticTokensStylingService.getStyling(c);this._setDocumentSemanticTokens(c,d||null,h,s)}},l=>{l&&(Cr(l)||typeof l.message=="string"&&l.message.indexOf("busy")!==-1)||Me(l),this._currentDocumentRequestCancellationTokenSource=null,r.dispose(),(s.length>0||this._providersChangedDuringRequest)&&(this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model)))})}static _copy(e,t,i,n,s){s=Math.min(s,i.length-n,e.length-t);for(let r=0;r<s;r++)i[n+r]=e[t+r]}_setDocumentSemanticTokens(e,t,i,n){const s=this._currentDocumentResponse,r=()=>{(n.length>0||this._providersChangedDuringRequest)&&!this._fetchDocumentSemanticTokens.isScheduled()&&this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))};if(this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._isDisposed){e&&t&&e.releaseDocumentSemanticTokens(t.resultId);return}if(!e||!i){this._model.tokenization.setSemanticTokens(null,!1);return}if(!t){this._model.tokenization.setSemanticTokens(null,!0),r();return}if(Une(t)){if(!s){this._model.tokenization.setSemanticTokens(null,!0);return}if(t.edits.length===0)t={resultId:t.resultId,data:s.data};else{let a=0;for(const u of t.edits)a+=(u.data?u.data.length:0)-u.deleteCount;const l=s.data,c=new Uint32Array(l.length+a);let d=l.length,h=c.length;for(let u=t.edits.length-1;u>=0;u--){const g=t.edits[u];if(g.start>l.length){i.warnInvalidEditStart(s.resultId,t.resultId,u,g.start,l.length),this._model.tokenization.setSemanticTokens(null,!0);return}const f=d-(g.start+g.deleteCount);f>0&&(Th._copy(l,d-f,c,h-f,f),h-=f),g.data&&(Th._copy(g.data,0,c,h-g.data.length,g.data.length),h-=g.data.length),d=g.start}d>0&&Th._copy(l,0,c,0,d),t={resultId:t.resultId,data:c}}}if(tM(t)){this._currentDocumentResponse=new Q7e(e,t.resultId,t.data);const a=GQ(t,i,this._model.getLanguageId());if(n.length>0)for(const l of n)for(const c of a)for(const d of l.changes)c.applyEdit(d.range,d.text);this._model.tokenization.setSemanticTokens(a,!0)}else this._model.tokenization.setSemanticTokens(null,!0);r()}},Th=Vu,Vu.REQUEST_MIN_DELAY=300,Vu.REQUEST_MAX_DELAY=2e3,Vu);T9=Th=Kne([Yl(1,mR),Yl(2,fi),Yl(3,sa),Yl(4,ue)],T9);class Q7e{constructor(e,t,i){this.provider=e,this.resultId=t,this.data=i}dispose(){this.provider.releaseDocumentSemanticTokens(this.resultId)}}IC(N9);var J7e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},_w=function(o,e){return function(t,i){e(t,i,o)}},bv;let LE=(bv=class extends F{constructor(e,t,i,n,s,r){super(),this._semanticTokensStylingService=t,this._themeService=i,this._configurationService=n,this._editor=e,this._provider=r.documentRangeSemanticTokensProvider,this._debounceInformation=s.for(this._provider,"DocumentRangeSemanticTokens",{min:100,max:500}),this._tokenizeViewport=this._register(new Et(()=>this._tokenizeViewportNow(),100)),this._outstandingRequests=[],this._rangeProvidersChangeListeners=[];const a=()=>{this._editor.hasModel()&&this._tokenizeViewport.schedule(this._debounceInformation.get(this._editor.getModel()))},l=()=>{if(this._cleanupProviderListeners(),this._editor.hasModel()){const c=this._editor.getModel();for(const d of this._provider.all(c)){const h=d.onDidChange?.(()=>{this._cancelAll(),a()});h&&this._rangeProvidersChangeListeners.push(h)}}};this._register(this._editor.onDidScrollChange(()=>{a()})),this._register(this._editor.onDidChangeModel(()=>{l(),this._cancelAll(),a()})),this._register(this._editor.onDidChangeModelLanguage(()=>{l(),this._cancelAll(),a()})),this._register(this._editor.onDidChangeModelContent(c=>{this._cancelAll(),a()})),l(),this._register(this._provider.onDidChange(()=>{l(),this._cancelAll(),a()})),this._register(this._configurationService.onDidChangeConfiguration(c=>{c.affectsConfiguration(JH)&&(this._cancelAll(),a())})),this._register(this._themeService.onDidColorThemeChange(()=>{this._cancelAll(),a()})),a()}dispose(){this._cleanupProviderListeners(),super.dispose()}_cleanupProviderListeners(){wt(this._rangeProvidersChangeListeners),this._rangeProvidersChangeListeners=[]}_cancelAll(){for(const e of this._outstandingRequests)e.cancel();this._outstandingRequests=[]}_removeOutstandingRequest(e){for(let t=0,i=this._outstandingRequests.length;t<i;t++)if(this._outstandingRequests[t]===e){this._outstandingRequests.splice(t,1);return}}_tokenizeViewportNow(){if(!this._editor.hasModel())return;const e=this._editor.getModel();if(e.tokenization.hasCompleteSemanticTokens())return;if(!rD(e,this._themeService,this._configurationService)){e.tokenization.hasSomeSemanticTokens()&&e.tokenization.setSemanticTokens(null,!1);return}if(!X7e(this._provider,e)){e.tokenization.hasSomeSemanticTokens()&&e.tokenization.setSemanticTokens(null,!1);return}const t=this._editor.getVisibleRangesPlusViewportAboveBelow();this._outstandingRequests=this._outstandingRequests.concat(t.map(i=>this._requestRange(e,i)))}_requestRange(e,t){const i=e.getVersionId(),n=nn(r=>Promise.resolve(QH(this._provider,e,t,r))),s=new _n(!1);return n.then(r=>{if(this._debounceInformation.update(e,s.elapsed()),!r||!r.tokens||e.isDisposed()||e.getVersionId()!==i)return;const{provider:a,tokens:l}=r,c=this._semanticTokensStylingService.getStyling(a);e.tokenization.setPartialSemanticTokens(t,GQ(l,c,e.getLanguageId()))}).then(()=>this._removeOutstandingRequest(n),()=>this._removeOutstandingRequest(n)),n}},bv.ID="editor.contrib.viewportSemanticTokens",bv);LE=J7e([_w(1,mR),_w(2,fi),_w(3,We),_w(4,sa),_w(5,ue)],LE);ot(LE.ID,LE,1);class e9e{constructor(e=!0){this.selectSubwords=e}provideSelectionRanges(e,t){const i=[];for(const n of t){const s=[];i.push(s),this.selectSubwords&&this._addInWordRanges(s,e,n),this._addWordRanges(s,e,n),this._addWhitespaceLine(s,e,n),s.push({range:e.getFullModelRange()})}return i}_addInWordRanges(e,t,i){const n=t.getWordAtPosition(i);if(!n)return;const{word:s,startColumn:r}=n,a=i.column-r;let l=a,c=a,d=0;for(;l>=0;l--){const h=s.charCodeAt(l);if(l!==a&&(h===95||h===45))break;if(Xh(h)&&Kl(d))break;d=h}for(l+=1;c<s.length;c++){const h=s.charCodeAt(c);if(Kl(h)&&Xh(d))break;if(h===95||h===45)break;d=h}l<c&&e.push({range:new D(i.lineNumber,r+l,i.lineNumber,r+c)})}_addWordRanges(e,t,i){const n=t.getWordAtPosition(i);n&&e.push({range:new D(i.lineNumber,n.startColumn,i.lineNumber,n.endColumn)})}_addWhitespaceLine(e,t,i){t.getLineLength(i.lineNumber)>0&&t.getLineFirstNonWhitespaceColumn(i.lineNumber)===0&&t.getLineLastNonWhitespaceColumn(i.lineNumber)===0&&e.push({range:new D(i.lineNumber,1,i.lineNumber,t.getLineMaxColumn(i.lineNumber))})}}var t9e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},i9e=function(o,e){return function(t,i){e(t,i,o)}},R9;class e6{constructor(e,t){this.index=e,this.ranges=t}mov(e){const t=this.index+(e?1:-1);if(t<0||t>=this.ranges.length)return this;const i=new e6(t,this.ranges);return i.ranges[t].equalsRange(this.ranges[this.index])?i.mov(e):i}}var Gp;let B0=(Gp=class{static get(e){return e.getContribution(R9.ID)}constructor(e,t){this._editor=e,this._languageFeaturesService=t,this._ignoreSelection=!1}dispose(){this._selectionListener?.dispose()}async run(e){if(!this._editor.hasModel())return;const t=this._editor.getSelections(),i=this._editor.getModel();if(this._state||await Zne(this._languageFeaturesService.selectionRangeProvider,i,t.map(s=>s.getPosition()),this._editor.getOption(129),qe.None).then(s=>{if(!(!xs(s)||s.length!==t.length)&&!(!this._editor.hasModel()||!Jt(this._editor.getSelections(),t,(r,a)=>r.equalsSelection(a)))){for(let r=0;r<s.length;r++)s[r]=s[r].filter(a=>a.containsPosition(t[r].getStartPosition())&&a.containsPosition(t[r].getEndPosition())),s[r].unshift(t[r]);this._state=s.map(r=>new e6(0,r)),this._selectionListener?.dispose(),this._selectionListener=this._editor.onDidChangeCursorPosition(()=>{this._ignoreSelection||(this._selectionListener?.dispose(),this._state=void 0)})}}),!this._state)return;this._state=this._state.map(s=>s.mov(e));const n=this._state.map(s=>ce.fromPositions(s.ranges[s.index].getStartPosition(),s.ranges[s.index].getEndPosition()));this._ignoreSelection=!0;try{this._editor.setSelections(n)}finally{this._ignoreSelection=!1}}},R9=Gp,Gp.ID="editor.contrib.smartSelectController",Gp);B0=R9=t9e([i9e(1,ue)],B0);class Gne extends de{constructor(e,t){super(t),this._forward=e}async run(e,t){const i=B0.get(t);i&&await i.run(this._forward)}}class n9e extends Gne{constructor(){super(!0,{id:"editor.action.smartSelect.expand",label:H(1400,"Expand Selection"),precondition:void 0,kbOpts:{kbExpr:T.editorTextFocus,primary:1553,mac:{primary:3345,secondary:[1297]},weight:100},menuOpts:{menuId:ge.MenubarSelectionMenu,group:"1_basic",title:m(1398,"&&Expand Selection"),order:2}})}}st.registerCommandAlias("editor.action.smartSelect.grow","editor.action.smartSelect.expand");class s9e extends Gne{constructor(){super(!1,{id:"editor.action.smartSelect.shrink",label:H(1401,"Shrink Selection"),precondition:void 0,kbOpts:{kbExpr:T.editorTextFocus,primary:1551,mac:{primary:3343,secondary:[1295]},weight:100},menuOpts:{menuId:ge.MenubarSelectionMenu,group:"1_basic",title:m(1399,"&&Shrink Selection"),order:3}})}}ot(B0.ID,B0,4);oe(n9e);oe(s9e);async function Zne(o,e,t,i,n){const s=o.all(e).concat(new e9e(i.selectSubwords));s.length===1&&s.unshift(new lE);const r=[],a=[];for(const l of s)r.push(Promise.resolve(l.provideSelectionRanges(e,t,n)).then(c=>{if(xs(c)&&c.length===t.length)for(let d=0;d<t.length;d++){a[d]||(a[d]=[]);for(const h of c[d])D.isIRange(h.range)&&D.containsPosition(h.range,t[d])&&a[d].push(D.lift(h.range))}},zi));return await Promise.all(r),a.map(l=>{if(l.length===0)return[];l.sort((u,g)=>M.isBefore(u.getStartPosition(),g.getStartPosition())?1:M.isBefore(g.getStartPosition(),u.getStartPosition())||M.isBefore(u.getEndPosition(),g.getEndPosition())?-1:M.isBefore(g.getEndPosition(),u.getEndPosition())?1:0);const c=[];let d;for(const u of l)(!d||D.containsRange(u,d)&&!D.equalsRange(u,d))&&(c.push(u),d=u);if(!i.selectLeadingAndTrailingWhitespace)return c;const h=[c[0]];for(let u=1;u<c.length;u++){const g=c[u-1],f=c[u];if(f.startLineNumber!==g.startLineNumber||f.endLineNumber!==g.endLineNumber){const p=new D(g.startLineNumber,e.getLineFirstNonWhitespaceColumn(g.startLineNumber),g.endLineNumber,e.getLineLastNonWhitespaceColumn(g.endLineNumber));p.containsRange(g)&&!p.equalsRange(g)&&f.containsRange(p)&&!f.equalsRange(p)&&h.push(p);const _=new D(g.startLineNumber,1,g.endLineNumber,e.getLineMaxColumn(g.endLineNumber));_.containsRange(g)&&!_.equalsRange(p)&&f.containsRange(_)&&!f.equalsRange(_)&&h.push(_)}h.push(f)}return h})}st.registerCommand("_executeSelectionRangeProvider",async function(o,...e){const[t,i]=e;at(ve.isUri(t)),at(Hre(i,r=>M.isIPosition(r)));const n=o.get(ue).selectionRangeProvider,s=await o.get(Is).createModelReference(t);try{return Zne(n,s.object.textEditorModel,i.map(M.lift),{selectLeadingAndTrailingWhitespace:!0,selectSubwords:!0},qe.None)}finally{s.dispose()}});const M9=Object.freeze({View:H(1638,"View"),Help:H(1639,"Help"),Test:H(1640,"Test"),File:H(1641,"File"),Preferences:H(1642,"Preferences"),Developer:H(1643,"Developer")});class o9e extends Ra{constructor(){super({id:"editor.action.toggleStickyScroll",title:{...H(1448,"Toggle Editor Sticky Scroll"),mnemonicTitle:m(1444,"&&Toggle Editor Sticky Scroll")},metadata:{description:H(1449,"Toggle/enable the editor sticky scroll which shows the nested scopes at the top of the viewport")},category:M9.View,toggled:{condition:K.equals("config.editor.stickyScroll.enabled",!0),title:m(1445,"Sticky Scroll"),mnemonicTitle:m(1446,"&&Sticky Scroll")},menu:[{id:ge.CommandPalette},{id:ge.MenubarAppearanceMenu,group:"4_editor",order:3},{id:ge.StickyScrollContext}]})}async runEditorCommand(e,t){const i=e.get(We),n=!i.getValue("editor.stickyScroll.enabled"),s=Na.get(t)?.isFocused();i.updateValue("editor.stickyScroll.enabled",n),s&&t.focus()}}const iM=100;class r9e extends Ra{constructor(){super({id:"editor.action.focusStickyScroll",title:{...H(1450,"Focus Editor Sticky Scroll"),mnemonicTitle:m(1447,"&&Focus Editor Sticky Scroll")},precondition:K.and(K.has("config.editor.stickyScroll.enabled"),T.stickyScrollVisible),menu:[{id:ge.CommandPalette}]})}runEditorCommand(e,t){Na.get(t)?.focus()}}class a9e extends Ra{constructor(){super({id:"editor.action.selectNextStickyScrollLine",title:H(1451,"Select the next editor sticky scroll line"),precondition:T.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:iM,primary:18}})}runEditorCommand(e,t){Na.get(t)?.focusNext()}}class l9e extends Ra{constructor(){super({id:"editor.action.selectPreviousStickyScrollLine",title:H(1452,"Select the previous sticky scroll line"),precondition:T.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:iM,primary:16}})}runEditorCommand(e,t){Na.get(t)?.focusPrevious()}}class c9e extends Ra{constructor(){super({id:"editor.action.goToFocusedStickyScrollLine",title:H(1453,"Go to the focused sticky scroll line"),precondition:T.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:iM,primary:3}})}runEditorCommand(e,t){Na.get(t)?.goToFocused()}}class d9e extends Ra{constructor(){super({id:"editor.action.selectEditor",title:H(1454,"Select Editor"),precondition:T.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:iM,primary:9}})}runEditorCommand(e,t){Na.get(t)?.selectEditor()}}ot(Na.ID,Na,1);xt(o9e);xt(r9e);xt(l9e);xt(a9e);xt(c9e);xt(d9e);var Yne=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Fw=function(o,e){return function(t,i){e(t,i,o)}};class h9e{constructor(e,t,i,n,s,r,a){this.range=e,this.insertText=t,this.filterText=i,this.additionalTextEdits=n,this.command=s,this.gutterMenuLinkAction=r,this.completion=a}}let P9=class extends nae{constructor(e,t,i,n,s,r){super(s.disposable),this.model=e,this.line=t,this.word=i,this.completionModel=n,this._suggestMemoryService=r}canBeReused(e,t,i){return this.model===e&&this.line===t&&this.word.word.length>0&&this.word.startColumn===i.startColumn&&this.word.endColumn<i.endColumn&&this.completionModel.getIncompleteProvider().size===0}get items(){const e=[],{items:t}=this.completionModel,i=this._suggestMemoryService.select(this.model,{lineNumber:this.line,column:this.word.endColumn+this.completionModel.lineContext.characterCountDelta},t),n=it.slice(t,i),s=it.slice(t,0,i);let r=5;for(const a of it.concat(n,s)){if(a.score===xa.Default)continue;const l=new D(a.editStart.lineNumber,a.editStart.column,a.editInsertEnd.lineNumber,a.editInsertEnd.column+this.completionModel.lineContext.characterCountDelta),c=a.completion.insertTextRules&&a.completion.insertTextRules&4?{snippet:a.completion.insertText}:a.completion.insertText;e.push(new h9e(l,c,a.filterTextLow??a.labelLow,a.completion.additionalTextEdits,a.completion.command,a.completion.action,a)),r-->=0&&a.resolve(qe.None)}return e}};P9=Yne([Fw(5,QR)],P9);let A9=class extends F{constructor(e,t,i,n){super(),this._languageFeatureService=e,this._clipboardService=t,this._suggestMemoryService=i,this._editorService=n,this._store.add(e.inlineCompletionsProvider.register("*",this))}async provideInlineCompletions(e,t,i,n){if(i.selectedSuggestionInfo)return;let s;for(const g of this._editorService.listCodeEditors())if(g.getModel()===e){s=g;break}if(!s)return;const r=s.getOption(102);if(cb.isAllOff(r))return;e.tokenization.tokenizeIfCheap(t.lineNumber);const a=e.tokenization.getLineTokens(t.lineNumber),l=a.getStandardTokenType(a.findTokenIndexAtOffset(Math.max(t.column-1-1,0)));if(cb.valueFor(r,l)!=="inline")return;let c=e.getWordAtPosition(t),d;if(c?.word||(d=this._getTriggerCharacterInfo(e,t)),!c?.word&&!d||(c||(c=e.getWordUntilPosition(t)),c.endColumn!==t.column))return;let h;const u=e.getValueInRange(new D(t.lineNumber,1,t.lineNumber,t.column));if(!d&&this._lastResult?.canBeReused(e,t.lineNumber,c)){const g=new OK(u,t.column-this._lastResult.word.endColumn);this._lastResult.completionModel.lineContext=g,this._lastResult.acquire(),h=this._lastResult}else{const g=await WH(this._languageFeatureService.completionProvider,e,t,new k0(void 0,dE.createSuggestFilter(s).itemKind,d?.providers),d&&{triggerKind:1,triggerCharacter:d.ch},n);let f;g.needsClipboard&&(f=await this._clipboardService.readText());const p=new Gh(g.items,t.column,new OK(u,0),cE.None,s.getOption(134),s.getOption(128),{boostFullMatch:!1,firstMatchCanBeWeak:!1},f);h=new P9(e,t.lineNumber,c,p,g,this._suggestMemoryService)}return this._lastResult=h,h}handleItemDidShow(e,t){t.completion.resolve(qe.None)}disposeInlineCompletions(e){e.release()}_getTriggerCharacterInfo(e,t){const i=e.getValueInRange(D.fromPositions({lineNumber:t.lineNumber,column:t.column-1},t)),n=new Set;for(const s of this._languageFeatureService.completionProvider.all(e))s.triggerCharacters?.includes(i)&&n.add(s);if(n.size!==0)return{providers:n,ch:i}}};A9=Yne([Fw(0,ue),Fw(1,Ho),Fw(2,QR),Fw(3,lt)],A9);IC(A9);class u9e extends de{constructor(){super({id:"editor.action.forceRetokenize",label:H(1532,"Developer: Force Retokenize"),precondition:void 0})}run(e,t){if(!t.hasModel())return;const i=t.getModel();i.tokenization.resetTokenization();const n=new _n;i.tokenization.forceTokenization(i.getLineCount()),n.stop(),console.log(`tokenization took ${n.elapsed()}`)}}oe(u9e);const dT=class dT extends xn{constructor(){super({id:dT.ID,title:H(1530,"Toggle Tab Key Moves Focus"),precondition:void 0,keybinding:{primary:2091,mac:{primary:1323},weight:100},metadata:{description:H(1531,"Determines whether the tab key moves focus around the workbench or inserts the tab character in the current editor. This is also called tab trapping, tab navigation, or tab focus mode.")},f1:!0})}run(){const t=!Pv.getTabFocusMode();Pv.setTabFocusMode(t),js(t?m(1528,"Pressing Tab will now move focus to the next focusable element"):m(1529,"Pressing Tab will now insert the tab character"))}};dT.ID="editor.action.toggleTabFocusMode";let O9=dT;xt(O9);var g9e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},uG=function(o,e){return function(t,i){e(t,i,o)}};let F9=class extends F{get enabled(){return this._enabled}set enabled(e){e?(this.el.setAttribute("aria-disabled","false"),this.el.tabIndex=0,this.el.style.pointerEvents="auto",this.el.style.opacity="1",this.el.style.cursor="pointer",this._enabled=!1):(this.el.setAttribute("aria-disabled","true"),this.el.tabIndex=-1,this.el.style.pointerEvents="none",this.el.style.opacity="0.4",this.el.style.cursor="default",this._enabled=!0),this._enabled=e}constructor(e,t,i={},n,s){super(),this._link=t,this._hoverService=n,this._enabled=!0,this.el=Y(e,te("a.monaco-link",{tabIndex:t.tabIndex??0,href:t.href},t.label)),this.hoverDelegate=i.hoverDelegate??Tc("mouse"),this.setTooltip(t.title),this.el.setAttribute("role","button");const r=this._register(new St(this.el,"click")),a=this._register(new St(this.el,"keypress")),l=se.chain(a.event,h=>h.map(u=>new Mt(u)).filter(u=>u.keyCode===3)),c=this._register(new St(this.el,zt.Tap)).event;this._register(cs.addTarget(this.el));const d=se.any(r.event,l,c);this._register(d(h=>{this.enabled&&(dt.stop(h,!0),i?.opener?i.opener(this._link.href):s.open(this._link.href,{allowCommands:!0}))})),this.enabled=!0}setTooltip(e){!this.hover&&e?this.hover=this._register(this._hoverService.setupManagedHover(this.hoverDelegate,this.el,e)):this.hover&&this.hover.update(e)}};F9=g9e([uG(3,Zs),uG(4,ph)],F9);var Xne=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},W9=function(o,e){return function(t,i){e(t,i,o)}};const f9e=26;let B9=class extends F{constructor(e,t){super(),this._editor=e,this.instantiationService=t,this.banner=this._register(this.instantiationService.createInstance(H9))}hide(){this._editor.setBanner(null,0),this.banner.clear()}show(e){this.banner.show({...e,onClose:()=>{this.hide(),e.onClose?.()}}),this._editor.setBanner(this.banner.element,f9e)}};B9=Xne([W9(1,me)],B9);let H9=class extends F{constructor(e,t){super(),this.instantiationService=e,this.markdownRendererService=t,this.element=te("div.editor-banner"),this.element.tabIndex=0}getAriaLabel(e){if(e.ariaLabel)return e.ariaLabel;if(typeof e.message=="string")return e.message}getBannerMessage(e){if(typeof e=="string"){const t=te("span");return t.innerText=e,t}return this.markdownRendererService.render(e).element}clear(){Tn(this.element)}show(e){Tn(this.element);const t=this.getAriaLabel(e);t&&this.element.setAttribute("aria-label",t);const i=Y(this.element,te("div.icon-container"));i.setAttribute("aria-hidden","true"),e.icon&&i.appendChild(te(`div${ye.asCSSSelector(e.icon)}`));const n=Y(this.element,te("div.message-container"));if(n.setAttribute("aria-hidden","true"),n.appendChild(this.getBannerMessage(e.message)),this.messageActionsContainer=Y(this.element,te("div.message-actions-container")),e.actions)for(const r of e.actions)this._register(this.instantiationService.createInstance(F9,this.messageActionsContainer,{...r,tabIndex:-1},{}));const s=Y(this.element,te("div.action-container"));this.actionBar=this._register(new lo(s)),this.actionBar.push(this._register(new ur("banner.close",m(1533,"Close Banner"),ye.asClassName(Zee),!0,()=>{typeof e.onClose=="function"&&e.onClose()})),{icon:!0,label:!1}),this.actionBar.setFocusable(!1)}};H9=Xne([W9(0,me),W9(1,Ma)],H9);var t6=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},T1=function(o,e){return function(t,i){e(t,i,o)}};const p9e=Zt("extensions-warning-message",Z.warning,m(1534,"Icon shown with a warning message in the extensions editor."));var vv;let H0=(vv=class extends F{constructor(e,t,i,n){super(),this._editor=e,this._editorWorkerService=t,this._workspaceTrustService=i,this._highlighter=null,this._bannerClosed=!1,this._updateState=s=>{if(s&&s.hasMore){if(this._bannerClosed)return;const r=Math.max(s.ambiguousCharacterCount,s.nonBasicAsciiCharacterCount,s.invisibleCharacterCount);let a;if(s.nonBasicAsciiCharacterCount>=r)a={message:m(1535,"This document contains many non-basic ASCII unicode characters"),command:new z0};else if(s.ambiguousCharacterCount>=r)a={message:m(1536,"This document contains many ambiguous unicode characters"),command:new Pm};else if(s.invisibleCharacterCount>=r)a={message:m(1537,"This document contains many invisible unicode characters"),command:new V0};else throw new Error("Unreachable");this._bannerController.show({id:"unicodeHighlightBanner",message:a.message,icon:p9e,actions:[{label:a.command.shortLabel,href:`command:${a.command.desc.id}`}],onClose:()=>{this._bannerClosed=!0}})}else this._bannerController.hide()},this._bannerController=this._register(n.createInstance(B9,e)),this._register(this._editor.onDidChangeModel(()=>{this._bannerClosed=!1,this._updateHighlighter()})),this._options=e.getOption(142),this._register(i.onDidChangeTrust(s=>{this._updateHighlighter()})),this._register(e.onDidChangeConfiguration(s=>{s.hasChanged(142)&&(this._options=e.getOption(142),this._updateHighlighter())})),this._updateHighlighter()}dispose(){this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),super.dispose()}_updateHighlighter(){if(this._updateState(null),this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),!this._editor.hasModel())return;const e=m9e(this._workspaceTrustService.isWorkspaceTrusted(),this._options);if([e.nonBasicASCII,e.ambiguousCharacters,e.invisibleCharacters].every(i=>i===!1))return;const t={nonBasicASCII:e.nonBasicASCII,ambiguousCharacters:e.ambiguousCharacters,invisibleCharacters:e.invisibleCharacters,includeComments:e.includeComments,includeStrings:e.includeStrings,allowedCodePoints:Object.keys(e.allowedCharacters).map(i=>i.codePointAt(0)),allowedLocales:Object.keys(e.allowedLocales).map(i=>i==="_os"?Vm.NumberFormat().value.resolvedOptions().locale:i==="_vscode"?Xre:i)};this._editorWorkerService.canComputeUnicodeHighlights(this._editor.getModel().uri)?this._highlighter=new V9(this._editor,t,this._updateState,this._editorWorkerService):this._highlighter=new _9e(this._editor,t,this._updateState)}getDecorationInfo(e){return this._highlighter?this._highlighter.getDecorationInfo(e):null}},vv.ID="editor.contrib.unicodeHighlighter",vv);H0=t6([T1(1,_o),T1(2,jJ),T1(3,me)],H0);function m9e(o,e){return{nonBasicASCII:e.nonBasicASCII===Jo?!o:e.nonBasicASCII,ambiguousCharacters:e.ambiguousCharacters,invisibleCharacters:e.invisibleCharacters,includeComments:e.includeComments===Jo?!o:e.includeComments,includeStrings:e.includeStrings===Jo?!o:e.includeStrings,allowedCharacters:e.allowedCharacters,allowedLocales:e.allowedLocales}}let V9=class extends F{constructor(e,t,i,n){super(),this._editor=e,this._options=t,this._updateState=i,this._editorWorkerService=n,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new Et(()=>this._update(),250)),this._register(this._editor.onDidChangeModelContent(()=>{this._updateSoon.schedule()})),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII()){this._decorations.clear();return}const e=this._model.getVersionId();this._editorWorkerService.computedUnicodeHighlights(this._model.uri,this._options).then(t=>{if(this._model.isDisposed()||this._model.getVersionId()!==e)return;this._updateState(t);const i=[];if(!t.hasMore)for(const n of t.ranges)i.push({range:n,options:xE.instance.getDecorationFromOptions(this._options)});this._decorations.set(i)})}getDecorationInfo(e){if(!this._decorations.has(e))return null;const t=this._editor.getModel();if(!PB(t,e))return null;const i=t.getValueInRange(e.range);return{reason:Jne(i,this._options),inComment:AB(t,e),inString:OB(t,e)}}};V9=t6([T1(3,_o)],V9);class _9e extends F{constructor(e,t,i){super(),this._editor=e,this._options=t,this._updateState=i,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new Et(()=>this._update(),250)),this._register(this._editor.onDidLayoutChange(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidScrollChange(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidChangeHiddenAreas(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidChangeModelContent(()=>{this._updateSoon.schedule()})),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII()){this._decorations.clear();return}const e=this._editor.getVisibleRanges(),t=[],i={ranges:[],ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0,hasMore:!1};for(const n of e){const s=QW.computeUnicodeHighlights(this._model,this._options,n);for(const r of s.ranges)i.ranges.push(r);i.ambiguousCharacterCount+=i.ambiguousCharacterCount,i.invisibleCharacterCount+=i.invisibleCharacterCount,i.nonBasicAsciiCharacterCount+=i.nonBasicAsciiCharacterCount,i.hasMore=i.hasMore||s.hasMore}if(!i.hasMore)for(const n of i.ranges)t.push({range:n,options:xE.instance.getDecorationFromOptions(this._options)});this._updateState(i),this._decorations.set(t)}getDecorationInfo(e){if(!this._decorations.has(e))return null;const t=this._editor.getModel(),i=t.getValueInRange(e.range);return PB(t,e)?{reason:Jne(i,this._options),inComment:AB(t,e),inString:OB(t,e)}:null}}const Qne=m(1538,"Configure Unicode Highlight Options");let z9=class{constructor(e,t){this._editor=e,this._markdownRendererService=t,this.hoverOrdinal=5}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1)return[];const i=this._editor.getModel(),n=this._editor.getContribution(H0.ID);if(!n)return[];const s=[],r=new Set;let a=300;for(const l of t){const c=n.getDecorationInfo(l);if(!c)continue;const h=i.getValueInRange(l.range).codePointAt(0),u=AP(h);let g;switch(c.reason.kind){case 0:{J0(c.reason.confusableWith)?g=m(1539,"The character {0} could be confused with the ASCII character {1}, which is more common in source code.",u,AP(c.reason.confusableWith.codePointAt(0))):g=m(1540,"The character {0} could be confused with the character {1}, which is more common in source code.",u,AP(c.reason.confusableWith.codePointAt(0)));break}case 1:g=m(1541,"The character {0} is invisible.",u);break;case 2:g=m(1542,"The character {0} is not a basic ASCII character.",u);break}if(r.has(g))continue;r.add(g);const f={codePoint:h,reason:c.reason,inComment:c.inComment,inString:c.inString},p=m(1543,"Adjust settings"),_=fJ(DE.ID,f),b=new ns("",!0).appendMarkdown(g).appendText(" ").appendLink(_,p,Qne);s.push(new Ca(this,l.range,[b],!1,a++))}return s}renderHoverParts(e,t){return P2e(e,t,this._editor,this._markdownRendererService)}getAccessibleContent(e){return e.contents.map(t=>t.value).join(`
|
|
914
|
-
`)}};z9=t6([T1(1,Ma)],z9);function U9(o){return`U+${o.toString(16).padStart(4,"0")}`}function AP(o){let e=`\`${U9(o)}\``;return Hf.isInvisibleCharacter(o)||(e+=` "${`${b9e(o)}`}"`),e}function b9e(o){return o===96?"`` ` ``":"`"+String.fromCodePoint(o)+"`"}function Jne(o,e){return QW.computeUnicodeHighlightReason(o,e)}const hT=class hT{constructor(){this.map=new Map}getDecorationFromOptions(e){return this.getDecoration(!e.includeComments,!e.includeStrings)}getDecoration(e,t){const i=`${e}${t}`;let n=this.map.get(i);return n||(n=Ae.createDynamic({description:"unicode-highlight",stickiness:1,className:"unicode-highlight",showIfCollapsed:!0,overviewRuler:null,minimap:null,hideInCommentTokens:e,hideInStringTokens:t}),this.map.set(i,n)),n}};hT.instance=new hT;let xE=hT;class v9e extends de{constructor(){super({id:Pm.ID,label:H(1552,"Disable highlighting of characters in comments"),precondition:void 0}),this.shortLabel=m(1544,"Disable Highlight In Comments")}async run(e,t,i){const n=e.get(We);n&&this.runAction(n)}async runAction(e){await e.updateValue(no.includeComments,!1,2)}}class C9e extends de{constructor(){super({id:Pm.ID,label:H(1553,"Disable highlighting of characters in strings"),precondition:void 0}),this.shortLabel=m(1545,"Disable Highlight In Strings")}async run(e,t,i){const n=e.get(We);n&&this.runAction(n)}async runAction(e){await e.updateValue(no.includeStrings,!1,2)}}const uT=class uT extends xn{constructor(){super({id:uT.ID,title:H(1554,"Disable highlighting of ambiguous characters"),precondition:void 0,f1:!1}),this.shortLabel=m(1546,"Disable Ambiguous Highlight")}async run(e,t,i){const n=e.get(We);n&&this.runAction(n)}async runAction(e){await e.updateValue(no.ambiguousCharacters,!1,2)}};uT.ID="editor.action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters";let Pm=uT;const gT=class gT extends xn{constructor(){super({id:gT.ID,title:H(1555,"Disable highlighting of invisible characters"),precondition:void 0,f1:!1}),this.shortLabel=m(1547,"Disable Invisible Highlight")}async run(e,t,i){const n=e.get(We);n&&this.runAction(n)}async runAction(e){await e.updateValue(no.invisibleCharacters,!1,2)}};gT.ID="editor.action.unicodeHighlight.disableHighlightingOfInvisibleCharacters";let V0=gT;const fT=class fT extends xn{constructor(){super({id:fT.ID,title:H(1556,"Disable highlighting of non basic ASCII characters"),precondition:void 0,f1:!1}),this.shortLabel=m(1548,"Disable Non ASCII Highlight")}async run(e,t,i){const n=e.get(We);n&&this.runAction(n)}async runAction(e){await e.updateValue(no.nonBasicASCII,!1,2)}};fT.ID="editor.action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters";let z0=fT;const pT=class pT extends xn{constructor(){super({id:pT.ID,title:H(1557,"Show Exclude Options"),precondition:void 0,f1:!1})}async run(e,t){const{codePoint:i,reason:n,inString:s,inComment:r}=t,a=String.fromCodePoint(i),l=e.get(ds),c=e.get(We);function d(f){return Hf.isInvisibleCharacter(f)?m(1549,"Exclude {0} (invisible character) from being highlighted",U9(f)):m(1550,"Exclude {0} from being highlighted",`${U9(f)} "${a}"`)}const h=[];if(n.kind===0)for(const f of n.notAmbiguousInLocales)h.push({label:m(1551,'Allow unicode characters that are more common in the language "{0}".',f),run:async()=>{S9e(c,[f])}});if(h.push({label:d(i),run:()=>w9e(c,[i])}),r){const f=new v9e;h.push({label:f.label,run:async()=>f.runAction(c)})}else if(s){const f=new C9e;h.push({label:f.label,run:async()=>f.runAction(c)})}function u(f){return typeof f.desc.title=="string"?f.desc.title:f.desc.title.value}if(n.kind===0){const f=new Pm;h.push({label:u(f),run:async()=>f.runAction(c)})}else if(n.kind===1){const f=new V0;h.push({label:u(f),run:async()=>f.runAction(c)})}else if(n.kind===2){const f=new z0;h.push({label:u(f),run:async()=>f.runAction(c)})}else y9e(n);const g=await l.pick(h,{title:Qne});g&&await g.run()}};pT.ID="editor.action.unicodeHighlight.showExcludeOptions";let DE=pT;async function w9e(o,e){const t=o.getValue(no.allowedCharacters);let i;typeof t=="object"&&t?i=t:i={};for(const n of e)i[String.fromCodePoint(n)]=!0;await o.updateValue(no.allowedCharacters,i,2)}async function S9e(o,e){const t=o.inspect(no.allowedLocales).user?.value;let i;typeof t=="object"&&t?i=Object.assign({},t):i={};for(const n of e)i[n]=!0;await o.updateValue(no.allowedLocales,i,2)}function y9e(o){throw new Error(`Unexpected value: ${o}`)}xt(Pm);xt(V0);xt(z0);xt(DE);ot(H0.ID,H0,1);Jm.register(z9);var L9e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},gG=function(o,e){return function(t,i){e(t,i,o)}};const ese="ignoreUnusualLineTerminators";function x9e(o,e,t){o.setModelProperty(e.uri,ese,t)}function D9e(o,e){return o.getModelProperty(e.uri,ese)}var Cv;let kE=(Cv=class extends F{constructor(e,t,i){super(),this._editor=e,this._dialogService=t,this._codeEditorService=i,this._isPresentingDialog=!1,this._config=this._editor.getOption(143),this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(143)&&(this._config=this._editor.getOption(143),this._checkForUnusualLineTerminators())})),this._register(this._editor.onDidChangeModel(()=>{this._checkForUnusualLineTerminators()})),this._register(this._editor.onDidChangeModelContent(n=>{n.isUndoing||this._checkForUnusualLineTerminators()})),this._checkForUnusualLineTerminators()}async _checkForUnusualLineTerminators(){if(this._config==="off"||!this._editor.hasModel())return;const e=this._editor.getModel();if(!e.mightContainUnusualLineTerminators()||D9e(this._codeEditorService,e)===!0||this._editor.getOption(104))return;if(this._config==="auto"){e.removeUnusualLineTerminators(this._editor.getSelections());return}if(this._isPresentingDialog)return;let i;try{this._isPresentingDialog=!0,i=await this._dialogService.confirm({title:m(1558,"Unusual Line Terminators"),message:m(1559,"Detected unusual line terminators"),detail:m(1560,"The file '{0}' contains one or more unusual line terminator characters, like Line Separator (LS) or Paragraph Separator (PS).\n\nIt is recommended to remove them from the file. This can be configured via `editor.unusualLineTerminators`.",Xr(e.uri)),primaryButton:m(1561,"&&Remove Unusual Line Terminators"),cancelButton:m(1562,"Ignore")})}finally{this._isPresentingDialog=!1}if(!i.confirmed){x9e(this._codeEditorService,e,!0);return}e.removeUnusualLineTerminators(this._editor.getSelections())}},Cv.ID="editor.contrib.unusualLineTerminatorsDetector",Cv);kE=L9e([gG(1,py),gG(2,lt)],kE);ot(kE.ID,kE,1);var k9e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},I9e=function(o,e){return function(t,i){e(t,i,o)}};class fG{constructor(){this.selector={language:"*"}}provideDocumentHighlights(e,t,i){const n=[],s=e.getWordAtPosition({lineNumber:t.lineNumber,column:t.column});return s?e.isDisposed()?void 0:e.findMatches(s.word,!0,!1,!0,SD,!1).map(a=>({range:a.range,kind:Lv.Text})):Promise.resolve(n)}provideMultiDocumentHighlights(e,t,i,n){const s=new Ai,r=e.getWordAtPosition({lineNumber:t.lineNumber,column:t.column});if(!r)return Promise.resolve(s);for(const a of[e,...i]){if(a.isDisposed())continue;const c=a.findMatches(r.word,!0,!1,!0,SD,!1).map(d=>({range:d.range,kind:Lv.Text}));c&&s.set(a.uri,c)}return s}}let $9=class extends F{constructor(e){super(),this._register(e.documentHighlightProvider.register("*",new fG)),this._register(e.multiDocumentHighlightProvider.register("*",new fG))}};$9=k9e([I9e(0,ue)],$9);var tse=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Xl=function(o,e){return function(t,i){e(t,i,o)}},pi,j9;const i6=new ae("hasWordHighlights",!1);function ise(o,e,t,i){const n=o.ordered(e);return MW(n.map(s=>()=>Promise.resolve(s.provideDocumentHighlights(e,t,i)).then(void 0,zi)),s=>s!=null).then(s=>{if(s){const r=new Ai;return r.set(e.uri,s),r}return new Ai})}function E9e(o,e,t,i,n){const s=o.ordered(e);return MW(s.map(r=>()=>{const a=n.filter(l=>AY(l)).filter(l=>n8(r.selector,l.uri,l.getLanguageId(),!0,void 0,void 0)>0);return Promise.resolve(r.provideMultiDocumentHighlights(e,t,a,i)).then(void 0,zi)}),r=>r!=null)}class nse{constructor(e,t,i){this._model=e,this._selection=t,this._wordSeparators=i,this._wordRange=this._getCurrentWordRange(e,t),this._result=null}get result(){return this._result||(this._result=nn(e=>this._compute(this._model,this._selection,this._wordSeparators,e))),this._result}_getCurrentWordRange(e,t){const i=e.getWordAtPosition(t.getPosition());return i?new D(t.startLineNumber,i.startColumn,t.startLineNumber,i.endColumn):null}cancel(){this.result.cancel()}}class N9e extends nse{constructor(e,t,i,n){super(e,t,i),this._providers=n}_compute(e,t,i,n){return ise(this._providers,e,t.getPosition(),n).then(s=>s||new Ai)}}class T9e extends nse{constructor(e,t,i,n,s){super(e,t,i),this._providers=n,this._otherModels=s}_compute(e,t,i,n){return E9e(this._providers,e,t.getPosition(),n,this._otherModels).then(s=>s||new Ai)}}function R9e(o,e,t,i){return new N9e(e,t,i,o)}function M9e(o,e,t,i,n){return new T9e(e,t,i,o,n)}mo("_executeDocumentHighlights",async(o,e,t)=>{const i=o.get(ue);return(await ise(i.documentHighlightProvider,e,t,qe.None))?.get(e.uri)});var zu;let q9=(zu=class{constructor(e,t,i,n,s,r,a,l){this.toUnhook=new U,this.workerRequestTokenId=0,this.workerRequestCompleted=!1,this.workerRequestValue=new Ai,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=void 0,this.runDelayer=this.toUnhook.add(new Zr(50)),this.editor=e,this.providers=t,this.multiDocumentProviders=i,this.codeEditorService=r,this.textModelService=s,this.configurationService=a,this.logService=l,this._hasWordHighlights=i6.bindTo(n),this._ignorePositionChangeEvent=!1,this.occurrencesHighlightEnablement=this.editor.getOption(90),this.occurrencesHighlightDelay=this.configurationService.getValue("editor.occurrencesHighlightDelay"),this.model=this.editor.getModel(),this.toUnhook.add(e.onDidChangeCursorPosition(c=>{this._ignorePositionChangeEvent||this.occurrencesHighlightEnablement!=="off"&&this.runDelayer.trigger(()=>{this._onPositionChanged(c)})})),this.toUnhook.add(e.onDidFocusEditorText(c=>{this.occurrencesHighlightEnablement!=="off"&&(this.workerRequest||this.runDelayer.trigger(()=>{this._run()}))})),this.toUnhook.add(e.onDidChangeModelContent(c=>{IT(this.model.uri,"output")||this._stopAll()})),this.toUnhook.add(e.onDidChangeModel(c=>{!c.newModelUrl&&c.oldModelUrl?this._stopSingular():pi.query&&this._run()})),this.toUnhook.add(e.onDidChangeConfiguration(c=>{const d=this.editor.getOption(90);if(this.occurrencesHighlightEnablement!==d)switch(this.occurrencesHighlightEnablement=d,d){case"off":this._stopAll();break;case"singleFile":this._stopAll(pi.query?.modelInfo?.modelURI);break;case"multiFile":pi.query&&this._run(!0);break;default:console.warn("Unknown occurrencesHighlight setting value:",d);break}})),this.toUnhook.add(this.configurationService.onDidChangeConfiguration(c=>{if(c.affectsConfiguration("editor.occurrencesHighlightDelay")){const d=a.getValue("editor.occurrencesHighlightDelay");this.occurrencesHighlightDelay!==d&&(this.occurrencesHighlightDelay=d)}})),this.toUnhook.add(e.onDidBlurEditorWidget(()=>{const c=this.codeEditorService.getFocusedCodeEditor();c?c.getModel()?.uri.scheme===Ie.vscodeNotebookCell&&this.editor.getModel()?.uri.scheme!==Ie.vscodeNotebookCell&&this._stopAll():this._stopAll()})),this.decorations=this.editor.createDecorationsCollection(),this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=void 0,pi.query&&this._run()}hasDecorations(){return this.decorations.length>0}restore(e){this.occurrencesHighlightEnablement!=="off"&&(this.runDelayer.cancel(),this.runDelayer.trigger(()=>{this._run(!1,e)}))}stop(){this.occurrencesHighlightEnablement!=="off"&&this._stopAll()}_getSortedHighlights(){return this.decorations.getRanges().sort(D.compareRangesUsingStarts)}moveNext(){const e=this._getSortedHighlights(),i=(e.findIndex(s=>s.containsPosition(this.editor.getPosition()))+1)%e.length,n=e[i];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(n.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(n);const s=this._getWord();if(s){const r=this.editor.getModel().getLineContent(n.startLineNumber);js(`${r}, ${i+1} of ${e.length} for '${s.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}moveBack(){const e=this._getSortedHighlights(),i=(e.findIndex(s=>s.containsPosition(this.editor.getPosition()))-1+e.length)%e.length,n=e[i];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(n.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(n);const s=this._getWord();if(s){const r=this.editor.getModel().getLineContent(n.startLineNumber);js(`${r}, ${i+1} of ${e.length} for '${s.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}_removeSingleDecorations(){if(!this.editor.hasModel())return;const e=pi.storedDecorationIDs.get(this.editor.getModel().uri);e&&(this.editor.removeDecorations(e),pi.storedDecorationIDs.delete(this.editor.getModel().uri),this.decorations.length>0&&(this.decorations.clear(),this._hasWordHighlights.set(!1)))}_removeAllDecorations(e){const t=this.codeEditorService.listCodeEditors(),i=[];for(const n of t){if(!n.hasModel()||Ku(n.getModel().uri,e))continue;const s=pi.storedDecorationIDs.get(n.getModel().uri);if(!s)continue;n.removeDecorations(s),i.push(n.getModel().uri);const r=rg.get(n);r?.wordHighlighter&&r.wordHighlighter.decorations.length>0&&(r.wordHighlighter.decorations.clear(),r.wordHighlighter.workerRequest=null,r.wordHighlighter._hasWordHighlights.set(!1))}for(const n of i)pi.storedDecorationIDs.delete(n)}_stopSingular(){this._removeSingleDecorations(),this.editor.hasTextFocus()&&(this.editor.getModel()?.uri.scheme!==Ie.vscodeNotebookCell&&pi.query?.modelInfo?.modelURI.scheme!==Ie.vscodeNotebookCell?(pi.query=null,this._run()):pi.query?.modelInfo&&(pi.query.modelInfo=null)),this.renderDecorationsTimer!==void 0&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=void 0),this.workerRequest!==null&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_stopAll(e){this._removeAllDecorations(e),this.renderDecorationsTimer!==void 0&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=void 0),this.workerRequest!==null&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_onPositionChanged(e){if(this.occurrencesHighlightEnablement==="off"){this._stopAll();return}if(e.source!=="api"&&e.reason!==3){this._stopAll();return}this._run()}_getWord(){const e=this.editor.getSelection(),t=e.startLineNumber,i=e.startColumn;return this.model.isDisposed()?null:this.model.getWordAtPosition({lineNumber:t,column:i})}getOtherModelsToHighlight(e){if(!e)return[];if(e.uri.scheme===Ie.vscodeNotebookCell){const s=[],r=this.codeEditorService.listCodeEditors();for(const a of r){const l=a.getModel();l&&l!==e&&l.uri.scheme===Ie.vscodeNotebookCell&&s.push(l)}return s}const i=[],n=this.codeEditorService.listCodeEditors();for(const s of n){if(!nH(s))continue;const r=s.getModel();r&&e===r.modified&&i.push(r.modified)}if(i.length)return i;if(this.occurrencesHighlightEnablement==="singleFile")return[];for(const s of n){const r=s.getModel();r&&r!==e&&i.push(r)}return i}async _run(e,t){if(this.editor.hasTextFocus()){const n=this.editor.getSelection();if(!n||n.startLineNumber!==n.endLineNumber){pi.query=null,this._stopAll();return}const s=n.startColumn,r=n.endColumn,a=this._getWord();if(!a||a.startColumn>s||a.endColumn<r){pi.query=null,this._stopAll();return}pi.query={modelInfo:{modelURI:this.model.uri,selection:n}}}else if(!pi.query){this._stopAll();return}if(this.lastCursorPositionChangeTime=new Date().getTime(),Ku(this.editor.getModel().uri,pi.query.modelInfo?.modelURI)){if(!e){const a=this.decorations.getRanges();for(const l of a)if(l.containsPosition(this.editor.getPosition()))return}this._stopAll(e?this.model.uri:void 0);const n=++this.workerRequestTokenId;this.workerRequestCompleted=!1;const s=this.getOtherModelsToHighlight(this.editor.getModel());if(!pi.query||!pi.query.modelInfo)return;const r=await this.textModelService.createModelReference(pi.query.modelInfo.modelURI);try{this.workerRequest=this.computeWithModel(r.object.textEditorModel,pi.query.modelInfo.selection,s),this.workerRequest?.result.then(a=>{n===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=a||[],this._beginRenderDecorations(t??this.occurrencesHighlightDelay))},Me)}catch(a){this.logService.error("Unexpected error during occurrence request. Log: ",a)}finally{r.dispose()}}else if(this.model.uri.scheme===Ie.vscodeNotebookCell){const n=++this.workerRequestTokenId;if(this.workerRequestCompleted=!1,!pi.query||!pi.query.modelInfo)return;const s=await this.textModelService.createModelReference(pi.query.modelInfo.modelURI);try{this.workerRequest=this.computeWithModel(s.object.textEditorModel,pi.query.modelInfo.selection,[this.model]),this.workerRequest?.result.then(r=>{n===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=r||[],this._beginRenderDecorations(t??this.occurrencesHighlightDelay))},Me)}catch(r){this.logService.error("Unexpected error during occurrence request. Log: ",r)}finally{s.dispose()}}}computeWithModel(e,t,i){return i.length?M9e(this.multiDocumentProviders,e,t,this.editor.getOption(148),i):R9e(this.providers,e,t,this.editor.getOption(148))}_beginRenderDecorations(e){const t=new Date().getTime(),i=this.lastCursorPositionChangeTime+e;t>=i?(this.renderDecorationsTimer=void 0,this.renderDecorations()):this.renderDecorationsTimer=setTimeout(()=>{this.renderDecorations()},i-t)}renderDecorations(){this.renderDecorationsTimer=void 0;const e=this.codeEditorService.listCodeEditors();for(const t of e){const i=rg.get(t);if(!i)continue;const n=[],s=t.getModel()?.uri;if(s&&this.workerRequestValue.has(s)){const r=pi.storedDecorationIDs.get(s),a=this.workerRequestValue.get(s);if(a)for(const c of a)c.range&&n.push({range:c.range,options:l7e(c.kind)});let l=[];t.changeDecorations(c=>{l=c.deltaDecorations(r??[],n)}),pi.storedDecorationIDs=pi.storedDecorationIDs.set(s,l),n.length>0&&(i.wordHighlighter?.decorations.set(n),i.wordHighlighter?._hasWordHighlights.set(!0))}}this.workerRequest=null}dispose(){this._stopSingular(),this.toUnhook.dispose()}},pi=zu,zu.storedDecorationIDs=new Ai,zu.query=null,zu);q9=pi=tse([Xl(4,Is),Xl(5,lt),Xl(6,We),Xl(7,Ut)],q9);var Zp;let rg=(Zp=class extends F{static get(e){return e.getContribution(j9.ID)}constructor(e,t,i,n,s,r,a){super(),this._wordHighlighter=null;const l=()=>{e.hasModel()&&!e.getModel().isTooLargeForTokenization()&&e.getModel().uri.scheme!==Ie.accessibleView&&(this._wordHighlighter=new q9(e,i.documentHighlightProvider,i.multiDocumentHighlightProvider,t,s,n,r,a))};this._register(e.onDidChangeModel(c=>{this._wordHighlighter&&(!c.newModelUrl&&c.oldModelUrl?.scheme!==Ie.vscodeNotebookCell&&this.wordHighlighter?.stop(),this._wordHighlighter.dispose(),this._wordHighlighter=null),l()})),l()}get wordHighlighter(){return this._wordHighlighter}saveViewState(){return!!(this._wordHighlighter&&this._wordHighlighter.hasDecorations())}moveNext(){this._wordHighlighter?.moveNext()}moveBack(){this._wordHighlighter?.moveBack()}restoreViewState(e){this._wordHighlighter&&e&&this._wordHighlighter.restore(250)}dispose(){this._wordHighlighter&&(this._wordHighlighter.dispose(),this._wordHighlighter=null),super.dispose()}},j9=Zp,Zp.ID="editor.contrib.wordHighlighter",Zp);rg=j9=tse([Xl(1,Te),Xl(2,ue),Xl(3,lt),Xl(4,Is),Xl(5,We),Xl(6,Ut)],rg);class sse extends de{constructor(e,t){super(t),this._isNext=e}run(e,t){const i=rg.get(t);i&&(this._isNext?i.moveNext():i.moveBack())}}class P9e extends sse{constructor(){super(!0,{id:"editor.action.wordHighlight.next",label:H(1572,"Go to Next Symbol Highlight"),precondition:i6,kbOpts:{kbExpr:T.editorTextFocus,primary:65,weight:100}})}}class A9e extends sse{constructor(){super(!1,{id:"editor.action.wordHighlight.prev",label:H(1573,"Go to Previous Symbol Highlight"),precondition:i6,kbOpts:{kbExpr:T.editorTextFocus,primary:1089,weight:100}})}}class O9e extends de{constructor(){super({id:"editor.action.wordHighlight.trigger",label:H(1574,"Trigger Symbol Highlight"),precondition:void 0,kbOpts:{kbExpr:T.editorTextFocus,primary:0,weight:100}})}run(e,t,i){const n=rg.get(t);n&&n.restoreViewState(!0)}}ot(rg.ID,rg,0);oe(P9e);oe(A9e);oe(O9e);IC($9);class nM extends an{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,i){if(!t.hasModel())return;const n=Qr(t.getOption(148),t.getOption(147)),s=t.getModel(),r=t.getSelections(),a=r.length>1,l=r.map(c=>{const d=new M(c.positionLineNumber,c.positionColumn),h=this._move(n,s,d,this._wordNavigationType,a);return this._moveTo(c,h,this._inSelectionMode)});if(s.pushStackElement(),t._getViewModel().setCursorStates("moveWordCommand",3,l.map(c=>ct.fromModelSelection(c))),l.length===1){const c=new M(l[0].positionLineNumber,l[0].positionColumn);t.revealPosition(c,0)}}_moveTo(e,t,i){return i?new ce(e.selectionStartLineNumber,e.selectionStartColumn,t.lineNumber,t.column):new ce(t.lineNumber,t.column,t.lineNumber,t.column)}}class mg extends nM{_move(e,t,i,n,s){return vt.moveWordLeft(e,t,i,n,s)}}class _g extends nM{_move(e,t,i,n,s){return vt.moveWordRight(e,t,i,n)}}class F9e extends mg{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}}class W9e extends mg{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}}class B9e extends mg{constructor(){super({inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:K.and(T.textInputFocus,K.and(_C,kR)?.negate()),primary:2063,mac:{primary:527},weight:100}})}}class H9e extends mg{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:void 0})}}class V9e extends mg{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndLeftSelect",precondition:void 0})}}class z9e extends mg{constructor(){super({inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:K.and(T.textInputFocus,K.and(_C,kR)?.negate()),primary:3087,mac:{primary:1551},weight:100}})}}class U9e extends mg{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0})}_move(e,t,i,n,s){return super._move(Qr(Cs.wordSeparators.defaultValue,e.intlSegmenterLocales),t,i,n,s)}}class $9e extends mg{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0})}_move(e,t,i,n,s){return super._move(Qr(Cs.wordSeparators.defaultValue,e.intlSegmenterLocales),t,i,n,s)}}class j9e extends _g{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}}class q9e extends _g{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{kbExpr:K.and(T.textInputFocus,K.and(_C,kR)?.negate()),primary:2065,mac:{primary:529},weight:100}})}}class K9e extends _g{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}}class G9e extends _g{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}}class Z9e extends _g{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:K.and(T.textInputFocus,K.and(_C,kR)?.negate()),primary:3089,mac:{primary:1553},weight:100}})}}class Y9e extends _g{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}}class X9e extends _g{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0})}_move(e,t,i,n,s){return super._move(Qr(Cs.wordSeparators.defaultValue,e.intlSegmenterLocales),t,i,n,s)}}class Q9e extends _g{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0})}_move(e,t,i,n,s){return super._move(Qr(Cs.wordSeparators.defaultValue,e.intlSegmenterLocales),t,i,n,s)}}class sM extends an{constructor(e){super({canTriggerInlineEdits:!0,...e}),this._whitespaceHeuristics=e.whitespaceHeuristics,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,i){const n=e?.get(ai);if(!t.hasModel()||!n)return;const s=Qr(t.getOption(148),t.getOption(147)),r=t.getModel(),a=t.getSelections(),l=t.getOption(10),c=t.getOption(15),d=n.getLanguageConfiguration(r.getLanguageId()).getAutoClosingPairs(),h=t._getViewModel(),u=a.map(g=>{const f=this._delete({wordSeparators:s,model:r,selection:g,whitespaceHeuristics:this._whitespaceHeuristics,autoClosingDelete:t.getOption(13),autoClosingBrackets:l,autoClosingQuotes:c,autoClosingPairs:d,autoClosedCharacters:h.getCursorAutoClosedCharacters()},this._wordNavigationType);return new Kn(f,"")});t.pushUndoStop(),t.executeCommands(this.id,u),t.pushUndoStop()}}class n6 extends sM{_delete(e,t){const i=vt.deleteWordLeft(e,t);return i||new D(1,1,1,1)}}class s6 extends sM{_delete(e,t){const i=vt.deleteWordRight(e,t);if(i)return i;const n=e.model.getLineCount(),s=e.model.getLineMaxColumn(n);return new D(n,s,n,s)}}class J9e extends n6{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:T.writable})}}class eWe extends n6{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:T.writable})}}class tWe extends n6{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:T.writable,kbOpts:{kbExpr:T.textInputFocus,primary:2049,mac:{primary:513},weight:100}})}}class iWe extends s6{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:T.writable})}}class nWe extends s6{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:T.writable})}}class sWe extends s6{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:T.writable,kbOpts:{kbExpr:T.textInputFocus,primary:2068,mac:{primary:532},weight:100}})}}class oWe extends de{constructor(){super({id:"deleteInsideWord",precondition:T.writable,label:H(1575,"Delete Word")})}run(e,t,i){if(!t.hasModel())return;const n=Qr(t.getOption(148),t.getOption(147)),s=t.getModel(),a=t.getSelections().map(l=>{const c=vt.deleteInsideWord(n,s,l);return new Kn(c,"")});t.pushUndoStop(),t.executeCommands(this.id,a),t.pushUndoStop()}}re(new F9e);re(new W9e);re(new B9e);re(new H9e);re(new V9e);re(new z9e);re(new j9e);re(new q9e);re(new K9e);re(new G9e);re(new Z9e);re(new Y9e);re(new U9e);re(new $9e);re(new X9e);re(new Q9e);re(new J9e);re(new eWe);re(new tWe);re(new iWe);re(new nWe);re(new sWe);oe(oWe);class rWe extends sM{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:T.writable,kbOpts:{kbExpr:T.textInputFocus,primary:0,mac:{primary:769},weight:100}})}_delete(e,t){const i=cR.deleteWordPartLeft(e);return i||new D(1,1,1,1)}}class aWe extends sM{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordPartRight",precondition:T.writable,kbOpts:{kbExpr:T.textInputFocus,primary:0,mac:{primary:788},weight:100}})}_delete(e,t){const i=cR.deleteWordPartRight(e);if(i)return i;const n=e.model.getLineCount(),s=e.model.getLineMaxColumn(n);return new D(n,s,n,s)}}class ose extends nM{_move(e,t,i,n,s){return cR.moveWordPartLeft(e,t,i,s)}}class lWe extends ose{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:void 0,kbOpts:{kbExpr:T.textInputFocus,primary:0,mac:{primary:783},weight:100}})}}st.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft");class cWe extends ose{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:void 0,kbOpts:{kbExpr:T.textInputFocus,primary:0,mac:{primary:1807},weight:100}})}}st.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");class rse extends nM{_move(e,t,i,n,s){return cR.moveWordPartRight(e,t,i)}}class dWe extends rse{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordPartRight",precondition:void 0,kbOpts:{kbExpr:T.textInputFocus,primary:0,mac:{primary:785},weight:100}})}}class hWe extends rse{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordPartRightSelect",precondition:void 0,kbOpts:{kbExpr:T.textInputFocus,primary:0,mac:{primary:1809},weight:100}})}}re(new rWe);re(new aWe);re(new lWe);re(new cWe);re(new dWe);re(new hWe);const S6=class S6 extends F{constructor(e){super(),this.editor=e,this._register(this.editor.onDidAttemptReadOnlyEdit(()=>this._onDidAttemptReadOnlyEdit()))}_onDidAttemptReadOnlyEdit(){const e=Mo.get(this.editor);if(e&&this.editor.hasModel()){let t=this.editor.getOptions().get(105);t||(this.editor.isSimpleWidget?t=new ns(m(1378,"Cannot edit in read-only input")):t=new ns(m(1379,"Cannot edit in read-only editor"))),e.showMessage(t,this.editor.getPosition())}}};S6.ID="editor.contrib.readOnlyMessageController";let IE=S6;ot(IE.ID,IE,2);var uWe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},pG=function(o,e){return function(t,i){e(t,i,o)}};let K9=class extends F{constructor(e,t,i){super(),this._textModel=e,this._languageFeaturesService=t,this._outlineModelService=i,this._currentModel=Ne(this,void 0);const n=ko("documentSymbolProvider.onDidChange",this._languageFeaturesService.documentSymbolProvider.onDidChange),s=ko("_textModel.onDidChangeContent",se.debounce(r=>this._textModel.onDidChangeContent(r),()=>{},100));this._register(as(async(r,a)=>{n.read(r),s.read(r);const l=a.add(new cEe),c=await this._outlineModelService.getOrCreate(this._textModel,l.token);a.isDisposed||this._currentModel.set(c,void 0)}))}getBreadcrumbItems(e,t){const i=this._currentModel.read(t);if(!i)return[];const n=i.asListOfDocumentSymbols().filter(s=>e.contains(s.range.startLineNumber)&&!e.contains(s.range.endLineNumber));return n.sort(QG(Zn(s=>s.range.endLineNumber-s.range.startLineNumber,To))),n.map(s=>({name:s.name,kind:s.kind,startLineNumber:s.range.startLineNumber}))}};K9=uWe([pG(1,ue),pG(2,Ay)],K9);mI.setBreadcrumbsSourceFactory((o,e)=>e.createInstance(K9,o));var gWe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},OP=function(o,e){return function(t,i){e(t,i,o)}},wv;let EE=(wv=class extends F{constructor(e,t,i,n){super();const s=this._register(oi(e)),r=this._register(n.createMenu(ge.EditorContent,e.contextKeyService)),a=pt(this,r.onDidChange,()=>r.getActions().length===0);this._register(ke(l=>{if(a.read(l))return;const d=rt("div.floating-menu-overlay-widget");d.root.style.height="28px";const h=t.createInstance(h0,d.root,ge.EditorContent,{actionViewItemProvider:(u,g)=>{if(!(u instanceof gr))return;const f=i.lookupKeybinding(u.id);if(f)return t.createInstance(class extends eg{updateLabel(){this.options.label&&this.label&&(this.label.textContent=`${this._commandAction.label} (${f.getLabel()})`)}},u,{...g,keybindingNotRenderedWithLabel:!0})},hiddenItemStrategy:0,menuOptions:{shouldForwardArgs:!0},telemetrySource:"editor.overlayToolbar",toolbarOptions:{primaryGroup:()=>!0,useSeparatorsInPrimaryActions:!0}});l.store.add(h),l.store.add(ke(u=>{const g=s.model.read(u);h.context=g?.uri})),l.store.add(s.createOverlayWidget({allowEditorOverflow:!1,domNode:d.root,minContentWidthInPx:Ht(0),position:Ht({preference:1})}))}))}},wv.ID="editor.contrib.floatingToolbar",wv);EE=gWe([OP(1,me),OP(2,ht),OP(3,ta)],EE);ot(EE.ID,EE,1);const y6=class y6 extends F{constructor(e){super(),this.editor=e,this.widget=null,Gr&&(this._register(e.onDidChangeConfiguration(()=>this.update())),this.update())}update(){const e=!this.editor.getOption(104);!this.widget&&e?this.widget=new G9(this.editor):this.widget&&!e&&(this.widget.dispose(),this.widget=null)}dispose(){super.dispose(),this.widget&&(this.widget.dispose(),this.widget=null)}};y6.ID="editor.contrib.iPadShowKeyboard";let NE=y6;const mT=class mT extends F{constructor(e){super(),this.editor=e,this._domNode=document.createElement("textarea"),this._domNode.className="iPadShowKeyboard",this._register(B(this._domNode,"touchstart",t=>{this.editor.focus()})),this._register(B(this._domNode,"focus",t=>{this.editor.focus()})),this.editor.addOverlayWidget(this)}dispose(){this.editor.removeOverlayWidget(this),super.dispose()}getId(){return mT.ID}getDomNode(){return this._domNode}getPosition(){return{preference:1}}};mT.ID="editor.contrib.ShowKeyboardWidget";let G9=mT;ot(NE.ID,NE,3);var fWe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},mG=function(o,e){return function(t,i){e(t,i,o)}},Z9,Yp;let U0=(Yp=class extends F{static get(e){return e.getContribution(Z9.ID)}constructor(e,t,i){super(),this._editor=e,this._languageService=i,this._widget=null,this._register(this._editor.onDidChangeModel(n=>this.stop())),this._register(this._editor.onDidChangeModelLanguage(n=>this.stop())),this._register(_i.onDidChange(n=>this.stop())),this._register(this._editor.onKeyUp(n=>n.keyCode===9&&this.stop()))}dispose(){this.stop(),super.dispose()}launch(){this._widget||this._editor.hasModel()&&(this._widget=new Y9(this._editor,this._languageService))}stop(){this._widget&&(this._widget.dispose(),this._widget=null)}},Z9=Yp,Yp.ID="editor.contrib.inspectTokens",Yp);U0=Z9=fWe([mG(1,yr),mG(2,yi)],U0);class pWe extends de{constructor(){super({id:"editor.action.inspectTokens",label:SF.inspectTokensAction,alias:"Developer: Inspect Tokens",precondition:void 0})}run(e,t){U0.get(t)?.launch()}}function mWe(o){let e="";for(let t=0,i=o.length;t<i;t++){const n=o.charCodeAt(t);switch(n){case 9:e+="→";break;case 32:e+="·";break;default:e+=String.fromCharCode(n)}}return e}function _We(o,e){const t=_i.get(e);if(t)return t;const i=o.encodeLanguageId(e);return{getInitialState:()=>Mv,tokenize:(n,s,r)=>sB(e,r),tokenizeEncoded:(n,s,r)=>XT(i,r)}}const _T=class _T extends F{constructor(e,t){super(),this.allowEditorOverflow=!0,this._editor=e,this._languageService=t,this._model=this._editor.getModel(),this._domNode=document.createElement("div"),this._domNode.className="tokens-inspect-widget",this._tokenizationSupport=_We(this._languageService.languageIdCodec,this._model.getLanguageId()),this._compute(this._editor.getPosition()),this._register(this._editor.onDidChangeCursorPosition(i=>this._compute(this._editor.getPosition()))),this._editor.addContentWidget(this)}dispose(){this._editor.removeContentWidget(this),super.dispose()}getId(){return _T._ID}_compute(e){const t=this._getTokensAtLine(e.lineNumber);let i=0;for(let l=t.tokens1.length-1;l>=0;l--){const c=t.tokens1[l];if(e.column-1>=c.offset){i=l;break}}let n=0;for(let l=t.tokens2.length>>>1;l>=0;l--)if(e.column-1>=t.tokens2[l<<1]){n=l;break}const s=this._model.getLineContent(e.lineNumber);let r="";if(i<t.tokens1.length){const l=t.tokens1[i].offset,c=i+1<t.tokens1.length?t.tokens1[i+1].offset:s.length;r=s.substring(l,c)}mn(this._domNode,te("h2.tm-token",void 0,mWe(r),te("span.tm-token-length",void 0,`${r.length} ${r.length===1?"char":"chars"}`))),Y(this._domNode,te("hr.tokens-inspect-separator",{style:"clear:both"}));const a=(n<<1)+1<t.tokens2.length?this._decodeMetadata(t.tokens2[(n<<1)+1]):null;Y(this._domNode,te("table.tm-metadata-table",void 0,te("tbody",void 0,te("tr",void 0,te("td.tm-metadata-key",void 0,"language"),te("td.tm-metadata-value",void 0,`${a?a.languageId:"-?-"}`)),te("tr",void 0,te("td.tm-metadata-key",void 0,"token type"),te("td.tm-metadata-value",void 0,`${a?this._tokenTypeToString(a.tokenType):"-?-"}`)),te("tr",void 0,te("td.tm-metadata-key",void 0,"font style"),te("td.tm-metadata-value",void 0,`${a?this._fontStyleToString(a.fontStyle):"-?-"}`)),te("tr",void 0,te("td.tm-metadata-key",void 0,"foreground"),te("td.tm-metadata-value",void 0,`${a?$.Format.CSS.formatHex(a.foreground):"-?-"}`)),te("tr",void 0,te("td.tm-metadata-key",void 0,"background"),te("td.tm-metadata-value",void 0,`${a?$.Format.CSS.formatHex(a.background):"-?-"}`))))),Y(this._domNode,te("hr.tokens-inspect-separator")),i<t.tokens1.length&&Y(this._domNode,te("span.tm-token-type",void 0,t.tokens1[i].type)),this._editor.layoutContentWidget(this)}_decodeMetadata(e){const t=_i.getColorMap(),i=is.getLanguageId(e),n=is.getTokenType(e),s=is.getFontStyle(e),r=is.getForeground(e),a=is.getBackground(e);return{languageId:this._languageService.languageIdCodec.decodeLanguageId(i),tokenType:n,fontStyle:s,foreground:t[r],background:t[a]}}_tokenTypeToString(e){switch(e){case 0:return"Other";case 1:return"Comment";case 2:return"String";case 3:return"RegEx";default:return"??"}}_fontStyleToString(e){let t="";return e&1&&(t+="italic "),e&2&&(t+="bold "),e&4&&(t+="underline "),e&8&&(t+="strikethrough "),t.length===0&&(t="---"),t}_getTokensAtLine(e){const t=this._getStateBeforeLine(e),i=this._tokenizationSupport.tokenize(this._model.getLineContent(e),!0,t),n=this._tokenizationSupport.tokenizeEncoded(this._model.getLineContent(e),!0,t);return{startState:t,tokens1:i.tokens,tokens2:n.tokens,endState:i.endState}}_getStateBeforeLine(e){let t=this._tokenizationSupport.getInitialState();for(let i=1;i<e;i++)t=this._tokenizationSupport.tokenize(this._model.getLineContent(i),!0,t).endState;return t}getDomNode(){return this._domNode}getPosition(){return{position:this._editor.getPosition(),preference:[2,1]}}};_T._ID="editor.contrib.inspectTokensWidget";let Y9=_T;ot(U0.ID,U0,4);oe(pWe);var bWe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},_G=function(o,e){return function(t,i){e(t,i,o)}},Ww,Xp;let X9=(Xp=class{constructor(e,t){this.quickInputService=e,this.keybindingService=t,this.registry=gi.as(Km.Quickaccess)}provide(e){const t=new U;return t.add(e.onDidAccept(()=>{const[i]=e.selectedItems;i&&this.quickInputService.quickAccess.show(i.prefix,{preserveValue:!0})})),t.add(e.onDidChangeValue(i=>{const n=this.registry.getQuickAccessProvider(i.substr(Ww.PREFIX.length));n&&n.prefix&&n.prefix!==Ww.PREFIX&&this.quickInputService.quickAccess.show(n.prefix,{preserveValue:!0})})),e.items=this.getQuickAccessProviders().filter(i=>i.prefix!==Ww.PREFIX),t}getQuickAccessProviders(){return this.registry.getQuickAccessProviders().sort((t,i)=>t.prefix.localeCompare(i.prefix)).flatMap(t=>this.createPicks(t))}createPicks(e){return e.helpEntries.map(t=>{const i=t.prefix||e.prefix,n=i||"…";return{prefix:i,label:n,keybinding:t.commandId?this.keybindingService.lookupKeybinding(t.commandId):void 0,ariaLabel:m(1747,"{0}, {1}",n,t.description),description:t.description}})}},Ww=Xp,Xp.PREFIX="?",Xp);X9=Ww=bWe([_G(0,ds),_G(1,ht)],X9);gi.as(Km.Quickaccess).registerQuickAccessProvider({ctor:X9,prefix:"",helpEntries:[{description:yF.helpQuickAccessActionLabel}]});class ase{constructor(e){this.options=e,this.rangeHighlightDecorationId=void 0}provide(e,t,i){const n=new U;e.canAcceptInBackground=!!this.options?.canAcceptInBackground,e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;const s=n.add(new _t);return s.value=this.doProvide(e,t,i),n.add(this.onDidActiveTextEditorControlChange(()=>{s.value=void 0,s.value=this.doProvide(e,t)})),n}doProvide(e,t,i){const n=new U,s=this.activeTextEditorControl;if(s&&this.canProvideWithTextEditor(s)){const r={editor:s},a=gte(s);if(a){let l=s.saveViewState()??void 0;n.add(a.onDidChangeCursorPosition(()=>{l=s.saveViewState()??void 0})),r.restoreViewState=()=>{l&&s===this.activeTextEditorControl&&s.restoreViewState(l)},n.add(em(t.onCancellationRequested)(()=>r.restoreViewState?.()))}n.add(fe(()=>this.clearDecorations(s))),n.add(this.provideWithTextEditor(r,e,t,i))}else n.add(this.provideWithoutTextEditor(e,t));return n}canProvideWithTextEditor(e){return!0}gotoLocation({editor:e},t){e.setSelection(t.range,"code.jump"),e.revealRangeInCenter(t.range,0),t.preserveFocus||e.focus();const i=e.getModel();i&&"getLineContent"in i&&ul(`${i.getLineContent(t.range.startLineNumber)}`)}getModel(e){return nH(e)?e.getModel()?.modified:e.getModel()}addDecorations(e,t){e.changeDecorations(i=>{const n=[];this.rangeHighlightDecorationId&&(n.push(this.rangeHighlightDecorationId.overviewRulerDecorationId),n.push(this.rangeHighlightDecorationId.rangeHighlightId),this.rangeHighlightDecorationId=void 0);const s=[{range:t,options:{description:"quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:t,options:{description:"quick-access-range-highlight-overview",overviewRuler:{color:bi($X),position:pr.Full}}}],[r,a]=i.deltaDecorations(n,s);this.rangeHighlightDecorationId={rangeHighlightId:r,overviewRulerDecorationId:a}})}clearDecorations(e){const t=this.rangeHighlightDecorationId;t&&(e.changeDecorations(i=>{i.deltaDecorations([t.overviewRulerDecorationId,t.rangeHighlightId],[])}),this.rangeHighlightDecorationId=void 0)}}const Cf=class Cf extends ase{constructor(){super({canAcceptInBackground:!0})}get useZeroBasedOffset(){return this.storageService.getBoolean(Cf.ZERO_BASED_OFFSET_STORAGE_KEY,-1,!1)}set useZeroBasedOffset(e){this.storageService.store(Cf.ZERO_BASED_OFFSET_STORAGE_KEY,e,-1,0)}provideWithoutTextEditor(e){const t=m(1335,"Open a text editor first to go to a line.");return e.items=[{label:t}],e.ariaLabel=t,F.None}provideWithTextEditor(e,t,i){const n=e.editor,s=new U;s.add(t.onDidAccept(c=>{const[d]=t.selectedItems;if(d){if(!d.lineNumber)return;this.gotoLocation(e,{range:this.toRange(d.lineNumber,d.column),keyMods:t.keyMods,preserveFocus:c.inBackground}),c.inBackground||t.hide()}}));const r=()=>{const c=t.value.trim().substring(Cf.PREFIX.length),{inOffsetMode:d,lineNumber:h,column:u,label:g}=this.parsePosition(n,c);if(a.visible=!!d,t.items=[{lineNumber:h,column:u,label:g}],t.ariaLabel=g,!h){this.clearDecorations(n);return}const f=this.toRange(h,u);n.revealRangeInCenter(f,0),this.addDecorations(n,f)},a=new _h({title:m(1336,"Use Zero-Based Offset"),icon:Z.indexZero,isChecked:this.useZeroBasedOffset,inputActiveOptionBorder:ee(ly),inputActiveOptionForeground:ee(cy),inputActiveOptionBackground:ee(CC)});s.add(a.onChange(()=>{this.useZeroBasedOffset=!this.useZeroBasedOffset,r()})),t.toggles=[a],r(),s.add(t.onDidChangeValue(()=>r()));const l=gte(n);return l&&l.getOptions().get(76).renderType===2&&(l.updateOptions({lineNumbers:"on"}),s.add(fe(()=>l.updateOptions({lineNumbers:"relative"})))),s}toRange(e=1,t=1){return{startLineNumber:e,startColumn:t,endLineNumber:e,endColumn:t}}parsePosition(e,t){const i=this.getModel(e);if(!i)return{label:m(1337,"Open a text editor first to go to a line.")};if(t.startsWith(":")){let n=parseInt(t.substring(1),10);const s=i.getValueLength();if(isNaN(n))return{inOffsetMode:!0,label:this.useZeroBasedOffset?m(1338,"Type a character position to go to (from 0 to {0}).",s-1):m(1339,"Type a character position to go to (from 1 to {0}).",s)};{const r=n<0;this.useZeroBasedOffset||(n-=Math.sign(n)),r&&(n+=s);const a=i.getPositionAt(n);return{...a,inOffsetMode:!0,label:m(1340,"Press 'Enter' to go to line {0} at column {1}.",a.lineNumber,a.column)}}}else{const n=t.split(/,|:|#/),s=i.getLineCount();let r=parseInt(n[0]?.trim(),10);if(n.length<1||isNaN(r))return{label:m(1341,"Type a line number to go to (from 1 to {0}).",s)};r=r>=0?r:s+1+r,r=Math.min(Math.max(1,r),s);const a=i.getLineMaxColumn(r);let l=parseInt(n[1]?.trim(),10);return n.length<2||isNaN(l)?{lineNumber:r,column:1,label:n.length<2?m(1342,"Press 'Enter' to go to line {0} or enter : to add a column number.",r):m(1343,"Press 'Enter' to go to line {0} or enter a column number (from 1 to {1}).",r,a)}:(l=l>=0?l:a+l,l=Math.min(Math.max(1,l),a),{lineNumber:r,column:l,label:m(1344,"Press 'Enter' to go to line {0} at column {1}.",r,l)})}}};Cf.PREFIX=":",Cf.ZERO_BASED_OFFSET_STORAGE_KEY="gotoLine.useZeroBasedOffset";let Q9=Cf;var vWe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},bG=function(o,e){return function(t,i){e(t,i,o)}};let $0=class extends Q9{constructor(e,t){super(),this.editorService=e,this.storageService=t,this.onDidActiveTextEditorControlChange=se.None}get activeTextEditorControl(){return this.editorService.getFocusedCodeEditor()??void 0}};$0=vWe([bG(0,lt),bG(1,Es)],$0);var Qp;let lse=(Qp=class extends de{constructor(){super({id:Qp.ID,label:Fk.gotoLineActionLabel,alias:"Go to Line/Column...",precondition:void 0,kbOpts:{kbExpr:T.focus,primary:2085,mac:{primary:293},weight:100}})}run(e){e.get(ds).quickAccess.show($0.PREFIX)}},Qp.ID="editor.action.gotoLine",Qp);oe(lse);gi.as(Km.Quickaccess).registerQuickAccessProvider({ctor:$0,prefix:$0.PREFIX,helpEntries:[{description:Fk.gotoLineActionLabel,commandId:lse.ID}]});const cse=[void 0,[]];function FP(o,e,t=0,i=0){const n=e;return n.values&&n.values.length>1?CWe(o,n.values,t,i):dse(o,e,t,i)}function CWe(o,e,t,i){let n=0;const s=[];for(const r of e){const[a,l]=dse(o,r,t,i);if(typeof a!="number")return cse;n+=a,s.push(...l)}return[n,wWe(s)]}function dse(o,e,t,i){const n=fm(e.original,e.originalLowercase,t,o,o.toLowerCase(),i,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return n?[n[0],my(n)]:cse}function wWe(o){const e=o.sort((n,s)=>n.start-s.start),t=[];let i;for(const n of e)!i||!SWe(i,n)?(i=n,t.push(n)):(i.start=Math.min(i.start,n.start),i.end=Math.max(i.end,n.end));return t}function SWe(o,e){return!(o.end<e.start||e.end<o.start)}function vG(o){return o.startsWith('"')&&o.endsWith('"')}const hse=" ";function J9(o){typeof o!="string"&&(o="");const e=o.toLowerCase(),{pathNormalized:t,normalized:i,normalizedLowercase:n}=CG(o),s=t.indexOf(ol)>=0,r=vG(o);let a;const l=o.split(hse);if(l.length>1)for(const c of l){const d=vG(c),{pathNormalized:h,normalized:u,normalizedLowercase:g}=CG(c);u&&(a||(a=[]),a.push({original:c,originalLowercase:c.toLowerCase(),pathNormalized:h,normalized:u,normalizedLowercase:g,expectContiguousMatch:d}))}return{original:o,originalLowercase:e,pathNormalized:t,normalized:i,normalizedLowercase:n,values:a,containsPathSeparator:s,expectContiguousMatch:r}}function CG(o){let e;Rn?e=o.replace(/\//g,ol):e=o.replace(/\\/g,ol);const t=e.replace(/[\*\u2026\s"]/g,"");return{pathNormalized:e,normalized:t,normalizedLowercase:t.toLowerCase()}}function wG(o){return Array.isArray(o)?J9(o.map(e=>e.original).join(hse)):J9(o.original)}var yWe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},SG=function(o,e){return function(t,i){e(t,i,o)}},aD,Ja;let Jf=(Ja=class extends ase{constructor(e,t,i=Object.create(null)){super(i),this._languageFeaturesService=e,this._outlineModelService=t,this.options=i,this.options.canAcceptInBackground=!0}provideWithoutTextEditor(e){return this.provideLabelPick(e,m(1345,"To go to a symbol, first open a text editor with symbol information.")),F.None}provideWithTextEditor(e,t,i,n){const s=e.editor,r=this.getModel(s);return r?this._languageFeaturesService.documentSymbolProvider.has(r)?this.doProvideWithEditorSymbols(e,r,t,i,n):this.doProvideWithoutEditorSymbols(e,r,t,i):F.None}doProvideWithoutEditorSymbols(e,t,i,n){const s=new U;return this.provideLabelPick(i,m(1346,"The active text editor does not provide symbol information.")),(async()=>!await this.waitForLanguageSymbolRegistry(t,s)||n.isCancellationRequested||s.add(this.doProvideWithEditorSymbols(e,t,i,n)))(),s}provideLabelPick(e,t){e.items=[{label:t,index:0,kind:14}],e.ariaLabel=t}async waitForLanguageSymbolRegistry(e,t){if(this._languageFeaturesService.documentSymbolProvider.has(e))return!0;const i=new Fm,n=t.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(()=>{this._languageFeaturesService.documentSymbolProvider.has(e)&&(n.dispose(),i.complete(!0))}));return t.add(fe(()=>i.complete(!1))),i.p}doProvideWithEditorSymbols(e,t,i,n,s){const r=e.editor,a=new U;a.add(i.onDidAccept(h=>{const[u]=i.selectedItems;u&&u.range&&(this.gotoLocation(e,{range:u.range.selection,keyMods:i.keyMods,preserveFocus:h.inBackground}),s?.handleAccept?.(u,h.inBackground),h.inBackground||i.hide())})),a.add(i.onDidTriggerItemButton(({item:h})=>{h&&h.range&&(this.gotoLocation(e,{range:h.range.selection,keyMods:i.keyMods,forceSideBySide:!0}),i.hide())}));const l=this.getDocumentSymbols(t,n),c=a.add(new _t),d=async h=>{c?.value?.cancel(),i.busy=!1,c.value=new ei,i.busy=!0;try{const u=J9(i.value.substr(aD.PREFIX.length).trim()),g=await this.doGetSymbolPicks(l,u,void 0,c.value.token,t);if(n.isCancellationRequested)return;if(g.length>0){if(i.items=g,h&&u.original.length===0){const f=vS(g,p=>!!(p.type!=="separator"&&p.range&&D.containsPosition(p.range.decoration,h)));f&&(i.activeItems=[f])}}else u.original.length>0?this.provideLabelPick(i,m(1347,"No matching editor symbols")):this.provideLabelPick(i,m(1348,"No editor symbols"))}finally{n.isCancellationRequested||(i.busy=!1)}};return a.add(i.onDidChangeValue(()=>d(void 0))),d(r.getSelection()?.getPosition()),a.add(i.onDidChangeActive(()=>{const[h]=i.activeItems;h&&h.range&&(r.revealRangeInCenter(h.range.selection,0),this.addDecorations(r,h.range.decoration))})),a}async doGetSymbolPicks(e,t,i,n,s){const r=await e;if(n.isCancellationRequested)return[];const a=t.original.indexOf(aD.SCOPE_PREFIX)===0,l=a?1:0;let c,d;t.values&&t.values.length>1?(c=wG(t.values[0]),d=wG(t.values.slice(1))):c=t;let h;const u=this.options?.openSideBySideDirection?.();u&&(h=[{iconClass:u==="right"?ye.asClassName(Z.splitHorizontal):ye.asClassName(Z.splitVertical),tooltip:u==="right"?m(1349,"Open to the Side"):m(1350,"Open to the Bottom")}]);const g=[];for(let _=0;_<r.length;_++){const b=r[_],v=$le(b.name),w=`$(${ED.toIcon(b.kind).id}) ${v}`,C=w.length-v.length;let S=b.containerName;i?.extraContainerLabel&&(S?S=`${i.extraContainerLabel} • ${S}`:S=i.extraContainerLabel);let L,x,k,I;if(t.original.length>l){let A=!1;if(c!==t&&([L,x]=FP(w,{...t,values:void 0},l,C),typeof L=="number"&&(A=!0)),typeof L!="number"&&([L,x]=FP(w,c,l,C),typeof L!="number"))continue;if(!A&&d){if(S&&d.original.length>0&&([k,I]=FP(S,d)),typeof k!="number")continue;typeof L=="number"&&(L+=k)}}const R=b.tags&&b.tags.indexOf(1)>=0;g.push({index:_,kind:b.kind,score:L,label:w,ariaLabel:Fle(b.name,b.kind),description:S,highlights:R?void 0:{label:x,description:I},range:{selection:D.collapseToStart(b.selectionRange),decoration:b.range},uri:s.uri,symbolName:v,strikethrough:R,buttons:h})}const f=g.sort((_,b)=>a?this.compareByKindAndScore(_,b):this.compareByScore(_,b));let p=[];if(a){let w=function(){b&&typeof _=="number"&&v>0&&(b.label=sm(BP[_]||WP,v))},_,b,v=0;for(const C of f)_!==C.kind?(w(),_=C.kind,v=1,b={type:"separator"},p.push(b)):v++,p.push(C);w()}else f.length>0&&(p=[{label:m(1351,"symbols ({0})",g.length),type:"separator"},...f]);return p}compareByScore(e,t){if(typeof e.score!="number"&&typeof t.score=="number")return 1;if(typeof e.score=="number"&&typeof t.score!="number")return-1;if(typeof e.score=="number"&&typeof t.score=="number"){if(e.score>t.score)return-1;if(e.score<t.score)return 1}return e.index<t.index?-1:e.index>t.index?1:0}compareByKindAndScore(e,t){const i=BP[e.kind]||WP,n=BP[t.kind]||WP,s=i.localeCompare(n);return s===0?this.compareByScore(e,t):s}async getDocumentSymbols(e,t){const i=await this._outlineModelService.getOrCreate(e,t);return t.isCancellationRequested?[]:i.asListOfDocumentSymbols()}},aD=Ja,Ja.PREFIX="@",Ja.SCOPE_PREFIX=":",Ja.PREFIX_BY_CATEGORY=`${Ja.PREFIX}${Ja.SCOPE_PREFIX}`,Ja);Jf=aD=yWe([SG(0,ue),SG(1,Ay)],Jf);const WP=m(1352,"properties ({0})"),BP={5:m(1353,"methods ({0})"),11:m(1354,"functions ({0})"),8:m(1355,"constructors ({0})"),12:m(1356,"variables ({0})"),4:m(1357,"classes ({0})"),22:m(1358,"structs ({0})"),23:m(1359,"events ({0})"),24:m(1360,"operators ({0})"),10:m(1361,"interfaces ({0})"),2:m(1362,"namespaces ({0})"),3:m(1363,"packages ({0})"),25:m(1364,"type parameters ({0})"),1:m(1365,"modules ({0})"),6:m(1366,"properties ({0})"),9:m(1367,"enumerations ({0})"),21:m(1368,"enumeration members ({0})"),14:m(1369,"strings ({0})"),0:m(1370,"files ({0})"),17:m(1371,"arrays ({0})"),15:m(1372,"numbers ({0})"),16:m(1373,"booleans ({0})"),18:m(1374,"objects ({0})"),19:m(1375,"keys ({0})"),7:m(1376,"fields ({0})"),13:m(1377,"constants ({0})")};var LWe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},HP=function(o,e){return function(t,i){e(t,i,o)}};let eW=class extends Jf{constructor(e,t,i){super(t,i),this.editorService=e,this.onDidActiveTextEditorControlChange=se.None}get activeTextEditorControl(){return this.editorService.getFocusedCodeEditor()??void 0}};eW=LWe([HP(0,lt),HP(1,ue),HP(2,Ay)],eW);const bT=class bT extends de{constructor(){super({id:bT.ID,label:QS.quickOutlineActionLabel,alias:"Go to Symbol...",precondition:T.hasDocumentSymbolProvider,kbOpts:{kbExpr:T.focus,primary:3117,weight:100},contextMenuOpts:{group:"navigation",order:3}})}run(e){e.get(ds).quickAccess.show(Jf.PREFIX,{itemActivation:ja.NONE})}};bT.ID="editor.action.quickOutline";let TE=bT;oe(TE);gi.as(Km.Quickaccess).registerQuickAccessProvider({ctor:eW,prefix:Jf.PREFIX,helpEntries:[{description:QS.quickOutlineActionLabel,prefix:Jf.PREFIX,commandId:TE.ID},{description:QS.quickOutlineByCategoryActionLabel,prefix:Jf.PREFIX_BY_CATEGORY}]});function xWe(o){const e=new Map;for(const t of o)e.set(t,(e.get(t)??0)+1);return e}class R1{constructor(){this.chunkCount=0,this.chunkOccurrences=new Map,this.documents=new Map}calculateScores(e,t){const i=this.computeEmbedding(e),n=new Map,s=[];for(const[r,a]of this.documents){if(t.isCancellationRequested)return[];for(const l of a.chunks){const c=this.computeSimilarityScore(l,i,n);c>0&&s.push({key:r,score:c})}}return s}static termFrequencies(e){return xWe(R1.splitTerms(e))}static*splitTerms(e){const t=i=>i.toLowerCase();for(const[i]of e.matchAll(new RegExp("\\b\\p{Letter}[\\p{Letter}\\d]{2,}\\b","gu"))){yield t(i);const n=i.replace(/([a-z])([A-Z])/g,"$1 $2").split(/\s+/g);if(n.length>1)for(const s of n)s.length>2&&new RegExp("\\p{Letter}{3,}","gu").test(s)&&(yield t(s))}}updateDocuments(e){for(const{key:t}of e)this.deleteDocument(t);for(const t of e){const i=[];for(const n of t.textChunks){const s=R1.termFrequencies(n);for(const r of s.keys())this.chunkOccurrences.set(r,(this.chunkOccurrences.get(r)??0)+1);i.push({text:n,tf:s})}this.chunkCount+=i.length,this.documents.set(t.key,{chunks:i})}return this}deleteDocument(e){const t=this.documents.get(e);if(t){this.documents.delete(e),this.chunkCount-=t.chunks.length;for(const i of t.chunks)for(const n of i.tf.keys()){const s=this.chunkOccurrences.get(n);if(typeof s=="number"){const r=s-1;r<=0?this.chunkOccurrences.delete(n):this.chunkOccurrences.set(n,r)}}}}computeSimilarityScore(e,t,i){let n=0;for(const[s,r]of Object.entries(t)){const a=e.tf.get(s);if(!a)continue;let l=i.get(s);typeof l!="number"&&(l=this.computeIdf(s),i.set(s,l));const c=a*l;n+=c*r}return n}computeEmbedding(e){const t=R1.termFrequencies(e);return this.computeTfidf(t)}computeIdf(e){const t=this.chunkOccurrences.get(e)??0;return t>0?Math.log((this.chunkCount+1)/t):0}computeTfidf(e){const t=Object.create(null);for(const[i,n]of e){const s=this.computeIdf(i);s>0&&(t[i]=n*s)}return t}}function DWe(o){const e=o.slice(0);e.sort((i,n)=>n.score-i.score);const t=e[0]?.score??0;if(t>0)for(const i of e)i.score/=t;return e}var ub;(function(o){o[o.NO_ACTION=0]="NO_ACTION",o[o.CLOSE_PICKER=1]="CLOSE_PICKER",o[o.REFRESH_PICKER=2]="REFRESH_PICKER",o[o.REMOVE_ITEM=3]="REMOVE_ITEM"})(ub||(ub={}));function VP(o){return Array.isArray(o.items)}function yG(o){const e=o;return!!e.picks&&e.additionalPicks instanceof Promise}class kWe extends F{constructor(e,t){super(),this.prefix=e,this.options=t}provide(e,t,i){const n=new U;e.canAcceptInBackground=!!this.options?.canAcceptInBackground,e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;let s;const r=n.add(new _t),a=async()=>{s?.dispose(!0),e.busy=!1;const c=r.value=new U;s=c.add(new ei(t));const d=s.token;let h=e.value.substring(this.prefix.length);this.options?.shouldSkipTrimPickFilter||(h=h.trim());const u=this._getPicks(h,c,d,i),g=(p,_)=>{let b,v;if(VP(p)?(b=p.items,v=p.active):b=p,b.length===0){if(_)return!1;(h.length>0||e.hideInput)&&this.options?.noResultsPick&&(Jp(this.options.noResultsPick)?b=[this.options.noResultsPick(h)]:b=[this.options.noResultsPick])}return e.items=b,v&&(e.activeItems=[v]),!0},f=async p=>{let _=!1,b=!1;await Promise.all([(async()=>{typeof p.mergeDelay=="number"&&(await _c(p.mergeDelay),d.isCancellationRequested)||b||(_=g(p.picks,!0))})(),(async()=>{e.busy=!0;try{const v=await p.additionalPicks;if(d.isCancellationRequested)return;let w,C;VP(p.picks)?(w=p.picks.items,C=p.picks.active):w=p.picks;let S,L;if(VP(v)?(S=v.items,L=v.active):S=v,S.length>0||!_){let x;if(!C&&!L){const k=e.activeItems[0];k&&w.indexOf(k)!==-1&&(x=k)}g({items:[...w,...S],active:C||L||x})}}finally{d.isCancellationRequested||(e.busy=!1),b=!0}})()])};if(u!==null)if(yG(u))await f(u);else if(!(u instanceof Promise))g(u);else{e.busy=!0;try{const p=await u;if(d.isCancellationRequested)return;yG(p)?await f(p):g(p)}finally{d.isCancellationRequested||(e.busy=!1)}}};n.add(e.onDidChangeValue(()=>a())),a(),n.add(e.onDidAccept(c=>{if(i?.handleAccept){c.inBackground||e.hide(),i.handleAccept?.(e.activeItems[0],c.inBackground);return}const[d]=e.selectedItems;typeof d?.accept=="function"&&(c.inBackground||e.hide(),d.accept(e.keyMods,c))}));const l=async(c,d)=>{if(typeof d.trigger!="function")return;const h=d.buttons?.indexOf(c)??-1;if(h>=0){const u=d.trigger(h,e.keyMods),g=typeof u=="number"?u:await u;if(t.isCancellationRequested)return;switch(g){case ub.NO_ACTION:break;case ub.CLOSE_PICKER:e.hide();break;case ub.REFRESH_PICKER:a();break;case ub.REMOVE_ITEM:{const f=e.items.indexOf(d);if(f!==-1){const p=e.items.slice(),_=p.splice(f,1),b=e.activeItems.filter(w=>w!==_[0]),v=e.keepScrollPosition;e.keepScrollPosition=!0,e.items=p,b&&(e.activeItems=b),e.keepScrollPosition=v}break}}}};return n.add(e.onDidTriggerItemButton(({button:c,item:d})=>l(c,d))),n.add(e.onDidTriggerSeparatorButton(({button:c,separator:d})=>l(c,d))),n}}new Ta(1e4);const IWe=new Ta(1e4);function EWe(o){return TWe(o,"NFD",IWe)}const NWe=/[^\u0000-\u0080]/;function TWe(o,e,t){if(!o)return o;const i=t.get(o);if(i)return i;let n;return NWe.test(o)?n=o.normalize(e):n=o,t.set(o,n),n}const RWe=(function(){const o=/[\u0300-\u036f]/g;return function(e){return EWe(e).replace(o,"")}})();var use=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Zh=function(o,e){return function(t,i){e(t,i,o)}},jg,Yi,oc;let tW=(oc=class extends kWe{constructor(e,t,i,n,s,r){super(jg.PREFIX,e),this.keybindingService=i,this.commandService=n,this.telemetryService=s,this.dialogService=r,this.commandsHistory=this._register(t.createInstance(iW)),this.options=e}async _getPicks(e,t,i,n){const s=await this.getCommandPicks(i);if(i.isCancellationRequested)return[];const r=em(()=>{const f=new R1;f.updateDocuments(s.map(_=>({key:_.commandId,textChunks:[this.getTfIdfChunk(_)]})));const p=f.calculateScores(e,i);return DWe(p).filter(_=>_.score>jg.TFIDF_THRESHOLD).slice(0,jg.TFIDF_MAX_RESULTS)}),a=this.normalizeForFiltering(e),l=[];for(const f of s){f.labelNoAccents??=this.normalizeForFiltering(f.label);const p=jg.WORD_FILTER(a,f.labelNoAccents)??void 0;let _;if(f.commandAlias&&(f.aliasNoAccents??=this.normalizeForFiltering(f.commandAlias),_=jg.WORD_FILTER(a,f.aliasNoAccents)??void 0),p||_)f.highlights={label:p,detail:this.options.showAlias?_:void 0},l.push(f);else if(e===f.commandId)l.push(f);else if(e.length>=3){const b=r();if(i.isCancellationRequested)return[];const v=b.find(w=>w.key===f.commandId);v&&(f.tfIdfScore=v.score,l.push(f))}}const c=new Map;for(const f of l){const p=c.get(f.label);p?(f.description=f.commandId,p.description=p.commandId):c.set(f.label,f)}l.sort((f,p)=>{if(f.tfIdfScore&&p.tfIdfScore)return f.tfIdfScore===p.tfIdfScore?f.label.localeCompare(p.label):p.tfIdfScore-f.tfIdfScore;if(f.tfIdfScore)return 1;if(p.tfIdfScore)return-1;const _=this.commandsHistory.peek(f.commandId),b=this.commandsHistory.peek(p.commandId);if(_&&b)return _>b?-1:1;if(_)return-1;if(b)return 1;if(this.options.suggestedCommandIds){const C=this.options.suggestedCommandIds.has(f.commandId),S=this.options.suggestedCommandIds.has(p.commandId);if(C&&S)return 0;if(C)return-1;if(S)return 1}const v=f.commandCategory===M9.Developer.value,w=p.commandCategory===M9.Developer.value;return v&&!w?1:!v&&w?-1:f.label.localeCompare(p.label)});const d=[];let h=!1,u=!0,g=!!this.options.suggestedCommandIds;for(let f=0;f<l.length;f++){const p=l[f];f===0&&this.commandsHistory.peek(p.commandId)&&(d.push({type:"separator",label:m(1740,"recently used")}),h=!0),u&&p.tfIdfScore!==void 0&&(d.push({type:"separator",label:m(1741,"similar commands")}),u=!1),g&&p.tfIdfScore===void 0&&!this.commandsHistory.peek(p.commandId)&&this.options.suggestedCommandIds?.has(p.commandId)&&(d.push({type:"separator",label:m(1742,"commonly used")}),h=!0,g=!1),h&&p.tfIdfScore===void 0&&!this.commandsHistory.peek(p.commandId)&&!this.options.suggestedCommandIds?.has(p.commandId)&&(d.push({type:"separator",label:m(1743,"other commands")}),h=!1),d.push(this.toCommandPick(p,n))}return this.hasAdditionalCommandPicks(e,i)?{picks:d,additionalPicks:(async()=>{const f=await this.getAdditionalCommandPicks(s,l,e,i);if(i.isCancellationRequested)return[];const p=f.map(_=>this.toCommandPick(_,n));return u&&p[0]?.type!=="separator"&&p.unshift({type:"separator",label:m(1744,"similar commands")}),p})()}:d}toCommandPick(e,t){if(e.type==="separator")return e;const i=this.keybindingService.lookupKeybinding(e.commandId),n=i?m(1745,"{0}, {1}",e.label,i.getAriaLabel()):e.label;return{...e,ariaLabel:n,detail:this.options.showAlias&&e.commandAlias!==e.label?e.commandAlias:void 0,keybinding:i,accept:async()=>{this.commandsHistory.push(e.commandId),this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.commandId,from:t?.from??"quick open"});try{e.args?.length?await this.commandService.executeCommand(e.commandId,...e.args):await this.commandService.executeCommand(e.commandId)}catch(s){Cr(s)||this.dialogService.error(m(1746,"Command '{0}' resulted in an error",e.label),LI(s))}}}}getTfIdfChunk({label:e,commandAlias:t,commandDescription:i}){let n=e;return t&&t!==e&&(n+=` - ${t}`),i&&i.value!==e&&(n+=` - ${i.value===i.original?i.value:`${i.value} (${i.original})`}`),n}normalizeForFiltering(e){const t=RWe(e);return t.length!==e.length?(this.telemetryService.publicLog2("QuickAccess:FilterLengthMismatch",{originalLength:e.length,normalizedLength:t.length}),e):t}},jg=oc,oc.PREFIX=">",oc.TFIDF_THRESHOLD=.5,oc.TFIDF_MAX_RESULTS=5,oc.WORD_FILTER=o8(jS,VSe,nJ),oc);tW=jg=use([Zh(1,me),Zh(2,ht),Zh(3,$t),Zh(4,us),Zh(5,py)],tW);var el;let iW=(el=class extends F{constructor(e,t,i){super(),this.storageService=e,this.configurationService=t,this.logService=i,this.configuredCommandsHistoryLength=0,this.updateConfiguration(),this.load(),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(e=>this.updateConfiguration(e))),this._register(this.storageService.onWillSaveState(e=>{e.reason===Cu.SHUTDOWN&&this.saveState()}))}updateConfiguration(e){e&&!e.affectsConfiguration("workbench.commandPalette.history")||(this.configuredCommandsHistoryLength=Yi.getConfiguredCommandHistoryLength(this.configurationService),Yi.cache&&Yi.cache.limit!==this.configuredCommandsHistoryLength&&(Yi.cache.limit=this.configuredCommandsHistoryLength,Yi.hasChanges=!0))}load(){const e=this.storageService.get(Yi.PREF_KEY_CACHE,0);let t;if(e)try{t=JSON.parse(e)}catch(n){this.logService.error(`[CommandsHistory] invalid data: ${n}`)}const i=Yi.cache=new Ta(this.configuredCommandsHistoryLength,1);if(t){let n;t.usesLRU?n=t.entries:n=t.entries.sort((s,r)=>s.value-r.value),n.forEach(s=>i.set(s.key,s.value))}Yi.counter=this.storageService.getNumber(Yi.PREF_KEY_COUNTER,0,Yi.counter)}push(e){Yi.cache&&(Yi.cache.set(e,Yi.counter++),Yi.hasChanges=!0)}peek(e){return Yi.cache?.peek(e)}saveState(){if(!Yi.cache||!Yi.hasChanges)return;const e={usesLRU:!0,entries:[]};Yi.cache.forEach((t,i)=>e.entries.push({key:i,value:t})),this.storageService.store(Yi.PREF_KEY_CACHE,JSON.stringify(e),0,0),this.storageService.store(Yi.PREF_KEY_COUNTER,Yi.counter,0,0),Yi.hasChanges=!1}static getConfiguredCommandHistoryLength(e){const i=e.getValue().workbench?.commandPalette?.history;return typeof i=="number"?i:Yi.DEFAULT_COMMANDS_HISTORY_LENGTH}},Yi=el,el.DEFAULT_COMMANDS_HISTORY_LENGTH=50,el.PREF_KEY_CACHE="commandPalette.mru.cache",el.PREF_KEY_COUNTER="commandPalette.mru.counter",el.counter=1,el.hasChanges=!1,el);iW=Yi=use([Zh(0,Es),Zh(1,We),Zh(2,Ut)],iW);class MWe extends tW{constructor(e,t,i,n,s,r){super(e,t,i,n,s,r)}getCodeEditorCommandPicks(){const e=this.activeTextEditorControl;if(!e)return[];const t=[];for(const i of e.getSupportedActions()){let n;i.metadata?.description&&(Exe(i.metadata.description)?n=i.metadata.description:n={original:i.metadata.description,value:i.metadata.description}),t.push({commandId:i.id,commandAlias:i.alias,commandDescription:n,label:h8(i.label)||i.id})}return t}}var PWe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},M_=function(o,e){return function(t,i){e(t,i,o)}};let j0=class extends MWe{get activeTextEditorControl(){return this.codeEditorService.getFocusedCodeEditor()??void 0}constructor(e,t,i,n,s,r){super({showAlias:!1},e,i,n,s,r),this.codeEditorService=t}async getCommandPicks(){return this.getCodeEditorCommandPicks()}hasAdditionalCommandPicks(){return!1}async getAdditionalCommandPicks(){return[]}};j0=PWe([M_(0,me),M_(1,lt),M_(2,ht),M_(3,$t),M_(4,us),M_(5,py)],j0);const vT=class vT extends de{constructor(){super({id:vT.ID,label:Wk.quickCommandActionLabel,alias:"Command Palette",precondition:void 0,kbOpts:{kbExpr:T.focus,primary:59,weight:100},contextMenuOpts:{group:"z_commands",order:1}})}run(e){e.get(ds).quickAccess.show(j0.PREFIX)}};vT.ID="editor.action.quickCommand";let RE=vT;oe(RE);gi.as(Km.Quickaccess).registerQuickAccessProvider({ctor:j0,prefix:j0.PREFIX,helpEntries:[{description:Wk.quickCommandHelp,commandId:RE.ID}]});var AWe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},P_=function(o,e){return function(t,i){e(t,i,o)}};let nW=class extends Nm{constructor(e,t,i,n,s,r,a){super(!0,e,t,i,n,s,r,a)}};nW=AWe([P_(1,Te),P_(2,lt),P_(3,Li),P_(4,me),P_(5,Es),P_(6,We)],nW);ot(Nm.ID,nW,4);class OWe extends de{constructor(){super({id:"editor.action.toggleHighContrast",label:xF.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0}),this._originalThemeName=null}run(e,t){const i=e.get(yr),n=i.getColorTheme();ll(n.type)?(i.setTheme(this._originalThemeName||(nh(n.type)?Xb:wd)),this._originalThemeName=null):(i.setTheme(nh(n.type)?Yf:Xf),this._originalThemeName=n.themeName)}}oe(OWe);let o6=class{constructor(e,t,i){this._onDidChange=new ig,this._languageId=e,this.setOptions(t),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this.options}get options(){return this._options}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setDiagnosticsOptions(e){this.setOptions(e)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}};const r6={validate:!0,lint:{compatibleVendorPrefixes:"ignore",vendorPrefix:"warning",duplicateProperties:"warning",emptyRules:"warning",importStatement:"ignore",boxModel:"ignore",universalSelector:"ignore",zeroUnits:"ignore",fontFaceProperties:"warning",hexColorLength:"error",argumentsInColorFunction:"error",unknownProperties:"warning",ieHack:"ignore",unknownVendorSpecificProperties:"ignore",propertyIgnoredDueToDisplay:"warning",important:"ignore",float:"ignore",idSelector:"ignore"},data:{useDefaultDataProvider:!0},format:{newlineBetweenSelectors:!0,newlineBetweenRules:!0,spaceAroundSelectorSeparator:!1,braceStyle:"collapse",maxPreserveNewLines:void 0,preserveNewLines:!0}},a6={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0,documentFormattingEdits:!0,documentRangeFormattingEdits:!0},gse=new o6("css",r6,a6),fse=new o6("scss",r6,a6),pse=new o6("less",r6,a6);function l6(){return Se(()=>import("./cssMode-DLORRHDr.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]))}he.onLanguage("less",()=>{l6().then(o=>o.setupMode(pse))});he.onLanguage("scss",()=>{l6().then(o=>o.setupMode(fse))});he.onLanguage("css",()=>{l6().then(o=>o.setupMode(gse))});const mse=Object.freeze(Object.defineProperty({__proto__:null,cssDefaults:gse,lessDefaults:pse,scssDefaults:fse},Symbol.toStringTag,{value:"Module"}));let FWe=class{constructor(e,t,i){this._onDidChange=new ig,this._languageId=e,this.setOptions(t),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get options(){return this._options}get modeConfiguration(){return this._modeConfiguration}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}};const WWe={tabSize:4,insertSpaces:!1,wrapLineLength:120,unformatted:'default": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, select, small, span, strong, sub, sup, textarea, tt, var',contentUnformatted:"pre",indentInnerHtml:!1,preserveNewLines:!0,maxPreserveNewLines:void 0,indentHandlebars:!1,endWithNewline:!1,extraLiners:"head, body, /html",wrapAttributes:"auto"},oM={format:WWe,suggest:{},data:{useDefaultDataProvider:!0}};function rM(o){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:o===M1,documentFormattingEdits:o===M1,documentRangeFormattingEdits:o===M1}}const M1="html",LG="handlebars",xG="razor",_se=aM(M1,oM,rM(M1)),BWe=_se.defaults,bse=aM(LG,oM,rM(LG)),HWe=bse.defaults,vse=aM(xG,oM,rM(xG)),VWe=vse.defaults;function zWe(){return Se(()=>import("./htmlMode-DQ7y7lfT.js"),__vite__mapDeps([8,1,2,3,4,5,6,7]))}function aM(o,e=oM,t=rM(o)){const i=new FWe(o,e,t);let n;const s=he.onLanguage(o,async()=>{n=(await zWe()).setupMode(i)});return{defaults:i,dispose(){s.dispose(),n?.dispose(),n=void 0}}}const Cse=Object.freeze(Object.defineProperty({__proto__:null,handlebarDefaults:HWe,handlebarLanguageService:bse,htmlDefaults:BWe,htmlLanguageService:_se,razorDefaults:VWe,razorLanguageService:vse,registerHTMLLanguageService:aM},Symbol.toStringTag,{value:"Module"}));let UWe=class{constructor(e,t,i){this._onDidChange=new ig,this._languageId=e,this.setDiagnosticsOptions(t),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}};const $We={validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},jWe={documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},wse=new UWe("json",$We,jWe),qWe=()=>Sse().then(o=>o.getWorker());function Sse(){return Se(()=>import("./jsonMode-CF67c9TM.js"),__vite__mapDeps([9,1,2,3,4,5,6,7]))}he.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]});he.onLanguage("json",()=>{Sse().then(o=>o.setupMode(wse))});const yse=Object.freeze(Object.defineProperty({__proto__:null,getWorker:qWe,jsonDefaults:wse},Symbol.toStringTag,{value:"Module"})),KWe="5.9.3";var Lse=(o=>(o[o.None=0]="None",o[o.CommonJS=1]="CommonJS",o[o.AMD=2]="AMD",o[o.UMD=3]="UMD",o[o.System=4]="System",o[o.ES2015=5]="ES2015",o[o.ESNext=99]="ESNext",o))(Lse||{}),xse=(o=>(o[o.None=0]="None",o[o.Preserve=1]="Preserve",o[o.React=2]="React",o[o.ReactNative=3]="ReactNative",o[o.ReactJSX=4]="ReactJSX",o[o.ReactJSXDev=5]="ReactJSXDev",o))(xse||{}),Dse=(o=>(o[o.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",o[o.LineFeed=1]="LineFeed",o))(Dse||{}),kse=(o=>(o[o.ES3=0]="ES3",o[o.ES5=1]="ES5",o[o.ES2015=2]="ES2015",o[o.ES2016=3]="ES2016",o[o.ES2017=4]="ES2017",o[o.ES2018=5]="ES2018",o[o.ES2019=6]="ES2019",o[o.ES2020=7]="ES2020",o[o.ESNext=99]="ESNext",o[o.JSON=100]="JSON",o[o.Latest=99]="Latest",o))(kse||{}),Ise=(o=>(o[o.Classic=1]="Classic",o[o.NodeJs=2]="NodeJs",o))(Ise||{});class Ese{constructor(e,t,i,n,s){this._onDidChange=new ig,this._onDidExtraLibsChange=new ig,this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(e),this.setDiagnosticsOptions(t),this.setWorkerOptions(i),this.setInlayHintsOptions(n),this.setModeConfiguration(s),this._onDidExtraLibsChangeTimeout=-1}get onDidChange(){return this._onDidChange.event}get onDidExtraLibsChange(){return this._onDidExtraLibsChange.event}get modeConfiguration(){return this._modeConfiguration}get workerOptions(){return this._workerOptions}get inlayHintsOptions(){return this._inlayHintsOptions}getExtraLibs(){return this._extraLibs}addExtraLib(e,t){let i;if(typeof t>"u"?i=`ts:extralib-${Math.random().toString(36).substring(2,15)}`:i=t,this._extraLibs[i]&&this._extraLibs[i].content===e)return{dispose:()=>{}};let n=1;return this._removedExtraLibs[i]&&(n=this._removedExtraLibs[i]+1),this._extraLibs[i]&&(n=this._extraLibs[i].version+1),this._extraLibs[i]={content:e,version:n},this._fireOnDidExtraLibsChangeSoon(),{dispose:()=>{let s=this._extraLibs[i];s&&s.version===n&&(delete this._extraLibs[i],this._removedExtraLibs[i]=n,this._fireOnDidExtraLibsChangeSoon())}}}setExtraLibs(e){for(const t in this._extraLibs)this._removedExtraLibs[t]=this._extraLibs[t].version;if(this._extraLibs=Object.create(null),e&&e.length>0)for(const t of e){const i=t.filePath||`ts:extralib-${Math.random().toString(36).substring(2,15)}`,n=t.content;let s=1;this._removedExtraLibs[i]&&(s=this._removedExtraLibs[i]+1),this._extraLibs[i]={content:n,version:s}}this._fireOnDidExtraLibsChangeSoon()}_fireOnDidExtraLibsChangeSoon(){this._onDidExtraLibsChangeTimeout===-1&&(this._onDidExtraLibsChangeTimeout=window.setTimeout(()=>{this._onDidExtraLibsChangeTimeout=-1,this._onDidExtraLibsChange.fire(void 0)},0))}getCompilerOptions(){return this._compilerOptions}setCompilerOptions(e){this._compilerOptions=e||Object.create(null),this._onDidChange.fire(void 0)}getDiagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setWorkerOptions(e){this._workerOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setInlayHintsOptions(e){this._inlayHintsOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setMaximumWorkerIdleTime(e){}setEagerModelSync(e){this._eagerModelSync=e}getEagerModelSync(){return this._eagerModelSync}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(void 0)}}const GWe=KWe,Nse={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,diagnostics:!0,documentRangeFormattingEdits:!0,signatureHelp:!0,onTypeFormattingEdits:!0,codeActions:!0,inlayHints:!0},Tse=new Ese({allowNonTsExtensions:!0,target:99},{noSemanticValidation:!1,noSyntaxValidation:!1,onlyVisible:!1},{},{},Nse),Rse=new Ese({allowNonTsExtensions:!0,allowJs:!0,target:99},{noSemanticValidation:!0,noSyntaxValidation:!1,onlyVisible:!1},{},{},Nse),ZWe=()=>lM().then(o=>o.getTypeScriptWorker()),YWe=()=>lM().then(o=>o.getJavaScriptWorker());function lM(){return Se(()=>import("./tsMode-C27O5pAT.js"),__vite__mapDeps([10,2,3,4,5,6,7]))}he.onLanguage("typescript",()=>lM().then(o=>o.setupTypeScript(Tse)));he.onLanguage("javascript",()=>lM().then(o=>o.setupJavaScript(Rse)));const Mse=Object.freeze(Object.defineProperty({__proto__:null,JsxEmit:xse,ModuleKind:Lse,ModuleResolutionKind:Ise,NewLineKind:Dse,ScriptTarget:kse,getJavaScriptWorker:YWe,getTypeScriptWorker:ZWe,javascriptDefaults:Rse,typescriptDefaults:Tse,typescriptVersion:GWe},Symbol.toStringTag,{value:"Module"})),Pse={},zP={};class c6{static getOrCreate(e){return zP[e]||(zP[e]=new c6(e)),zP[e]}constructor(e){this._languageId=e,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((t,i)=>{this._lazyLoadPromiseResolve=t,this._lazyLoadPromiseReject=i})}load(){return this._loadingTriggered||(this._loadingTriggered=!0,Pse[this._languageId].loader().then(e=>this._lazyLoadPromiseResolve(e),e=>this._lazyLoadPromiseReject(e))),this._lazyLoadPromise}}function De(o){const e=o.id;Pse[e]=o,he.register(o);const t=c6.getOrCreate(e);he.registerTokensProviderFactory(e,{create:async()=>(await t.load()).language}),he.onLanguageEncountered(e,async()=>{const i=await t.load();he.setLanguageConfiguration(e,i.conf)})}De({id:"abap",extensions:[".abap"],aliases:["abap","ABAP"],loader:()=>Se(()=>import("./abap-DLDM7-KI.js"),[])});De({id:"apex",extensions:[".cls"],aliases:["Apex","apex"],mimetypes:["text/x-apex-source","text/x-apex"],loader:()=>Se(()=>import("./apex-DNDY2TF8.js"),[])});De({id:"azcli",extensions:[".azcli"],aliases:["Azure CLI","azcli"],loader:()=>Se(()=>import("./azcli-Y6nb8tq_.js"),[])});De({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],loader:()=>Se(()=>import("./bat-BwHxbl9M.js"),[])});De({id:"bicep",extensions:[".bicep"],aliases:["Bicep"],loader:()=>Se(()=>import("./bicep-CFznDFnq.js"),[])});De({id:"cameligo",extensions:[".mligo"],aliases:["Cameligo"],loader:()=>Se(()=>import("./cameligo-Bf6VGUru.js"),[])});De({id:"clojure",extensions:[".clj",".cljs",".cljc",".edn"],aliases:["clojure","Clojure"],loader:()=>Se(()=>import("./clojure-Dnu-v4kV.js"),[])});De({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],loader:()=>Se(()=>import("./coffee-Bd8akH9Z.js"),[])});De({id:"c",extensions:[".c",".h"],aliases:["C","c"],loader:()=>Se(()=>import("./cpp-BbWJElDN.js"),[])});De({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],loader:()=>Se(()=>import("./cpp-BbWJElDN.js"),[])});De({id:"csharp",extensions:[".cs",".csx",".cake"],aliases:["C#","csharp"],loader:()=>Se(()=>import("./csharp-Co3qMtFm.js"),[])});De({id:"csp",extensions:[".csp"],aliases:["CSP","csp"],loader:()=>Se(()=>import("./csp-D-4FJmMZ.js"),[])});De({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:()=>Se(()=>import("./css-DdJfP1eB.js"),[])});De({id:"cypher",extensions:[".cypher",".cyp"],aliases:["Cypher","OpenCypher"],loader:()=>Se(()=>import("./cypher-cTPe9QuQ.js"),[])});De({id:"dart",extensions:[".dart"],aliases:["Dart","dart"],mimetypes:["text/x-dart-source","text/x-dart"],loader:()=>Se(()=>import("./dart-BOtBlQCF.js"),[])});De({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],loader:()=>Se(()=>import("./dockerfile-BG73LgW2.js"),[])});De({id:"ecl",extensions:[".ecl"],aliases:["ECL","Ecl","ecl"],loader:()=>Se(()=>import("./ecl-BEgZUVRK.js"),[])});De({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:()=>Se(()=>import("./elixir-BkW5O-1t.js"),[])});De({id:"flow9",extensions:[".flow"],aliases:["Flow9","Flow","flow9","flow"],loader:()=>Se(()=>import("./flow9-BeJ5waoc.js"),[])});De({id:"fsharp",extensions:[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],loader:()=>Se(()=>import("./fsharp-PahG7c26.js"),[])});De({id:"freemarker2",extensions:[".ftl",".ftlh",".ftlx"],aliases:["FreeMarker2","Apache FreeMarker2"],loader:()=>Se(()=>import("./freemarker2-DaJ0VeUL.js"),__vite__mapDeps([11,2,3,4,5,6,7])).then(o=>o.TagAutoInterpolationDollar)});De({id:"freemarker2.tag-angle.interpolation-dollar",aliases:["FreeMarker2 (Angle/Dollar)","Apache FreeMarker2 (Angle/Dollar)"],loader:()=>Se(()=>import("./freemarker2-DaJ0VeUL.js"),__vite__mapDeps([11,2,3,4,5,6,7])).then(o=>o.TagAngleInterpolationDollar)});De({id:"freemarker2.tag-bracket.interpolation-dollar",aliases:["FreeMarker2 (Bracket/Dollar)","Apache FreeMarker2 (Bracket/Dollar)"],loader:()=>Se(()=>import("./freemarker2-DaJ0VeUL.js"),__vite__mapDeps([11,2,3,4,5,6,7])).then(o=>o.TagBracketInterpolationDollar)});De({id:"freemarker2.tag-angle.interpolation-bracket",aliases:["FreeMarker2 (Angle/Bracket)","Apache FreeMarker2 (Angle/Bracket)"],loader:()=>Se(()=>import("./freemarker2-DaJ0VeUL.js"),__vite__mapDeps([11,2,3,4,5,6,7])).then(o=>o.TagAngleInterpolationBracket)});De({id:"freemarker2.tag-bracket.interpolation-bracket",aliases:["FreeMarker2 (Bracket/Bracket)","Apache FreeMarker2 (Bracket/Bracket)"],loader:()=>Se(()=>import("./freemarker2-DaJ0VeUL.js"),__vite__mapDeps([11,2,3,4,5,6,7])).then(o=>o.TagBracketInterpolationBracket)});De({id:"freemarker2.tag-auto.interpolation-dollar",aliases:["FreeMarker2 (Auto/Dollar)","Apache FreeMarker2 (Auto/Dollar)"],loader:()=>Se(()=>import("./freemarker2-DaJ0VeUL.js"),__vite__mapDeps([11,2,3,4,5,6,7])).then(o=>o.TagAutoInterpolationDollar)});De({id:"freemarker2.tag-auto.interpolation-bracket",aliases:["FreeMarker2 (Auto/Bracket)","Apache FreeMarker2 (Auto/Bracket)"],loader:()=>Se(()=>import("./freemarker2-DaJ0VeUL.js"),__vite__mapDeps([11,2,3,4,5,6,7])).then(o=>o.TagAutoInterpolationBracket)});De({id:"go",extensions:[".go"],aliases:["Go"],loader:()=>Se(()=>import("./go-acbASCJo.js"),[])});De({id:"graphql",extensions:[".graphql",".gql"],aliases:["GraphQL","graphql","gql"],mimetypes:["application/graphql"],loader:()=>Se(()=>import("./graphql-BxJiqAUM.js"),[])});De({id:"handlebars",extensions:[".handlebars",".hbs"],aliases:["Handlebars","handlebars","hbs"],mimetypes:["text/x-handlebars-template"],loader:()=>Se(()=>import("./handlebars-DLHw1EEJ.js"),__vite__mapDeps([12,2,3,4,5,6,7]))});De({id:"hcl",extensions:[".tf",".tfvars",".hcl"],aliases:["Terraform","tf","HCL","hcl"],loader:()=>Se(()=>import("./hcl-DtV1sZF8.js"),[])});De({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:()=>Se(()=>import("./html-O04EC3MX.js"),__vite__mapDeps([13,2,3,4,5,6,7]))});De({id:"ini",extensions:[".ini",".properties",".gitconfig"],filenames:["config",".gitattributes",".gitconfig",".editorconfig"],aliases:["Ini","ini"],loader:()=>Se(()=>import("./ini-Kd9XrMLS.js"),[])});De({id:"java",extensions:[".java",".jav"],aliases:["Java","java"],mimetypes:["text/x-java-source","text/x-java"],loader:()=>Se(()=>import("./java-CXBNlu9o.js"),[])});De({id:"javascript",extensions:[".js",".es6",".jsx",".mjs",".cjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:()=>Se(()=>import("./javascript-CrGLGAoQ.js"),__vite__mapDeps([14,15,2,3,4,5,6,7]))});De({id:"julia",extensions:[".jl"],aliases:["julia","Julia"],loader:()=>Se(()=>import("./julia-cl7-CwDS.js"),[])});De({id:"kotlin",extensions:[".kt",".kts"],aliases:["Kotlin","kotlin"],mimetypes:["text/x-kotlin-source","text/x-kotlin"],loader:()=>Se(()=>import("./kotlin-s7OhZKlX.js"),[])});De({id:"less",extensions:[".less"],aliases:["Less","less"],mimetypes:["text/x-less","text/less"],loader:()=>Se(()=>import("./less-9HpZscsL.js"),[])});De({id:"lexon",extensions:[".lex"],aliases:["Lexon"],loader:()=>Se(()=>import("./lexon-OrD6JF1K.js"),[])});De({id:"lua",extensions:[".lua"],aliases:["Lua","lua"],loader:()=>Se(()=>import("./lua-Cyyb5UIc.js"),[])});De({id:"liquid",extensions:[".liquid",".html.liquid"],aliases:["Liquid","liquid"],mimetypes:["application/liquid"],loader:()=>Se(()=>import("./liquid-CLUvqbUj.js"),__vite__mapDeps([16,2,3,4,5,6,7]))});De({id:"m3",extensions:[".m3",".i3",".mg",".ig"],aliases:["Modula-3","Modula3","modula3","m3"],loader:()=>Se(()=>import("./m3-B8OfTtLu.js"),[])});De({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],loader:()=>Se(()=>import("./markdown-BFxVWTOG.js"),[])});De({id:"mdx",extensions:[".mdx"],aliases:["MDX","mdx"],loader:()=>Se(()=>import("./mdx-I5c0PFNf.js"),__vite__mapDeps([17,2,3,4,5,6,7]))});De({id:"mips",extensions:[".s"],aliases:["MIPS","MIPS-V"],mimetypes:["text/x-mips","text/mips","text/plaintext"],loader:()=>Se(()=>import("./mips-CiqrrVzr.js"),[])});De({id:"msdax",extensions:[".dax",".msdax"],aliases:["DAX","MSDAX"],loader:()=>Se(()=>import("./msdax-DmeGPVcC.js"),[])});De({id:"mysql",extensions:[],aliases:["MySQL","mysql"],loader:()=>Se(()=>import("./mysql-C_tMU-Nz.js"),[])});De({id:"objective-c",extensions:[".m"],aliases:["Objective-C"],loader:()=>Se(()=>import("./objective-c-BDtDVThU.js"),[])});De({id:"pascal",extensions:[".pas",".p",".pp"],aliases:["Pascal","pas"],mimetypes:["text/x-pascal-source","text/x-pascal"],loader:()=>Se(()=>import("./pascal-vHIfCaH5.js"),[])});De({id:"pascaligo",extensions:[".ligo"],aliases:["Pascaligo","ligo"],loader:()=>Se(()=>import("./pascaligo-DtZ0uQbO.js"),[])});De({id:"perl",extensions:[".pl",".pm"],aliases:["Perl","pl"],loader:()=>Se(()=>import("./perl-Ub6l9XKa.js"),[])});De({id:"pgsql",extensions:[],aliases:["PostgreSQL","postgres","pg","postgre"],loader:()=>Se(()=>import("./pgsql-BlNEE0v7.js"),[])});De({id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],mimetypes:["application/x-php"],loader:()=>Se(()=>import("./php-BBUBE1dy.js"),[])});De({id:"pla",extensions:[".pla"],loader:()=>Se(()=>import("./pla-DSh2-awV.js"),[])});De({id:"postiats",extensions:[".dats",".sats",".hats"],aliases:["ATS","ATS/Postiats"],loader:()=>Se(()=>import("./postiats-CocnycG-.js"),[])});De({id:"powerquery",extensions:[".pq",".pqm"],aliases:["PQ","M","Power Query","Power Query M"],loader:()=>Se(()=>import("./powerquery-tScXyioY.js"),[])});De({id:"powershell",extensions:[".ps1",".psm1",".psd1"],aliases:["PowerShell","powershell","ps","ps1"],loader:()=>Se(()=>import("./powershell-COWaemsV.js"),[])});De({id:"proto",extensions:[".proto"],aliases:["protobuf","Protocol Buffers"],loader:()=>Se(()=>import("./protobuf-Brw8urJB.js"),[])});De({id:"pug",extensions:[".jade",".pug"],aliases:["Pug","Jade","jade"],loader:()=>Se(()=>import("./pug-8SOpv6rk.js"),[])});De({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",loader:()=>Se(()=>import("./python-9pLFSYtk.js"),__vite__mapDeps([18,2,3,4,5,6,7]))});De({id:"qsharp",extensions:[".qs"],aliases:["Q#","qsharp"],loader:()=>Se(()=>import("./qsharp-Bw9ernYp.js"),[])});De({id:"r",extensions:[".r",".rhistory",".rmd",".rprofile",".rt"],aliases:["R","r"],loader:()=>Se(()=>import("./r-j7ic8hl3.js"),[])});De({id:"razor",extensions:[".cshtml"],aliases:["Razor","razor"],mimetypes:["text/x-cshtml"],loader:()=>Se(()=>import("./razor-C1F71AoJ.js"),__vite__mapDeps([19,2,3,4,5,6,7]))});De({id:"redis",extensions:[".redis"],aliases:["redis"],loader:()=>Se(()=>import("./redis-Bu5POkcn.js"),[])});De({id:"redshift",extensions:[],aliases:["Redshift","redshift"],loader:()=>Se(()=>import("./redshift-Bs9aos_-.js"),[])});De({id:"restructuredtext",extensions:[".rst"],aliases:["reStructuredText","restructuredtext"],loader:()=>Se(()=>import("./restructuredtext-CqXO7rUv.js"),[])});De({id:"ruby",extensions:[".rb",".rbx",".rjs",".gemspec",".pp"],filenames:["rakefile","Gemfile"],aliases:["Ruby","rb"],loader:()=>Se(()=>import("./ruby-zBfavPgS.js"),[])});De({id:"rust",extensions:[".rs",".rlib"],aliases:["Rust","rust"],loader:()=>Se(()=>import("./rust-BzKRNQWT.js"),[])});De({id:"sb",extensions:[".sb"],aliases:["Small Basic","sb"],loader:()=>Se(()=>import("./sb-BBc9UKZt.js"),[])});De({id:"scala",extensions:[".scala",".sc",".sbt"],aliases:["Scala","scala","SBT","Sbt","sbt","Dotty","dotty"],mimetypes:["text/x-scala-source","text/x-scala","text/x-sbt","text/x-dotty"],loader:()=>Se(()=>import("./scala-D9hQfWCl.js"),[])});De({id:"scheme",extensions:[".scm",".ss",".sch",".rkt"],aliases:["scheme","Scheme"],loader:()=>Se(()=>import("./scheme-BPhDTwHR.js"),[])});De({id:"scss",extensions:[".scss"],aliases:["Sass","sass","scss"],mimetypes:["text/x-scss","text/scss"],loader:()=>Se(()=>import("./scss-CBJaRo0y.js"),[])});De({id:"shell",extensions:[".sh",".bash"],aliases:["Shell","sh"],loader:()=>Se(()=>import("./shell-DiJ1NA_G.js"),[])});De({id:"sol",extensions:[".sol"],aliases:["sol","solidity","Solidity"],loader:()=>Se(()=>import("./solidity-Db0IVjzk.js"),[])});De({id:"aes",extensions:[".aes"],aliases:["aes","sophia","Sophia"],loader:()=>Se(()=>import("./sophia-CnS9iZB_.js"),[])});De({id:"sparql",extensions:[".rq"],aliases:["sparql","SPARQL"],loader:()=>Se(()=>import("./sparql-CJmd_6j2.js"),[])});De({id:"sql",extensions:[".sql"],aliases:["SQL"],loader:()=>Se(()=>import("./sql-ClhHkBeG.js"),[])});De({id:"st",extensions:[".st",".iecst",".iecplc",".lc3lib",".TcPOU",".TcDUT",".TcGVL",".TcIO"],aliases:["StructuredText","scl","stl"],loader:()=>Se(()=>import("./st-CHwy0fLd.js"),[])});De({id:"swift",aliases:["Swift","swift"],extensions:[".swift"],mimetypes:["text/swift"],loader:()=>Se(()=>import("./swift-CnmFD0ga.js"),[])});De({id:"systemverilog",extensions:[".sv",".svh"],aliases:["SV","sv","SystemVerilog","systemverilog"],loader:()=>Se(()=>import("./systemverilog-Bs9z6M-B.js"),[])});De({id:"verilog",extensions:[".v",".vh"],aliases:["V","v","Verilog","verilog"],loader:()=>Se(()=>import("./systemverilog-Bs9z6M-B.js"),[])});De({id:"tcl",extensions:[".tcl"],aliases:["tcl","Tcl","tcltk","TclTk","tcl/tk","Tcl/Tk"],loader:()=>Se(()=>import("./tcl-Dm6ycUr_.js"),[])});De({id:"twig",extensions:[".twig"],aliases:["Twig","twig"],mimetypes:["text/x-twig"],loader:()=>Se(()=>import("./twig-Csy3S7wG.js"),[])});De({id:"typescript",extensions:[".ts",".tsx",".cts",".mts"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:()=>Se(()=>import("./typescript-CdWDFqnx.js"),__vite__mapDeps([15,2,3,4,5,6,7]))});De({id:"typespec",extensions:[".tsp"],aliases:["TypeSpec"],loader:()=>Se(()=>import("./typespec-Btyra-wh.js"),[])});De({id:"vb",extensions:[".vb"],aliases:["Visual Basic","vb"],loader:()=>Se(()=>import("./vb-Db0cS2oM.js"),[])});De({id:"wgsl",extensions:[".wgsl"],aliases:["WebGPU Shading Language","WGSL","wgsl"],loader:()=>Se(()=>import("./wgsl-BTesnYfV.js"),[])});De({id:"xml",extensions:[".xml",".xsd",".dtd",".ascx",".csproj",".config",".props",".targets",".wxi",".wxl",".wxs",".xaml",".svg",".svgz",".opf",".xslt",".xsl"],firstLine:"(\\<\\?xml.*)|(\\<svg)|(\\<\\!doctype\\s+svg)",aliases:["XML","xml"],mimetypes:["text/xml","application/xml","application/xaml+xml","application/xml-dtd"],loader:()=>Se(()=>import("./xml-CyqvPPRa.js"),__vite__mapDeps([20,2,3,4,5,6,7]))});De({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml","text/x-yaml"],loader:()=>Se(()=>import("./yaml-CIgtTHvG.js"),__vite__mapDeps([21,2,3,4,5,6,7]))});var XWe=Object.defineProperty,QWe=(o,e,t)=>e in o?XWe(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t,we=(o,e,t)=>QWe(o,typeof e!="symbol"?e+"":e,t),bx,DG,vx,UP,Cx;function JWe(o){return o.method!==void 0}var kG;(function(o){function e(t){return t}o.create=e})(kG||(kG={}));var va;(function(o){o.parseError=-32700,o.invalidRequest=-32600,o.methodNotFound=-32601,o.invalidParams=-32602,o.internalError=-32603;function e(s){return-32099<=s&&s<=-32e3}o.isServerError=e;function t(s){if(!e(s))throw new Error("Invalid range for a server error.");return s}o.serverError=t,o.unexpectedServerError=-32e3;function i(s){return!0}o.isApplicationError=i;function n(s){return s}o.applicationError=n,o.genericApplicationError=-320100})(va||(va={}));var d6=class{constructor(){we(this,"listeners",new Set),we(this,"event",o=>(this.listeners.add(o),{dispose:()=>{this.listeners.delete(o)}}))}fire(o){this.listeners.forEach(e=>e(o))}},eBe=class{constructor(o){we(this,"_value"),we(this,"eventEmitter"),this._value=o,this.eventEmitter=new d6}get value(){return this._value}set value(o){this._value!==o&&(this._value=o,this.eventEmitter.fire(o))}get onChange(){return this.eventEmitter.event}};function tBe(o,e){const t=setTimeout(e,o);return{dispose:()=>clearTimeout(t)}}function $P(o,e,t){return o instanceof Set?(o.add(e),{dispose:()=>o.delete(e)}):(o.set(e,t),{dispose:()=>o.delete(e)})}var iBe=class{constructor(){we(this,"_state","none"),we(this,"promise"),we(this,"resolve",()=>{}),we(this,"reject",()=>{}),this.promise=new Promise((o,e)=>{this.resolve=o,this.reject=e})}get state(){return this._state}},Ase=(bx=class{constructor(){we(this,"_unprocessedMessages",[]),we(this,"_messageListener"),we(this,"id",bx.id++),we(this,"_state",new eBe({state:"open"})),we(this,"state",this._state)}setListener(o){if(this._messageListener=o,!!o)for(;this._unprocessedMessages.length>0&&this._messageListener!==void 0;){const e=this._unprocessedMessages.shift();this._messageListener(e)}}send(o){return this._sendImpl(o)}_dispatchReceivedMessage(o){this._unprocessedMessages.length===0&&this._messageListener?this._messageListener(o):this._unprocessedMessages.push(o)}_onConnectionClosed(){this._state.value={state:"closed",error:void 0}}log(o){return new nBe(this,o??new sBe)}},we(bx,"id",0),bx),nBe=class{constructor(o,e){we(this,"baseStream"),we(this,"logger"),this.baseStream=o,this.logger=e}get state(){return this.baseStream.state}setListener(o){if(o===void 0){this.baseStream.setListener(void 0);return}this.baseStream.setListener(e=>{this.logger.log(this.baseStream,"incoming",e),o(e)})}send(o){return this.logger.log(this.baseStream,"outgoing",o),this.baseStream.send(o)}toString(){return`StreamLogger/${this.baseStream.toString()}`}},sBe=class{log(o,e,t){console.log(`${e==="incoming"?"<-":"->"} [${o.toString()}] ${JSON.stringify(t)}`)}},oBe=class Ose{constructor(e){we(this,"connect"),this.connect=e}mapContext(e){return new Ose(t=>this.connect(t?rBe(t,e):void 0))}};function rBe(o,e){return{handleNotification:(t,i)=>o.handleNotification(t,e(i)),handleRequest:(t,i,n)=>o.handleRequest(t,i,e(n))}}var aBe=class Fse{constructor(e,t,i){we(this,"_stream"),we(this,"_listener"),we(this,"_logger"),we(this,"_unprocessedResponses",new Map),we(this,"_lastUsedRequestId",0),this._stream=e,this._listener=t,this._logger=i,this._stream.setListener(n=>{JWe(n)?n.id===void 0?this._processNotification(n):this._processRequest(n):this._processResponse(n)})}static createChannel(e,t){let i=!1;return new oBe(n=>{if(i)throw new Error(`A channel to the stream ${e} was already constructed!`);return i=!0,new Fse(e,n,t)})}get state(){return this._stream.state}async _processNotification(e){if(e.id!==void 0)throw new Error;if(!this._listener){this._logger&&this._logger.debug({text:"Notification ignored",message:e});return}try{await this._listener.handleNotification({method:e.method,params:e.params||null})}catch(t){this._logger&&this._logger.warn({text:`Exception was thrown while handling notification: ${t}`,exception:t,message:e})}}async _processRequest(e){if(e.id===void 0)throw new Error;let t;if(this._listener)try{t=await this._listener.handleRequest({method:e.method,params:e.params||null},e.id)}catch(n){this._logger&&this._logger.warn({text:`Exception was thrown while handling request: ${n}`,message:e,exception:n}),t={error:{code:va.internalError,message:"An unexpected exception was thrown.",data:void 0}}}else this._logger&&this._logger.debug({text:"Received request even though not listening for requests",message:e}),t={error:{code:va.methodNotFound,message:"This endpoint does not listen for requests or notifications.",data:void 0}};let i;"result"in t?i={jsonrpc:"2.0",id:e.id,result:t.result}:i={jsonrpc:"2.0",id:e.id,error:t.error},await this._stream.send(i)}_processResponse(e){const t=""+e.id,i=this._unprocessedResponses.get(t);if(!i){this._logger&&this._logger.debug({text:"Got an unexpected response message",message:e});return}this._unprocessedResponses.delete(t),i(e)}_newRequestId(){return this._lastUsedRequestId++}sendRequest(e,t,i){const n={jsonrpc:"2.0",id:this._newRequestId(),method:e.method,params:e.params||void 0};return i&&i(n.id),new Promise((s,r)=>{const a=""+n.id;this._unprocessedResponses.set(a,l=>{"result"in l?s({result:l.result}):(l.error||r(new Error("Response had neither 'result' nor 'error' field set.")),s({error:l.error}))}),this._stream.send(n).then(void 0,l=>{this._unprocessedResponses.delete(a),r(l)})})}sendNotification(e,t){const i={jsonrpc:"2.0",id:void 0,method:e.method,params:e.params||void 0};return this._stream.send(i)}toString(){return"StreamChannel/"+this._stream.toString()}},sv;(function(o){function e(){return{deserializeFromJson:n=>({hasErrors:!1,value:n}),serializeToJson:n=>n}}o.sAny=e;function t(){return{deserializeFromJson:n=>({hasErrors:!1,value:{}}),serializeToJson:n=>({})}}o.sEmptyObject=t;function i(){return{deserializeFromJson:n=>({hasErrors:!1,value:void 0}),serializeToJson:n=>null}}o.sVoidFromNull=i})(sv||(sv={}));const Wse=Symbol("OptionalMethodNotFound");var Bse=class{contextualize(o){return new lBe(this,o)}},lBe=class extends Bse{constructor(o,e){super(),we(this,"underylingTypedChannel"),we(this,"converters"),this.underylingTypedChannel=o,this.converters=e}async request(o,e,t){const i=await this.converters.getSendContext(t);return this.underylingTypedChannel.request(o,e,i)}async notify(o,e,t){const i=await this.converters.getSendContext(t);return this.underylingTypedChannel.notify(o,e,i)}registerNotificationHandler(o,e){return this.underylingTypedChannel.registerNotificationHandler(o,async(t,i)=>await e(t,await this.converters.getNewContext(i)))}registerRequestHandler(o,e){return this.underylingTypedChannel.registerRequestHandler(o,async(t,i,n)=>await e(t,i,await this.converters.getNewContext(n)))}},sW=class Hse extends Bse{constructor(e,t={}){super(),we(this,"channelCtor"),we(this,"_requestSender"),we(this,"_handler",new Map),we(this,"_unknownNotificationHandler",new Set),we(this,"_timeout"),we(this,"sendExceptionDetails",!1),we(this,"_logger"),we(this,"listeningDeferred",new iBe),we(this,"onListening",this.listeningDeferred.promise),we(this,"_requestDidErrorEventEmitter",new d6),we(this,"onRequestDidError",this._requestDidErrorEventEmitter.event),this.channelCtor=e,this._logger=t.logger,this.sendExceptionDetails=!!t.sendExceptionDetails,this._timeout=tBe(1e3,()=>{this._requestSender||console.warn(`"${this.startListen.name}" has not been called within 1 second after construction of this channel. Did you forget to call it?`,this)})}static fromTransport(e,t={}){return new Hse(aBe.createChannel(e,t.logger),t)}startListen(){if(this._requestSender)throw new Error(`"${this.startListen.name}" can be called only once, but it already has been called.`);this._timeout&&(this._timeout.dispose(),this._timeout=void 0),this._requestSender=this.channelCtor.connect({handleRequest:(e,t,i)=>this.handleRequest(e,t,i),handleNotification:(e,t)=>this.handleNotification(e,t)}),this.listeningDeferred.resolve()}checkChannel(e){if(!e)throw new Error(`"${this.startListen.name}" must be called before any messages can be sent or received.`);return!0}async handleRequest(e,t,i){const n=this._handler.get(e.method);if(!n)return this._logger&&this._logger.debug({text:`No request handler for "${e.method}".`,data:{requestObject:e}}),{error:{code:va.methodNotFound,message:`No request handler for "${e.method}".`,data:{method:e.method}}};if(n.kind!="request"){const r=`"${e.method}" is registered as notification, but was sent as request.`;return this._logger&&this._logger.debug({text:r,data:{requestObject:e}}),{error:{code:va.invalidRequest,message:r,data:{method:e.method}}}}const s=n.requestType.paramsSerializer.deserializeFromJson(e.params);if(s.hasErrors){const r=`Got invalid params: ${s.errorMessage}`;return this._logger&&this._logger.debug({text:r,data:{requestObject:e,errorMessage:s.errorMessage}}),{error:{code:va.invalidParams,message:r,data:{errors:s.errorMessage}}}}else{const r=s.value;let a;try{const l=await n.handler(r,t,i);if("error"in l||"errorMessage"in l){const c=l.error?n.requestType.errorSerializer.serializeToJson(l.error):void 0;a={error:{code:l.errorCode||va.genericApplicationError,message:l.errorMessage||"An error was returned",data:c}}}else a={result:n.requestType.resultSerializer.serializeToJson(l.ok)}}catch(l){l instanceof EG?a={error:{code:l.code,message:l.message}}:(this._logger&&this._logger.warn({text:`An exception was thrown while handling a request: ${l}.`,exception:l,data:{requestObject:e}}),a={error:{code:va.unexpectedServerError,message:this.sendExceptionDetails?`An exception was thrown while handling a request: ${l}.`:"Server has thrown an unexpected exception"}})}return a}}async handleNotification(e,t){const i=this._handler.get(e.method);if(!i){for(const r of this._unknownNotificationHandler)r(e);this._unknownNotificationHandler.size===0&&this._logger&&this._logger.debug({text:`Unhandled notification "${e.method}"`,data:{requestObject:e}});return}if(i.kind!="notification"){this._logger&&this._logger.debug({text:`"${e.method}" is registered as request, but was sent as notification.`,data:{requestObject:e}});return}const n=i.notificationType.paramsSerializer.deserializeFromJson(e.params);if(n.hasErrors){this._logger&&this._logger.debug({text:`Got invalid params: ${n}`,data:{requestObject:e,errorMessage:n.errorMessage}});return}const s=n.value;for(const r of i.handlers)try{r(s,t)}catch(a){this._logger&&this._logger.warn({text:`An exception was thrown while handling a notification: ${a}.`,exception:a,data:{requestObject:e}})}}registerUnknownNotificationHandler(e){return $P(this._unknownNotificationHandler,e)}registerRequestHandler(e,t){if(this._handler.get(e.method))throw new Error(`Handler with method "${e.method}" already registered.`);return $P(this._handler,e.method,{kind:"request",requestType:e,handler:t})}registerNotificationHandler(e,t){let i=this._handler.get(e.method);if(!i)i={kind:"notification",notificationType:e,handlers:new Set},this._handler.set(e.method,i);else{if(i.kind!=="notification")throw new Error(`Method "${e.method}" was already registered as request handler.`);if(i.notificationType!==e)throw new Error(`Method "${e.method}" was registered for a different type.`)}return $P(i.handlers,t)}getRegisteredTypes(){const e=[];for(const t of this._handler.values())t.kind==="notification"?e.push(t.notificationType):t.kind==="request"&&e.push(t.requestType);return e}async request(e,t,i){if(!this.checkChannel(this._requestSender))throw new Error("Impossible");const n=e.paramsSerializer.serializeToJson(t);IG(n);const s=await this._requestSender.sendRequest({method:e.method,params:n},i);if("error"in s){if(e.isOptional&&s.error.code===va.methodNotFound)return Wse;let r;if(s.error.data!==void 0){const l=e.errorSerializer.deserializeFromJson(s.error.data);if(l.hasErrors)throw new Error(l.errorMessage);r=l.value}else r=void 0;const a=new EG(s.error.message,r,s.error.code);throw this._requestDidErrorEventEmitter.fire({error:a}),a}else{const r=e.resultSerializer.deserializeFromJson(s.result);if(r.hasErrors)throw new Error("Could not deserialize response: "+r.errorMessage+`
|
|
914
|
+
`)}};z9=t6([T1(1,Ma)],z9);function U9(o){return`U+${o.toString(16).padStart(4,"0")}`}function AP(o){let e=`\`${U9(o)}\``;return Hf.isInvisibleCharacter(o)||(e+=` "${`${b9e(o)}`}"`),e}function b9e(o){return o===96?"`` ` ``":"`"+String.fromCodePoint(o)+"`"}function Jne(o,e){return QW.computeUnicodeHighlightReason(o,e)}const hT=class hT{constructor(){this.map=new Map}getDecorationFromOptions(e){return this.getDecoration(!e.includeComments,!e.includeStrings)}getDecoration(e,t){const i=`${e}${t}`;let n=this.map.get(i);return n||(n=Ae.createDynamic({description:"unicode-highlight",stickiness:1,className:"unicode-highlight",showIfCollapsed:!0,overviewRuler:null,minimap:null,hideInCommentTokens:e,hideInStringTokens:t}),this.map.set(i,n)),n}};hT.instance=new hT;let xE=hT;class v9e extends de{constructor(){super({id:Pm.ID,label:H(1552,"Disable highlighting of characters in comments"),precondition:void 0}),this.shortLabel=m(1544,"Disable Highlight In Comments")}async run(e,t,i){const n=e.get(We);n&&this.runAction(n)}async runAction(e){await e.updateValue(no.includeComments,!1,2)}}class C9e extends de{constructor(){super({id:Pm.ID,label:H(1553,"Disable highlighting of characters in strings"),precondition:void 0}),this.shortLabel=m(1545,"Disable Highlight In Strings")}async run(e,t,i){const n=e.get(We);n&&this.runAction(n)}async runAction(e){await e.updateValue(no.includeStrings,!1,2)}}const uT=class uT extends xn{constructor(){super({id:uT.ID,title:H(1554,"Disable highlighting of ambiguous characters"),precondition:void 0,f1:!1}),this.shortLabel=m(1546,"Disable Ambiguous Highlight")}async run(e,t,i){const n=e.get(We);n&&this.runAction(n)}async runAction(e){await e.updateValue(no.ambiguousCharacters,!1,2)}};uT.ID="editor.action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters";let Pm=uT;const gT=class gT extends xn{constructor(){super({id:gT.ID,title:H(1555,"Disable highlighting of invisible characters"),precondition:void 0,f1:!1}),this.shortLabel=m(1547,"Disable Invisible Highlight")}async run(e,t,i){const n=e.get(We);n&&this.runAction(n)}async runAction(e){await e.updateValue(no.invisibleCharacters,!1,2)}};gT.ID="editor.action.unicodeHighlight.disableHighlightingOfInvisibleCharacters";let V0=gT;const fT=class fT extends xn{constructor(){super({id:fT.ID,title:H(1556,"Disable highlighting of non basic ASCII characters"),precondition:void 0,f1:!1}),this.shortLabel=m(1548,"Disable Non ASCII Highlight")}async run(e,t,i){const n=e.get(We);n&&this.runAction(n)}async runAction(e){await e.updateValue(no.nonBasicASCII,!1,2)}};fT.ID="editor.action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters";let z0=fT;const pT=class pT extends xn{constructor(){super({id:pT.ID,title:H(1557,"Show Exclude Options"),precondition:void 0,f1:!1})}async run(e,t){const{codePoint:i,reason:n,inString:s,inComment:r}=t,a=String.fromCodePoint(i),l=e.get(ds),c=e.get(We);function d(f){return Hf.isInvisibleCharacter(f)?m(1549,"Exclude {0} (invisible character) from being highlighted",U9(f)):m(1550,"Exclude {0} from being highlighted",`${U9(f)} "${a}"`)}const h=[];if(n.kind===0)for(const f of n.notAmbiguousInLocales)h.push({label:m(1551,'Allow unicode characters that are more common in the language "{0}".',f),run:async()=>{S9e(c,[f])}});if(h.push({label:d(i),run:()=>w9e(c,[i])}),r){const f=new v9e;h.push({label:f.label,run:async()=>f.runAction(c)})}else if(s){const f=new C9e;h.push({label:f.label,run:async()=>f.runAction(c)})}function u(f){return typeof f.desc.title=="string"?f.desc.title:f.desc.title.value}if(n.kind===0){const f=new Pm;h.push({label:u(f),run:async()=>f.runAction(c)})}else if(n.kind===1){const f=new V0;h.push({label:u(f),run:async()=>f.runAction(c)})}else if(n.kind===2){const f=new z0;h.push({label:u(f),run:async()=>f.runAction(c)})}else y9e(n);const g=await l.pick(h,{title:Qne});g&&await g.run()}};pT.ID="editor.action.unicodeHighlight.showExcludeOptions";let DE=pT;async function w9e(o,e){const t=o.getValue(no.allowedCharacters);let i;typeof t=="object"&&t?i=t:i={};for(const n of e)i[String.fromCodePoint(n)]=!0;await o.updateValue(no.allowedCharacters,i,2)}async function S9e(o,e){const t=o.inspect(no.allowedLocales).user?.value;let i;typeof t=="object"&&t?i=Object.assign({},t):i={};for(const n of e)i[n]=!0;await o.updateValue(no.allowedLocales,i,2)}function y9e(o){throw new Error(`Unexpected value: ${o}`)}xt(Pm);xt(V0);xt(z0);xt(DE);ot(H0.ID,H0,1);Jm.register(z9);var L9e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},gG=function(o,e){return function(t,i){e(t,i,o)}};const ese="ignoreUnusualLineTerminators";function x9e(o,e,t){o.setModelProperty(e.uri,ese,t)}function D9e(o,e){return o.getModelProperty(e.uri,ese)}var Cv;let kE=(Cv=class extends F{constructor(e,t,i){super(),this._editor=e,this._dialogService=t,this._codeEditorService=i,this._isPresentingDialog=!1,this._config=this._editor.getOption(143),this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(143)&&(this._config=this._editor.getOption(143),this._checkForUnusualLineTerminators())})),this._register(this._editor.onDidChangeModel(()=>{this._checkForUnusualLineTerminators()})),this._register(this._editor.onDidChangeModelContent(n=>{n.isUndoing||this._checkForUnusualLineTerminators()})),this._checkForUnusualLineTerminators()}async _checkForUnusualLineTerminators(){if(this._config==="off"||!this._editor.hasModel())return;const e=this._editor.getModel();if(!e.mightContainUnusualLineTerminators()||D9e(this._codeEditorService,e)===!0||this._editor.getOption(104))return;if(this._config==="auto"){e.removeUnusualLineTerminators(this._editor.getSelections());return}if(this._isPresentingDialog)return;let i;try{this._isPresentingDialog=!0,i=await this._dialogService.confirm({title:m(1558,"Unusual Line Terminators"),message:m(1559,"Detected unusual line terminators"),detail:m(1560,"The file '{0}' contains one or more unusual line terminator characters, like Line Separator (LS) or Paragraph Separator (PS).\n\nIt is recommended to remove them from the file. This can be configured via `editor.unusualLineTerminators`.",Xr(e.uri)),primaryButton:m(1561,"&&Remove Unusual Line Terminators"),cancelButton:m(1562,"Ignore")})}finally{this._isPresentingDialog=!1}if(!i.confirmed){x9e(this._codeEditorService,e,!0);return}e.removeUnusualLineTerminators(this._editor.getSelections())}},Cv.ID="editor.contrib.unusualLineTerminatorsDetector",Cv);kE=L9e([gG(1,py),gG(2,lt)],kE);ot(kE.ID,kE,1);var k9e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},I9e=function(o,e){return function(t,i){e(t,i,o)}};class fG{constructor(){this.selector={language:"*"}}provideDocumentHighlights(e,t,i){const n=[],s=e.getWordAtPosition({lineNumber:t.lineNumber,column:t.column});return s?e.isDisposed()?void 0:e.findMatches(s.word,!0,!1,!0,SD,!1).map(a=>({range:a.range,kind:Lv.Text})):Promise.resolve(n)}provideMultiDocumentHighlights(e,t,i,n){const s=new Ai,r=e.getWordAtPosition({lineNumber:t.lineNumber,column:t.column});if(!r)return Promise.resolve(s);for(const a of[e,...i]){if(a.isDisposed())continue;const c=a.findMatches(r.word,!0,!1,!0,SD,!1).map(d=>({range:d.range,kind:Lv.Text}));c&&s.set(a.uri,c)}return s}}let $9=class extends F{constructor(e){super(),this._register(e.documentHighlightProvider.register("*",new fG)),this._register(e.multiDocumentHighlightProvider.register("*",new fG))}};$9=k9e([I9e(0,ue)],$9);var tse=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Xl=function(o,e){return function(t,i){e(t,i,o)}},pi,j9;const i6=new ae("hasWordHighlights",!1);function ise(o,e,t,i){const n=o.ordered(e);return MW(n.map(s=>()=>Promise.resolve(s.provideDocumentHighlights(e,t,i)).then(void 0,zi)),s=>s!=null).then(s=>{if(s){const r=new Ai;return r.set(e.uri,s),r}return new Ai})}function E9e(o,e,t,i,n){const s=o.ordered(e);return MW(s.map(r=>()=>{const a=n.filter(l=>AY(l)).filter(l=>n8(r.selector,l.uri,l.getLanguageId(),!0,void 0,void 0)>0);return Promise.resolve(r.provideMultiDocumentHighlights(e,t,a,i)).then(void 0,zi)}),r=>r!=null)}class nse{constructor(e,t,i){this._model=e,this._selection=t,this._wordSeparators=i,this._wordRange=this._getCurrentWordRange(e,t),this._result=null}get result(){return this._result||(this._result=nn(e=>this._compute(this._model,this._selection,this._wordSeparators,e))),this._result}_getCurrentWordRange(e,t){const i=e.getWordAtPosition(t.getPosition());return i?new D(t.startLineNumber,i.startColumn,t.startLineNumber,i.endColumn):null}cancel(){this.result.cancel()}}class N9e extends nse{constructor(e,t,i,n){super(e,t,i),this._providers=n}_compute(e,t,i,n){return ise(this._providers,e,t.getPosition(),n).then(s=>s||new Ai)}}class T9e extends nse{constructor(e,t,i,n,s){super(e,t,i),this._providers=n,this._otherModels=s}_compute(e,t,i,n){return E9e(this._providers,e,t.getPosition(),n,this._otherModels).then(s=>s||new Ai)}}function R9e(o,e,t,i){return new N9e(e,t,i,o)}function M9e(o,e,t,i,n){return new T9e(e,t,i,o,n)}mo("_executeDocumentHighlights",async(o,e,t)=>{const i=o.get(ue);return(await ise(i.documentHighlightProvider,e,t,qe.None))?.get(e.uri)});var zu;let q9=(zu=class{constructor(e,t,i,n,s,r,a,l){this.toUnhook=new U,this.workerRequestTokenId=0,this.workerRequestCompleted=!1,this.workerRequestValue=new Ai,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=void 0,this.runDelayer=this.toUnhook.add(new Zr(50)),this.editor=e,this.providers=t,this.multiDocumentProviders=i,this.codeEditorService=r,this.textModelService=s,this.configurationService=a,this.logService=l,this._hasWordHighlights=i6.bindTo(n),this._ignorePositionChangeEvent=!1,this.occurrencesHighlightEnablement=this.editor.getOption(90),this.occurrencesHighlightDelay=this.configurationService.getValue("editor.occurrencesHighlightDelay"),this.model=this.editor.getModel(),this.toUnhook.add(e.onDidChangeCursorPosition(c=>{this._ignorePositionChangeEvent||this.occurrencesHighlightEnablement!=="off"&&this.runDelayer.trigger(()=>{this._onPositionChanged(c)})})),this.toUnhook.add(e.onDidFocusEditorText(c=>{this.occurrencesHighlightEnablement!=="off"&&(this.workerRequest||this.runDelayer.trigger(()=>{this._run()}))})),this.toUnhook.add(e.onDidChangeModelContent(c=>{IT(this.model.uri,"output")||this._stopAll()})),this.toUnhook.add(e.onDidChangeModel(c=>{!c.newModelUrl&&c.oldModelUrl?this._stopSingular():pi.query&&this._run()})),this.toUnhook.add(e.onDidChangeConfiguration(c=>{const d=this.editor.getOption(90);if(this.occurrencesHighlightEnablement!==d)switch(this.occurrencesHighlightEnablement=d,d){case"off":this._stopAll();break;case"singleFile":this._stopAll(pi.query?.modelInfo?.modelURI);break;case"multiFile":pi.query&&this._run(!0);break;default:console.warn("Unknown occurrencesHighlight setting value:",d);break}})),this.toUnhook.add(this.configurationService.onDidChangeConfiguration(c=>{if(c.affectsConfiguration("editor.occurrencesHighlightDelay")){const d=a.getValue("editor.occurrencesHighlightDelay");this.occurrencesHighlightDelay!==d&&(this.occurrencesHighlightDelay=d)}})),this.toUnhook.add(e.onDidBlurEditorWidget(()=>{const c=this.codeEditorService.getFocusedCodeEditor();c?c.getModel()?.uri.scheme===Ie.vscodeNotebookCell&&this.editor.getModel()?.uri.scheme!==Ie.vscodeNotebookCell&&this._stopAll():this._stopAll()})),this.decorations=this.editor.createDecorationsCollection(),this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=void 0,pi.query&&this._run()}hasDecorations(){return this.decorations.length>0}restore(e){this.occurrencesHighlightEnablement!=="off"&&(this.runDelayer.cancel(),this.runDelayer.trigger(()=>{this._run(!1,e)}))}stop(){this.occurrencesHighlightEnablement!=="off"&&this._stopAll()}_getSortedHighlights(){return this.decorations.getRanges().sort(D.compareRangesUsingStarts)}moveNext(){const e=this._getSortedHighlights(),i=(e.findIndex(s=>s.containsPosition(this.editor.getPosition()))+1)%e.length,n=e[i];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(n.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(n);const s=this._getWord();if(s){const r=this.editor.getModel().getLineContent(n.startLineNumber);js(`${r}, ${i+1} of ${e.length} for '${s.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}moveBack(){const e=this._getSortedHighlights(),i=(e.findIndex(s=>s.containsPosition(this.editor.getPosition()))-1+e.length)%e.length,n=e[i];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(n.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(n);const s=this._getWord();if(s){const r=this.editor.getModel().getLineContent(n.startLineNumber);js(`${r}, ${i+1} of ${e.length} for '${s.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}_removeSingleDecorations(){if(!this.editor.hasModel())return;const e=pi.storedDecorationIDs.get(this.editor.getModel().uri);e&&(this.editor.removeDecorations(e),pi.storedDecorationIDs.delete(this.editor.getModel().uri),this.decorations.length>0&&(this.decorations.clear(),this._hasWordHighlights.set(!1)))}_removeAllDecorations(e){const t=this.codeEditorService.listCodeEditors(),i=[];for(const n of t){if(!n.hasModel()||Ku(n.getModel().uri,e))continue;const s=pi.storedDecorationIDs.get(n.getModel().uri);if(!s)continue;n.removeDecorations(s),i.push(n.getModel().uri);const r=rg.get(n);r?.wordHighlighter&&r.wordHighlighter.decorations.length>0&&(r.wordHighlighter.decorations.clear(),r.wordHighlighter.workerRequest=null,r.wordHighlighter._hasWordHighlights.set(!1))}for(const n of i)pi.storedDecorationIDs.delete(n)}_stopSingular(){this._removeSingleDecorations(),this.editor.hasTextFocus()&&(this.editor.getModel()?.uri.scheme!==Ie.vscodeNotebookCell&&pi.query?.modelInfo?.modelURI.scheme!==Ie.vscodeNotebookCell?(pi.query=null,this._run()):pi.query?.modelInfo&&(pi.query.modelInfo=null)),this.renderDecorationsTimer!==void 0&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=void 0),this.workerRequest!==null&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_stopAll(e){this._removeAllDecorations(e),this.renderDecorationsTimer!==void 0&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=void 0),this.workerRequest!==null&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_onPositionChanged(e){if(this.occurrencesHighlightEnablement==="off"){this._stopAll();return}if(e.source!=="api"&&e.reason!==3){this._stopAll();return}this._run()}_getWord(){const e=this.editor.getSelection(),t=e.startLineNumber,i=e.startColumn;return this.model.isDisposed()?null:this.model.getWordAtPosition({lineNumber:t,column:i})}getOtherModelsToHighlight(e){if(!e)return[];if(e.uri.scheme===Ie.vscodeNotebookCell){const s=[],r=this.codeEditorService.listCodeEditors();for(const a of r){const l=a.getModel();l&&l!==e&&l.uri.scheme===Ie.vscodeNotebookCell&&s.push(l)}return s}const i=[],n=this.codeEditorService.listCodeEditors();for(const s of n){if(!nH(s))continue;const r=s.getModel();r&&e===r.modified&&i.push(r.modified)}if(i.length)return i;if(this.occurrencesHighlightEnablement==="singleFile")return[];for(const s of n){const r=s.getModel();r&&r!==e&&i.push(r)}return i}async _run(e,t){if(this.editor.hasTextFocus()){const n=this.editor.getSelection();if(!n||n.startLineNumber!==n.endLineNumber){pi.query=null,this._stopAll();return}const s=n.startColumn,r=n.endColumn,a=this._getWord();if(!a||a.startColumn>s||a.endColumn<r){pi.query=null,this._stopAll();return}pi.query={modelInfo:{modelURI:this.model.uri,selection:n}}}else if(!pi.query){this._stopAll();return}if(this.lastCursorPositionChangeTime=new Date().getTime(),Ku(this.editor.getModel().uri,pi.query.modelInfo?.modelURI)){if(!e){const a=this.decorations.getRanges();for(const l of a)if(l.containsPosition(this.editor.getPosition()))return}this._stopAll(e?this.model.uri:void 0);const n=++this.workerRequestTokenId;this.workerRequestCompleted=!1;const s=this.getOtherModelsToHighlight(this.editor.getModel());if(!pi.query||!pi.query.modelInfo)return;const r=await this.textModelService.createModelReference(pi.query.modelInfo.modelURI);try{this.workerRequest=this.computeWithModel(r.object.textEditorModel,pi.query.modelInfo.selection,s),this.workerRequest?.result.then(a=>{n===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=a||[],this._beginRenderDecorations(t??this.occurrencesHighlightDelay))},Me)}catch(a){this.logService.error("Unexpected error during occurrence request. Log: ",a)}finally{r.dispose()}}else if(this.model.uri.scheme===Ie.vscodeNotebookCell){const n=++this.workerRequestTokenId;if(this.workerRequestCompleted=!1,!pi.query||!pi.query.modelInfo)return;const s=await this.textModelService.createModelReference(pi.query.modelInfo.modelURI);try{this.workerRequest=this.computeWithModel(s.object.textEditorModel,pi.query.modelInfo.selection,[this.model]),this.workerRequest?.result.then(r=>{n===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=r||[],this._beginRenderDecorations(t??this.occurrencesHighlightDelay))},Me)}catch(r){this.logService.error("Unexpected error during occurrence request. Log: ",r)}finally{s.dispose()}}}computeWithModel(e,t,i){return i.length?M9e(this.multiDocumentProviders,e,t,this.editor.getOption(148),i):R9e(this.providers,e,t,this.editor.getOption(148))}_beginRenderDecorations(e){const t=new Date().getTime(),i=this.lastCursorPositionChangeTime+e;t>=i?(this.renderDecorationsTimer=void 0,this.renderDecorations()):this.renderDecorationsTimer=setTimeout(()=>{this.renderDecorations()},i-t)}renderDecorations(){this.renderDecorationsTimer=void 0;const e=this.codeEditorService.listCodeEditors();for(const t of e){const i=rg.get(t);if(!i)continue;const n=[],s=t.getModel()?.uri;if(s&&this.workerRequestValue.has(s)){const r=pi.storedDecorationIDs.get(s),a=this.workerRequestValue.get(s);if(a)for(const c of a)c.range&&n.push({range:c.range,options:l7e(c.kind)});let l=[];t.changeDecorations(c=>{l=c.deltaDecorations(r??[],n)}),pi.storedDecorationIDs=pi.storedDecorationIDs.set(s,l),n.length>0&&(i.wordHighlighter?.decorations.set(n),i.wordHighlighter?._hasWordHighlights.set(!0))}}this.workerRequest=null}dispose(){this._stopSingular(),this.toUnhook.dispose()}},pi=zu,zu.storedDecorationIDs=new Ai,zu.query=null,zu);q9=pi=tse([Xl(4,Is),Xl(5,lt),Xl(6,We),Xl(7,Ut)],q9);var Zp;let rg=(Zp=class extends F{static get(e){return e.getContribution(j9.ID)}constructor(e,t,i,n,s,r,a){super(),this._wordHighlighter=null;const l=()=>{e.hasModel()&&!e.getModel().isTooLargeForTokenization()&&e.getModel().uri.scheme!==Ie.accessibleView&&(this._wordHighlighter=new q9(e,i.documentHighlightProvider,i.multiDocumentHighlightProvider,t,s,n,r,a))};this._register(e.onDidChangeModel(c=>{this._wordHighlighter&&(!c.newModelUrl&&c.oldModelUrl?.scheme!==Ie.vscodeNotebookCell&&this.wordHighlighter?.stop(),this._wordHighlighter.dispose(),this._wordHighlighter=null),l()})),l()}get wordHighlighter(){return this._wordHighlighter}saveViewState(){return!!(this._wordHighlighter&&this._wordHighlighter.hasDecorations())}moveNext(){this._wordHighlighter?.moveNext()}moveBack(){this._wordHighlighter?.moveBack()}restoreViewState(e){this._wordHighlighter&&e&&this._wordHighlighter.restore(250)}dispose(){this._wordHighlighter&&(this._wordHighlighter.dispose(),this._wordHighlighter=null),super.dispose()}},j9=Zp,Zp.ID="editor.contrib.wordHighlighter",Zp);rg=j9=tse([Xl(1,Te),Xl(2,ue),Xl(3,lt),Xl(4,Is),Xl(5,We),Xl(6,Ut)],rg);class sse extends de{constructor(e,t){super(t),this._isNext=e}run(e,t){const i=rg.get(t);i&&(this._isNext?i.moveNext():i.moveBack())}}class P9e extends sse{constructor(){super(!0,{id:"editor.action.wordHighlight.next",label:H(1572,"Go to Next Symbol Highlight"),precondition:i6,kbOpts:{kbExpr:T.editorTextFocus,primary:65,weight:100}})}}class A9e extends sse{constructor(){super(!1,{id:"editor.action.wordHighlight.prev",label:H(1573,"Go to Previous Symbol Highlight"),precondition:i6,kbOpts:{kbExpr:T.editorTextFocus,primary:1089,weight:100}})}}class O9e extends de{constructor(){super({id:"editor.action.wordHighlight.trigger",label:H(1574,"Trigger Symbol Highlight"),precondition:void 0,kbOpts:{kbExpr:T.editorTextFocus,primary:0,weight:100}})}run(e,t,i){const n=rg.get(t);n&&n.restoreViewState(!0)}}ot(rg.ID,rg,0);oe(P9e);oe(A9e);oe(O9e);IC($9);class nM extends an{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,i){if(!t.hasModel())return;const n=Qr(t.getOption(148),t.getOption(147)),s=t.getModel(),r=t.getSelections(),a=r.length>1,l=r.map(c=>{const d=new M(c.positionLineNumber,c.positionColumn),h=this._move(n,s,d,this._wordNavigationType,a);return this._moveTo(c,h,this._inSelectionMode)});if(s.pushStackElement(),t._getViewModel().setCursorStates("moveWordCommand",3,l.map(c=>ct.fromModelSelection(c))),l.length===1){const c=new M(l[0].positionLineNumber,l[0].positionColumn);t.revealPosition(c,0)}}_moveTo(e,t,i){return i?new ce(e.selectionStartLineNumber,e.selectionStartColumn,t.lineNumber,t.column):new ce(t.lineNumber,t.column,t.lineNumber,t.column)}}class mg extends nM{_move(e,t,i,n,s){return vt.moveWordLeft(e,t,i,n,s)}}class _g extends nM{_move(e,t,i,n,s){return vt.moveWordRight(e,t,i,n)}}class F9e extends mg{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}}class W9e extends mg{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}}class B9e extends mg{constructor(){super({inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:K.and(T.textInputFocus,K.and(_C,kR)?.negate()),primary:2063,mac:{primary:527},weight:100}})}}class H9e extends mg{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:void 0})}}class V9e extends mg{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndLeftSelect",precondition:void 0})}}class z9e extends mg{constructor(){super({inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:K.and(T.textInputFocus,K.and(_C,kR)?.negate()),primary:3087,mac:{primary:1551},weight:100}})}}class U9e extends mg{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0})}_move(e,t,i,n,s){return super._move(Qr(Cs.wordSeparators.defaultValue,e.intlSegmenterLocales),t,i,n,s)}}class $9e extends mg{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0})}_move(e,t,i,n,s){return super._move(Qr(Cs.wordSeparators.defaultValue,e.intlSegmenterLocales),t,i,n,s)}}class j9e extends _g{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}}class q9e extends _g{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{kbExpr:K.and(T.textInputFocus,K.and(_C,kR)?.negate()),primary:2065,mac:{primary:529},weight:100}})}}class K9e extends _g{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}}class G9e extends _g{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}}class Z9e extends _g{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:K.and(T.textInputFocus,K.and(_C,kR)?.negate()),primary:3089,mac:{primary:1553},weight:100}})}}class Y9e extends _g{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}}class X9e extends _g{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0})}_move(e,t,i,n,s){return super._move(Qr(Cs.wordSeparators.defaultValue,e.intlSegmenterLocales),t,i,n,s)}}class Q9e extends _g{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0})}_move(e,t,i,n,s){return super._move(Qr(Cs.wordSeparators.defaultValue,e.intlSegmenterLocales),t,i,n,s)}}class sM extends an{constructor(e){super({canTriggerInlineEdits:!0,...e}),this._whitespaceHeuristics=e.whitespaceHeuristics,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,i){const n=e?.get(ai);if(!t.hasModel()||!n)return;const s=Qr(t.getOption(148),t.getOption(147)),r=t.getModel(),a=t.getSelections(),l=t.getOption(10),c=t.getOption(15),d=n.getLanguageConfiguration(r.getLanguageId()).getAutoClosingPairs(),h=t._getViewModel(),u=a.map(g=>{const f=this._delete({wordSeparators:s,model:r,selection:g,whitespaceHeuristics:this._whitespaceHeuristics,autoClosingDelete:t.getOption(13),autoClosingBrackets:l,autoClosingQuotes:c,autoClosingPairs:d,autoClosedCharacters:h.getCursorAutoClosedCharacters()},this._wordNavigationType);return new Kn(f,"")});t.pushUndoStop(),t.executeCommands(this.id,u),t.pushUndoStop()}}class n6 extends sM{_delete(e,t){const i=vt.deleteWordLeft(e,t);return i||new D(1,1,1,1)}}class s6 extends sM{_delete(e,t){const i=vt.deleteWordRight(e,t);if(i)return i;const n=e.model.getLineCount(),s=e.model.getLineMaxColumn(n);return new D(n,s,n,s)}}class J9e extends n6{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:T.writable})}}class eWe extends n6{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:T.writable})}}class tWe extends n6{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:T.writable,kbOpts:{kbExpr:T.textInputFocus,primary:2049,mac:{primary:513},weight:100}})}}class iWe extends s6{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:T.writable})}}class nWe extends s6{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:T.writable})}}class sWe extends s6{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:T.writable,kbOpts:{kbExpr:T.textInputFocus,primary:2068,mac:{primary:532},weight:100}})}}class oWe extends de{constructor(){super({id:"deleteInsideWord",precondition:T.writable,label:H(1575,"Delete Word")})}run(e,t,i){if(!t.hasModel())return;const n=Qr(t.getOption(148),t.getOption(147)),s=t.getModel(),a=t.getSelections().map(l=>{const c=vt.deleteInsideWord(n,s,l);return new Kn(c,"")});t.pushUndoStop(),t.executeCommands(this.id,a),t.pushUndoStop()}}re(new F9e);re(new W9e);re(new B9e);re(new H9e);re(new V9e);re(new z9e);re(new j9e);re(new q9e);re(new K9e);re(new G9e);re(new Z9e);re(new Y9e);re(new U9e);re(new $9e);re(new X9e);re(new Q9e);re(new J9e);re(new eWe);re(new tWe);re(new iWe);re(new nWe);re(new sWe);oe(oWe);class rWe extends sM{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:T.writable,kbOpts:{kbExpr:T.textInputFocus,primary:0,mac:{primary:769},weight:100}})}_delete(e,t){const i=cR.deleteWordPartLeft(e);return i||new D(1,1,1,1)}}class aWe extends sM{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordPartRight",precondition:T.writable,kbOpts:{kbExpr:T.textInputFocus,primary:0,mac:{primary:788},weight:100}})}_delete(e,t){const i=cR.deleteWordPartRight(e);if(i)return i;const n=e.model.getLineCount(),s=e.model.getLineMaxColumn(n);return new D(n,s,n,s)}}class ose extends nM{_move(e,t,i,n,s){return cR.moveWordPartLeft(e,t,i,s)}}class lWe extends ose{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:void 0,kbOpts:{kbExpr:T.textInputFocus,primary:0,mac:{primary:783},weight:100}})}}st.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft");class cWe extends ose{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:void 0,kbOpts:{kbExpr:T.textInputFocus,primary:0,mac:{primary:1807},weight:100}})}}st.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");class rse extends nM{_move(e,t,i,n,s){return cR.moveWordPartRight(e,t,i)}}class dWe extends rse{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordPartRight",precondition:void 0,kbOpts:{kbExpr:T.textInputFocus,primary:0,mac:{primary:785},weight:100}})}}class hWe extends rse{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordPartRightSelect",precondition:void 0,kbOpts:{kbExpr:T.textInputFocus,primary:0,mac:{primary:1809},weight:100}})}}re(new rWe);re(new aWe);re(new lWe);re(new cWe);re(new dWe);re(new hWe);const S6=class S6 extends F{constructor(e){super(),this.editor=e,this._register(this.editor.onDidAttemptReadOnlyEdit(()=>this._onDidAttemptReadOnlyEdit()))}_onDidAttemptReadOnlyEdit(){const e=Mo.get(this.editor);if(e&&this.editor.hasModel()){let t=this.editor.getOptions().get(105);t||(this.editor.isSimpleWidget?t=new ns(m(1378,"Cannot edit in read-only input")):t=new ns(m(1379,"Cannot edit in read-only editor"))),e.showMessage(t,this.editor.getPosition())}}};S6.ID="editor.contrib.readOnlyMessageController";let IE=S6;ot(IE.ID,IE,2);var uWe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},pG=function(o,e){return function(t,i){e(t,i,o)}};let K9=class extends F{constructor(e,t,i){super(),this._textModel=e,this._languageFeaturesService=t,this._outlineModelService=i,this._currentModel=Ne(this,void 0);const n=ko("documentSymbolProvider.onDidChange",this._languageFeaturesService.documentSymbolProvider.onDidChange),s=ko("_textModel.onDidChangeContent",se.debounce(r=>this._textModel.onDidChangeContent(r),()=>{},100));this._register(as(async(r,a)=>{n.read(r),s.read(r);const l=a.add(new cEe),c=await this._outlineModelService.getOrCreate(this._textModel,l.token);a.isDisposed||this._currentModel.set(c,void 0)}))}getBreadcrumbItems(e,t){const i=this._currentModel.read(t);if(!i)return[];const n=i.asListOfDocumentSymbols().filter(s=>e.contains(s.range.startLineNumber)&&!e.contains(s.range.endLineNumber));return n.sort(QG(Zn(s=>s.range.endLineNumber-s.range.startLineNumber,To))),n.map(s=>({name:s.name,kind:s.kind,startLineNumber:s.range.startLineNumber}))}};K9=uWe([pG(1,ue),pG(2,Ay)],K9);mI.setBreadcrumbsSourceFactory((o,e)=>e.createInstance(K9,o));var gWe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},OP=function(o,e){return function(t,i){e(t,i,o)}},wv;let EE=(wv=class extends F{constructor(e,t,i,n){super();const s=this._register(oi(e)),r=this._register(n.createMenu(ge.EditorContent,e.contextKeyService)),a=pt(this,r.onDidChange,()=>r.getActions().length===0);this._register(ke(l=>{if(a.read(l))return;const d=rt("div.floating-menu-overlay-widget");d.root.style.height="28px";const h=t.createInstance(h0,d.root,ge.EditorContent,{actionViewItemProvider:(u,g)=>{if(!(u instanceof gr))return;const f=i.lookupKeybinding(u.id);if(f)return t.createInstance(class extends eg{updateLabel(){this.options.label&&this.label&&(this.label.textContent=`${this._commandAction.label} (${f.getLabel()})`)}},u,{...g,keybindingNotRenderedWithLabel:!0})},hiddenItemStrategy:0,menuOptions:{shouldForwardArgs:!0},telemetrySource:"editor.overlayToolbar",toolbarOptions:{primaryGroup:()=>!0,useSeparatorsInPrimaryActions:!0}});l.store.add(h),l.store.add(ke(u=>{const g=s.model.read(u);h.context=g?.uri})),l.store.add(s.createOverlayWidget({allowEditorOverflow:!1,domNode:d.root,minContentWidthInPx:Ht(0),position:Ht({preference:1})}))}))}},wv.ID="editor.contrib.floatingToolbar",wv);EE=gWe([OP(1,me),OP(2,ht),OP(3,ta)],EE);ot(EE.ID,EE,1);const y6=class y6 extends F{constructor(e){super(),this.editor=e,this.widget=null,Gr&&(this._register(e.onDidChangeConfiguration(()=>this.update())),this.update())}update(){const e=!this.editor.getOption(104);!this.widget&&e?this.widget=new G9(this.editor):this.widget&&!e&&(this.widget.dispose(),this.widget=null)}dispose(){super.dispose(),this.widget&&(this.widget.dispose(),this.widget=null)}};y6.ID="editor.contrib.iPadShowKeyboard";let NE=y6;const mT=class mT extends F{constructor(e){super(),this.editor=e,this._domNode=document.createElement("textarea"),this._domNode.className="iPadShowKeyboard",this._register(B(this._domNode,"touchstart",t=>{this.editor.focus()})),this._register(B(this._domNode,"focus",t=>{this.editor.focus()})),this.editor.addOverlayWidget(this)}dispose(){this.editor.removeOverlayWidget(this),super.dispose()}getId(){return mT.ID}getDomNode(){return this._domNode}getPosition(){return{preference:1}}};mT.ID="editor.contrib.ShowKeyboardWidget";let G9=mT;ot(NE.ID,NE,3);var fWe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},mG=function(o,e){return function(t,i){e(t,i,o)}},Z9,Yp;let U0=(Yp=class extends F{static get(e){return e.getContribution(Z9.ID)}constructor(e,t,i){super(),this._editor=e,this._languageService=i,this._widget=null,this._register(this._editor.onDidChangeModel(n=>this.stop())),this._register(this._editor.onDidChangeModelLanguage(n=>this.stop())),this._register(_i.onDidChange(n=>this.stop())),this._register(this._editor.onKeyUp(n=>n.keyCode===9&&this.stop()))}dispose(){this.stop(),super.dispose()}launch(){this._widget||this._editor.hasModel()&&(this._widget=new Y9(this._editor,this._languageService))}stop(){this._widget&&(this._widget.dispose(),this._widget=null)}},Z9=Yp,Yp.ID="editor.contrib.inspectTokens",Yp);U0=Z9=fWe([mG(1,yr),mG(2,yi)],U0);class pWe extends de{constructor(){super({id:"editor.action.inspectTokens",label:SF.inspectTokensAction,alias:"Developer: Inspect Tokens",precondition:void 0})}run(e,t){U0.get(t)?.launch()}}function mWe(o){let e="";for(let t=0,i=o.length;t<i;t++){const n=o.charCodeAt(t);switch(n){case 9:e+="→";break;case 32:e+="·";break;default:e+=String.fromCharCode(n)}}return e}function _We(o,e){const t=_i.get(e);if(t)return t;const i=o.encodeLanguageId(e);return{getInitialState:()=>Mv,tokenize:(n,s,r)=>sB(e,r),tokenizeEncoded:(n,s,r)=>XT(i,r)}}const _T=class _T extends F{constructor(e,t){super(),this.allowEditorOverflow=!0,this._editor=e,this._languageService=t,this._model=this._editor.getModel(),this._domNode=document.createElement("div"),this._domNode.className="tokens-inspect-widget",this._tokenizationSupport=_We(this._languageService.languageIdCodec,this._model.getLanguageId()),this._compute(this._editor.getPosition()),this._register(this._editor.onDidChangeCursorPosition(i=>this._compute(this._editor.getPosition()))),this._editor.addContentWidget(this)}dispose(){this._editor.removeContentWidget(this),super.dispose()}getId(){return _T._ID}_compute(e){const t=this._getTokensAtLine(e.lineNumber);let i=0;for(let l=t.tokens1.length-1;l>=0;l--){const c=t.tokens1[l];if(e.column-1>=c.offset){i=l;break}}let n=0;for(let l=t.tokens2.length>>>1;l>=0;l--)if(e.column-1>=t.tokens2[l<<1]){n=l;break}const s=this._model.getLineContent(e.lineNumber);let r="";if(i<t.tokens1.length){const l=t.tokens1[i].offset,c=i+1<t.tokens1.length?t.tokens1[i+1].offset:s.length;r=s.substring(l,c)}mn(this._domNode,te("h2.tm-token",void 0,mWe(r),te("span.tm-token-length",void 0,`${r.length} ${r.length===1?"char":"chars"}`))),Y(this._domNode,te("hr.tokens-inspect-separator",{style:"clear:both"}));const a=(n<<1)+1<t.tokens2.length?this._decodeMetadata(t.tokens2[(n<<1)+1]):null;Y(this._domNode,te("table.tm-metadata-table",void 0,te("tbody",void 0,te("tr",void 0,te("td.tm-metadata-key",void 0,"language"),te("td.tm-metadata-value",void 0,`${a?a.languageId:"-?-"}`)),te("tr",void 0,te("td.tm-metadata-key",void 0,"token type"),te("td.tm-metadata-value",void 0,`${a?this._tokenTypeToString(a.tokenType):"-?-"}`)),te("tr",void 0,te("td.tm-metadata-key",void 0,"font style"),te("td.tm-metadata-value",void 0,`${a?this._fontStyleToString(a.fontStyle):"-?-"}`)),te("tr",void 0,te("td.tm-metadata-key",void 0,"foreground"),te("td.tm-metadata-value",void 0,`${a?$.Format.CSS.formatHex(a.foreground):"-?-"}`)),te("tr",void 0,te("td.tm-metadata-key",void 0,"background"),te("td.tm-metadata-value",void 0,`${a?$.Format.CSS.formatHex(a.background):"-?-"}`))))),Y(this._domNode,te("hr.tokens-inspect-separator")),i<t.tokens1.length&&Y(this._domNode,te("span.tm-token-type",void 0,t.tokens1[i].type)),this._editor.layoutContentWidget(this)}_decodeMetadata(e){const t=_i.getColorMap(),i=is.getLanguageId(e),n=is.getTokenType(e),s=is.getFontStyle(e),r=is.getForeground(e),a=is.getBackground(e);return{languageId:this._languageService.languageIdCodec.decodeLanguageId(i),tokenType:n,fontStyle:s,foreground:t[r],background:t[a]}}_tokenTypeToString(e){switch(e){case 0:return"Other";case 1:return"Comment";case 2:return"String";case 3:return"RegEx";default:return"??"}}_fontStyleToString(e){let t="";return e&1&&(t+="italic "),e&2&&(t+="bold "),e&4&&(t+="underline "),e&8&&(t+="strikethrough "),t.length===0&&(t="---"),t}_getTokensAtLine(e){const t=this._getStateBeforeLine(e),i=this._tokenizationSupport.tokenize(this._model.getLineContent(e),!0,t),n=this._tokenizationSupport.tokenizeEncoded(this._model.getLineContent(e),!0,t);return{startState:t,tokens1:i.tokens,tokens2:n.tokens,endState:i.endState}}_getStateBeforeLine(e){let t=this._tokenizationSupport.getInitialState();for(let i=1;i<e;i++)t=this._tokenizationSupport.tokenize(this._model.getLineContent(i),!0,t).endState;return t}getDomNode(){return this._domNode}getPosition(){return{position:this._editor.getPosition(),preference:[2,1]}}};_T._ID="editor.contrib.inspectTokensWidget";let Y9=_T;ot(U0.ID,U0,4);oe(pWe);var bWe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},_G=function(o,e){return function(t,i){e(t,i,o)}},Ww,Xp;let X9=(Xp=class{constructor(e,t){this.quickInputService=e,this.keybindingService=t,this.registry=gi.as(Km.Quickaccess)}provide(e){const t=new U;return t.add(e.onDidAccept(()=>{const[i]=e.selectedItems;i&&this.quickInputService.quickAccess.show(i.prefix,{preserveValue:!0})})),t.add(e.onDidChangeValue(i=>{const n=this.registry.getQuickAccessProvider(i.substr(Ww.PREFIX.length));n&&n.prefix&&n.prefix!==Ww.PREFIX&&this.quickInputService.quickAccess.show(n.prefix,{preserveValue:!0})})),e.items=this.getQuickAccessProviders().filter(i=>i.prefix!==Ww.PREFIX),t}getQuickAccessProviders(){return this.registry.getQuickAccessProviders().sort((t,i)=>t.prefix.localeCompare(i.prefix)).flatMap(t=>this.createPicks(t))}createPicks(e){return e.helpEntries.map(t=>{const i=t.prefix||e.prefix,n=i||"…";return{prefix:i,label:n,keybinding:t.commandId?this.keybindingService.lookupKeybinding(t.commandId):void 0,ariaLabel:m(1747,"{0}, {1}",n,t.description),description:t.description}})}},Ww=Xp,Xp.PREFIX="?",Xp);X9=Ww=bWe([_G(0,ds),_G(1,ht)],X9);gi.as(Km.Quickaccess).registerQuickAccessProvider({ctor:X9,prefix:"",helpEntries:[{description:yF.helpQuickAccessActionLabel}]});class ase{constructor(e){this.options=e,this.rangeHighlightDecorationId=void 0}provide(e,t,i){const n=new U;e.canAcceptInBackground=!!this.options?.canAcceptInBackground,e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;const s=n.add(new _t);return s.value=this.doProvide(e,t,i),n.add(this.onDidActiveTextEditorControlChange(()=>{s.value=void 0,s.value=this.doProvide(e,t)})),n}doProvide(e,t,i){const n=new U,s=this.activeTextEditorControl;if(s&&this.canProvideWithTextEditor(s)){const r={editor:s},a=gte(s);if(a){let l=s.saveViewState()??void 0;n.add(a.onDidChangeCursorPosition(()=>{l=s.saveViewState()??void 0})),r.restoreViewState=()=>{l&&s===this.activeTextEditorControl&&s.restoreViewState(l)},n.add(em(t.onCancellationRequested)(()=>r.restoreViewState?.()))}n.add(fe(()=>this.clearDecorations(s))),n.add(this.provideWithTextEditor(r,e,t,i))}else n.add(this.provideWithoutTextEditor(e,t));return n}canProvideWithTextEditor(e){return!0}gotoLocation({editor:e},t){e.setSelection(t.range,"code.jump"),e.revealRangeInCenter(t.range,0),t.preserveFocus||e.focus();const i=e.getModel();i&&"getLineContent"in i&&ul(`${i.getLineContent(t.range.startLineNumber)}`)}getModel(e){return nH(e)?e.getModel()?.modified:e.getModel()}addDecorations(e,t){e.changeDecorations(i=>{const n=[];this.rangeHighlightDecorationId&&(n.push(this.rangeHighlightDecorationId.overviewRulerDecorationId),n.push(this.rangeHighlightDecorationId.rangeHighlightId),this.rangeHighlightDecorationId=void 0);const s=[{range:t,options:{description:"quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:t,options:{description:"quick-access-range-highlight-overview",overviewRuler:{color:bi($X),position:pr.Full}}}],[r,a]=i.deltaDecorations(n,s);this.rangeHighlightDecorationId={rangeHighlightId:r,overviewRulerDecorationId:a}})}clearDecorations(e){const t=this.rangeHighlightDecorationId;t&&(e.changeDecorations(i=>{i.deltaDecorations([t.overviewRulerDecorationId,t.rangeHighlightId],[])}),this.rangeHighlightDecorationId=void 0)}}const Cf=class Cf extends ase{constructor(){super({canAcceptInBackground:!0})}get useZeroBasedOffset(){return this.storageService.getBoolean(Cf.ZERO_BASED_OFFSET_STORAGE_KEY,-1,!1)}set useZeroBasedOffset(e){this.storageService.store(Cf.ZERO_BASED_OFFSET_STORAGE_KEY,e,-1,0)}provideWithoutTextEditor(e){const t=m(1335,"Open a text editor first to go to a line.");return e.items=[{label:t}],e.ariaLabel=t,F.None}provideWithTextEditor(e,t,i){const n=e.editor,s=new U;s.add(t.onDidAccept(c=>{const[d]=t.selectedItems;if(d){if(!d.lineNumber)return;this.gotoLocation(e,{range:this.toRange(d.lineNumber,d.column),keyMods:t.keyMods,preserveFocus:c.inBackground}),c.inBackground||t.hide()}}));const r=()=>{const c=t.value.trim().substring(Cf.PREFIX.length),{inOffsetMode:d,lineNumber:h,column:u,label:g}=this.parsePosition(n,c);if(a.visible=!!d,t.items=[{lineNumber:h,column:u,label:g}],t.ariaLabel=g,!h){this.clearDecorations(n);return}const f=this.toRange(h,u);n.revealRangeInCenter(f,0),this.addDecorations(n,f)},a=new _h({title:m(1336,"Use Zero-Based Offset"),icon:Z.indexZero,isChecked:this.useZeroBasedOffset,inputActiveOptionBorder:ee(ly),inputActiveOptionForeground:ee(cy),inputActiveOptionBackground:ee(CC)});s.add(a.onChange(()=>{this.useZeroBasedOffset=!this.useZeroBasedOffset,r()})),t.toggles=[a],r(),s.add(t.onDidChangeValue(()=>r()));const l=gte(n);return l&&l.getOptions().get(76).renderType===2&&(l.updateOptions({lineNumbers:"on"}),s.add(fe(()=>l.updateOptions({lineNumbers:"relative"})))),s}toRange(e=1,t=1){return{startLineNumber:e,startColumn:t,endLineNumber:e,endColumn:t}}parsePosition(e,t){const i=this.getModel(e);if(!i)return{label:m(1337,"Open a text editor first to go to a line.")};if(t.startsWith(":")){let n=parseInt(t.substring(1),10);const s=i.getValueLength();if(isNaN(n))return{inOffsetMode:!0,label:this.useZeroBasedOffset?m(1338,"Type a character position to go to (from 0 to {0}).",s-1):m(1339,"Type a character position to go to (from 1 to {0}).",s)};{const r=n<0;this.useZeroBasedOffset||(n-=Math.sign(n)),r&&(n+=s);const a=i.getPositionAt(n);return{...a,inOffsetMode:!0,label:m(1340,"Press 'Enter' to go to line {0} at column {1}.",a.lineNumber,a.column)}}}else{const n=t.split(/,|:|#/),s=i.getLineCount();let r=parseInt(n[0]?.trim(),10);if(n.length<1||isNaN(r))return{label:m(1341,"Type a line number to go to (from 1 to {0}).",s)};r=r>=0?r:s+1+r,r=Math.min(Math.max(1,r),s);const a=i.getLineMaxColumn(r);let l=parseInt(n[1]?.trim(),10);return n.length<2||isNaN(l)?{lineNumber:r,column:1,label:n.length<2?m(1342,"Press 'Enter' to go to line {0} or enter : to add a column number.",r):m(1343,"Press 'Enter' to go to line {0} or enter a column number (from 1 to {1}).",r,a)}:(l=l>=0?l:a+l,l=Math.min(Math.max(1,l),a),{lineNumber:r,column:l,label:m(1344,"Press 'Enter' to go to line {0} at column {1}.",r,l)})}}};Cf.PREFIX=":",Cf.ZERO_BASED_OFFSET_STORAGE_KEY="gotoLine.useZeroBasedOffset";let Q9=Cf;var vWe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},bG=function(o,e){return function(t,i){e(t,i,o)}};let $0=class extends Q9{constructor(e,t){super(),this.editorService=e,this.storageService=t,this.onDidActiveTextEditorControlChange=se.None}get activeTextEditorControl(){return this.editorService.getFocusedCodeEditor()??void 0}};$0=vWe([bG(0,lt),bG(1,Es)],$0);var Qp;let lse=(Qp=class extends de{constructor(){super({id:Qp.ID,label:Fk.gotoLineActionLabel,alias:"Go to Line/Column...",precondition:void 0,kbOpts:{kbExpr:T.focus,primary:2085,mac:{primary:293},weight:100}})}run(e){e.get(ds).quickAccess.show($0.PREFIX)}},Qp.ID="editor.action.gotoLine",Qp);oe(lse);gi.as(Km.Quickaccess).registerQuickAccessProvider({ctor:$0,prefix:$0.PREFIX,helpEntries:[{description:Fk.gotoLineActionLabel,commandId:lse.ID}]});const cse=[void 0,[]];function FP(o,e,t=0,i=0){const n=e;return n.values&&n.values.length>1?CWe(o,n.values,t,i):dse(o,e,t,i)}function CWe(o,e,t,i){let n=0;const s=[];for(const r of e){const[a,l]=dse(o,r,t,i);if(typeof a!="number")return cse;n+=a,s.push(...l)}return[n,wWe(s)]}function dse(o,e,t,i){const n=fm(e.original,e.originalLowercase,t,o,o.toLowerCase(),i,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return n?[n[0],my(n)]:cse}function wWe(o){const e=o.sort((n,s)=>n.start-s.start),t=[];let i;for(const n of e)!i||!SWe(i,n)?(i=n,t.push(n)):(i.start=Math.min(i.start,n.start),i.end=Math.max(i.end,n.end));return t}function SWe(o,e){return!(o.end<e.start||e.end<o.start)}function vG(o){return o.startsWith('"')&&o.endsWith('"')}const hse=" ";function J9(o){typeof o!="string"&&(o="");const e=o.toLowerCase(),{pathNormalized:t,normalized:i,normalizedLowercase:n}=CG(o),s=t.indexOf(ol)>=0,r=vG(o);let a;const l=o.split(hse);if(l.length>1)for(const c of l){const d=vG(c),{pathNormalized:h,normalized:u,normalizedLowercase:g}=CG(c);u&&(a||(a=[]),a.push({original:c,originalLowercase:c.toLowerCase(),pathNormalized:h,normalized:u,normalizedLowercase:g,expectContiguousMatch:d}))}return{original:o,originalLowercase:e,pathNormalized:t,normalized:i,normalizedLowercase:n,values:a,containsPathSeparator:s,expectContiguousMatch:r}}function CG(o){let e;Rn?e=o.replace(/\//g,ol):e=o.replace(/\\/g,ol);const t=e.replace(/[\*\u2026\s"]/g,"");return{pathNormalized:e,normalized:t,normalizedLowercase:t.toLowerCase()}}function wG(o){return Array.isArray(o)?J9(o.map(e=>e.original).join(hse)):J9(o.original)}var yWe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},SG=function(o,e){return function(t,i){e(t,i,o)}},aD,Ja;let Jf=(Ja=class extends ase{constructor(e,t,i=Object.create(null)){super(i),this._languageFeaturesService=e,this._outlineModelService=t,this.options=i,this.options.canAcceptInBackground=!0}provideWithoutTextEditor(e){return this.provideLabelPick(e,m(1345,"To go to a symbol, first open a text editor with symbol information.")),F.None}provideWithTextEditor(e,t,i,n){const s=e.editor,r=this.getModel(s);return r?this._languageFeaturesService.documentSymbolProvider.has(r)?this.doProvideWithEditorSymbols(e,r,t,i,n):this.doProvideWithoutEditorSymbols(e,r,t,i):F.None}doProvideWithoutEditorSymbols(e,t,i,n){const s=new U;return this.provideLabelPick(i,m(1346,"The active text editor does not provide symbol information.")),(async()=>!await this.waitForLanguageSymbolRegistry(t,s)||n.isCancellationRequested||s.add(this.doProvideWithEditorSymbols(e,t,i,n)))(),s}provideLabelPick(e,t){e.items=[{label:t,index:0,kind:14}],e.ariaLabel=t}async waitForLanguageSymbolRegistry(e,t){if(this._languageFeaturesService.documentSymbolProvider.has(e))return!0;const i=new Fm,n=t.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(()=>{this._languageFeaturesService.documentSymbolProvider.has(e)&&(n.dispose(),i.complete(!0))}));return t.add(fe(()=>i.complete(!1))),i.p}doProvideWithEditorSymbols(e,t,i,n,s){const r=e.editor,a=new U;a.add(i.onDidAccept(h=>{const[u]=i.selectedItems;u&&u.range&&(this.gotoLocation(e,{range:u.range.selection,keyMods:i.keyMods,preserveFocus:h.inBackground}),s?.handleAccept?.(u,h.inBackground),h.inBackground||i.hide())})),a.add(i.onDidTriggerItemButton(({item:h})=>{h&&h.range&&(this.gotoLocation(e,{range:h.range.selection,keyMods:i.keyMods,forceSideBySide:!0}),i.hide())}));const l=this.getDocumentSymbols(t,n),c=a.add(new _t),d=async h=>{c?.value?.cancel(),i.busy=!1,c.value=new ei,i.busy=!0;try{const u=J9(i.value.substr(aD.PREFIX.length).trim()),g=await this.doGetSymbolPicks(l,u,void 0,c.value.token,t);if(n.isCancellationRequested)return;if(g.length>0){if(i.items=g,h&&u.original.length===0){const f=vS(g,p=>!!(p.type!=="separator"&&p.range&&D.containsPosition(p.range.decoration,h)));f&&(i.activeItems=[f])}}else u.original.length>0?this.provideLabelPick(i,m(1347,"No matching editor symbols")):this.provideLabelPick(i,m(1348,"No editor symbols"))}finally{n.isCancellationRequested||(i.busy=!1)}};return a.add(i.onDidChangeValue(()=>d(void 0))),d(r.getSelection()?.getPosition()),a.add(i.onDidChangeActive(()=>{const[h]=i.activeItems;h&&h.range&&(r.revealRangeInCenter(h.range.selection,0),this.addDecorations(r,h.range.decoration))})),a}async doGetSymbolPicks(e,t,i,n,s){const r=await e;if(n.isCancellationRequested)return[];const a=t.original.indexOf(aD.SCOPE_PREFIX)===0,l=a?1:0;let c,d;t.values&&t.values.length>1?(c=wG(t.values[0]),d=wG(t.values.slice(1))):c=t;let h;const u=this.options?.openSideBySideDirection?.();u&&(h=[{iconClass:u==="right"?ye.asClassName(Z.splitHorizontal):ye.asClassName(Z.splitVertical),tooltip:u==="right"?m(1349,"Open to the Side"):m(1350,"Open to the Bottom")}]);const g=[];for(let _=0;_<r.length;_++){const b=r[_],v=$le(b.name),w=`$(${ED.toIcon(b.kind).id}) ${v}`,C=w.length-v.length;let S=b.containerName;i?.extraContainerLabel&&(S?S=`${i.extraContainerLabel} • ${S}`:S=i.extraContainerLabel);let L,x,k,I;if(t.original.length>l){let A=!1;if(c!==t&&([L,x]=FP(w,{...t,values:void 0},l,C),typeof L=="number"&&(A=!0)),typeof L!="number"&&([L,x]=FP(w,c,l,C),typeof L!="number"))continue;if(!A&&d){if(S&&d.original.length>0&&([k,I]=FP(S,d)),typeof k!="number")continue;typeof L=="number"&&(L+=k)}}const R=b.tags&&b.tags.indexOf(1)>=0;g.push({index:_,kind:b.kind,score:L,label:w,ariaLabel:Fle(b.name,b.kind),description:S,highlights:R?void 0:{label:x,description:I},range:{selection:D.collapseToStart(b.selectionRange),decoration:b.range},uri:s.uri,symbolName:v,strikethrough:R,buttons:h})}const f=g.sort((_,b)=>a?this.compareByKindAndScore(_,b):this.compareByScore(_,b));let p=[];if(a){let w=function(){b&&typeof _=="number"&&v>0&&(b.label=sm(BP[_]||WP,v))},_,b,v=0;for(const C of f)_!==C.kind?(w(),_=C.kind,v=1,b={type:"separator"},p.push(b)):v++,p.push(C);w()}else f.length>0&&(p=[{label:m(1351,"symbols ({0})",g.length),type:"separator"},...f]);return p}compareByScore(e,t){if(typeof e.score!="number"&&typeof t.score=="number")return 1;if(typeof e.score=="number"&&typeof t.score!="number")return-1;if(typeof e.score=="number"&&typeof t.score=="number"){if(e.score>t.score)return-1;if(e.score<t.score)return 1}return e.index<t.index?-1:e.index>t.index?1:0}compareByKindAndScore(e,t){const i=BP[e.kind]||WP,n=BP[t.kind]||WP,s=i.localeCompare(n);return s===0?this.compareByScore(e,t):s}async getDocumentSymbols(e,t){const i=await this._outlineModelService.getOrCreate(e,t);return t.isCancellationRequested?[]:i.asListOfDocumentSymbols()}},aD=Ja,Ja.PREFIX="@",Ja.SCOPE_PREFIX=":",Ja.PREFIX_BY_CATEGORY=`${Ja.PREFIX}${Ja.SCOPE_PREFIX}`,Ja);Jf=aD=yWe([SG(0,ue),SG(1,Ay)],Jf);const WP=m(1352,"properties ({0})"),BP={5:m(1353,"methods ({0})"),11:m(1354,"functions ({0})"),8:m(1355,"constructors ({0})"),12:m(1356,"variables ({0})"),4:m(1357,"classes ({0})"),22:m(1358,"structs ({0})"),23:m(1359,"events ({0})"),24:m(1360,"operators ({0})"),10:m(1361,"interfaces ({0})"),2:m(1362,"namespaces ({0})"),3:m(1363,"packages ({0})"),25:m(1364,"type parameters ({0})"),1:m(1365,"modules ({0})"),6:m(1366,"properties ({0})"),9:m(1367,"enumerations ({0})"),21:m(1368,"enumeration members ({0})"),14:m(1369,"strings ({0})"),0:m(1370,"files ({0})"),17:m(1371,"arrays ({0})"),15:m(1372,"numbers ({0})"),16:m(1373,"booleans ({0})"),18:m(1374,"objects ({0})"),19:m(1375,"keys ({0})"),7:m(1376,"fields ({0})"),13:m(1377,"constants ({0})")};var LWe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},HP=function(o,e){return function(t,i){e(t,i,o)}};let eW=class extends Jf{constructor(e,t,i){super(t,i),this.editorService=e,this.onDidActiveTextEditorControlChange=se.None}get activeTextEditorControl(){return this.editorService.getFocusedCodeEditor()??void 0}};eW=LWe([HP(0,lt),HP(1,ue),HP(2,Ay)],eW);const bT=class bT extends de{constructor(){super({id:bT.ID,label:QS.quickOutlineActionLabel,alias:"Go to Symbol...",precondition:T.hasDocumentSymbolProvider,kbOpts:{kbExpr:T.focus,primary:3117,weight:100},contextMenuOpts:{group:"navigation",order:3}})}run(e){e.get(ds).quickAccess.show(Jf.PREFIX,{itemActivation:ja.NONE})}};bT.ID="editor.action.quickOutline";let TE=bT;oe(TE);gi.as(Km.Quickaccess).registerQuickAccessProvider({ctor:eW,prefix:Jf.PREFIX,helpEntries:[{description:QS.quickOutlineActionLabel,prefix:Jf.PREFIX,commandId:TE.ID},{description:QS.quickOutlineByCategoryActionLabel,prefix:Jf.PREFIX_BY_CATEGORY}]});function xWe(o){const e=new Map;for(const t of o)e.set(t,(e.get(t)??0)+1);return e}class R1{constructor(){this.chunkCount=0,this.chunkOccurrences=new Map,this.documents=new Map}calculateScores(e,t){const i=this.computeEmbedding(e),n=new Map,s=[];for(const[r,a]of this.documents){if(t.isCancellationRequested)return[];for(const l of a.chunks){const c=this.computeSimilarityScore(l,i,n);c>0&&s.push({key:r,score:c})}}return s}static termFrequencies(e){return xWe(R1.splitTerms(e))}static*splitTerms(e){const t=i=>i.toLowerCase();for(const[i]of e.matchAll(new RegExp("\\b\\p{Letter}[\\p{Letter}\\d]{2,}\\b","gu"))){yield t(i);const n=i.replace(/([a-z])([A-Z])/g,"$1 $2").split(/\s+/g);if(n.length>1)for(const s of n)s.length>2&&new RegExp("\\p{Letter}{3,}","gu").test(s)&&(yield t(s))}}updateDocuments(e){for(const{key:t}of e)this.deleteDocument(t);for(const t of e){const i=[];for(const n of t.textChunks){const s=R1.termFrequencies(n);for(const r of s.keys())this.chunkOccurrences.set(r,(this.chunkOccurrences.get(r)??0)+1);i.push({text:n,tf:s})}this.chunkCount+=i.length,this.documents.set(t.key,{chunks:i})}return this}deleteDocument(e){const t=this.documents.get(e);if(t){this.documents.delete(e),this.chunkCount-=t.chunks.length;for(const i of t.chunks)for(const n of i.tf.keys()){const s=this.chunkOccurrences.get(n);if(typeof s=="number"){const r=s-1;r<=0?this.chunkOccurrences.delete(n):this.chunkOccurrences.set(n,r)}}}}computeSimilarityScore(e,t,i){let n=0;for(const[s,r]of Object.entries(t)){const a=e.tf.get(s);if(!a)continue;let l=i.get(s);typeof l!="number"&&(l=this.computeIdf(s),i.set(s,l));const c=a*l;n+=c*r}return n}computeEmbedding(e){const t=R1.termFrequencies(e);return this.computeTfidf(t)}computeIdf(e){const t=this.chunkOccurrences.get(e)??0;return t>0?Math.log((this.chunkCount+1)/t):0}computeTfidf(e){const t=Object.create(null);for(const[i,n]of e){const s=this.computeIdf(i);s>0&&(t[i]=n*s)}return t}}function DWe(o){const e=o.slice(0);e.sort((i,n)=>n.score-i.score);const t=e[0]?.score??0;if(t>0)for(const i of e)i.score/=t;return e}var ub;(function(o){o[o.NO_ACTION=0]="NO_ACTION",o[o.CLOSE_PICKER=1]="CLOSE_PICKER",o[o.REFRESH_PICKER=2]="REFRESH_PICKER",o[o.REMOVE_ITEM=3]="REMOVE_ITEM"})(ub||(ub={}));function VP(o){return Array.isArray(o.items)}function yG(o){const e=o;return!!e.picks&&e.additionalPicks instanceof Promise}class kWe extends F{constructor(e,t){super(),this.prefix=e,this.options=t}provide(e,t,i){const n=new U;e.canAcceptInBackground=!!this.options?.canAcceptInBackground,e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;let s;const r=n.add(new _t),a=async()=>{s?.dispose(!0),e.busy=!1;const c=r.value=new U;s=c.add(new ei(t));const d=s.token;let h=e.value.substring(this.prefix.length);this.options?.shouldSkipTrimPickFilter||(h=h.trim());const u=this._getPicks(h,c,d,i),g=(p,_)=>{let b,v;if(VP(p)?(b=p.items,v=p.active):b=p,b.length===0){if(_)return!1;(h.length>0||e.hideInput)&&this.options?.noResultsPick&&(Jp(this.options.noResultsPick)?b=[this.options.noResultsPick(h)]:b=[this.options.noResultsPick])}return e.items=b,v&&(e.activeItems=[v]),!0},f=async p=>{let _=!1,b=!1;await Promise.all([(async()=>{typeof p.mergeDelay=="number"&&(await _c(p.mergeDelay),d.isCancellationRequested)||b||(_=g(p.picks,!0))})(),(async()=>{e.busy=!0;try{const v=await p.additionalPicks;if(d.isCancellationRequested)return;let w,C;VP(p.picks)?(w=p.picks.items,C=p.picks.active):w=p.picks;let S,L;if(VP(v)?(S=v.items,L=v.active):S=v,S.length>0||!_){let x;if(!C&&!L){const k=e.activeItems[0];k&&w.indexOf(k)!==-1&&(x=k)}g({items:[...w,...S],active:C||L||x})}}finally{d.isCancellationRequested||(e.busy=!1),b=!0}})()])};if(u!==null)if(yG(u))await f(u);else if(!(u instanceof Promise))g(u);else{e.busy=!0;try{const p=await u;if(d.isCancellationRequested)return;yG(p)?await f(p):g(p)}finally{d.isCancellationRequested||(e.busy=!1)}}};n.add(e.onDidChangeValue(()=>a())),a(),n.add(e.onDidAccept(c=>{if(i?.handleAccept){c.inBackground||e.hide(),i.handleAccept?.(e.activeItems[0],c.inBackground);return}const[d]=e.selectedItems;typeof d?.accept=="function"&&(c.inBackground||e.hide(),d.accept(e.keyMods,c))}));const l=async(c,d)=>{if(typeof d.trigger!="function")return;const h=d.buttons?.indexOf(c)??-1;if(h>=0){const u=d.trigger(h,e.keyMods),g=typeof u=="number"?u:await u;if(t.isCancellationRequested)return;switch(g){case ub.NO_ACTION:break;case ub.CLOSE_PICKER:e.hide();break;case ub.REFRESH_PICKER:a();break;case ub.REMOVE_ITEM:{const f=e.items.indexOf(d);if(f!==-1){const p=e.items.slice(),_=p.splice(f,1),b=e.activeItems.filter(w=>w!==_[0]),v=e.keepScrollPosition;e.keepScrollPosition=!0,e.items=p,b&&(e.activeItems=b),e.keepScrollPosition=v}break}}}};return n.add(e.onDidTriggerItemButton(({button:c,item:d})=>l(c,d))),n.add(e.onDidTriggerSeparatorButton(({button:c,separator:d})=>l(c,d))),n}}new Ta(1e4);const IWe=new Ta(1e4);function EWe(o){return TWe(o,"NFD",IWe)}const NWe=/[^\u0000-\u0080]/;function TWe(o,e,t){if(!o)return o;const i=t.get(o);if(i)return i;let n;return NWe.test(o)?n=o.normalize(e):n=o,t.set(o,n),n}const RWe=(function(){const o=/[\u0300-\u036f]/g;return function(e){return EWe(e).replace(o,"")}})();var use=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Zh=function(o,e){return function(t,i){e(t,i,o)}},jg,Yi,oc;let tW=(oc=class extends kWe{constructor(e,t,i,n,s,r){super(jg.PREFIX,e),this.keybindingService=i,this.commandService=n,this.telemetryService=s,this.dialogService=r,this.commandsHistory=this._register(t.createInstance(iW)),this.options=e}async _getPicks(e,t,i,n){const s=await this.getCommandPicks(i);if(i.isCancellationRequested)return[];const r=em(()=>{const f=new R1;f.updateDocuments(s.map(_=>({key:_.commandId,textChunks:[this.getTfIdfChunk(_)]})));const p=f.calculateScores(e,i);return DWe(p).filter(_=>_.score>jg.TFIDF_THRESHOLD).slice(0,jg.TFIDF_MAX_RESULTS)}),a=this.normalizeForFiltering(e),l=[];for(const f of s){f.labelNoAccents??=this.normalizeForFiltering(f.label);const p=jg.WORD_FILTER(a,f.labelNoAccents)??void 0;let _;if(f.commandAlias&&(f.aliasNoAccents??=this.normalizeForFiltering(f.commandAlias),_=jg.WORD_FILTER(a,f.aliasNoAccents)??void 0),p||_)f.highlights={label:p,detail:this.options.showAlias?_:void 0},l.push(f);else if(e===f.commandId)l.push(f);else if(e.length>=3){const b=r();if(i.isCancellationRequested)return[];const v=b.find(w=>w.key===f.commandId);v&&(f.tfIdfScore=v.score,l.push(f))}}const c=new Map;for(const f of l){const p=c.get(f.label);p?(f.description=f.commandId,p.description=p.commandId):c.set(f.label,f)}l.sort((f,p)=>{if(f.tfIdfScore&&p.tfIdfScore)return f.tfIdfScore===p.tfIdfScore?f.label.localeCompare(p.label):p.tfIdfScore-f.tfIdfScore;if(f.tfIdfScore)return 1;if(p.tfIdfScore)return-1;const _=this.commandsHistory.peek(f.commandId),b=this.commandsHistory.peek(p.commandId);if(_&&b)return _>b?-1:1;if(_)return-1;if(b)return 1;if(this.options.suggestedCommandIds){const C=this.options.suggestedCommandIds.has(f.commandId),S=this.options.suggestedCommandIds.has(p.commandId);if(C&&S)return 0;if(C)return-1;if(S)return 1}const v=f.commandCategory===M9.Developer.value,w=p.commandCategory===M9.Developer.value;return v&&!w?1:!v&&w?-1:f.label.localeCompare(p.label)});const d=[];let h=!1,u=!0,g=!!this.options.suggestedCommandIds;for(let f=0;f<l.length;f++){const p=l[f];f===0&&this.commandsHistory.peek(p.commandId)&&(d.push({type:"separator",label:m(1740,"recently used")}),h=!0),u&&p.tfIdfScore!==void 0&&(d.push({type:"separator",label:m(1741,"similar commands")}),u=!1),g&&p.tfIdfScore===void 0&&!this.commandsHistory.peek(p.commandId)&&this.options.suggestedCommandIds?.has(p.commandId)&&(d.push({type:"separator",label:m(1742,"commonly used")}),h=!0,g=!1),h&&p.tfIdfScore===void 0&&!this.commandsHistory.peek(p.commandId)&&!this.options.suggestedCommandIds?.has(p.commandId)&&(d.push({type:"separator",label:m(1743,"other commands")}),h=!1),d.push(this.toCommandPick(p,n))}return this.hasAdditionalCommandPicks(e,i)?{picks:d,additionalPicks:(async()=>{const f=await this.getAdditionalCommandPicks(s,l,e,i);if(i.isCancellationRequested)return[];const p=f.map(_=>this.toCommandPick(_,n));return u&&p[0]?.type!=="separator"&&p.unshift({type:"separator",label:m(1744,"similar commands")}),p})()}:d}toCommandPick(e,t){if(e.type==="separator")return e;const i=this.keybindingService.lookupKeybinding(e.commandId),n=i?m(1745,"{0}, {1}",e.label,i.getAriaLabel()):e.label;return{...e,ariaLabel:n,detail:this.options.showAlias&&e.commandAlias!==e.label?e.commandAlias:void 0,keybinding:i,accept:async()=>{this.commandsHistory.push(e.commandId),this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.commandId,from:t?.from??"quick open"});try{e.args?.length?await this.commandService.executeCommand(e.commandId,...e.args):await this.commandService.executeCommand(e.commandId)}catch(s){Cr(s)||this.dialogService.error(m(1746,"Command '{0}' resulted in an error",e.label),LI(s))}}}}getTfIdfChunk({label:e,commandAlias:t,commandDescription:i}){let n=e;return t&&t!==e&&(n+=` - ${t}`),i&&i.value!==e&&(n+=` - ${i.value===i.original?i.value:`${i.value} (${i.original})`}`),n}normalizeForFiltering(e){const t=RWe(e);return t.length!==e.length?(this.telemetryService.publicLog2("QuickAccess:FilterLengthMismatch",{originalLength:e.length,normalizedLength:t.length}),e):t}},jg=oc,oc.PREFIX=">",oc.TFIDF_THRESHOLD=.5,oc.TFIDF_MAX_RESULTS=5,oc.WORD_FILTER=o8(jS,VSe,nJ),oc);tW=jg=use([Zh(1,me),Zh(2,ht),Zh(3,$t),Zh(4,us),Zh(5,py)],tW);var el;let iW=(el=class extends F{constructor(e,t,i){super(),this.storageService=e,this.configurationService=t,this.logService=i,this.configuredCommandsHistoryLength=0,this.updateConfiguration(),this.load(),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(e=>this.updateConfiguration(e))),this._register(this.storageService.onWillSaveState(e=>{e.reason===Cu.SHUTDOWN&&this.saveState()}))}updateConfiguration(e){e&&!e.affectsConfiguration("workbench.commandPalette.history")||(this.configuredCommandsHistoryLength=Yi.getConfiguredCommandHistoryLength(this.configurationService),Yi.cache&&Yi.cache.limit!==this.configuredCommandsHistoryLength&&(Yi.cache.limit=this.configuredCommandsHistoryLength,Yi.hasChanges=!0))}load(){const e=this.storageService.get(Yi.PREF_KEY_CACHE,0);let t;if(e)try{t=JSON.parse(e)}catch(n){this.logService.error(`[CommandsHistory] invalid data: ${n}`)}const i=Yi.cache=new Ta(this.configuredCommandsHistoryLength,1);if(t){let n;t.usesLRU?n=t.entries:n=t.entries.sort((s,r)=>s.value-r.value),n.forEach(s=>i.set(s.key,s.value))}Yi.counter=this.storageService.getNumber(Yi.PREF_KEY_COUNTER,0,Yi.counter)}push(e){Yi.cache&&(Yi.cache.set(e,Yi.counter++),Yi.hasChanges=!0)}peek(e){return Yi.cache?.peek(e)}saveState(){if(!Yi.cache||!Yi.hasChanges)return;const e={usesLRU:!0,entries:[]};Yi.cache.forEach((t,i)=>e.entries.push({key:i,value:t})),this.storageService.store(Yi.PREF_KEY_CACHE,JSON.stringify(e),0,0),this.storageService.store(Yi.PREF_KEY_COUNTER,Yi.counter,0,0),Yi.hasChanges=!1}static getConfiguredCommandHistoryLength(e){const i=e.getValue().workbench?.commandPalette?.history;return typeof i=="number"?i:Yi.DEFAULT_COMMANDS_HISTORY_LENGTH}},Yi=el,el.DEFAULT_COMMANDS_HISTORY_LENGTH=50,el.PREF_KEY_CACHE="commandPalette.mru.cache",el.PREF_KEY_COUNTER="commandPalette.mru.counter",el.counter=1,el.hasChanges=!1,el);iW=Yi=use([Zh(0,Es),Zh(1,We),Zh(2,Ut)],iW);class MWe extends tW{constructor(e,t,i,n,s,r){super(e,t,i,n,s,r)}getCodeEditorCommandPicks(){const e=this.activeTextEditorControl;if(!e)return[];const t=[];for(const i of e.getSupportedActions()){let n;i.metadata?.description&&(Exe(i.metadata.description)?n=i.metadata.description:n={original:i.metadata.description,value:i.metadata.description}),t.push({commandId:i.id,commandAlias:i.alias,commandDescription:n,label:h8(i.label)||i.id})}return t}}var PWe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},M_=function(o,e){return function(t,i){e(t,i,o)}};let j0=class extends MWe{get activeTextEditorControl(){return this.codeEditorService.getFocusedCodeEditor()??void 0}constructor(e,t,i,n,s,r){super({showAlias:!1},e,i,n,s,r),this.codeEditorService=t}async getCommandPicks(){return this.getCodeEditorCommandPicks()}hasAdditionalCommandPicks(){return!1}async getAdditionalCommandPicks(){return[]}};j0=PWe([M_(0,me),M_(1,lt),M_(2,ht),M_(3,$t),M_(4,us),M_(5,py)],j0);const vT=class vT extends de{constructor(){super({id:vT.ID,label:Wk.quickCommandActionLabel,alias:"Command Palette",precondition:void 0,kbOpts:{kbExpr:T.focus,primary:59,weight:100},contextMenuOpts:{group:"z_commands",order:1}})}run(e){e.get(ds).quickAccess.show(j0.PREFIX)}};vT.ID="editor.action.quickCommand";let RE=vT;oe(RE);gi.as(Km.Quickaccess).registerQuickAccessProvider({ctor:j0,prefix:j0.PREFIX,helpEntries:[{description:Wk.quickCommandHelp,commandId:RE.ID}]});var AWe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},P_=function(o,e){return function(t,i){e(t,i,o)}};let nW=class extends Nm{constructor(e,t,i,n,s,r,a){super(!0,e,t,i,n,s,r,a)}};nW=AWe([P_(1,Te),P_(2,lt),P_(3,Li),P_(4,me),P_(5,Es),P_(6,We)],nW);ot(Nm.ID,nW,4);class OWe extends de{constructor(){super({id:"editor.action.toggleHighContrast",label:xF.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0}),this._originalThemeName=null}run(e,t){const i=e.get(yr),n=i.getColorTheme();ll(n.type)?(i.setTheme(this._originalThemeName||(nh(n.type)?Xb:wd)),this._originalThemeName=null):(i.setTheme(nh(n.type)?Yf:Xf),this._originalThemeName=n.themeName)}}oe(OWe);let o6=class{constructor(e,t,i){this._onDidChange=new ig,this._languageId=e,this.setOptions(t),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this.options}get options(){return this._options}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setDiagnosticsOptions(e){this.setOptions(e)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}};const r6={validate:!0,lint:{compatibleVendorPrefixes:"ignore",vendorPrefix:"warning",duplicateProperties:"warning",emptyRules:"warning",importStatement:"ignore",boxModel:"ignore",universalSelector:"ignore",zeroUnits:"ignore",fontFaceProperties:"warning",hexColorLength:"error",argumentsInColorFunction:"error",unknownProperties:"warning",ieHack:"ignore",unknownVendorSpecificProperties:"ignore",propertyIgnoredDueToDisplay:"warning",important:"ignore",float:"ignore",idSelector:"ignore"},data:{useDefaultDataProvider:!0},format:{newlineBetweenSelectors:!0,newlineBetweenRules:!0,spaceAroundSelectorSeparator:!1,braceStyle:"collapse",maxPreserveNewLines:void 0,preserveNewLines:!0}},a6={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0,documentFormattingEdits:!0,documentRangeFormattingEdits:!0},gse=new o6("css",r6,a6),fse=new o6("scss",r6,a6),pse=new o6("less",r6,a6);function l6(){return Se(()=>import("./cssMode-Coi5O5zy.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]))}he.onLanguage("less",()=>{l6().then(o=>o.setupMode(pse))});he.onLanguage("scss",()=>{l6().then(o=>o.setupMode(fse))});he.onLanguage("css",()=>{l6().then(o=>o.setupMode(gse))});const mse=Object.freeze(Object.defineProperty({__proto__:null,cssDefaults:gse,lessDefaults:pse,scssDefaults:fse},Symbol.toStringTag,{value:"Module"}));let FWe=class{constructor(e,t,i){this._onDidChange=new ig,this._languageId=e,this.setOptions(t),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get options(){return this._options}get modeConfiguration(){return this._modeConfiguration}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}};const WWe={tabSize:4,insertSpaces:!1,wrapLineLength:120,unformatted:'default": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, select, small, span, strong, sub, sup, textarea, tt, var',contentUnformatted:"pre",indentInnerHtml:!1,preserveNewLines:!0,maxPreserveNewLines:void 0,indentHandlebars:!1,endWithNewline:!1,extraLiners:"head, body, /html",wrapAttributes:"auto"},oM={format:WWe,suggest:{},data:{useDefaultDataProvider:!0}};function rM(o){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:o===M1,documentFormattingEdits:o===M1,documentRangeFormattingEdits:o===M1}}const M1="html",LG="handlebars",xG="razor",_se=aM(M1,oM,rM(M1)),BWe=_se.defaults,bse=aM(LG,oM,rM(LG)),HWe=bse.defaults,vse=aM(xG,oM,rM(xG)),VWe=vse.defaults;function zWe(){return Se(()=>import("./htmlMode-C2GytKxI.js"),__vite__mapDeps([8,1,2,3,4,5,6,7]))}function aM(o,e=oM,t=rM(o)){const i=new FWe(o,e,t);let n;const s=he.onLanguage(o,async()=>{n=(await zWe()).setupMode(i)});return{defaults:i,dispose(){s.dispose(),n?.dispose(),n=void 0}}}const Cse=Object.freeze(Object.defineProperty({__proto__:null,handlebarDefaults:HWe,handlebarLanguageService:bse,htmlDefaults:BWe,htmlLanguageService:_se,razorDefaults:VWe,razorLanguageService:vse,registerHTMLLanguageService:aM},Symbol.toStringTag,{value:"Module"}));let UWe=class{constructor(e,t,i){this._onDidChange=new ig,this._languageId=e,this.setDiagnosticsOptions(t),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}};const $We={validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},jWe={documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},wse=new UWe("json",$We,jWe),qWe=()=>Sse().then(o=>o.getWorker());function Sse(){return Se(()=>import("./jsonMode-Wb-dBUwH.js"),__vite__mapDeps([9,1,2,3,4,5,6,7]))}he.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]});he.onLanguage("json",()=>{Sse().then(o=>o.setupMode(wse))});const yse=Object.freeze(Object.defineProperty({__proto__:null,getWorker:qWe,jsonDefaults:wse},Symbol.toStringTag,{value:"Module"})),KWe="5.9.3";var Lse=(o=>(o[o.None=0]="None",o[o.CommonJS=1]="CommonJS",o[o.AMD=2]="AMD",o[o.UMD=3]="UMD",o[o.System=4]="System",o[o.ES2015=5]="ES2015",o[o.ESNext=99]="ESNext",o))(Lse||{}),xse=(o=>(o[o.None=0]="None",o[o.Preserve=1]="Preserve",o[o.React=2]="React",o[o.ReactNative=3]="ReactNative",o[o.ReactJSX=4]="ReactJSX",o[o.ReactJSXDev=5]="ReactJSXDev",o))(xse||{}),Dse=(o=>(o[o.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",o[o.LineFeed=1]="LineFeed",o))(Dse||{}),kse=(o=>(o[o.ES3=0]="ES3",o[o.ES5=1]="ES5",o[o.ES2015=2]="ES2015",o[o.ES2016=3]="ES2016",o[o.ES2017=4]="ES2017",o[o.ES2018=5]="ES2018",o[o.ES2019=6]="ES2019",o[o.ES2020=7]="ES2020",o[o.ESNext=99]="ESNext",o[o.JSON=100]="JSON",o[o.Latest=99]="Latest",o))(kse||{}),Ise=(o=>(o[o.Classic=1]="Classic",o[o.NodeJs=2]="NodeJs",o))(Ise||{});class Ese{constructor(e,t,i,n,s){this._onDidChange=new ig,this._onDidExtraLibsChange=new ig,this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(e),this.setDiagnosticsOptions(t),this.setWorkerOptions(i),this.setInlayHintsOptions(n),this.setModeConfiguration(s),this._onDidExtraLibsChangeTimeout=-1}get onDidChange(){return this._onDidChange.event}get onDidExtraLibsChange(){return this._onDidExtraLibsChange.event}get modeConfiguration(){return this._modeConfiguration}get workerOptions(){return this._workerOptions}get inlayHintsOptions(){return this._inlayHintsOptions}getExtraLibs(){return this._extraLibs}addExtraLib(e,t){let i;if(typeof t>"u"?i=`ts:extralib-${Math.random().toString(36).substring(2,15)}`:i=t,this._extraLibs[i]&&this._extraLibs[i].content===e)return{dispose:()=>{}};let n=1;return this._removedExtraLibs[i]&&(n=this._removedExtraLibs[i]+1),this._extraLibs[i]&&(n=this._extraLibs[i].version+1),this._extraLibs[i]={content:e,version:n},this._fireOnDidExtraLibsChangeSoon(),{dispose:()=>{let s=this._extraLibs[i];s&&s.version===n&&(delete this._extraLibs[i],this._removedExtraLibs[i]=n,this._fireOnDidExtraLibsChangeSoon())}}}setExtraLibs(e){for(const t in this._extraLibs)this._removedExtraLibs[t]=this._extraLibs[t].version;if(this._extraLibs=Object.create(null),e&&e.length>0)for(const t of e){const i=t.filePath||`ts:extralib-${Math.random().toString(36).substring(2,15)}`,n=t.content;let s=1;this._removedExtraLibs[i]&&(s=this._removedExtraLibs[i]+1),this._extraLibs[i]={content:n,version:s}}this._fireOnDidExtraLibsChangeSoon()}_fireOnDidExtraLibsChangeSoon(){this._onDidExtraLibsChangeTimeout===-1&&(this._onDidExtraLibsChangeTimeout=window.setTimeout(()=>{this._onDidExtraLibsChangeTimeout=-1,this._onDidExtraLibsChange.fire(void 0)},0))}getCompilerOptions(){return this._compilerOptions}setCompilerOptions(e){this._compilerOptions=e||Object.create(null),this._onDidChange.fire(void 0)}getDiagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setWorkerOptions(e){this._workerOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setInlayHintsOptions(e){this._inlayHintsOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setMaximumWorkerIdleTime(e){}setEagerModelSync(e){this._eagerModelSync=e}getEagerModelSync(){return this._eagerModelSync}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(void 0)}}const GWe=KWe,Nse={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,diagnostics:!0,documentRangeFormattingEdits:!0,signatureHelp:!0,onTypeFormattingEdits:!0,codeActions:!0,inlayHints:!0},Tse=new Ese({allowNonTsExtensions:!0,target:99},{noSemanticValidation:!1,noSyntaxValidation:!1,onlyVisible:!1},{},{},Nse),Rse=new Ese({allowNonTsExtensions:!0,allowJs:!0,target:99},{noSemanticValidation:!0,noSyntaxValidation:!1,onlyVisible:!1},{},{},Nse),ZWe=()=>lM().then(o=>o.getTypeScriptWorker()),YWe=()=>lM().then(o=>o.getJavaScriptWorker());function lM(){return Se(()=>import("./tsMode-C-5dlAKI.js"),__vite__mapDeps([10,2,3,4,5,6,7]))}he.onLanguage("typescript",()=>lM().then(o=>o.setupTypeScript(Tse)));he.onLanguage("javascript",()=>lM().then(o=>o.setupJavaScript(Rse)));const Mse=Object.freeze(Object.defineProperty({__proto__:null,JsxEmit:xse,ModuleKind:Lse,ModuleResolutionKind:Ise,NewLineKind:Dse,ScriptTarget:kse,getJavaScriptWorker:YWe,getTypeScriptWorker:ZWe,javascriptDefaults:Rse,typescriptDefaults:Tse,typescriptVersion:GWe},Symbol.toStringTag,{value:"Module"})),Pse={},zP={};class c6{static getOrCreate(e){return zP[e]||(zP[e]=new c6(e)),zP[e]}constructor(e){this._languageId=e,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((t,i)=>{this._lazyLoadPromiseResolve=t,this._lazyLoadPromiseReject=i})}load(){return this._loadingTriggered||(this._loadingTriggered=!0,Pse[this._languageId].loader().then(e=>this._lazyLoadPromiseResolve(e),e=>this._lazyLoadPromiseReject(e))),this._lazyLoadPromise}}function De(o){const e=o.id;Pse[e]=o,he.register(o);const t=c6.getOrCreate(e);he.registerTokensProviderFactory(e,{create:async()=>(await t.load()).language}),he.onLanguageEncountered(e,async()=>{const i=await t.load();he.setLanguageConfiguration(e,i.conf)})}De({id:"abap",extensions:[".abap"],aliases:["abap","ABAP"],loader:()=>Se(()=>import("./abap-DLDM7-KI.js"),[])});De({id:"apex",extensions:[".cls"],aliases:["Apex","apex"],mimetypes:["text/x-apex-source","text/x-apex"],loader:()=>Se(()=>import("./apex-DNDY2TF8.js"),[])});De({id:"azcli",extensions:[".azcli"],aliases:["Azure CLI","azcli"],loader:()=>Se(()=>import("./azcli-Y6nb8tq_.js"),[])});De({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],loader:()=>Se(()=>import("./bat-BwHxbl9M.js"),[])});De({id:"bicep",extensions:[".bicep"],aliases:["Bicep"],loader:()=>Se(()=>import("./bicep-CFznDFnq.js"),[])});De({id:"cameligo",extensions:[".mligo"],aliases:["Cameligo"],loader:()=>Se(()=>import("./cameligo-Bf6VGUru.js"),[])});De({id:"clojure",extensions:[".clj",".cljs",".cljc",".edn"],aliases:["clojure","Clojure"],loader:()=>Se(()=>import("./clojure-Dnu-v4kV.js"),[])});De({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],loader:()=>Se(()=>import("./coffee-Bd8akH9Z.js"),[])});De({id:"c",extensions:[".c",".h"],aliases:["C","c"],loader:()=>Se(()=>import("./cpp-BbWJElDN.js"),[])});De({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],loader:()=>Se(()=>import("./cpp-BbWJElDN.js"),[])});De({id:"csharp",extensions:[".cs",".csx",".cake"],aliases:["C#","csharp"],loader:()=>Se(()=>import("./csharp-Co3qMtFm.js"),[])});De({id:"csp",extensions:[".csp"],aliases:["CSP","csp"],loader:()=>Se(()=>import("./csp-D-4FJmMZ.js"),[])});De({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:()=>Se(()=>import("./css-DdJfP1eB.js"),[])});De({id:"cypher",extensions:[".cypher",".cyp"],aliases:["Cypher","OpenCypher"],loader:()=>Se(()=>import("./cypher-cTPe9QuQ.js"),[])});De({id:"dart",extensions:[".dart"],aliases:["Dart","dart"],mimetypes:["text/x-dart-source","text/x-dart"],loader:()=>Se(()=>import("./dart-BOtBlQCF.js"),[])});De({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],loader:()=>Se(()=>import("./dockerfile-BG73LgW2.js"),[])});De({id:"ecl",extensions:[".ecl"],aliases:["ECL","Ecl","ecl"],loader:()=>Se(()=>import("./ecl-BEgZUVRK.js"),[])});De({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:()=>Se(()=>import("./elixir-BkW5O-1t.js"),[])});De({id:"flow9",extensions:[".flow"],aliases:["Flow9","Flow","flow9","flow"],loader:()=>Se(()=>import("./flow9-BeJ5waoc.js"),[])});De({id:"fsharp",extensions:[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],loader:()=>Se(()=>import("./fsharp-PahG7c26.js"),[])});De({id:"freemarker2",extensions:[".ftl",".ftlh",".ftlx"],aliases:["FreeMarker2","Apache FreeMarker2"],loader:()=>Se(()=>import("./freemarker2-1O7dsC5n.js"),__vite__mapDeps([11,2,3,4,5,6,7])).then(o=>o.TagAutoInterpolationDollar)});De({id:"freemarker2.tag-angle.interpolation-dollar",aliases:["FreeMarker2 (Angle/Dollar)","Apache FreeMarker2 (Angle/Dollar)"],loader:()=>Se(()=>import("./freemarker2-1O7dsC5n.js"),__vite__mapDeps([11,2,3,4,5,6,7])).then(o=>o.TagAngleInterpolationDollar)});De({id:"freemarker2.tag-bracket.interpolation-dollar",aliases:["FreeMarker2 (Bracket/Dollar)","Apache FreeMarker2 (Bracket/Dollar)"],loader:()=>Se(()=>import("./freemarker2-1O7dsC5n.js"),__vite__mapDeps([11,2,3,4,5,6,7])).then(o=>o.TagBracketInterpolationDollar)});De({id:"freemarker2.tag-angle.interpolation-bracket",aliases:["FreeMarker2 (Angle/Bracket)","Apache FreeMarker2 (Angle/Bracket)"],loader:()=>Se(()=>import("./freemarker2-1O7dsC5n.js"),__vite__mapDeps([11,2,3,4,5,6,7])).then(o=>o.TagAngleInterpolationBracket)});De({id:"freemarker2.tag-bracket.interpolation-bracket",aliases:["FreeMarker2 (Bracket/Bracket)","Apache FreeMarker2 (Bracket/Bracket)"],loader:()=>Se(()=>import("./freemarker2-1O7dsC5n.js"),__vite__mapDeps([11,2,3,4,5,6,7])).then(o=>o.TagBracketInterpolationBracket)});De({id:"freemarker2.tag-auto.interpolation-dollar",aliases:["FreeMarker2 (Auto/Dollar)","Apache FreeMarker2 (Auto/Dollar)"],loader:()=>Se(()=>import("./freemarker2-1O7dsC5n.js"),__vite__mapDeps([11,2,3,4,5,6,7])).then(o=>o.TagAutoInterpolationDollar)});De({id:"freemarker2.tag-auto.interpolation-bracket",aliases:["FreeMarker2 (Auto/Bracket)","Apache FreeMarker2 (Auto/Bracket)"],loader:()=>Se(()=>import("./freemarker2-1O7dsC5n.js"),__vite__mapDeps([11,2,3,4,5,6,7])).then(o=>o.TagAutoInterpolationBracket)});De({id:"go",extensions:[".go"],aliases:["Go"],loader:()=>Se(()=>import("./go-acbASCJo.js"),[])});De({id:"graphql",extensions:[".graphql",".gql"],aliases:["GraphQL","graphql","gql"],mimetypes:["application/graphql"],loader:()=>Se(()=>import("./graphql-BxJiqAUM.js"),[])});De({id:"handlebars",extensions:[".handlebars",".hbs"],aliases:["Handlebars","handlebars","hbs"],mimetypes:["text/x-handlebars-template"],loader:()=>Se(()=>import("./handlebars-CV8AX3NZ.js"),__vite__mapDeps([12,2,3,4,5,6,7]))});De({id:"hcl",extensions:[".tf",".tfvars",".hcl"],aliases:["Terraform","tf","HCL","hcl"],loader:()=>Se(()=>import("./hcl-DtV1sZF8.js"),[])});De({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:()=>Se(()=>import("./html-Blvbrx_-.js"),__vite__mapDeps([13,2,3,4,5,6,7]))});De({id:"ini",extensions:[".ini",".properties",".gitconfig"],filenames:["config",".gitattributes",".gitconfig",".editorconfig"],aliases:["Ini","ini"],loader:()=>Se(()=>import("./ini-Kd9XrMLS.js"),[])});De({id:"java",extensions:[".java",".jav"],aliases:["Java","java"],mimetypes:["text/x-java-source","text/x-java"],loader:()=>Se(()=>import("./java-CXBNlu9o.js"),[])});De({id:"javascript",extensions:[".js",".es6",".jsx",".mjs",".cjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:()=>Se(()=>import("./javascript-Bl1Q_Nkx.js"),__vite__mapDeps([14,15,2,3,4,5,6,7]))});De({id:"julia",extensions:[".jl"],aliases:["julia","Julia"],loader:()=>Se(()=>import("./julia-cl7-CwDS.js"),[])});De({id:"kotlin",extensions:[".kt",".kts"],aliases:["Kotlin","kotlin"],mimetypes:["text/x-kotlin-source","text/x-kotlin"],loader:()=>Se(()=>import("./kotlin-s7OhZKlX.js"),[])});De({id:"less",extensions:[".less"],aliases:["Less","less"],mimetypes:["text/x-less","text/less"],loader:()=>Se(()=>import("./less-9HpZscsL.js"),[])});De({id:"lexon",extensions:[".lex"],aliases:["Lexon"],loader:()=>Se(()=>import("./lexon-OrD6JF1K.js"),[])});De({id:"lua",extensions:[".lua"],aliases:["Lua","lua"],loader:()=>Se(()=>import("./lua-Cyyb5UIc.js"),[])});De({id:"liquid",extensions:[".liquid",".html.liquid"],aliases:["Liquid","liquid"],mimetypes:["application/liquid"],loader:()=>Se(()=>import("./liquid-CRXJh1mG.js"),__vite__mapDeps([16,2,3,4,5,6,7]))});De({id:"m3",extensions:[".m3",".i3",".mg",".ig"],aliases:["Modula-3","Modula3","modula3","m3"],loader:()=>Se(()=>import("./m3-B8OfTtLu.js"),[])});De({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],loader:()=>Se(()=>import("./markdown-BFxVWTOG.js"),[])});De({id:"mdx",extensions:[".mdx"],aliases:["MDX","mdx"],loader:()=>Se(()=>import("./mdx-C5mACBRu.js"),__vite__mapDeps([17,2,3,4,5,6,7]))});De({id:"mips",extensions:[".s"],aliases:["MIPS","MIPS-V"],mimetypes:["text/x-mips","text/mips","text/plaintext"],loader:()=>Se(()=>import("./mips-CiqrrVzr.js"),[])});De({id:"msdax",extensions:[".dax",".msdax"],aliases:["DAX","MSDAX"],loader:()=>Se(()=>import("./msdax-DmeGPVcC.js"),[])});De({id:"mysql",extensions:[],aliases:["MySQL","mysql"],loader:()=>Se(()=>import("./mysql-C_tMU-Nz.js"),[])});De({id:"objective-c",extensions:[".m"],aliases:["Objective-C"],loader:()=>Se(()=>import("./objective-c-BDtDVThU.js"),[])});De({id:"pascal",extensions:[".pas",".p",".pp"],aliases:["Pascal","pas"],mimetypes:["text/x-pascal-source","text/x-pascal"],loader:()=>Se(()=>import("./pascal-vHIfCaH5.js"),[])});De({id:"pascaligo",extensions:[".ligo"],aliases:["Pascaligo","ligo"],loader:()=>Se(()=>import("./pascaligo-DtZ0uQbO.js"),[])});De({id:"perl",extensions:[".pl",".pm"],aliases:["Perl","pl"],loader:()=>Se(()=>import("./perl-Ub6l9XKa.js"),[])});De({id:"pgsql",extensions:[],aliases:["PostgreSQL","postgres","pg","postgre"],loader:()=>Se(()=>import("./pgsql-BlNEE0v7.js"),[])});De({id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],mimetypes:["application/x-php"],loader:()=>Se(()=>import("./php-BBUBE1dy.js"),[])});De({id:"pla",extensions:[".pla"],loader:()=>Se(()=>import("./pla-DSh2-awV.js"),[])});De({id:"postiats",extensions:[".dats",".sats",".hats"],aliases:["ATS","ATS/Postiats"],loader:()=>Se(()=>import("./postiats-CocnycG-.js"),[])});De({id:"powerquery",extensions:[".pq",".pqm"],aliases:["PQ","M","Power Query","Power Query M"],loader:()=>Se(()=>import("./powerquery-tScXyioY.js"),[])});De({id:"powershell",extensions:[".ps1",".psm1",".psd1"],aliases:["PowerShell","powershell","ps","ps1"],loader:()=>Se(()=>import("./powershell-COWaemsV.js"),[])});De({id:"proto",extensions:[".proto"],aliases:["protobuf","Protocol Buffers"],loader:()=>Se(()=>import("./protobuf-Brw8urJB.js"),[])});De({id:"pug",extensions:[".jade",".pug"],aliases:["Pug","Jade","jade"],loader:()=>Se(()=>import("./pug-8SOpv6rk.js"),[])});De({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",loader:()=>Se(()=>import("./python-WC2gRa53.js"),__vite__mapDeps([18,2,3,4,5,6,7]))});De({id:"qsharp",extensions:[".qs"],aliases:["Q#","qsharp"],loader:()=>Se(()=>import("./qsharp-Bw9ernYp.js"),[])});De({id:"r",extensions:[".r",".rhistory",".rmd",".rprofile",".rt"],aliases:["R","r"],loader:()=>Se(()=>import("./r-j7ic8hl3.js"),[])});De({id:"razor",extensions:[".cshtml"],aliases:["Razor","razor"],mimetypes:["text/x-cshtml"],loader:()=>Se(()=>import("./razor-DtDoIoVr.js"),__vite__mapDeps([19,2,3,4,5,6,7]))});De({id:"redis",extensions:[".redis"],aliases:["redis"],loader:()=>Se(()=>import("./redis-Bu5POkcn.js"),[])});De({id:"redshift",extensions:[],aliases:["Redshift","redshift"],loader:()=>Se(()=>import("./redshift-Bs9aos_-.js"),[])});De({id:"restructuredtext",extensions:[".rst"],aliases:["reStructuredText","restructuredtext"],loader:()=>Se(()=>import("./restructuredtext-CqXO7rUv.js"),[])});De({id:"ruby",extensions:[".rb",".rbx",".rjs",".gemspec",".pp"],filenames:["rakefile","Gemfile"],aliases:["Ruby","rb"],loader:()=>Se(()=>import("./ruby-zBfavPgS.js"),[])});De({id:"rust",extensions:[".rs",".rlib"],aliases:["Rust","rust"],loader:()=>Se(()=>import("./rust-BzKRNQWT.js"),[])});De({id:"sb",extensions:[".sb"],aliases:["Small Basic","sb"],loader:()=>Se(()=>import("./sb-BBc9UKZt.js"),[])});De({id:"scala",extensions:[".scala",".sc",".sbt"],aliases:["Scala","scala","SBT","Sbt","sbt","Dotty","dotty"],mimetypes:["text/x-scala-source","text/x-scala","text/x-sbt","text/x-dotty"],loader:()=>Se(()=>import("./scala-D9hQfWCl.js"),[])});De({id:"scheme",extensions:[".scm",".ss",".sch",".rkt"],aliases:["scheme","Scheme"],loader:()=>Se(()=>import("./scheme-BPhDTwHR.js"),[])});De({id:"scss",extensions:[".scss"],aliases:["Sass","sass","scss"],mimetypes:["text/x-scss","text/scss"],loader:()=>Se(()=>import("./scss-CBJaRo0y.js"),[])});De({id:"shell",extensions:[".sh",".bash"],aliases:["Shell","sh"],loader:()=>Se(()=>import("./shell-DiJ1NA_G.js"),[])});De({id:"sol",extensions:[".sol"],aliases:["sol","solidity","Solidity"],loader:()=>Se(()=>import("./solidity-Db0IVjzk.js"),[])});De({id:"aes",extensions:[".aes"],aliases:["aes","sophia","Sophia"],loader:()=>Se(()=>import("./sophia-CnS9iZB_.js"),[])});De({id:"sparql",extensions:[".rq"],aliases:["sparql","SPARQL"],loader:()=>Se(()=>import("./sparql-CJmd_6j2.js"),[])});De({id:"sql",extensions:[".sql"],aliases:["SQL"],loader:()=>Se(()=>import("./sql-ClhHkBeG.js"),[])});De({id:"st",extensions:[".st",".iecst",".iecplc",".lc3lib",".TcPOU",".TcDUT",".TcGVL",".TcIO"],aliases:["StructuredText","scl","stl"],loader:()=>Se(()=>import("./st-CHwy0fLd.js"),[])});De({id:"swift",aliases:["Swift","swift"],extensions:[".swift"],mimetypes:["text/swift"],loader:()=>Se(()=>import("./swift-CnmFD0ga.js"),[])});De({id:"systemverilog",extensions:[".sv",".svh"],aliases:["SV","sv","SystemVerilog","systemverilog"],loader:()=>Se(()=>import("./systemverilog-Bs9z6M-B.js"),[])});De({id:"verilog",extensions:[".v",".vh"],aliases:["V","v","Verilog","verilog"],loader:()=>Se(()=>import("./systemverilog-Bs9z6M-B.js"),[])});De({id:"tcl",extensions:[".tcl"],aliases:["tcl","Tcl","tcltk","TclTk","tcl/tk","Tcl/Tk"],loader:()=>Se(()=>import("./tcl-Dm6ycUr_.js"),[])});De({id:"twig",extensions:[".twig"],aliases:["Twig","twig"],mimetypes:["text/x-twig"],loader:()=>Se(()=>import("./twig-Csy3S7wG.js"),[])});De({id:"typescript",extensions:[".ts",".tsx",".cts",".mts"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:()=>Se(()=>import("./typescript-DtZ3r-8F.js"),__vite__mapDeps([15,2,3,4,5,6,7]))});De({id:"typespec",extensions:[".tsp"],aliases:["TypeSpec"],loader:()=>Se(()=>import("./typespec-Btyra-wh.js"),[])});De({id:"vb",extensions:[".vb"],aliases:["Visual Basic","vb"],loader:()=>Se(()=>import("./vb-Db0cS2oM.js"),[])});De({id:"wgsl",extensions:[".wgsl"],aliases:["WebGPU Shading Language","WGSL","wgsl"],loader:()=>Se(()=>import("./wgsl-BTesnYfV.js"),[])});De({id:"xml",extensions:[".xml",".xsd",".dtd",".ascx",".csproj",".config",".props",".targets",".wxi",".wxl",".wxs",".xaml",".svg",".svgz",".opf",".xslt",".xsl"],firstLine:"(\\<\\?xml.*)|(\\<svg)|(\\<\\!doctype\\s+svg)",aliases:["XML","xml"],mimetypes:["text/xml","application/xml","application/xaml+xml","application/xml-dtd"],loader:()=>Se(()=>import("./xml-2JwqkWbu.js"),__vite__mapDeps([20,2,3,4,5,6,7]))});De({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml","text/x-yaml"],loader:()=>Se(()=>import("./yaml-B8ielN8F.js"),__vite__mapDeps([21,2,3,4,5,6,7]))});var XWe=Object.defineProperty,QWe=(o,e,t)=>e in o?XWe(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t,we=(o,e,t)=>QWe(o,typeof e!="symbol"?e+"":e,t),bx,DG,vx,UP,Cx;function JWe(o){return o.method!==void 0}var kG;(function(o){function e(t){return t}o.create=e})(kG||(kG={}));var va;(function(o){o.parseError=-32700,o.invalidRequest=-32600,o.methodNotFound=-32601,o.invalidParams=-32602,o.internalError=-32603;function e(s){return-32099<=s&&s<=-32e3}o.isServerError=e;function t(s){if(!e(s))throw new Error("Invalid range for a server error.");return s}o.serverError=t,o.unexpectedServerError=-32e3;function i(s){return!0}o.isApplicationError=i;function n(s){return s}o.applicationError=n,o.genericApplicationError=-320100})(va||(va={}));var d6=class{constructor(){we(this,"listeners",new Set),we(this,"event",o=>(this.listeners.add(o),{dispose:()=>{this.listeners.delete(o)}}))}fire(o){this.listeners.forEach(e=>e(o))}},eBe=class{constructor(o){we(this,"_value"),we(this,"eventEmitter"),this._value=o,this.eventEmitter=new d6}get value(){return this._value}set value(o){this._value!==o&&(this._value=o,this.eventEmitter.fire(o))}get onChange(){return this.eventEmitter.event}};function tBe(o,e){const t=setTimeout(e,o);return{dispose:()=>clearTimeout(t)}}function $P(o,e,t){return o instanceof Set?(o.add(e),{dispose:()=>o.delete(e)}):(o.set(e,t),{dispose:()=>o.delete(e)})}var iBe=class{constructor(){we(this,"_state","none"),we(this,"promise"),we(this,"resolve",()=>{}),we(this,"reject",()=>{}),this.promise=new Promise((o,e)=>{this.resolve=o,this.reject=e})}get state(){return this._state}},Ase=(bx=class{constructor(){we(this,"_unprocessedMessages",[]),we(this,"_messageListener"),we(this,"id",bx.id++),we(this,"_state",new eBe({state:"open"})),we(this,"state",this._state)}setListener(o){if(this._messageListener=o,!!o)for(;this._unprocessedMessages.length>0&&this._messageListener!==void 0;){const e=this._unprocessedMessages.shift();this._messageListener(e)}}send(o){return this._sendImpl(o)}_dispatchReceivedMessage(o){this._unprocessedMessages.length===0&&this._messageListener?this._messageListener(o):this._unprocessedMessages.push(o)}_onConnectionClosed(){this._state.value={state:"closed",error:void 0}}log(o){return new nBe(this,o??new sBe)}},we(bx,"id",0),bx),nBe=class{constructor(o,e){we(this,"baseStream"),we(this,"logger"),this.baseStream=o,this.logger=e}get state(){return this.baseStream.state}setListener(o){if(o===void 0){this.baseStream.setListener(void 0);return}this.baseStream.setListener(e=>{this.logger.log(this.baseStream,"incoming",e),o(e)})}send(o){return this.logger.log(this.baseStream,"outgoing",o),this.baseStream.send(o)}toString(){return`StreamLogger/${this.baseStream.toString()}`}},sBe=class{log(o,e,t){console.log(`${e==="incoming"?"<-":"->"} [${o.toString()}] ${JSON.stringify(t)}`)}},oBe=class Ose{constructor(e){we(this,"connect"),this.connect=e}mapContext(e){return new Ose(t=>this.connect(t?rBe(t,e):void 0))}};function rBe(o,e){return{handleNotification:(t,i)=>o.handleNotification(t,e(i)),handleRequest:(t,i,n)=>o.handleRequest(t,i,e(n))}}var aBe=class Fse{constructor(e,t,i){we(this,"_stream"),we(this,"_listener"),we(this,"_logger"),we(this,"_unprocessedResponses",new Map),we(this,"_lastUsedRequestId",0),this._stream=e,this._listener=t,this._logger=i,this._stream.setListener(n=>{JWe(n)?n.id===void 0?this._processNotification(n):this._processRequest(n):this._processResponse(n)})}static createChannel(e,t){let i=!1;return new oBe(n=>{if(i)throw new Error(`A channel to the stream ${e} was already constructed!`);return i=!0,new Fse(e,n,t)})}get state(){return this._stream.state}async _processNotification(e){if(e.id!==void 0)throw new Error;if(!this._listener){this._logger&&this._logger.debug({text:"Notification ignored",message:e});return}try{await this._listener.handleNotification({method:e.method,params:e.params||null})}catch(t){this._logger&&this._logger.warn({text:`Exception was thrown while handling notification: ${t}`,exception:t,message:e})}}async _processRequest(e){if(e.id===void 0)throw new Error;let t;if(this._listener)try{t=await this._listener.handleRequest({method:e.method,params:e.params||null},e.id)}catch(n){this._logger&&this._logger.warn({text:`Exception was thrown while handling request: ${n}`,message:e,exception:n}),t={error:{code:va.internalError,message:"An unexpected exception was thrown.",data:void 0}}}else this._logger&&this._logger.debug({text:"Received request even though not listening for requests",message:e}),t={error:{code:va.methodNotFound,message:"This endpoint does not listen for requests or notifications.",data:void 0}};let i;"result"in t?i={jsonrpc:"2.0",id:e.id,result:t.result}:i={jsonrpc:"2.0",id:e.id,error:t.error},await this._stream.send(i)}_processResponse(e){const t=""+e.id,i=this._unprocessedResponses.get(t);if(!i){this._logger&&this._logger.debug({text:"Got an unexpected response message",message:e});return}this._unprocessedResponses.delete(t),i(e)}_newRequestId(){return this._lastUsedRequestId++}sendRequest(e,t,i){const n={jsonrpc:"2.0",id:this._newRequestId(),method:e.method,params:e.params||void 0};return i&&i(n.id),new Promise((s,r)=>{const a=""+n.id;this._unprocessedResponses.set(a,l=>{"result"in l?s({result:l.result}):(l.error||r(new Error("Response had neither 'result' nor 'error' field set.")),s({error:l.error}))}),this._stream.send(n).then(void 0,l=>{this._unprocessedResponses.delete(a),r(l)})})}sendNotification(e,t){const i={jsonrpc:"2.0",id:void 0,method:e.method,params:e.params||void 0};return this._stream.send(i)}toString(){return"StreamChannel/"+this._stream.toString()}},sv;(function(o){function e(){return{deserializeFromJson:n=>({hasErrors:!1,value:n}),serializeToJson:n=>n}}o.sAny=e;function t(){return{deserializeFromJson:n=>({hasErrors:!1,value:{}}),serializeToJson:n=>({})}}o.sEmptyObject=t;function i(){return{deserializeFromJson:n=>({hasErrors:!1,value:void 0}),serializeToJson:n=>null}}o.sVoidFromNull=i})(sv||(sv={}));const Wse=Symbol("OptionalMethodNotFound");var Bse=class{contextualize(o){return new lBe(this,o)}},lBe=class extends Bse{constructor(o,e){super(),we(this,"underylingTypedChannel"),we(this,"converters"),this.underylingTypedChannel=o,this.converters=e}async request(o,e,t){const i=await this.converters.getSendContext(t);return this.underylingTypedChannel.request(o,e,i)}async notify(o,e,t){const i=await this.converters.getSendContext(t);return this.underylingTypedChannel.notify(o,e,i)}registerNotificationHandler(o,e){return this.underylingTypedChannel.registerNotificationHandler(o,async(t,i)=>await e(t,await this.converters.getNewContext(i)))}registerRequestHandler(o,e){return this.underylingTypedChannel.registerRequestHandler(o,async(t,i,n)=>await e(t,i,await this.converters.getNewContext(n)))}},sW=class Hse extends Bse{constructor(e,t={}){super(),we(this,"channelCtor"),we(this,"_requestSender"),we(this,"_handler",new Map),we(this,"_unknownNotificationHandler",new Set),we(this,"_timeout"),we(this,"sendExceptionDetails",!1),we(this,"_logger"),we(this,"listeningDeferred",new iBe),we(this,"onListening",this.listeningDeferred.promise),we(this,"_requestDidErrorEventEmitter",new d6),we(this,"onRequestDidError",this._requestDidErrorEventEmitter.event),this.channelCtor=e,this._logger=t.logger,this.sendExceptionDetails=!!t.sendExceptionDetails,this._timeout=tBe(1e3,()=>{this._requestSender||console.warn(`"${this.startListen.name}" has not been called within 1 second after construction of this channel. Did you forget to call it?`,this)})}static fromTransport(e,t={}){return new Hse(aBe.createChannel(e,t.logger),t)}startListen(){if(this._requestSender)throw new Error(`"${this.startListen.name}" can be called only once, but it already has been called.`);this._timeout&&(this._timeout.dispose(),this._timeout=void 0),this._requestSender=this.channelCtor.connect({handleRequest:(e,t,i)=>this.handleRequest(e,t,i),handleNotification:(e,t)=>this.handleNotification(e,t)}),this.listeningDeferred.resolve()}checkChannel(e){if(!e)throw new Error(`"${this.startListen.name}" must be called before any messages can be sent or received.`);return!0}async handleRequest(e,t,i){const n=this._handler.get(e.method);if(!n)return this._logger&&this._logger.debug({text:`No request handler for "${e.method}".`,data:{requestObject:e}}),{error:{code:va.methodNotFound,message:`No request handler for "${e.method}".`,data:{method:e.method}}};if(n.kind!="request"){const r=`"${e.method}" is registered as notification, but was sent as request.`;return this._logger&&this._logger.debug({text:r,data:{requestObject:e}}),{error:{code:va.invalidRequest,message:r,data:{method:e.method}}}}const s=n.requestType.paramsSerializer.deserializeFromJson(e.params);if(s.hasErrors){const r=`Got invalid params: ${s.errorMessage}`;return this._logger&&this._logger.debug({text:r,data:{requestObject:e,errorMessage:s.errorMessage}}),{error:{code:va.invalidParams,message:r,data:{errors:s.errorMessage}}}}else{const r=s.value;let a;try{const l=await n.handler(r,t,i);if("error"in l||"errorMessage"in l){const c=l.error?n.requestType.errorSerializer.serializeToJson(l.error):void 0;a={error:{code:l.errorCode||va.genericApplicationError,message:l.errorMessage||"An error was returned",data:c}}}else a={result:n.requestType.resultSerializer.serializeToJson(l.ok)}}catch(l){l instanceof EG?a={error:{code:l.code,message:l.message}}:(this._logger&&this._logger.warn({text:`An exception was thrown while handling a request: ${l}.`,exception:l,data:{requestObject:e}}),a={error:{code:va.unexpectedServerError,message:this.sendExceptionDetails?`An exception was thrown while handling a request: ${l}.`:"Server has thrown an unexpected exception"}})}return a}}async handleNotification(e,t){const i=this._handler.get(e.method);if(!i){for(const r of this._unknownNotificationHandler)r(e);this._unknownNotificationHandler.size===0&&this._logger&&this._logger.debug({text:`Unhandled notification "${e.method}"`,data:{requestObject:e}});return}if(i.kind!="notification"){this._logger&&this._logger.debug({text:`"${e.method}" is registered as request, but was sent as notification.`,data:{requestObject:e}});return}const n=i.notificationType.paramsSerializer.deserializeFromJson(e.params);if(n.hasErrors){this._logger&&this._logger.debug({text:`Got invalid params: ${n}`,data:{requestObject:e,errorMessage:n.errorMessage}});return}const s=n.value;for(const r of i.handlers)try{r(s,t)}catch(a){this._logger&&this._logger.warn({text:`An exception was thrown while handling a notification: ${a}.`,exception:a,data:{requestObject:e}})}}registerUnknownNotificationHandler(e){return $P(this._unknownNotificationHandler,e)}registerRequestHandler(e,t){if(this._handler.get(e.method))throw new Error(`Handler with method "${e.method}" already registered.`);return $P(this._handler,e.method,{kind:"request",requestType:e,handler:t})}registerNotificationHandler(e,t){let i=this._handler.get(e.method);if(!i)i={kind:"notification",notificationType:e,handlers:new Set},this._handler.set(e.method,i);else{if(i.kind!=="notification")throw new Error(`Method "${e.method}" was already registered as request handler.`);if(i.notificationType!==e)throw new Error(`Method "${e.method}" was registered for a different type.`)}return $P(i.handlers,t)}getRegisteredTypes(){const e=[];for(const t of this._handler.values())t.kind==="notification"?e.push(t.notificationType):t.kind==="request"&&e.push(t.requestType);return e}async request(e,t,i){if(!this.checkChannel(this._requestSender))throw new Error("Impossible");const n=e.paramsSerializer.serializeToJson(t);IG(n);const s=await this._requestSender.sendRequest({method:e.method,params:n},i);if("error"in s){if(e.isOptional&&s.error.code===va.methodNotFound)return Wse;let r;if(s.error.data!==void 0){const l=e.errorSerializer.deserializeFromJson(s.error.data);if(l.hasErrors)throw new Error(l.errorMessage);r=l.value}else r=void 0;const a=new EG(s.error.message,r,s.error.code);throw this._requestDidErrorEventEmitter.fire({error:a}),a}else{const r=e.resultSerializer.deserializeFromJson(s.result);if(r.hasErrors)throw new Error("Could not deserialize response: "+r.errorMessage+`
|
|
915
915
|
|
|
916
916
|
${JSON.stringify(s,null,2)}`);return r.value}}async notify(e,t,i){if(!this.checkChannel(this._requestSender))throw new Error;const n=e.paramsSerializer.serializeToJson(t);IG(n),this._requestSender.sendNotification({method:e.method,params:n},i)}};function IG(o){if(o!==null&&Array.isArray(o)&&typeof o!="object")throw new Error("Invalid value! Only null, array and object is allowed.")}var EG=class Vse extends Error{constructor(e,t,i=va.genericApplicationError){super(e),we(this,"data"),we(this,"code"),this.data=t,this.code=i,Object.setPrototypeOf(this,Vse.prototype)}},cBe=class oW{constructor(e,t,i,n,s=!1){we(this,"method"),we(this,"paramsSerializer"),we(this,"resultSerializer"),we(this,"errorSerializer"),we(this,"isOptional"),we(this,"kind","request"),this.method=e,this.paramsSerializer=t,this.resultSerializer=i,this.errorSerializer=n,this.isOptional=s}withMethod(e){return new oW(e,this.paramsSerializer,this.resultSerializer,this.errorSerializer)}optional(){return new oW(this.method,this.paramsSerializer,this.resultSerializer,this.errorSerializer,!0)}},dBe=class zse{constructor(e,t){we(this,"method"),we(this,"paramsSerializer"),we(this,"kind","notification"),this.method=e,this.paramsSerializer=t}withMethod(e){return new zse(e,this.paramsSerializer)}};function He(o){return new cBe((o||{}).method,sv.sAny(),sv.sAny(),sv.sAny())}function Ni(o){return new dBe((o||{}).method,sv.sAny())}const hBe=Symbol();var NG=(DG=hBe,vx=class{constructor(o){we(this,"error"),we(this,DG),this.error=o}},we(vx,"factory",o=>new vx(o)),vx);function uBe(o){const e=TG(o.server),t=TG(o.client);return new gBe(o.tags||[],e,t)}function TG(o){const e={};for(const[t,i]of Object.entries(o)){const n=i.method?i.method:t;e[t]=i.withMethod(n)}return e}var gBe=class Use{constructor(e=[],t,i){we(this,"tags"),we(this,"server"),we(this,"client"),this.tags=e,this.server=t,this.client=i}_onlyDesignTime(){return new Error("This property is not meant to be accessed at runtime")}get TContractObject(){throw this._onlyDesignTime()}get TClientInterface(){throw this._onlyDesignTime()}get TServerInterface(){throw this._onlyDesignTime()}get TClientHandler(){throw this._onlyDesignTime()}get TServerHandler(){throw this._onlyDesignTime()}get TTags(){throw this._onlyDesignTime()}getInterface(e,t,i,n){const s=this.buildCounterpart(e,i),r=this.registerHandlers(e,t,n,s);return{counterpart:s,dispose:()=>r.dispose()}}buildCounterpart(e,t){const i={};for(const[n,s]of Object.entries(t)){let r;s.kind==="request"?s.isOptional?r=async(a,l)=>{a===void 0&&(a={});try{return await e.request(s,a,l)}catch(c){if(c&&c.code===va.methodNotFound)return Wse;throw c}}:r=(a,l)=>(a===void 0&&(a={}),e.request(s,a,l)):r=(a,l)=>(a===void 0&&(a={}),e.notify(s,a,l)),i[n]=r}return i}registerHandlers(e,t,i,n){const s=[];for(const[r,a]of Object.entries(t))if(a.kind==="request"){let l=i[r];if(!l)continue;const c=this.createRequestHandler(n,l);s.push(e.registerRequestHandler(a,c))}else{const l=i[r];l&&s.push(e.registerNotificationHandler(a,(c,d)=>{l(c,{context:d,counterpart:n})}))}return{dispose:()=>s.forEach(r=>r.dispose())}}createRequestHandler(e,t){return async(i,n,s)=>{const r=await t(i,{context:s,counterpart:e,newErr:NG.factory,requestId:n});return r instanceof NG?r.error:{ok:r}}}static getServerFromStream(e,t,i,n){const s=sW.fromTransport(t,i),{server:r}=e.getServer(s,n);return s.startListen(),{channel:s,server:r}}static registerServerToStream(e,t,i,n){const s=sW.fromTransport(t,i),{client:r}=e.registerServer(s,n);return s.startListen(),{channel:s,client:r}}getServer(e,t){const{counterpart:i,dispose:n}=this.getInterface(e,this.client,this.server,t);return{server:i,dispose:n}}registerServer(e,t){const{counterpart:i,dispose:n}=this.getInterface(e,this.server,this.client,t);return{client:i,dispose:n}}withContext(){return new Use(this.tags,this.server,this.client)}};let ov=(function(o){return o.Comment="comment",o.Imports="imports",o.Region="region",o})({}),$i=(function(o){return o[o.File=1]="File",o[o.Module=2]="Module",o[o.Namespace=3]="Namespace",o[o.Package=4]="Package",o[o.Class=5]="Class",o[o.Method=6]="Method",o[o.Property=7]="Property",o[o.Field=8]="Field",o[o.Constructor=9]="Constructor",o[o.Enum=10]="Enum",o[o.Interface=11]="Interface",o[o.Function=12]="Function",o[o.Variable=13]="Variable",o[o.Constant=14]="Constant",o[o.String=15]="String",o[o.Number=16]="Number",o[o.Boolean=17]="Boolean",o[o.Array=18]="Array",o[o.Object=19]="Object",o[o.Key=20]="Key",o[o.Null=21]="Null",o[o.EnumMember=22]="EnumMember",o[o.Struct=23]="Struct",o[o.Event=24]="Event",o[o.Operator=25]="Operator",o[o.TypeParameter=26]="TypeParameter",o})({}),$se=(function(o){return o[o.Deprecated=1]="Deprecated",o})({}),RG=(function(o){return o[o.Type=1]="Type",o[o.Parameter=2]="Parameter",o})({}),fBe=(function(o){return o[o.None=0]="None",o[o.Full=1]="Full",o[o.Incremental=2]="Incremental",o})({}),Zi=(function(o){return o[o.Text=1]="Text",o[o.Method=2]="Method",o[o.Function=3]="Function",o[o.Constructor=4]="Constructor",o[o.Field=5]="Field",o[o.Variable=6]="Variable",o[o.Class=7]="Class",o[o.Interface=8]="Interface",o[o.Module=9]="Module",o[o.Property=10]="Property",o[o.Unit=11]="Unit",o[o.Value=12]="Value",o[o.Enum=13]="Enum",o[o.Keyword=14]="Keyword",o[o.Snippet=15]="Snippet",o[o.Color=16]="Color",o[o.File=17]="File",o[o.Reference=18]="Reference",o[o.Folder=19]="Folder",o[o.EnumMember=20]="EnumMember",o[o.Constant=21]="Constant",o[o.Struct=22]="Struct",o[o.Event=23]="Event",o[o.Operator=24]="Operator",o[o.TypeParameter=25]="TypeParameter",o})({}),pBe=(function(o){return o[o.Deprecated=1]="Deprecated",o})({}),mBe=(function(o){return o[o.PlainText=1]="PlainText",o[o.Snippet=2]="Snippet",o})({}),jP=(function(o){return o[o.Text=1]="Text",o[o.Read=2]="Read",o[o.Write=3]="Write",o})({}),Zc=(function(o){return o.Empty="",o.QuickFix="quickfix",o.Refactor="refactor",o.RefactorExtract="refactor.extract",o.RefactorInline="refactor.inline",o.RefactorRewrite="refactor.rewrite",o.Source="source",o.SourceOrganizeImports="source.organizeImports",o.SourceFixAll="source.fixAll",o})({}),ME=(function(o){return o.PlainText="plaintext",o.Markdown="markdown",o})({}),Td=(function(o){return o[o.Error=1]="Error",o[o.Warning=2]="Warning",o[o.Information=3]="Information",o[o.Hint=4]="Hint",o})({}),MG=(function(o){return o[o.Unnecessary=1]="Unnecessary",o[o.Deprecated=2]="Deprecated",o})({}),lD=(function(o){return o[o.Invoked=1]="Invoked",o[o.TriggerCharacter=2]="TriggerCharacter",o[o.TriggerForIncompleteCompletions=3]="TriggerForIncompleteCompletions",o})({}),cD=(function(o){return o[o.Invoked=1]="Invoked",o[o.TriggerCharacter=2]="TriggerCharacter",o[o.ContentChange=3]="ContentChange",o})({}),rW=(function(o){return o[o.Invoked=1]="Invoked",o[o.Automatic=2]="Automatic",o})({}),_Be=(function(o){return o.Relative="relative",o})({});var ut=class{constructor(o){this.method=o}};const et={textDocumentImplementation:new ut("textDocument/implementation"),textDocumentTypeDefinition:new ut("textDocument/typeDefinition"),textDocumentDocumentColor:new ut("textDocument/documentColor"),textDocumentColorPresentation:new ut("textDocument/colorPresentation"),textDocumentFoldingRange:new ut("textDocument/foldingRange"),textDocumentDeclaration:new ut("textDocument/declaration"),textDocumentSelectionRange:new ut("textDocument/selectionRange"),textDocumentPrepareCallHierarchy:new ut("textDocument/prepareCallHierarchy"),textDocumentSemanticTokensFull:new ut("textDocument/semanticTokens/full"),textDocumentSemanticTokensFullDelta:new ut("textDocument/semanticTokens/full/delta"),textDocumentLinkedEditingRange:new ut("textDocument/linkedEditingRange"),workspaceWillCreateFiles:new ut("workspace/willCreateFiles"),workspaceWillRenameFiles:new ut("workspace/willRenameFiles"),workspaceWillDeleteFiles:new ut("workspace/willDeleteFiles"),textDocumentMoniker:new ut("textDocument/moniker"),textDocumentPrepareTypeHierarchy:new ut("textDocument/prepareTypeHierarchy"),textDocumentInlineValue:new ut("textDocument/inlineValue"),textDocumentInlayHint:new ut("textDocument/inlayHint"),textDocumentDiagnostic:new ut("textDocument/diagnostic"),textDocumentInlineCompletion:new ut("textDocument/inlineCompletion"),textDocumentWillSaveWaitUntil:new ut("textDocument/willSaveWaitUntil"),textDocumentCompletion:new ut("textDocument/completion"),textDocumentHover:new ut("textDocument/hover"),textDocumentSignatureHelp:new ut("textDocument/signatureHelp"),textDocumentDefinition:new ut("textDocument/definition"),textDocumentReferences:new ut("textDocument/references"),textDocumentDocumentHighlight:new ut("textDocument/documentHighlight"),textDocumentDocumentSymbol:new ut("textDocument/documentSymbol"),textDocumentCodeAction:new ut("textDocument/codeAction"),workspaceSymbol:new ut("workspace/symbol"),textDocumentCodeLens:new ut("textDocument/codeLens"),textDocumentDocumentLink:new ut("textDocument/documentLink"),textDocumentFormatting:new ut("textDocument/formatting"),textDocumentRangeFormatting:new ut("textDocument/rangeFormatting"),textDocumentRangesFormatting:new ut("textDocument/rangesFormatting"),textDocumentOnTypeFormatting:new ut("textDocument/onTypeFormatting"),textDocumentRename:new ut("textDocument/rename"),workspaceExecuteCommand:new ut("workspace/executeCommand"),workspaceDidCreateFiles:new ut("workspace/didCreateFiles"),workspaceDidRenameFiles:new ut("workspace/didRenameFiles"),workspaceDidDeleteFiles:new ut("workspace/didDeleteFiles"),workspaceDidChangeConfiguration:new ut("workspace/didChangeConfiguration"),textDocumentDidOpen:new ut("textDocument/didOpen"),textDocumentDidChange:new ut("textDocument/didChange"),textDocumentDidClose:new ut("textDocument/didClose"),textDocumentDidSave:new ut("textDocument/didSave"),textDocumentWillSave:new ut("textDocument/willSave"),workspaceDidChangeWatchedFiles:new ut("workspace/didChangeWatchedFiles")},q0=uBe({server:{textDocumentImplementation:He({method:"textDocument/implementation"}),textDocumentTypeDefinition:He({method:"textDocument/typeDefinition"}),textDocumentDocumentColor:He({method:"textDocument/documentColor"}),textDocumentColorPresentation:He({method:"textDocument/colorPresentation"}),textDocumentFoldingRange:He({method:"textDocument/foldingRange"}),textDocumentDeclaration:He({method:"textDocument/declaration"}),textDocumentSelectionRange:He({method:"textDocument/selectionRange"}),textDocumentPrepareCallHierarchy:He({method:"textDocument/prepareCallHierarchy"}),callHierarchyIncomingCalls:He({method:"callHierarchy/incomingCalls"}),callHierarchyOutgoingCalls:He({method:"callHierarchy/outgoingCalls"}),textDocumentSemanticTokensFull:He({method:"textDocument/semanticTokens/full"}),textDocumentSemanticTokensFullDelta:He({method:"textDocument/semanticTokens/full/delta"}),textDocumentSemanticTokensRange:He({method:"textDocument/semanticTokens/range"}),textDocumentLinkedEditingRange:He({method:"textDocument/linkedEditingRange"}),workspaceWillCreateFiles:He({method:"workspace/willCreateFiles"}),workspaceWillRenameFiles:He({method:"workspace/willRenameFiles"}),workspaceWillDeleteFiles:He({method:"workspace/willDeleteFiles"}),textDocumentMoniker:He({method:"textDocument/moniker"}),textDocumentPrepareTypeHierarchy:He({method:"textDocument/prepareTypeHierarchy"}),typeHierarchySupertypes:He({method:"typeHierarchy/supertypes"}),typeHierarchySubtypes:He({method:"typeHierarchy/subtypes"}),textDocumentInlineValue:He({method:"textDocument/inlineValue"}),textDocumentInlayHint:He({method:"textDocument/inlayHint"}),inlayHintResolve:He({method:"inlayHint/resolve"}),textDocumentDiagnostic:He({method:"textDocument/diagnostic"}),workspaceDiagnostic:He({method:"workspace/diagnostic"}),textDocumentInlineCompletion:He({method:"textDocument/inlineCompletion"}),initialize:He({method:"initialize"}),shutdown:He({method:"shutdown"}),textDocumentWillSaveWaitUntil:He({method:"textDocument/willSaveWaitUntil"}),textDocumentCompletion:He({method:"textDocument/completion"}),completionItemResolve:He({method:"completionItem/resolve"}),textDocumentHover:He({method:"textDocument/hover"}),textDocumentSignatureHelp:He({method:"textDocument/signatureHelp"}),textDocumentDefinition:He({method:"textDocument/definition"}),textDocumentReferences:He({method:"textDocument/references"}),textDocumentDocumentHighlight:He({method:"textDocument/documentHighlight"}),textDocumentDocumentSymbol:He({method:"textDocument/documentSymbol"}),textDocumentCodeAction:He({method:"textDocument/codeAction"}),codeActionResolve:He({method:"codeAction/resolve"}),workspaceSymbol:He({method:"workspace/symbol"}),workspaceSymbolResolve:He({method:"workspaceSymbol/resolve"}),textDocumentCodeLens:He({method:"textDocument/codeLens"}),codeLensResolve:He({method:"codeLens/resolve"}),textDocumentDocumentLink:He({method:"textDocument/documentLink"}),documentLinkResolve:He({method:"documentLink/resolve"}),textDocumentFormatting:He({method:"textDocument/formatting"}),textDocumentRangeFormatting:He({method:"textDocument/rangeFormatting"}),textDocumentRangesFormatting:He({method:"textDocument/rangesFormatting"}),textDocumentOnTypeFormatting:He({method:"textDocument/onTypeFormatting"}),textDocumentRename:He({method:"textDocument/rename"}),textDocumentPrepareRename:He({method:"textDocument/prepareRename"}),workspaceExecuteCommand:He({method:"workspace/executeCommand"}),workspaceDidChangeWorkspaceFolders:Ni({method:"workspace/didChangeWorkspaceFolders"}),windowWorkDoneProgressCancel:Ni({method:"window/workDoneProgress/cancel"}),workspaceDidCreateFiles:Ni({method:"workspace/didCreateFiles"}),workspaceDidRenameFiles:Ni({method:"workspace/didRenameFiles"}),workspaceDidDeleteFiles:Ni({method:"workspace/didDeleteFiles"}),notebookDocumentDidOpen:Ni({method:"notebookDocument/didOpen"}),notebookDocumentDidChange:Ni({method:"notebookDocument/didChange"}),notebookDocumentDidSave:Ni({method:"notebookDocument/didSave"}),notebookDocumentDidClose:Ni({method:"notebookDocument/didClose"}),initialized:Ni({method:"initialized"}),exit:Ni({method:"exit"}),workspaceDidChangeConfiguration:Ni({method:"workspace/didChangeConfiguration"}),textDocumentDidOpen:Ni({method:"textDocument/didOpen"}),textDocumentDidChange:Ni({method:"textDocument/didChange"}),textDocumentDidClose:Ni({method:"textDocument/didClose"}),textDocumentDidSave:Ni({method:"textDocument/didSave"}),textDocumentWillSave:Ni({method:"textDocument/willSave"}),workspaceDidChangeWatchedFiles:Ni({method:"workspace/didChangeWatchedFiles"}),setTrace:Ni({method:"$/setTrace"}),cancelRequest:Ni({method:"$/cancelRequest"}),progress:Ni({method:"$/progress"})},client:{workspaceWorkspaceFolders:He({method:"workspace/workspaceFolders"}).optional(),workspaceConfiguration:He({method:"workspace/configuration"}).optional(),workspaceFoldingRangeRefresh:He({method:"workspace/foldingRange/refresh"}).optional(),windowWorkDoneProgressCreate:He({method:"window/workDoneProgress/create"}).optional(),workspaceSemanticTokensRefresh:He({method:"workspace/semanticTokens/refresh"}).optional(),windowShowDocument:He({method:"window/showDocument"}).optional(),workspaceInlineValueRefresh:He({method:"workspace/inlineValue/refresh"}).optional(),workspaceInlayHintRefresh:He({method:"workspace/inlayHint/refresh"}).optional(),workspaceDiagnosticRefresh:He({method:"workspace/diagnostic/refresh"}).optional(),clientRegisterCapability:He({method:"client/registerCapability"}).optional(),clientUnregisterCapability:He({method:"client/unregisterCapability"}).optional(),windowShowMessageRequest:He({method:"window/showMessageRequest"}).optional(),workspaceCodeLensRefresh:He({method:"workspace/codeLens/refresh"}).optional(),workspaceApplyEdit:He({method:"workspace/applyEdit"}).optional(),windowShowMessage:Ni({method:"window/showMessage"}),windowLogMessage:Ni({method:"window/logMessage"}),telemetryEvent:Ni({method:"telemetry/event"}),textDocumentPublishDiagnostics:Ni({method:"textDocument/publishDiagnostics"}),logTrace:Ni({method:"$/logTrace"}),cancelRequest:Ni({method:"$/cancelRequest"}),progress:Ni({method:"$/progress"})}});function ep(o,e){if(o.textModel!==e)throw new Error(`Expected text model to be ${e}, but got ${o.textModel}`);return o}var Gi=(UP=class{constructor(){we(this,"_store",new h6)}dispose(){this._store.dispose()}_register(o){if(o===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(o)}},we(UP,"None",Object.freeze({dispose(){}})),UP),h6=(Cx=class{constructor(){we(this,"_toDispose",new Set),we(this,"_isDisposed",!1)}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}clear(){if(this._toDispose.size!==0)try{for(const o of this._toDispose)o.dispose()}finally{this._toDispose.clear()}}add(o){if(!o)return o;if(o===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?Cx.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(o),o}},we(Cx,"DISABLE_DISPOSED_WARNING",!1),Cx);const jse=new Map([[Zc.Empty,""],[Zc.QuickFix,"quickfix"],[Zc.Refactor,"refactor"],[Zc.RefactorExtract,"refactor.extract"],[Zc.RefactorInline,"refactor.inline"],[Zc.RefactorRewrite,"refactor.rewrite"],[Zc.Source,"source"],[Zc.SourceOrganizeImports,"source.organizeImports"],[Zc.SourceFixAll,"source.fixAll"]]);function bBe(o){if(o)return jse.get(o)??o}const vBe=new Map([[he.CodeActionTriggerType.Invoke,rW.Invoked],[he.CodeActionTriggerType.Auto,rW.Automatic]]);function CBe(o){return vBe.get(o)??rW.Invoked}const qse=new Map([[Zi.Text,he.CompletionItemKind.Text],[Zi.Method,he.CompletionItemKind.Method],[Zi.Function,he.CompletionItemKind.Function],[Zi.Constructor,he.CompletionItemKind.Constructor],[Zi.Field,he.CompletionItemKind.Field],[Zi.Variable,he.CompletionItemKind.Variable],[Zi.Class,he.CompletionItemKind.Class],[Zi.Interface,he.CompletionItemKind.Interface],[Zi.Module,he.CompletionItemKind.Module],[Zi.Property,he.CompletionItemKind.Property],[Zi.Unit,he.CompletionItemKind.Unit],[Zi.Value,he.CompletionItemKind.Value],[Zi.Enum,he.CompletionItemKind.Enum],[Zi.Keyword,he.CompletionItemKind.Keyword],[Zi.Snippet,he.CompletionItemKind.Snippet],[Zi.Color,he.CompletionItemKind.Color],[Zi.File,he.CompletionItemKind.File],[Zi.Reference,he.CompletionItemKind.Reference],[Zi.Folder,he.CompletionItemKind.Folder],[Zi.EnumMember,he.CompletionItemKind.EnumMember],[Zi.Constant,he.CompletionItemKind.Constant],[Zi.Struct,he.CompletionItemKind.Struct],[Zi.Event,he.CompletionItemKind.Event],[Zi.Operator,he.CompletionItemKind.Operator],[Zi.TypeParameter,he.CompletionItemKind.TypeParameter]]);function wBe(o){return o?qse.get(o)??he.CompletionItemKind.Text:he.CompletionItemKind.Text}const Kse=new Map([[pBe.Deprecated,he.CompletionItemTag.Deprecated]]);function SBe(o){return Kse.get(o)}const yBe=new Map([[he.CompletionTriggerKind.Invoke,lD.Invoked],[he.CompletionTriggerKind.TriggerCharacter,lD.TriggerCharacter],[he.CompletionTriggerKind.TriggerForIncompleteCompletions,lD.TriggerForIncompleteCompletions]]);function LBe(o){return yBe.get(o)??lD.Invoked}const xBe=new Map([[mBe.Snippet,he.CompletionItemInsertTextRule.InsertAsSnippet]]);function DBe(o){if(o)return xBe.get(o)}const Gse=new Map([[$i.File,he.SymbolKind.File],[$i.Module,he.SymbolKind.Module],[$i.Namespace,he.SymbolKind.Namespace],[$i.Package,he.SymbolKind.Package],[$i.Class,he.SymbolKind.Class],[$i.Method,he.SymbolKind.Method],[$i.Property,he.SymbolKind.Property],[$i.Field,he.SymbolKind.Field],[$i.Constructor,he.SymbolKind.Constructor],[$i.Enum,he.SymbolKind.Enum],[$i.Interface,he.SymbolKind.Interface],[$i.Function,he.SymbolKind.Function],[$i.Variable,he.SymbolKind.Variable],[$i.Constant,he.SymbolKind.Constant],[$i.String,he.SymbolKind.String],[$i.Number,he.SymbolKind.Number],[$i.Boolean,he.SymbolKind.Boolean],[$i.Array,he.SymbolKind.Array],[$i.Object,he.SymbolKind.Object],[$i.Key,he.SymbolKind.Key],[$i.Null,he.SymbolKind.Null],[$i.EnumMember,he.SymbolKind.EnumMember],[$i.Struct,he.SymbolKind.Struct],[$i.Event,he.SymbolKind.Event],[$i.Operator,he.SymbolKind.Operator],[$i.TypeParameter,he.SymbolKind.TypeParameter]]);function Zse(o){return Gse.get(o)??he.SymbolKind.File}const kBe=new Map([[$se.Deprecated,he.SymbolTag.Deprecated]]);function Yse(o){return kBe.get(o)}const IBe=new Map([[jP.Text,he.DocumentHighlightKind.Text],[jP.Read,he.DocumentHighlightKind.Read],[jP.Write,he.DocumentHighlightKind.Write]]);function EBe(o){return o?IBe.get(o)??he.DocumentHighlightKind.Text:he.DocumentHighlightKind.Text}const NBe=new Map([[ov.Comment,he.FoldingRangeKind.Comment],[ov.Imports,he.FoldingRangeKind.Imports],[ov.Region,he.FoldingRangeKind.Region]]);function TBe(o){if(o)return NBe.get(o)}const RBe=new Map([[wa.Error,Td.Error],[wa.Warning,Td.Warning],[wa.Info,Td.Information],[wa.Hint,Td.Hint]]);function MBe(o){return RBe.get(o)??Td.Error}const PBe=new Map([[Td.Error,wa.Error],[Td.Warning,wa.Warning],[Td.Information,wa.Info],[Td.Hint,wa.Hint]]);function ABe(o){return o?PBe.get(o)??wa.Error:wa.Error}const Xse=new Map([[MG.Unnecessary,vI.Unnecessary],[MG.Deprecated,vI.Deprecated]]);function OBe(o){return Xse.get(o)}const FBe=new Map([[he.SignatureHelpTriggerKind.Invoke,cD.Invoked],[he.SignatureHelpTriggerKind.TriggerCharacter,cD.TriggerCharacter],[he.SignatureHelpTriggerKind.ContentChange,cD.ContentChange]]);function WBe(o){return FBe.get(o)??cD.Invoked}function rv(o){if(o)return{id:o.command,title:o.title,arguments:o.arguments}}const BBe=new Map([[RG.Type,he.InlayHintKind.Type],[RG.Parameter,he.InlayHintKind.Parameter]]);function HBe(o){return o?BBe.get(o)??he.InlayHintKind.Type:he.InlayHintKind.Type}function ag(o,e){if("targetUri"in o){const t=e.bridge.translateBackRange({uri:o.targetUri},o.targetRange);return{uri:t.textModel.uri,range:t.range,originSelectionRange:o.originSelectionRange?e.bridge.translateBackRange({uri:o.targetUri},o.originSelectionRange).range:void 0,targetSelectionRange:o.targetSelectionRange?e.bridge.translateBackRange({uri:o.targetUri},o.targetSelectionRange).range:void 0}}else{const t=e.bridge.translateBackRange({uri:o.uri},o.range);return{uri:t.textModel.uri,range:t.range}}}function An(o){return!o||o.length===0?{language:"*"}:o.map(e=>"notebook"in e?typeof e.notebook=="string"?{notebookType:e.notebook,language:e.language}:{notebookType:e.notebook.notebookType,language:e.language,pattern:e.notebook.pattern,scheme:e.notebook.scheme}:{language:e.language,pattern:e.pattern,scheme:e.scheme})}function VBe(o,e){if(!e)return!0;const t=o.getLanguageId();if(o.uri.toString(!0),!e||e.length===0)return!0;for(const i of e)if(!(i.language&&i.language!=="*"&&i.language!==t))return!0;return!1}function aW(o){const e={severity:ABe(o.severity),startLineNumber:o.range.start.line+1,startColumn:o.range.start.character+1,endLineNumber:o.range.end.line+1,endColumn:o.range.end.character+1,message:o.message,source:o.source,code:typeof o.code=="string"?o.code:o.code?.toString()};return o.tags&&(e.tags=o.tags.map(t=>OBe(t)).filter(t=>t!==void 0)),o.relatedInformation&&(e.relatedInformation=o.relatedInformation.map(t=>({resource:OR.parse(t.location.uri),startLineNumber:t.location.range.start.line+1,startColumn:t.location.range.start.character+1,endLineNumber:t.location.range.end.line+1,endColumn:t.location.range.end.character+1,message:t.message}))),e}var zBe=class extends Gi{constructor(o){super(),this._connection=o,this._register(this._connection.capabilities.addStaticClientCapabilities({textDocument:{completion:{dynamicRegistration:!0,contextSupport:!0,completionItemKind:{valueSet:Array.from(qse.keys())},completionItem:{tagSupport:{valueSet:Array.from(Kse.keys())},commitCharactersSupport:!0,deprecatedSupport:!0,preselectSupport:!0}}}})),this._register(this._connection.capabilities.registerCapabilityHandler(et.textDocumentCompletion,!0,e=>he.registerCompletionItemProvider(An(e.documentSelector),new UBe(this._connection,e))))}},UBe=class{constructor(o,e){we(this,"resolveCompletionItem"),this._client=o,this._capabilities=e,e.resolveProvider&&(this.resolveCompletionItem=async(t,i)=>(Qse(t,await this._client.server.completionItemResolve(t._lspItem),this._client.bridge,t._translated,t._model),t))}get triggerCharacters(){return this._capabilities.triggerCharacters}async provideCompletionItems(o,e,t,i){const n=this._client.bridge.translate(o,e),s=await this._client.server.textDocumentCompletion({textDocument:n.textDocument,position:n.position,context:t.triggerCharacter?{triggerKind:LBe(t.triggerKind),triggerCharacter:t.triggerCharacter}:void 0});return s?{suggestions:(Array.isArray(s)?s:s.items).map(r=>({...$Be(r,this._client.bridge,n,o,e),_lspItem:r,_translated:n,_model:o}))}:{suggestions:[]}}};function $Be(o,e,t,i,n){let s=o.insertText||o.label,r;o.textEdit&&("range"in o.textEdit?(s=o.textEdit.newText,r=ep(e.translateBackRange(t.textDocument,o.textEdit.range),i).range):(s=o.textEdit.newText,r={insert:ep(e.translateBackRange(t.textDocument,o.textEdit.insert),i).range,replace:ep(e.translateBackRange(t.textDocument,o.textEdit.replace),i).range})),r||(r=Ym.fromPositions(n,n));const a={label:o.label,kind:wBe(o.kind),insertText:s,sortText:o.sortText,filterText:o.filterText,preselect:o.preselect,commitCharacters:o.commitCharacters,range:r};return Qse(a,o,e,t,i),a}function Qse(o,e,t,i,n){e.detail!==void 0&&(o.detail=e.detail),e.documentation!==void 0&&(o.documentation=jBe(e.documentation)),e.insertTextFormat!==void 0&&(o.insertTextRules=DBe(e.insertTextFormat)),e.tags&&e.tags.length>0&&(o.tags=e.tags.map(SBe).filter(s=>s!==void 0)),e.additionalTextEdits&&e.additionalTextEdits.length>0&&(o.additionalTextEdits=e.additionalTextEdits.map(s=>({range:ep(t.translateBackRange(i.textDocument,s.range),n).range,text:s.newText}))),e.command&&(o.command=rv(e.command))}function jBe(o){if(o)return typeof o=="string"?o:{value:o.value,isTrusted:!0}}var qBe=class extends Gi{constructor(o){super(),this._connection=o,this._register(this._connection.capabilities.addStaticClientCapabilities({textDocument:{hover:{dynamicRegistration:!0,contentFormat:[ME.Markdown,ME.PlainText]}}})),this._register(this._connection.capabilities.registerCapabilityHandler(et.textDocumentHover,!0,e=>he.registerHoverProvider(An(e.documentSelector),new KBe(this._connection,e))))}},KBe=class{constructor(o,e){this._client=o,this._capabilities=e}async provideHover(o,e,t){const i=this._client.bridge.translate(o,e),n=await this._client.server.textDocumentHover({textDocument:i.textDocument,position:i.position});return!n||!n.contents?null:{contents:GBe(n.contents),range:n.range?this._client.bridge.translateBackRange(i.textDocument,n.range).range:void 0}}};function GBe(o){return Array.isArray(o)?o.map(e=>PG(e)):[PG(o)]}function PG(o){return typeof o=="string"?{value:o,isTrusted:!0}:"kind"in o?{value:o.value,isTrusted:!0}:{value:`\`\`\`${o.language}
|
|
917
917
|
${o.value}
|