@vitejs/devtools 0.0.0-alpha.31 → 0.0.0-alpha.32

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.
@@ -1,4 +1,4 @@
1
- import { R as ref, a as Fragment, d as createElementBlock, f as createStaticVNode, g as defineComponent, k as watchEffect, l as createBlock, m as createVNode, s as computed, w as openBlock } from "./vue.runtime.esm-bundler-DL0i8o0W.js";
1
+ import { R as ref, a as Fragment, d as createElementBlock, f as createStaticVNode, g as defineComponent, k as watchEffect, l as createBlock, m as createVNode, s as computed, w as openBlock } from "./vue.runtime.esm-bundler-CHmRsJSH.js";
2
2
  import { t as export_helper_default } from "./export-helper-DjM8b2QE.js";
3
3
 
4
4
  //#region ../../node_modules/.pnpm/dompurify@3.3.1/node_modules/dompurify/dist/purify.es.mjs
@@ -1,4 +1,4 @@
1
- import { d as createElementBlock, w as openBlock } from "./vue.runtime.esm-bundler-DL0i8o0W.js";
1
+ import { d as createElementBlock, w as openBlock } from "./vue.runtime.esm-bundler-CHmRsJSH.js";
2
2
  import { t as export_helper_default } from "./export-helper-DjM8b2QE.js";
3
3
 
4
4
  //#region src/client/webcomponents/components/ViewBuiltinLogs.vue
@@ -1,6 +1,6 @@
1
- import { C as onUnmounted, I as reactive, K as toDisplayString, O as watch, P as markRaw, R as ref, S as onMounted, T as renderList, U as unref, W as normalizeClass, a as Fragment, c as createBaseVNode, d as createElementBlock, g as defineComponent, l as createBlock, m as createVNode, u as createCommentVNode, w as openBlock, x as nextTick, z as shallowRef } from "./vue.runtime.esm-bundler-DL0i8o0W.js";
2
- import { l as watchImmediate, r as useEventListener } from "./dist-BpFPAu5f.js";
3
- import { t as _sfc_main$2 } from "./DockIcon-BfVdt_M0.js";
1
+ import { C as onUnmounted, I as reactive, K as toDisplayString, O as watch, P as markRaw, R as ref, S as onMounted, T as renderList, U as unref, W as normalizeClass, a as Fragment, c as createBaseVNode, d as createElementBlock, g as defineComponent, l as createBlock, m as createVNode, u as createCommentVNode, w as openBlock, x as nextTick, z as shallowRef } from "./vue.runtime.esm-bundler-CHmRsJSH.js";
2
+ import { l as watchImmediate, r as useEventListener } from "./dist-B1eLoAag.js";
3
+ import { t as _sfc_main$2 } from "./DockIcon-DC06YRV1.js";
4
4
 
5
5
  //#region src/client/webcomponents/state/terminals.ts
6
6
  let _terminalsMap;
@@ -1,6 +1,6 @@
1
- import { i as getPort, n as createDevToolsMiddleware, o as ansis_default, r as MARK_NODE } from "./plugins-BbzqUdpu.js";
1
+ import { i as getPort, n as createDevToolsMiddleware, o as ansis_default, r as MARK_NODE } from "./plugins-CM-4geJK.js";
2
2
  import { dirClientStandalone } from "./dirs.js";
3
- import { t as startStandaloneDevTools } from "./standalone-DVh1a9tu.js";
3
+ import { t as startStandaloneDevTools } from "./standalone-CfUW6ZhV.js";
4
4
  import { join, relative, resolve } from "pathe";
5
5
  import { existsSync } from "node:fs";
6
6
  import sirv from "sirv";
package/dist/cli.js CHANGED
@@ -1,4 +1,4 @@
1
- import "./plugins-BbzqUdpu.js";
1
+ import "./plugins-CM-4geJK.js";
2
2
  import { build, start } from "./cli-commands.js";
3
3
  import process from "node:process";
4
4
  import cac from "cac";
@@ -1,6 +1,6 @@
1
- import { I as reactive, P as markRaw, R as ref, V as toRefs, k as watchEffect, s as computed } from "../vue.runtime.esm-bundler-DL0i8o0W.js";
2
- import { i as useLocalStorage } from "../dist-BpFPAu5f.js";
3
- import { a as docksGroupByCategories, i as useDocksEntries, n as createDockEntryState, s as BUILTIN_ENTRIES, t as DEFAULT_DOCK_PANEL_STORE } from "../docks-CYaKLVhQ.js";
1
+ import { I as reactive, P as markRaw, R as ref, V as toRefs, k as watchEffect, s as computed } from "../vue.runtime.esm-bundler-CHmRsJSH.js";
2
+ import { i as useLocalStorage } from "../dist-B1eLoAag.js";
3
+ import { a as docksGroupByCategories, i as useDocksEntries, n as createDockEntryState, s as BUILTIN_ENTRIES, t as DEFAULT_DOCK_PANEL_STORE } from "../docks-BVWse3rL.js";
4
4
  import { DEFAULT_STATE_USER_SETTINGS } from "@vitejs/devtools-kit/constants";
5
5
  import { getDevToolsRpcClient } from "@vitejs/devtools-kit/client";
6
6
 
@@ -0,0 +1 @@
1
+ import{c as e,m as t,n}from"./index-DWcF5wcd.js";var r={};function i(n,r){return t(),e(`div`,null,` Logs // TODO: `)}var a=n(r,[[`render`,i]]);export{a as default};
@@ -1,4 +1,4 @@
1
- import{C as e,S as t,_ as n,a as r,b as i,c as a,d as o,f as s,g as c,h as l,i as u,l as d,m as f,o as p,p as m,r as h,s as g,t as _,u as ee,v as te,x as ne,y as re}from"./index-DWC0UjCz.js";var ie;function ae(e){if(ie)return ie;let t=ie=te(new Map);async function n(){let n=await e.rpc.call(`devtoolskit:internal:terminals:list`);for(let e of n){if(t.has(e.id)){t.get(e.id).info=Object.freeze(e);continue}t.set(e.id,{info:Object.freeze(e),buffer:null,terminal:null})}console.log(`[VITE DEVTOOLS] Terminals Updated`,[...t.values()])}return e.rpc.client.register({name:`devtoolskit:internal:terminals:updated`,type:`action`,handler:()=>n()}),e.rpc.client.register({name:`devtoolskit:internal:terminals:stream-chunk`,type:`action`,handler:e=>{let n=t.get(e.id);if(!n){console.warn(`[VITE DEVTOOLS] Terminal with id "${e.id}" not found`);return}n.buffer?.push(...e.chunks);for(let t of e.chunks)n.terminal?.writeln(t)}}),n(),t}var oe=2,se=1,ce=class{activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;let t=this._terminal._core;(this._terminal.rows!==e.rows||this._terminal.cols!==e.cols)&&(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let e=this._terminal._core._renderService.dimensions;if(e.css.cell.width===0||e.css.cell.height===0)return;let t=this._terminal.options.scrollback===0?0:this._terminal.options.overviewRuler?.width||14,n=window.getComputedStyle(this._terminal.element.parentElement),r=parseInt(n.getPropertyValue(`height`)),i=Math.max(0,parseInt(n.getPropertyValue(`width`))),a=window.getComputedStyle(this._terminal.element),o={top:parseInt(a.getPropertyValue(`padding-top`)),bottom:parseInt(a.getPropertyValue(`padding-bottom`)),right:parseInt(a.getPropertyValue(`padding-right`)),left:parseInt(a.getPropertyValue(`padding-left`))},s=o.top+o.bottom,c=o.right+o.left,l=r-s,u=i-c-t;return{cols:Math.max(oe,Math.floor(u/e.css.cell.width)),rows:Math.max(se,Math.floor(l/e.css.cell.height))}}},v=Object.defineProperty,le=Object.getOwnPropertyDescriptor,y=(e,t)=>{for(var n in t)v(e,n,{get:t[n],enumerable:!0})},b=(e,t,n,r)=>{for(var i=r>1?void 0:r?le(t,n):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&v(t,n,i),i},x=(e,t)=>(n,r)=>t(n,r,e),ue=`Terminal input`,S={get:()=>ue,set:e=>ue=e},de=`Too much output to announce, navigate to rows manually to read`,fe={get:()=>de,set:e=>de=e};function pe(e){return e.replace(/\r?\n/g,`\r`)}function me(e,t){return t?`\x1B[200~`+e+`\x1B[201~`:e}function he(e,t){e.clipboardData&&e.clipboardData.setData(`text/plain`,t.selectionText),e.preventDefault()}function C(e,t,n,r){e.stopPropagation(),e.clipboardData&&ge(e.clipboardData.getData(`text/plain`),t,n,r)}function ge(e,t,n,r){e=pe(e),e=me(e,n.decPrivateModes.bracketedPasteMode&&r.rawOptions.ignoreBracketedPasteMode!==!0),n.triggerDataEvent(e,!0),t.value=``}function _e(e,t,n){let r=n.getBoundingClientRect(),i=e.clientX-r.left-10,a=e.clientY-r.top-10;t.style.width=`20px`,t.style.height=`20px`,t.style.left=`${i}px`,t.style.top=`${a}px`,t.style.zIndex=`1000`,t.focus()}function ve(e,t,n,r,i){_e(e,t,n),i&&r.rightClickSelect(e),t.value=r.selectionText,t.select()}function ye(e){return e>65535?(e-=65536,String.fromCharCode((e>>10)+55296)+String.fromCharCode(e%1024+56320)):String.fromCharCode(e)}function be(e,t=0,n=e.length){let r=``;for(let i=t;i<n;++i){let t=e[i];t>65535?(t-=65536,r+=String.fromCharCode((t>>10)+55296)+String.fromCharCode(t%1024+56320)):r+=String.fromCharCode(t)}return r}var xe=class{constructor(){this._interim=0}clear(){this._interim=0}decode(e,t){let n=e.length;if(!n)return 0;let r=0,i=0;if(this._interim){let n=e.charCodeAt(i++);56320<=n&&n<=57343?t[r++]=(this._interim-55296)*1024+n-56320+65536:(t[r++]=this._interim,t[r++]=n),this._interim=0}for(let a=i;a<n;++a){let i=e.charCodeAt(a);if(55296<=i&&i<=56319){if(++a>=n)return this._interim=i,r;let o=e.charCodeAt(a);56320<=o&&o<=57343?t[r++]=(i-55296)*1024+o-56320+65536:(t[r++]=i,t[r++]=o);continue}i!==65279&&(t[r++]=i)}return r}},Se=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(e,t){let n=e.length;if(!n)return 0;let r=0,i,a,o,s,c=0,l=0;if(this.interim[0]){let i=!1,a=this.interim[0];a&=(a&224)==192?31:(a&240)==224?15:7;let o=0,s;for(;(s=this.interim[++o]&63)&&o<4;)a<<=6,a|=s;let c=(this.interim[0]&224)==192?2:(this.interim[0]&240)==224?3:4,u=c-o;for(;l<u;){if(l>=n)return 0;if(s=e[l++],(s&192)!=128){l--,i=!0;break}else this.interim[o++]=s,a<<=6,a|=s&63}i||(c===2?a<128?l--:t[r++]=a:c===3?a<2048||a>=55296&&a<=57343||a===65279||(t[r++]=a):a<65536||a>1114111||(t[r++]=a)),this.interim.fill(0)}let u=n-4,d=l;for(;d<n;){for(;d<u&&!((i=e[d])&128)&&!((a=e[d+1])&128)&&!((o=e[d+2])&128)&&!((s=e[d+3])&128);)t[r++]=i,t[r++]=a,t[r++]=o,t[r++]=s,d+=4;if(i=e[d++],i<128)t[r++]=i;else if((i&224)==192){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(c=(i&31)<<6|a&63,c<128){d--;continue}t[r++]=c}else if((i&240)==224){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,r;if(o=e[d++],(o&192)!=128){d--;continue}if(c=(i&15)<<12|(a&63)<<6|o&63,c<2048||c>=55296&&c<=57343||c===65279)continue;t[r++]=c}else if((i&248)==240){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,r;if(o=e[d++],(o&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,this.interim[2]=o,r;if(s=e[d++],(s&192)!=128){d--;continue}if(c=(i&7)<<18|(a&63)<<12|(o&63)<<6|s&63,c<65536||c>1114111)continue;t[r++]=c}}return r}},Ce=``,we=` `,Te=class e{constructor(){this.fg=0,this.bg=0,this.extended=new Ee}static toColorRGB(e){return[e>>>16&255,e>>>8&255,e&255]}static fromColorRGB(e){return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255}clone(){let t=new e;return t.fg=this.fg,t.bg=this.bg,t.extended=this.extended.clone(),t}isInverse(){return this.fg&67108864}isBold(){return this.fg&134217728}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:this.fg&268435456}isBlink(){return this.fg&536870912}isInvisible(){return this.fg&1073741824}isItalic(){return this.bg&67108864}isDim(){return this.bg&134217728}isStrikethrough(){return this.fg&2147483648}isProtected(){return this.bg&536870912}isOverline(){return this.bg&1073741824}getFgColorMode(){return this.fg&50331648}getBgColorMode(){return this.bg&50331648}isFgRGB(){return(this.fg&50331648)==50331648}isBgRGB(){return(this.bg&50331648)==50331648}isFgPalette(){return(this.fg&50331648)==16777216||(this.fg&50331648)==33554432}isBgPalette(){return(this.bg&50331648)==16777216||(this.bg&50331648)==33554432}isFgDefault(){return(this.fg&50331648)==0}isBgDefault(){return(this.bg&50331648)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(this.fg&50331648){case 16777216:case 33554432:return this.fg&255;case 50331648:return this.fg&16777215;default:return-1}}getBgColor(){switch(this.bg&50331648){case 16777216:case 33554432:return this.bg&255;case 50331648:return this.bg&16777215;default:return-1}}hasExtendedAttrs(){return this.bg&268435456}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(this.bg&268435456&&~this.extended.underlineColor)switch(this.extended.underlineColor&50331648){case 16777216:case 33554432:return this.extended.underlineColor&255;case 50331648:return this.extended.underlineColor&16777215;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return this.bg&268435456&&~this.extended.underlineColor?this.extended.underlineColor&50331648:this.getFgColorMode()}isUnderlineColorRGB(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)==16777216||(this.extended.underlineColor&50331648)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)==0:this.isFgDefault()}getUnderlineStyle(){return this.fg&268435456?this.bg&268435456?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}},Ee=class e{constructor(e=0,t=0){this._ext=0,this._urlId=0,this._ext=e,this._urlId=t}get ext(){return this._urlId?this._ext&-469762049|this.underlineStyle<<26:this._ext}set ext(e){this._ext=e}get underlineStyle(){return this._urlId?5:(this._ext&469762048)>>26}set underlineStyle(e){this._ext&=-469762049,this._ext|=e<<26&469762048}get underlineColor(){return this._ext&67108863}set underlineColor(e){this._ext&=-67108864,this._ext|=e&67108863}get urlId(){return this._urlId}set urlId(e){this._urlId=e}get underlineVariantOffset(){let e=(this._ext&3758096384)>>29;return e<0?e^4294967288:e}set underlineVariantOffset(e){this._ext&=536870911,this._ext|=e<<29&3758096384}clone(){return new e(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}},De=class e extends Te{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new Ee,this.combinedData=``}static fromCharData(t){let n=new e;return n.setFromCharData(t),n}isCombined(){return this.content&2097152}getWidth(){return this.content>>22}getChars(){return this.content&2097152?this.combinedData:this.content&2097151?ye(this.content&2097151):``}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):this.content&2097151}setFromCharData(e){this.fg=e[0],this.bg=0;let t=!1;if(e[1].length>2)t=!0;else if(e[1].length===2){let n=e[1].charCodeAt(0);if(55296<=n&&n<=56319){let r=e[1].charCodeAt(1);56320<=r&&r<=57343?this.content=(n-55296)*1024+r-56320+65536|e[2]<<22:t=!0}else t=!0}else this.content=e[1].charCodeAt(0)|e[2]<<22;t&&(this.combinedData=e[1],this.content=2097152|e[2]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},Oe=`di$target`,ke=`di$dependencies`,Ae=new Map;function je(e){return e[ke]||[]}function w(e){if(Ae.has(e))return Ae.get(e);let t=function(e,n,r){if(arguments.length!==3)throw Error(`@IServiceName-decorator can only be used to decorate a parameter`);Me(t,e,r)};return t._id=e,Ae.set(e,t),t}function Me(e,t,n){t[Oe]===t?t[ke].push({id:e,index:n}):(t[ke]=[{id:e,index:n}],t[Oe]=t)}var T=w(`BufferService`),Ne=w(`CoreMouseService`),Pe=w(`CoreService`),Fe=w(`CharsetService`),Ie=w(`InstantiationService`),Le=w(`LogService`),E=w(`OptionsService`),Re=w(`OscLinkService`),ze=w(`UnicodeService`),Be=w(`DecorationService`),Ve=class{constructor(e,t,n){this._bufferService=e,this._optionsService=t,this._oscLinkService=n}provideLinks(e,t){let n=this._bufferService.buffer.lines.get(e-1);if(!n){t(void 0);return}let r=[],i=this._optionsService.rawOptions.linkHandler,a=new De,o=n.getTrimmedLength(),s=-1,c=-1,l=!1;for(let t=0;t<o;t++)if(!(c===-1&&!n.hasContent(t))){if(n.loadCell(t,a),a.hasExtendedAttrs()&&a.extended.urlId)if(c===-1){c=t,s=a.extended.urlId;continue}else l=a.extended.urlId!==s;else c!==-1&&(l=!0);if(l||c!==-1&&t===o-1){let n=this._oscLinkService.getLinkData(s)?.uri;if(n){let a={start:{x:c+1,y:e},end:{x:t+(!l&&t===o-1?1:0),y:e}},s=!1;if(!i?.allowNonHttpProtocols)try{let e=new URL(n);[`http:`,`https:`].includes(e.protocol)||(s=!0)}catch{s=!0}s||r.push({text:n,range:a,activate:(e,t)=>i?i.activate(e,t,a):He(e,t),hover:(e,t)=>i?.hover?.(e,t,a),leave:(e,t)=>i?.leave?.(e,t,a)})}l=!1,a.hasExtendedAttrs()&&a.extended.urlId?(c=t,s=a.extended.urlId):(c=-1,s=-1)}}t(r)}};Ve=b([x(0,T),x(1,E),x(2,Re)],Ve);function He(e,t){if(confirm(`Do you want to navigate to ${t}?
1
+ import{C as e,S as t,_ as n,a as r,b as i,c as a,d as o,f as s,g as c,h as l,i as u,l as d,m as f,o as p,p as m,r as h,s as g,t as _,u as ee,v as te,x as ne,y as re}from"./index-DWcF5wcd.js";var ie;function ae(e){if(ie)return ie;let t=ie=te(new Map);async function n(){let n=await e.rpc.call(`devtoolskit:internal:terminals:list`);for(let e of n){if(t.has(e.id)){t.get(e.id).info=Object.freeze(e);continue}t.set(e.id,{info:Object.freeze(e),buffer:null,terminal:null})}console.log(`[VITE DEVTOOLS] Terminals Updated`,[...t.values()])}return e.rpc.client.register({name:`devtoolskit:internal:terminals:updated`,type:`action`,handler:()=>n()}),e.rpc.client.register({name:`devtoolskit:internal:terminals:stream-chunk`,type:`action`,handler:e=>{let n=t.get(e.id);if(!n){console.warn(`[VITE DEVTOOLS] Terminal with id "${e.id}" not found`);return}n.buffer?.push(...e.chunks);for(let t of e.chunks)n.terminal?.writeln(t)}}),n(),t}var oe=2,se=1,ce=class{activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;let t=this._terminal._core;(this._terminal.rows!==e.rows||this._terminal.cols!==e.cols)&&(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let e=this._terminal._core._renderService.dimensions;if(e.css.cell.width===0||e.css.cell.height===0)return;let t=this._terminal.options.scrollback===0?0:this._terminal.options.overviewRuler?.width||14,n=window.getComputedStyle(this._terminal.element.parentElement),r=parseInt(n.getPropertyValue(`height`)),i=Math.max(0,parseInt(n.getPropertyValue(`width`))),a=window.getComputedStyle(this._terminal.element),o={top:parseInt(a.getPropertyValue(`padding-top`)),bottom:parseInt(a.getPropertyValue(`padding-bottom`)),right:parseInt(a.getPropertyValue(`padding-right`)),left:parseInt(a.getPropertyValue(`padding-left`))},s=o.top+o.bottom,c=o.right+o.left,l=r-s,u=i-c-t;return{cols:Math.max(oe,Math.floor(u/e.css.cell.width)),rows:Math.max(se,Math.floor(l/e.css.cell.height))}}},v=Object.defineProperty,le=Object.getOwnPropertyDescriptor,y=(e,t)=>{for(var n in t)v(e,n,{get:t[n],enumerable:!0})},b=(e,t,n,r)=>{for(var i=r>1?void 0:r?le(t,n):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&v(t,n,i),i},x=(e,t)=>(n,r)=>t(n,r,e),ue=`Terminal input`,S={get:()=>ue,set:e=>ue=e},de=`Too much output to announce, navigate to rows manually to read`,fe={get:()=>de,set:e=>de=e};function pe(e){return e.replace(/\r?\n/g,`\r`)}function me(e,t){return t?`\x1B[200~`+e+`\x1B[201~`:e}function he(e,t){e.clipboardData&&e.clipboardData.setData(`text/plain`,t.selectionText),e.preventDefault()}function C(e,t,n,r){e.stopPropagation(),e.clipboardData&&ge(e.clipboardData.getData(`text/plain`),t,n,r)}function ge(e,t,n,r){e=pe(e),e=me(e,n.decPrivateModes.bracketedPasteMode&&r.rawOptions.ignoreBracketedPasteMode!==!0),n.triggerDataEvent(e,!0),t.value=``}function _e(e,t,n){let r=n.getBoundingClientRect(),i=e.clientX-r.left-10,a=e.clientY-r.top-10;t.style.width=`20px`,t.style.height=`20px`,t.style.left=`${i}px`,t.style.top=`${a}px`,t.style.zIndex=`1000`,t.focus()}function ve(e,t,n,r,i){_e(e,t,n),i&&r.rightClickSelect(e),t.value=r.selectionText,t.select()}function ye(e){return e>65535?(e-=65536,String.fromCharCode((e>>10)+55296)+String.fromCharCode(e%1024+56320)):String.fromCharCode(e)}function be(e,t=0,n=e.length){let r=``;for(let i=t;i<n;++i){let t=e[i];t>65535?(t-=65536,r+=String.fromCharCode((t>>10)+55296)+String.fromCharCode(t%1024+56320)):r+=String.fromCharCode(t)}return r}var xe=class{constructor(){this._interim=0}clear(){this._interim=0}decode(e,t){let n=e.length;if(!n)return 0;let r=0,i=0;if(this._interim){let n=e.charCodeAt(i++);56320<=n&&n<=57343?t[r++]=(this._interim-55296)*1024+n-56320+65536:(t[r++]=this._interim,t[r++]=n),this._interim=0}for(let a=i;a<n;++a){let i=e.charCodeAt(a);if(55296<=i&&i<=56319){if(++a>=n)return this._interim=i,r;let o=e.charCodeAt(a);56320<=o&&o<=57343?t[r++]=(i-55296)*1024+o-56320+65536:(t[r++]=i,t[r++]=o);continue}i!==65279&&(t[r++]=i)}return r}},Se=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(e,t){let n=e.length;if(!n)return 0;let r=0,i,a,o,s,c=0,l=0;if(this.interim[0]){let i=!1,a=this.interim[0];a&=(a&224)==192?31:(a&240)==224?15:7;let o=0,s;for(;(s=this.interim[++o]&63)&&o<4;)a<<=6,a|=s;let c=(this.interim[0]&224)==192?2:(this.interim[0]&240)==224?3:4,u=c-o;for(;l<u;){if(l>=n)return 0;if(s=e[l++],(s&192)!=128){l--,i=!0;break}else this.interim[o++]=s,a<<=6,a|=s&63}i||(c===2?a<128?l--:t[r++]=a:c===3?a<2048||a>=55296&&a<=57343||a===65279||(t[r++]=a):a<65536||a>1114111||(t[r++]=a)),this.interim.fill(0)}let u=n-4,d=l;for(;d<n;){for(;d<u&&!((i=e[d])&128)&&!((a=e[d+1])&128)&&!((o=e[d+2])&128)&&!((s=e[d+3])&128);)t[r++]=i,t[r++]=a,t[r++]=o,t[r++]=s,d+=4;if(i=e[d++],i<128)t[r++]=i;else if((i&224)==192){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(c=(i&31)<<6|a&63,c<128){d--;continue}t[r++]=c}else if((i&240)==224){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,r;if(o=e[d++],(o&192)!=128){d--;continue}if(c=(i&15)<<12|(a&63)<<6|o&63,c<2048||c>=55296&&c<=57343||c===65279)continue;t[r++]=c}else if((i&248)==240){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,r;if(o=e[d++],(o&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,this.interim[2]=o,r;if(s=e[d++],(s&192)!=128){d--;continue}if(c=(i&7)<<18|(a&63)<<12|(o&63)<<6|s&63,c<65536||c>1114111)continue;t[r++]=c}}return r}},Ce=``,we=` `,Te=class e{constructor(){this.fg=0,this.bg=0,this.extended=new Ee}static toColorRGB(e){return[e>>>16&255,e>>>8&255,e&255]}static fromColorRGB(e){return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255}clone(){let t=new e;return t.fg=this.fg,t.bg=this.bg,t.extended=this.extended.clone(),t}isInverse(){return this.fg&67108864}isBold(){return this.fg&134217728}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:this.fg&268435456}isBlink(){return this.fg&536870912}isInvisible(){return this.fg&1073741824}isItalic(){return this.bg&67108864}isDim(){return this.bg&134217728}isStrikethrough(){return this.fg&2147483648}isProtected(){return this.bg&536870912}isOverline(){return this.bg&1073741824}getFgColorMode(){return this.fg&50331648}getBgColorMode(){return this.bg&50331648}isFgRGB(){return(this.fg&50331648)==50331648}isBgRGB(){return(this.bg&50331648)==50331648}isFgPalette(){return(this.fg&50331648)==16777216||(this.fg&50331648)==33554432}isBgPalette(){return(this.bg&50331648)==16777216||(this.bg&50331648)==33554432}isFgDefault(){return(this.fg&50331648)==0}isBgDefault(){return(this.bg&50331648)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(this.fg&50331648){case 16777216:case 33554432:return this.fg&255;case 50331648:return this.fg&16777215;default:return-1}}getBgColor(){switch(this.bg&50331648){case 16777216:case 33554432:return this.bg&255;case 50331648:return this.bg&16777215;default:return-1}}hasExtendedAttrs(){return this.bg&268435456}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(this.bg&268435456&&~this.extended.underlineColor)switch(this.extended.underlineColor&50331648){case 16777216:case 33554432:return this.extended.underlineColor&255;case 50331648:return this.extended.underlineColor&16777215;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return this.bg&268435456&&~this.extended.underlineColor?this.extended.underlineColor&50331648:this.getFgColorMode()}isUnderlineColorRGB(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)==16777216||(this.extended.underlineColor&50331648)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)==0:this.isFgDefault()}getUnderlineStyle(){return this.fg&268435456?this.bg&268435456?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}},Ee=class e{constructor(e=0,t=0){this._ext=0,this._urlId=0,this._ext=e,this._urlId=t}get ext(){return this._urlId?this._ext&-469762049|this.underlineStyle<<26:this._ext}set ext(e){this._ext=e}get underlineStyle(){return this._urlId?5:(this._ext&469762048)>>26}set underlineStyle(e){this._ext&=-469762049,this._ext|=e<<26&469762048}get underlineColor(){return this._ext&67108863}set underlineColor(e){this._ext&=-67108864,this._ext|=e&67108863}get urlId(){return this._urlId}set urlId(e){this._urlId=e}get underlineVariantOffset(){let e=(this._ext&3758096384)>>29;return e<0?e^4294967288:e}set underlineVariantOffset(e){this._ext&=536870911,this._ext|=e<<29&3758096384}clone(){return new e(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}},De=class e extends Te{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new Ee,this.combinedData=``}static fromCharData(t){let n=new e;return n.setFromCharData(t),n}isCombined(){return this.content&2097152}getWidth(){return this.content>>22}getChars(){return this.content&2097152?this.combinedData:this.content&2097151?ye(this.content&2097151):``}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):this.content&2097151}setFromCharData(e){this.fg=e[0],this.bg=0;let t=!1;if(e[1].length>2)t=!0;else if(e[1].length===2){let n=e[1].charCodeAt(0);if(55296<=n&&n<=56319){let r=e[1].charCodeAt(1);56320<=r&&r<=57343?this.content=(n-55296)*1024+r-56320+65536|e[2]<<22:t=!0}else t=!0}else this.content=e[1].charCodeAt(0)|e[2]<<22;t&&(this.combinedData=e[1],this.content=2097152|e[2]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},Oe=`di$target`,ke=`di$dependencies`,Ae=new Map;function je(e){return e[ke]||[]}function w(e){if(Ae.has(e))return Ae.get(e);let t=function(e,n,r){if(arguments.length!==3)throw Error(`@IServiceName-decorator can only be used to decorate a parameter`);Me(t,e,r)};return t._id=e,Ae.set(e,t),t}function Me(e,t,n){t[Oe]===t?t[ke].push({id:e,index:n}):(t[ke]=[{id:e,index:n}],t[Oe]=t)}var T=w(`BufferService`),Ne=w(`CoreMouseService`),Pe=w(`CoreService`),Fe=w(`CharsetService`),Ie=w(`InstantiationService`),Le=w(`LogService`),E=w(`OptionsService`),Re=w(`OscLinkService`),ze=w(`UnicodeService`),Be=w(`DecorationService`),Ve=class{constructor(e,t,n){this._bufferService=e,this._optionsService=t,this._oscLinkService=n}provideLinks(e,t){let n=this._bufferService.buffer.lines.get(e-1);if(!n){t(void 0);return}let r=[],i=this._optionsService.rawOptions.linkHandler,a=new De,o=n.getTrimmedLength(),s=-1,c=-1,l=!1;for(let t=0;t<o;t++)if(!(c===-1&&!n.hasContent(t))){if(n.loadCell(t,a),a.hasExtendedAttrs()&&a.extended.urlId)if(c===-1){c=t,s=a.extended.urlId;continue}else l=a.extended.urlId!==s;else c!==-1&&(l=!0);if(l||c!==-1&&t===o-1){let n=this._oscLinkService.getLinkData(s)?.uri;if(n){let a={start:{x:c+1,y:e},end:{x:t+(!l&&t===o-1?1:0),y:e}},s=!1;if(!i?.allowNonHttpProtocols)try{let e=new URL(n);[`http:`,`https:`].includes(e.protocol)||(s=!0)}catch{s=!0}s||r.push({text:n,range:a,activate:(e,t)=>i?i.activate(e,t,a):He(e,t),hover:(e,t)=>i?.hover?.(e,t,a),leave:(e,t)=>i?.leave?.(e,t,a)})}l=!1,a.hasExtendedAttrs()&&a.extended.urlId?(c=t,s=a.extended.urlId):(c=-1,s=-1)}}t(r)}};Ve=b([x(0,T),x(1,E),x(2,Re)],Ve);function He(e,t){if(confirm(`Do you want to navigate to ${t}?
2
2
 
3
3
  WARNING: This link could potentially be dangerous`)){let e=window.open();if(e){try{e.opener=null}catch{}e.location.href=t}else console.warn(`Opening link blocked as opener could not be cleared`)}}var Ue=w(`CharSizeService`),We=w(`CoreBrowserService`),Ge=w(`MouseService`),Ke=w(`RenderService`),qe=w(`SelectionService`),Je=w(`CharacterJoinerService`),Ye=w(`ThemeService`),Xe=w(`LinkProviderService`),Ze=new class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?rt.isErrorNoTelemetry(e)?new rt(e.message+`
4
4